Skip to content
Permalink
Browse files
Move setWindowIcon from qgsapplication.cpp to main.cpp. Because QGIS …
…mapserver uses qgsapplication, but it does not have access to an x-server instance

git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@13494 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
mhugent committed May 15, 2010
1 parent add39a3 commit f67a04918a29a0806888bf6a1d5a268a1c7ec21e
Showing with 12 additions and 10 deletions.
  1. +12 −0 src/app/main.cpp
  2. +0 −10 src/core/qgsapplication.cpp
@@ -73,6 +73,12 @@ typedef SInt32 SRefCon;
#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 @@ int main( int argc, char *argv[] )
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" );
@@ -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 @@ QgsApplication::QgsApplication( int & argc, char ** argv, bool GUIenabled )
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/" );
}

0 comments on commit f67a049

Please sign in to comment.