forked from qt-creator/qt-creator
MainWindow: ask confirmation before closing Qt Creator
When working with multiple windows, pressing the close button multiple times can close Qt Creator too. This patch adds a system option, asking for a confirmation before closing the IDE. By default it's not enabled. Fixes: QTCREATORBUG-7637 Change-Id: Ifc5e8c97511f9227ce0634c8a7064d95775c76c2 Reviewed-by: André Hartmann <aha_1980@gmx.de> Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
committed by
André Hartmann
parent
70b226144f
commit
6e4ca8b6af
@@ -102,6 +102,9 @@ public:
|
||||
void updateAdditionalContexts(const Context &remove, const Context &add,
|
||||
ICore::ContextPriority priority);
|
||||
|
||||
bool askConfirmationBeforeExit() const;
|
||||
void setAskConfirmationBeforeExit(bool ask);
|
||||
|
||||
void setOverrideColor(const QColor &color);
|
||||
|
||||
QStringList additionalAboutInformation() const;
|
||||
@@ -194,6 +197,7 @@ private:
|
||||
|
||||
QToolButton *m_toggleLeftSideBarButton = nullptr;
|
||||
QToolButton *m_toggleRightSideBarButton = nullptr;
|
||||
bool m_askConfirmationBeforeExit = false;
|
||||
QColor m_overrideColor;
|
||||
QList<std::function<bool()>> m_preCloseListeners;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user