summaryrefslogtreecommitdiffstats
path: root/kio/tests/jobtest.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:46:43 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:46:43 +0000
commitffe8a83e053396df448e9413828527613ca3bd46 (patch)
treea73d4169e02df4a50f9a12cb165fcd0ab5bac7c6 /kio/tests/jobtest.cpp
parent682bf3bfdcbcbb1fca85e8a36ed03e062e0555d5 (diff)
downloadtdelibs-ffe8a83e053396df448e9413828527613ca3bd46.tar.gz
tdelibs-ffe8a83e053396df448e9413828527613ca3bd46.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdelibs@1157647 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kio/tests/jobtest.cpp')
-rw-r--r--kio/tests/jobtest.cpp248
1 files changed, 124 insertions, 124 deletions
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;