Fix MacOS regression QWidget::closeEvent called twice.
--HG-- branch : develop
This commit is contained in:
parent
e880d5f0a3
commit
c6e7590034
|
@ -519,6 +519,15 @@ void TMainWindow::ToolBarStyles()
|
|||
//---------------------------------------------------------------------------------------------------------------------
|
||||
void TMainWindow::closeEvent(QCloseEvent *event)
|
||||
{
|
||||
#if defined(Q_OS_MAC)
|
||||
// Workaround for Qt bug https://bugreports.qt.io/browse/QTBUG-43344
|
||||
static int numCalled = 0;
|
||||
if (numCalled++ >= 1)
|
||||
{
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (MaybeSave())
|
||||
{
|
||||
WriteSettings();
|
||||
|
|
|
@ -1508,6 +1508,15 @@ void MainWindow::changeEvent(QEvent *event)
|
|||
*/
|
||||
void MainWindow::closeEvent(QCloseEvent *event)
|
||||
{
|
||||
#if defined(Q_OS_MAC)
|
||||
// Workaround for Qt bug https://bugreports.qt.io/browse/QTBUG-43344
|
||||
static int numCalled = 0;
|
||||
if (numCalled++ >= 1)
|
||||
{
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
qCDebug(vMainWindow, "Closing main window");
|
||||
if (MaybeSave())
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue
Block a user