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/home/homeimpl.cpp | 42 ++++++++++++------------ kioslave/home/homeimpl.h | 10 +++--- kioslave/home/kdedmodule/homedirnotify.cpp | 24 +++++++------- kioslave/home/kdedmodule/homedirnotify.h | 4 +-- kioslave/home/kdedmodule/homedirnotifymodule.cpp | 4 +-- kioslave/home/kdedmodule/homedirnotifymodule.h | 2 +- kioslave/home/kio_home.cpp | 12 +++---- kioslave/home/kio_home.h | 4 +-- kioslave/home/testhome.cpp | 6 ++-- 9 files changed, 54 insertions(+), 54 deletions(-) (limited to 'kioslave/home') diff --git a/kioslave/home/homeimpl.cpp b/kioslave/home/homeimpl.cpp index 7e86173ba..12a692319 100644 --- a/kioslave/home/homeimpl.cpp +++ b/kioslave/home/homeimpl.cpp @@ -20,8 +20,8 @@ #include "homeimpl.h" #include -#include -#include +#include +#include #include @@ -33,9 +33,9 @@ HomeImpl::HomeImpl() m_effectiveUid = user.uid(); } -bool HomeImpl::parseURL(const KURL &url, QString &name, QString &path) const +bool HomeImpl::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) @@ -46,13 +46,13 @@ bool HomeImpl::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 HomeImpl::realURL(const QString &name, const QString &path, KURL &url) +bool HomeImpl::realURL(const TQString &name, const TQString &path, KURL &url) { KUser user(name); @@ -69,23 +69,23 @@ bool HomeImpl::realURL(const QString &name, const QString &path, KURL &url) } -bool HomeImpl::listHomes(QValueList &list) +bool HomeImpl::listHomes(TQValueList &list) { kdDebug() << "HomeImpl::listHomes" << endl; KUser current_user; - QValueList groups = current_user.groups(); - QValueList uid_list; + TQValueList groups = current_user.groups(); + TQValueList uid_list; - QValueList::iterator groups_it = groups.begin(); - QValueList::iterator groups_end = groups.end(); + TQValueList::iterator groups_it = groups.begin(); + TQValueList::iterator groups_end = groups.end(); for(; groups_it!=groups_end; ++groups_it) { - QValueList users = (*groups_it).users(); + TQValueList users = (*groups_it).users(); - QValueList::iterator it = users.begin(); - QValueList::iterator users_end = users.end(); + TQValueList::iterator it = users.begin(); + TQValueList::iterator users_end = users.end(); for(; it!=users_end; ++it) { @@ -104,7 +104,7 @@ bool HomeImpl::listHomes(QValueList &list) } 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; @@ -133,7 +133,7 @@ void HomeImpl::createHomeEntry(KIO::UDSEntry &entry, entry.clear(); - QString full_name = user.loginName(); + TQString full_name = user.loginName(); if (!user.fullName().isEmpty()) { @@ -148,7 +148,7 @@ void HomeImpl::createHomeEntry(KIO::UDSEntry &entry, addAtom(entry, KIO::UDS_FILE_TYPE, S_IFDIR); addAtom(entry, KIO::UDS_MIME_TYPE, 0, "inode/directory"); - QString icon_name = "folder_home2"; + TQString icon_name = "folder_home2"; if (user.uid()==m_effectiveUid) { @@ -162,7 +162,7 @@ void HomeImpl::createHomeEntry(KIO::UDSEntry &entry, entry += extractUrlInfos(url); } -bool HomeImpl::statHome(const QString &name, KIO::UDSEntry &entry) +bool HomeImpl::statHome(const TQString &name, KIO::UDSEntry &entry) { kdDebug() << "HomeImpl::statHome: " << name << endl; @@ -193,8 +193,8 @@ KIO::UDSEntry HomeImpl::extractUrlInfos(const KURL &url) m_entryBuffer.clear(); KIO::StatJob *job = KIO::stat(url, false); - connect( job, SIGNAL( result(KIO::Job *) ), - this, SLOT( slotStatResult(KIO::Job *) ) ); + connect( job, TQT_SIGNAL( result(KIO::Job *) ), + this, TQT_SLOT( slotStatResult(KIO::Job *) ) ); qApp->eventLoop()->enterLoop(); KIO::UDSEntry::iterator it = m_entryBuffer.begin(); diff --git a/kioslave/home/homeimpl.h b/kioslave/home/homeimpl.h index 8c4ace279..62c7b3868 100644 --- a/kioslave/home/homeimpl.h +++ b/kioslave/home/homeimpl.h @@ -25,7 +25,7 @@ #include #include -#include +#include class HomeImpl : public QObject { @@ -33,11 +33,11 @@ Q_OBJECT public: HomeImpl(); - bool parseURL(const KURL &url, QString &name, QString &path) const; - bool realURL(const QString &name, const QString &path, KURL &url); + bool parseURL(const KURL &url, TQString &name, TQString &path) const; + bool realURL(const TQString &name, const TQString &path, KURL &url); - bool statHome(const QString &name, KIO::UDSEntry &entry); - bool listHomes(QValueList &list); + bool statHome(const TQString &name, KIO::UDSEntry &entry); + bool listHomes(TQValueList &list); void createTopLevelEntry(KIO::UDSEntry &entry) const; diff --git a/kioslave/home/kdedmodule/homedirnotify.cpp b/kioslave/home/kdedmodule/homedirnotify.cpp index e4eab44bb..823027fe2 100644 --- a/kioslave/home/kdedmodule/homedirnotify.cpp +++ b/kioslave/home/kdedmodule/homedirnotify.cpp @@ -37,18 +37,18 @@ void HomeDirNotify::init() mInited = true; KUser current_user; - QValueList groups = current_user.groups(); - QValueList uid_list; + TQValueList groups = current_user.groups(); + TQValueList uid_list; - QValueList::iterator groups_it = groups.begin(); - QValueList::iterator groups_end = groups.end(); + TQValueList::iterator groups_it = groups.begin(); + TQValueList::iterator groups_end = groups.end(); for(; groups_it!=groups_end; ++groups_it) { - QValueList users = (*groups_it).users(); + TQValueList users = (*groups_it).users(); - QValueList::iterator it = users.begin(); - QValueList::iterator users_end = users.end(); + TQValueList::iterator it = users.begin(); + TQValueList::iterator users_end = users.end(); for(; it!=users_end; ++it) { @@ -57,7 +57,7 @@ void HomeDirNotify::init() { uid_list.append( (*it).uid() ); - QString name = (*it).loginName(); + TQString name = (*it).loginName(); KURL url; url.setPath( (*it).homeDir() ); @@ -72,17 +72,17 @@ KURL HomeDirNotify::toHomeURL(const KURL &url) kdDebug() << "HomeDirNotify::toHomeURL(" << url << ")" << endl; init(); - QMap::iterator it = m_homeFoldersMap.begin(); - QMap::iterator end = m_homeFoldersMap.end(); + TQMap::iterator it = m_homeFoldersMap.begin(); + TQMap::iterator end = m_homeFoldersMap.end(); for (; it!=end; ++it) { - QString name = it.key(); + TQString name = it.key(); KURL base = it.data(); if ( base.isParentOf(url) ) { - QString path = KURL::relativePath(base.path(), + TQString path = KURL::relativePath(base.path(), url.path()); KURL result("home:/"+name+"/"+path); result.cleanPath(); diff --git a/kioslave/home/kdedmodule/homedirnotify.h b/kioslave/home/kdedmodule/homedirnotify.h index 14655a1cd..dbbd0845e 100644 --- a/kioslave/home/kdedmodule/homedirnotify.h +++ b/kioslave/home/kdedmodule/homedirnotify.h @@ -22,7 +22,7 @@ #include #include -#include +#include class HomeDirNotify : public KDirNotify { @@ -41,7 +41,7 @@ private: KURL toHomeURL(const KURL &url); KURL::List toHomeURLList(const KURL::List &list); - QMap m_homeFoldersMap; + TQMap m_homeFoldersMap; bool mInited; }; diff --git a/kioslave/home/kdedmodule/homedirnotifymodule.cpp b/kioslave/home/kdedmodule/homedirnotifymodule.cpp index 1b91ccc31..03f664117 100644 --- a/kioslave/home/kdedmodule/homedirnotifymodule.cpp +++ b/kioslave/home/kdedmodule/homedirnotifymodule.cpp @@ -22,13 +22,13 @@ #include #include -HomeDirNotifyModule::HomeDirNotifyModule(const QCString &obj) +HomeDirNotifyModule::HomeDirNotifyModule(const TQCString &obj) : KDEDModule(obj) { } extern "C" { - KDE_EXPORT KDEDModule *create_homedirnotify(const QCString &obj) + KDE_EXPORT KDEDModule *create_homedirnotify(const TQCString &obj) { KGlobal::locale()->insertCatalogue("kio_home"); return new HomeDirNotifyModule(obj); diff --git a/kioslave/home/kdedmodule/homedirnotifymodule.h b/kioslave/home/kdedmodule/homedirnotifymodule.h index 159670fb6..69d96dfc9 100644 --- a/kioslave/home/kdedmodule/homedirnotifymodule.h +++ b/kioslave/home/kdedmodule/homedirnotifymodule.h @@ -28,7 +28,7 @@ class HomeDirNotifyModule : public KDEDModule K_DCOP public: - HomeDirNotifyModule(const QCString &obj); + HomeDirNotifyModule(const TQCString &obj); private: HomeDirNotify notifier; }; diff --git a/kioslave/home/kio_home.cpp b/kioslave/home/kio_home.cpp index 36a3161d8..c8a77acc5 100644 --- a/kioslave/home/kio_home.cpp +++ b/kioslave/home/kio_home.cpp @@ -56,8 +56,8 @@ extern "C" { } -HomeProtocol::HomeProtocol(const QCString &protocol, - const QCString &pool, const QCString &app) +HomeProtocol::HomeProtocol(const TQCString &protocol, + const TQCString &pool, const TQCString &app) : ForwardingSlaveBase(protocol, pool, app) { } @@ -68,7 +68,7 @@ HomeProtocol::~HomeProtocol() bool HomeProtocol::rewriteURL(const KURL &url, KURL &newUrl) { - QString name, path; + TQString name, path; if ( !m_impl.parseURL(url, name, path) ) { @@ -97,7 +97,7 @@ void HomeProtocol::listDir(const KURL &url) return; } - QString name, path; + TQString name, path; bool ok = m_impl.parseURL(url, name, path); if ( !ok ) @@ -145,7 +145,7 @@ void HomeProtocol::stat(const KURL &url) { kdDebug() << "HomeProtocol::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 @@ -156,7 +156,7 @@ void HomeProtocol::stat(const KURL &url) return; } - QString name; + TQString name; bool ok = m_impl.parseURL(url, name, path); if ( !ok ) diff --git a/kioslave/home/kio_home.h b/kioslave/home/kio_home.h index 1d5e237ea..cf5f3a3cd 100644 --- a/kioslave/home/kio_home.h +++ b/kioslave/home/kio_home.h @@ -26,8 +26,8 @@ class HomeProtocol : public KIO::ForwardingSlaveBase { public: - HomeProtocol(const QCString &protocol, const QCString &pool, - const QCString &app); + HomeProtocol(const TQCString &protocol, const TQCString &pool, + const TQCString &app); virtual ~HomeProtocol(); virtual bool rewriteURL(const KURL &url, KURL &newUrl); diff --git a/kioslave/home/testhome.cpp b/kioslave/home/testhome.cpp index e9d64ec68..61e7d9fa6 100644 --- a/kioslave/home/testhome.cpp +++ b/kioslave/home/testhome.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