diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-05-04 19:54:24 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-05-04 19:54:24 +0000 |
commit | d7633c195a464e4d344ada9eea61afd10110598a (patch) | |
tree | 1f2da0b135f3ed84955e340cae823f00c4ce7284 /src/svnqt/exception.cpp | |
parent | 3fa7eb804f67b2789f128075cc2522f398640250 (diff) | |
download | tdesvn-d7633c195a464e4d344ada9eea61afd10110598a.tar.gz tdesvn-d7633c195a464e4d344ada9eea61afd10110598a.zip |
Port kdesvn to TQt4
This enables compilation under both Qt3 and Qt4
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/kdesvn@1230412 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'src/svnqt/exception.cpp')
-rw-r--r-- | src/svnqt/exception.cpp | 52 |
1 files changed, 26 insertions, 26 deletions
diff --git a/src/svnqt/exception.cpp b/src/svnqt/exception.cpp index 67bcb60..8cd795c 100644 --- a/src/svnqt/exception.cpp +++ b/src/svnqt/exception.cpp @@ -33,12 +33,12 @@ #include "exception.hpp" #include "svnqt/svnqt_defines.hpp" -#include <qstring.h> +#include <tqstring.h> #ifdef HAS_BACKTRACE_H #include <execinfo.h> -#include <qstringlist.h> -#define SVNQT_BACKTRACE_LENGTH 20 +#include <tqstringlist.h> +#define SVNTQT_BACKTRACE_LENGTH 20 #endif namespace svn @@ -48,15 +48,15 @@ namespace svn { private: public: - QString message; + TQString message; apr_status_t apr_err; Data (const char * msg) - : message(QString::FROMUTF8(msg)),apr_err(0) + : message(TQString::FROMUTF8(msg)),apr_err(0) { } - Data (const QString& msg) + Data (const TQString& msg) : message(msg),apr_err(0) { } @@ -73,7 +73,7 @@ namespace svn m = new Data (message); } - Exception::Exception (const QString& message) throw () + Exception::Exception (const TQString& message) throw () { m = new Data (message); } @@ -94,39 +94,39 @@ namespace svn return m->apr_err; } - const QString& + const TQString& Exception::msg () const { return m->message; } - void Exception::setMessage(const QString&aMsg) + void Exception::setMessage(const TQString&aMsg) { m->message=aMsg; } - QString Exception::error2msg(svn_error_t*error) + TQString Exception::error2msg(svn_error_t*error) { - QString message = ""; + TQString message = ""; if (error==0) { return message; } svn_error_t * next = error->child; if (error->message) - message = QString::FROMUTF8(error->message); + message = TQString::FROMUTF8(error->message); else { message = "Unknown error!\n"; if (error->file) { - message += QString::FROMUTF8("In file "); - message += QString::FROMUTF8(error->file); - message += QString(" Line %1").arg(error->line); + message += TQString::FROMUTF8("In file "); + message += TQString::FROMUTF8(error->file); + message += TQString(" Line %1").tqarg(error->line); } } while (next != NULL && next->message != NULL) { - message = message + "\n" + QString::FROMUTF8(next->message); + message = message + "\n" + TQString::FROMUTF8(next->message); next = next->child; } @@ -140,7 +140,7 @@ namespace svn { } - ClientException::ClientException (const QString&msg) throw () + ClientException::ClientException (const TQString&msg) throw () : Exception (msg) { } @@ -187,30 +187,30 @@ namespace svn #endif } - QString ClientException::getBackTrace() + TQString ClientException::getBackTrace() { - QString Result; + TQString Result; qDebug("getBackTrace"); #ifdef HAS_BACKTRACE_H qDebug("Generating backtrace"); - void *array[SVNQT_BACKTRACE_LENGTH]; + void *array[SVNTQT_BACKTRACE_LENGTH]; size_t size; size_t i; - size = backtrace (array, SVNQT_BACKTRACE_LENGTH); + size = backtrace (array, SVNTQT_BACKTRACE_LENGTH); if (!size) { return Result; } char ** strings = backtrace_symbols (array, size); - QStringList r; + TQStringList r; for (i = 0; i < size; ++i) { - r.push_back(QString::number(i) + - QString::FROMUTF8(": ") + - QString::FROMUTF8(strings[i])); + r.push_back(TQString::number(i) + + TQString::FROMUTF8(": ") + + TQString::FROMUTF8(strings[i])); } - Result = QString::FROMUTF8("[\n")+r.join("\n")+QString::FROMUTF8("]\n"); + Result = TQString::FROMUTF8("[\n")+r.join("\n")+TQString::FROMUTF8("]\n"); free (strings); #endif return Result; |