[QGIS Commit] r13494 - in trunk/qgis/src: app core
svn_qgis at osgeo.org
svn_qgis at osgeo.org
Sat May 15 12:16:00 EDT 2010
Author: mhugent
Date: 2010-05-15 12:15:59 -0400 (Sat, 15 May 2010)
New Revision: 13494
Modified:
trunk/qgis/src/app/main.cpp
trunk/qgis/src/core/qgsapplication.cpp
Log:
Move setWindowIcon from qgsapplication.cpp to main.cpp. Because QGIS mapserver uses qgsapplication, but it does not have access to an x-server instance
Modified: trunk/qgis/src/app/main.cpp
===================================================================
--- trunk/qgis/src/app/main.cpp 2010-05-15 15:37:35 UTC (rev 13493)
+++ trunk/qgis/src/app/main.cpp 2010-05-15 16:15:59 UTC (rev 13494)
@@ -73,6 +73,12 @@
#include "qgsrectangle.h"
#include "qgslogger.h"
+// (if Windows/Mac, use icon from resource)
+#if ! defined(Q_WS_WIN) && ! defined(Q_WS_MAC)
+#include "../../images/themes/default/qgis.xpm" // Linux
+#include <QIcon>
+#endif
+
static const char * const ident_ = "$Id$";
/** print usage text
@@ -469,6 +475,12 @@
exit( 1 ); //exit for now until a version of qgis is capabable of running non interactive
}
QgsApplication myApp( argc, argv, myUseGuiFlag );
+
+// (if Windows/Mac, use icon from resource)
+#if ! defined(Q_WS_WIN) && ! defined(Q_WS_MAC)
+ myApp.setWindowIcon( QPixmap( qgis_xpm ) ); // Linux
+#endif
+
//
// Set up the QSettings environment must be done after qapp is created
QCoreApplication::setOrganizationName( "QuantumGIS" );
Modified: trunk/qgis/src/core/qgsapplication.cpp
===================================================================
--- trunk/qgis/src/core/qgsapplication.cpp 2010-05-15 15:37:35 UTC (rev 13493)
+++ trunk/qgis/src/core/qgsapplication.cpp 2010-05-15 16:15:59 UTC (rev 13494)
@@ -24,11 +24,6 @@
#include <QPalette>
#include <QSettings>
-// (if Windows/Mac, use icon from resource)
-#if ! defined(Q_WS_WIN) && ! defined(Q_WS_MAC)
-#include "../../images/themes/default/qgis.xpm" // Linux
-#include <QIcon>
-#endif
#ifndef Q_WS_WIN
#include <netinet/in.h>
#else
@@ -70,11 +65,6 @@
setPrefixPath( myPrefix, true );
#endif
- // set application's icon (if Windows/Mac, use icon from resource)
-#if ! defined(Q_WS_WIN) && ! defined(Q_WS_MAC)
- setWindowIcon( QPixmap( qgis_xpm ) ); // Linux
-#endif
-
mDefaultSvgPaths << mPkgDataPath + QString( "/svg/" );
mDefaultSvgPaths << qgisSettingsDirPath() + QString( "svg/" );
}
More information about the QGIS-commit
mailing list