r18451 by jghali - remove some Windows specific Qt4 code

scribus-commit scribus-commit at lists.scribus.net
Tue Sep 3 21:26:10 UTC 2013


Author: jghali
Date: Tue Sep  3 21:26:10 2013
New Revision: 18451

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=18451
Log:
remove some Windows specific Qt4 code

Modified:
    trunk/Scribus/scribus/main_win32.cpp

Modified: trunk/Scribus/scribus/main_win32.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18451&path=/trunk/Scribus/scribus/main_win32.cpp
==============================================================================
--- trunk/Scribus/scribus/main_win32.cpp (original)
+++ trunk/Scribus/scribus/main_win32.cpp Tue Sep  3 21:26:10 2013
@@ -62,11 +62,7 @@
 static void defaultCrashHandler(DWORD exceptionCode);
 
 // Console IO redirection handling
-#ifdef USE_QT5
 void messageHandler(QtMsgType type, const QMessageLogContext &context, const QString &msg);
-#else
-void messageHandler(QtMsgType type, const char *msg);
-#endif
 bool consoleOptionEnabled(int argc, char* argv[]);
 void redirectIOToConsole(void);
 
@@ -90,11 +86,7 @@
 	if (consoleOptionEnabled(argc, argv))
 	{
 		redirectIOToConsole();
-#ifdef USE_QT5
 		qInstallMessageHandler(messageHandler);
-#else
-		qInstallMsgHandler(messageHandler);
-#endif
 	}
 #endif
 	ScribusQApp app(argc, argv);
@@ -304,7 +296,6 @@
 	ExitProcess(255);
 }
 
-#ifdef USE_QT5
 void messageHandler(QtMsgType type, const QMessageLogContext &context, const QString &msg)
 {
 	QByteArray localMsg = msg.toLocal8Bit();
@@ -341,25 +332,6 @@
 		ExitProcess(255);
 	}
 }
-#else
-void messageHandler( QtMsgType type, const char *msg )
-{
-	cerr << msg << endl;
-	if (type == QtFatalMsg)
-	{
-		if (ScribusQApp::useGUI)
-		{
-			ScCore->closeSplash();
-			QString expHdr = QObject::tr("Scribus Crash");
-			QString expMsg = msg;
-			QMessageBox::critical(ScMW, expHdr, expMsg, QObject::tr("&OK"));
-			ScMW->emergencySave();
-			ScMW->close();
-		}
-		ExitProcess(255);
-	}
-}
-#endif
 
 bool consoleOptionEnabled(int argc, char* argv[])
 {




More information about the scribus-commit mailing list