diff options
Diffstat (limited to 'kio/tests')
42 files changed, 691 insertions, 691 deletions
diff --git a/kio/tests/dataprotocoltest.cpp b/kio/tests/dataprotocoltest.cpp index fa867291c..0c8470a61 100644 --- a/kio/tests/dataprotocoltest.cpp +++ b/kio/tests/dataprotocoltest.cpp @@ -18,8 +18,8 @@ #include <kio/global.h> -#include <qcstring.h> -#include <qstring.h> +#include <tqcstring.h> +#include <tqstring.h> #include <iostream.h> @@ -35,7 +35,7 @@ public: virtual void get(const KURL &) = 0; virtual void mimetype(const KURL &) = 0; - void mimeType(const QString &type) { + void mimeType(const TQString &type) { testStrings("MIME Type: ",mime_type_expected,type); } @@ -43,10 +43,10 @@ public: // cout << "content size: " << bytes << " bytes" << endl; } - void setMetaData(const QString &key, const QString &value) { + void setMetaData(const TQString &key, const TQString &value) { // meta_data[key] = value; // cout << "§ " << key << " = " << value << endl; - QString prefix = "Metadata[\""+key+"\"]: "; + TQString prefix = "Metadata[\""+key+"\"]: "; KIO::MetaData::Iterator it = attributes_expected.find(key); if (it != attributes_expected.end()) { testStrings(prefix,it.data(),value); @@ -69,7 +69,7 @@ public: } } - void data(const QByteArray &a) { + void data(const TQByteArray &a) { if (a.isEmpty()) /* cout << "<no more data>" << endl*/; else { @@ -88,14 +88,14 @@ public: private: int testcaseno; // number of testcase bool failure; // true if any testcase failed - QMap<int,bool> failed_testcases; + TQMap<int,bool> failed_testcases; // -- testcase related members - QString mime_type_expected; // expected mime type + TQString mime_type_expected; // expected mime type /** contains all attributes and values the testcase has to set */ KIO::MetaData attributes_expected; /** contains the content as it is expected to be returned */ - QByteArray content_expected; + TQByteArray content_expected; int passed; // # of passed tests int total; // # of total tests @@ -106,8 +106,8 @@ private: * @param s string to compare to template * @param casesensitive true if case sensitive compare (currently not used) */ - void testStrings(const QString &prefix, const QString &templat, - const QString &s, bool /*casesensitive*/ = true) { + void testStrings(const TQString &prefix, const TQString &templat, + const TQString &s, bool /*casesensitive*/ = true) { if (templat == s) passed++; else { @@ -143,7 +143,7 @@ public: /** * sets the mime type that this testcase is expected to return */ - void setExpectedMimeType(const QString &mime_type) { + void setExpectedMimeType(const TQString &mime_type) { mime_type_expected = mime_type; } @@ -157,7 +157,7 @@ public: /** * sets content as expected to be delivered by the testcase. */ - void setExpectedContent(const QByteArray &content) { + void setExpectedContent(const TQByteArray &content) { content_expected = content; } @@ -177,7 +177,7 @@ public: void endTestrun() { if (failure) { - QMap<int,bool>::ConstIterator it = failed_testcases.begin(); + TQMap<int,bool>::ConstIterator it = failed_testcases.begin(); for (; it != failed_testcases.end(); ++it) { cout << "Testcase " << it.key() << " failed" << endl; } @@ -246,7 +246,7 @@ const char * const url; // == charset tests // -------------------- string const QChar -const QChar * const charset_urls[] = { +const TQChar * const charset_urls[] = { #endif int main(int /*argc*/,char* /*argv*/[]) { @@ -270,7 +270,7 @@ int main(int /*argc*/,char* /*argv*/[]) { if (!has_charset) exp_attrs["charset"] = "us-ascii"; kio_data.setExpectedAttributes(exp_attrs); - QByteArray exp_content; + TQByteArray exp_content; uint exp_content_len = strlen(testcases[i].exp_content); exp_content.setRawData(testcases[i].exp_content,exp_content_len); kio_data.setExpectedContent(exp_content); diff --git a/kio/tests/dummymeta.cpp b/kio/tests/dummymeta.cpp index be8bca2ad..f0d1584c9 100644 --- a/kio/tests/dummymeta.cpp +++ b/kio/tests/dummymeta.cpp @@ -4,8 +4,8 @@ K_EXPORT_COMPONENT_FACTORY( dummymeta, KGenericFactory<DummyMeta> ) -DummyMeta::DummyMeta( QObject *parent, const char *name, - const QStringList &preferredItems ) +DummyMeta::DummyMeta( TQObject *parent, const char *name, + const TQStringList &preferredItems ) : KFilePlugin( parent, name, preferredItems ) { qDebug("---- DummyMeta::DummyMeta: got %i preferred items.", preferredItems.count()); diff --git a/kio/tests/dummymeta.h b/kio/tests/dummymeta.h index 5eb51402c..053c48ecb 100644 --- a/kio/tests/dummymeta.h +++ b/kio/tests/dummymeta.h @@ -10,7 +10,7 @@ class DummyMeta : public KFilePlugin Q_OBJECT public: - DummyMeta( QObject *parent, const char *name, const QStringList &args ); + DummyMeta( TQObject *parent, const char *name, const TQStringList &args ); ~DummyMeta() {} virtual bool readInfo( KFileMetaInfo::Internal& info ); diff --git a/kio/tests/getalltest.cpp b/kio/tests/getalltest.cpp index eab0931fe..58c8d5a3f 100644 --- a/kio/tests/getalltest.cpp +++ b/kio/tests/getalltest.cpp @@ -13,7 +13,7 @@ int main(int argc, char *argv[]) kdDebug() << "All services" << endl; KService::List services = KService::allServices(); kdDebug() << "got " << services.count() << " services" << endl; - QValueListIterator<KService::Ptr> s = services.begin(); + TQValueListIterator<KService::Ptr> s = services.begin(); for ( ; s != services.end() ; ++s ) { kdDebug() << (*s)->name() << " " << (*s)->desktopEntryPath() << endl; @@ -23,7 +23,7 @@ int main(int argc, char *argv[]) kdDebug() << "All mimeTypes" << endl; KMimeType::List mimeTypes = KMimeType::allMimeTypes(); kdDebug() << "got " << mimeTypes.count() << " mimeTypes" << endl; - QValueListIterator<KMimeType::Ptr> m = mimeTypes.begin(); + TQValueListIterator<KMimeType::Ptr> m = mimeTypes.begin(); for ( ; m != mimeTypes.end() ; ++m ) { kdDebug() << (*m)->name() << endl; @@ -32,7 +32,7 @@ int main(int argc, char *argv[]) kdDebug() << "All service types" << endl; KServiceType::List list = KServiceType::allServiceTypes(); kdDebug() << "got " << list.count() << " service types" << endl; - QValueListIterator<KServiceType::Ptr> st = list.begin(); + TQValueListIterator<KServiceType::Ptr> st = list.begin(); for ( ; st != list.end() ; ++st ) { kdDebug() << (*st)->name() << endl; diff --git a/kio/tests/jobtest.cpp b/kio/tests/jobtest.cpp index 0f6b426a5..9fe4b4c49 100644 --- a/kio/tests/jobtest.cpp +++ b/kio/tests/jobtest.cpp @@ -29,10 +29,10 @@ #include <kcmdlineargs.h> #include <kprotocolinfo.h> -#include <qfileinfo.h> -#include <qeventloop.h> -#include <qdir.h> -#include <qfileinfo.h> +#include <tqfileinfo.h> +#include <tqeventloop.h> +#include <tqdir.h> +#include <tqfileinfo.h> #include <stdio.h> #include <stdlib.h> @@ -46,12 +46,12 @@ // The code comes partly from kdebase/kioslave/trash/testtrash.cpp -static bool check(const QString& txt, QString a, QString b) +static bool check(const TQString& txt, TQString a, TQString b) { if (a.isEmpty()) - a = QString::null; + a = TQString::null; if (b.isEmpty()) - b = QString::null; + b = TQString::null; if (a == b) { kdDebug() << txt << " : checking '" << a << "' against expected value '" << b << "'... " << "ok" << endl; } @@ -76,12 +76,12 @@ int main(int argc, char *argv[]) return 0; // success. The exit(1) in check() is what happens in case of failure. } -QString JobTest::homeTmpDir() const +TQString JobTest::homeTmpDir() const { - return QDir::homeDirPath() + "/.kde/jobtest/"; + return TQDir::homeDirPath() + "/.kde/jobtest/"; } -QString JobTest::otherTmpDir() const +TQString JobTest::otherTmpDir() const { // This one needs to be on another partition return "/tmp/jobtest/"; @@ -92,16 +92,16 @@ KURL JobTest::systemTmpDir() const return "system:/home/.kde/jobtest-system/"; } -QString JobTest::realSystemPath() const +TQString JobTest::realSystemPath() const { - return QDir::homeDirPath() + "/.kde/jobtest-system/"; + return TQDir::homeDirPath() + "/.kde/jobtest-system/"; } void JobTest::setup() { // Start with a clean base dir cleanup(); - QDir dir; // TT: why not a static method? + TQDir dir; // TT: why not a static method? bool ok = dir.mkdir( homeTmpDir() ); if ( !ok ) kdFatal() << "Couldn't create " << homeTmpDir() << endl; @@ -140,7 +140,7 @@ void JobTest::cleanup() KIO::NetAccess::del( systemTmpDir(), 0 ); } -static void setTimeStamp( const QString& path ) +static void setTimeStamp( const TQString& path ) { #ifdef Q_OS_UNIX // Put timestamp in the past so that we can check that the @@ -150,14 +150,14 @@ static void setTimeStamp( const QString& path ) struct utimbuf utbuf; utbuf.actime = tp.tv_sec - 30; // 30 seconds ago utbuf.modtime = tp.tv_sec - 60; // 60 second ago - utime( QFile::encodeName( path ), &utbuf ); + utime( TQFile::encodeName( path ), &utbuf ); qDebug( "Time changed for %s", path.latin1() ); #endif } -static void createTestFile( const QString& path ) +static void createTestFile( const TQString& path ) { - QFile f( path ); + TQFile f( path ); if ( !f.open( IO_WriteOnly ) ) kdFatal() << "Can't create " << path << endl; f.writeBlock( "Hello world", 11 ); @@ -165,20 +165,20 @@ static void createTestFile( const QString& path ) setTimeStamp( path ); } -static void createTestSymlink( const QString& path ) +static void createTestSymlink( const TQString& path ) { // Create symlink if it doesn't exist yet KDE_struct_stat buf; - if ( KDE_lstat( QFile::encodeName( path ), &buf ) != 0 ) { - bool ok = symlink( "/IDontExist", QFile::encodeName( path ) ) == 0; // broken symlink + if ( KDE_lstat( TQFile::encodeName( path ), &buf ) != 0 ) { + bool ok = symlink( "/IDontExist", TQFile::encodeName( path ) ) == 0; // broken symlink if ( !ok ) kdFatal() << "couldn't create symlink: " << strerror( errno ) << endl; } } -static void createTestDirectory( const QString& path ) +static void createTestDirectory( const TQString& path ) { - QDir dir; + TQDir dir; bool ok = dir.mkdir( path ); if ( !ok && !dir.exists() ) kdFatal() << "couldn't create " << path << endl; @@ -190,17 +190,17 @@ static void createTestDirectory( const QString& path ) void JobTest::get() { kdDebug() << k_funcinfo << endl; - const QString filePath = homeTmpDir() + "fileFromHome"; + const TQString filePath = homeTmpDir() + "fileFromHome"; createTestFile( filePath ); KURL u; u.setPath( filePath ); m_result = -1; KIO::StoredTransferJob* job = KIO::storedGet( u ); - connect( job, SIGNAL( result( KIO::Job* ) ), - this, SLOT( slotGetResult( KIO::Job* ) ) ); + connect( job, TQT_SIGNAL( result( KIO::Job* ) ), + this, TQT_SLOT( slotGetResult( KIO::Job* ) ) ); kapp->eventLoop()->enterLoop(); assert( m_result == 0 ); // no error assert( m_data.size() == 11 ); - assert( QCString( m_data ) == "Hello world" ); + assert( TQCString( m_data ) == "Hello world" ); } void JobTest::slotGetResult( KIO::Job* job ) @@ -212,7 +212,7 @@ void JobTest::slotGetResult( KIO::Job* job ) //// -void JobTest::copyLocalFile( const QString& src, const QString& dest ) +void JobTest::copyLocalFile( const TQString& src, const TQString& dest ) { KURL u; u.setPath( src ); @@ -222,45 +222,45 @@ void JobTest::copyLocalFile( const QString& src, const QString& dest ) // copy the file with file_copy bool ok = KIO::NetAccess::file_copy( u, d ); assert( ok ); - assert( QFile::exists( dest ) ); - assert( QFile::exists( src ) ); // still there + assert( TQFile::exists( dest ) ); + assert( TQFile::exists( src ) ); // still there { // check that the timestamp is the same (#24443) // Note: this only works because of copy() in kio_file. // The datapump solution ignores mtime, the app has to call FileCopyJob::setModificationTime() - QFileInfo srcInfo( src ); - QFileInfo destInfo( dest ); + TQFileInfo srcInfo( src ); + TQFileInfo destInfo( dest ); assert( srcInfo.lastModified() == destInfo.lastModified() ); } // cleanup and retry with KIO::copy() - QFile::remove( dest ); + TQFile::remove( dest ); ok = KIO::NetAccess::dircopy( u, d, 0 ); assert( ok ); - assert( QFile::exists( dest ) ); - assert( QFile::exists( src ) ); // still there + assert( TQFile::exists( dest ) ); + assert( TQFile::exists( src ) ); // still there { // check that the timestamp is the same (#24443) - QFileInfo srcInfo( src ); - QFileInfo destInfo( dest ); + TQFileInfo srcInfo( src ); + TQFileInfo destInfo( dest ); assert( srcInfo.lastModified() == destInfo.lastModified() ); } } -void JobTest::copyLocalDirectory( const QString& src, const QString& _dest, int flags ) +void JobTest::copyLocalDirectory( const TQString& src, const TQString& _dest, int flags ) { - assert( QFileInfo( src ).isDir() ); - assert( QFileInfo( src + "/testfile" ).isFile() ); + assert( TQFileInfo( src ).isDir() ); + assert( TQFileInfo( src + "/testfile" ).isFile() ); KURL u; u.setPath( src ); - QString dest( _dest ); + TQString dest( _dest ); KURL d; d.setPath( dest ); if ( flags & AlreadyExists ) - assert( QFile::exists( dest ) ); + assert( TQFile::exists( dest ) ); else - assert( !QFile::exists( dest ) ); + assert( !TQFile::exists( dest ) ); bool ok = KIO::NetAccess::dircopy( u, d, 0 ); assert( ok ); @@ -270,14 +270,14 @@ void JobTest::copyLocalDirectory( const QString& src, const QString& _dest, int //kdDebug() << "Expecting dest=" << dest << endl; } - assert( QFile::exists( dest ) ); - assert( QFileInfo( dest ).isDir() ); - assert( QFileInfo( dest + "/testfile" ).isFile() ); - assert( QFile::exists( src ) ); // still there + assert( TQFile::exists( dest ) ); + assert( TQFileInfo( dest ).isDir() ); + assert( TQFileInfo( dest + "/testfile" ).isFile() ); + assert( TQFile::exists( src ) ); // still there { // check that the timestamp is the same (#24443) - QFileInfo srcInfo( src ); - QFileInfo destInfo( dest ); + TQFileInfo srcInfo( src ); + TQFileInfo destInfo( dest ); assert( srcInfo.lastModified() == destInfo.lastModified() ); } } @@ -285,8 +285,8 @@ void JobTest::copyLocalDirectory( const QString& src, const QString& _dest, int void JobTest::copyFileToSamePartition() { kdDebug() << k_funcinfo << endl; - const QString filePath = homeTmpDir() + "fileFromHome"; - const QString dest = homeTmpDir() + "fileFromHome_copied"; + const TQString filePath = homeTmpDir() + "fileFromHome"; + const TQString dest = homeTmpDir() + "fileFromHome_copied"; createTestFile( filePath ); copyLocalFile( filePath, dest ); } @@ -294,8 +294,8 @@ void JobTest::copyFileToSamePartition() void JobTest::copyDirectoryToSamePartition() { kdDebug() << k_funcinfo << endl; - const QString src = homeTmpDir() + "dirFromHome"; - const QString dest = homeTmpDir() + "dirFromHome_copied"; + const TQString src = homeTmpDir() + "dirFromHome"; + const TQString dest = homeTmpDir() + "dirFromHome_copied"; createTestDirectory( src ); copyLocalDirectory( src, dest ); } @@ -305,8 +305,8 @@ void JobTest::copyDirectoryToExistingDirectory() kdDebug() << k_funcinfo << endl; // just the same as copyDirectoryToSamePartition, but it means that // this time dest exists. - const QString src = homeTmpDir() + "dirFromHome"; - const QString dest = homeTmpDir() + "dirFromHome_copied"; + const TQString src = homeTmpDir() + "dirFromHome"; + const TQString dest = homeTmpDir() + "dirFromHome_copied"; createTestDirectory( src ); copyLocalDirectory( src, dest, AlreadyExists ); } @@ -314,8 +314,8 @@ void JobTest::copyDirectoryToExistingDirectory() void JobTest::copyFileToOtherPartition() { kdDebug() << k_funcinfo << endl; - const QString filePath = homeTmpDir() + "fileFromHome"; - const QString dest = otherTmpDir() + "fileFromHome_copied"; + const TQString filePath = homeTmpDir() + "fileFromHome"; + const TQString dest = otherTmpDir() + "fileFromHome_copied"; createTestFile( filePath ); copyLocalFile( filePath, dest ); } @@ -323,18 +323,18 @@ void JobTest::copyFileToOtherPartition() void JobTest::copyDirectoryToOtherPartition() { kdDebug() << k_funcinfo << endl; - const QString src = homeTmpDir() + "dirFromHome"; - const QString dest = otherTmpDir() + "dirFromHome_copied"; + const TQString src = homeTmpDir() + "dirFromHome"; + const TQString dest = otherTmpDir() + "dirFromHome_copied"; // src is already created by copyDirectoryToSamePartition() // so this is just in case someone calls this method only - if ( !QFile::exists( src ) ) + if ( !TQFile::exists( src ) ) createTestDirectory( src ); copyLocalDirectory( src, dest ); } -void JobTest::moveLocalFile( const QString& src, const QString& dest ) +void JobTest::moveLocalFile( const TQString& src, const TQString& dest ) { - assert( QFile::exists( src ) ); + assert( TQFile::exists( src ) ); KURL u; u.setPath( src ); KURL d; @@ -343,20 +343,20 @@ void JobTest::moveLocalFile( const QString& src, const QString& dest ) // move the file with file_move bool ok = KIO::NetAccess::file_move( u, d ); assert( ok ); - assert( QFile::exists( dest ) ); - assert( !QFile::exists( src ) ); // not there anymore + assert( TQFile::exists( dest ) ); + assert( !TQFile::exists( src ) ); // not there anymore // move it back with KIO::move() ok = KIO::NetAccess::move( d, u, 0 ); assert( ok ); - assert( !QFile::exists( dest ) ); - assert( QFile::exists( src ) ); // it's back + assert( !TQFile::exists( dest ) ); + assert( TQFile::exists( src ) ); // it's back } -static void moveLocalSymlink( const QString& src, const QString& dest ) +static void moveLocalSymlink( const TQString& src, const TQString& dest ) { KDE_struct_stat buf; - assert ( KDE_lstat( QFile::encodeName( src ), &buf ) == 0 ); + assert ( KDE_lstat( TQFile::encodeName( src ), &buf ) == 0 ); KURL u; u.setPath( src ); KURL d; @@ -367,22 +367,22 @@ static void moveLocalSymlink( const QString& src, const QString& dest ) if ( !ok ) kdWarning() << KIO::NetAccess::lastError() << endl; assert( ok ); - assert ( KDE_lstat( QFile::encodeName( dest ), &buf ) == 0 ); - assert( !QFile::exists( src ) ); // not there anymore + assert ( KDE_lstat( TQFile::encodeName( dest ), &buf ) == 0 ); + assert( !TQFile::exists( src ) ); // not there anymore // move it back with KIO::move() ok = KIO::NetAccess::move( d, u, 0 ); assert( ok ); - assert ( KDE_lstat( QFile::encodeName( dest ), &buf ) != 0 ); // doesn't exist anymore - assert ( KDE_lstat( QFile::encodeName( src ), &buf ) == 0 ); // it's back + assert ( KDE_lstat( TQFile::encodeName( dest ), &buf ) != 0 ); // doesn't exist anymore + assert ( KDE_lstat( TQFile::encodeName( src ), &buf ) == 0 ); // it's back } -void JobTest::moveLocalDirectory( const QString& src, const QString& dest ) +void JobTest::moveLocalDirectory( const TQString& src, const TQString& dest ) { - assert( QFile::exists( src ) ); - assert( QFileInfo( src ).isDir() ); - assert( QFileInfo( src + "/testfile" ).isFile() ); - assert( QFileInfo( src + "/testlink" ).isSymLink() ); + assert( TQFile::exists( src ) ); + assert( TQFileInfo( src ).isDir() ); + assert( TQFileInfo( src + "/testfile" ).isFile() ); + assert( TQFileInfo( src + "/testlink" ).isSymLink() ); KURL u; u.setPath( src ); KURL d; @@ -390,19 +390,19 @@ void JobTest::moveLocalDirectory( const QString& src, const QString& dest ) bool ok = KIO::NetAccess::move( u, d, 0 ); assert( ok ); - assert( QFile::exists( dest ) ); - assert( QFileInfo( dest ).isDir() ); - assert( QFileInfo( dest + "/testfile" ).isFile() ); - assert( !QFile::exists( src ) ); // not there anymore + assert( TQFile::exists( dest ) ); + assert( TQFileInfo( dest ).isDir() ); + assert( TQFileInfo( dest + "/testfile" ).isFile() ); + assert( !TQFile::exists( src ) ); // not there anymore - assert( QFileInfo( dest + "/testlink" ).isSymLink() ); + assert( TQFileInfo( dest + "/testlink" ).isSymLink() ); } void JobTest::moveFileToSamePartition() { kdDebug() << k_funcinfo << endl; - const QString filePath = homeTmpDir() + "fileFromHome"; - const QString dest = homeTmpDir() + "fileFromHome_moved"; + const TQString filePath = homeTmpDir() + "fileFromHome"; + const TQString dest = homeTmpDir() + "fileFromHome_moved"; createTestFile( filePath ); moveLocalFile( filePath, dest ); } @@ -410,8 +410,8 @@ void JobTest::moveFileToSamePartition() void JobTest::moveDirectoryToSamePartition() { kdDebug() << k_funcinfo << endl; - const QString src = homeTmpDir() + "dirFromHome"; - const QString dest = homeTmpDir() + "dirFromHome_moved"; + const TQString src = homeTmpDir() + "dirFromHome"; + const TQString dest = homeTmpDir() + "dirFromHome_moved"; createTestDirectory( src ); moveLocalDirectory( src, dest ); } @@ -419,8 +419,8 @@ void JobTest::moveDirectoryToSamePartition() void JobTest::moveFileToOtherPartition() { kdDebug() << k_funcinfo << endl; - const QString filePath = homeTmpDir() + "fileFromHome"; - const QString dest = otherTmpDir() + "fileFromHome_moved"; + const TQString filePath = homeTmpDir() + "fileFromHome"; + const TQString dest = otherTmpDir() + "fileFromHome_moved"; createTestFile( filePath ); moveLocalFile( filePath, dest ); } @@ -428,8 +428,8 @@ void JobTest::moveFileToOtherPartition() void JobTest::moveSymlinkToOtherPartition() { kdDebug() << k_funcinfo << endl; - const QString filePath = homeTmpDir() + "testlink"; - const QString dest = otherTmpDir() + "testlink_moved"; + const TQString filePath = homeTmpDir() + "testlink"; + const TQString dest = otherTmpDir() + "testlink_moved"; createTestSymlink( filePath ); moveLocalSymlink( filePath, dest ); } @@ -437,8 +437,8 @@ void JobTest::moveSymlinkToOtherPartition() void JobTest::moveDirectoryToOtherPartition() { kdDebug() << k_funcinfo << endl; - const QString src = homeTmpDir() + "dirFromHome"; - const QString dest = otherTmpDir() + "dirFromHome_moved"; + const TQString src = homeTmpDir() + "dirFromHome"; + const TQString dest = otherTmpDir() + "dirFromHome_moved"; createTestDirectory( src ); moveLocalDirectory( src, dest ); } @@ -446,10 +446,10 @@ void JobTest::moveDirectoryToOtherPartition() void JobTest::moveFileNoPermissions() { kdDebug() << k_funcinfo << endl; - const QString src = "/etc/passwd"; - const QString dest = homeTmpDir() + "passwd"; - assert( QFile::exists( src ) ); - assert( QFileInfo( src ).isFile() ); + const TQString src = "/etc/passwd"; + const TQString dest = homeTmpDir() + "passwd"; + assert( TQFile::exists( src ) ); + assert( TQFileInfo( src ).isFile() ); KURL u; u.setPath( src ); KURL d; @@ -457,7 +457,7 @@ void JobTest::moveFileNoPermissions() KIO::CopyJob* job = KIO::move( u, d, 0 ); job->setInteractive( false ); // no skip dialog, thanks - QMap<QString, QString> metaData; + TQMap<TQString, TQString> metaData; bool ok = KIO::NetAccess::synchronousRun( job, 0, 0, 0, &metaData ); assert( !ok ); assert( KIO::NetAccess::lastError() == KIO::ERR_ACCESS_DENIED ); @@ -466,17 +466,17 @@ void JobTest::moveFileNoPermissions() // there is no destination file created, but in the second case the // destination file remains. // In fact we assume /home is a separate partition, in this test, so: - assert( QFile::exists( dest ) ); - assert( QFile::exists( src ) ); + assert( TQFile::exists( dest ) ); + assert( TQFile::exists( src ) ); } void JobTest::moveDirectoryNoPermissions() { kdDebug() << k_funcinfo << endl; - const QString src = "/etc/init.d"; - const QString dest = homeTmpDir() + "init.d"; - assert( QFile::exists( src ) ); - assert( QFileInfo( src ).isDir() ); + const TQString src = "/etc/init.d"; + const TQString dest = homeTmpDir() + "init.d"; + assert( TQFile::exists( src ) ); + assert( TQFileInfo( src ).isDir() ); KURL u; u.setPath( src ); KURL d; @@ -484,22 +484,22 @@ void JobTest::moveDirectoryNoPermissions() KIO::CopyJob* job = KIO::move( u, d, 0 ); job->setInteractive( false ); // no skip dialog, thanks - QMap<QString, QString> metaData; + TQMap<TQString, TQString> metaData; bool ok = KIO::NetAccess::synchronousRun( job, 0, 0, 0, &metaData ); assert( !ok ); assert( KIO::NetAccess::lastError() == KIO::ERR_ACCESS_DENIED ); - assert( QFile::exists( dest ) ); // see moveFileNoPermissions - assert( QFile::exists( src ) ); + assert( TQFile::exists( dest ) ); // see moveFileNoPermissions + assert( TQFile::exists( src ) ); } void JobTest::listRecursive() { - const QString src = homeTmpDir(); + const TQString src = homeTmpDir(); KURL u; u.setPath( src ); KIO::ListJob* job = KIO::listRecursive( u ); - connect( job, SIGNAL( entries( KIO::Job*, const KIO::UDSEntryList& ) ), - SLOT( slotEntries( KIO::Job*, const KIO::UDSEntryList& ) ) ); + connect( job, TQT_SIGNAL( entries( KIO::Job*, const KIO::UDSEntryList& ) ), + TQT_SLOT( slotEntries( KIO::Job*, const KIO::UDSEntryList& ) ) ); bool ok = KIO::NetAccess::synchronousRun( job, 0 ); assert( ok ); m_names.sort(); @@ -514,7 +514,7 @@ void JobTest::slotEntries( KIO::Job*, const KIO::UDSEntryList& lst ) { for( KIO::UDSEntryList::ConstIterator it = lst.begin(); it != lst.end(); ++it ) { KIO::UDSEntry::ConstIterator it2 = (*it).begin(); - QString displayName; + TQString displayName; KURL url; for( ; it2 != (*it).end(); it2++ ) { switch ((*it2).m_uds) { @@ -532,7 +532,7 @@ void JobTest::slotEntries( KIO::Job*, const KIO::UDSEntryList& lst ) void JobTest::copyFileToSystem() { - if ( !KProtocolInfo::isKnownProtocol( QString::fromLatin1( "system" ) ) ) { + if ( !KProtocolInfo::isKnownProtocol( TQString::fromLatin1( "system" ) ) ) { kdDebug() << k_funcinfo << "no kio_system, skipping test" << endl; return; } @@ -540,8 +540,8 @@ void JobTest::copyFileToSystem() // First test with support for UDS_LOCAL_PATH copyFileToSystem( true ); - QString dest = realSystemPath() + "fileFromHome_copied"; - QFile::remove( dest ); + TQString dest = realSystemPath() + "fileFromHome_copied"; + TQFile::remove( dest ); // Then disable support for UDS_LOCAL_PATH, i.e. test what would // happen for ftp, smb, http etc. @@ -554,7 +554,7 @@ void JobTest::copyFileToSystem( bool resolve_local_urls ) extern KIO_EXPORT bool kio_resolve_local_urls; kio_resolve_local_urls = resolve_local_urls; - const QString src = homeTmpDir() + "fileFromHome"; + const TQString src = homeTmpDir() + "fileFromHome"; createTestFile( src ); KURL u; u.setPath( src ); @@ -565,15 +565,15 @@ void JobTest::copyFileToSystem( bool resolve_local_urls ) // copy the file with file_copy KIO::FileCopyJob* job = KIO::file_copy( u, d ); - connect( job, SIGNAL(mimetype(KIO::Job*,const QString&)), - this, SLOT(slotMimetype(KIO::Job*,const QString&)) ); + connect( job, TQT_SIGNAL(mimetype(KIO::Job*,const TQString&)), + this, TQT_SLOT(slotMimetype(KIO::Job*,const TQString&)) ); bool ok = KIO::NetAccess::synchronousRun( job, 0 ); assert( ok ); - QString dest = realSystemPath() + "fileFromHome_copied"; + TQString dest = realSystemPath() + "fileFromHome_copied"; - assert( QFile::exists( dest ) ); - assert( QFile::exists( src ) ); // still there + assert( TQFile::exists( dest ) ); + assert( TQFile::exists( src ) ); // still there { // do NOT check that the timestamp is the same. @@ -588,15 +588,15 @@ void JobTest::copyFileToSystem( bool resolve_local_urls ) //assert( m_mimetype == "text/plain" ); // cleanup and retry with KIO::copy() - QFile::remove( dest ); + TQFile::remove( dest ); ok = KIO::NetAccess::dircopy( u, d, 0 ); assert( ok ); - assert( QFile::exists( dest ) ); - assert( QFile::exists( src ) ); // still there + assert( TQFile::exists( dest ) ); + assert( TQFile::exists( src ) ); // still there { // check that the timestamp is the same (#79937) - QFileInfo srcInfo( src ); - QFileInfo destInfo( dest ); + TQFileInfo srcInfo( src ); + TQFileInfo destInfo( dest ); assert( srcInfo.lastModified() == destInfo.lastModified() ); } @@ -604,7 +604,7 @@ void JobTest::copyFileToSystem( bool resolve_local_urls ) kio_resolve_local_urls = true; } -void JobTest::slotMimetype(KIO::Job* job, const QString& type) +void JobTest::slotMimetype(KIO::Job* job, const TQString& type) { assert( job ); m_mimetype = type; diff --git a/kio/tests/jobtest.h b/kio/tests/jobtest.h index 9d3d52894..533ffba8c 100644 --- a/kio/tests/jobtest.h +++ b/kio/tests/jobtest.h @@ -20,8 +20,8 @@ #ifndef JOBTEST_H #define JOBTEST_H -#include <qstring.h> -#include <qobject.h> +#include <tqstring.h> +#include <tqobject.h> #include <kio/job.h> class JobTest : public QObject @@ -56,24 +56,24 @@ public: private slots: void slotEntries( KIO::Job*, const KIO::UDSEntryList& lst ); void slotGetResult( KIO::Job* ); - void slotMimetype(KIO::Job*,const QString&); + void slotMimetype(KIO::Job*,const TQString&); private: - QString homeTmpDir() const; - QString otherTmpDir() const; - QString realSystemPath() const; + TQString homeTmpDir() const; + TQString otherTmpDir() const; + TQString realSystemPath() const; KURL systemTmpDir() const; enum { AlreadyExists = 1 }; - void copyLocalFile( const QString& src, const QString& dest ); - void copyLocalDirectory( const QString& src, const QString& dest, int flags = 0 ); - void moveLocalFile( const QString& src, const QString& dest ); - void moveLocalDirectory( const QString& src, const QString& dest ); + void copyLocalFile( const TQString& src, const TQString& dest ); + void copyLocalDirectory( const TQString& src, const TQString& dest, int flags = 0 ); + void moveLocalFile( const TQString& src, const TQString& dest ); + void moveLocalDirectory( const TQString& src, const TQString& dest ); void copyFileToSystem( bool resolve_local_urls ); int m_result; - QByteArray m_data; - QStringList m_names; - QString m_mimetype; + TQByteArray m_data; + TQStringList m_names; + TQString m_mimetype; }; #endif diff --git a/kio/tests/kacltest.cpp b/kio/tests/kacltest.cpp index 7f75dfde6..58ae319b2 100644 --- a/kio/tests/kacltest.cpp +++ b/kio/tests/kacltest.cpp @@ -26,22 +26,22 @@ #include <kdebug.h> #include <kcmdlineargs.h> -#include <qfileinfo.h> -#include <qeventloop.h> +#include <tqfileinfo.h> +#include <tqeventloop.h> #include <stdio.h> #include <stdlib.h> #include <assert.h> -#include <qdir.h> +#include <tqdir.h> // The code comes partly from kdebase/kioslave/trash/testtrash.cpp -static bool check(const QString& txt, QString a, QString b) +static bool check(const TQString& txt, TQString a, TQString b) { if (a.isEmpty()) - a = QString::null; + a = TQString::null; if (b.isEmpty()) - b = QString::null; + b = TQString::null; if (a == b) { kdDebug() << txt << " : checking '" << a << "' against expected value '" << b << "'... " << "ok" << endl; } @@ -53,7 +53,7 @@ static bool check(const QString& txt, QString a, QString b) } template<typename T> -static bool check(const QString& txt, T a, T b) +static bool check(const TQString& txt, T a, T b) { if (a == b) { kdDebug() << txt << " : checking '" << a << "' against expected value '" << b << "'... " << "ok" << endl; @@ -80,22 +80,22 @@ int main(int argc, char *argv[]) } #ifdef Q_OS_FREEBSD -static const QString s_group1 = QString::fromLatin1("staff"); -static const QString s_group2 = QString::fromLatin1("guest"); +static const TQString s_group1 = TQString::fromLatin1("staff"); +static const TQString s_group2 = TQString::fromLatin1("guest"); #else -static const QString s_group1 = QString::fromLatin1("audio"); -static const QString s_group2 = QString::fromLatin1("users"); +static const TQString s_group1 = TQString::fromLatin1("audio"); +static const TQString s_group2 = TQString::fromLatin1("users"); #endif -static const QString s_testACL = QString::fromLatin1( "user::rw-\nuser:bin:rwx\ngroup::rw-\nmask::rwx\nother::r--\n" ); -static const QString s_testACL2 = QString::fromLatin1( "user::rwx\nuser:bin:rwx\ngroup::rw-\n") + - QString::fromLatin1( "group:" ) + s_group1 + QString::fromLatin1( ":--x\n" ) + - QString::fromLatin1( "group:" ) + s_group2 + QString::fromLatin1( ":r--\n" ) + - QString::fromLatin1( "mask::r-x\nother::r--\n" ); -static const QString s_testACLEffective = QString::fromLatin1( "user::rwx\nuser:bin:rwx #effective:r-x\ngroup::rw- #effective:r--\n" ) + - QString::fromLatin1( "group:" ) + s_group1 + QString::fromLatin1( ":--x\n" ) + - QString::fromLatin1( "group:" ) + s_group2 + QString::fromLatin1( ":r--\n" ) + - QString::fromLatin1( "mask::r-x\nother::r--\n" ); +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" ); KACLTest::KACLTest() :m_acl( s_testACL ) @@ -147,24 +147,24 @@ void KACLTest::testSetACL() void KACLTest::testGetOwnerPermissions() { - check( "Owner permissions: ", QString::number( m_acl.ownerPermissions() ), "6" ); + check( "Owner permissions: ", TQString::number( m_acl.ownerPermissions() ), "6" ); } void KACLTest::testGetOwningGroupPermissions() { - check( "Owning group permissions: ", QString::number( m_acl.owningGroupPermissions() ), "6" ); + check( "Owning group permissions: ", TQString::number( m_acl.owningGroupPermissions() ), "6" ); } void KACLTest::testGetOthersPermissions() { - check( "Others permissions: ", QString::number( m_acl.othersPermissions() ), "4" ); + check( "Others permissions: ", TQString::number( m_acl.othersPermissions() ), "4" ); } void KACLTest::testGetMaskPermissions() { bool exists = false; unsigned short mask = m_acl.maskPermissions( exists ); - check( "Mask permissions: ", QString::number( mask ), "7" ); + check( "Mask permissions: ", TQString::number( mask ), "7" ); check( "Mask permissions: ", exists, true ); } @@ -172,7 +172,7 @@ void KACLTest::testGetAllUserPermissions() { ACLUserPermissionsList list = m_acl.allUserPermissions(); ACLUserPermissionsConstIterator it = list.begin(); - QString name; + TQString name; unsigned short permissions; int count = 0; while ( it != list.end() ) { @@ -181,16 +181,16 @@ void KACLTest::testGetAllUserPermissions() ++it; ++count; } - check( "All users count: ", QString::number( count ), "1" ); + check( "All users count: ", TQString::number( count ), "1" ); check( "All users name: ", name, "bin" ); - check( "All users permissions: ", QString::number( permissions ), "7" ); + check( "All users permissions: ", TQString::number( permissions ), "7" ); } void KACLTest::testGetAllGroupsPermissions() { ACLGroupPermissionsList list = m_acl.allGroupPermissions(); ACLGroupPermissionsConstIterator it = list.begin(); - QString name; + TQString name; unsigned short permissions; int count = 0; while ( it != list.end() ) { @@ -199,15 +199,15 @@ void KACLTest::testGetAllGroupsPermissions() // setACL sorts them alphabetically ... if ( count == 0 ) { check( "All groups name: ", name, s_group1 ); - check( "All groups permissions: ", QString::number( permissions ), "1" ); + check( "All groups permissions: ", TQString::number( permissions ), "1" ); } else if ( count == 1 ) { check( "All groups name: ", name, s_group2 ); - check( "All groups permissions: ", QString::number( permissions ), "4" ); + check( "All groups permissions: ", TQString::number( permissions ), "4" ); } ++it; ++count; } - check( "All users count: ", QString::number( count ), "2" ); + check( "All users count: ", TQString::number( count ), "2" ); } void KACLTest::testIsExtended() @@ -235,9 +235,9 @@ void KACLTest::testSettingBasic() CharlesII.setOwnerPermissions( 7 ); // clearly CharlesII.setOwningGroupPermissions( 0 ); CharlesII.setOthersPermissions( 0 ); - check( "setOwnerPermissions: ", QString::number( CharlesII.ownerPermissions() ),"7" ); - check( "setOwningGroupPermissions: ", QString::number( CharlesII.owningGroupPermissions() ),"0" ); - check( "setOthersPermissions: ", QString::number( CharlesII.othersPermissions() ),"0" ); + check( "setOwnerPermissions: ", TQString::number( CharlesII.ownerPermissions() ),"7" ); + check( "setOwningGroupPermissions: ", TQString::number( CharlesII.owningGroupPermissions() ),"0" ); + check( "setOthersPermissions: ", TQString::number( CharlesII.othersPermissions() ),"0" ); } void KACLTest::testSettingExtended() @@ -245,28 +245,28 @@ void KACLTest::testSettingExtended() KACL CharlesII( s_testACL ); CharlesII.setMaskPermissions( 7 ); // clearly bool dummy = false; - check( "setMaskPermissions: ", QString::number( CharlesII.maskPermissions( dummy ) ),"7" ); + check( "setMaskPermissions: ", TQString::number( CharlesII.maskPermissions( dummy ) ),"7" ); - const QString expected( "user::rw-\nuser:root:rwx\nuser:bin:r--\ngroup::rw-\nmask::rwx\nother::r--\n" ); + const TQString expected( "user::rw-\nuser:root:rwx\nuser:bin:r--\ngroup::rw-\nmask::rwx\nother::r--\n" ); ACLUserPermissionsList users; - ACLUserPermissions user = qMakePair( QString( "root" ), ( unsigned short )7 ); + ACLUserPermissions user = qMakePair( TQString( "root" ), ( unsigned short )7 ); users.append( user ); - user = qMakePair( QString( "bin" ), ( unsigned short )4 ); + user = qMakePair( TQString( "bin" ), ( unsigned short )4 ); users.append( user ); CharlesII.setAllUserPermissions( users ); check( "setAllUserPermissions: ", CharlesII.asString(), expected ); CharlesII.setACL( s_testACL ); // reset // it already has an entry for bin, let's change it - CharlesII.setNamedUserPermissions( QString("bin"), 4 ); - CharlesII.setNamedUserPermissions( QString( "root" ), 7 ); + CharlesII.setNamedUserPermissions( TQString("bin"), 4 ); + CharlesII.setNamedUserPermissions( TQString( "root" ), 7 ); check( "setNamedUserPermissions: ", CharlesII.asString(), expected ); // groups, all and named - const QString expected2 = QString::fromLatin1( "user::rw-\nuser:bin:rwx\ngroup::rw-\ngroup:" ) + s_group1 + - QString::fromLatin1( ":-wx\ngroup:" ) + s_group2 + QString::fromLatin1(":r--\nmask::rwx\nother::r--\n" ); + 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" ); CharlesII.setACL( s_testACL ); // reset ACLGroupPermissionsList groups; ACLGroupPermissions group = qMakePair( s_group1, ( unsigned short )3 ); @@ -304,6 +304,6 @@ void KACLTest::testNewMask() check( "mask exists: ", dummy, false ); CharlesII.setMaskPermissions( 6 ); - check( "new mask set: ", QString::number( CharlesII.maskPermissions( dummy ) ), "6" ); + check( "new mask set: ", TQString::number( CharlesII.maskPermissions( dummy ) ), "6" ); check( "mask exists now: ", dummy, true ); } diff --git a/kio/tests/kacltest.h b/kio/tests/kacltest.h index 906a5a84f..1a85e4109 100644 --- a/kio/tests/kacltest.h +++ b/kio/tests/kacltest.h @@ -20,7 +20,7 @@ #ifndef KACLTEST_H #define KACLTEST_H -#include <qobject.h> +#include <tqobject.h> #include <kacl.h> class KACLTest diff --git a/kio/tests/kdcopcheck.cpp b/kio/tests/kdcopcheck.cpp index 09cbf1310..b61dfd03d 100644 --- a/kio/tests/kdcopcheck.cpp +++ b/kio/tests/kdcopcheck.cpp @@ -8,7 +8,7 @@ #include <kimageio.h> #include <kprotocolinfo.h> #include <kprocess.h> -#include <qtimer.h> +#include <tqtimer.h> #include "kdcopcheck.h" #include <dcopclient.h> @@ -18,7 +18,7 @@ #include <stdio.h> #include <stdlib.h> -void debug(QString txt) +void debug(TQString txt) { fprintf(stderr, "%s\n", txt.ascii()); } @@ -33,27 +33,27 @@ void debug(const char *format, const char *txt) fprintf(stderr, "\n"); } -TestService::TestService(const QString &exec) +TestService::TestService(const TQString &exec) { m_exec = exec; proc << exec; proc.start(); - connect(kapp->dcopClient(), SIGNAL( applicationRegistered(const QCString&)), - this, SLOT(newApp(const QCString&))); - connect(kapp->dcopClient(), SIGNAL( applicationRemoved(const QCString&)), - this, SLOT(endApp(const QCString&))); - connect(&proc, SIGNAL(processExited(KProcess *)), - this, SLOT(appExit())); + connect(kapp->dcopClient(), TQT_SIGNAL( applicationRegistered(const TQCString&)), + this, TQT_SLOT(newApp(const TQCString&))); + connect(kapp->dcopClient(), TQT_SIGNAL( applicationRemoved(const TQCString&)), + this, TQT_SLOT(endApp(const TQCString&))); + connect(&proc, TQT_SIGNAL(processExited(KProcess *)), + this, TQT_SLOT(appExit())); - QTimer::singleShot(20*1000, this, SLOT(stop())); + TQTimer::singleShot(20*1000, this, TQT_SLOT(stop())); result = KService::DCOP_None; } -void TestService::newApp(const QCString &appId) +void TestService::newApp(const TQCString &appId) { - QString id = appId; + TQString id = appId; if (id == m_exec) { result = KService::DCOP_Unique; @@ -67,7 +67,7 @@ void TestService::newApp(const QCString &appId) qWarning("Register %s", appId.data()); } -void TestService::endApp(const QCString &appId) +void TestService::endApp(const TQCString &appId) { qWarning("Unegister %s", appId.data()); } @@ -113,7 +113,7 @@ int main(int argc, char *argv[]) int n = test->exec(); delete test; - QString result; + TQString result; if (n == KService::DCOP_None) result = "None"; else if (n == KService::DCOP_Unique) diff --git a/kio/tests/kdcopcheck.h b/kio/tests/kdcopcheck.h index 5410bbec2..c3572d929 100644 --- a/kio/tests/kdcopcheck.h +++ b/kio/tests/kdcopcheck.h @@ -2,26 +2,26 @@ #define _BLA_H_ #include <kprocess.h> -#include <qstring.h> -#include <qobject.h> +#include <tqstring.h> +#include <tqobject.h> class TestService : public QObject { Q_OBJECT public: - TestService(const QString &exec); + TestService(const TQString &exec); int exec(); public slots: - void newApp(const QCString &appId); - void endApp(const QCString &appId); + void newApp(const TQCString &appId); + void endApp(const TQCString &appId); void appExit(); void stop(); protected: int result; - QString m_exec; + TQString m_exec; KProcess proc; }; diff --git a/kio/tests/kdefaultprogresstest.cpp b/kio/tests/kdefaultprogresstest.cpp index 16d00d81d..a831041e1 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, QString::fromLatin1( "Starting..." ) ); + dlg->slotInfoMessage( 0L, TQString::fromLatin1( "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, QString::fromLatin1( "Done." ) ); + dlg->slotInfoMessage( 0L, TQString::fromLatin1( "Done." ) ); delete dlg; return 0; diff --git a/kio/tests/kdirlistertest.cpp b/kio/tests/kdirlistertest.cpp index d3ea5b888..6137f5e71 100644 --- a/kio/tests/kdirlistertest.cpp +++ b/kio/tests/kdirlistertest.cpp @@ -18,8 +18,8 @@ Boston, MA 02110-1301, USA. */ -#include <qlayout.h> -#include <qpushbutton.h> +#include <tqlayout.h> +#include <tqpushbutton.h> #include <kapplication.h> #include <kdirlister.h> @@ -30,18 +30,18 @@ #include <cstdlib> -KDirListerTest::KDirListerTest( QWidget *parent, const char *name ) - : QWidget( parent, name ) +KDirListerTest::KDirListerTest( TQWidget *parent, const char *name ) + : TQWidget( parent, name ) { lister = new KDirLister( false /* true */ ); debug = new PrintSignals; - QVBoxLayout* layout = new QVBoxLayout( this ); + TQVBoxLayout* layout = new TQVBoxLayout( this ); - QPushButton* startH = new QPushButton( "Start listing $HOME", this ); - QPushButton* startR= new QPushButton( "Start listing /", this ); - QPushButton* test = new QPushButton( "Many", this ); - QPushButton* startT = new QPushButton( "tarfile", this ); + TQPushButton* startH = new TQPushButton( "Start listing $HOME", this ); + TQPushButton* startR= new TQPushButton( "Start listing /", this ); + TQPushButton* test = new TQPushButton( "Many", this ); + TQPushButton* startT = new TQPushButton( "tarfile", this ); layout->addWidget( startH ); layout->addWidget( startR ); @@ -49,48 +49,48 @@ KDirListerTest::KDirListerTest( QWidget *parent, const char *name ) layout->addWidget( test ); resize( layout->sizeHint() ); - connect( startR, SIGNAL( clicked() ), SLOT( startRoot() ) ); - connect( startH, SIGNAL( clicked() ), SLOT( startHome() ) ); - connect( startT, SIGNAL( clicked() ), SLOT( startTar() ) ); - connect( test, SIGNAL( clicked() ), SLOT( test() ) ); - - connect( lister, SIGNAL( started( const KURL & ) ), - debug, SLOT( started( const KURL & ) ) ); - connect( lister, SIGNAL( completed() ), - debug, SLOT( completed() ) ); - connect( lister, SIGNAL( completed( const KURL & ) ), - debug, SLOT( completed( const KURL & ) ) ); - connect( lister, SIGNAL( canceled() ), - debug, SLOT( canceled() ) ); - connect( lister, SIGNAL( canceled( const KURL & ) ), - debug, SLOT( canceled( const KURL & ) ) ); - connect( lister, SIGNAL( redirection( const KURL & ) ), - debug, SLOT( redirection( const KURL & ) ) ); - connect( lister, SIGNAL( redirection( const KURL &, const KURL & ) ), - debug, SLOT( redirection( const KURL &, const KURL & ) ) ); - connect( lister, SIGNAL( clear() ), - debug, SLOT( clear() ) ); - connect( lister, SIGNAL( newItems( const KFileItemList & ) ), - debug, SLOT( newItems( const KFileItemList & ) ) ); - connect( lister, SIGNAL( itemsFilteredByMime( const KFileItemList & ) ), - debug, SLOT( itemsFilteredByMime( const KFileItemList & ) ) ); - connect( lister, SIGNAL( deleteItem( KFileItem * ) ), - debug, SLOT( deleteItem( KFileItem * ) ) ); - connect( lister, SIGNAL( refreshItems( const KFileItemList & ) ), - debug, SLOT( refreshItems( const KFileItemList & ) ) ); - connect( lister, SIGNAL( infoMessage( const QString& ) ), - debug, SLOT( infoMessage( const QString& ) ) ); - connect( lister, SIGNAL( percent( int ) ), - debug, SLOT( percent( int ) ) ); - connect( lister, SIGNAL( totalSize( KIO::filesize_t ) ), - debug, SLOT( totalSize( KIO::filesize_t ) ) ); - connect( lister, SIGNAL( processedSize( KIO::filesize_t ) ), - debug, SLOT( processedSize( KIO::filesize_t ) ) ); - connect( lister, SIGNAL( speed( int ) ), - debug, SLOT( speed( int ) ) ); - - connect( lister, SIGNAL( completed() ), - this, SLOT( completed() ) ); + connect( startR, TQT_SIGNAL( clicked() ), TQT_SLOT( startRoot() ) ); + connect( startH, TQT_SIGNAL( clicked() ), TQT_SLOT( startHome() ) ); + connect( startT, TQT_SIGNAL( clicked() ), TQT_SLOT( startTar() ) ); + connect( test, TQT_SIGNAL( clicked() ), TQT_SLOT( test() ) ); + + connect( lister, TQT_SIGNAL( started( const KURL & ) ), + debug, TQT_SLOT( started( const KURL & ) ) ); + connect( lister, TQT_SIGNAL( completed() ), + debug, TQT_SLOT( completed() ) ); + connect( lister, TQT_SIGNAL( completed( const KURL & ) ), + debug, TQT_SLOT( completed( const KURL & ) ) ); + connect( lister, TQT_SIGNAL( canceled() ), + debug, TQT_SLOT( canceled() ) ); + connect( lister, TQT_SIGNAL( canceled( const KURL & ) ), + debug, TQT_SLOT( canceled( const KURL & ) ) ); + connect( lister, TQT_SIGNAL( redirection( const KURL & ) ), + debug, TQT_SLOT( redirection( const KURL & ) ) ); + connect( lister, TQT_SIGNAL( redirection( const KURL &, const KURL & ) ), + debug, TQT_SLOT( redirection( const KURL &, const KURL & ) ) ); + connect( lister, TQT_SIGNAL( clear() ), + debug, TQT_SLOT( clear() ) ); + connect( lister, TQT_SIGNAL( newItems( const KFileItemList & ) ), + debug, TQT_SLOT( newItems( const KFileItemList & ) ) ); + connect( lister, TQT_SIGNAL( itemsFilteredByMime( const KFileItemList & ) ), + debug, TQT_SLOT( itemsFilteredByMime( const KFileItemList & ) ) ); + connect( lister, TQT_SIGNAL( deleteItem( KFileItem * ) ), + debug, TQT_SLOT( deleteItem( KFileItem * ) ) ); + connect( lister, TQT_SIGNAL( refreshItems( const KFileItemList & ) ), + debug, TQT_SLOT( refreshItems( const KFileItemList & ) ) ); + connect( lister, TQT_SIGNAL( infoMessage( const TQString& ) ), + debug, TQT_SLOT( infoMessage( const TQString& ) ) ); + connect( lister, TQT_SIGNAL( percent( int ) ), + debug, TQT_SLOT( percent( int ) ) ); + connect( lister, TQT_SIGNAL( totalSize( KIO::filesize_t ) ), + debug, TQT_SLOT( totalSize( KIO::filesize_t ) ) ); + connect( lister, TQT_SIGNAL( processedSize( KIO::filesize_t ) ), + debug, TQT_SLOT( processedSize( KIO::filesize_t ) ) ); + connect( lister, TQT_SIGNAL( speed( int ) ), + debug, TQT_SLOT( speed( int ) ) ); + + connect( lister, TQT_SIGNAL( completed() ), + this, TQT_SLOT( completed() ) ); } KDirListerTest::~KDirListerTest() diff --git a/kio/tests/kdirlistertest.h b/kio/tests/kdirlistertest.h index 5c0e751a4..6b1e831f5 100644 --- a/kio/tests/kdirlistertest.h +++ b/kio/tests/kdirlistertest.h @@ -21,8 +21,8 @@ #ifndef _KDIRLISTERTEST_H_ #define _KDIRLISTERTEST_H_ -#include <qwidget.h> -#include <qstring.h> +#include <tqwidget.h> +#include <tqstring.h> #include <kurl.h> #include <kfileitem.h> @@ -35,7 +35,7 @@ class PrintSignals : public QObject { Q_OBJECT public: - PrintSignals() : QObject() { } + PrintSignals() : TQObject() { } public slots: void started( const KURL &url ) @@ -82,7 +82,7 @@ public slots: cout << "*** refreshItems: " << endl; // TODO } - void infoMessage( const QString& msg ) + void infoMessage( const TQString& msg ) { cout << "*** infoMessage: " << msg.local8Bit() << endl; } void percent( int percent ) @@ -102,7 +102,7 @@ class KDirListerTest : public QWidget { Q_OBJECT public: - KDirListerTest( QWidget *parent=0, const char *name=0 ); + KDirListerTest( TQWidget *parent=0, const char *name=0 ); ~KDirListerTest(); public slots: diff --git a/kio/tests/kdirwatchtest.cpp b/kio/tests/kdirwatchtest.cpp index 41924078e..48bc59a14 100644 --- a/kio/tests/kdirwatchtest.cpp +++ b/kio/tests/kdirwatchtest.cpp @@ -9,7 +9,7 @@ LGPL version 2. */ -#include <qfile.h> +#include <tqfile.h> #include <kdebug.h> #include <kcmdlineargs.h> @@ -38,26 +38,26 @@ int main (int argc, char **argv) KDirWatch *dirwatch1 = KDirWatch::self(); KDirWatch *dirwatch2 = new KDirWatch; - testObject.connect(dirwatch1, SIGNAL( dirty( const QString &)), SLOT( dirty( const QString &)) ); - testObject.connect(dirwatch1, SIGNAL( created( const QString &)), SLOT( created( const QString &)) ); - testObject.connect(dirwatch1, SIGNAL( deleted( const QString &)), SLOT( deleted( const QString &)) ); + testObject.connect(dirwatch1, TQT_SIGNAL( dirty( const TQString &)), TQT_SLOT( dirty( const TQString &)) ); + testObject.connect(dirwatch1, TQT_SIGNAL( created( const TQString &)), TQT_SLOT( created( const TQString &)) ); + testObject.connect(dirwatch1, TQT_SIGNAL( deleted( const TQString &)), TQT_SLOT( deleted( const TQString &)) ); if (args->count() >0) { for(int i = 0; i < args->count(); i++) { kdDebug() << "Watching: " << args->arg(i) << endl; - dirwatch2->addDir( QFile::decodeName( args->arg(i))); + dirwatch2->addDir( TQFile::decodeName( args->arg(i))); } } - QString home = QString(getenv ("HOME")) + "/"; - QString desk = home + "Desktop/"; + TQString home = TQString(getenv ("HOME")) + "/"; + TQString desk = home + "Desktop/"; kdDebug() << "Watching: " << home << endl; dirwatch1->addDir(home); kdDebug() << "Watching file: " << home << "foo " << endl; dirwatch1->addFile(home+"foo"); kdDebug() << "Watching: " << desk << endl; dirwatch1->addDir(desk); - QString test = home + "test/"; + TQString test = home + "test/"; kdDebug() << "Watching: (but skipped) " << test << endl; dirwatch1->addDir(test); diff --git a/kio/tests/kdirwatchtest.h b/kio/tests/kdirwatchtest.h index 9330f941c..24dc94a91 100644 --- a/kio/tests/kdirwatchtest.h +++ b/kio/tests/kdirwatchtest.h @@ -14,20 +14,20 @@ #include <stdlib.h> #include <stdio.h> -#include <qobject.h> +#include <tqobject.h> #include "kdirwatch.h" #include "kapplication.h" -class myTest : public QObject +class myTest : public TQObject { Q_OBJECT public: myTest() { }; public slots: - void dirty(const QString &a) { printf("Dirty: %s\n", a.ascii()); }; - void created(const QString& f) { printf("Created: %s\n", f.ascii()); } - void deleted(const QString& f) { printf("Deleted: %s\n", f.ascii()); } + void dirty(const TQString &a) { printf("Dirty: %s\n", a.ascii()); }; + void created(const TQString& f) { printf("Created: %s\n", f.ascii()); } + void deleted(const TQString& f) { printf("Deleted: %s\n", f.ascii()); } }; #endif diff --git a/kio/tests/kdirwatchunittest.cpp b/kio/tests/kdirwatchunittest.cpp index d523909ec..1bd17edd6 100644 --- a/kio/tests/kdirwatchunittest.cpp +++ b/kio/tests/kdirwatchunittest.cpp @@ -11,8 +11,8 @@ #include <unistd.h> -#include <qfile.h> -#include <qdir.h> +#include <tqfile.h> +#include <tqdir.h> #include <kdebug.h> @@ -39,7 +39,7 @@ void KDirWatchTest::VERIFY_NOTHING() VERIFY (nothing_failed); } -void KDirWatchTest::VERIFY_DIRTY(const QString& alert) +void KDirWatchTest::VERIFY_DIRTY(const TQString& alert) { unsigned m_s[3]; for(int i = 0; i < 3; ++i) @@ -56,7 +56,7 @@ void KDirWatchTest::VERIFY_DIRTY(const QString& alert) m_lastSignal == alert); } -void KDirWatchTest::VERIFY_CREATED(const QString& alert) +void KDirWatchTest::VERIFY_CREATED(const TQString& alert) { unsigned m_s[3]; for(int i = 0; i < 3; ++i) @@ -73,7 +73,7 @@ void KDirWatchTest::VERIFY_CREATED(const QString& alert) m_lastSignal == alert); } -void KDirWatchTest::VERIFY_DELETED(const QString& alert) +void KDirWatchTest::VERIFY_DELETED(const TQString& alert) { unsigned m_s[3]; for(int i = 0; i < 3; ++i) @@ -90,26 +90,26 @@ void KDirWatchTest::VERIFY_DELETED(const QString& alert) m_lastSignal == alert); } -void KDirWatchTest::remove_file (const QString& file) +void KDirWatchTest::remove_file (const TQString& file) { - ::unlink (QFile::encodeName(file)); + ::unlink (TQFile::encodeName(file)); } -void KDirWatchTest::touch_file (const QString& file) +void KDirWatchTest::touch_file (const TQString& file) { - QFile f(file); + TQFile f(file); f.open(IO_WriteOnly); } -void KDirWatchTest::rename_file(const QString& from, const QString& to) +void KDirWatchTest::rename_file(const TQString& from, const TQString& to) { - ::rename(QFile::encodeName(from), QFile::encodeName(to)); + ::rename(TQFile::encodeName(from), TQFile::encodeName(to)); } KUNITTEST_MODULE ( kunittest_kdirwatch, "KDirWatchTest" ) KUNITTEST_MODULE_REGISTER_TESTER (KDirWatchTest) -#define SLEEP() QApplication::processEvents(); +#define SLEEP() TQApplication::processEvents(); void KDirWatchTest::allTests() { @@ -117,12 +117,12 @@ void KDirWatchTest::allTests() d = new KDirWatch; VERIFY (d != 0); - QDir* dir = new QDir(m_workingDir); + TQDir* dir = new TQDir(m_workingDir); VERIFY (dir != 0); - connect(d, SIGNAL (dirty( const QString &)), SLOT( slotDirty( const QString &)) ); - connect(d, SIGNAL (created( const QString &)), SLOT( slotCreated( const QString &)) ); - connect(d, SIGNAL (deleted( const QString &)), SLOT( slotDeleted( const QString &)) ); + connect(d, TQT_SIGNAL (dirty( const TQString &)), TQT_SLOT( slotDirty( const TQString &)) ); + connect(d, TQT_SIGNAL (created( const TQString &)), TQT_SLOT( slotCreated( const TQString &)) ); + connect(d, TQT_SIGNAL (deleted( const TQString &)), TQT_SLOT( slotDeleted( const TQString &)) ); VERIFY (dir->mkdir (m_workingDir)); diff --git a/kio/tests/kdirwatchunittest.h b/kio/tests/kdirwatchunittest.h index 417cdf24e..053ab2882 100644 --- a/kio/tests/kdirwatchunittest.h +++ b/kio/tests/kdirwatchunittest.h @@ -14,7 +14,7 @@ #include <stdlib.h> #include <stdio.h> -#include <qobject.h> +#include <tqobject.h> #include "kdirwatch.h" #include "kapplication.h" @@ -38,9 +38,9 @@ public: virtual void allTests(); private slots: - void slotDirty (const QString& s) { m_signals[sigDirty]++; m_lastSignal = s; } - void slotCreated (const QString& s) { m_signals[sigCreated]++; m_lastSignal = s; } - void slotDeleted (const QString& s) { m_signals[sigDeleted]++; m_lastSignal = s; } + void slotDirty (const TQString& s) { m_signals[sigDirty]++; m_lastSignal = s; } + void slotCreated (const TQString& s) { m_signals[sigCreated]++; m_lastSignal = s; } + void slotDeleted (const TQString& s) { m_signals[sigDeleted]++; m_lastSignal = s; } private: unsigned m_signals[3]; @@ -48,18 +48,18 @@ private: /* verify nothing happens */ void VERIFY_NOTHING(); /* verify that dirty got emitted */ - void VERIFY_DIRTY (const QString&); + void VERIFY_DIRTY (const TQString&); /* verify that created got emitted */ - void VERIFY_CREATED (const QString&); + void VERIFY_CREATED (const TQString&); /* verify that deleted got emitted */ - void VERIFY_DELETED (const QString&); + void VERIFY_DELETED (const TQString&); - void touch_file (const QString& file); - void remove_file (const QString& file); - void rename_file (const QString& from, const QString& to); + void touch_file (const TQString& file); + void remove_file (const TQString& file); + void rename_file (const TQString& from, const TQString& to); - QString m_lastSignal; - QString m_workingDir; + TQString m_lastSignal; + TQString m_workingDir; KDirWatch* d; }; diff --git a/kio/tests/kfiltertest.cpp b/kio/tests/kfiltertest.cpp index a0dd8fe49..901dec14e 100644 --- a/kio/tests/kfiltertest.cpp +++ b/kio/tests/kfiltertest.cpp @@ -20,25 +20,25 @@ #include "kfilterbase.h" #include <unistd.h> #include <limits.h> -#include <qfile.h> -#include <qtextstream.h> +#include <tqfile.h> +#include <tqtextstream.h> #include <kdebug.h> #include <kinstance.h> -void test_block( const QString & fileName ) +void test_block( const TQString & fileName ) { - QIODevice * dev = KFilterDev::deviceForFile( fileName ); + TQIODevice * dev = KFilterDev::deviceForFile( fileName ); if (!dev) { kdWarning() << "dev=0" << endl; return; } if ( !dev->open( IO_ReadOnly ) ) { kdWarning() << "open failed " << endl; return; } - // This is what KGzipDev::readAll could do, if QIODevice::readAll was virtual.... + // This is what KGzipDev::readAll could do, if TQIODevice::readAll was virtual.... - QByteArray array(1024); + TQByteArray array(1024); int n; while ( ( n = dev->readBlock( array.data(), array.size() ) ) ) { kdDebug() << "readBlock returned " << n << endl << endl; - // QCString s(array,n+1); // Terminate with 0 before printing + // TQCString s(array,n+1); // Terminate with 0 before printing // printf("%s", s.data()); kdDebug() << "dev.at = " << dev->at() << endl; @@ -48,13 +48,13 @@ void test_block( const QString & fileName ) delete dev; } -void test_block_write( const QString & fileName ) +void test_block_write( const TQString & fileName ) { - QIODevice * dev = KFilterDev::deviceForFile( fileName ); + TQIODevice * dev = KFilterDev::deviceForFile( fileName ); if (!dev) { kdWarning() << "dev=0" << endl; return; } if ( !dev->open( IO_WriteOnly ) ) { kdWarning() << "open failed " << endl; return; } - QCString s("hello\n"); + TQCString s("hello\n"); int ret = dev->writeBlock( s, s.size()-1 ); kdDebug() << "writeBlock ret=" << ret << endl; //ret = dev->writeBlock( s, s.size()-1 ); @@ -63,9 +63,9 @@ void test_block_write( const QString & fileName ) delete dev; } -void test_getch( const QString & fileName ) +void test_getch( const TQString & fileName ) { - QIODevice * dev = KFilterDev::deviceForFile( fileName ); + TQIODevice * dev = KFilterDev::deviceForFile( fileName ); if (!dev) { kdWarning() << "dev=0" << endl; return; } if ( !dev->open( IO_ReadOnly ) ) { kdWarning() << "open failed " << endl; return; } int ch; @@ -75,12 +75,12 @@ void test_getch( const QString & fileName ) delete dev; } -void test_textstream( const QString & fileName ) +void test_textstream( const TQString & fileName ) { - QIODevice * dev = KFilterDev::deviceForFile( fileName ); + TQIODevice * dev = KFilterDev::deviceForFile( fileName ); if (!dev) { kdWarning() << "dev=0" << endl; return; } if ( !dev->open( IO_ReadOnly ) ) { kdWarning() << "open failed " << endl; return; } - QTextStream ts( dev ); + TQTextStream ts( dev ); printf("%s\n", ts.read().latin1()); dev->close(); delete dev; @@ -92,8 +92,8 @@ int main() char currentdir[PATH_MAX+1]; getcwd( currentdir, PATH_MAX ); - QString pathgz = QFile::decodeName(currentdir) + "/test.gz"; - QString pathbz2 = QFile::decodeName(currentdir) + "/test.bz2"; + TQString pathgz = TQFile::decodeName(currentdir) + "/test.gz"; + TQString pathbz2 = TQFile::decodeName(currentdir) + "/test.bz2"; kdDebug() << " -- test_block_write gzip -- " << endl; test_block_write(pathgz); diff --git a/kio/tests/kionetrctest.cpp b/kio/tests/kionetrctest.cpp index 977603426..852a06453 100644 --- a/kio/tests/kionetrctest.cpp +++ b/kio/tests/kionetrctest.cpp @@ -26,7 +26,7 @@ void output( const KURL& u ) << "Login: " << l.login << endl << "Password: " << l.password << endl; - QMap<QString,QStringList>::ConstIterator it = l.macdef.begin(); + TQMap<TQString,TQStringList>::ConstIterator it = l.macdef.begin(); for ( ; it != l.macdef.end(); ++it ) { kdDebug() << "Macro: " << it.key() << "= " diff --git a/kio/tests/kiopassdlgtest.cpp b/kio/tests/kiopassdlgtest.cpp index fc017476d..2e8894108 100644 --- a/kio/tests/kiopassdlgtest.cpp +++ b/kio/tests/kiopassdlgtest.cpp @@ -12,15 +12,15 @@ int main ( int argc, char** argv ) KCmdLineArgs::init(argc, argv, &aboutData); KApplication app; - QString usr, pass, comment, label; + TQString usr, pass, comment, label; label = "Site:"; comment = "<b>localhost</b>"; int res = KIO::PasswordDialog::getNameAndPassword( usr, pass, 0L, - QString::null, false, - QString::null, comment, + TQString::null, false, + TQString::null, comment, label ); - if ( res == QDialog::Accepted ) - KMessageBox::information( 0L, QString("You entered:\n" + if ( res == TQDialog::Accepted ) + KMessageBox::information( 0L, TQString("You entered:\n" " Username: %1\n" " Password: %2").arg(usr).arg(pass), "Test Result"); diff --git a/kio/tests/kioslavetest.cpp b/kio/tests/kioslavetest.cpp index 8594586df..0db23457d 100644 --- a/kio/tests/kioslavetest.cpp +++ b/kio/tests/kioslavetest.cpp @@ -9,9 +9,9 @@ LGPL version 2. */ -#include <qlayout.h> -#include <qmessagebox.h> -#include <qdir.h> +#include <tqlayout.h> +#include <tqmessagebox.h> +#include <tqdir.h> #include <kacl.h> #include <kapplication.h> @@ -28,16 +28,16 @@ using namespace KIO; -KioslaveTest::KioslaveTest( QString src, QString dest, uint op, uint pr ) +KioslaveTest::KioslaveTest( TQString src, TQString dest, uint op, uint pr ) : KMainWindow(0, "") { job = 0L; - main_widget = new QWidget( this, ""); - QBoxLayout *topLayout = new QVBoxLayout( main_widget, 10, 5 ); + main_widget = new TQWidget( this, ""); + TQBoxLayout *topLayout = new TQVBoxLayout( main_widget, 10, 5 ); - QGridLayout *grid = new QGridLayout( 2, 2, 10 ); + TQGridLayout *grid = new TQGridLayout( 2, 2, 10 ); topLayout->addLayout( grid ); grid->setRowStretch(0,1); @@ -46,68 +46,68 @@ KioslaveTest::KioslaveTest( QString src, QString dest, uint op, uint pr ) grid->setColStretch(0,1); grid->setColStretch(1,100); - lb_from = new QLabel( "From:", main_widget ); + lb_from = new TQLabel( "From:", main_widget ); grid->addWidget( lb_from, 0, 0 ); - le_source = new QLineEdit( main_widget ); + le_source = new TQLineEdit( main_widget ); grid->addWidget( le_source, 0, 1 ); le_source->setText( src ); - lb_to = new QLabel( "To:", main_widget ); + lb_to = new TQLabel( "To:", main_widget ); grid->addWidget( lb_to, 1, 0 ); - le_dest = new QLineEdit( main_widget ); + le_dest = new TQLineEdit( main_widget ); grid->addWidget( le_dest, 1, 1 ); le_dest->setText( dest ); // Operation groupbox & buttons - opButtons = new QButtonGroup( "Operation", main_widget ); + opButtons = new TQButtonGroup( "Operation", main_widget ); topLayout->addWidget( opButtons, 10 ); - connect( opButtons, SIGNAL(clicked(int)), SLOT(changeOperation(int)) ); + connect( opButtons, TQT_SIGNAL(clicked(int)), TQT_SLOT(changeOperation(int)) ); - QBoxLayout *hbLayout = new QHBoxLayout( opButtons, 15 ); + TQBoxLayout *hbLayout = new TQHBoxLayout( opButtons, 15 ); - rbList = new QRadioButton( "List", opButtons ); + rbList = new TQRadioButton( "List", opButtons ); opButtons->insert( rbList, List ); hbLayout->addWidget( rbList, 5 ); - rbListRecursive = new QRadioButton( "ListRecursive", opButtons ); + rbListRecursive = new TQRadioButton( "ListRecursive", opButtons ); opButtons->insert( rbListRecursive, ListRecursive ); hbLayout->addWidget( rbListRecursive, 5 ); - rbStat = new QRadioButton( "Stat", opButtons ); + rbStat = new TQRadioButton( "Stat", opButtons ); opButtons->insert( rbStat, Stat ); hbLayout->addWidget( rbStat, 5 ); - rbGet = new QRadioButton( "Get", opButtons ); + rbGet = new TQRadioButton( "Get", opButtons ); opButtons->insert( rbGet, Get ); hbLayout->addWidget( rbGet, 5 ); - rbPut = new QRadioButton( "Put", opButtons ); + rbPut = new TQRadioButton( "Put", opButtons ); opButtons->insert( rbPut, Put ); hbLayout->addWidget( rbPut, 5 ); - rbCopy = new QRadioButton( "Copy", opButtons ); + rbCopy = new TQRadioButton( "Copy", opButtons ); opButtons->insert( rbCopy, Copy ); hbLayout->addWidget( rbCopy, 5 ); - rbMove = new QRadioButton( "Move", opButtons ); + rbMove = new TQRadioButton( "Move", opButtons ); opButtons->insert( rbMove, Move ); hbLayout->addWidget( rbMove, 5 ); - rbDelete = new QRadioButton( "Delete", opButtons ); + rbDelete = new TQRadioButton( "Delete", opButtons ); opButtons->insert( rbDelete, Delete ); hbLayout->addWidget( rbDelete, 5 ); - rbShred = new QRadioButton( "Shred", opButtons ); + rbShred = new TQRadioButton( "Shred", opButtons ); opButtons->insert( rbShred, Shred ); hbLayout->addWidget( rbShred, 5 ); - rbMkdir = new QRadioButton( "Mkdir", opButtons ); + rbMkdir = new TQRadioButton( "Mkdir", opButtons ); opButtons->insert( rbMkdir, Mkdir ); hbLayout->addWidget( rbMkdir, 5 ); - rbMimetype = new QRadioButton( "Mimetype", opButtons ); + rbMimetype = new TQRadioButton( "Mimetype", opButtons ); opButtons->insert( rbMimetype, Mimetype ); hbLayout->addWidget( rbMimetype, 5 ); @@ -115,21 +115,21 @@ KioslaveTest::KioslaveTest( QString src, QString dest, uint op, uint pr ) changeOperation( op ); // Progress groupbox & buttons - progressButtons = new QButtonGroup( "Progress dialog mode", main_widget ); + progressButtons = new TQButtonGroup( "Progress dialog mode", main_widget ); topLayout->addWidget( progressButtons, 10 ); - connect( progressButtons, SIGNAL(clicked(int)), SLOT(changeProgressMode(int)) ); + connect( progressButtons, TQT_SIGNAL(clicked(int)), TQT_SLOT(changeProgressMode(int)) ); - hbLayout = new QHBoxLayout( progressButtons, 15 ); + hbLayout = new TQHBoxLayout( progressButtons, 15 ); - rbProgressNone = new QRadioButton( "None", progressButtons ); + rbProgressNone = new TQRadioButton( "None", progressButtons ); progressButtons->insert( rbProgressNone, ProgressNone ); hbLayout->addWidget( rbProgressNone, 5 ); - rbProgressDefault = new QRadioButton( "Default", progressButtons ); + rbProgressDefault = new TQRadioButton( "Default", progressButtons ); progressButtons->insert( rbProgressDefault, ProgressDefault ); hbLayout->addWidget( rbProgressDefault, 5 ); - rbProgressStatus = new QRadioButton( "Status", progressButtons ); + rbProgressStatus = new TQRadioButton( "Status", progressButtons ); progressButtons->insert( rbProgressStatus, ProgressStatus ); hbLayout->addWidget( rbProgressStatus, 5 ); @@ -141,23 +141,23 @@ KioslaveTest::KioslaveTest( QString src, QString dest, uint op, uint pr ) statusBar()->addWidget( statusProgress, 0, true ); // run & stop butons - hbLayout = new QHBoxLayout( topLayout, 15 ); + hbLayout = new TQHBoxLayout( topLayout, 15 ); - pbStart = new QPushButton( "&Start", main_widget ); + pbStart = new TQPushButton( "&Start", main_widget ); pbStart->setFixedSize( pbStart->sizeHint() ); - connect( pbStart, SIGNAL(clicked()), SLOT(startJob()) ); + connect( pbStart, TQT_SIGNAL(clicked()), TQT_SLOT(startJob()) ); hbLayout->addWidget( pbStart, 5 ); - pbStop = new QPushButton( "Sto&p", main_widget ); + pbStop = new TQPushButton( "Sto&p", main_widget ); pbStop->setFixedSize( pbStop->sizeHint() ); pbStop->setEnabled( false ); - connect( pbStop, SIGNAL(clicked()), SLOT(stopJob()) ); + connect( pbStop, TQT_SIGNAL(clicked()), TQT_SLOT(stopJob()) ); hbLayout->addWidget( pbStop, 5 ); // close button - close = new QPushButton( "&Close", main_widget ); + close = new TQPushButton( "&Close", main_widget ); close->setFixedSize( close->sizeHint() ); - connect(close, SIGNAL(clicked()), this, SLOT(slotQuit())); + connect(close, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotQuit())); topLayout->addWidget( close, 5 ); @@ -166,14 +166,14 @@ KioslaveTest::KioslaveTest( QString src, QString dest, uint op, uint pr ) slave = 0; // slave = KIO::Scheduler::getConnectedSlave(KURL("ftp://ftp.kde.org")); - KIO::Scheduler::connect(SIGNAL(slaveConnected(KIO::Slave*)), - this, SLOT(slotSlaveConnected())); - KIO::Scheduler::connect(SIGNAL(slaveError(KIO::Slave*,int,const QString&)), - this, SLOT(slotSlaveError())); + KIO::Scheduler::connect(TQT_SIGNAL(slaveConnected(KIO::Slave*)), + this, TQT_SLOT(slotSlaveConnected())); + KIO::Scheduler::connect(TQT_SIGNAL(slaveError(KIO::Slave*,int,const TQString&)), + this, TQT_SLOT(slotSlaveError())); } -void KioslaveTest::closeEvent( QCloseEvent * ){ +void KioslaveTest::closeEvent( TQCloseEvent * ){ slotQuit(); } @@ -210,22 +210,22 @@ void KioslaveTest::changeProgressMode( int id ) { void KioslaveTest::startJob() { - QString sCurrent = QDir::currentDirPath()+"/"; + TQString sCurrent = TQDir::currentDirPath()+"/"; KURL::encode_string(sCurrent); - QString sSrc( le_source->text() ); + TQString sSrc( le_source->text() ); KURL src( sCurrent, sSrc ); if ( !src.isValid() ) { - QMessageBox::critical(this, "Kioslave Error Message", "Source URL is malformed" ); + TQMessageBox::critical(this, "Kioslave Error Message", "Source URL is malformed" ); return; } - QString sDest( le_dest->text() ); + TQString sDest( le_dest->text() ); KURL dest( sCurrent, sDest ); if ( !dest.isValid() && ( selectedOperation == Copy || selectedOperation == Move ) ) { - QMessageBox::critical(this, "Kioslave Error Message", + TQMessageBox::critical(this, "Kioslave Error Message", "Destination URL is malformed" ); return; } @@ -242,14 +242,14 @@ void KioslaveTest::startJob() { switch ( selectedOperation ) { case List: myJob = KIO::listDir( src ); - connect(myJob, SIGNAL( entries( KIO::Job*, const KIO::UDSEntryList&)), - SLOT( slotEntries( KIO::Job*, const KIO::UDSEntryList&))); + connect(myJob, TQT_SIGNAL( entries( KIO::Job*, const KIO::UDSEntryList&)), + TQT_SLOT( slotEntries( KIO::Job*, const KIO::UDSEntryList&))); break; case ListRecursive: myJob = KIO::listRecursive( src ); - connect(myJob, SIGNAL( entries( KIO::Job*, const KIO::UDSEntryList&)), - SLOT( slotEntries( KIO::Job*, const KIO::UDSEntryList&))); + connect(myJob, TQT_SIGNAL( entries( KIO::Job*, const KIO::UDSEntryList&)), + TQT_SLOT( slotEntries( KIO::Job*, const KIO::UDSEntryList&))); break; case Stat: @@ -258,15 +258,15 @@ void KioslaveTest::startJob() { case Get: myJob = KIO::get( src, true ); - connect(myJob, SIGNAL( data( KIO::Job*, const QByteArray &)), - SLOT( slotData( KIO::Job*, const QByteArray &))); + connect(myJob, TQT_SIGNAL( data( KIO::Job*, const TQByteArray &)), + TQT_SLOT( slotData( KIO::Job*, const TQByteArray &))); break; case Put: putBuffer = 0; myJob = KIO::put( src, -1, true, false); - connect(myJob, SIGNAL( dataReq( KIO::Job*, QByteArray &)), - SLOT( slotDataReq( KIO::Job*, QByteArray &))); + connect(myJob, TQT_SIGNAL( dataReq( KIO::Job*, TQByteArray &)), + TQT_SLOT( slotDataReq( KIO::Job*, TQByteArray &))); break; case Copy: @@ -300,11 +300,11 @@ void KioslaveTest::startJob() { job = myJob; } - connect( job, SIGNAL( result( KIO::Job * ) ), - SLOT( slotResult( KIO::Job * ) ) ); + connect( job, TQT_SIGNAL( result( KIO::Job * ) ), + TQT_SLOT( slotResult( KIO::Job * ) ) ); - connect( job, SIGNAL( canceled( KIO::Job * ) ), - SLOT( slotResult( KIO::Job * ) ) ); + connect( job, TQT_SIGNAL( canceled( KIO::Job * ) ), + TQT_SLOT( slotResult( KIO::Job * ) ) ); if (progressMode == ProgressStatus) { statusProgress->setJob( job ); @@ -347,7 +347,7 @@ void KioslaveTest::slotSlaveError() slave = 0; } -static void printACL( const QString& acl ) +static void printACL( const TQString& acl ) { KACL kacl( acl ); kdDebug() << "According to KACL: " << endl << kacl.asString() << endl; @@ -424,8 +424,8 @@ void KioslaveTest::slotEntries(KIO::Job* job, const KIO::UDSEntryList& list) { kdDebug() << "" << ( *it2 ).m_str << endl; else if ( (*it2).m_uds == UDS_EXTRA) { Q_ASSERT( extraFieldsIt != extraFields.end() ); - QString column = (*extraFieldsIt).name; - //QString type = (*extraFieldsIt).type; + TQString column = (*extraFieldsIt).name; + //TQString type = (*extraFieldsIt).type; kdDebug() << " Extra data (" << column << ") :" << ( *it2 ).m_str << endl; ++extraFieldsIt; } @@ -433,7 +433,7 @@ void KioslaveTest::slotEntries(KIO::Job* job, const KIO::UDSEntryList& list) { } } -void KioslaveTest::slotData(KIO::Job*, const QByteArray &data) +void KioslaveTest::slotData(KIO::Job*, const TQByteArray &data) { if (data.size() == 0) { @@ -441,11 +441,11 @@ void KioslaveTest::slotData(KIO::Job*, const QByteArray &data) } else { - kdDebug(0) << "Data: \"" << QCString(data, data.size()+1) << "\"" << endl; + kdDebug(0) << "Data: \"" << TQCString(data, data.size()+1) << "\"" << endl; } } -void KioslaveTest::slotDataReq(KIO::Job*, QByteArray &data) +void KioslaveTest::slotDataReq(KIO::Job*, TQByteArray &data) { const char *fileDataArray[] = { @@ -500,13 +500,13 @@ int main(int argc, char **argv) { KCmdLineArgs *args = KCmdLineArgs::parsedArgs(); - QString src = args->getOption("src"); - QString dest = args->getOption("dest"); + TQString src = args->getOption("src"); + TQString dest = args->getOption("dest"); uint op = 0; uint pr = 0; - QString tmps; + TQString tmps; tmps = args->getOption("operation"); if ( tmps == "list") { diff --git a/kio/tests/kioslavetest.h b/kio/tests/kioslavetest.h index 34cb00c15..02fae7f23 100644 --- a/kio/tests/kioslavetest.h +++ b/kio/tests/kioslavetest.h @@ -12,12 +12,12 @@ #ifndef _KIOSLAVETEST_H #define _KIOSLAVETEST_H -#include <qlabel.h> -#include <qlineedit.h> -#include <qradiobutton.h> -#include <qpushbutton.h> -#include <qbuttongroup.h> -#include <qwidget.h> +#include <tqlabel.h> +#include <tqlineedit.h> +#include <tqradiobutton.h> +#include <tqpushbutton.h> +#include <tqbuttongroup.h> +#include <tqwidget.h> #include <kmainwindow.h> @@ -30,7 +30,7 @@ class KioslaveTest : public KMainWindow { Q_OBJECT public: - KioslaveTest( QString src, QString dest, uint op, uint pr ); + KioslaveTest( TQString src, TQString dest, uint op, uint pr ); ~KioslaveTest() {} enum Operations { List, ListRecursive, Stat, Get, Put, Copy, Move, Delete, Shred, Mkdir, Mimetype }; @@ -39,43 +39,43 @@ public: protected: - void closeEvent( QCloseEvent * ); + void closeEvent( TQCloseEvent * ); void printUDSEntry( const KIO::UDSEntry & entry ); // info stuff - QLabel *lb_from; - QLineEdit *le_source; + TQLabel *lb_from; + TQLineEdit *le_source; - QLabel *lb_to; - QLineEdit *le_dest; + TQLabel *lb_to; + TQLineEdit *le_dest; // operation stuff - QButtonGroup *opButtons; - - QRadioButton *rbList; - QRadioButton *rbListRecursive; - QRadioButton *rbStat; - QRadioButton *rbGet; - QRadioButton *rbPut; - QRadioButton *rbCopy; - QRadioButton *rbMove; - QRadioButton *rbDelete; - QRadioButton *rbShred; - QRadioButton *rbMkdir; - QRadioButton *rbMimetype; + TQButtonGroup *opButtons; + + TQRadioButton *rbList; + TQRadioButton *rbListRecursive; + TQRadioButton *rbStat; + TQRadioButton *rbGet; + TQRadioButton *rbPut; + TQRadioButton *rbCopy; + TQRadioButton *rbMove; + TQRadioButton *rbDelete; + TQRadioButton *rbShred; + TQRadioButton *rbMkdir; + TQRadioButton *rbMimetype; // progress stuff - QButtonGroup *progressButtons; + TQButtonGroup *progressButtons; - QRadioButton *rbProgressNone; - QRadioButton *rbProgressDefault; - QRadioButton *rbProgressStatus; + TQRadioButton *rbProgressNone; + TQRadioButton *rbProgressDefault; + TQRadioButton *rbProgressStatus; - QPushButton *pbStart; - QPushButton *pbStop; + TQPushButton *pbStart; + TQPushButton *pbStop; - QPushButton *close; + TQPushButton *close; protected slots: void changeOperation( int id ); @@ -86,8 +86,8 @@ protected slots: void slotResult( KIO::Job * ); void slotEntries( KIO::Job *, const KIO::UDSEntryList& ); - void slotData( KIO::Job *, const QByteArray &data ); - void slotDataReq( KIO::Job *, QByteArray &data ); + void slotData( KIO::Job *, const TQByteArray &data ); + void slotDataReq( KIO::Job *, TQByteArray &data ); void slotQuit(); void slotSlaveConnected(); @@ -95,7 +95,7 @@ protected slots: private: KIO::Job *job; - QWidget *main_widget; + TQWidget *main_widget; KIO::StatusbarProgress *statusProgress; diff --git a/kio/tests/kmfitest.cpp b/kio/tests/kmfitest.cpp index c50b83b34..25e96759f 100644 --- a/kio/tests/kmfitest.cpp +++ b/kio/tests/kmfitest.cpp @@ -1,6 +1,6 @@ #include <stdio.h> -#include <qdir.h> -#include <qfile.h> +#include <tqdir.h> +#include <tqfile.h> #include <kinstance.h> #include <kurl.h> #include <kfilemetainfo.h> @@ -16,12 +16,12 @@ int main (int argc, char **argv) } for (int i = 1; i < argc; i++) { - QString file = QFile::decodeName(argv[i]); + TQString file = TQFile::decodeName(argv[i]); qWarning("File: %s", file.local8Bit().data()); KMimeType::Ptr p; p = KMimeType::findByPath(file); qWarning("Mime type (findByPath): %s", p->name().latin1()); - KFileMetaInfo meta(file, QString::null, KFileMetaInfo::TechnicalInfo | KFileMetaInfo::ContentInfo); + KFileMetaInfo meta(file, TQString::null, KFileMetaInfo::TechnicalInfo | KFileMetaInfo::ContentInfo); } return 0; diff --git a/kio/tests/kmimefromext.cpp b/kio/tests/kmimefromext.cpp index e867d4822..248407f95 100644 --- a/kio/tests/kmimefromext.cpp +++ b/kio/tests/kmimefromext.cpp @@ -38,7 +38,7 @@ int main(int argc, char *argv[]) KApplication app; KCmdLineArgs *args = KCmdLineArgs::parsedArgs(); - QString fileName = args->arg( 0 ); + TQString fileName = args->arg( 0 ); // The "true" here means only the filename will be looked at. // "Mime-magic" will not interfer. The file doesn't exist. diff --git a/kio/tests/kmimemagictest.cpp b/kio/tests/kmimemagictest.cpp index 9f3f5bb2b..eb01137c9 100644 --- a/kio/tests/kmimemagictest.cpp +++ b/kio/tests/kmimemagictest.cpp @@ -32,7 +32,7 @@ int main( int argc, char** argv ) } KInstance blah("kmimemagictest"); - QString file = QString::fromLocal8Bit( argv[1] ); + TQString file = TQString::fromLocal8Bit( argv[1] ); KMimeMagicResult * result = KMimeMagic::self()->findFileType( file ); diff --git a/kio/tests/kmimetypetest.cpp b/kio/tests/kmimetypetest.cpp index b95f1ceea..1856e6036 100644 --- a/kio/tests/kmimetypetest.cpp +++ b/kio/tests/kmimetypetest.cpp @@ -20,14 +20,14 @@ #include <kinstance.h> #include <ktempdir.h> #include <kprotocolinfo.h> -#include <qdir.h> +#include <tqdir.h> #include <assert.h> #include <stdlib.h> #include <unistd.h> -static void checkIcon( const KURL& url, const QString& expectedIcon ) +static void checkIcon( const KURL& url, const TQString& expectedIcon ) { - QString icon = KMimeType::iconForURL( url ); + TQString icon = KMimeType::iconForURL( url ); if ( icon == expectedIcon ) qDebug( "icon for %s is %s, OK", url.prettyURL().latin1(), icon.latin1() ); else { @@ -45,32 +45,32 @@ int main( int argc, char** argv ) KURL url; // safely check a "regular" folder - url.setPath( QDir::homeDirPath() ); + url.setPath( TQDir::homeDirPath() ); checkIcon( url, "folder" ); // safely check a non-readable folder if (0 != geteuid()) { // can't do this test if we're root - KTempDir tmp( QString::null, 0 ); + KTempDir tmp( TQString::null, 0 ); tmp.setAutoDelete( true ); url.setPath( tmp.name() ); checkIcon( url, "folder_locked" ); - chmod( QFile::encodeName( tmp.name() ), 0500 ); // so we can 'rm -rf' it + chmod( TQFile::encodeName( tmp.name() ), 0500 ); // so we can 'rm -rf' it } // safely check the trash folder - if ( KProtocolInfo::isKnownProtocol( QString("trash") ) ) { + if ( KProtocolInfo::isKnownProtocol( TQString("trash") ) ) { checkIcon( "trash:/", "trashcan_full" ); // #100321 checkIcon( "trash:/foo/", "folder" ); } - QString pdf; + TQString pdf; KMimeType::diagnoseFileName("foo.pdf", pdf); qDebug("extension: '%s'", pdf.latin1()); - assert(pdf == QString("*.pdf")); - QString ps; + assert(pdf == TQString("*.pdf")); + TQString ps; KMimeType::diagnoseFileName("foo.ps", ps); qDebug("extension: '%s'", ps.latin1()); - assert(ps == QString("*.ps")); + assert(ps == TQString("*.ps")); return 0; } diff --git a/kio/tests/kprotocolinfotest.cpp b/kio/tests/kprotocolinfotest.cpp index 64ec617f6..b0fe392f2 100644 --- a/kio/tests/kprotocolinfotest.cpp +++ b/kio/tests/kprotocolinfotest.cpp @@ -47,11 +47,11 @@ int main(int argc, char **argv) { assert( KProtocolInfo::showFilePreview( "audiocd" ) == false ); assert( KGlobalSettings::showFilePreview( "audiocd:/" ) == false ); - QString proxy; - QString protocol = KProtocolManager::slaveProtocol( "http://bugs.kde.org", proxy ); + TQString proxy; + TQString protocol = KProtocolManager::slaveProtocol( "http://bugs.kde.org", proxy ); assert( protocol == "http" ); - QStringList capabilities = KProtocolInfo::capabilities( "imap" ); + TQStringList capabilities = KProtocolInfo::capabilities( "imap" ); kdDebug() << "kio_imap capabilities: " << capabilities << endl; //assert(capabilities.contains("ACL")); diff --git a/kio/tests/kruntest.cpp b/kio/tests/kruntest.cpp index 92c0a3af3..10dbc9b71 100644 --- a/kio/tests/kruntest.cpp +++ b/kio/tests/kruntest.cpp @@ -27,9 +27,9 @@ #include <kservice.h> #include <kde_file.h> -#include <qpushbutton.h> -#include <qlayout.h> -#include <qdir.h> +#include <tqpushbutton.h> +#include <tqlayout.h> +#include <tqdir.h> #include <stdlib.h> #include <unistd.h> @@ -39,7 +39,7 @@ const int MAXKRUNS = 100; testKRun * myArray[MAXKRUNS]; -void testKRun::foundMimeType( const QString& _type ) +void testKRun::foundMimeType( const TQString& _type ) { kdDebug() << "testKRun::foundMimeType " << _type << endl; kdDebug() << "testKRun::foundMimeType URL=" << m_strURL.url() << endl; @@ -50,15 +50,15 @@ void testKRun::foundMimeType( const QString& _type ) Receiver::Receiver() { - QVBoxLayout *lay = new QVBoxLayout(this); + TQVBoxLayout *lay = new TQVBoxLayout(this); lay->setAutoAdd(true); - QPushButton * h = new QPushButton( "Press here to terminate", this ); - start = new QPushButton( "Launch KRuns", this ); - stop = new QPushButton( "Stop those KRuns", this ); + TQPushButton * h = new TQPushButton( "Press here to terminate", this ); + start = new TQPushButton( "Launch KRuns", this ); + stop = new TQPushButton( "Stop those KRuns", this ); stop->setEnabled(false); - QObject::connect( h, SIGNAL(clicked()), kapp, SLOT(quit()) ); - QObject::connect( start, SIGNAL(clicked()), this, SLOT(slotStart()) ); - QObject::connect( stop, SIGNAL(clicked()), this, SLOT(slotStop()) ); + TQObject::connect( h, TQT_SIGNAL(clicked()), kapp, TQT_SLOT(quit()) ); + TQObject::connect( start, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotStart()) ); + TQObject::connect( stop, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotStop()) ); adjustSize(); show(); @@ -87,12 +87,12 @@ void Receiver::slotStart() stop->setEnabled(true); } -void check(QString txt, QString a, QString b) +void check(TQString txt, TQString a, TQString b) { if (a.isEmpty()) - a = QString::null; + a = TQString::null; if (b.isEmpty()) - b = QString::null; + b = TQString::null; if (a == b) kdDebug() << txt << " : '" << a << "' - ok" << endl; else { @@ -103,15 +103,15 @@ void check(QString txt, QString a, QString b) const char *bt(bool tr) { return tr?"true":"false"; } -void checkBN(QString a, bool tr, QString b) +void checkBN(TQString a, bool tr, TQString b) { - check( QString().sprintf("binaryName('%s', %s)", a.latin1(), bt(tr)), KRun::binaryName(a, tr), b); + check( TQString().sprintf("binaryName('%s', %s)", a.latin1(), bt(tr)), KRun::binaryName(a, tr), b); } -void checkPDE(const KService &service, const KURL::List &urls, bool hs, bool tf, QString b) +void checkPDE(const KService &service, const KURL::List &urls, bool hs, bool tf, TQString b) { check( - QString().sprintf("processDesktopExec( " + TQString().sprintf("processDesktopExec( " "service = {\nexec = %s\nterminal = %s, terminalOptions = %s\nsubstituteUid = %s, user = %s }," "\nURLs = { %s },\nhas_shell = %s, temp_files = %s )", service.exec().latin1(), bt(service.terminal()), service.terminalOptions().latin1(), bt(service.substituteUid()), service.username().latin1(), @@ -174,7 +174,7 @@ int main(int argc, char **argv) "%s\n%s\n%s\n",execs[ex],terms[te],sus[su]); close(fd); fclose(f); - KService s(QDir::currentDirPath() + "/kruntest.desktop"); + KService s(TQDir::currentDirPath() + "/kruntest.desktop"); unlink("kruntest.desktop"); checkPDE( s, l0, hs, false, rslts[ex+te*2+su*4+hs*8]); } diff --git a/kio/tests/kruntest.h b/kio/tests/kruntest.h index e1bb92729..3df8e1ac5 100644 --- a/kio/tests/kruntest.h +++ b/kio/tests/kruntest.h @@ -21,7 +21,7 @@ #include <krun.h> -#include <qwidget.h> +#include <tqwidget.h> class testKRun : public KRun { @@ -34,7 +34,7 @@ public: virtual ~testKRun() {} - virtual void foundMimeType( const QString& _type ); + virtual void foundMimeType( const TQString& _type ); }; @@ -50,8 +50,8 @@ public slots: void slotStart(); void slotStop(); private: - QPushButton * start; - QPushButton * stop; + TQPushButton * start; + TQPushButton * stop; }; diff --git a/kio/tests/kshredtest.cpp b/kio/tests/kshredtest.cpp index 3bd7ae189..76e87fca4 100644 --- a/kio/tests/kshredtest.cpp +++ b/kio/tests/kshredtest.cpp @@ -21,7 +21,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ #include "kshred.h" -#include <qstring.h> +#include <tqstring.h> int main(int argc, char **argv) diff --git a/kio/tests/ksycocatest.cpp b/kio/tests/ksycocatest.cpp index fe2c22d94..4a4fcabb0 100644 --- a/kio/tests/ksycocatest.cpp +++ b/kio/tests/ksycocatest.cpp @@ -33,12 +33,12 @@ #include <stdio.h> #include <stdlib.h> -bool check(QString txt, QString a, QString b) +bool check(TQString txt, TQString a, TQString b) { if (a.isEmpty()) - a = QString::null; + a = TQString::null; if (b.isEmpty()) - b = QString::null; + b = TQString::null; if (a == b) { kdDebug() << txt << " : checking '" << a << "' against expected value '" << b << "'... " << "ok" << endl; } @@ -50,7 +50,7 @@ bool check(QString txt, QString a, QString b) return true; } -void debug(QString txt) +void debug(TQString txt) { fprintf(stderr, "%s\n", txt.ascii()); } @@ -69,8 +69,8 @@ int main(int argc, char *argv[]) { KApplication k(argc,argv,"whatever",false/*noGUI*/); // KMessageBox needs KApp for makeStdCaption - QCString instname = "kword"; - QString desktopPath = QString::fromLatin1( "Office/%1.desktop" ).arg( instname ); + TQCString instname = "kword"; + TQString desktopPath = TQString::fromLatin1( "Office/%1.desktop" ).arg( instname ); qDebug( "Looking for %s", desktopPath.latin1() ); KService::Ptr service = KService::serviceByDesktopPath( desktopPath ); if ( service ) @@ -90,7 +90,7 @@ int main(int argc, char *argv[]) if ( s1 ) { debug("Found it !"); - debug(QString("Comment is %1").arg(s1->comment(KURL(),false))); + debug(TQString("Comment is %1").arg(s1->comment(KURL(),false))); } else { @@ -103,7 +103,7 @@ int main(int argc, char *argv[]) if ( s0 ) { debug("Found it !"); - debug(QString("Comment is %1").arg(s0->comment(KURL(),false))); + debug(TQString("Comment is %1").arg(s0->comment(KURL(),false))); } else { @@ -116,7 +116,7 @@ int main(int argc, char *argv[]) if ( se ) { debug("Found it !"); - debug(QString("Comment is %1").arg(se->comment())); + debug(TQString("Comment is %1").arg(se->comment())); } else { @@ -128,10 +128,10 @@ int main(int argc, char *argv[]) if ( se ) { debug("Found it !"); - debug(QString("Comment is %1").arg(se->comment())); - QVariant qv = se->property("DocPath"); - debug(QString("Property type is %1").arg(qv.typeName())); - debug(QString("Property value is %1").arg(qv.toString())); + debug(TQString("Comment is %1").arg(se->comment())); + TQVariant qv = se->property("DocPath"); + debug(TQString("Property type is %1").arg(qv.typeName())); + debug(TQString("Property value is %1").arg(qv.toString())); } else { @@ -143,7 +143,7 @@ int main(int argc, char *argv[]) if ( se ) { debug("Found it !"); - debug(QString("Comment is %1").arg(se->comment())); + debug(TQString("Comment is %1").arg(se->comment())); } else { @@ -155,7 +155,7 @@ int main(int argc, char *argv[]) if ( se ) { debug("Found it !"); - debug(QString("Comment is %1").arg(se->comment())); + debug(TQString("Comment is %1").arg(se->comment())); } else { @@ -165,7 +165,7 @@ int main(int argc, char *argv[]) #if 1 debug("Querying userprofile for services associated with text/plain"); KServiceTypeProfile::OfferList offers = KServiceTypeProfile::offers("text/plain"); - debug(QString("got %1 offers").arg(offers.count())); + debug(TQString("got %1 offers").arg(offers.count())); KServiceTypeProfile::OfferList::Iterator it = offers.begin(); for ( ; it != offers.end() ; it++ ) { @@ -174,7 +174,7 @@ int main(int argc, char *argv[]) debug("Querying userprofile for services associated with KOfficeFilter"); offers = KServiceTypeProfile::offers("KOfficeFilter"); - debug(QString("got %1 offers").arg(offers.count())); + debug(TQString("got %1 offers").arg(offers.count())); it = offers.begin(); for ( ; it != offers.end() ; it++ ) { @@ -183,7 +183,7 @@ int main(int argc, char *argv[]) debug("Querying trader for Konqueror/Plugin"); KTrader::OfferList traderoffers = KTrader::self()->query("Konqueror/Plugin"); - debug(QString("got %1 offers").arg(traderoffers.count())); + debug(TQString("got %1 offers").arg(traderoffers.count())); KTrader::OfferList::Iterator trit = traderoffers.begin(); for ( ; trit != traderoffers.end() ; trit++ ) { @@ -201,7 +201,7 @@ int main(int argc, char *argv[]) // debug("\nTrying findByURL for folder_home.png"); - QString fh; + TQString fh; (void)k.iconLoader()->loadIcon("folder_home.png",KIcon::Desktop,0,KIcon::DefaultState,&fh); mf = KMimeType::findByURL( fh, 0, true, false ); assert( mf ); @@ -211,8 +211,8 @@ int main(int argc, char *argv[]) //debug("\nTrying findByURL for Makefile.am"); //mf = KMimeType::findByURL( KURL("/tmp/Makefile.am"), 0, true, false ); //assert( mf ); - //debug(QString("Name is %1").arg(mf->name())); - //debug(QString("Comment is %1").arg(mf->comment(KURL(),false))); + //debug(TQString("Name is %1").arg(mf->name())); + //debug(TQString("Comment is %1").arg(mf->comment(KURL(),false))); debug("\nTrying findByURL for man:/ls"); mf = KMimeType::findByURL( KURL("man:/ls") ); @@ -228,17 +228,17 @@ int main(int argc, char *argv[]) mtl = KMimeType::allMimeTypes( ); assert( mtl.count() ); - debug(QString("Found %1 mime types.").arg(mtl.count())); + debug(TQString("Found %1 mime types.").arg(mtl.count())); for(int i = 0; i < (int)mtl.count(); i++) { - debug(QString("Mime type %1: %2.").arg(i).arg(mtl[i]->name())); + debug(TQString("Mime type %1: %2.").arg(i).arg(mtl[i]->name())); } KService::List sl; sl = KService::allServices( ); assert( sl.count() ); - debug(QString("Found %1 services.").arg(sl.count())); + debug(TQString("Found %1 services.").arg(sl.count())); KServiceGroup::Ptr root = KServiceGroup::root(); KServiceGroup::List list = root->entries(); @@ -248,7 +248,7 @@ int main(int argc, char *argv[]) KServiceGroup::Ptr first; - debug(QString("Found %1 entries").arg(list.count())); + debug(TQString("Found %1 entries").arg(list.count())); for( KServiceGroup::List::ConstIterator it = list.begin(); it != list.end(); it++) { @@ -262,7 +262,7 @@ int main(int argc, char *argv[]) else if (p->isType(KST_KServiceGroup)) { KServiceGroup *serviceGroup = static_cast<KServiceGroup *>(p); - debug(QString(" %1 -->").arg(serviceGroup->caption())); + debug(TQString(" %1 -->").arg(serviceGroup->caption())); if (!first) first = serviceGroup; } else @@ -274,7 +274,7 @@ int main(int argc, char *argv[]) if (first) { list = first->entries(); - debug(QString("Found %1 entries").arg(list.count())); + debug(TQString("Found %1 entries").arg(list.count())); for( KServiceGroup::List::ConstIterator it = list.begin(); it != list.end(); it++) { @@ -282,12 +282,12 @@ int main(int argc, char *argv[]) if (p->isType(KST_KService)) { KService *service = static_cast<KService *>(p); - debug(QString(" %1").arg(service->name())); + debug(TQString(" %1").arg(service->name())); } else if (p->isType(KST_KServiceGroup)) { KServiceGroup *serviceGroup = static_cast<KServiceGroup *>(p); - debug(QString(" %1 -->").arg(serviceGroup->caption())); + debug(TQString(" %1 -->").arg(serviceGroup->caption())); } else { @@ -307,8 +307,8 @@ int main(int argc, char *argv[]) debug("--End of list--"); debug("--protocols--"); - QStringList stringL = KProtocolInfo::protocols(); - for( QStringList::ConstIterator it = stringL.begin(); + TQStringList stringL = KProtocolInfo::protocols(); + for( TQStringList::ConstIterator it = stringL.begin(); it != stringL.end(); it++) { debug((*it).ascii()); @@ -319,38 +319,38 @@ int main(int argc, char *argv[]) #if 0 KImageIO::registerFormats(); - QStringList types; + TQStringList types; types = KImageIO::types(KImageIO::Reading); debug("Can read:"); - for(QStringList::ConstIterator it = types.begin(); + for(TQStringList::ConstIterator it = types.begin(); it != types.end(); ++it) - debug(QString(" %1").arg((*it))); + debug(TQString(" %1").arg((*it))); types = KImageIO::types(KImageIO::Writing); debug("Can write:"); - for(QStringList::ConstIterator it = types.begin(); + for(TQStringList::ConstIterator it = types.begin(); it != types.end(); ++it) - debug(QString(" %1").arg((*it))); + debug(TQString(" %1").arg((*it))); - QString rPattern = KImageIO::pattern( KImageIO::Reading ); + TQString rPattern = KImageIO::pattern( KImageIO::Reading ); debug("Read pattern:\n%s", rPattern.ascii()); - QString wPattern = KImageIO::pattern( KImageIO::Writing ); + TQString wPattern = KImageIO::pattern( KImageIO::Writing ); debug("Write pattern:\n%s", wPattern.ascii()); - QString suffix = KImageIO::suffix("JPEG"); + TQString suffix = KImageIO::suffix("JPEG"); debug("Standard suffix for JPEG: %s", suffix.ascii()); types = KImageIO::mimeTypes(KImageIO::Reading); debug("Can read (mimetypes):"); - for(QStringList::ConstIterator it = types.begin(); + for(TQStringList::ConstIterator it = types.begin(); it != types.end(); ++it) debug(" %s", (*it).ascii()); types = KImageIO::mimeTypes(KImageIO::Writing); debug("Can write (mimetypes):"); - for(QStringList::ConstIterator it = types.begin(); + for(TQStringList::ConstIterator it = types.begin(); it != types.end(); ++it) debug(" %s", (*it).ascii()); diff --git a/kio/tests/ktartest.cpp b/kio/tests/ktartest.cpp index 055d016a7..5fe4a4f1f 100644 --- a/kio/tests/ktartest.cpp +++ b/kio/tests/ktartest.cpp @@ -19,14 +19,14 @@ #include "ktar.h" #include <stdio.h> #include <kinstance.h> -#include <qfile.h> +#include <tqfile.h> #include <assert.h> -void recursive_print( const KTarDirectory * dir, const QString & path ) +void recursive_print( const KTarDirectory * dir, const TQString & path ) { - QStringList l = dir->entries(); - QStringList::Iterator it = l.begin(); + TQStringList l = dir->entries(); + TQStringList::Iterator it = l.begin(); for( ; it != l.end(); ++it ) { const KTarEntry* entry = dir->entry( (*it) ); @@ -51,7 +51,7 @@ int main( int argc, char** argv ) return 1; } KInstance instance("ktartest"); - QString command = argv[1]; + TQString command = argv[1]; if ( command == "list" ) { KTarGz tar( argv[2] ); @@ -120,9 +120,9 @@ int main( int argc, char** argv ) Q_ASSERT( e && e->isFile() ); const KTarFile* f = (KTarFile*)e; - QByteArray arr( f->data() ); + TQByteArray arr( f->data() ); printf("SIZE=%i\n",arr.size() ); - QString str( arr ); + TQString str( arr ); printf("DATA=%s\n", str.latin1()); tar.close(); @@ -143,7 +143,7 @@ int main( int argc, char** argv ) // implementation fares for (int i = 98; i < 514 ; i++ ) { - QString str, num; + TQString str, num; str.fill( 'a', i-10 ); num.setNum( i ); num = num.rightJustify( 10, '0' ); @@ -165,9 +165,9 @@ int main( int argc, char** argv ) const KTarEntry* entry = dir->entry( "my/dir/test3" ); if ( entry && entry->isFile() ) { - QIODevice *dev = static_cast<const KTarFile *>(entry)->device(); - QByteArray contents = dev->readAll(); - printf("contents='%s'\n", QCString(contents, contents.size()+1 ).data()); + TQIODevice *dev = static_cast<const KTarFile *>(entry)->device(); + TQByteArray contents = dev->readAll(); + printf("contents='%s'\n", TQCString(contents, contents.size()+1 ).data()); } else printf("entry=%p - not found if 0, otherwise not a file\n", (void*)entry); return 0; diff --git a/kio/tests/ktradertest.cpp b/kio/tests/ktradertest.cpp index 28d3730d6..34ce8e3bc 100644 --- a/kio/tests/ktradertest.cpp +++ b/kio/tests/ktradertest.cpp @@ -44,18 +44,18 @@ int main( int argc, char **argv ) if ( args->count() < 1 ) KCmdLineArgs::usage(); - QString query = QString::fromLocal8Bit( args->arg( 0 ) ); + TQString query = TQString::fromLocal8Bit( args->arg( 0 ) ); - QString genericServiceType, constraint, preference; + TQString genericServiceType, constraint, preference; if ( args->count() >= 2 ) - genericServiceType = QString::fromLocal8Bit( args->arg( 1 ) ); + genericServiceType = TQString::fromLocal8Bit( args->arg( 1 ) ); if ( args->count() >= 3 ) - constraint = QString::fromLocal8Bit( args->arg( 2 ) ); + constraint = TQString::fromLocal8Bit( args->arg( 2 ) ); if ( args->count() == 4 ) - preference = QString::fromLocal8Bit( args->arg( 3 ) ); + preference = TQString::fromLocal8Bit( args->arg( 3 ) ); printf( "query is : %s\n", query.local8Bit().data() ); printf( "genericServiceType is : %s\n", genericServiceType.local8Bit().data() ); @@ -72,12 +72,12 @@ int main( int argc, char **argv ) for (; it != end; ++it, ++i ) { printf("---- Offer %d ----\n", i); - QStringList props = (*it)->propertyNames(); - QStringList::ConstIterator propIt = props.begin(); - QStringList::ConstIterator propEnd = props.end(); + TQStringList props = (*it)->propertyNames(); + TQStringList::ConstIterator propIt = props.begin(); + TQStringList::ConstIterator propEnd = props.end(); for (; propIt != propEnd; ++propIt ) { - QVariant prop = (*it)->property( *propIt ); + TQVariant prop = (*it)->property( *propIt ); if ( !prop.isValid() ) { @@ -85,15 +85,15 @@ int main( int argc, char **argv ) continue; } - QString outp = *propIt; + TQString outp = *propIt; outp += " : '"; switch ( prop.type() ) { - case QVariant::StringList: + case TQVariant::StringList: outp += prop.toStringList().join(" - "); break; - case QVariant::Bool: + case TQVariant::Bool: outp += prop.toBool() ? "TRUE" : "FALSE"; break; default: diff --git a/kio/tests/kurifiltertest.cpp b/kio/tests/kurifiltertest.cpp index 9a041e28f..8e4b023cb 100644 --- a/kio/tests/kurifiltertest.cpp +++ b/kio/tests/kurifiltertest.cpp @@ -29,23 +29,23 @@ #include <kstandarddirs.h> #include <ksimpleconfig.h> -#include <qdir.h> -#include <qregexp.h> +#include <tqdir.h> +#include <tqregexp.h> #include <kio/netaccess.h> static const char * const s_uritypes[] = { "NET_PROTOCOL", "LOCAL_FILE", "LOCAL_DIR", "EXECUTABLE", "HELP", "SHELL", "BLOCKED", "ERROR", "UNKNOWN" }; #define NO_FILTERING -2 -void filter( const char* u, const char * expectedResult = 0, int expectedUriType = -1, QStringList list = QStringList(), const char * abs_path = 0, bool checkForExecutables = true ) +void filter( const char* u, const char * expectedResult = 0, int expectedUriType = -1, TQStringList list = TQStringList(), const char * abs_path = 0, bool checkForExecutables = true ) { - QString a = QString::fromUtf8( u ); + TQString a = TQString::fromUtf8( u ); KURIFilterData * m_filterData = new KURIFilterData; m_filterData->setData( a ); m_filterData->setCheckForExecutables( checkForExecutables ); if( abs_path ) { - m_filterData->setAbsolutePath( QString::fromLatin1( abs_path ) ); + m_filterData->setAbsolutePath( TQString::fromLatin1( abs_path ) ); kdDebug() << "Filtering: " << a << " with abs_path=" << abs_path << endl; } else @@ -54,7 +54,7 @@ void filter( const char* u, const char * expectedResult = 0, int expectedUriType if (KURIFilter::self()->filterURI(*m_filterData, list)) { // Copied from minicli... - QString cmd; + TQString cmd; KURL uri = m_filterData->uri(); if ( uri.isLocalFile() && !uri.hasRef() && uri.query().isEmpty() ) @@ -97,8 +97,8 @@ void filter( const char* u, const char * expectedResult = 0, int expectedUriType if ( expectedResult ) { // Hack for other locales than english, normalize google hosts to google.com - cmd = cmd.replace( QRegExp( "www\\.google\\.[^/]*/" ), "www.google.com/" ); - if ( cmd != QString::fromLatin1( expectedResult ) ) + cmd = cmd.replace( TQRegExp( "www\\.google\\.[^/]*/" ), "www.google.com/" ); + if ( cmd != TQString::fromLatin1( expectedResult ) ) { kdError() << " Got " << cmd << " expected " << expectedResult << endl; ::exit(1); @@ -125,13 +125,13 @@ void filter( const char* u, const char * expectedResult = 0, int expectedUriType kdDebug() << "-----" << endl; } -void testLocalFile( const QString& filename ) +void testLocalFile( const TQString& filename ) { - QFile tmpFile( filename ); // Yeah, I know, security risk blah blah. This is a test prog! + TQFile tmpFile( filename ); // Yeah, I know, security risk blah blah. This is a test prog! if ( tmpFile.open( IO_ReadWrite ) ) { - QCString fname = QFile::encodeName( tmpFile.name() ); + TQCString fname = TQFile::encodeName( tmpFile.name() ); filter(fname, fname, KURIFilterData::LOCAL_FILE); tmpFile.close(); tmpFile.remove(); @@ -155,7 +155,7 @@ int main(int argc, char **argv) { // Ensure that user configuration doesn't change the results of those tests // KDEHOME needs to be writable though, for a ksycoca database - setenv( "KDEHOME", QFile::encodeName( QDir::homeDirPath() + "/.kde-kurifiltertest" ), true ); + setenv( "KDEHOME", TQFile::encodeName( TQDir::homeDirPath() + "/.kde-kurifiltertest" ), true ); setenv( "KDE_FORK_SLAVES", "yes", true ); // simpler, for the final cleanup KAboutData aboutData(appName, programName, version, description); @@ -187,7 +187,7 @@ int main(int argc, char **argv) cfg.sync(); } - QStringList minicliFilters; + TQStringList minicliFilters; minicliFilters << "kshorturifilter" << "kurisearchfilter" << "localdomainurifilter"; // URI that should require no filtering @@ -241,8 +241,8 @@ int main(int argc, char **argv) filter( "/", "/", KURIFilterData::LOCAL_DIR ); filter( "/", "/", KURIFilterData::LOCAL_DIR, "kshorturifilter" ); - filter( "~/.bashrc", QDir::homeDirPath().local8Bit()+"/.bashrc", KURIFilterData::LOCAL_FILE, "kshorturifilter" ); - filter( "~", QDir::homeDirPath().local8Bit(), KURIFilterData::LOCAL_DIR, "kshorturifilter", "/tmp" ); + filter( "~/.bashrc", TQDir::homeDirPath().local8Bit()+"/.bashrc", KURIFilterData::LOCAL_FILE, "kshorturifilter" ); + filter( "~", TQDir::homeDirPath().local8Bit(), KURIFilterData::LOCAL_DIR, "kshorturifilter", "/tmp" ); filter( "~foobar", 0, KURIFilterData::ERROR, "kshorturifilter" ); filter( "user@host.domain", "mailto:user@host.domain", KURIFilterData::NET_PROTOCOL ); // new in KDE-3.2 @@ -270,7 +270,7 @@ int main(int argc, char **argv) // a search using the default search engine // 'ls' is a bit of a special case though, due to the toplevel domain called 'ls' filter( "cp", "http://www.google.com/search?q=cp&ie=UTF-8&oe=UTF-8", KURIFilterData::NET_PROTOCOL, - QStringList(), 0, false /* don't check for executables, see konq_misc.cc */ ); + TQStringList(), 0, false /* don't check for executables, see konq_misc.cc */ ); // Executable tests - No IKWS in minicli filter( "cp", "cp", KURIFilterData::EXECUTABLE, minicliFilters ); @@ -288,13 +288,13 @@ int main(int argc, char **argv) setenv( "SOMEVAR", "/somevar", 0 ); setenv( "ETC", "/etc", 0 ); - QCString qtdir=getenv("QTDIR"); - QCString home = getenv("HOME"); - QCString kdehome = getenv("KDEHOME"); + TQCString qtdir=getenv("QTDIR"); + TQCString home = getenv("HOME"); + TQCString kdehome = getenv("KDEHOME"); filter( "$SOMEVAR/kdelibs/kio", 0, KURIFilterData::ERROR ); // note: this dir doesn't exist... filter( "$ETC/passwd", "/etc/passwd", KURIFilterData::LOCAL_FILE ); - filter( "$QTDIR/doc/html/functions.html#s", QCString("file://")+qtdir+"/doc/html/functions.html#s", KURIFilterData::LOCAL_FILE ); + filter( "$QTDIR/doc/html/functions.html#s", TQCString("file://")+qtdir+"/doc/html/functions.html#s", KURIFilterData::LOCAL_FILE ); filter( "http://www.kde.org/$USER", "http://www.kde.org/$USER", KURIFilterData::NET_PROTOCOL ); // no expansion // Assume the default (~/.kde) if @@ -337,7 +337,7 @@ int main(int argc, char **argv) filter( "$HOME", home, KURIFilterData::LOCAL_DIR, "kshorturifilter" ); //use specific filter. - QCString sc; + TQCString sc; filter( sc.sprintf("gg%cfoo bar",delimiter), "http://www.google.com/search?q=foo+bar&ie=UTF-8&oe=UTF-8", KURIFilterData::NET_PROTOCOL ); filter( sc.sprintf("bug%c55798", delimiter), "http://bugs.kde.org/show_bug.cgi?id=55798", KURIFilterData::NET_PROTOCOL ); diff --git a/kio/tests/kurlcompletiontest.cpp b/kio/tests/kurlcompletiontest.cpp index ac0108ead..612dab558 100644 --- a/kio/tests/kurlcompletiontest.cpp +++ b/kio/tests/kurlcompletiontest.cpp @@ -19,9 +19,9 @@ #include <kapplication.h> #include <kurlcompletion.h> #include <kdebug.h> -#include <qdir.h> +#include <tqdir.h> #include <assert.h> -#include <qfile.h> +#include <tqfile.h> #include <ktempdir.h> #include <kcmdlineargs.h> #include <unistd.h> @@ -42,7 +42,7 @@ private: KURLCompletion* m_completion; KTempDir* m_tempDir; KURL m_dirURL; - QString m_dir; + TQString m_dir; }; void KURLCompletionTest::setup( bool setDirAsURL ) @@ -62,12 +62,12 @@ void KURLCompletionTest::setup( bool setDirAsURL ) } m_dirURL.setPath( m_dir ); - QFile f1( m_dir + "/file1" ); + TQFile f1( m_dir + "/file1" ); bool ok = f1.open( IO_WriteOnly ); assert( ok ); f1.close(); - QFile f2( m_dir + "/file#a" ); + TQFile f2( m_dir + "/file#a" ); ok = f2.open( IO_WriteOnly ); assert( ok ); f2.close(); @@ -94,22 +94,22 @@ void KURLCompletionTest::testLocalRelativePath() // Completion from relative path, with two matches m_completion->makeCompletion( "f" ); waitForCompletion(); - QStringList comp1all = m_completion->allMatches(); + TQStringList comp1all = m_completion->allMatches(); assert( comp1all.count() == 2 ); assert( comp1all.find( "file1" ) != comp1all.end() ); assert( comp1all.find( "file#a" ) != comp1all.end() ); - QString comp1 = m_completion->replacedPath( "file1" ); // like KURLRequester does + TQString comp1 = m_completion->replacedPath( "file1" ); // like KURLRequester does assert( comp1 == "file1" ); // Completion from relative path kdDebug() << endl << k_funcinfo << "now completing on 'file#'" << endl; m_completion->makeCompletion( "file#" ); waitForCompletion(); - QStringList compall = m_completion->allMatches(); + TQStringList compall = m_completion->allMatches(); kdDebug() << compall << endl; assert( compall.count() == 1 ); assert( compall.first() == "file#a" ); - QString comp2 = m_completion->replacedPath( compall.first() ); // like KURLRequester does + TQString comp2 = m_completion->replacedPath( compall.first() ); // like KURLRequester does assert( comp2 == "file#a" ); } @@ -119,10 +119,10 @@ void KURLCompletionTest::testLocalAbsolutePath() kdDebug() << k_funcinfo << m_dir+"file#" << endl; m_completion->makeCompletion( m_dir + "file#" ); waitForCompletion(); - QStringList compall = m_completion->allMatches(); + TQStringList compall = m_completion->allMatches(); kdDebug() << compall << endl; assert( compall.count() == 1 ); - QString comp = compall.first(); + TQString comp = compall.first(); assert( comp == m_dir + "file#a" ); comp = m_completion->replacedPath( comp ); // like KURLRequester does assert( comp == m_dir + "file#a" ); @@ -135,20 +135,20 @@ void KURLCompletionTest::testLocalURL() KURL url = KURL::fromPathOrURL( m_dirURL.path() + "file" ); m_completion->makeCompletion( url.prettyURL() ); waitForCompletion(); - QStringList comp1all = m_completion->allMatches(); + TQStringList comp1all = m_completion->allMatches(); kdDebug() << comp1all << endl; assert( comp1all.count() == 2 ); assert( comp1all.find( m_dirURL.url() + "file1" ) != comp1all.end() ); - QString filehash = m_dirURL.url() + "file%23a"; + TQString filehash = m_dirURL.url() + "file%23a"; assert( comp1all.find( filehash ) != comp1all.end() ); - QString filehashPath = m_completion->replacedPath( filehash ); // note that it returns a path!! + TQString filehashPath = m_completion->replacedPath( filehash ); // note that it returns a path!! kdDebug() << filehashPath << endl; assert( filehashPath == m_dirURL.path() + "file#a" ); // Completion from URL with no match url = KURL::fromPathOrURL( m_dirURL.path() + "foobar" ); kdDebug() << k_funcinfo << "makeCompletion(" << url << ")" << endl; - QString comp2 = m_completion->makeCompletion( url.prettyURL() ); + TQString comp2 = m_completion->makeCompletion( url.prettyURL() ); assert( comp2.isEmpty() ); waitForCompletion(); assert( m_completion->allMatches().isEmpty() ); diff --git a/kio/tests/kziptest.cpp b/kio/tests/kziptest.cpp index 11ad36b7d..5b784c40b 100644 --- a/kio/tests/kziptest.cpp +++ b/kio/tests/kziptest.cpp @@ -20,14 +20,14 @@ #include <stdio.h> #include <kinstance.h> #include <kdebug.h> -#include <qfile.h> +#include <tqfile.h> #include <assert.h> -void recursive_print( const KArchiveDirectory * dir, const QString & path ) +void recursive_print( const KArchiveDirectory * dir, const TQString & path ) { - QStringList l = dir->entries(); - QStringList::Iterator it = l.begin(); + TQStringList l = dir->entries(); + TQStringList::Iterator it = l.begin(); for( ; it != l.end(); ++it ) { const KArchiveEntry* entry = dir->entry( (*it) ); @@ -36,7 +36,7 @@ void recursive_print( const KArchiveDirectory * dir, const QString & path ) entry->isDirectory() ? 0 : ((KArchiveFile*)entry)->size(), entry->isDirectory() ? 0 : ((KArchiveFile*)entry)->position(), path.latin1(), (*it).latin1(), entry->isDirectory(), - !entry->symlink() ? "" : QString(" symlink: %1").arg(entry->symlink()).latin1() ); + !entry->symlink() ? "" : TQString(" symlink: %1").arg(entry->symlink()).latin1() ); // if (!entry->isDirectory()) printf("%d", ((KArchiveFile*)entry)->size()); printf("\n"); @@ -47,10 +47,10 @@ void recursive_print( const KArchiveDirectory * dir, const QString & path ) void recursive_transfer(const KArchiveDirectory * dir, - const QString & path, KZip * zip) + const TQString & path, KZip * zip) { - QStringList l = dir->entries(); - QStringList::Iterator it = l.begin(); + TQStringList l = dir->entries(); + TQStringList::Iterator it = l.begin(); for( ; it != l.end(); ++it ) { const KArchiveEntry* e = dir->entry( (*it) ); @@ -61,9 +61,9 @@ void recursive_transfer(const KArchiveDirectory * dir, const KArchiveFile* f = (KArchiveFile*)e; printf("FILE=%s\n", e->name().latin1()); - QByteArray arr( f->data() ); + TQByteArray arr( f->data() ); printf("SIZE=%i\n",arr.size() ); - QString str( arr ); + TQString str( arr ); printf("DATA=%s\n", str.latin1()); if (e->symlink().isEmpty()) { @@ -99,7 +99,7 @@ int main( int argc, char** argv ) return 1; } KInstance instance("kziptest"); - QString command = argv[1]; + TQString command = argv[1]; if ( command == "list" ) { KZip zip( argv[2] ); @@ -178,10 +178,10 @@ int main( int argc, char** argv ) Q_ASSERT( e && e->isFile() ); const KArchiveFile* f = (KArchiveFile*)e; - QByteArray arr( f->data() ); + TQByteArray arr( f->data() ); Q_ASSERT( arr.size() == 13 ); printf("SIZE=%i\n",arr.size() ); - QString str( arr ); + TQString str( arr ); Q_ASSERT( str == "Noch so einer" ); printf("DATA=%s\n", str.latin1()); @@ -211,7 +211,7 @@ int main( int argc, char** argv ) // Generate long filenames of each possible length bigger than 98... for (int i = 98; i < 500 ; i++ ) { - QString str, num; + TQString str, num; str.fill( 'a', i-10 ); num.setNum( i ); num = num.rightJustify( 10, '0' ); @@ -233,10 +233,10 @@ int main( int argc, char** argv ) const KArchiveEntry* entry = dir->entry( "my/dir/test3" ); if ( entry && entry->isFile() ) { - QIODevice *dev = static_cast<const KZipFileEntry *>(entry)->device(); + TQIODevice *dev = static_cast<const KZipFileEntry *>(entry)->device(); if ( dev ) { - QByteArray contents = dev->readAll(); - printf("contents='%s'\n", QCString(contents, contents.size()+1).data()); + TQByteArray contents = dev->readAll(); + printf("contents='%s'\n", TQCString(contents, contents.size()+1).data()); } } else printf("entry=%p - not found if 0, otherwise not a file\n", (void*)entry); @@ -253,8 +253,8 @@ int main( int argc, char** argv ) } const KArchiveDirectory* dir = zip.directory(); kdDebug() << "Listing toplevel of zip file" << endl; - QStringList l = dir->entries(); - QStringList::Iterator it = l.begin(); + TQStringList l = dir->entries(); + TQStringList::Iterator it = l.begin(); for( ; it != l.end(); ++it ) { const KArchiveEntry* e = dir->entry( (*it) ); @@ -264,9 +264,9 @@ int main( int argc, char** argv ) Q_ASSERT( e && e->isFile() ); const KArchiveFile* f = (KArchiveFile*)e; - QByteArray arr( f->data() ); + TQByteArray arr( f->data() ); printf("SIZE=%i\n",arr.size() ); - QString str( arr ); + TQString str( arr ); printf("DATA=%s\n", str.latin1()); } } @@ -291,9 +291,9 @@ int main( int argc, char** argv ) Q_ASSERT( e && e->isFile() ); const KArchiveFile* f = (KArchiveFile*)e; - QByteArray arr( f->data() ); + TQByteArray arr( f->data() ); printf("SIZE=%i\n",arr.size() ); - QString str( arr ); + TQString str( arr ); // printf("DATA=%s\n", str.latin1()); printf("%s", str.latin1()); zip.close(); @@ -318,16 +318,16 @@ int main( int argc, char** argv ) // Q_ASSERT( e && e->isFile() ); // const KArchiveFile* f = (KArchiveFile*)e; -// QCString data( "This is some new data that goes into " ); +// TQCString data( "This is some new data that goes into " ); // data += argv[3]; - QFile f ( argv[3] ); + TQFile f ( argv[3] ); if (!f.open( IO_ReadOnly )) { printf("Could not open %s for reading\n", argv[2] ); return 1; } - QDataStream s( &f ); + TQDataStream s( &f ); // zip.writeFile( argv[3], "", "", data.size(), data.data() ); @@ -402,9 +402,9 @@ int main( int argc, char** argv ) Q_ASSERT( e && e->isFile() ); const KArchiveFile* f = (KArchiveFile*)e; - QByteArray arr( f->data() ); + TQByteArray arr( f->data() ); printf("SIZE=%i\n",arr.size() ); - QString str( arr ); + TQString str( arr ); printf("DATA=%s\n", str.latin1()); zip.close(); @@ -419,9 +419,9 @@ int main( int argc, char** argv ) Q_ASSERT( e && e->isFile() ); const KArchiveFile* f = (KArchiveFile*)e; - QByteArray arr( f->data() ); + TQByteArray arr( f->data() ); // printf("SIZE=%i\n",arr.size() ); - QString str( arr ); + TQString str( arr ); // printf("DATA=%s\n", str.latin1()); printf("%s", str.latin1()); zip.close(); diff --git a/kio/tests/metatest.cpp b/kio/tests/metatest.cpp index 9a5824132..54b87b6a0 100644 --- a/kio/tests/metatest.cpp +++ b/kio/tests/metatest.cpp @@ -1,11 +1,11 @@ #include <kapplication.h> #include <kfilemetainfo.h> #include <kcmdlineargs.h> -#include <qstringlist.h> -#include <qimage.h> +#include <tqstringlist.h> +#include <tqimage.h> #include <kdebug.h> -#include <qlabel.h> -#include <qvalidator.h> +#include <tqlabel.h> +#include <tqvalidator.h> #define I18N_NOOP @@ -28,11 +28,11 @@ void printKeyValues(KFileMetaInfo& info) { - QStringList l = info.preferredKeys(); + TQStringList l = info.preferredKeys(); kdDebug() << "found " << l.size() << " keys\n"; - QString s; - QStringList::Iterator it; + TQString s; + TQStringList::Iterator it; for (it = l.begin(); it!=l.end(); ++it) { s +=" - " + *it; @@ -42,23 +42,23 @@ void printKeyValues(KFileMetaInfo& info) for (it = l.begin(); it!=l.end(); ++it) { KFileMetaInfoItem item = info.item(*it); - if ( item.isValid() && item.value().canCast(QVariant::String)) { + if ( item.isValid() && item.value().canCast(TQVariant::String)) { kdDebug() << item.key() << "(" << item.translatedKey() << ") -> " << item.string() << endl; } } } -void printMimeTypeInfo(QString mimetype) +void printMimeTypeInfo(TQString mimetype) { const KFileMimeTypeInfo* info = KFileMetaInfoProvider::self()->mimeTypeInfo(mimetype); if (!info) return; kdDebug() << "Preferred groups:\n"; kdDebug() << "=================\n"; - QStringList groups = info->preferredGroups(); + TQStringList groups = info->preferredGroups(); - for (QStringList::Iterator it=groups.begin() ; it!=groups.end(); ++it) + for (TQStringList::Iterator it=groups.begin() ; it!=groups.end(); ++it) { kdDebug() << *it << endl; } @@ -67,12 +67,12 @@ void printMimeTypeInfo(QString mimetype) kdDebug() << "Supported groups:\n"; kdDebug() << "=================\n"; groups = info->supportedGroups(); - for (QStringList::Iterator it=groups.begin() ; it!=groups.end(); ++it) + for (TQStringList::Iterator it=groups.begin() ; it!=groups.end(); ++it) { kdDebug() << *it << endl; } - for (QStringList::Iterator it=groups.begin() ; it!=groups.end(); ++it) + for (TQStringList::Iterator it=groups.begin() ; it!=groups.end(); ++it) { const KFileMimeTypeInfo::GroupInfo* groupinfo = info->groupInfo(*it); @@ -84,16 +84,16 @@ void printMimeTypeInfo(QString mimetype) kdDebug() << endl; kdDebug() << " Supported keys:\n"; - QStringList keys = groupinfo->supportedKeys(); + TQStringList keys = groupinfo->supportedKeys(); if (!keys.count()) kdDebug() << " none\n"; - for (QStringList::Iterator kit=keys.begin(); kit!=keys.end(); ++kit) + for (TQStringList::Iterator kit=keys.begin(); kit!=keys.end(); ++kit) { kdDebug() << " " << *kit << endl; const KFileMimeTypeInfo::ItemInfo* iti = groupinfo->itemInfo(*kit); kdDebug() << " Key: " << iti->key() << endl; kdDebug() << " Translated: " << iti->key() << endl; - kdDebug() << " Type: " << QVariant::typeToName(iti->type()) << endl; + kdDebug() << " Type: " << TQVariant::typeToName(iti->type()) << endl; kdDebug() << " Unit: " << iti->unit() << endl; kdDebug() << " Hint: " << iti->hint() << endl; kdDebug() << " Attributes: " << iti->attributes() << endl; @@ -108,16 +108,16 @@ void printMimeTypeInfo(QString mimetype) if (groupinfo->supportsVariableKeys()) { const KFileMimeTypeInfo::ItemInfo* iti = groupinfo->variableItemInfo(); - kdDebug() << " variable key type/attr: " << QVariant::typeToName(iti->type()) << " / " << iti->attributes() << endl; + kdDebug() << " variable key type/attr: " << TQVariant::typeToName(iti->type()) << " / " << iti->attributes() << endl; } } kdDebug() << endl; kdDebug() << "Preferred keys:\n"; kdDebug() << "===============\n"; - QStringList prefKeys = info->preferredKeys(); + TQStringList prefKeys = info->preferredKeys(); if (!prefKeys.count()) kdDebug() << " none\n"; - for (QStringList::Iterator kit=prefKeys.begin(); kit!=prefKeys.end(); ++kit) + for (TQStringList::Iterator kit=prefKeys.begin(); kit!=prefKeys.end(); ++kit) { kdDebug() << *kit << endl; } @@ -125,21 +125,21 @@ void printMimeTypeInfo(QString mimetype) kdDebug() << endl; kdDebug() << "Supported keys:\n"; kdDebug() << "===============\n"; - QStringList supKeys = info->supportedKeys(); + TQStringList supKeys = info->supportedKeys(); if (!supKeys.count()) kdDebug() << " none\n"; - for (QStringList::Iterator kit=supKeys.begin(); kit!=supKeys.end(); ++kit) + for (TQStringList::Iterator kit=supKeys.begin(); kit!=supKeys.end(); ++kit) { kdDebug() << *kit << endl; } } -void addGroup(KFileMetaInfo& info, QString group) +void addGroup(KFileMetaInfo& info, TQString group) { kdDebug() << "trying to add group " << group << endl; kdDebug() << "groups before: \n"; - QStringList groups = info.groups(); - for (QStringList::Iterator it=groups.begin() ; it!=groups.end(); ++it) + TQStringList groups = info.groups(); + for (TQStringList::Iterator it=groups.begin() ; it!=groups.end(); ++it) kdDebug() << " " << *it << endl; if (info.addGroup(group)) @@ -157,24 +157,24 @@ void addGroup(KFileMetaInfo& info, QString group) kdDebug() << "and afterwards: \n"; groups = info.groups(); - for (QStringList::Iterator it=groups.begin() ; it!=groups.end(); ++it) + for (TQStringList::Iterator it=groups.begin() ; it!=groups.end(); ++it) kdDebug() << " " << *it << endl; } -void removeGroup(KFileMetaInfo& info, QString group) +void removeGroup(KFileMetaInfo& info, TQString group) { kdDebug() << "trying to remove group " << group << endl; kdDebug() << "groups before: \n"; - QStringList groups = info.groups(); - for (QStringList::Iterator it=groups.begin() ; it!=groups.end(); ++it) + TQStringList groups = info.groups(); + for (TQStringList::Iterator it=groups.begin() ; it!=groups.end(); ++it) kdDebug() << " " << *it << endl; info.removeGroup(group); kdDebug() << "and afterwards: \n"; groups = info.groups(); - for (QStringList::Iterator it=groups.begin() ; it!=groups.end(); ++it) + for (TQStringList::Iterator it=groups.begin() ; it!=groups.end(); ++it) kdDebug() << " " << *it << endl; } @@ -193,7 +193,7 @@ int main( int argc, char **argv ) KCmdLineArgs* args = KCmdLineArgs::parsedArgs(); - QCString ov; + TQCString ov; ov = args->getOption("mimetypeinfo"); if (ov) { @@ -203,19 +203,19 @@ int main( int argc, char **argv ) if (!args->count()) return 1; - KFileMetaInfo info( args->url(0), QString::null, KFileMetaInfo::Everything); + KFileMetaInfo info( args->url(0), TQString::null, KFileMetaInfo::Everything); if (args->isSet("groups")) { - QStringList groups = info.groups(); - for (QStringList::Iterator it=groups.begin() ; it!=groups.end(); ++it) + TQStringList groups = info.groups(); + for (TQStringList::Iterator it=groups.begin() ; it!=groups.end(); ++it) { kdDebug() << "group " << *it << endl; } return 0; } - QString group, item; + TQString group, item; ov = args->getOption("addgroup"); if (ov) addGroup(info, ov); @@ -254,7 +254,7 @@ int main( int argc, char **argv ) ov = args->getOption("set"); if (ov && !group.isNull() && !item.isNull()) { - if (info[group][item].setValue(QString(ov))) + if (info[group][item].setValue(TQString(ov))) kdDebug() << "setValue success\n"; else kdDebug() << "setValue failed\n"; @@ -272,7 +272,7 @@ int main( int argc, char **argv ) if (args->isSet("validator") && !group.isNull() && !item.isNull()) { const KFileMimeTypeInfo* kfmti = KFileMetaInfoProvider::self()->mimeTypeInfo(info.mimeType()); - QValidator* v = kfmti->createValidator(group, item); + TQValidator* v = kfmti->createValidator(group, item); if (!v) kdDebug() << "got no validator\n"; else @@ -306,11 +306,11 @@ int main( int argc, char **argv ) kdDebug() << "type of thumbnail is " << thumbitem.value().typeName() << endl; - if (thumbitem.isValid() && thumbitem.value().canCast(QVariant::Image)) + if (thumbitem.isValid() && thumbitem.value().canCast(TQVariant::Image)) { - QLabel* label = new QLabel(0); + TQLabel* label = new TQLabel(0); app.setMainWidget(label); - QPixmap pix; + TQPixmap pix; pix.convertFromImage(thumbitem.value().toImage()); label->setPixmap(pix); label->show(); diff --git a/kio/tests/netaccesstest.cpp b/kio/tests/netaccesstest.cpp index 6ac85fcfc..9fb0ff07a 100644 --- a/kio/tests/netaccesstest.cpp +++ b/kio/tests/netaccesstest.cpp @@ -20,7 +20,7 @@ #include <kdebug.h> #include <kurl.h> #include <kio/netaccess.h> -#include <qfile.h> +#include <tqfile.h> int main(int argc, char **argv) { @@ -34,7 +34,7 @@ int main(int argc, char **argv) if ( !KIO::NetAccess::file_copy(srcURL, tmpURL, -1, true, false, 0) ) kdError() << "file_copy failed: " << KIO::NetAccess::lastErrorString() << endl; else { - QFile f( tmpURL.path() ); + TQFile f( tmpURL.path() ); if (!f.open(IO_ReadOnly)) kdFatal() << "Cannot open: " << f.name() << ". The error was: " << f.errorString() << endl; else { diff --git a/kio/tests/previewtest.cpp b/kio/tests/previewtest.cpp index 66fa9398e..f2b740224 100644 --- a/kio/tests/previewtest.cpp +++ b/kio/tests/previewtest.cpp @@ -1,7 +1,7 @@ -#include <qlabel.h> -#include <qlayout.h> -#include <qpushbutton.h> +#include <tqlabel.h> +#include <tqlayout.h> +#include <tqpushbutton.h> #include <kapplication.h> #include <kdebug.h> @@ -12,16 +12,16 @@ #include "previewtest.moc" PreviewTest::PreviewTest() - :QWidget() + :TQWidget() { - QGridLayout *layout = new QGridLayout(this, 2, 2); + TQGridLayout *layout = new TQGridLayout(this, 2, 2); m_url = new KLineEdit(this); m_url->setText("/home/malte/gore_bush.jpg"); layout->addWidget(m_url, 0, 0); - QPushButton *btn = new QPushButton("Generate", this); - connect(btn, SIGNAL(clicked()), SLOT(slotGenerate())); + TQPushButton *btn = new TQPushButton("Generate", this); + connect(btn, TQT_SIGNAL(clicked()), TQT_SLOT(slotGenerate())); layout->addWidget(btn, 0, 1); - m_preview = new QLabel(this); + m_preview = new TQLabel(this); m_preview->setMinimumSize(400, 300); layout->addMultiCellWidget(m_preview, 1, 1, 0, 1); } @@ -31,9 +31,9 @@ void PreviewTest::slotGenerate() KURL::List urls; urls.append(m_url->text()); KIO::PreviewJob *job = KIO::filePreview(urls, m_preview->width(), m_preview->height(), true, 48); - connect(job, SIGNAL(result(KIO::Job*)), SLOT(slotResult(KIO::Job*))); - connect(job, SIGNAL(gotPreview(const KFileItem *, const QPixmap &)), SLOT(slotPreview(const KFileItem *, const QPixmap &))); - connect(job, SIGNAL(failed(const KFileItem *)), SLOT(slotFailed())); + connect(job, TQT_SIGNAL(result(KIO::Job*)), TQT_SLOT(slotResult(KIO::Job*))); + connect(job, TQT_SIGNAL(gotPreview(const KFileItem *, const TQPixmap &)), TQT_SLOT(slotPreview(const KFileItem *, const TQPixmap &))); + connect(job, TQT_SIGNAL(failed(const KFileItem *)), TQT_SLOT(slotFailed())); } void PreviewTest::slotResult(KIO::Job*) @@ -41,7 +41,7 @@ void PreviewTest::slotResult(KIO::Job*) kdDebug() << "PreviewTest::slotResult(...)" << endl; } -void PreviewTest::slotPreview(const KFileItem *, const QPixmap &pix) +void PreviewTest::slotPreview(const KFileItem *, const TQPixmap &pix) { kdDebug() << "PreviewTest::slotPreview()" << endl; m_preview->setPixmap(pix); diff --git a/kio/tests/previewtest.h b/kio/tests/previewtest.h index 52c10f240..99b329f9d 100644 --- a/kio/tests/previewtest.h +++ b/kio/tests/previewtest.h @@ -1,5 +1,5 @@ -#include <qwidget.h> +#include <tqwidget.h> #include <kio/job.h> class KLineEdit; @@ -15,11 +15,11 @@ public: private slots: void slotGenerate(); void slotResult(KIO::Job *); - void slotPreview( const KFileItem *, const QPixmap & ); + void slotPreview( const KFileItem *, const TQPixmap & ); void slotFailed(); private: KLineEdit *m_url; - QLabel *m_preview; + TQLabel *m_preview; }; diff --git a/kio/tests/speed.cpp b/kio/tests/speed.cpp index fc7128f35..d8ddae20a 100644 --- a/kio/tests/speed.cpp +++ b/kio/tests/speed.cpp @@ -22,20 +22,20 @@ #include "speed.h" #include <kio/job.h> #include <kcmdlineargs.h> -#include <qdir.h> +#include <tqdir.h> #include <kio/global.h> using namespace KIO; SpeedTest::SpeedTest( const KURL & url ) - : QObject(0, "speed") + : TQObject(0, "speed") { Job *job = listRecursive( url ); - //Job *job = del( KURL("file:" + QDir::currentDirPath()) ); DANGEROUS ! - connect(job, SIGNAL( result( KIO::Job*)), - SLOT( finished( KIO::Job* ) )); - /*connect(job, SIGNAL( entries( KIO::Job*, const KIO::UDSEntryList&)), - SLOT( entries( KIO::Job*, const KIO::UDSEntryList&))); + //Job *job = del( KURL("file:" + TQDir::currentDirPath()) ); DANGEROUS ! + connect(job, TQT_SIGNAL( result( KIO::Job*)), + TQT_SLOT( finished( KIO::Job* ) )); + /*connect(job, TQT_SIGNAL( entries( KIO::Job*, const KIO::UDSEntryList&)), + TQT_SLOT( entries( KIO::Job*, const KIO::UDSEntryList&))); */ } @@ -77,11 +77,11 @@ int main(int argc, char **argv) { if ( args->count() == 1 ) url = args->url(0); else - url = "file:" + QDir::currentDirPath(); + url = "file:" + TQDir::currentDirPath(); kdDebug() << url.url() << " is probably " << (KIO::probably_slow_mounted(url.path()) ? "slow" : "normal") << " mounted\n"; kdDebug() << url.url() << " is " << (KIO::manually_mounted(url.path()) ? "manually" : "system") << " mounted\n"; - QString mp = KIO::findDeviceMountPoint(url.path()); + TQString mp = KIO::findDeviceMountPoint(url.path()); if (mp.isEmpty()) { kdDebug() << "no mount point for device " << url.url() << " found\n"; } else @@ -103,7 +103,7 @@ int main(int argc, char **argv) { // SpeedTest test( url ); // app.exec(); - url.setPath(QDir::homeDirPath()); + url.setPath(TQDir::homeDirPath()); mp = KIO::findPathMountPoint(url.path()); if (mp.isEmpty()) { @@ -124,7 +124,7 @@ int main(int argc, char **argv) { if ( args->count() == 1 ) url = args->url(0); else - url = "file:" + QDir::currentDirPath(); + url = "file:" + TQDir::currentDirPath(); mp = KIO::findPathMountPoint(url.path()); if (mp.isEmpty()) { diff --git a/kio/tests/speed.h b/kio/tests/speed.h index e66970f0f..69b12465f 100644 --- a/kio/tests/speed.h +++ b/kio/tests/speed.h @@ -9,7 +9,7 @@ namespace KIO { class Job; } -class SpeedTest : public QObject { +class SpeedTest : public TQObject { Q_OBJECT public: |