diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-05-17 08:20:48 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-05-17 08:20:48 +0000 |
commit | aa0726b20f398264f0a2abc60215be044b106f9c (patch) | |
tree | 070fdbc19a1106cfdd7f651a8ce76bb1b89a513d /src/global.cpp | |
parent | d3cf5b3e75aadc3b02d0b56f030d4c3f8c2c749d (diff) | |
download | basket-aa0726b20f398264f0a2abc60215be044b106f9c.tar.gz basket-aa0726b20f398264f0a2abc60215be044b106f9c.zip |
TQt4 port basket
This enables compilation under both Qt3 and Qt4
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/basket@1232416 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'src/global.cpp')
-rw-r--r-- | src/global.cpp | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/src/global.cpp b/src/global.cpp index 7645248..f8b6f74 100644 --- a/src/global.cpp +++ b/src/global.cpp @@ -20,11 +20,11 @@ #include <kglobal.h> #include <kstandarddirs.h> -#include <qstring.h> +#include <tqstring.h> #include <kaction.h> #include <kapplication.h> #include <kmainwindow.h> -#include <qdir.h> +#include <tqdir.h> #include <kdebug.h> #include <kconfig.h> @@ -34,7 +34,7 @@ /** Define initial values for global variables : */ -QString Global::s_customSavesFolder = ""; +TQString Global::s_customSavesFolder = ""; LikeBack *Global::likeBack = 0L; DebugWindow *Global::debugWindow = 0L; BackgroundManager *Global::backgroundManager = 0L; @@ -44,46 +44,46 @@ KGlobalAccel *Global::globalAccel = 0L; KConfig *Global::basketConfig = 0L; AboutData Global::basketAbout; -void Global::setCustomSavesFolder(const QString &folder) +void Global::setCustomSavesFolder(const TQString &folder) { s_customSavesFolder = folder; } #include <iostream> -QString Global::savesFolder() +TQString Global::savesFolder() { - static QString *folder = 0L; // Memorize the folder to do not have to re-compute it each time it's needed + static TQString *folder = 0L; // Memorize the folder to do not have to re-compute it each time it's needed if (folder == 0L) { // Initialize it if not yet done if (!s_customSavesFolder.isEmpty()) { // Passed by command line (for development & debug purpose) - QDir dir; + TQDir dir; dir.mkdir(s_customSavesFolder); - folder = new QString(s_customSavesFolder.endsWith("/") ? s_customSavesFolder : s_customSavesFolder + "/"); + folder = new TQString(s_customSavesFolder.endsWith("/") ? s_customSavesFolder : s_customSavesFolder + "/"); } else if (!Settings::dataFolder().isEmpty()) { // Set by config option (in Basket -> Backup & Restore) - QDir dir; + TQDir dir; dir.mkdir(s_customSavesFolder); - folder = new QString(Settings::dataFolder().endsWith("/") ? Settings::dataFolder() : Settings::dataFolder() + "/"); + folder = new TQString(Settings::dataFolder().endsWith("/") ? Settings::dataFolder() : Settings::dataFolder() + "/"); } else { // The default path (should be that for most computers) - folder = new QString(KGlobal::dirs()->saveLocation("data", "basket/")); + folder = new TQString(KGlobal::dirs()->saveLocation("data", "basket/")); } } return *folder; } -QString Global::basketsFolder() { return savesFolder() + "baskets/"; } -QString Global::backgroundsFolder() { return savesFolder() + "backgrounds/"; } -QString Global::templatesFolder() { return savesFolder() + "templates/"; } -QString Global::tempCutFolder() { return savesFolder() + "temp-cut/"; } +TQString Global::basketsFolder() { return savesFolder() + "baskets/"; } +TQString Global::backgroundsFolder() { return savesFolder() + "backgrounds/"; } +TQString Global::templatesFolder() { return savesFolder() + "templates/"; } +TQString Global::tempCutFolder() { return savesFolder() + "temp-cut/"; } -QString Global::openNoteIcon() // FIXME: Now an edit icon +TQString Global::openNoteIcon() // FIXME: Now an edit icon { return Global::bnpView->m_actEditNote->icon(); } KMainWindow* Global::mainWindow() { - QWidget* res = kapp->mainWidget(); + TQWidget* res = kapp->mainWidget(); if(res && res->inherits("KMainWindow")) { |