Commit db818e5b authored by Edric Milaret's avatar Edric Milaret Committed by gerrit2

fix minimize on close

- This code path was broken since we stopped overiding native window control

Change-Id: I77e5570faf731bc73d4b3d98f8fea9a67200fb5d
Tuleap: #276
parent 7819f431
...@@ -32,6 +32,7 @@ ...@@ -32,6 +32,7 @@
#include "aboutdialog.h" #include "aboutdialog.h"
#include "mainwindowtoolbar.h" #include "mainwindowtoolbar.h"
#include "settingskey.h"
#include "winsparkle.h" #include "winsparkle.h"
...@@ -195,3 +196,13 @@ MainWindow::switchNormalMaximize() ...@@ -195,3 +196,13 @@ MainWindow::switchNormalMaximize()
else else
showMaximized(); showMaximized();
} }
MainWindow::closeEvent(QCloseEvent* event)
QSettings settings;
if (settings.value(SettingsKey::closeOrMinimized).toBool()) {
...@@ -46,18 +46,19 @@ public: ...@@ -46,18 +46,19 @@ public:
void createThumbBar(); void createThumbBar();
protected: protected:
bool nativeEvent(const QByteArray &eventType, void *message, long *result); bool nativeEvent(const QByteArray& eventType, void* message, long* result);
void closeEvent(QCloseEvent* event);
public slots: public slots:
void onRingEvent(const QString& uri); void onRingEvent(const QString& uri);
private slots: private slots:
void trayActivated(QSystemTrayIcon::ActivationReason reason); void trayActivated(QSystemTrayIcon::ActivationReason reason);
void onIncomingCall(Call *call); void onIncomingCall(Call* call);
void switchNormalMaximize(); void switchNormalMaximize();
private: private:
explicit MainWindow(QWidget *parent = 0); explicit MainWindow(QWidget* parent = 0);
~MainWindow(); ~MainWindow();
Ui::MainWindow* ui; Ui::MainWindow* ui;
NavStack* navStack_; NavStack* navStack_;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment