summaryrefslogtreecommitdiffstats
path: root/kioslave/system
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:33:34 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:33:34 +0000
commitc663b6440964f6ac48027143ac9e63298991f9d0 (patch)
tree6d8b0c5a5f9db1ee16acf98b1397cea9126b281d /kioslave/system
parenta061f7191beebb0e4a3b0c0a7c534ec5f22f2dc7 (diff)
downloadtdebase-c663b6440964f6ac48027143ac9e63298991f9d0.tar.gz
tdebase-c663b6440964f6ac48027143ac9e63298991f9d0.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebase@1157639 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kioslave/system')
-rw-r--r--kioslave/system/kdedmodule/systemdirnotify.cpp28
-rw-r--r--kioslave/system/kdedmodule/systemdirnotify.h4
-rw-r--r--kioslave/system/kdedmodule/systemdirnotifymodule.cpp4
-rw-r--r--kioslave/system/kdedmodule/systemdirnotifymodule.h2
-rw-r--r--kioslave/system/kio_system.cpp14
-rw-r--r--kioslave/system/kio_system.h4
-rw-r--r--kioslave/system/systemimpl.cpp94
-rw-r--r--kioslave/system/systemimpl.h22
-rw-r--r--kioslave/system/testsystem.cpp6
9 files changed, 89 insertions, 89 deletions
diff --git a/kioslave/system/kdedmodule/systemdirnotify.cpp b/kioslave/system/kdedmodule/systemdirnotify.cpp
index e0ec57992..162d96621 100644
--- a/kioslave/system/kdedmodule/systemdirnotify.cpp
+++ b/kioslave/system/kdedmodule/systemdirnotify.cpp
@@ -26,7 +26,7 @@
#include <kdirnotify_stub.h>
-#include <qdir.h>
+#include <tqdir.h>
SystemDirNotify::SystemDirNotify()
: mInited( false )
@@ -41,21 +41,21 @@ void SystemDirNotify::init()
KGlobal::dirs()->addResourceType("system_entries",
KStandardDirs::kde_default("data") + "systemview");
- QStringList names_found;
- QStringList dirList = KGlobal::dirs()->resourceDirs("system_entries");
+ TQStringList names_found;
+ TQStringList dirList = KGlobal::dirs()->resourceDirs("system_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 );
- QStringList::ConstIterator name = filenames.begin();
- QStringList::ConstIterator endf = filenames.end();
+ TQStringList::ConstIterator name = filenames.begin();
+ TQStringList::ConstIterator endf = filenames.end();
for(; name!=endf; ++name)
{
@@ -63,7 +63,7 @@ void SystemDirNotify::init()
{
KDesktopFile desktop(*dirpath+*name, true);
- QString system_name = *name;
+ TQString system_name = *name;
system_name.truncate(system_name.length()-8);
KURL system_url("system:/"+system_name);
@@ -90,8 +90,8 @@ KURL SystemDirNotify::toSystemURL(const KURL &url)
kdDebug() << "SystemDirNotify::toSystemURL(" << url << ")" << endl;
init();
- QMap<KURL,KURL>::const_iterator it = m_urlMap.begin();
- QMap<KURL,KURL>::const_iterator end = m_urlMap.end();
+ TQMap<KURL,KURL>::const_iterator it = m_urlMap.begin();
+ TQMap<KURL,KURL>::const_iterator end = m_urlMap.end();
for (; it!=end; ++it)
{
@@ -99,7 +99,7 @@ KURL SystemDirNotify::toSystemURL(const KURL &url)
if ( base.isParentOf(url) )
{
- QString path = KURL::relativePath(base.path(),
+ TQString path = KURL::relativePath(base.path(),
url.path());
KURL result = it.data();
result.addPath(path);
diff --git a/kioslave/system/kdedmodule/systemdirnotify.h b/kioslave/system/kdedmodule/systemdirnotify.h
index 34da65b82..b743ddb42 100644
--- a/kioslave/system/kdedmodule/systemdirnotify.h
+++ b/kioslave/system/kdedmodule/systemdirnotify.h
@@ -21,7 +21,7 @@
#include <kurl.h>
#include <kdirnotify.h>
-#include <qmap.h>
+#include <tqmap.h>
class SystemDirNotify : public KDirNotify
{
@@ -40,7 +40,7 @@ private:
KURL toSystemURL(const KURL &url);
KURL::List toSystemURLList(const KURL::List &list);
- QMap<KURL,KURL> m_urlMap;
+ TQMap<KURL,KURL> m_urlMap;
bool mInited;
};
diff --git a/kioslave/system/kdedmodule/systemdirnotifymodule.cpp b/kioslave/system/kdedmodule/systemdirnotifymodule.cpp
index 36c46fcd0..b89daf129 100644
--- a/kioslave/system/kdedmodule/systemdirnotifymodule.cpp
+++ b/kioslave/system/kdedmodule/systemdirnotifymodule.cpp
@@ -22,13 +22,13 @@
#include <klocale.h>
#include <kglobal.h>
-SystemDirNotifyModule::SystemDirNotifyModule(const QCString &obj)
+SystemDirNotifyModule::SystemDirNotifyModule(const TQCString &obj)
: KDEDModule(obj)
{
}
extern "C" {
- KDE_EXPORT KDEDModule *create_systemdirnotify(const QCString &obj)
+ KDE_EXPORT KDEDModule *create_systemdirnotify(const TQCString &obj)
{
KGlobal::locale()->insertCatalogue("kio_system");
return new SystemDirNotifyModule(obj);
diff --git a/kioslave/system/kdedmodule/systemdirnotifymodule.h b/kioslave/system/kdedmodule/systemdirnotifymodule.h
index c75cd1a9e..e979ba098 100644
--- a/kioslave/system/kdedmodule/systemdirnotifymodule.h
+++ b/kioslave/system/kdedmodule/systemdirnotifymodule.h
@@ -28,7 +28,7 @@ class SystemDirNotifyModule : public KDEDModule
K_DCOP
public:
- SystemDirNotifyModule(const QCString &obj);
+ SystemDirNotifyModule(const TQCString &obj);
private:
SystemDirNotify notifier;
};
diff --git a/kioslave/system/kio_system.cpp b/kioslave/system/kio_system.cpp
index c2683add8..1f86a90d1 100644
--- a/kioslave/system/kio_system.cpp
+++ b/kioslave/system/kio_system.cpp
@@ -25,7 +25,7 @@
#include <kcmdlineargs.h>
#include <dcopclient.h>
-#include <qeventloop.h>
+#include <tqeventloop.h>
#include "kio_system.h"
@@ -57,8 +57,8 @@ extern "C" {
}
-SystemProtocol::SystemProtocol(const QCString &protocol,
- const QCString &pool, const QCString &app)
+SystemProtocol::SystemProtocol(const TQCString &protocol,
+ const TQCString &pool, const TQCString &app)
: ForwardingSlaveBase(protocol, pool, app)
{
}
@@ -69,7 +69,7 @@ SystemProtocol::~SystemProtocol()
bool SystemProtocol::rewriteURL(const KURL &url, KURL &newUrl)
{
- QString name, path;
+ TQString name, path;
if ( !m_impl.parseURL(url, name, path) )
{
@@ -91,7 +91,7 @@ void SystemProtocol::stat(const KURL &url)
{
kdDebug() << "SystemProtocol::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
@@ -102,7 +102,7 @@ void SystemProtocol::stat(const KURL &url)
return;
}
- QString name;
+ TQString name;
bool ok = m_impl.parseURL(url, name, path);
if ( !ok )
@@ -141,7 +141,7 @@ void SystemProtocol::listDir(const KURL &url)
return;
}
- QString name, path;
+ TQString name, path;
bool ok = m_impl.parseURL(url, name, path);
if ( !ok )
diff --git a/kioslave/system/kio_system.h b/kioslave/system/kio_system.h
index 8c7c4664c..916c495e5 100644
--- a/kioslave/system/kio_system.h
+++ b/kioslave/system/kio_system.h
@@ -27,8 +27,8 @@
class SystemProtocol : public KIO::ForwardingSlaveBase
{
public:
- SystemProtocol(const QCString &protocol, const QCString &pool,
- const QCString &app);
+ SystemProtocol(const TQCString &protocol, const TQCString &pool,
+ const TQCString &app);
virtual ~SystemProtocol();
virtual bool rewriteURL(const KURL &url, KURL &newUrl);
diff --git a/kioslave/system/systemimpl.cpp b/kioslave/system/systemimpl.cpp
index 46214ce20..a53c85045 100644
--- a/kioslave/system/systemimpl.cpp
+++ b/kioslave/system/systemimpl.cpp
@@ -24,40 +24,40 @@
#include <kstandarddirs.h>
#include <kdesktopfile.h>
-#include <qapplication.h>
-#include <qeventloop.h>
-#include <qdir.h>
+#include <tqapplication.h>
+#include <tqeventloop.h>
+#include <tqdir.h>
#include <sys/stat.h>
-SystemImpl::SystemImpl() : QObject()
+SystemImpl::SystemImpl() : TQObject()
{
KGlobal::dirs()->addResourceType("system_entries",
KStandardDirs::kde_default("data") + "systemview");
}
-bool SystemImpl::listRoot(QValueList<KIO::UDSEntry> &list)
+bool SystemImpl::listRoot(TQValueList<KIO::UDSEntry> &list)
{
kdDebug() << "SystemImpl::listRoot" << endl;
- QStringList names_found;
- QStringList dirList = KGlobal::dirs()->resourceDirs("system_entries");
+ TQStringList names_found;
+ TQStringList dirList = KGlobal::dirs()->resourceDirs("system_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 filename = filenames.begin();
- QStringList::ConstIterator endf = filenames.end();
+ TQStringList::ConstIterator filename = filenames.begin();
+ TQStringList::ConstIterator endf = filenames.end();
for(; filename!=endf; ++filename)
{
@@ -77,9 +77,9 @@ bool SystemImpl::listRoot(QValueList<KIO::UDSEntry> &list)
return true;
}
-bool SystemImpl::parseURL(const KURL &url, QString &name, QString &path) const
+bool SystemImpl::parseURL(const KURL &url, TQString &name, TQString &path) const
{
- QString url_path = url.path();
+ TQString url_path = url.path();
int i = url_path.find('/', 1);
if (i > 0)
@@ -90,13 +90,13 @@ bool SystemImpl::parseURL(const KURL &url, QString &name, QString &path) const
else
{
name = url_path.mid(1);
- path = QString::null;
+ path = TQString::null;
}
- return name != QString::null;
+ return name != TQString::null;
}
-bool SystemImpl::realURL(const QString &name, const QString &path,
+bool SystemImpl::realURL(const TQString &name, const TQString &path,
KURL &url) const
{
url = findBaseURL(name);
@@ -109,25 +109,25 @@ bool SystemImpl::realURL(const QString &name, const QString &path,
return true;
}
-bool SystemImpl::statByName(const QString &filename, KIO::UDSEntry& entry)
+bool SystemImpl::statByName(const TQString &filename, KIO::UDSEntry& entry)
{
kdDebug() << "SystemImpl::statByName" << endl;
- QStringList dirList = KGlobal::dirs()->resourceDirs("system_entries");
+ TQStringList dirList = KGlobal::dirs()->resourceDirs("system_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 );
- QStringList::ConstIterator name = filenames.begin();
- QStringList::ConstIterator endf = filenames.end();
+ TQStringList::ConstIterator name = filenames.begin();
+ TQStringList::ConstIterator endf = filenames.end();
for(; name!=endf; ++name)
{
@@ -142,27 +142,27 @@ bool SystemImpl::statByName(const QString &filename, KIO::UDSEntry& entry)
return false;
}
-KURL SystemImpl::findBaseURL(const QString &filename) const
+KURL SystemImpl::findBaseURL(const TQString &filename) const
{
kdDebug() << "SystemImpl::findBaseURL" << endl;
- QStringList dirList = KGlobal::dirs()->resourceDirs("system_entries");
+ TQStringList dirList = KGlobal::dirs()->resourceDirs("system_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)
{
@@ -186,7 +186,7 @@ KURL SystemImpl::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;
@@ -207,8 +207,8 @@ void SystemImpl::createTopLevelEntry(KIO::UDSEntry &entry) const
}
void SystemImpl::createEntry(KIO::UDSEntry &entry,
- const QString &directory,
- const QString &file)
+ const TQString &directory,
+ const TQString &file)
{
kdDebug() << "SystemImpl::createEntry" << endl;
@@ -226,7 +226,7 @@ void SystemImpl::createEntry(KIO::UDSEntry &entry,
addAtom(entry, KIO::UDS_NAME, 0, desktop.readName());
- QString new_filename = file;
+ TQString new_filename = file;
new_filename.truncate(file.length()-8);
if ( desktop.readURL().isEmpty() )
@@ -241,8 +241,8 @@ void SystemImpl::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();
- QString empty_icon = desktop.readEntry("EmptyIcon");
+ TQString icon = desktop.readIcon();
+ TQString empty_icon = desktop.readEntry("EmptyIcon");
if (!empty_icon.isEmpty())
{
@@ -251,12 +251,12 @@ void SystemImpl::createEntry(KIO::UDSEntry &entry,
m_lastListingEmpty = true;
KIO::ListJob *job = KIO::listDir(url, false, false);
- connect( job, SIGNAL( entries(KIO::Job *,
+ connect( job, TQT_SIGNAL( entries(KIO::Job *,
const KIO::UDSEntryList &) ),
- this, SLOT( slotEntries(KIO::Job *,
+ this, TQT_SLOT( slotEntries(KIO::Job *,
const KIO::UDSEntryList &) ) );
- connect( job, SIGNAL( result(KIO::Job *) ),
- this, SLOT( slotResult(KIO::Job *) ) );
+ connect( job, TQT_SIGNAL( result(KIO::Job *) ),
+ this, TQT_SLOT( slotResult(KIO::Job *) ) );
qApp->eventLoop()->enterLoop();
if (m_lastListingEmpty) icon = empty_icon;
diff --git a/kioslave/system/systemimpl.h b/kioslave/system/systemimpl.h
index a06874465..2cddeb120 100644
--- a/kioslave/system/systemimpl.h
+++ b/kioslave/system/systemimpl.h
@@ -25,8 +25,8 @@
#include <kurl.h>
#include <dcopobject.h>
-#include <qobject.h>
-#include <qstring.h>
+#include <tqobject.h>
+#include <tqstring.h>
class SystemImpl : public QObject
{
@@ -35,31 +35,31 @@ public:
SystemImpl();
void createTopLevelEntry(KIO::UDSEntry& entry) const;
- bool statByName(const QString &filename, KIO::UDSEntry& entry);
+ bool statByName(const TQString &filename, KIO::UDSEntry& entry);
- bool listRoot(QValueList<KIO::UDSEntry> &list);
+ bool listRoot(TQValueList<KIO::UDSEntry> &list);
- bool parseURL(const KURL &url, QString &name, QString &path) const;
- bool realURL(const QString &name, const QString &path, KURL &url) const;
+ bool parseURL(const KURL &url, TQString &name, TQString &path) const;
+ bool realURL(const TQString &name, const TQString &path, KURL &url) const;
int lastErrorCode() const { return m_lastErrorCode; }
- QString lastErrorMessage() const { return m_lastErrorMessage; }
+ TQString lastErrorMessage() const { return m_lastErrorMessage; }
private slots:
- KURL findBaseURL(const QString &filename) const;
+ KURL findBaseURL(const TQString &filename) const;
void slotEntries(KIO::Job *job, const KIO::UDSEntryList &list);
void slotResult(KIO::Job *job);
private:
- void createEntry(KIO::UDSEntry& entry, const QString &directory,
- const QString &file);
+ void createEntry(KIO::UDSEntry& entry, const TQString &directory,
+ const TQString &file);
bool m_lastListingEmpty;
/// Last error code stored in class to simplify API.
/// Note that this means almost no method can be const.
int m_lastErrorCode;
- QString m_lastErrorMessage;
+ TQString m_lastErrorMessage;
};
#endif
diff --git a/kioslave/system/testsystem.cpp b/kioslave/system/testsystem.cpp
index 95107680f..d9ad43e50 100644
--- a/kioslave/system/testsystem.cpp
+++ b/kioslave/system/testsystem.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;
}