From c663b6440964f6ac48027143ac9e63298991f9d0 Mon Sep 17 00:00:00 2001 From: tpearson Date: Sat, 31 Jul 2010 19:33:34 +0000 Subject: Trinity Qt initial conversion git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebase@1157639 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- kioslave/remote/kdedmodule/remotedirnotify.cpp | 6 +- .../remote/kdedmodule/remotedirnotifymodule.cpp | 4 +- kioslave/remote/kdedmodule/remotedirnotifymodule.h | 2 +- kioslave/remote/kio_remote.cpp | 12 ++-- kioslave/remote/kio_remote.h | 4 +- kioslave/remote/remoteimpl.cpp | 84 +++++++++++----------- kioslave/remote/remoteimpl.h | 20 +++--- kioslave/remote/testremote.cpp | 6 +- 8 files changed, 69 insertions(+), 69 deletions(-) (limited to 'kioslave/remote') diff --git a/kioslave/remote/kdedmodule/remotedirnotify.cpp b/kioslave/remote/kdedmodule/remotedirnotify.cpp index 88933e29a..e6e2359a6 100644 --- a/kioslave/remote/kdedmodule/remotedirnotify.cpp +++ b/kioslave/remote/kdedmodule/remotedirnotify.cpp @@ -26,14 +26,14 @@ #include -#include +#include RemoteDirNotify::RemoteDirNotify() { KGlobal::dirs()->addResourceType("remote_entries", KStandardDirs::kde_default("data") + "remoteview"); - QString path = KGlobal::dirs()->saveLocation("remote_entries"); + TQString path = KGlobal::dirs()->saveLocation("remote_entries"); m_baseURL.setPath(path); } @@ -42,7 +42,7 @@ KURL RemoteDirNotify::toRemoteURL(const KURL &url) kdDebug(1220) << "RemoteDirNotify::toRemoteURL(" << url << ")" << endl; if ( m_baseURL.isParentOf(url) ) { - QString path = KURL::relativePath(m_baseURL.path(), + TQString path = KURL::relativePath(m_baseURL.path(), url.path()); KURL result("remote:/"+path); result.cleanPath(); diff --git a/kioslave/remote/kdedmodule/remotedirnotifymodule.cpp b/kioslave/remote/kdedmodule/remotedirnotifymodule.cpp index 5877ac299..894400ce2 100644 --- a/kioslave/remote/kdedmodule/remotedirnotifymodule.cpp +++ b/kioslave/remote/kdedmodule/remotedirnotifymodule.cpp @@ -22,13 +22,13 @@ #include #include -RemoteDirNotifyModule::RemoteDirNotifyModule(const QCString &obj) +RemoteDirNotifyModule::RemoteDirNotifyModule(const TQCString &obj) : KDEDModule(obj) { } extern "C" { - KDE_EXPORT KDEDModule *create_remotedirnotify(const QCString &obj) + KDE_EXPORT KDEDModule *create_remotedirnotify(const TQCString &obj) { KGlobal::locale()->insertCatalogue("kio_remote"); return new RemoteDirNotifyModule(obj); diff --git a/kioslave/remote/kdedmodule/remotedirnotifymodule.h b/kioslave/remote/kdedmodule/remotedirnotifymodule.h index 4ce8c2c7d..e6cf0d720 100644 --- a/kioslave/remote/kdedmodule/remotedirnotifymodule.h +++ b/kioslave/remote/kdedmodule/remotedirnotifymodule.h @@ -28,7 +28,7 @@ class RemoteDirNotifyModule : public KDEDModule K_DCOP public: - RemoteDirNotifyModule(const QCString &obj); + RemoteDirNotifyModule(const TQCString &obj); private: RemoteDirNotify notifier; }; diff --git a/kioslave/remote/kio_remote.cpp b/kioslave/remote/kio_remote.cpp index 1200f943c..646a99d30 100644 --- a/kioslave/remote/kio_remote.cpp +++ b/kioslave/remote/kio_remote.cpp @@ -56,8 +56,8 @@ extern "C" { } -RemoteProtocol::RemoteProtocol(const QCString &protocol, - const QCString &pool, const QCString &app) +RemoteProtocol::RemoteProtocol(const TQCString &protocol, + const TQCString &pool, const TQCString &app) : SlaveBase(protocol, pool, app) { } @@ -77,7 +77,7 @@ void RemoteProtocol::listDir(const KURL &url) } int second_slash_idx = url.path().find( '/', 1 ); - QString root_dirname = url.path().mid( 1, second_slash_idx-1 ); + TQString root_dirname = url.path().mid( 1, second_slash_idx-1 ); KURL target = m_impl.findBaseURL( root_dirname ); kdDebug(1220) << "possible redirection target : " << target << endl; @@ -125,7 +125,7 @@ void RemoteProtocol::stat(const KURL &url) { kdDebug(1220) << "RemoteProtocol::stat: " << url << endl; - QString path = url.path(); + TQString path = url.path(); if ( path.isEmpty() || path == "/" ) { // The root is "virtual" - it's not a single physical directory @@ -152,7 +152,7 @@ void RemoteProtocol::stat(const KURL &url) } int second_slash_idx = url.path().find( '/', 1 ); - QString root_dirname = url.path().mid( 1, second_slash_idx-1 ); + TQString root_dirname = url.path().mid( 1, second_slash_idx-1 ); if ( second_slash_idx==-1 || ( (int)url.path().length() )==second_slash_idx+1 ) { @@ -198,7 +198,7 @@ void RemoteProtocol::get(const KURL &url) { kdDebug(1220) << "RemoteProtocol::get: " << url << endl; - QString file = m_impl.findDesktopFile( url.fileName() ); + TQString file = m_impl.findDesktopFile( url.fileName() ); kdDebug(1220) << "desktop file : " << file << endl; if (!file.isEmpty()) diff --git a/kioslave/remote/kio_remote.h b/kioslave/remote/kio_remote.h index 7d3b0366e..f2c06296a 100644 --- a/kioslave/remote/kio_remote.h +++ b/kioslave/remote/kio_remote.h @@ -26,8 +26,8 @@ class RemoteProtocol : public KIO::SlaveBase { public: - RemoteProtocol(const QCString &protocol, const QCString &pool, - const QCString &app); + RemoteProtocol(const TQCString &protocol, const TQCString &pool, + const TQCString &app); virtual ~RemoteProtocol(); virtual void listDir(const KURL &url); diff --git a/kioslave/remote/remoteimpl.cpp b/kioslave/remote/remoteimpl.cpp index 139cbfd2a..47e41b821 100644 --- a/kioslave/remote/remoteimpl.cpp +++ b/kioslave/remote/remoteimpl.cpp @@ -26,8 +26,8 @@ #include #include -#include -#include +#include +#include #include @@ -39,9 +39,9 @@ RemoteImpl::RemoteImpl() KGlobal::dirs()->addResourceType("remote_entries", KStandardDirs::kde_default("data") + "remoteview"); - QString path = KGlobal::dirs()->saveLocation("remote_entries"); + TQString path = KGlobal::dirs()->saveLocation("remote_entries"); - QDir dir = path; + TQDir dir = path; if (!dir.exists()) { dir.cdUp(); @@ -49,28 +49,28 @@ RemoteImpl::RemoteImpl() } } -void RemoteImpl::listRoot(QValueList &list) const +void RemoteImpl::listRoot(TQValueList &list) const { kdDebug(1220) << "RemoteImpl::listRoot" << endl; - QStringList names_found; - QStringList dirList = KGlobal::dirs()->resourceDirs("remote_entries"); + TQStringList names_found; + TQStringList dirList = KGlobal::dirs()->resourceDirs("remote_entries"); - QStringList::ConstIterator dirpath = dirList.begin(); - QStringList::ConstIterator end = dirList.end(); + TQStringList::ConstIterator dirpath = dirList.begin(); + TQStringList::ConstIterator end = dirList.end(); for(; dirpath!=end; ++dirpath) { - QDir dir = *dirpath; + TQDir dir = *dirpath; if (!dir.exists()) continue; - QStringList filenames - = dir.entryList( QDir::Files | QDir::Readable ); + TQStringList filenames + = dir.entryList( TQDir::Files | TQDir::Readable ); KIO::UDSEntry entry; - QStringList::ConstIterator name = filenames.begin(); - QStringList::ConstIterator endf = filenames.end(); + TQStringList::ConstIterator name = filenames.begin(); + TQStringList::ConstIterator endf = filenames.end(); for(; name!=endf; ++name) { @@ -85,27 +85,27 @@ void RemoteImpl::listRoot(QValueList &list) const } } -bool RemoteImpl::findDirectory(const QString &filename, QString &directory) const +bool RemoteImpl::findDirectory(const TQString &filename, TQString &directory) const { kdDebug(1220) << "RemoteImpl::findDirectory" << endl; - QStringList dirList = KGlobal::dirs()->resourceDirs("remote_entries"); + TQStringList dirList = KGlobal::dirs()->resourceDirs("remote_entries"); - QStringList::ConstIterator dirpath = dirList.begin(); - QStringList::ConstIterator end = dirList.end(); + TQStringList::ConstIterator dirpath = dirList.begin(); + TQStringList::ConstIterator end = dirList.end(); for(; dirpath!=end; ++dirpath) { - QDir dir = *dirpath; + TQDir dir = *dirpath; if (!dir.exists()) continue; - QStringList filenames - = dir.entryList( QDir::Files | QDir::Readable ); + TQStringList filenames + = dir.entryList( TQDir::Files | TQDir::Readable ); KIO::UDSEntry entry; - QStringList::ConstIterator name = filenames.begin(); - QStringList::ConstIterator endf = filenames.end(); + TQStringList::ConstIterator name = filenames.begin(); + TQStringList::ConstIterator endf = filenames.end(); for(; name!=endf; ++name) { @@ -120,24 +120,24 @@ bool RemoteImpl::findDirectory(const QString &filename, QString &directory) cons return false; } -QString RemoteImpl::findDesktopFile(const QString &filename) const +TQString RemoteImpl::findDesktopFile(const TQString &filename) const { kdDebug(1220) << "RemoteImpl::findDesktopFile" << endl; - QString directory; + TQString directory; if (findDirectory(filename+".desktop", directory)) { return directory+filename+".desktop"; } - return QString::null; + return TQString::null; } -KURL RemoteImpl::findBaseURL(const QString &filename) const +KURL RemoteImpl::findBaseURL(const TQString &filename) const { kdDebug(1220) << "RemoteImpl::findBaseURL" << endl; - QString file = findDesktopFile(filename); + TQString file = findDesktopFile(filename); if (!file.isEmpty()) { KDesktopFile desktop(file, true); @@ -149,7 +149,7 @@ KURL RemoteImpl::findBaseURL(const QString &filename) const static void addAtom(KIO::UDSEntry &entry, unsigned int ID, long l, - const QString &s = QString::null) + const TQString &s = TQString::null) { KIO::UDSAtom atom; atom.m_uds = ID; @@ -213,8 +213,8 @@ bool RemoteImpl::isWizardURL(const KURL &url) const void RemoteImpl::createEntry(KIO::UDSEntry &entry, - const QString &directory, - const QString &file) const + const TQString &directory, + const TQString &file) const { kdDebug(1220) << "RemoteImpl::createEntry" << endl; @@ -224,7 +224,7 @@ void RemoteImpl::createEntry(KIO::UDSEntry &entry, entry.clear(); - QString new_filename = file; + TQString new_filename = file; new_filename.truncate( file.length()-8); addAtom(entry, KIO::UDS_NAME, 0, desktop.readName()); @@ -233,17 +233,17 @@ void RemoteImpl::createEntry(KIO::UDSEntry &entry, addAtom(entry, KIO::UDS_FILE_TYPE, S_IFDIR); addAtom(entry, KIO::UDS_MIME_TYPE, 0, "inode/directory"); - QString icon = desktop.readIcon(); + TQString icon = desktop.readIcon(); addAtom(entry, KIO::UDS_ICON_NAME, 0, icon); addAtom(entry, KIO::UDS_LINK_DEST, 0, desktop.readURL()); } -bool RemoteImpl::statNetworkFolder(KIO::UDSEntry &entry, const QString &filename) const +bool RemoteImpl::statNetworkFolder(KIO::UDSEntry &entry, const TQString &filename) const { kdDebug(1220) << "RemoteImpl::statNetworkFolder: " << filename << endl; - QString directory; + TQString directory; if (findDirectory(filename+".desktop", directory)) { createEntry(entry, directory, filename+".desktop"); @@ -253,36 +253,36 @@ bool RemoteImpl::statNetworkFolder(KIO::UDSEntry &entry, const QString &filename return false; } -bool RemoteImpl::deleteNetworkFolder(const QString &filename) const +bool RemoteImpl::deleteNetworkFolder(const TQString &filename) const { kdDebug(1220) << "RemoteImpl::deleteNetworkFolder: " << filename << endl; - QString directory; + TQString directory; if (findDirectory(filename+".desktop", directory)) { kdDebug(1220) << "Removing " << directory << filename << ".desktop" << endl; - return QFile::remove(directory+filename+".desktop"); + return TQFile::remove(directory+filename+".desktop"); } return false; } -bool RemoteImpl::renameFolders(const QString &src, const QString &dest, +bool RemoteImpl::renameFolders(const TQString &src, const TQString &dest, bool overwrite) const { kdDebug(1220) << "RemoteImpl::renameFolders: " << src << ", " << dest << endl; - QString directory; + TQString directory; if (findDirectory(src+".desktop", directory)) { - if (!overwrite && QFile::exists(directory+dest+".desktop")) + if (!overwrite && TQFile::exists(directory+dest+".desktop")) { return false; } kdDebug(1220) << "Renaming " << directory << src << ".desktop"<< endl; - QDir dir(directory); + TQDir dir(directory); bool res = dir.rename(src+".desktop", dest+".desktop"); if (res) { diff --git a/kioslave/remote/remoteimpl.h b/kioslave/remote/remoteimpl.h index ba7390bf4..b9bb6ac2d 100644 --- a/kioslave/remote/remoteimpl.h +++ b/kioslave/remote/remoteimpl.h @@ -24,7 +24,7 @@ #include #include -#include +#include class RemoteImpl { @@ -34,21 +34,21 @@ public: void createTopLevelEntry(KIO::UDSEntry &entry) const; bool createWizardEntry(KIO::UDSEntry &entry) const; bool isWizardURL(const KURL &url) const; - bool statNetworkFolder(KIO::UDSEntry &entry, const QString &filename) const; + bool statNetworkFolder(KIO::UDSEntry &entry, const TQString &filename) const; - void listRoot(QValueList &list) const; + void listRoot(TQValueList &list) const; - KURL findBaseURL(const QString &filename) const; - QString findDesktopFile(const QString &filename) const; + KURL findBaseURL(const TQString &filename) const; + TQString findDesktopFile(const TQString &filename) const; - bool deleteNetworkFolder(const QString &filename) const; - bool renameFolders(const QString &src, const QString &dest, + bool deleteNetworkFolder(const TQString &filename) const; + bool renameFolders(const TQString &src, const TQString &dest, bool overwrite) const; private: - bool findDirectory(const QString &filename, QString &directory) const; - void createEntry(KIO::UDSEntry& entry, const QString &directory, - const QString &file) const; + bool findDirectory(const TQString &filename, TQString &directory) const; + void createEntry(KIO::UDSEntry& entry, const TQString &directory, + const TQString &file) const; }; #endif diff --git a/kioslave/remote/testremote.cpp b/kioslave/remote/testremote.cpp index a3e979023..3c76b6f22 100644 --- a/kioslave/remote/testremote.cpp +++ b/kioslave/remote/testremote.cpp @@ -28,12 +28,12 @@ #include -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; } -- cgit v1.2.1