GuiDialog.cpp: remove question marks from Windows dialogs

backported from master, fixes bug #10098, patch from Guillaume
This commit is contained in:
Uwe Stöhr 2017-04-04 23:54:31 +02:00
parent c75c27c3c0
commit a526ff58c1
4 changed files with 11 additions and 2 deletions

View File

@ -30,7 +30,10 @@ public:
/// \param title is the window title used for decoration. /// \param title is the window title used for decoration.
DialogView(GuiView & lv, QString const & name, QString const & title) DialogView(GuiView & lv, QString const & name, QString const & title)
: QDialog(&lv), Dialog(lv, name, "LyX: " + 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 * asQWidget() { return this; }
virtual QWidget const * asQWidget() const { return this; } virtual QWidget const * asQWidget() const { return this; }

View File

@ -27,7 +27,10 @@ namespace frontend {
GuiDialog::GuiDialog(GuiView & lv, QString const & name, QString const & title) GuiDialog::GuiDialog(GuiView & lv, QString const & name, QString const & title)
: QDialog(&lv), Dialog(lv, name, "LyX: " + title), updating_(false), : QDialog(&lv), Dialog(lv, name, "LyX: " + title), updating_(false),
is_closing_(false) is_closing_(false)
{} {
// remove question marks from Windows dialogs
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
}
void GuiDialog::closeEvent(QCloseEvent * ev) void GuiDialog::closeEvent(QCloseEvent * ev)

View File

@ -51,6 +51,7 @@ LyXFileDialog::LyXFileDialog(QString const & title,
{ {
setNameFilters(filters); setNameFilters(filters);
setWindowTitle(title); setWindowTitle(title);
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
setOption(QFileDialog::DontUseNativeDialog); setOption(QFileDialog::DontUseNativeDialog);
QList<QHBoxLayout *> layout = findChildren<QHBoxLayout *>(); QList<QHBoxLayout *> layout = findChildren<QHBoxLayout *>();

View File

@ -68,6 +68,8 @@ What's new
- Fix regression that was not allowing inserting more than three consecutive - Fix regression that was not allowing inserting more than three consecutive
dashes without jumping through hoops. dashes without jumping through hoops.
- Remove the unused question mark button in dialogs on Windows (bug 10098).
* DOCUMENTATION AND LOCALIZATION * DOCUMENTATION AND LOCALIZATION