[LyX/master] #11682 amend change 4d4dc96b06 - check Qt version for all Qt::ApplicationState occurances

Stephan Witt switt at lyx.org
Mon Feb 8 08:01:18 UTC 2021


commit 80e20e86bef2118bc4bd3a0060d29ac797a29670
Author: Stephan Witt <switt at lyx.org>
Date:   Mon Feb 8 09:04:18 2021 +0100

    #11682 amend change 4d4dc96b06 - check Qt version for all Qt::ApplicationState occurances
---
 src/frontends/qt/GuiApplication.cpp |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/src/frontends/qt/GuiApplication.cpp b/src/frontends/qt/GuiApplication.cpp
index 625d85b..306ade5 100644
--- a/src/frontends/qt/GuiApplication.cpp
+++ b/src/frontends/qt/GuiApplication.cpp
@@ -944,7 +944,10 @@ public:
 struct GuiApplication::Private
 {
 	Private(): language_model_(nullptr), meta_fake_bit(NoModifier),
-		global_menubar_(nullptr), last_state_(Qt::ApplicationInactive)
+		global_menubar_(nullptr)
+	#if (QT_VERSION >= QT_VERSION_CHECK(5, 1, 0))
+		, last_state_(Qt::ApplicationInactive)
+	#endif
 	{
 	#if (QT_VERSION < 0x050000) || (QT_VERSION >= 0x050400)
 	#if defined(Q_OS_WIN) || defined(Q_CYGWIN_WIN)
@@ -1011,8 +1014,10 @@ struct GuiApplication::Private
 
 	/// Only used on mac.
 	QMenuBar * global_menubar_;
+#if (QT_VERSION >= QT_VERSION_CHECK(5, 1, 0))
 	/// Holds previous application state on Mac
 	Qt::ApplicationState last_state_;
+#endif
 
 #ifdef Q_OS_MAC
 	/// Linkback mime handler for MacOSX.


More information about the lyx-cvs mailing list