Skip to content

Commit 4fdcc96

Browse files
author
g_j_m
committed
Fix non-connected connection between aboutToQuit() signal and
saveWindowState() slot git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@4954 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent b85d5aa commit 4fdcc96

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

src/composer/qgscomposer.cpp

+1-2
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,7 @@ QgsComposer::QgsComposer( QgisApp *qgis): QMainWindow()
6969
qDebug( "unable to connect to newProject" );
7070
}
7171

72-
// Doesn't work, there is not such signal I think (copy from QgisApp)
73-
if ( ! connect(mQgis, SIGNAL(aboutToQuit()), this, SLOT(saveWindowState()) ) ) {
72+
if ( ! connect(qApp, SIGNAL(aboutToQuit()), this, SLOT(saveWindowState()) ) ) {
7473
qDebug( "unable to connect to aboutToQuit" );
7574
}
7675
restoreWindowState();

src/composer/qgscomposer.h

+3-3
Original file line numberDiff line numberDiff line change
@@ -88,9 +88,6 @@ class QgsComposer: public QMainWindow, private Ui::QgsComposerBase
8888
//! Sets state from DOM document
8989
bool readXML( QDomNode & node );
9090

91-
//! Save window state
92-
void saveWindowState();
93-
9491
//! Restore the window and toolbar state
9592
void restoreWindowState();
9693

@@ -146,6 +143,9 @@ public slots:
146143
//! New project
147144
void newProject();
148145

146+
//! Save window state
147+
void saveWindowState();
148+
149149
private:
150150
//! Set teh pixmap / icons on the toolbar buttons
151151
void setupTheme();

0 commit comments

Comments
 (0)