diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-30 00:15:53 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-30 00:15:53 +0000 |
commit | 0aaa8e3fc8f8a1481333b564f0922277c8d8ad59 (patch) | |
tree | b95c0ca86c4876dd139af376b9f4afd8917cf0cd /src/common/global/log.cpp | |
parent | b79a2c28534cf09987eeeba3077fff9236df182a (diff) | |
download | piklab-0aaa8e3fc8f8a1481333b564f0922277c8d8ad59.tar.gz piklab-0aaa8e3fc8f8a1481333b564f0922277c8d8ad59.zip |
TQt4 port piklab
This enables compilation under both Qt3 and Qt4
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/piklab@1238822 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'src/common/global/log.cpp')
-rw-r--r-- | src/common/global/log.cpp | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/src/common/global/log.cpp b/src/common/global/log.cpp index cf85303..1ab42d0 100644 --- a/src/common/global/log.cpp +++ b/src/common/global/log.cpp @@ -8,7 +8,7 @@ ***************************************************************************/ #include "log.h" -#include <qeventloop.h> +#include <tqeventloop.h> #include "global.h" //----------------------------------------------------------------------------- @@ -41,12 +41,12 @@ void Log::View::setDebugLevel(DebugLevel level) _debugLevel = level; } -void Log::View::log(LineType type, const QString &text, Action action) +void Log::View::log(LineType type, const TQString &text, Action action) { if ( _modes[type.type()]==Show ) doLog(type, text, action); } -void Log::View::log(DebugLevel level, const QString &text, Action action) +void Log::View::log(DebugLevel level, const TQString &text, Action action) { Q_ASSERT( level!=DebugLevel::Quiet ); updateDebugLevel(); @@ -59,30 +59,30 @@ void Log::View::logUserAbort() } //----------------------------------------------------------------------------- -void Log::StringView::sorry(const QString &message, const QString &details) +void Log::StringView::sorry(const TQString &message, const TQString &details) { if ( details.isEmpty() ) _s += message; else _s += message + ": " + details; } -bool Log::StringView::askContinue(const QString &message) +bool Log::StringView::askContinue(const TQString &message) { log(LineType::Warning, message, Immediate); return false; // always fail } //----------------------------------------------------------------------------- -Log::Base::Base(Base *parent) +Log::Base::Base(Base *tqparent) : _parent(0), _data(0) { - setParent(parent); + setParent(tqparent); } -void Log::Base::setParent(Base *parent) +void Log::Base::setParent(Base *tqparent) { delete _data; - _parent = parent; - _data = (parent ? 0 : new LogData); + _parent = tqparent; + _data = (tqparent ? 0 : new LogData); } Log::Base::~Base() @@ -101,28 +101,28 @@ void Log::Base::logUserAbort() if ( view() ) view()->logUserAbort(); } -void Log::Base::log(LineType type, const QString &message, Action action) +void Log::Base::log(LineType type, const TQString &message, Action action) { if ( type==LineType::Error ) setError(message); if ( view() ) view()->log(type, message, action); } -void Log::Base::log(DebugLevel level, const QString &message, Action action) +void Log::Base::log(DebugLevel level, const TQString &message, Action action) { if ( view() ) view()->log(level, message, action); } -void Log::Base::appendToLastLine(const QString &text) +void Log::Base::appendToLastLine(const TQString &text) { if ( view() ) view()->appendToLastLine(text); } -void Log::Base::sorry(const QString &message, const QString &details) +void Log::Base::sorry(const TQString &message, const TQString &details) { if ( view() ) view()->sorry(message, details); } -bool Log::Base::askContinue(const QString &message) +bool Log::Base::askContinue(const TQString &message) { if ( view()==0 ) return false; return view()->askContinue(message); @@ -135,9 +135,9 @@ void Log::Base::clear() } //----------------------------------------------------------------------------- -QString Log::KeyList::text() const +TQString Log::KeyList::text() const { - QString text; + TQString text; if ( !_title.isEmpty() ) text += _title + "\n"; uint nb = 0; for (uint i=0; i<uint(_keys.count()); i++) nb = qMax(nb, uint(_keys[i].length())); |