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 /kio/tests | |
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 'kio/tests')
-rw-r--r-- | kio/tests/dataprotocoltest.cpp | 2 | ||||
-rw-r--r-- | kio/tests/jobtest.cpp | 2 | ||||
-rw-r--r-- | kio/tests/jobtest.h | 2 | ||||
-rw-r--r-- | kio/tests/kacltest.cpp | 30 | ||||
-rw-r--r-- | kio/tests/kdcopcheck.h | 2 | ||||
-rw-r--r-- | kio/tests/kdefaultprogresstest.cpp | 4 | ||||
-rw-r--r-- | kio/tests/kdirlistertest.cpp | 2 | ||||
-rw-r--r-- | kio/tests/kdirlistertest.h | 4 | ||||
-rw-r--r-- | kio/tests/kdirwatchunittest.cpp | 8 | ||||
-rw-r--r-- | kio/tests/kioslavetest.cpp | 10 | ||||
-rw-r--r-- | kio/tests/kruntest.h | 2 | ||||
-rw-r--r-- | kio/tests/ksycocatest.cpp | 2 | ||||
-rw-r--r-- | kio/tests/kurifiltertest.cpp | 4 | ||||
-rw-r--r-- | kio/tests/kurlcompletiontest.cpp | 8 | ||||
-rw-r--r-- | kio/tests/previewtest.h | 2 |
15 files changed, 42 insertions, 42 deletions
diff --git a/kio/tests/dataprotocoltest.cpp b/kio/tests/dataprotocoltest.cpp index 0c8470a61..64167d9ea 100644 --- a/kio/tests/dataprotocoltest.cpp +++ b/kio/tests/dataprotocoltest.cpp @@ -47,7 +47,7 @@ public: // meta_data[key] = value; // cout << "§ " << key << " = " << value << endl; TQString prefix = "Metadata[\""+key+"\"]: "; - KIO::MetaData::Iterator it = attributes_expected.find(key); + KIO::MetaData::Iterator it = attributes_expected.tqfind(key); if (it != attributes_expected.end()) { testStrings(prefix,it.data(),value); // remove key from map diff --git a/kio/tests/jobtest.cpp b/kio/tests/jobtest.cpp index 9fe4b4c49..93b250075 100644 --- a/kio/tests/jobtest.cpp +++ b/kio/tests/jobtest.cpp @@ -532,7 +532,7 @@ void JobTest::slotEntries( KIO::Job*, const KIO::UDSEntryList& lst ) void JobTest::copyFileToSystem() { - if ( !KProtocolInfo::isKnownProtocol( TQString::fromLatin1( "system" ) ) ) { + if ( !KProtocolInfo::isKnownProtocol( TQString::tqfromLatin1( "system" ) ) ) { kdDebug() << k_funcinfo << "no kio_system, skipping test" << endl; return; } diff --git a/kio/tests/jobtest.h b/kio/tests/jobtest.h index 533ffba8c..83ec2da7c 100644 --- a/kio/tests/jobtest.h +++ b/kio/tests/jobtest.h @@ -24,7 +24,7 @@ #include <tqobject.h> #include <kio/job.h> -class JobTest : public QObject +class JobTest : public TQObject { Q_OBJECT diff --git a/kio/tests/kacltest.cpp b/kio/tests/kacltest.cpp index 58ae319b2..372589dd9 100644 --- a/kio/tests/kacltest.cpp +++ b/kio/tests/kacltest.cpp @@ -80,22 +80,22 @@ int main(int argc, char *argv[]) } #ifdef Q_OS_FREEBSD -static const TQString s_group1 = TQString::fromLatin1("staff"); -static const TQString s_group2 = TQString::fromLatin1("guest"); +static const TQString s_group1 = TQString::tqfromLatin1("staff"); +static const TQString s_group2 = TQString::tqfromLatin1("guest"); #else -static const TQString s_group1 = TQString::fromLatin1("audio"); -static const TQString s_group2 = TQString::fromLatin1("users"); +static const TQString s_group1 = TQString::tqfromLatin1("audio"); +static const TQString s_group2 = TQString::tqfromLatin1("users"); #endif -static const TQString s_testACL = TQString::fromLatin1( "user::rw-\nuser:bin:rwx\ngroup::rw-\nmask::rwx\nother::r--\n" ); -static const TQString s_testACL2 = TQString::fromLatin1( "user::rwx\nuser:bin:rwx\ngroup::rw-\n") + - TQString::fromLatin1( "group:" ) + s_group1 + TQString::fromLatin1( ":--x\n" ) + - TQString::fromLatin1( "group:" ) + s_group2 + TQString::fromLatin1( ":r--\n" ) + - TQString::fromLatin1( "mask::r-x\nother::r--\n" ); -static const TQString s_testACLEffective = TQString::fromLatin1( "user::rwx\nuser:bin:rwx #effective:r-x\ngroup::rw- #effective:r--\n" ) + - TQString::fromLatin1( "group:" ) + s_group1 + TQString::fromLatin1( ":--x\n" ) + - TQString::fromLatin1( "group:" ) + s_group2 + TQString::fromLatin1( ":r--\n" ) + - TQString::fromLatin1( "mask::r-x\nother::r--\n" ); +static const TQString s_testACL = TQString::tqfromLatin1( "user::rw-\nuser:bin:rwx\ngroup::rw-\nmask::rwx\nother::r--\n" ); +static const TQString s_testACL2 = TQString::tqfromLatin1( "user::rwx\nuser:bin:rwx\ngroup::rw-\n") + + TQString::tqfromLatin1( "group:" ) + s_group1 + TQString::tqfromLatin1( ":--x\n" ) + + TQString::tqfromLatin1( "group:" ) + s_group2 + TQString::tqfromLatin1( ":r--\n" ) + + TQString::tqfromLatin1( "mask::r-x\nother::r--\n" ); +static const TQString s_testACLEffective = TQString::tqfromLatin1( "user::rwx\nuser:bin:rwx #effective:r-x\ngroup::rw- #effective:r--\n" ) + + TQString::tqfromLatin1( "group:" ) + s_group1 + TQString::tqfromLatin1( ":--x\n" ) + + TQString::tqfromLatin1( "group:" ) + s_group2 + TQString::tqfromLatin1( ":r--\n" ) + + TQString::tqfromLatin1( "mask::r-x\nother::r--\n" ); KACLTest::KACLTest() :m_acl( s_testACL ) @@ -265,8 +265,8 @@ void KACLTest::testSettingExtended() // groups, all and named - const TQString expected2 = TQString::fromLatin1( "user::rw-\nuser:bin:rwx\ngroup::rw-\ngroup:" ) + s_group1 + - TQString::fromLatin1( ":-wx\ngroup:" ) + s_group2 + TQString::fromLatin1(":r--\nmask::rwx\nother::r--\n" ); + const TQString expected2 = TQString::tqfromLatin1( "user::rw-\nuser:bin:rwx\ngroup::rw-\ngroup:" ) + s_group1 + + TQString::tqfromLatin1( ":-wx\ngroup:" ) + s_group2 + TQString::tqfromLatin1(":r--\nmask::rwx\nother::r--\n" ); CharlesII.setACL( s_testACL ); // reset ACLGroupPermissionsList groups; ACLGroupPermissions group = qMakePair( s_group1, ( unsigned short )3 ); diff --git a/kio/tests/kdcopcheck.h b/kio/tests/kdcopcheck.h index c3572d929..9a76e6246 100644 --- a/kio/tests/kdcopcheck.h +++ b/kio/tests/kdcopcheck.h @@ -5,7 +5,7 @@ #include <tqstring.h> #include <tqobject.h> -class TestService : public QObject +class TestService : public TQObject { Q_OBJECT public: diff --git a/kio/tests/kdefaultprogresstest.cpp b/kio/tests/kdefaultprogresstest.cpp index a831041e1..c2a642c1f 100644 --- a/kio/tests/kdefaultprogresstest.cpp +++ b/kio/tests/kdefaultprogresstest.cpp @@ -18,7 +18,7 @@ int main(int argc, char **argv) dlg->slotTotalDirs( 0L, 1 ); dlg->slotSpeed( 0L, 55 ); - dlg->slotInfoMessage( 0L, TQString::fromLatin1( "Starting..." ) ); + dlg->slotInfoMessage( 0L, TQString::tqfromLatin1( "Starting..." ) ); int files = 0; for ( int size = 0 ; size < 12000 ; size += 1 ) @@ -31,7 +31,7 @@ int main(int argc, char **argv) } kapp->processEvents(); } - dlg->slotInfoMessage( 0L, TQString::fromLatin1( "Done." ) ); + dlg->slotInfoMessage( 0L, TQString::tqfromLatin1( "Done." ) ); delete dlg; return 0; diff --git a/kio/tests/kdirlistertest.cpp b/kio/tests/kdirlistertest.cpp index 6137f5e71..8acef5b24 100644 --- a/kio/tests/kdirlistertest.cpp +++ b/kio/tests/kdirlistertest.cpp @@ -47,7 +47,7 @@ KDirListerTest::KDirListerTest( TQWidget *parent, const char *name ) layout->addWidget( startR ); layout->addWidget( startT ); layout->addWidget( test ); - resize( layout->sizeHint() ); + resize( layout->tqsizeHint() ); connect( startR, TQT_SIGNAL( clicked() ), TQT_SLOT( startRoot() ) ); connect( startH, TQT_SIGNAL( clicked() ), TQT_SLOT( startHome() ) ); diff --git a/kio/tests/kdirlistertest.h b/kio/tests/kdirlistertest.h index 6b1e831f5..12e72c911 100644 --- a/kio/tests/kdirlistertest.h +++ b/kio/tests/kdirlistertest.h @@ -31,7 +31,7 @@ using namespace std; -class PrintSignals : public QObject +class PrintSignals : public TQObject { Q_OBJECT public: @@ -98,7 +98,7 @@ public slots: { cout << "*** speed: " << bytes_per_second << endl; } }; -class KDirListerTest : public QWidget +class KDirListerTest : public TQWidget { Q_OBJECT public: diff --git a/kio/tests/kdirwatchunittest.cpp b/kio/tests/kdirwatchunittest.cpp index 1bd17edd6..870b85de9 100644 --- a/kio/tests/kdirwatchunittest.cpp +++ b/kio/tests/kdirwatchunittest.cpp @@ -26,7 +26,7 @@ void KDirWatchTest::VERIFY_NOTHING() for (int i = 0; i < 20; ++i) { usleep(100*1000); - qApp->processEvents(); + tqApp->processEvents(); } bool nothing_failed = true; @@ -47,7 +47,7 @@ void KDirWatchTest::VERIFY_DIRTY(const TQString& alert) for (int i = 0; i < 20; ++i) { usleep(100*1000); - qApp->processEvents(); + tqApp->processEvents(); } VERIFY (m_s[sigCreated] == m_signals[sigCreated] && @@ -64,7 +64,7 @@ void KDirWatchTest::VERIFY_CREATED(const TQString& alert) for (int i = 0; i < 20; ++i) { usleep(100*1000); - qApp->processEvents(); + tqApp->processEvents(); } VERIFY (m_s[sigDirty] == m_signals[sigDirty] && @@ -81,7 +81,7 @@ void KDirWatchTest::VERIFY_DELETED(const TQString& alert) for (int i = 0; i < 20; ++i) { usleep(100*1000); - qApp->processEvents(); + tqApp->processEvents(); } VERIFY (m_s[sigDirty] == m_signals[sigDirty] && diff --git a/kio/tests/kioslavetest.cpp b/kio/tests/kioslavetest.cpp index 0db23457d..5689aaae9 100644 --- a/kio/tests/kioslavetest.cpp +++ b/kio/tests/kioslavetest.cpp @@ -144,24 +144,24 @@ KioslaveTest::KioslaveTest( TQString src, TQString dest, uint op, uint pr ) hbLayout = new TQHBoxLayout( topLayout, 15 ); pbStart = new TQPushButton( "&Start", main_widget ); - pbStart->setFixedSize( pbStart->sizeHint() ); + pbStart->setFixedSize( pbStart->tqsizeHint() ); connect( pbStart, TQT_SIGNAL(clicked()), TQT_SLOT(startJob()) ); hbLayout->addWidget( pbStart, 5 ); pbStop = new TQPushButton( "Sto&p", main_widget ); - pbStop->setFixedSize( pbStop->sizeHint() ); + pbStop->setFixedSize( pbStop->tqsizeHint() ); pbStop->setEnabled( false ); connect( pbStop, TQT_SIGNAL(clicked()), TQT_SLOT(stopJob()) ); hbLayout->addWidget( pbStop, 5 ); // close button close = new TQPushButton( "&Close", main_widget ); - close->setFixedSize( close->sizeHint() ); + close->setFixedSize( close->tqsizeHint() ); connect(close, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotQuit())); topLayout->addWidget( close, 5 ); - main_widget->setMinimumSize( main_widget->sizeHint() ); + main_widget->setMinimumSize( main_widget->tqsizeHint() ); setCentralWidget( main_widget ); slave = 0; @@ -545,7 +545,7 @@ int main(int argc, char **argv) { KioslaveTest test( src, dest, op, pr ); test.show(); // Bug in KTMW / Qt / layouts ? - test.resize( test.sizeHint() ); + test.resize( test.tqsizeHint() ); app.setMainWidget(&test); app.exec(); diff --git a/kio/tests/kruntest.h b/kio/tests/kruntest.h index 8cbc7af53..68e7a7280 100644 --- a/kio/tests/kruntest.h +++ b/kio/tests/kruntest.h @@ -40,7 +40,7 @@ public: class TQPushButton; -class Receiver : public QWidget +class Receiver : public TQWidget { Q_OBJECT public: diff --git a/kio/tests/ksycocatest.cpp b/kio/tests/ksycocatest.cpp index 4a4fcabb0..a9fa8198a 100644 --- a/kio/tests/ksycocatest.cpp +++ b/kio/tests/ksycocatest.cpp @@ -70,7 +70,7 @@ int main(int argc, char *argv[]) KApplication k(argc,argv,"whatever",false/*noGUI*/); // KMessageBox needs KApp for makeStdCaption TQCString instname = "kword"; - TQString desktopPath = TQString::fromLatin1( "Office/%1.desktop" ).arg( instname ); + TQString desktopPath = TQString::tqfromLatin1( "Office/%1.desktop" ).arg( instname ); qDebug( "Looking for %s", desktopPath.latin1() ); KService::Ptr service = KService::serviceByDesktopPath( desktopPath ); if ( service ) diff --git a/kio/tests/kurifiltertest.cpp b/kio/tests/kurifiltertest.cpp index 8e4b023cb..dca72c234 100644 --- a/kio/tests/kurifiltertest.cpp +++ b/kio/tests/kurifiltertest.cpp @@ -45,7 +45,7 @@ void filter( const char* u, const char * expectedResult = 0, int expectedUriType if( abs_path ) { - m_filterData->setAbsolutePath( TQString::fromLatin1( abs_path ) ); + m_filterData->setAbsolutePath( TQString::tqfromLatin1( abs_path ) ); kdDebug() << "Filtering: " << a << " with abs_path=" << abs_path << endl; } else @@ -98,7 +98,7 @@ void filter( const char* u, const char * expectedResult = 0, int expectedUriType { // Hack for other locales than english, normalize google hosts to google.com cmd = cmd.replace( TQRegExp( "www\\.google\\.[^/]*/" ), "www.google.com/" ); - if ( cmd != TQString::fromLatin1( expectedResult ) ) + if ( cmd != TQString::tqfromLatin1( expectedResult ) ) { kdError() << " Got " << cmd << " expected " << expectedResult << endl; ::exit(1); diff --git a/kio/tests/kurlcompletiontest.cpp b/kio/tests/kurlcompletiontest.cpp index 612dab558..4750636b8 100644 --- a/kio/tests/kurlcompletiontest.cpp +++ b/kio/tests/kurlcompletiontest.cpp @@ -96,8 +96,8 @@ void KURLCompletionTest::testLocalRelativePath() waitForCompletion(); TQStringList comp1all = m_completion->allMatches(); assert( comp1all.count() == 2 ); - assert( comp1all.find( "file1" ) != comp1all.end() ); - assert( comp1all.find( "file#a" ) != comp1all.end() ); + assert( comp1all.tqfind( "file1" ) != comp1all.end() ); + assert( comp1all.tqfind( "file#a" ) != comp1all.end() ); TQString comp1 = m_completion->replacedPath( "file1" ); // like KURLRequester does assert( comp1 == "file1" ); @@ -138,9 +138,9 @@ void KURLCompletionTest::testLocalURL() TQStringList comp1all = m_completion->allMatches(); kdDebug() << comp1all << endl; assert( comp1all.count() == 2 ); - assert( comp1all.find( m_dirURL.url() + "file1" ) != comp1all.end() ); + assert( comp1all.tqfind( m_dirURL.url() + "file1" ) != comp1all.end() ); TQString filehash = m_dirURL.url() + "file%23a"; - assert( comp1all.find( filehash ) != comp1all.end() ); + assert( comp1all.tqfind( filehash ) != comp1all.end() ); TQString filehashPath = m_completion->replacedPath( filehash ); // note that it returns a path!! kdDebug() << filehashPath << endl; assert( filehashPath == m_dirURL.path() + "file#a" ); diff --git a/kio/tests/previewtest.h b/kio/tests/previewtest.h index a7e1727d6..27d797403 100644 --- a/kio/tests/previewtest.h +++ b/kio/tests/previewtest.h @@ -6,7 +6,7 @@ class KLineEdit; class TQLabel; class KFileItem; -class PreviewTest : public QWidget +class PreviewTest : public TQWidget { Q_OBJECT public: |