diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-01-07 04:10:07 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-01-07 04:10:07 +0000 |
commit | fd3a982e26813f5bcc82c7e89ce6fa2ad44432bf (patch) | |
tree | 9eda848e56fcb862fdfdf479adeccd95b6fe387a /kioslave/trash | |
parent | 02f67d0e1355b79b1806746efb0f2f640e57f13d (diff) | |
download | tdebase-fd3a982e26813f5bcc82c7e89ce6fa2ad44432bf.tar.gz tdebase-fd3a982e26813f5bcc82c7e89ce6fa2ad44432bf.zip |
Revert automated changes
Sorry guys, they are just not ready for prime time
Work will continue as always
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebase@1212480 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kioslave/trash')
-rw-r--r-- | kioslave/trash/kio_trash.cpp | 10 | ||||
-rw-r--r-- | kioslave/trash/testtrash.cpp | 18 | ||||
-rw-r--r-- | kioslave/trash/trashimpl.cpp | 34 | ||||
-rw-r--r-- | kioslave/trash/trashimpl.h | 2 |
4 files changed, 32 insertions, 32 deletions
diff --git a/kioslave/trash/kio_trash.cpp b/kioslave/trash/kio_trash.cpp index 3cd52e02c..1210bb59a 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::tqfromLatin1(user->pw_name); + m_userName = TQString::fromLatin1(user->pw_name); struct group *grp = getgrgid( getgid() ); if ( grp ) - m_groupName = TQString::tqfromLatin1(grp->gr_name); + m_groupName = TQString::fromLatin1(grp->gr_name); } TrashProtocol::~TrashProtocol() @@ -427,7 +427,7 @@ bool TrashProtocol::createUDSEntry( const TQString& physicalPath, const TQString if ( !url.isEmpty() ) addAtom( entry, KIO::UDS_URL, 0, url ); - KMimeType::Ptr mt = KMimeType::tqfindByPath( physicalPath, buff.st_mode ); + KMimeType::Ptr mt = KMimeType::findByPath( physicalPath, buff.st_mode ); addAtom( entry, KIO::UDS_MIME_TYPE, 0, mt->name() ); addAtom( entry, KIO::UDS_ACCESS, access ); addAtom( entry, KIO::UDS_SIZE, buff.st_size ); @@ -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 *) ) ); - tqApp->eventLoop()->enterLoop(); + qApp->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(); - tqApp->eventLoop()->exitLoop(); + qApp->eventLoop()->exitLoop(); } #if 0 diff --git a/kioslave/trash/testtrash.cpp b/kioslave/trash/testtrash.cpp index 146748d73..fb6927d3e 100644 --- a/kioslave/trash/testtrash.cpp +++ b/kioslave/trash/testtrash.cpp @@ -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.tqcontains( "T" ) ); + assert( date.contains( "T" ) ); } static void createTestFile( const TQString& path ) @@ -479,8 +479,8 @@ void TestTrash::trashUmlautFileFromHome() void TestTrash::testTrashNotEmpty() { KSimpleConfig cfg( "trashrc", true ); - assert( cfg.hasGroup( "tqStatus" ) ); - cfg.setGroup( "tqStatus" ); + assert( cfg.hasGroup( "Status" ) ); + cfg.setGroup( "Status" ); assert( cfg.readBoolEntry( "Empty", true ) == false ); } @@ -1104,7 +1104,7 @@ void TestTrash::listRootDir() assert( m_entryCount > 1 ); kdDebug() << k_funcinfo << m_listResult << endl; - assert( m_listResult.tqcontains( "." ) == 1 ); // found it, and only once + assert( m_listResult.contains( "." ) == 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.tqcontains( "." ) == 1 ); // found it, and only once + assert( m_listResult.contains( "." ) == 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.tqcontains( "." ) == 1 ); // found it, and only once - assert( m_listResult.tqcontains( "testfile" ) == 1 ); // found it, and only once + assert( m_listResult.contains( "." ) == 1 ); // found it, and only once + assert( m_listResult.contains( "testfile" ) == 1 ); // found it, and only once } void TestTrash::slotEntries( KIO::Job*, const KIO::UDSEntryList& lst ) @@ -1182,8 +1182,8 @@ void TestTrash::emptyTrash() assert( ok ); KSimpleConfig cfg( "trashrc", true ); - assert( cfg.hasGroup( "tqStatus" ) ); - cfg.setGroup( "tqStatus" ); + assert( cfg.hasGroup( "Status" ) ); + cfg.setGroup( "Status" ); assert( cfg.readBoolEntry( "Empty", false ) == true ); assert( !TQFile::exists( m_trashDir + "/files/fileFromHome" ) ); diff --git a/kioslave/trash/trashimpl.cpp b/kioslave/trash/trashimpl.cpp index 8139956fe..f43e7929f 100644 --- a/kioslave/trash/trashimpl.cpp +++ b/kioslave/trash/trashimpl.cpp @@ -52,7 +52,7 @@ TrashImpl::TrashImpl() : TQObject(), m_lastErrorCode( 0 ), - m_inittqStatus( InitToBeDone ), + m_initStatus( InitToBeDone ), m_lastId( 0 ), m_homeDevice( 0 ), m_trashDirectoriesScanned( false ), @@ -123,14 +123,14 @@ int TrashImpl::testDir( const TQString &_name ) const bool TrashImpl::init() { - if ( m_inittqStatus == InitOK ) + if ( m_initStatus == InitOK ) return true; - if ( m_inittqStatus == InitError ) + if ( m_initStatus == InitError ) return false; // Check the trash directory and its info and files subdirs // see also kdesktop/init.cc for first time initialization - m_inittqStatus = InitError; + m_initStatus = InitError; // $XDG_DATA_HOME/Trash, i.e. ~/.local/share/Trash by default. const TQString xdgDataDir = KGlobal::dirs()->localxdgdatadir(); if ( !KStandardDirs::makeDir( xdgDataDir, 0700 ) ) { @@ -153,7 +153,7 @@ bool TrashImpl::init() return false; } m_trashDirectories.insert( 0, trashDir ); - m_inittqStatus = InitOK; + m_initStatus = InitOK; kdDebug() << k_funcinfo << "initialization OK, home trash dir: " << trashDir << endl; return true; } @@ -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::tqcurrentDateTime().toString( Qt::ISODate ).latin1(); + info += TQDateTime::currentDateTime().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 *) ) ); - tqApp->eventLoop()->enterLoop(); + qApp->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() ); - tqApp->eventLoop()->exitLoop(); + qApp->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* ) ) ); - tqApp->eventLoop()->enterLoop(); + qApp->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::tqfromLatin1("rename") ); + error( KIO::ERR_UNSUPPORTED_ACTION, TQString::fromLatin1("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 *) ) ); - tqApp->eventLoop()->enterLoop(); + qApp->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 *) ) ); - tqApp->eventLoop()->enterLoop(); + qApp->eventLoop()->enterLoop(); bool ok = m_lastErrorCode == 0; if ( !setLastErrorCode ) { m_lastErrorCode = oldErrorCode; @@ -682,7 +682,7 @@ bool TrashImpl::isEmpty() const void TrashImpl::fileAdded() { - m_config.setGroup( "tqStatus" ); + m_config.setGroup( "Status" ); if ( m_config.readBoolEntry( "Empty", true ) == true ) { m_config.writeEntry( "Empty", false ); m_config.sync(); @@ -695,7 +695,7 @@ void TrashImpl::fileAdded() void TrashImpl::fileRemoved() { if ( isEmpty() ) { - m_config.setGroup( "tqStatus" ); + m_config.setGroup( "Status" ); m_config.writeEntry( "Empty", true ); m_config.sync(); } @@ -713,7 +713,7 @@ int TrashImpl::findTrashDirectory( const TQString& origPath ) && buff.st_dev == m_homeDevice ) return 0; - TQString mountPoint = KIO::tqfindPathMountPoint( origPath ); + TQString mountPoint = KIO::findPathMountPoint( origPath ); const TQString trashDir = trashForMountPoint( mountPoint, true ); kdDebug() << "mountPoint=" << mountPoint << " trashDir=" << trashDir << endl; if ( trashDir.isEmpty() ) @@ -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.tqcontains( trashId ) ); + Q_ASSERT( m_trashDirectories.contains( 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.tqcontains( trashId ) ); + Q_ASSERT( m_topDirectories.contains( trashId ) ); return m_topDirectories[trashId]; } diff --git a/kioslave/trash/trashimpl.h b/kioslave/trash/trashimpl.h index 1a00e14bd..027864456 100644 --- a/kioslave/trash/trashimpl.h +++ b/kioslave/trash/trashimpl.h @@ -157,7 +157,7 @@ private: int m_lastErrorCode; TQString m_lastErrorMessage; - enum { InitToBeDone, InitOK, InitError } m_inittqStatus; + enum { InitToBeDone, InitOK, InitError } m_initStatus; // A "trash directory" is a physical directory on disk, // e.g. $HOME/.local/share/Trash/$uid or /mnt/foo/.Trash/$uid |