diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-01-13 08:32:36 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-01-13 08:32:36 +0000 |
commit | f7e71d47719ab6094cf4a9fafffa5ea351973522 (patch) | |
tree | 30834aa632d442019e14f88685001d94657d060b /kunittest | |
parent | b31cfd9a1ee986fe2ae9a693f3afd7f171dd897c (diff) | |
download | tdelibs-f7e71d47719ab6094cf4a9fafffa5ea351973522.tar.gz tdelibs-f7e71d47719ab6094cf4a9fafffa5ea351973522.zip |
Initial conversion for TQt for Qt4 3.4.0 TP2
This will also compile with TQt for Qt3, and should not cause any problems
with dependent modules such as kdebase. If it does then it needs to be fixed!
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdelibs@1214149 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kunittest')
-rw-r--r-- | kunittest/module.h | 4 | ||||
-rw-r--r-- | kunittest/runner.cpp | 4 | ||||
-rw-r--r-- | kunittest/runner.h | 2 | ||||
-rw-r--r-- | kunittest/tester.cpp | 8 | ||||
-rw-r--r-- | kunittest/tester.h | 4 |
5 files changed, 11 insertions, 11 deletions
diff --git a/kunittest/module.h b/kunittest/module.h index 7f4b24789..4213ddcf0 100644 --- a/kunittest/module.h +++ b/kunittest/module.h @@ -48,7 +48,7 @@ namespace KUnitTest * @code KUNITTEST_MODULE(kunittest_samplemodule,"TestSuite") @endcode */ #define KUNITTEST_MODULE(library,suite) \ - static const TQString s_kunittest_suite = TQString::fromLatin1(suite); \ + static const TQString s_kunittest_suite = TQString::tqfromLatin1(suite); \ class library##Module : public TQObject \ { \ public: \ @@ -93,7 +93,7 @@ namespace KUnitTest tester##ModuleAutoregister() \ { \ KUnitTest::Tester *test = new tester(); \ - TQString name = s_kunittest_suite + TQString::fromLatin1("::") + TQString::fromLocal8Bit(#tester); \ + TQString name = s_kunittest_suite + TQString::tqfromLatin1("::") + TQString::fromLocal8Bit(#tester); \ test->setName(name.local8Bit()); \ kunittest_registerModuleTester(name.local8Bit(), test ); \ } \ diff --git a/kunittest/runner.cpp b/kunittest/runner.cpp index 580d451b8..ebf74e213 100644 --- a/kunittest/runner.cpp +++ b/kunittest/runner.cpp @@ -187,7 +187,7 @@ namespace KUnitTest str = TQString( "%1 of %2 tests did not behave as expected (%1 unexpected passes)" ).arg( globalFails ).arg( numTests ).arg( globalXPasses ); if ( globalSkipped ) str += TQString( " (%1 tests skipped)" ).arg( globalSkipped ); - cout << str.local8Bit() << endl; + cout << str.local8Bit().data() << endl; #endif return m_registry.count(); @@ -203,7 +203,7 @@ namespace KUnitTest void Runner::runTest(const char *name) { - Tester *test = m_registry.find(name); + Tester *test = m_registry.tqfind(name); if ( test == 0L ) return; if ( s_debugCapturingEnabled ) diff --git a/kunittest/runner.h b/kunittest/runner.h index 1bd6a3d15..1e0c1ec72 100644 --- a/kunittest/runner.h +++ b/kunittest/runner.h @@ -94,7 +94,7 @@ namespace KUnitTest * * @see KUNITTEST_REGISTER_TESTER */ - class KUNITTEST_EXPORT Runner : public QObject + class KUNITTEST_EXPORT Runner : public TQObject { Q_OBJECT diff --git a/kunittest/tester.cpp b/kunittest/tester.cpp index 3faf3997e..0ad956ba0 100644 --- a/kunittest/tester.cpp +++ b/kunittest/tester.cpp @@ -48,9 +48,9 @@ namespace KUnitTest void SlotTester::allTests() { - TQStrList allSlots = metaObject()->slotNames(); + TQStrList allSlots = tqmetaObject()->slotNames(); - if ( allSlots.contains("setUp()") > 0 ) invokeMember("setUp()"); + if ( allSlots.tqcontains("setUp()") > 0 ) invokeMember("setUp()"); for ( char *sl = allSlots.first(); sl; sl = allSlots.next() ) { @@ -67,14 +67,14 @@ namespace KUnitTest } } - if ( allSlots.contains("tearDown()") > 0 ) invokeMember("tearDown()"); + if ( allSlots.tqcontains("tearDown()") > 0 ) invokeMember("tearDown()"); m_total->clear(); } TestResults *SlotTester::results(const char *sl) { - if ( m_resultsList.find(sl) == 0L ) m_resultsList.insert(sl, new TestResults()); + if ( m_resultsList.tqfind(sl) == 0L ) m_resultsList.insert(sl, new TestResults()); return m_resultsList[sl]; } diff --git a/kunittest/tester.h b/kunittest/tester.h index ff3a3d453..0b4dc382f 100644 --- a/kunittest/tester.h +++ b/kunittest/tester.h @@ -359,7 +359,7 @@ using namespace std; * * @code SKIP("Test skipped because of lack of foo support."); @endcode */ -#define SKIP( x ) skip( __FILE__, __LINE__, TQString::fromLatin1(#x)) +#define SKIP( x ) skip( __FILE__, __LINE__, TQString::tqfromLatin1(#x)) /*! * A macro testing that @p expression throws an exception that is catched @@ -519,7 +519,7 @@ namespace KUnitTest * * @see CHECK, XFAIL, SKIP */ - class KUNITTEST_EXPORT Tester : public QObject + class KUNITTEST_EXPORT Tester : public TQObject { public: Tester(const char *name = 0L) |