[LyX/master] Amend commit 3af8ff39fc - make it work with Qt 4.x - don't activate it there

Stephan Witt switt at lyx.org
Fri Aug 7 10:02:07 UTC 2020


commit d0ca7a383d569c03196bbab4b4c5fe32cd72fea2
Author: Stephan Witt <switt at lyx.org>
Date:   Fri Aug 7 12:27:27 2020 +0200

    Amend commit 3af8ff39fc - make it work with Qt 4.x - don't activate it there
---
 src/frontends/qt/GuiView.cpp |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/src/frontends/qt/GuiView.cpp b/src/frontends/qt/GuiView.cpp
index a316fe5..1b9f0ef 100644
--- a/src/frontends/qt/GuiView.cpp
+++ b/src/frontends/qt/GuiView.cpp
@@ -4789,7 +4789,7 @@ void GuiView::resetDialogs()
 
 void GuiView::flatGroupBoxes(const QObject * widget, bool flag)
 {
-	for (const QObject * child: qAsConst(widget->children())) {
+	for (QObject * child: widget->children()) {
 		if (child->inherits("QGroupBox")) {
 			QGroupBox * box = (QGroupBox*) child;
 			box->setFlat(flag);
@@ -4815,9 +4815,11 @@ Dialog * GuiView::findOrBuild(string const & name, bool hide_it)
 
 	Dialog * dialog = build(name);
 	d.dialogs_[name].reset(dialog);
+#if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0))
 	// Force a uniform style for group boxes
 	// On Mac non-flat works better, on Linux flat is standard
 	flatGroupBoxes(dialog->asQWidget(), guiApp->platformName() != "cocoa");
+#endif
 	if (lyxrc.allow_geometry_session)
 		dialog->restoreSession();
 	if (hide_it)


More information about the lyx-cvs mailing list