From a05a66b2ae55d597db8b624303be47ef6a907722 Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Sat, 22 May 2021 09:21:01 +0300 Subject: [PATCH] Fix build on Qt less than 5.6. --- src/app/puzzle/vpmainwindow.cpp | 4 ++++ src/app/tape/tmainwindow.cpp | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/src/app/puzzle/vpmainwindow.cpp b/src/app/puzzle/vpmainwindow.cpp index 6b6cb0ac6..0670f0eeb 100644 --- a/src/app/puzzle/vpmainwindow.cpp +++ b/src/app/puzzle/vpmainwindow.cpp @@ -1066,7 +1066,11 @@ void VPMainWindow::CreateWindowMenu(QMenu *menu) window->isWindowModified() ? title.replace(index, 3, QChar('*')) : title.replace(index, 3, QString()); } +#if QT_VERSION < QT_VERSION_CHECK(5, 6, 0) + QAction *action = menu->addAction(title, this, SLOT(ShowWindow())); +#else QAction *action = menu->addAction(title, this, &VPMainWindow::ShowWindow); +#endif //QT_VERSION < QT_VERSION_CHECK(5, 6, 0) action->setData(i); action->setCheckable(true); action->setMenuRole(QAction::NoRole); diff --git a/src/app/tape/tmainwindow.cpp b/src/app/tape/tmainwindow.cpp index 8a5b6cee8..bc54072b7 100644 --- a/src/app/tape/tmainwindow.cpp +++ b/src/app/tape/tmainwindow.cpp @@ -3614,7 +3614,11 @@ void TMainWindow::CreateWindowMenu(QMenu *menu) window->isWindowModified() ? title.replace(index, 3, QChar('*')) : title.replace(index, 3, QString()); } +#if QT_VERSION < QT_VERSION_CHECK(5, 6, 0) + QAction *action = menu->addAction(title, this, SLOT(ShowWindow())); +#else QAction *action = menu->addAction(title, this, &TMainWindow::ShowWindow); +#endif //QT_VERSION < QT_VERSION_CHECK(5, 6, 0) action->setData(i); action->setCheckable(true); action->setMenuRole(QAction::NoRole);