aboutsummaryrefslogtreecommitdiffstats
path: root/desktop-widgets/simplewidgets.h
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2020-05-27 14:13:15 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2020-05-27 09:47:35 -0700
commit7417f865cd628aa5df78961dc198a9070822ed72 (patch)
tree84a4b8232b849748ce937e110134b2fde665d9f6 /desktop-widgets/simplewidgets.h
parent25f1bc488f68395390a3a87328b31dfa7deac11c (diff)
downloadsubsurface-7417f865cd628aa5df78961dc198a9070822ed72.tar.gz
cleanup: un-singletonize ShiftTimesDialog
There is no reason that this dialog is a singleton. Since it is modal, it can be created on demand. Apart from removing superfluous global state, this simplifies code, because preparing the widget can now be done in the constructor instead of overriding the showEvent() function. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'desktop-widgets/simplewidgets.h')
-rw-r--r--desktop-widgets/simplewidgets.h4
1 files changed, 1 insertions, 3 deletions
diff --git a/desktop-widgets/simplewidgets.h b/desktop-widgets/simplewidgets.h
index ce8c636f7..ed364e75f 100644
--- a/desktop-widgets/simplewidgets.h
+++ b/desktop-widgets/simplewidgets.h
@@ -78,15 +78,13 @@ private:
class ShiftTimesDialog : public QDialog {
Q_OBJECT
public:
- static ShiftTimesDialog *instance();
- void showEvent(QShowEvent *event);
+ explicit ShiftTimesDialog(QWidget *parent);
private
slots:
void buttonClicked(QAbstractButton *button);
void changeTime();
private:
- explicit ShiftTimesDialog(QWidget *parent);
int64_t when;
Ui::ShiftTimesDialog ui;
};