Skip to content

Commit

Permalink
Move setWindowIcon from qgsapplication.cpp to main.cpp. Because QGIS …
Browse files Browse the repository at this point in the history
…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 f67a049
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 10 deletions.
12 changes: 12 additions & 0 deletions src/app/main.cpp
Expand Up @@ -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
Expand Down Expand Up @@ -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" );
Expand Down
10 changes: 0 additions & 10 deletions src/core/qgsapplication.cpp
Expand Up @@ -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
Expand Down Expand Up @@ -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/" );
}
Expand Down

0 comments on commit f67a049

Please sign in to comment.