summaryrefslogtreecommitdiffstats
path: root/src/gui/connectionWindow.h
diff options
context:
space:
mode:
authorSebastien Braun2010-10-04 00:25:02 +0200
committerSebastien Braun2010-10-05 18:15:48 +0200
commitea719ff8b67916ac0080295bd0698e4ca2a134c8 (patch)
treef4fb912a587e8366fabe0615940ed7cda60df661 /src/gui/connectionWindow.h
parentImplement first version of basic input event support (diff)
downloadpvs-ea719ff8b67916ac0080295bd0698e4ca2a134c8.tar.gz
pvs-ea719ff8b67916ac0080295bd0698e4ca2a134c8.tar.xz
pvs-ea719ff8b67916ac0080295bd0698e4ca2a134c8.zip
Fix a bug in closeup frame handling.
If, while a frame was in closeup mode, the corresponding client went away, the ConnectionFrame would get deleted, but still referenced in ConnectionWindow::_closeupFrame. Naturally, this led to disaster when the same (but really new) frame would be selected again. QPointer guards against QObject's going AWOL.
Diffstat (limited to 'src/gui/connectionWindow.h')
-rw-r--r--src/gui/connectionWindow.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gui/connectionWindow.h b/src/gui/connectionWindow.h
index 81b5033..85e2881 100644
--- a/src/gui/connectionWindow.h
+++ b/src/gui/connectionWindow.h
@@ -9,6 +9,7 @@
#include <iostream>
#include <math.h>
#include <QSettings>
+#include <QPointer>
#define FRAME_DELAY 1000 // to comply with the standard value in the gui
@@ -109,7 +110,7 @@ protected:
private:
ConnectionFrame* newConFrame(PVSClient* newConnection); // returns a new frame for the given connection
ConnectionFrame* currentSingleFrame; // pointer to the frame thats currently in FullScreen
- ConnectionFrame* _closeupFrame;
+ QPointer<ConnectionFrame> _closeupFrame;
QPoint currentPosition (ConnectionFrame* cF);
QMenu *menu;
QAction *newDummy;