summaryrefslogtreecommitdiffstats
path: root/kio/tests
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2013-01-25 00:35:07 -0600
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2013-01-25 00:35:07 -0600
commit703fb0c89c2eee56a1e613e67a446db9d4287929 (patch)
treedd8c5ca66075cd89c2638a2b48cf78386a9870a7 /kio/tests
parent818e7abec3d5d3809b6b77293558678371c16b71 (diff)
downloadtdelibs-703fb0c89c2eee56a1e613e67a446db9d4287929.tar.gz
tdelibs-703fb0c89c2eee56a1e613e67a446db9d4287929.zip
Rename KCModule, KConfig, KIO, KServer, and KSocket to avoid conflicts with KDE4
Diffstat (limited to 'kio/tests')
-rw-r--r--kio/tests/dataprotocoltest.cpp12
-rw-r--r--kio/tests/jobtest.cpp84
-rw-r--r--kio/tests/jobtest.h6
-rw-r--r--kio/tests/kdefaultprogresstest.cpp2
-rw-r--r--kio/tests/kdirlistertest.cpp8
-rw-r--r--kio/tests/kdirlistertest.h4
-rw-r--r--kio/tests/kionetrctest.cpp4
-rw-r--r--kio/tests/kiopassdlgtest.cpp2
-rw-r--r--kio/tests/kioslavetest.cpp102
-rw-r--r--kio/tests/kioslavetest.h16
-rw-r--r--kio/tests/kpropsdlgtest.cpp2
-rw-r--r--kio/tests/kurifiltertest.cpp2
-rw-r--r--kio/tests/netaccesstest.cpp4
-rw-r--r--kio/tests/previewtest.cpp6
-rw-r--r--kio/tests/previewtest.h2
-rw-r--r--kio/tests/speed.cpp30
-rw-r--r--kio/tests/speed.h6
17 files changed, 146 insertions, 146 deletions
diff --git a/kio/tests/dataprotocoltest.cpp b/kio/tests/dataprotocoltest.cpp
index 0c8470a61..dfacd92e4 100644
--- a/kio/tests/dataprotocoltest.cpp
+++ b/kio/tests/dataprotocoltest.cpp
@@ -39,7 +39,7 @@ public:
testStrings("MIME Type: ",mime_type_expected,type);
}
- void totalSize(KIO::filesize_t bytes) {
+ void totalSize(TDEIO::filesize_t bytes) {
// cout << "content size: " << bytes << " bytes" << endl;
}
@@ -47,7 +47,7 @@ public:
// meta_data[key] = value;
// cout << "§ " << key << " = " << value << endl;
TQString prefix = "Metadata[\""+key+"\"]: ";
- KIO::MetaData::Iterator it = attributes_expected.find(key);
+ TDEIO::MetaData::Iterator it = attributes_expected.find(key);
if (it != attributes_expected.end()) {
testStrings(prefix,it.data(),value);
// remove key from map
@@ -60,8 +60,8 @@ public:
void sendMetaData() {
// check here if attributes_expected contains any excess keys
- KIO::MetaData::ConstIterator it = attributes_expected.begin();
- KIO::MetaData::ConstIterator end = attributes_expected.end();
+ TDEIO::MetaData::ConstIterator it = attributes_expected.begin();
+ TDEIO::MetaData::ConstIterator end = attributes_expected.end();
for (; it != end; ++it) {
cout << endl << "Metadata[\"" << it.key()
<< "\"] was expected but not defined";
@@ -93,7 +93,7 @@ private:
// -- testcase related members
TQString mime_type_expected; // expected mime type
/** contains all attributes and values the testcase has to set */
- KIO::MetaData attributes_expected;
+ TDEIO::MetaData attributes_expected;
/** contains the content as it is expected to be returned */
TQByteArray content_expected;
int passed; // # of passed tests
@@ -150,7 +150,7 @@ public:
/**
* sets all attribute-value pairs the testcase must deliver.
*/
- void setExpectedAttributes(const KIO::MetaData &attres) {
+ void setExpectedAttributes(const TDEIO::MetaData &attres) {
attributes_expected = attres;
}
diff --git a/kio/tests/jobtest.cpp b/kio/tests/jobtest.cpp
index cd9a99bb8..a0da57244 100644
--- a/kio/tests/jobtest.cpp
+++ b/kio/tests/jobtest.cpp
@@ -135,9 +135,9 @@ void JobTest::runAll()
void JobTest::cleanup()
{
- KIO::NetAccess::del( homeTmpDir(), 0 );
- KIO::NetAccess::del( otherTmpDir(), 0 );
- KIO::NetAccess::del( systemTmpDir(), 0 );
+ TDEIO::NetAccess::del( homeTmpDir(), 0 );
+ TDEIO::NetAccess::del( otherTmpDir(), 0 );
+ TDEIO::NetAccess::del( systemTmpDir(), 0 );
}
static void setTimeStamp( const TQString& path )
@@ -194,19 +194,19 @@ void JobTest::get()
createTestFile( filePath );
KURL u; u.setPath( filePath );
m_result = -1;
- KIO::StoredTransferJob* job = KIO::storedGet( u );
- connect( job, TQT_SIGNAL( result( KIO::Job* ) ),
- this, TQT_SLOT( slotGetResult( KIO::Job* ) ) );
+ TDEIO::StoredTransferJob* job = TDEIO::storedGet( u );
+ connect( job, TQT_SIGNAL( result( TDEIO::Job* ) ),
+ this, TQT_SLOT( slotGetResult( TDEIO::Job* ) ) );
kapp->eventLoop()->enterLoop();
assert( m_result == 0 ); // no error
assert( m_data.size() == 11 );
assert( TQCString( m_data ) == "Hello world" );
}
-void JobTest::slotGetResult( KIO::Job* job )
+void JobTest::slotGetResult( TDEIO::Job* job )
{
m_result = job->error();
- m_data = static_cast<KIO::StoredTransferJob *>(job)->data();
+ m_data = static_cast<TDEIO::StoredTransferJob *>(job)->data();
kapp->eventLoop()->exitLoop();
}
@@ -220,7 +220,7 @@ void JobTest::copyLocalFile( const TQString& src, const TQString& dest )
d.setPath( dest );
// copy the file with file_copy
- bool ok = KIO::NetAccess::file_copy( u, d );
+ bool ok = TDEIO::NetAccess::file_copy( u, d );
assert( ok );
assert( TQFile::exists( dest ) );
assert( TQFile::exists( src ) ); // still there
@@ -234,9 +234,9 @@ void JobTest::copyLocalFile( const TQString& src, const TQString& dest )
assert( srcInfo.lastModified() == destInfo.lastModified() );
}
- // cleanup and retry with KIO::copy()
+ // cleanup and retry with TDEIO::copy()
TQFile::remove( dest );
- ok = KIO::NetAccess::dircopy( u, d, 0 );
+ ok = TDEIO::NetAccess::dircopy( u, d, 0 );
assert( ok );
assert( TQFile::exists( dest ) );
assert( TQFile::exists( src ) ); // still there
@@ -262,7 +262,7 @@ void JobTest::copyLocalDirectory( const TQString& src, const TQString& _dest, in
else
assert( !TQFile::exists( dest ) );
- bool ok = KIO::NetAccess::dircopy( u, d, 0 );
+ bool ok = TDEIO::NetAccess::dircopy( u, d, 0 );
assert( ok );
if ( flags & AlreadyExists ) {
@@ -341,13 +341,13 @@ void JobTest::moveLocalFile( const TQString& src, const TQString& dest )
d.setPath( dest );
// move the file with file_move
- bool ok = KIO::NetAccess::file_move( u, d );
+ bool ok = TDEIO::NetAccess::file_move( u, d );
assert( ok );
assert( TQFile::exists( dest ) );
assert( !TQFile::exists( src ) ); // not there anymore
- // move it back with KIO::move()
- ok = KIO::NetAccess::move( d, u, 0 );
+ // move it back with TDEIO::move()
+ ok = TDEIO::NetAccess::move( d, u, 0 );
assert( ok );
assert( !TQFile::exists( dest ) );
assert( TQFile::exists( src ) ); // it's back
@@ -363,15 +363,15 @@ static void moveLocalSymlink( const TQString& src, const TQString& dest )
d.setPath( dest );
// move the symlink with move, NOT with file_move
- bool ok = KIO::NetAccess::move( u, d );
+ bool ok = TDEIO::NetAccess::move( u, d );
if ( !ok )
- kdWarning() << KIO::NetAccess::lastError() << endl;
+ kdWarning() << TDEIO::NetAccess::lastError() << endl;
assert( ok );
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 );
+ // move it back with TDEIO::move()
+ ok = TDEIO::NetAccess::move( d, u, 0 );
assert( ok );
assert ( KDE_lstat( TQFile::encodeName( dest ), &buf ) != 0 ); // doesn't exist anymore
assert ( KDE_lstat( TQFile::encodeName( src ), &buf ) == 0 ); // it's back
@@ -388,7 +388,7 @@ void JobTest::moveLocalDirectory( const TQString& src, const TQString& dest )
KURL d;
d.setPath( dest );
- bool ok = KIO::NetAccess::move( u, d, 0 );
+ bool ok = TDEIO::NetAccess::move( u, d, 0 );
assert( ok );
assert( TQFile::exists( dest ) );
assert( TQFileInfo( dest ).isDir() );
@@ -455,12 +455,12 @@ void JobTest::moveFileNoPermissions()
KURL d;
d.setPath( dest );
- KIO::CopyJob* job = KIO::move( u, d, 0 );
+ TDEIO::CopyJob* job = TDEIO::move( u, d, 0 );
job->setInteractive( false ); // no skip dialog, thanks
TQMap<TQString, TQString> metaData;
- bool ok = KIO::NetAccess::synchronousRun( job, 0, 0, 0, &metaData );
+ bool ok = TDEIO::NetAccess::synchronousRun( job, 0, 0, 0, &metaData );
assert( !ok );
- assert( KIO::NetAccess::lastError() == KIO::ERR_ACCESS_DENIED );
+ assert( TDEIO::NetAccess::lastError() == TDEIO::ERR_ACCESS_DENIED );
// OK this is fishy. Just like mv(1), KIO's behavior depends on whether
// a direct rename(2) was used, or a full copy+del. In the first case
// there is no destination file created, but in the second case the
@@ -482,12 +482,12 @@ void JobTest::moveDirectoryNoPermissions()
KURL d;
d.setPath( dest );
- KIO::CopyJob* job = KIO::move( u, d, 0 );
+ TDEIO::CopyJob* job = TDEIO::move( u, d, 0 );
job->setInteractive( false ); // no skip dialog, thanks
TQMap<TQString, TQString> metaData;
- bool ok = KIO::NetAccess::synchronousRun( job, 0, 0, 0, &metaData );
+ bool ok = TDEIO::NetAccess::synchronousRun( job, 0, 0, 0, &metaData );
assert( !ok );
- assert( KIO::NetAccess::lastError() == KIO::ERR_ACCESS_DENIED );
+ assert( TDEIO::NetAccess::lastError() == TDEIO::ERR_ACCESS_DENIED );
assert( TQFile::exists( dest ) ); // see moveFileNoPermissions
assert( TQFile::exists( src ) );
}
@@ -497,10 +497,10 @@ void JobTest::listRecursive()
const TQString src = homeTmpDir();
KURL u;
u.setPath( src );
- KIO::ListJob* job = KIO::listRecursive( u );
- 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 );
+ TDEIO::ListJob* job = TDEIO::listRecursive( u );
+ connect( job, TQT_SIGNAL( entries( TDEIO::Job*, const TDEIO::UDSEntryList& ) ),
+ TQT_SLOT( slotEntries( TDEIO::Job*, const TDEIO::UDSEntryList& ) ) );
+ bool ok = TDEIO::NetAccess::synchronousRun( job, 0 );
assert( ok );
m_names.sort();
check( "listRecursive", m_names.join( "," ), ".,..,"
@@ -510,18 +510,18 @@ void JobTest::listRecursive()
"fileFromHome,fileFromHome_copied" );
}
-void JobTest::slotEntries( KIO::Job*, const KIO::UDSEntryList& lst )
+void JobTest::slotEntries( TDEIO::Job*, const TDEIO::UDSEntryList& lst )
{
- for( KIO::UDSEntryList::ConstIterator it = lst.begin(); it != lst.end(); ++it ) {
- KIO::UDSEntry::ConstIterator it2 = (*it).begin();
+ for( TDEIO::UDSEntryList::ConstIterator it = lst.begin(); it != lst.end(); ++it ) {
+ TDEIO::UDSEntry::ConstIterator it2 = (*it).begin();
TQString displayName;
KURL url;
for( ; it2 != (*it).end(); it2++ ) {
switch ((*it2).m_uds) {
- case KIO::UDS_NAME:
+ case TDEIO::UDS_NAME:
displayName = (*it2).m_str;
break;
- case KIO::UDS_URL:
+ case TDEIO::UDS_URL:
url = (*it2).m_str;
break;
}
@@ -564,10 +564,10 @@ void JobTest::copyFileToSystem( bool resolve_local_urls )
kdDebug() << "copying " << u << " to " << d << endl;
// copy the file with file_copy
- KIO::FileCopyJob* job = KIO::file_copy( u, d );
- connect( job, TQT_SIGNAL(mimetype(KIO::Job*,const TQString&)),
- this, TQT_SLOT(slotMimetype(KIO::Job*,const TQString&)) );
- bool ok = KIO::NetAccess::synchronousRun( job, 0 );
+ TDEIO::FileCopyJob* job = TDEIO::file_copy( u, d );
+ connect( job, TQT_SIGNAL(mimetype(TDEIO::Job*,const TQString&)),
+ this, TQT_SLOT(slotMimetype(TDEIO::Job*,const TQString&)) );
+ bool ok = TDEIO::NetAccess::synchronousRun( job, 0 );
assert( ok );
TQString dest = realSystemPath() + "fileFromHome_copied";
@@ -587,9 +587,9 @@ void JobTest::copyFileToSystem( bool resolve_local_urls )
assert( m_mimetype == "application/octet-stream" );
//assert( m_mimetype == "text/plain" );
- // cleanup and retry with KIO::copy()
+ // cleanup and retry with TDEIO::copy()
TQFile::remove( dest );
- ok = KIO::NetAccess::dircopy( u, d, 0 );
+ ok = TDEIO::NetAccess::dircopy( u, d, 0 );
assert( ok );
assert( TQFile::exists( dest ) );
assert( TQFile::exists( src ) ); // still there
@@ -604,7 +604,7 @@ void JobTest::copyFileToSystem( bool resolve_local_urls )
kio_resolve_local_urls = true;
}
-void JobTest::slotMimetype(KIO::Job* job, const TQString& type)
+void JobTest::slotMimetype(TDEIO::Job* job, const TQString& type)
{
assert( job );
m_mimetype = type;
diff --git a/kio/tests/jobtest.h b/kio/tests/jobtest.h
index 83ec2da7c..61051fbaf 100644
--- a/kio/tests/jobtest.h
+++ b/kio/tests/jobtest.h
@@ -54,9 +54,9 @@ public:
void copyFileToSystem();
private slots:
- void slotEntries( KIO::Job*, const KIO::UDSEntryList& lst );
- void slotGetResult( KIO::Job* );
- void slotMimetype(KIO::Job*,const TQString&);
+ void slotEntries( TDEIO::Job*, const TDEIO::UDSEntryList& lst );
+ void slotGetResult( TDEIO::Job* );
+ void slotMimetype(TDEIO::Job*,const TQString&);
private:
TQString homeTmpDir() const;
diff --git a/kio/tests/kdefaultprogresstest.cpp b/kio/tests/kdefaultprogresstest.cpp
index e62408204..79ad44e3c 100644
--- a/kio/tests/kdefaultprogresstest.cpp
+++ b/kio/tests/kdefaultprogresstest.cpp
@@ -3,7 +3,7 @@
#include <kurl.h>
#include <kdebug.h>
-using namespace KIO;
+using namespace TDEIO;
int main(int argc, char **argv)
{
diff --git a/kio/tests/kdirlistertest.cpp b/kio/tests/kdirlistertest.cpp
index 01d0a36e9..000fb200c 100644
--- a/kio/tests/kdirlistertest.cpp
+++ b/kio/tests/kdirlistertest.cpp
@@ -82,10 +82,10 @@ KDirListerTest::KDirListerTest( TQWidget *parent, const char *name )
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( totalSize( TDEIO::filesize_t ) ),
+ debug, TQT_SLOT( totalSize( TDEIO::filesize_t ) ) );
+ connect( lister, TQT_SIGNAL( processedSize( TDEIO::filesize_t ) ),
+ debug, TQT_SLOT( processedSize( TDEIO::filesize_t ) ) );
connect( lister, TQT_SIGNAL( speed( int ) ),
debug, TQT_SLOT( speed( int ) ) );
diff --git a/kio/tests/kdirlistertest.h b/kio/tests/kdirlistertest.h
index 12e72c911..065f7478d 100644
--- a/kio/tests/kdirlistertest.h
+++ b/kio/tests/kdirlistertest.h
@@ -88,10 +88,10 @@ public slots:
void percent( int percent )
{ cout << "*** percent: " << percent << endl; }
- void totalSize( KIO::filesize_t size )
+ void totalSize( TDEIO::filesize_t size )
{ cout << "*** totalSize: " << (long)size << endl; }
- void processedSize( KIO::filesize_t size )
+ void processedSize( TDEIO::filesize_t size )
{ cout << "*** processedSize: " << (long)size << endl; }
void speed( int bytes_per_second )
diff --git a/kio/tests/kionetrctest.cpp b/kio/tests/kionetrctest.cpp
index 82c669c74..2d96c8495 100644
--- a/kio/tests/kionetrctest.cpp
+++ b/kio/tests/kionetrctest.cpp
@@ -8,8 +8,8 @@
void output( const KURL& u )
{
kdDebug() << "Looking up auto login for: " << u.url() << endl;
- KIO::NetRC::AutoLogin l;
- bool result = KIO::NetRC::self()->lookup( u, l, true );
+ TDEIO::NetRC::AutoLogin l;
+ bool result = TDEIO::NetRC::self()->lookup( u, l, true );
if ( !result )
{
kdDebug() << "Either no .netrc and/or .kionetrc file was "
diff --git a/kio/tests/kiopassdlgtest.cpp b/kio/tests/kiopassdlgtest.cpp
index 2bbdaa658..adb14a306 100644
--- a/kio/tests/kiopassdlgtest.cpp
+++ b/kio/tests/kiopassdlgtest.cpp
@@ -15,7 +15,7 @@ int main ( int argc, char** argv )
TQString usr, pass, comment, label;
label = "Site:";
comment = "<b>localhost</b>";
- int res = KIO::PasswordDialog::getNameAndPassword( usr, pass, 0L,
+ int res = TDEIO::PasswordDialog::getNameAndPassword( usr, pass, 0L,
TQString::null, false,
TQString::null, comment,
label );
diff --git a/kio/tests/kioslavetest.cpp b/kio/tests/kioslavetest.cpp
index 72a7ffb05..27a99eabc 100644
--- a/kio/tests/kioslavetest.cpp
+++ b/kio/tests/kioslavetest.cpp
@@ -26,7 +26,7 @@
#include "kioslavetest.h"
-using namespace KIO;
+using namespace TDEIO;
KioslaveTest::KioslaveTest( TQString src, TQString dest, uint op, uint pr )
: KMainWindow(0, "")
@@ -165,10 +165,10 @@ KioslaveTest::KioslaveTest( TQString src, TQString dest, uint op, uint pr )
setCentralWidget( main_widget );
slave = 0;
-// slave = KIO::Scheduler::getConnectedSlave(KURL("ftp://ftp.kde.org"));
- KIO::Scheduler::connect(TQT_SIGNAL(slaveConnected(KIO::Slave*)),
+// slave = TDEIO::Scheduler::getConnectedSlave(KURL("ftp://ftp.kde.org"));
+ TDEIO::Scheduler::connect(TQT_SIGNAL(slaveConnected(TDEIO::Slave*)),
this, TQT_SLOT(slotSlaveConnected()));
- KIO::Scheduler::connect(TQT_SIGNAL(slaveError(KIO::Slave*,int,const TQString&)),
+ TDEIO::Scheduler::connect(TQT_SIGNAL(slaveError(TDEIO::Slave*,int,const TQString&)),
this, TQT_SLOT(slotSlaveError()));
}
@@ -183,7 +183,7 @@ void KioslaveTest::slotQuit(){
job->kill( true ); // kill the job quietly
}
if (slave)
- KIO::Scheduler::disconnectSlave(slave);
+ TDEIO::Scheduler::disconnectSlave(slave);
kapp->quit();
}
@@ -241,70 +241,70 @@ void KioslaveTest::startJob() {
switch ( selectedOperation ) {
case List:
- myJob = KIO::listDir( src );
- connect(myJob, TQT_SIGNAL( entries( KIO::Job*, const KIO::UDSEntryList&)),
- TQT_SLOT( slotEntries( KIO::Job*, const KIO::UDSEntryList&)));
+ myJob = TDEIO::listDir( src );
+ connect(myJob, TQT_SIGNAL( entries( TDEIO::Job*, const TDEIO::UDSEntryList&)),
+ TQT_SLOT( slotEntries( TDEIO::Job*, const TDEIO::UDSEntryList&)));
break;
case ListRecursive:
- myJob = KIO::listRecursive( src );
- connect(myJob, TQT_SIGNAL( entries( KIO::Job*, const KIO::UDSEntryList&)),
- TQT_SLOT( slotEntries( KIO::Job*, const KIO::UDSEntryList&)));
+ myJob = TDEIO::listRecursive( src );
+ connect(myJob, TQT_SIGNAL( entries( TDEIO::Job*, const TDEIO::UDSEntryList&)),
+ TQT_SLOT( slotEntries( TDEIO::Job*, const TDEIO::UDSEntryList&)));
break;
case Stat:
- myJob = KIO::stat( src, false, 2 );
+ myJob = TDEIO::stat( src, false, 2 );
break;
case Get:
- myJob = KIO::get( src, true );
- connect(myJob, TQT_SIGNAL( data( KIO::Job*, const TQByteArray &)),
- TQT_SLOT( slotData( KIO::Job*, const TQByteArray &)));
+ myJob = TDEIO::get( src, true );
+ connect(myJob, TQT_SIGNAL( data( TDEIO::Job*, const TQByteArray &)),
+ TQT_SLOT( slotData( TDEIO::Job*, const TQByteArray &)));
break;
case Put:
putBuffer = 0;
- myJob = KIO::put( src, -1, true, false);
- connect(myJob, TQT_SIGNAL( dataReq( KIO::Job*, TQByteArray &)),
- TQT_SLOT( slotDataReq( KIO::Job*, TQByteArray &)));
+ myJob = TDEIO::put( src, -1, true, false);
+ connect(myJob, TQT_SIGNAL( dataReq( TDEIO::Job*, TQByteArray &)),
+ TQT_SLOT( slotDataReq( TDEIO::Job*, TQByteArray &)));
break;
case Copy:
- job = KIO::copy( src, dest, observe );
+ job = TDEIO::copy( src, dest, observe );
break;
case Move:
- job = KIO::move( src, dest, observe );
+ job = TDEIO::move( src, dest, observe );
break;
case Delete:
- job = KIO::del( src, false, observe );
+ job = TDEIO::del( src, false, observe );
break;
case Shred:
- job = KIO::del(src, true, observe);
+ job = TDEIO::del(src, true, observe);
break;
case Mkdir:
- myJob = KIO::mkdir( src );
+ myJob = TDEIO::mkdir( src );
break;
case Mimetype:
- myJob = KIO::mimetype( src );
+ myJob = TDEIO::mimetype( src );
break;
}
if (myJob)
{
if (slave)
- KIO::Scheduler::assignJobToSlave(slave, myJob);
+ TDEIO::Scheduler::assignJobToSlave(slave, myJob);
job = myJob;
}
- connect( job, TQT_SIGNAL( result( KIO::Job * ) ),
- TQT_SLOT( slotResult( KIO::Job * ) ) );
+ connect( job, TQT_SIGNAL( result( TDEIO::Job * ) ),
+ TQT_SLOT( slotResult( TDEIO::Job * ) ) );
- connect( job, TQT_SIGNAL( canceled( KIO::Job * ) ),
- TQT_SLOT( slotResult( KIO::Job * ) ) );
+ connect( job, TQT_SIGNAL( canceled( TDEIO::Job * ) ),
+ TQT_SLOT( slotResult( TDEIO::Job * ) ) );
if (progressMode == ProgressStatus) {
statusProgress->setJob( job );
@@ -314,7 +314,7 @@ void KioslaveTest::startJob() {
}
-void KioslaveTest::slotResult( KIO::Job * _job )
+void KioslaveTest::slotResult( TDEIO::Job * _job )
{
if ( _job->error() )
{
@@ -322,12 +322,12 @@ void KioslaveTest::slotResult( KIO::Job * _job )
}
else if ( selectedOperation == Stat )
{
- UDSEntry entry = ((KIO::StatJob*)_job)->statResult();
+ UDSEntry entry = ((TDEIO::StatJob*)_job)->statResult();
printUDSEntry( entry );
}
else if ( selectedOperation == Mimetype )
{
- kdDebug() << "mimetype is " << ((KIO::MimetypeJob*)_job)->mimetype() << endl;
+ kdDebug() << "mimetype is " << ((TDEIO::MimetypeJob*)_job)->mimetype() << endl;
}
if (job == _job)
@@ -357,62 +357,62 @@ static void printACL( const TQString& acl )
}
-void KioslaveTest::printUDSEntry( const KIO::UDSEntry & entry )
+void KioslaveTest::printUDSEntry( const TDEIO::UDSEntry & entry )
{
- KIO::UDSEntry::ConstIterator it = entry.begin();
+ TDEIO::UDSEntry::ConstIterator it = entry.begin();
for( ; it != entry.end(); it++ ) {
switch ((*it).m_uds) {
- case KIO::UDS_FILE_TYPE:
+ case TDEIO::UDS_FILE_TYPE:
kdDebug() << "File Type : " << (mode_t)((*it).m_long) << endl;
if ( S_ISDIR( (mode_t)((*it).m_long) ) )
{
kdDebug() << "is a dir" << endl;
}
break;
- case KIO::UDS_ACCESS:
+ case TDEIO::UDS_ACCESS:
kdDebug() << "Access permissions : " << (*it).m_long << endl;
break;
- case KIO::UDS_EXTENDED_ACL:
+ case TDEIO::UDS_EXTENDED_ACL:
if( (*it).m_long == 1 )
kdDebug() << "Has extended ACL information." << endl;
break;
- case KIO::UDS_ACL_STRING:
+ case TDEIO::UDS_ACL_STRING:
kdDebug() << "ACL: " << ( (*it).m_str.ascii() ) << endl;
printACL( (*it).m_str );
break;
- case KIO::UDS_DEFAULT_ACL_STRING:
+ case TDEIO::UDS_DEFAULT_ACL_STRING:
kdDebug() << "Default ACL: " << ( (*it).m_str.ascii() ) << endl;
printACL( (*it).m_str );
break;
- case KIO::UDS_USER:
+ case TDEIO::UDS_USER:
kdDebug() << "User : " << ((*it).m_str.ascii() ) << endl;
break;
- case KIO::UDS_GROUP:
+ case TDEIO::UDS_GROUP:
kdDebug() << "Group : " << ((*it).m_str.ascii() ) << endl;
break;
- case KIO::UDS_NAME:
+ case TDEIO::UDS_NAME:
kdDebug() << "Name : " << ((*it).m_str.ascii() ) << endl;
//m_strText = decodeFileName( (*it).m_str );
break;
- case KIO::UDS_URL:
+ case TDEIO::UDS_URL:
kdDebug() << "URL : " << ((*it).m_str.ascii() ) << endl;
break;
- case KIO::UDS_MIME_TYPE:
+ case TDEIO::UDS_MIME_TYPE:
kdDebug() << "MimeType : " << ((*it).m_str.ascii() ) << endl;
break;
- case KIO::UDS_LINK_DEST:
+ case TDEIO::UDS_LINK_DEST:
kdDebug() << "LinkDest : " << ((*it).m_str.ascii() ) << endl;
break;
- case KIO::UDS_SIZE:
- kdDebug() << "Size: " << KIO::convertSize((*it).m_long) << endl;
+ case TDEIO::UDS_SIZE:
+ kdDebug() << "Size: " << TDEIO::convertSize((*it).m_long) << endl;
break;
}
}
}
-void KioslaveTest::slotEntries(KIO::Job* job, const KIO::UDSEntryList& list) {
+void KioslaveTest::slotEntries(TDEIO::Job* job, const TDEIO::UDSEntryList& list) {
- KURL url = static_cast<KIO::ListJob*>( job )->url();
+ KURL url = static_cast<TDEIO::ListJob*>( job )->url();
KProtocolInfo::ExtraFieldList extraFields = KProtocolInfo::extraFields(url);
UDSEntryListConstIterator it=list.begin();
for (; it != list.end(); ++it) {
@@ -433,7 +433,7 @@ void KioslaveTest::slotEntries(KIO::Job* job, const KIO::UDSEntryList& list) {
}
}
-void KioslaveTest::slotData(KIO::Job*, const TQByteArray &data)
+void KioslaveTest::slotData(TDEIO::Job*, const TQByteArray &data)
{
if (data.size() == 0)
{
@@ -445,7 +445,7 @@ void KioslaveTest::slotData(KIO::Job*, const TQByteArray &data)
}
}
-void KioslaveTest::slotDataReq(KIO::Job*, TQByteArray &data)
+void KioslaveTest::slotDataReq(TDEIO::Job*, TQByteArray &data)
{
const char *fileDataArray[] =
{
diff --git a/kio/tests/kioslavetest.h b/kio/tests/kioslavetest.h
index 02fae7f23..79533bbc5 100644
--- a/kio/tests/kioslavetest.h
+++ b/kio/tests/kioslavetest.h
@@ -41,7 +41,7 @@ protected:
void closeEvent( TQCloseEvent * );
- void printUDSEntry( const KIO::UDSEntry & entry );
+ void printUDSEntry( const TDEIO::UDSEntry & entry );
// info stuff
TQLabel *lb_from;
@@ -84,25 +84,25 @@ protected slots:
void startJob();
void stopJob();
- void slotResult( KIO::Job * );
- void slotEntries( KIO::Job *, const KIO::UDSEntryList& );
- void slotData( KIO::Job *, const TQByteArray &data );
- void slotDataReq( KIO::Job *, TQByteArray &data );
+ void slotResult( TDEIO::Job * );
+ void slotEntries( TDEIO::Job *, const TDEIO::UDSEntryList& );
+ void slotData( TDEIO::Job *, const TQByteArray &data );
+ void slotDataReq( TDEIO::Job *, TQByteArray &data );
void slotQuit();
void slotSlaveConnected();
void slotSlaveError();
private:
- KIO::Job *job;
+ TDEIO::Job *job;
TQWidget *main_widget;
- KIO::StatusbarProgress *statusProgress;
+ TDEIO::StatusbarProgress *statusProgress;
int selectedOperation;
int progressMode;
int putBuffer;
- KIO::Slave *slave;
+ TDEIO::Slave *slave;
};
#endif // _KIOSLAVETEST_H
diff --git a/kio/tests/kpropsdlgtest.cpp b/kio/tests/kpropsdlgtest.cpp
index 66b02bae0..811f03923 100644
--- a/kio/tests/kpropsdlgtest.cpp
+++ b/kio/tests/kpropsdlgtest.cpp
@@ -25,7 +25,7 @@ int main ( int argc, char** argv )
KURL u = args->url( 0 );
// This is the test for the KPropertiesDialog constructor that is now
- // documented to NOT work. Passing only a URL means a KIO::stat will happen,
+ // documented to NOT work. Passing only a URL means a TDEIO::stat will happen,
// and asking for the dialog to be modal too creates problems.
// (A non-modal, URL-only dialog is the one kicker uses for app buttons, no problem there)
KPropertiesDialog* dlg = new KPropertiesDialog( u, 0, 0, true /*modal*/, false /*we do exec ourselves*/ );
diff --git a/kio/tests/kurifiltertest.cpp b/kio/tests/kurifiltertest.cpp
index 9f4e09013..a5ed8da9d 100644
--- a/kio/tests/kurifiltertest.cpp
+++ b/kio/tests/kurifiltertest.cpp
@@ -354,7 +354,7 @@ int main(int argc, char **argv)
filter( "config", tdehome+"/share/config", KURIFilterData::LOCAL_DIR, "kshorturifilter", tdehome+"/share" );
// Clean up
- KIO::NetAccess::del( tdehome, 0 );
+ TDEIO::NetAccess::del( tdehome, 0 );
kdDebug() << "All tests done. Go home..." << endl;
return 0;
diff --git a/kio/tests/netaccesstest.cpp b/kio/tests/netaccesstest.cpp
index a9aeb66d4..c83f45aae 100644
--- a/kio/tests/netaccesstest.cpp
+++ b/kio/tests/netaccesstest.cpp
@@ -31,8 +31,8 @@ int main(int argc, char **argv)
for ( uint i = 0; i < 4 ; ++i ) {
kdDebug() << "file_copy" << endl;
- if ( !KIO::NetAccess::file_copy(srcURL, tmpURL, -1, true, false, 0) )
- kdError() << "file_copy failed: " << KIO::NetAccess::lastErrorString() << endl;
+ if ( !TDEIO::NetAccess::file_copy(srcURL, tmpURL, -1, true, false, 0) )
+ kdError() << "file_copy failed: " << TDEIO::NetAccess::lastErrorString() << endl;
else {
TQFile f( tmpURL.path() );
if (!f.open(IO_ReadOnly))
diff --git a/kio/tests/previewtest.cpp b/kio/tests/previewtest.cpp
index 52dea6ac7..62f6c3d62 100644
--- a/kio/tests/previewtest.cpp
+++ b/kio/tests/previewtest.cpp
@@ -30,13 +30,13 @@ 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, TQT_SIGNAL(result(KIO::Job*)), TQT_SLOT(slotResult(KIO::Job*)));
+ TDEIO::PreviewJob *job = TDEIO::filePreview(urls, m_preview->width(), m_preview->height(), true, 48);
+ connect(job, TQT_SIGNAL(result(TDEIO::Job*)), TQT_SLOT(slotResult(TDEIO::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*)
+void PreviewTest::slotResult(TDEIO::Job*)
{
kdDebug() << "PreviewTest::slotResult(...)" << endl;
}
diff --git a/kio/tests/previewtest.h b/kio/tests/previewtest.h
index 27d797403..a749e95a3 100644
--- a/kio/tests/previewtest.h
+++ b/kio/tests/previewtest.h
@@ -14,7 +14,7 @@ public:
private slots:
void slotGenerate();
- void slotResult(KIO::Job *);
+ void slotResult(TDEIO::Job *);
void slotPreview( const KFileItem *, const TQPixmap & );
void slotFailed();
diff --git a/kio/tests/speed.cpp b/kio/tests/speed.cpp
index ae94d83e6..44a7d9330 100644
--- a/kio/tests/speed.cpp
+++ b/kio/tests/speed.cpp
@@ -25,21 +25,21 @@
#include <tqdir.h>
#include <kio/global.h>
-using namespace KIO;
+using namespace TDEIO;
SpeedTest::SpeedTest( const KURL & url )
: TQObject(0, "speed")
{
Job *job = listRecursive( url );
//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&)));
+ connect(job, TQT_SIGNAL( result( TDEIO::Job*)),
+ TQT_SLOT( finished( TDEIO::Job* ) ));
+ /*connect(job, TQT_SIGNAL( entries( TDEIO::Job*, const TDEIO::UDSEntryList&)),
+ TQT_SLOT( entries( TDEIO::Job*, const TDEIO::UDSEntryList&)));
*/
}
-void SpeedTest::entries(KIO::Job*, const UDSEntryList& list) {
+void SpeedTest::entries(TDEIO::Job*, const UDSEntryList& list) {
UDSEntryListConstIterator it=list.begin();
for (; it != list.end(); ++it) {
@@ -65,7 +65,7 @@ static KCmdLineOptions options[] =
int main(int argc, char **argv) {
- TDECmdLineArgs::init( argc, argv, "speedapp", "A KIO::listRecursive testing tool", "0.0" );
+ TDECmdLineArgs::init( argc, argv, "speedapp", "A TDEIO::listRecursive testing tool", "0.0" );
TDECmdLineArgs::addCmdLineOptions( options );
@@ -79,15 +79,15 @@ int main(int argc, char **argv) {
else
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";
- TQString mp = KIO::findDeviceMountPoint(url.path());
+ kdDebug() << url.url() << " is probably " << (TDEIO::probably_slow_mounted(url.path()) ? "slow" : "normal") << " mounted\n";
+ kdDebug() << url.url() << " is " << (TDEIO::manually_mounted(url.path()) ? "manually" : "system") << " mounted\n";
+ TQString mp = TDEIO::findDeviceMountPoint(url.path());
if (mp.isEmpty()) {
kdDebug() << "no mount point for device " << url.url() << " found\n";
} else
kdDebug() << mp << " is the mount point for device " << url.url() << endl;
- mp = KIO::findPathMountPoint(url.path());
+ mp = TDEIO::findPathMountPoint(url.path());
if (mp.isEmpty()) {
kdDebug() << "no mount point for path " << url.url() << " found\n";
} else
@@ -95,7 +95,7 @@ int main(int argc, char **argv) {
// SpeedTest test( url );
// app.exec();
- mp = KIO::findPathMountPoint(url.path());
+ mp = TDEIO::findPathMountPoint(url.path());
if (mp.isEmpty()) {
kdDebug() << "no mount point for path " << url.url() << " found\n";
} else
@@ -105,7 +105,7 @@ int main(int argc, char **argv) {
url.setPath(TQDir::homeDirPath());
- mp = KIO::findPathMountPoint(url.path());
+ mp = TDEIO::findPathMountPoint(url.path());
if (mp.isEmpty()) {
kdDebug() << "no mount point for path " << url.url() << " found\n";
} else
@@ -113,7 +113,7 @@ int main(int argc, char **argv) {
// SpeedTest test( url );
// app.exec();
- mp = KIO::findPathMountPoint(url.path());
+ mp = TDEIO::findPathMountPoint(url.path());
if (mp.isEmpty()) {
kdDebug() << "no mount point for path " << url.url() << " found\n";
} else
@@ -126,7 +126,7 @@ int main(int argc, char **argv) {
else
url = "file:" + TQDir::currentDirPath();
- mp = KIO::findPathMountPoint(url.path());
+ mp = TDEIO::findPathMountPoint(url.path());
if (mp.isEmpty()) {
kdDebug() << "no mount point for path " << url.url() << " found\n";
} else
diff --git a/kio/tests/speed.h b/kio/tests/speed.h
index 69b12465f..5b928a18e 100644
--- a/kio/tests/speed.h
+++ b/kio/tests/speed.h
@@ -5,7 +5,7 @@
#include <kio/global.h>
#include <kurl.h>
-namespace KIO {
+namespace TDEIO {
class Job;
}
@@ -16,8 +16,8 @@ public:
SpeedTest(const KURL & url);
private slots:
- void entries( KIO::Job *, const KIO::UDSEntryList& );
- void finished( KIO::Job *job );
+ void entries( TDEIO::Job *, const TDEIO::UDSEntryList& );
+ void finished( TDEIO::Job *job );
};