-rw-r--r-- | library/qpeapplication.cpp | 23 |
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 | |||
@@ -782,2 +782,24 @@ static void qtopia_loadTranslations( const QStringList& qms ) | |||
782 | 782 | ||
783 | /* | ||
784 | Turn off qDebug in release mode | ||
785 | */ | ||
786 | static 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 | /*! |
@@ -793,2 +815,3 @@ QPEApplication::QPEApplication( int & argc, char **argv, Type t ) | |||
793 | QPixmapCache::setCacheLimit(256); // sensible default for smaller devices. | 815 | QPixmapCache::setCacheLimit(256); // sensible default for smaller devices. |
816 | qInstallMsgHandler(qtopiaMsgHandler); | ||
794 | 817 | ||