diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-25 05:28:35 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-25 05:28:35 +0000 |
commit | f008adb5a77e094eaf6abf3fc0f36958e66896a5 (patch) | |
tree | 8e9244c4d4957c36be81e15b566b4aa5ea26c982 /krita/ui/kis_resourceserver.cc | |
parent | 1210f27b660efb7b37ff43ec68763e85a403471f (diff) | |
download | koffice-f008adb5a77e094eaf6abf3fc0f36958e66896a5.tar.gz koffice-f008adb5a77e094eaf6abf3fc0f36958e66896a5.zip |
TQt4 port koffice
This should enable compilation under both Qt3 and Qt4; fixes for any missed components will be forthcoming
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/koffice@1238284 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'krita/ui/kis_resourceserver.cc')
-rw-r--r-- | krita/ui/kis_resourceserver.cc | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/krita/ui/kis_resourceserver.cc b/krita/ui/kis_resourceserver.cc index c72f9b80..d464e1bc 100644 --- a/krita/ui/kis_resourceserver.cc +++ b/krita/ui/kis_resourceserver.cc @@ -19,10 +19,10 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include <qfileinfo.h> -#include <qstringlist.h> -#include <qthread.h> -#include <qdir.h> +#include <tqfileinfo.h> +#include <tqstringlist.h> +#include <tqthread.h> +#include <tqdir.h> #include <kdebug.h> #include <kglobal.h> @@ -40,7 +40,7 @@ #include "kis_palette.h" #include <kogradientmanager.h> -KisResourceServerBase::KisResourceServerBase(QString type) +KisResourceServerBase::KisResourceServerBase(TQString type) : m_type(type), m_loaded(false) { } @@ -49,22 +49,22 @@ KisResourceServerBase::~KisResourceServerBase() { } -void KisResourceServerBase::loadResources(QStringList filenames) +void KisResourceServerBase::loadResources(TQStringList filenames) { - QStringList uniqueFiles; + TQStringList uniqueFiles; while( !filenames.empty() ) { - QString front = *filenames.begin(); + TQString front = *filenames.begin(); filenames.pop_front(); - QString fname = QFileInfo(front).fileName(); + TQString fname = TQFileInfo(front).fileName(); //ebug() << "Loading " << fname << "\n"; // XXX: Don't load resources with the same filename. Actually, we should look inside // the resource to find out whether they are really the same, but for now this // will prevent the same brush etc. showing up twice. - if (uniqueFiles.empty() || uniqueFiles.find(fname) == uniqueFiles.end()) { + if (uniqueFiles.empty() || uniqueFiles.tqfind(fname) == uniqueFiles.end()) { uniqueFiles.append(fname); KisResource *resource; resource = createResource(front); @@ -82,10 +82,10 @@ void KisResourceServerBase::loadResources(QStringList filenames) m_loaded = true; } -QValueList<KisResource*> KisResourceServerBase::resources() +TQValueList<KisResource*> KisResourceServerBase::resources() { if(!m_loaded) { - return QValueList<KisResource*>(); + return TQValueList<KisResource*>(); } return m_resources; @@ -103,12 +103,12 @@ void KisResourceServerBase::addResource(KisResource* resource) } -class ResourceLoaderThread : public QThread { +class ResourceLoaderThread : public TQThread { public: - ResourceLoaderThread(KisResourceServerBase * server, QStringList files) - : QThread() + ResourceLoaderThread(KisResourceServerBase * server, TQStringList files) + : TQThread() , m_server(server) , m_fileNames( files ) { @@ -123,18 +123,18 @@ public: private: KisResourceServerBase * m_server; - QStringList m_fileNames; + TQStringList m_fileNames; }; -QStringList getFileNames( QString extensions, QString type ) +TQStringList getFileNames( TQString extensions, TQString type ) { - QStringList extensionList = QStringList::split(":", extensions); - QStringList fileNames; + TQStringList extensionList = TQStringList::split(":", extensions); + TQStringList fileNames; - QStringList::Iterator it; + TQStringList::Iterator it; for ( it = extensionList.begin(); it != extensionList.end(); ++it ) { - QString s = (*it); + TQString s = (*it); fileNames += KisFactory::instance()->dirs()->findAllResources(type.ascii(), (*it)); } return fileNames; |