author | Michael Krelin <hacker@klever.net> | 2007-07-04 11:23:42 (UTC) |
---|---|---|
committer | Michael Krelin <hacker@klever.net> | 2007-07-04 11:23:42 (UTC) |
commit | a08aff328d4393031d5ba7d622c2b05705a89d73 (patch) (side-by-side diff) | |
tree | 8ee90d686081c52e7c69b5ce946e9b1a7d690001 /microkde/kglobal.cpp | |
parent | 11edc920afe4f274c0964436633aa632c8288a40 (diff) | |
download | kdepimpi-a08aff328d4393031d5ba7d622c2b05705a89d73.zip kdepimpi-a08aff328d4393031d5ba7d622c2b05705a89d73.tar.gz kdepimpi-a08aff328d4393031d5ba7d622c2b05705a89d73.tar.bz2 |
initial public commit of qt4 portp1
-rw-r--r-- | microkde/kglobal.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/microkde/kglobal.cpp b/microkde/kglobal.cpp index 53edd08..9cc5835 100644 --- a/microkde/kglobal.cpp +++ b/microkde/kglobal.cpp @@ -1,48 +1,49 @@ #include "kglobal.h" #include "kstandarddirs.h" -#include <qkeycode.h> +#include <qnamespace.h> #include <qapplication.h> +#include <QDesktopWidget> KLocale *KGlobal::mLocale = 0; KConfig *KGlobal::mConfig = 0; KIconLoader *KGlobal::mIconLoader = 0; KStandardDirs *KGlobal::mDirs = 0; QString KGlobal::mAppName = "godot"; KLocale *KGlobal::locale() { if ( !mLocale ) { - ASSERT(mAppName); + Q_ASSERT(!mAppName.isEmpty()); mLocale = new KLocale();//mAppName); } return mLocale; } //US void KGlobal::setLocale(KLocale *kg) { mLocale = kg; } KConfig *KGlobal::config() { //mConfig is set inside setAppName. Though it has to be the first function you call. return mConfig; } KGlobal::Size KGlobal::getDesktopSize() { #ifdef DESKTOP_VERSION return KGlobal::Desktop; #else if ( QApplication::desktop()->width() <= 320 ) return KGlobal::Small; else if ( QApplication::desktop()->width() > 480) return KGlobal::Desktop; else return KGlobal::Medium; #endif } |