patch-QgisApp-QgsApplication-_application_icon_-20091210.txt
1 |
Index: src/app/qgisapp.cpp |
---|---|
2 |
=================================================================== |
3 |
--- src/app/qgisapp.cpp (revision 12391) |
4 |
+++ src/app/qgisapp.cpp (working copy) |
5 |
@@ -84,7 +84,6 @@ |
6 |
// |
7 |
// QGIS Specific Includes |
8 |
// |
9 |
-#include "../../images/themes/default/qgis.xpm" |
10 |
#include "qgisapp.h" |
11 |
#include "qgisappinterface.h" |
12 |
#include "qgis.h" |
13 |
@@ -377,9 +376,6 @@ |
14 |
addDockWidget( Qt::LeftDockWidgetArea, mUndoWidget ); |
15 |
mUndoWidget->hide(); |
16 |
|
17 |
- // set application's icon |
18 |
- setWindowIcon( QPixmap( qgis_xpm ) ); |
19 |
- |
20 |
#ifdef Q_WS_MAC |
21 |
// action for Window menu (create before generating WindowTitleChange event)) |
22 |
mWindowAction = new QAction( this ); |
23 |
Index: src/core/qgsapplication.cpp |
24 |
=================================================================== |
25 |
--- src/core/qgsapplication.cpp (revision 12391) |
26 |
+++ src/core/qgsapplication.cpp (working copy) |
27 |
@@ -23,6 +23,11 @@ |
28 |
#include <QPalette> |
29 |
#include <QSettings> |
30 |
|
31 |
+#ifndef Q_WS_WIN // (if Windows, use icon from resource) |
32 |
+#include "../../images/themes/default/qgis.xpm" // Linux/Mac |
33 |
+#include <QIcon> |
34 |
+#endif |
35 |
+ |
36 |
#include "qgsconfig.h" |
37 |
|
38 |
// for htonl |
39 |
@@ -63,6 +68,11 @@ |
40 |
QString myPrefix = myDir.absolutePath(); |
41 |
setPrefixPath( myPrefix, true ); |
42 |
#endif |
43 |
+ |
44 |
+ // set application's icon |
45 |
+#ifndef Q_WS_WIN // (if Windows, use icon from resource) |
46 |
+ setWindowIcon( QPixmap( qgis_xpm ) ); // Linux/Mac |
47 |
+#endif |
48 |
} |
49 |
|
50 |
QgsApplication::~QgsApplication() |