Esempio n. 1
0
/*!
\author Franz Schmid
\author Alessandro Rimoldi
\author Craig Bradney
\date Mon Feb  9 14:07:46 CET 2004
\brief Launches the Gui
\param argc Number of arguments passed to Scribus
\param argv *argv list of the arguments passed to Scribus
\retval int Error code from the execution of Scribus
*/
int mainApp(int argc, char **argv)
{
	emergencyActivated=false;
#if QT_VERSION >= 0x050600
	ScribusQApp::setAttribute(Qt::AA_EnableHighDpiScaling);
#endif
	ScribusQApp app(argc, argv);
	initCrashHandler();
	app.parseCommandLine();
	int appRetVal=app.init();
	if (appRetVal==EXIT_FAILURE)
		return(EXIT_FAILURE);
	if (app.useGUI)
		return app.exec();
	return EXIT_SUCCESS;	
}
Esempio n. 2
0
/*!
\author Franz Schmid
\author Alessandro Rimoldi
\author Craig Bradney
\date Mon Feb  9 14:07:46 CET 2004
\brief Launches the Gui
\param argc Number of arguments passed to Scribus
\param argv *argv list of the arguments passed to Scribus
\retval int Error code from the execution of Scribus
*/
int mainApp(int argc, char **argv)
{
	emergencyActivated=false;

	ScribusQApp app(argc, argv);
	initCrashHandler();
/* possible fix for the Qt-4.4.0 locale problem */
#ifdef Q_OS_UNIX
// 	setlocale(LC_ALL, "C");                // use correct char set mapping
#if (QT_VERSION == 0x040400) || (QT_VERSION == 0x040500)
	setlocale(LC_NUMERIC, "C");        // make sprintf()/scanf() work
#endif // QT_VERSION == 0x040400
#endif // Q_OS_UNIX
	app.parseCommandLine();
	if (app.useGUI)
	{
		int appRetVal=app.init();
		if (appRetVal==EXIT_FAILURE)
			return(EXIT_FAILURE);
		return app.exec();
	}
	return EXIT_SUCCESS;	
}