summaryrefslogtreecommitdiff
path: root/library/qpeapplication.cpp
Unidiff
Diffstat (limited to 'library/qpeapplication.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--library/qpeapplication.cpp23
1 files changed, 23 insertions, 0 deletions
diff --git a/library/qpeapplication.cpp b/library/qpeapplication.cpp
index 1117240..4adfc8f 100644
--- a/library/qpeapplication.cpp
+++ b/library/qpeapplication.cpp
@@ -775,27 +775,50 @@ static void qtopia_loadTranslations( const QStringList& qms )
775 qApp->installTranslator( trans ); 775 qApp->installTranslator( trans );
776 else 776 else
777 delete trans; 777 delete trans;
778 } 778 }
779 } 779 }
780} 780}
781#endif 781#endif
782 782
783/*
784 Turn off qDebug in release mode
785 */
786static void qtopiaMsgHandler(QtMsgType type, const char* msg)
787{
788 switch ( type ) {
789 case QtDebugMsg:
790#ifdef QT_DEBUG
791 fprintf( stderr, "Debug: %s\n", msg );
792#endif
793 break;
794 case QtWarningMsg:
795#ifdef QT_DEBUG
796 fprintf( stderr, "Warning: %s\n", msg );
797#endif
798 break;
799 case QtFatalMsg:
800 fprintf( stderr, "Fatal: %s\n", msg );
801 abort();
802 }
803}
804
783/*! 805/*!
784 Constructs a QPEApplication just as you would construct 806 Constructs a QPEApplication just as you would construct
785 a QApplication, passing \a argc, \a argv, and \a t. 807 a QApplication, passing \a argc, \a argv, and \a t.
786 808
787 For applications, \a t should be the default, GuiClient. Only 809 For applications, \a t should be the default, GuiClient. Only
788 the Qtopia server passes GuiServer. 810 the Qtopia server passes GuiServer.
789*/ 811*/
790QPEApplication::QPEApplication( int & argc, char **argv, Type t ) 812QPEApplication::QPEApplication( int & argc, char **argv, Type t )
791 : QApplication( hack(argc), argv, t ), pidChannel( 0 ) 813 : QApplication( hack(argc), argv, t ), pidChannel( 0 )
792{ 814{
793 QPixmapCache::setCacheLimit(256); // sensible default for smaller devices. 815 QPixmapCache::setCacheLimit(256); // sensible default for smaller devices.
816 qInstallMsgHandler(qtopiaMsgHandler);
794 817
795 d = new QPEApplicationData; 818 d = new QPEApplicationData;
796 d->loadTextCodecs(); 819 d->loadTextCodecs();
797 d->loadImageCodecs(); 820 d->loadImageCodecs();
798 821
799 setFont( QFont( d->fontFamily, d->fontSize ) ); 822 setFont( QFont( d->fontFamily, d->fontSize ) );
800 AppLnk::setSmallIconSize( d->smallIconSize ); 823 AppLnk::setSmallIconSize( d->smallIconSize );
801 AppLnk::setBigIconSize( d->bigIconSize ); 824 AppLnk::setBigIconSize( d->bigIconSize );