[LyX/master] Fix obsoleted Qt values

Yuriy Skalko yuriy.skalko at gmail.com
Sun Oct 25 07:00:27 UTC 2020


commit 4ece87c3240735c8d75736c0ea857f81f5d41169
Author: Yuriy Skalko <yuriy.skalko at gmail.com>
Date:   Fri Oct 23 13:40:41 2020 +0300

    Fix obsoleted Qt values
    
    All new values exist in Qt 4.8.7.
---
 src/frontends/qt/FileDialog.cpp |    3 ++-
 src/frontends/qt/qt_helpers.cpp |    2 +-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/frontends/qt/FileDialog.cpp b/src/frontends/qt/FileDialog.cpp
index fb05f43..1491939 100644
--- a/src/frontends/qt/FileDialog.cpp
+++ b/src/frontends/qt/FileDialog.cpp
@@ -188,7 +188,8 @@ FileDialog::Result FileDialog::opendir(QString const & path,
 		LyXFileDialog dlg(title_, path, QStringList(qt_("Directories")),
 						  private_->b1, private_->b2);
 
-		dlg.setFileMode(QFileDialog::DirectoryOnly);
+		dlg.setFileMode(QFileDialog::Directory);
+		dlg.setOption(QFileDialog::ShowDirsOnly, true);
 
 		if (!suggested.isEmpty())
 			dlg.selectFile(suggested);
diff --git a/src/frontends/qt/qt_helpers.cpp b/src/frontends/qt/qt_helpers.cpp
index 2a35897..d9cc364 100644
--- a/src/frontends/qt/qt_helpers.cpp
+++ b/src/frontends/qt/qt_helpers.cpp
@@ -239,7 +239,7 @@ void setValid(QWidget * widget, bool valid)
 		widget->setPalette(QPalette());
 	} else {
 		QPalette pal = widget->palette();
-		pal.setColor(QPalette::Active, QPalette::Foreground, QColor(255, 0, 0));
+		pal.setColor(QPalette::Active, QPalette::WindowText, QColor(255, 0, 0));
 		widget->setPalette(pal);
 	}
 }


More information about the lyx-cvs mailing list