summaryrefslogtreecommitdiffstats
path: root/kioslave/trash
diff options
context:
space:
mode:
Diffstat (limited to 'kioslave/trash')
-rw-r--r--kioslave/trash/kio_trash.cpp8
-rw-r--r--kioslave/trash/ktrash.cpp2
-rw-r--r--kioslave/trash/testtrash.cpp14
-rw-r--r--kioslave/trash/trashimpl.cpp24
-rw-r--r--kioslave/trash/trashimpl.h2
5 files changed, 25 insertions, 25 deletions
diff --git a/kioslave/trash/kio_trash.cpp b/kioslave/trash/kio_trash.cpp
index 1210bb59a..4d4330ea9 100644
--- a/kioslave/trash/kio_trash.cpp
+++ b/kioslave/trash/kio_trash.cpp
@@ -78,10 +78,10 @@ TrashProtocol::TrashProtocol( const TQCString& protocol, const TQCString &pool,
{
struct passwd *user = getpwuid( getuid() );
if ( user )
- m_userName = TQString::fromLatin1(user->pw_name);
+ m_userName = TQString::tqfromLatin1(user->pw_name);
struct group *grp = getgrgid( getgid() );
if ( grp )
- m_groupName = TQString::fromLatin1(grp->gr_name);
+ m_groupName = TQString::tqfromLatin1(grp->gr_name);
}
TrashProtocol::~TrashProtocol()
@@ -540,7 +540,7 @@ void TrashProtocol::get( const KURL& url )
this, TQT_SLOT( slotMimetype( KIO::Job*, const TQString& ) ) );
connect( job, TQT_SIGNAL( result(KIO::Job *) ),
this, TQT_SLOT( jobFinished(KIO::Job *) ) );
- qApp->eventLoop()->enterLoop();
+ tqApp->eventLoop()->enterLoop();
}
void TrashProtocol::slotData( KIO::Job*, const TQByteArray&arr )
@@ -559,7 +559,7 @@ void TrashProtocol::jobFinished( KIO::Job* job )
error( job->error(), job->errorText() );
else
finished();
- qApp->eventLoop()->exitLoop();
+ tqApp->eventLoop()->exitLoop();
}
#if 0
diff --git a/kioslave/trash/ktrash.cpp b/kioslave/trash/ktrash.cpp
index 0c9710367..4f85ba50c 100644
--- a/kioslave/trash/ktrash.cpp
+++ b/kioslave/trash/ktrash.cpp
@@ -77,7 +77,7 @@ int main(int argc, char *argv[])
TQCString restoreArg = args->getOption( "restore" );
if ( !restoreArg.isEmpty() ) {
- if (restoreArg.find("system:/trash")==0) {
+ if (restoreArg.tqfind("system:/trash")==0) {
restoreArg.remove(0, 13);
restoreArg.prepend("trash:");
}
diff --git a/kioslave/trash/testtrash.cpp b/kioslave/trash/testtrash.cpp
index fb6927d3e..c847d9302 100644
--- a/kioslave/trash/testtrash.cpp
+++ b/kioslave/trash/testtrash.cpp
@@ -152,10 +152,10 @@ void TestTrash::setup()
for ( TrashImpl::TrashDirMap::ConstIterator it = trashDirs.begin(); it != trashDirs.end() ; ++it ) {
if ( it.key() == 0 ) {
assert( it.data() == m_trashDir );
- assert( topDirs.find( 0 ) == topDirs.end() );
+ assert( topDirs.tqfind( 0 ) == topDirs.end() );
foundTrashDir = true;
} else {
- assert( topDirs.find( it.key() ) != topDirs.end() );
+ assert( topDirs.tqfind( it.key() ) != topDirs.end() );
const TQString topdir = topDirs[it.key()];
if ( TQFileInfo( topdir ).isWritable() ) {
writableTopDirs.append( it.key() );
@@ -383,7 +383,7 @@ static void checkInfoFile( const TQString& infoPath, const TQString& origFilePat
assert( origPath == KURL::encode_string( origFilePath, KGlobal::locale()->fileEncodingMib() ) );
const TQString date = infoFile.readEntry( "DeletionDate" );
assert( !date.isEmpty() );
- assert( date.contains( "T" ) );
+ assert( date.tqcontains( "T" ) );
}
static void createTestFile( const TQString& path )
@@ -1104,7 +1104,7 @@ void TestTrash::listRootDir()
assert( m_entryCount > 1 );
kdDebug() << k_funcinfo << m_listResult << endl;
- assert( m_listResult.contains( "." ) == 1 ); // found it, and only once
+ assert( m_listResult.tqcontains( "." ) == 1 ); // found it, and only once
}
void TestTrash::listRecursiveRootDir()
@@ -1121,7 +1121,7 @@ void TestTrash::listRecursiveRootDir()
assert( m_entryCount > 1 );
kdDebug() << k_funcinfo << m_listResult << endl;
- assert( m_listResult.contains( "." ) == 1 ); // found it, and only once
+ assert( m_listResult.tqcontains( "." ) == 1 ); // found it, and only once
}
void TestTrash::listSubDir()
@@ -1138,8 +1138,8 @@ void TestTrash::listSubDir()
assert( m_entryCount == 2 );
kdDebug() << k_funcinfo << m_listResult << endl;
- assert( m_listResult.contains( "." ) == 1 ); // found it, and only once
- assert( m_listResult.contains( "testfile" ) == 1 ); // found it, and only once
+ assert( m_listResult.tqcontains( "." ) == 1 ); // found it, and only once
+ assert( m_listResult.tqcontains( "testfile" ) == 1 ); // found it, and only once
}
void TestTrash::slotEntries( KIO::Job*, const KIO::UDSEntryList& lst )
diff --git a/kioslave/trash/trashimpl.cpp b/kioslave/trash/trashimpl.cpp
index f43e7929f..80343c98a 100644
--- a/kioslave/trash/trashimpl.cpp
+++ b/kioslave/trash/trashimpl.cpp
@@ -262,7 +262,7 @@ bool TrashImpl::createInfo( const TQString& origPath, int& trashId, TQString& fi
info += KURL::encode_string( makeRelativePath( topDirectoryPath( trashId ), origPath ), m_mibEnum ).latin1();
info += "\n";
info += "DeletionDate=";
- info += TQDateTime::currentDateTime().toString( Qt::ISODate ).latin1();
+ info += TQDateTime::tqcurrentDateTime().toString( Qt::ISODate ).latin1();
info += "\n";
size_t sz = info.size() - 1; // avoid trailing 0 from QCString
@@ -372,7 +372,7 @@ bool TrashImpl::move( const TQString& src, const TQString& dest )
#endif
connect( job, TQT_SIGNAL( result(KIO::Job *) ),
this, TQT_SLOT( jobFinished(KIO::Job *) ) );
- qApp->eventLoop()->enterLoop();
+ tqApp->eventLoop()->enterLoop();
return m_lastErrorCode == 0;
}
@@ -381,7 +381,7 @@ void TrashImpl::jobFinished(KIO::Job* job)
{
kdDebug() << k_funcinfo << " error=" << job->error() << endl;
error( job->error(), job->errorText() );
- qApp->eventLoop()->exitLoop();
+ tqApp->eventLoop()->exitLoop();
}
bool TrashImpl::copyToTrash( const TQString& origPath, int trashId, const TQString& fileId )
@@ -419,7 +419,7 @@ bool TrashImpl::copy( const TQString& src, const TQString& dest )
#endif
connect( job, TQT_SIGNAL( result( KIO::Job* ) ),
this, TQT_SLOT( jobFinished( KIO::Job* ) ) );
- qApp->eventLoop()->enterLoop();
+ tqApp->eventLoop()->enterLoop();
return m_lastErrorCode == 0;
}
@@ -429,7 +429,7 @@ bool TrashImpl::directRename( const TQString& src, const TQString& dest )
kdDebug() << k_funcinfo << src << " -> " << dest << endl;
if ( ::rename( TQFile::encodeName( src ), TQFile::encodeName( dest ) ) != 0 ) {
if (errno == EXDEV) {
- error( KIO::ERR_UNSUPPORTED_ACTION, TQString::fromLatin1("rename") );
+ error( KIO::ERR_UNSUPPORTED_ACTION, TQString::tqfromLatin1("rename") );
} else {
if (( errno == EACCES ) || (errno == EPERM)) {
error( KIO::ERR_ACCESS_DENIED, dest );
@@ -508,14 +508,14 @@ bool TrashImpl::synchronousDel( const TQString& path, bool setLastErrorCode, boo
KIO::ChmodJob* chmodJob = KIO::chmod( fileItemList, 0200, 0200, TQString::null, TQString::null, true /*recursive*/, false /*showProgressInfo*/ );
connect( chmodJob, TQT_SIGNAL( result(KIO::Job *) ),
this, TQT_SLOT( jobFinished(KIO::Job *) ) );
- qApp->eventLoop()->enterLoop();
+ tqApp->eventLoop()->enterLoop();
}
kdDebug() << k_funcinfo << "deleting " << url << endl;
KIO::DeleteJob *job = KIO::del( url, false, false );
connect( job, TQT_SIGNAL( result(KIO::Job *) ),
this, TQT_SLOT( jobFinished(KIO::Job *) ) );
- qApp->eventLoop()->enterLoop();
+ tqApp->eventLoop()->enterLoop();
bool ok = m_lastErrorCode == 0;
if ( !setLastErrorCode ) {
m_lastErrorCode = oldErrorCode;
@@ -630,7 +630,7 @@ bool TrashImpl::readInfoFile( const TQString& infoPath, TrashedFileInfo& info, i
}
TQString line = cfg.readEntry( "DeletionDate" );
if ( !line.isEmpty() ) {
- info.deletionDate = TQDateTime::fromString( line, Qt::ISODate );
+ info.deletionDate = TQT_TQDATETIME_OBJECT(TQDateTime::fromString( line, Qt::ISODate ));
}
return true;
}
@@ -898,7 +898,7 @@ TQString TrashImpl::trashDirectoryPath( int trashId ) const
// and reusing a directory listing from the earlier instance.)
if ( !m_trashDirectoriesScanned )
scanTrashDirectories();
- Q_ASSERT( m_trashDirectories.contains( trashId ) );
+ Q_ASSERT( m_trashDirectories.tqcontains( trashId ) );
return m_trashDirectories[trashId];
}
@@ -907,7 +907,7 @@ TQString TrashImpl::topDirectoryPath( int trashId ) const
if ( !m_trashDirectoriesScanned )
scanTrashDirectories();
assert( trashId != 0 );
- Q_ASSERT( m_topDirectories.contains( trashId ) );
+ Q_ASSERT( m_topDirectories.tqcontains( trashId ) );
return m_topDirectories[trashId];
}
@@ -939,7 +939,7 @@ bool TrashImpl::parseURL( const KURL& url, int& trashId, TQString& fileId, TQStr
int start = 0;
if ( path[0] == '/' ) // always true I hope
start = 1;
- int slashPos = path.find( '-', 0 ); // don't match leading slash
+ int slashPos = path.tqfind( '-', 0 ); // don't match leading slash
if ( slashPos <= 0 )
return false;
bool ok = false;
@@ -948,7 +948,7 @@ bool TrashImpl::parseURL( const KURL& url, int& trashId, TQString& fileId, TQStr
if ( !ok )
return false;
start = slashPos + 1;
- slashPos = path.find( '/', start );
+ slashPos = path.tqfind( '/', start );
if ( slashPos <= 0 ) {
fileId = path.mid( start );
relativePath = TQString::null;
diff --git a/kioslave/trash/trashimpl.h b/kioslave/trash/trashimpl.h
index 027864456..fb34e5be0 100644
--- a/kioslave/trash/trashimpl.h
+++ b/kioslave/trash/trashimpl.h
@@ -34,7 +34,7 @@
* Implementation of all low-level operations done by kio_trash
* The structure of the trash directory follows the freedesktop.org standard <TODO URL>
*/
-class TrashImpl : public QObject
+class TrashImpl : public TQObject
{
Q_OBJECT
public: