summaryrefslogtreecommitdiff
path: root/library/qpeapplication.cpp
Unidiff
Diffstat (limited to 'library/qpeapplication.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--library/qpeapplication.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/library/qpeapplication.cpp b/library/qpeapplication.cpp
index b686e2e..f4a7f74 100644
--- a/library/qpeapplication.cpp
+++ b/library/qpeapplication.cpp
@@ -71,24 +71,25 @@
71 71
72#include <qpe/qlibrary.h> 72#include <qpe/qlibrary.h>
73#endif 73#endif
74#include "global.h" 74#include "global.h"
75#include "resource.h" 75#include "resource.h"
76#if QT_VERSION <= 230 && defined(QT_NO_CODECS) 76#if QT_VERSION <= 230 && defined(QT_NO_CODECS)
77#include "qutfcodec.h" 77#include "qutfcodec.h"
78#endif 78#endif
79#include "config.h" 79#include "config.h"
80#include "network.h" 80#include "network.h"
81#ifdef QWS 81#ifdef QWS
82#include "fontmanager.h" 82#include "fontmanager.h"
83#include "fontdatabase.h"
83#endif 84#endif
84 85
85#include "alarmserver.h" 86#include "alarmserver.h"
86#include "applnk.h" 87#include "applnk.h"
87#include "qpemenubar.h" 88#include "qpemenubar.h"
88#include "textcodecinterface.h" 89#include "textcodecinterface.h"
89#include "imagecodecinterface.h" 90#include "imagecodecinterface.h"
90 91
91#include <unistd.h> 92#include <unistd.h>
92#include <sys/file.h> 93#include <sys/file.h>
93#include <sys/ioctl.h> 94#include <sys/ioctl.h>
94#ifndef QT_NO_SOUND 95#ifndef QT_NO_SOUND
@@ -794,25 +795,24 @@ void QPEApplication::processQCopFile()
794 795
795 For applications, \a t should be the default, GuiClient. Only 796 For applications, \a t should be the default, GuiClient. Only
796 the Qtopia server passes GuiServer. 797 the Qtopia server passes GuiServer.
797*/ 798*/
798QPEApplication::QPEApplication( int & argc, char **argv, Type t ) 799QPEApplication::QPEApplication( int & argc, char **argv, Type t )
799 : QApplication( hack(argc), argv, t ), pidChannel( 0 ) 800 : QApplication( hack(argc), argv, t ), pidChannel( 0 )
800{ 801{
801 QPixmapCache::setCacheLimit(256); // sensible default for smaller devices. 802 QPixmapCache::setCacheLimit(256); // sensible default for smaller devices.
802 803
803 d = new QPEApplicationData; 804 d = new QPEApplicationData;
804 d->loadTextCodecs(); 805 d->loadTextCodecs();
805 d->loadImageCodecs(); 806 d->loadImageCodecs();
806 int dw = desktop() ->width();
807 807
808 setFont( QFont( d->fontFamily, d->fontSize ) ); 808 setFont( QFont( d->fontFamily, d->fontSize ) );
809 AppLnk::setSmallIconSize( d->smallIconSize ); 809 AppLnk::setSmallIconSize( d->smallIconSize );
810 AppLnk::setBigIconSize( d->bigIconSize ); 810 AppLnk::setBigIconSize( d->bigIconSize );
811 811
812 QMimeSourceFactory::setDefaultFactory( new ResourceMimeFactory ); 812 QMimeSourceFactory::setDefaultFactory( new ResourceMimeFactory );
813 813
814 connect( this, SIGNAL( lastWindowClosed() ), this, SLOT( hideOrQuit() ) ); 814 connect( this, SIGNAL( lastWindowClosed() ), this, SLOT( hideOrQuit() ) );
815 815
816 816
817 sysChannel = new QCopChannel( "QPE/System", this ); 817 sysChannel = new QCopChannel( "QPE/System", this );
818 connect( sysChannel, SIGNAL( received(const QCString&,const QByteArray&) ), 818 connect( sysChannel, SIGNAL( received(const QCString&,const QByteArray&) ),
@@ -869,26 +869,28 @@ QPEApplication::QPEApplication( int & argc, char **argv, Type t )
869 d->forceshow = TRUE; 869 d->forceshow = TRUE;
870 argc -= 1; 870 argc -= 1;
871 } 871 }
872 } 872 }
873 873
874 /* overide stored arguments */ 874 /* overide stored arguments */
875 setArgs( argc, argv ); 875 setArgs( argc, argv );
876 876
877#endif 877#endif
878#else 878#else
879 initApp( argc, argv ); 879 initApp( argc, argv );
880#endif 880#endif
881 // qwsSetDecoration( new QPEDecoration() ); 881#ifdef Q_WS_QWS
882 882 /* load the font renderer factories */
883 FontDatabase::loadRenderers();
884#endif
883#ifndef QT_NO_TRANSLATION 885#ifndef QT_NO_TRANSLATION
884 886
885 d->langs = Global::languageList(); 887 d->langs = Global::languageList();
886 for ( QStringList::ConstIterator it = d->langs.begin(); it != d->langs.end(); ++it ) { 888 for ( QStringList::ConstIterator it = d->langs.begin(); it != d->langs.end(); ++it ) {
887 QString lang = *it; 889 QString lang = *it;
888 890
889 installTranslation( lang + "/libopie.qm"); 891 installTranslation( lang + "/libopie.qm");
890 installTranslation( lang + "/libqpe.qm" ); 892 installTranslation( lang + "/libqpe.qm" );
891 installTranslation( lang + "/" + d->appName + ".qm" ); 893 installTranslation( lang + "/" + d->appName + ".qm" );
892 894
893 895
894 //###language/font hack; should look it up somewhere 896 //###language/font hack; should look it up somewhere