From a526ff58c168c781e3af4e49ddb03e95c217c3f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Uwe=20St=C3=B6hr?= Date: Tue, 4 Apr 2017 23:54:31 +0200 Subject: [PATCH] GuiDialog.cpp: remove question marks from Windows dialogs backported from master, fixes bug #10098, patch from Guillaume --- src/frontends/qt4/DialogView.h | 5 ++++- src/frontends/qt4/GuiDialog.cpp | 5 ++++- src/frontends/qt4/LyXFileDialog.cpp | 1 + status.22x | 2 ++ 4 files changed, 11 insertions(+), 2 deletions(-) diff --git a/src/frontends/qt4/DialogView.h b/src/frontends/qt4/DialogView.h index d3125c6f8e..0fa5ebcffd 100644 --- a/src/frontends/qt4/DialogView.h +++ b/src/frontends/qt4/DialogView.h @@ -30,7 +30,10 @@ public: /// \param title is the window title used for decoration. DialogView(GuiView & lv, QString const & name, QString const & title) : QDialog(&lv), Dialog(lv, name, "LyX: " + title) - {} + { + // remove question marks from Windows dialogs + setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint); + } virtual QWidget * asQWidget() { return this; } virtual QWidget const * asQWidget() const { return this; } diff --git a/src/frontends/qt4/GuiDialog.cpp b/src/frontends/qt4/GuiDialog.cpp index 1797aeee5f..58b109daf1 100644 --- a/src/frontends/qt4/GuiDialog.cpp +++ b/src/frontends/qt4/GuiDialog.cpp @@ -27,7 +27,10 @@ namespace frontend { GuiDialog::GuiDialog(GuiView & lv, QString const & name, QString const & title) : QDialog(&lv), Dialog(lv, name, "LyX: " + title), updating_(false), is_closing_(false) -{} +{ + // remove question marks from Windows dialogs + setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint); +} void GuiDialog::closeEvent(QCloseEvent * ev) diff --git a/src/frontends/qt4/LyXFileDialog.cpp b/src/frontends/qt4/LyXFileDialog.cpp index edb15f0887..e218fcfc0c 100644 --- a/src/frontends/qt4/LyXFileDialog.cpp +++ b/src/frontends/qt4/LyXFileDialog.cpp @@ -51,6 +51,7 @@ LyXFileDialog::LyXFileDialog(QString const & title, { setNameFilters(filters); setWindowTitle(title); + setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint); setOption(QFileDialog::DontUseNativeDialog); QList layout = findChildren(); diff --git a/status.22x b/status.22x index 04d0c37460..87643e4770 100644 --- a/status.22x +++ b/status.22x @@ -68,6 +68,8 @@ What's new - Fix regression that was not allowing inserting more than three consecutive dashes without jumping through hoops. +- Remove the unused question mark button in dialogs on Windows (bug 10098). + * DOCUMENTATION AND LOCALIZATION