diff options
Diffstat (limited to 'kioslave/remote')
-rw-r--r-- | kioslave/remote/kdedmodule/remotedirnotify.cpp | 6 | ||||
-rw-r--r-- | kioslave/remote/kdedmodule/remotedirnotifymodule.cpp | 4 | ||||
-rw-r--r-- | kioslave/remote/kdedmodule/remotedirnotifymodule.h | 2 | ||||
-rw-r--r-- | kioslave/remote/kio_remote.cpp | 12 | ||||
-rw-r--r-- | kioslave/remote/kio_remote.h | 4 | ||||
-rw-r--r-- | kioslave/remote/remoteimpl.cpp | 84 | ||||
-rw-r--r-- | kioslave/remote/remoteimpl.h | 20 | ||||
-rw-r--r-- | kioslave/remote/testremote.cpp | 6 |
8 files changed, 69 insertions, 69 deletions
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 <kdirnotify_stub.h> -#include <qdir.h> +#include <tqdir.h> 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 <klocale.h> #include <kglobal.h> -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 <kservice.h> #include <klocale.h> -#include <qdir.h> -#include <qfile.h> +#include <tqdir.h> +#include <tqfile.h> #include <sys/stat.h> @@ -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<KIO::UDSEntry> &list) const +void RemoteImpl::listRoot(TQValueList<KIO::UDSEntry> &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<KIO::UDSEntry> &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 <kio/job.h> #include <kurl.h> -#include <qstring.h> +#include <tqstring.h> 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<KIO::UDSEntry> &list) const; + void listRoot(TQValueList<KIO::UDSEntry> &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 <stdlib.h> -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; } |