Globally disable WindowContextHelpButtonHint

Do set the global application flag AA_DisableWindowContextHelpButton
to avoid having to unset the default WindowContextHelpButtonHint
in every single dialog.

AA_DisableWindowContextHelpButton was added in Qt 5.10.

Change-Id: I21fe8bc5ddfa4c01ec7a799b04bfb6ff1c9d6d86
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
Kai Koehne
2020-02-19 12:53:27 +01:00
parent 44db8e2eab
commit fda9955df0
50 changed files with 2 additions and 65 deletions

View File

@@ -546,6 +546,7 @@ int main(int argc, char **argv)
#endif #endif
app.setAttribute(Qt::AA_UseHighDpiPixmaps); app.setAttribute(Qt::AA_UseHighDpiPixmaps);
app.setAttribute(Qt::AA_DisableWindowContextHelpButton);
PluginManager pluginManager; PluginManager pluginManager;
PluginManager::setPluginIID(QLatin1String("org.qt-project.Qt.QtCreatorPlugin")); PluginManager::setPluginIID(QLatin1String("org.qt-project.Qt.QtCreatorPlugin"));

View File

@@ -41,8 +41,6 @@ PluginErrorOverview::PluginErrorOverview(QWidget *parent) :
QDialog(parent), QDialog(parent),
m_ui(new Internal::Ui::PluginErrorOverview) m_ui(new Internal::Ui::PluginErrorOverview)
{ {
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
m_ui->setupUi(this); m_ui->setupUi(this);
m_ui->buttonBox->addButton(tr("Continue"), QDialogButtonBox::AcceptRole); m_ui->buttonBox->addButton(tr("Continue"), QDialogButtonBox::AcceptRole);

View File

@@ -118,7 +118,6 @@ CheckableMessageBox::CheckableMessageBox(QWidget *parent) :
d(new CheckableMessageBoxPrivate(this)) d(new CheckableMessageBoxPrivate(this))
{ {
setModal(true); setModal(true);
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
connect(d->buttonBox, &QDialogButtonBox::accepted, this, &QDialog::accept); connect(d->buttonBox, &QDialogButtonBox::accepted, this, &QDialog::accept);
connect(d->buttonBox, &QDialogButtonBox::rejected, this, &QDialog::reject); connect(d->buttonBox, &QDialogButtonBox::rejected, this, &QDialog::reject);
connect(d->buttonBox, &QDialogButtonBox::clicked, connect(d->buttonBox, &QDialogButtonBox::clicked,

View File

@@ -89,7 +89,6 @@ void NameValueItemsWidget::setPlaceholderText(const QString &text)
NameValuesDialog::NameValuesDialog(const QString &windowTitle, const QString &helpText, QWidget *parent) NameValuesDialog::NameValuesDialog(const QString &windowTitle, const QString &helpText, QWidget *parent)
: QDialog(parent) : QDialog(parent)
{ {
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
resize(640, 480); resize(640, 480);
m_editor = new Internal::NameValueItemsWidget(this); m_editor = new Internal::NameValueItemsWidget(this);
auto box = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel, auto box = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel,

View File

@@ -320,7 +320,6 @@ Wizard::Wizard(QWidget *parent, Qt::WindowFlags flags) :
setOption(QWizard::NoBackButtonOnStartPage, true); setOption(QWizard::NoBackButtonOnStartPage, true);
if (!Utils::creatorTheme()->preferredStyles().isEmpty()) if (!Utils::creatorTheme()->preferredStyles().isEmpty())
setWizardStyle(QWizard::ModernStyle); setWizardStyle(QWizard::ModernStyle);
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
if (HostOsInfo::isMacHost()) { if (HostOsInfo::isMacHost()) {
setButtonLayout(QList<QWizard::WizardButton>() setButtonLayout(QList<QWizard::WizardButton>()

View File

@@ -746,7 +746,6 @@ RunConfigurationSelectionDialog::RunConfigurationSelectionDialog(const QString &
QWidget *parent) QWidget *parent)
: QDialog(parent) : QDialog(parent)
{ {
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
setWindowTitle(tr("Select Run Configuration")); setWindowTitle(tr("Select Run Configuration"));
QString details = tr("Could not determine which run configuration to choose for running tests"); QString details = tr("Could not determine which run configuration to choose for running tests");

View File

@@ -368,7 +368,6 @@ private:
// Disable help button in titlebar on windows: // Disable help button in titlebar on windows:
Qt::WindowFlags flags = changeDialog->windowFlags(); Qt::WindowFlags flags = changeDialog->windowFlags();
flags &= ~Qt::WindowContextHelpButtonHint;
flags |= Qt::MSWindowsFixedSizeDialogHint; flags |= Qt::MSWindowsFixedSizeDialogHint;
changeDialog->setWindowFlags(flags); changeDialog->setWindowFlags(flags);

View File

@@ -181,8 +181,6 @@ NewDialog::NewDialog(QWidget *parent) :
m_currentDialog = this; m_currentDialog = this;
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
setWindowFlags(windowFlags());
setAttribute(Qt::WA_DeleteOnClose); setAttribute(Qt::WA_DeleteOnClose);
ICore::registerWindow(this, Context("Core.NewDialog")); ICore::registerWindow(this, Context("Core.NewDialog"));
m_ui->setupUi(this); m_ui->setupUi(this);

View File

@@ -36,7 +36,6 @@ OpenWithDialog::OpenWithDialog(const QString &fileName, QWidget *parent)
: QDialog(parent) : QDialog(parent)
{ {
setupUi(this); setupUi(this);
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
label->setText(tr("Open file \"%1\" with:").arg(Utils::FilePath::fromString(fileName).fileName())); label->setText(tr("Open file \"%1\" with:").arg(Utils::FilePath::fromString(fileName).fileName()));
buttonBox->button(QDialogButtonBox::Ok)->setDefault(true); buttonBox->button(QDialogButtonBox::Ok)->setDefault(true);

View File

@@ -64,7 +64,6 @@ PromptOverwriteDialog::PromptOverwriteDialog(QWidget *parent) :
{ {
setWindowTitle(tr("Overwrite Existing Files")); setWindowTitle(tr("Overwrite Existing Files"));
setModal(true); setModal(true);
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
auto mainLayout = new QVBoxLayout(this); auto mainLayout = new QVBoxLayout(this);
mainLayout->addWidget(m_label); mainLayout->addWidget(m_label);
m_view->setRootIsDecorated(false); m_view->setRootIsDecorated(false);

View File

@@ -163,7 +163,6 @@ ReadOnlyFilesDialog::ReadOnlyFilesDialog(const Utils::FilePaths &filePaths, QWid
: QDialog(parent) : QDialog(parent)
, d(new ReadOnlyFilesDialogPrivate(this)) , d(new ReadOnlyFilesDialogPrivate(this))
{ {
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
d->initDialog(filePaths); d->initDialog(filePaths);
} }

View File

@@ -49,7 +49,6 @@ SaveItemsDialog::SaveItemsDialog(QWidget *parent,
: QDialog(parent) : QDialog(parent)
{ {
m_ui.setupUi(this); m_ui.setupUi(this);
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
// QDialogButtonBox's behavior for "destructive" is wrong, the "do not save" should be left-aligned // QDialogButtonBox's behavior for "destructive" is wrong, the "do not save" should be left-aligned
const QDialogButtonBox::ButtonRole discardButtonRole = Utils::HostOsInfo::isMacHost() const QDialogButtonBox::ButtonRole discardButtonRole = Utils::HostOsInfo::isMacHost()

View File

@@ -450,7 +450,6 @@ SettingsDialog::SettingsDialog(QWidget *parent) :
m_filterLineEdit->setFiltering(true); m_filterLineEdit->setFiltering(true);
createGui(); createGui();
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
if (Utils::HostOsInfo::isMacHost()) if (Utils::HostOsInfo::isMacHost())
setWindowTitle(QCoreApplication::translate("Core::Internal::SettingsDialog", "Preferences")); setWindowTitle(QCoreApplication::translate("Core::Internal::SettingsDialog", "Preferences"));
else else

View File

@@ -55,8 +55,6 @@ PluginDialog::PluginDialog(QWidget *parent)
: QDialog(parent), : QDialog(parent),
m_view(new ExtensionSystem::PluginView(this)) m_view(new ExtensionSystem::PluginView(this))
{ {
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
auto vl = new QVBoxLayout(this); auto vl = new QVBoxLayout(this);
auto filterLayout = new QHBoxLayout; auto filterLayout = new QHBoxLayout;

View File

@@ -52,7 +52,6 @@ VersionDialog::VersionDialog(QWidget *parent)
setWindowIcon(Icons::QTCREATORLOGO_BIG.icon()); setWindowIcon(Icons::QTCREATORLOGO_BIG.icon());
setWindowTitle(tr("About %1").arg(Core::Constants::IDE_DISPLAY_NAME)); setWindowTitle(tr("About %1").arg(Core::Constants::IDE_DISPLAY_NAME));
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
auto layout = new QGridLayout(this); auto layout = new QGridLayout(this);
layout->setSizeConstraint(QLayout::SetFixedSize); layout->setSizeConstraint(QLayout::SetFixedSize);

View File

@@ -39,8 +39,6 @@ CppPreProcessorDialog::CppPreProcessorDialog(const QString &filePath, QWidget *p
, m_ui(new Ui::CppPreProcessorDialog()) , m_ui(new Ui::CppPreProcessorDialog())
, m_filePath(filePath) , m_filePath(filePath)
{ {
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
m_ui->setupUi(this); m_ui->setupUi(this);
m_ui->editorLabel->setText(m_ui->editorLabel->text().arg(Utils::FilePath::fromString(m_filePath).fileName())); m_ui->editorLabel->setText(m_ui->editorLabel->text().arg(Utils::FilePath::fromString(m_filePath).fileName()));
m_ui->editWidget->setVerticalScrollBarPolicy(Qt::ScrollBarAsNeeded); m_ui->editWidget->setVerticalScrollBarPolicy(Qt::ScrollBarAsNeeded);

View File

@@ -58,7 +58,6 @@ StartRemoteDialog::StartRemoteDialog(QWidget *parent)
: QDialog(parent) : QDialog(parent)
, d(new Internal::StartRemoteDialogPrivate) , d(new Internal::StartRemoteDialogPrivate)
{ {
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
setWindowTitle(tr("Start Remote Analysis")); setWindowTitle(tr("Start Remote Analysis"));
d->kitChooser = new KitChooser(this); d->kitChooser = new KitChooser(this);

View File

@@ -874,7 +874,6 @@ private:
MultiBreakPointsDialog::MultiBreakPointsDialog(unsigned int enabledParts, QWidget *parent) : MultiBreakPointsDialog::MultiBreakPointsDialog(unsigned int enabledParts, QWidget *parent) :
QDialog(parent) QDialog(parent)
{ {
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
setWindowTitle(tr("Edit Breakpoint Properties")); setWindowTitle(tr("Edit Breakpoint Properties"));
m_lineEditCondition = new QLineEdit(this); m_lineEditCondition = new QLineEdit(this);

View File

@@ -206,7 +206,6 @@ void StartApplicationParameters::fromSettings(const QSettings *settings)
StartApplicationDialog::StartApplicationDialog(QWidget *parent) StartApplicationDialog::StartApplicationDialog(QWidget *parent)
: QDialog(parent), d(new StartApplicationDialogPrivate) : QDialog(parent), d(new StartApplicationDialogPrivate)
{ {
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
setWindowTitle(tr("Start Debugger")); setWindowTitle(tr("Start Debugger"));
d->kitChooser = new KitChooser(this); d->kitChooser = new KitChooser(this);
@@ -515,7 +514,6 @@ AttachToQmlPortDialog::AttachToQmlPortDialog(QWidget *parent)
: QDialog(parent), : QDialog(parent),
d(new AttachToQmlPortDialogPrivate) d(new AttachToQmlPortDialogPrivate)
{ {
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
setWindowTitle(tr("Start Debugger")); setWindowTitle(tr("Start Debugger"));
d->kitChooser = new KitChooser(this); d->kitChooser = new KitChooser(this);
@@ -599,7 +597,6 @@ StartRemoteCdbDialog::StartRemoteCdbDialog(QWidget *parent) :
QDialog(parent), m_lineEdit(new QLineEdit) QDialog(parent), m_lineEdit(new QLineEdit)
{ {
setWindowTitle(tr("Start a CDB Remote Session")); setWindowTitle(tr("Start a CDB Remote Session"));
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
auto groupBox = new QGroupBox; auto groupBox = new QGroupBox;
@@ -671,7 +668,6 @@ AddressDialog::AddressDialog(QWidget *parent) :
m_box(new QDialogButtonBox(QDialogButtonBox::Ok|QDialogButtonBox::Cancel)) m_box(new QDialogButtonBox(QDialogButtonBox::Ok|QDialogButtonBox::Cancel))
{ {
setWindowTitle(tr("Select Start Address")); setWindowTitle(tr("Select Start Address"));
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
auto hLayout = new QHBoxLayout; auto hLayout = new QHBoxLayout;
hLayout->addWidget(new QLabel(tr("Enter an address:") + ' ')); hLayout->addWidget(new QLabel(tr("Enter an address:") + ' '));
@@ -749,7 +745,6 @@ public:
StartRemoteEngineDialog::StartRemoteEngineDialog(QWidget *parent) StartRemoteEngineDialog::StartRemoteEngineDialog(QWidget *parent)
: QDialog(parent), d(new StartRemoteEngineDialogPrivate) : QDialog(parent), d(new StartRemoteEngineDialogPrivate)
{ {
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
setWindowTitle(tr("Start Remote Engine")); setWindowTitle(tr("Start Remote Engine"));
d->host = new FancyLineEdit(this); d->host = new FancyLineEdit(this);
@@ -903,7 +898,6 @@ TypeFormatsDialog::TypeFormatsDialog(QWidget *parent)
: QDialog(parent), m_ui(new TypeFormatsDialogUi(this)) : QDialog(parent), m_ui(new TypeFormatsDialogUi(this))
{ {
setWindowTitle(tr("Type Formats")); setWindowTitle(tr("Type Formats"));
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
m_ui->addPage(tr("Qt Types")); m_ui->addPage(tr("Qt Types"));
m_ui->addPage(tr("Standard Types")); m_ui->addPage(tr("Standard Types"));
m_ui->addPage(tr("Misc Types")); m_ui->addPage(tr("Misc Types"));

View File

@@ -677,7 +677,7 @@ public:
} }
QInputDialog dialog; // Create wide input dialog. QInputDialog dialog; // Create wide input dialog.
dialog.setWindowFlags(dialog.windowFlags() dialog.setWindowFlags(dialog.windowFlags()
& ~(Qt::WindowContextHelpButtonHint|Qt::MSWindowsFixedSizeDialogHint)); & ~(Qt::MSWindowsFixedSizeDialogHint));
dialog.resize(600, dialog.height()); dialog.resize(600, dialog.height());
dialog.setWindowTitle(tr("Add Message Tracepoint")); dialog.setWindowTitle(tr("Add Message Tracepoint"));
dialog.setLabelText (tr("Message:")); dialog.setLabelText (tr("Message:"));

View File

@@ -251,7 +251,6 @@ AttachCoreDialog::AttachCoreDialog(QWidget *parent)
: QDialog(parent), d(new AttachCoreDialogPrivate) : QDialog(parent), d(new AttachCoreDialogPrivate)
{ {
setWindowTitle(tr("Load Core File")); setWindowTitle(tr("Load Core File"));
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
d->buttonBox = new QDialogButtonBox(this); d->buttonBox = new QDialogButtonBox(this);
d->buttonBox->setStandardButtons(QDialogButtonBox::Cancel|QDialogButtonBox::Ok); d->buttonBox->setStandardButtons(QDialogButtonBox::Cancel|QDialogButtonBox::Ok);

View File

@@ -51,7 +51,6 @@ CacheDirectoryDialog::CacheDirectoryDialog(QWidget *parent) :
{ {
setWindowTitle(tr("Select Local Cache Folder")); setWindowTitle(tr("Select Local Cache Folder"));
setModal(true); setModal(true);
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
auto formLayout = new QFormLayout; auto formLayout = new QFormLayout;
m_chooser->setExpectedKind(Utils::PathChooser::ExistingDirectory); m_chooser->setExpectedKind(Utils::PathChooser::ExistingDirectory);

View File

@@ -337,7 +337,6 @@ static StackFrame inputFunctionForDisassembly()
dialog.setInputMode(QInputDialog::TextInput); dialog.setInputMode(QInputDialog::TextInput);
dialog.setLabelText(StackHandler::tr("Function:")); dialog.setLabelText(StackHandler::tr("Function:"));
dialog.setWindowTitle(StackHandler::tr("Disassemble Function")); dialog.setWindowTitle(StackHandler::tr("Disassemble Function"));
dialog.setWindowFlags(dialog.windowFlags() & ~Qt::WindowContextHelpButtonHint);
if (dialog.exec() != QDialog::Accepted) if (dialog.exec() != QDialog::Accepted)
return frame; return frame;
const QString function = dialog.textValue(); const QString function = dialog.textValue();

View File

@@ -87,7 +87,6 @@ UnstartedAppWatcherDialog::UnstartedAppWatcherDialog(QWidget *parent)
: QDialog(parent) : QDialog(parent)
{ {
setWindowTitle(tr("Attach to Process Not Yet Started")); setWindowTitle(tr("Attach to Process Not Yet Started"));
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
m_kitChooser = new KitChooser(this); m_kitChooser = new KitChooser(this);
m_kitChooser->setKitPredicate([](const Kit *k) { m_kitChooser->setKitPredicate([](const Kit *k) {

View File

@@ -57,7 +57,6 @@ ChangeSelectionDialog::ChangeSelectionDialog(const QString &workingDirectory, Co
QWidget *parent) : QWidget *parent) :
QDialog(parent), m_ui(new Ui::ChangeSelectionDialog) QDialog(parent), m_ui(new Ui::ChangeSelectionDialog)
{ {
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
m_gitExecutable = GitPlugin::client()->vcsBinary(); m_gitExecutable = GitPlugin::client()->vcsBinary();
m_ui->setupUi(this); m_ui->setupUi(this);
m_ui->workingDirectoryChooser->setExpectedKind(PathChooser::ExistingDirectory); m_ui->workingDirectoryChooser->setExpectedKind(PathChooser::ExistingDirectory);

View File

@@ -63,8 +63,6 @@ GerritDialog::GerritDialog(const QSharedPointer<GerritParameters> &p,
, m_model(new GerritModel(p, this)) , m_model(new GerritModel(p, this))
, m_queryModel(new QStringListModel(this)) , m_queryModel(new QStringListModel(this))
{ {
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
m_ui->setupUi(this); m_ui->setupUi(this);
m_ui->remoteComboBox->setParameters(m_parameters); m_ui->remoteComboBox->setParameters(m_parameters);
m_ui->remoteComboBox->setFallbackEnabled(true); m_ui->remoteComboBox->setFallbackEnabled(true);

View File

@@ -128,7 +128,6 @@ GerritPushDialog::GerritPushDialog(const QString &workingDir, const QString &rev
m_workingDir(workingDir), m_workingDir(workingDir),
m_ui(new Ui::GerritPushDialog) m_ui(new Ui::GerritPushDialog)
{ {
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
m_ui->setupUi(this); m_ui->setupUi(this);
m_ui->repositoryLabel->setText(QDir::toNativeSeparators(workingDir)); m_ui->repositoryLabel->setText(QDir::toNativeSeparators(workingDir));
m_ui->remoteComboBox->setRepository(workingDir); m_ui->remoteComboBox->setRepository(workingDir);

View File

@@ -69,7 +69,6 @@ bool Stash::parseStashLine(const QString &l)
bool inputText(QWidget *parent, const QString &title, const QString &prompt, QString *s) bool inputText(QWidget *parent, const QString &title, const QString &prompt, QString *s)
{ {
QInputDialog dialog(parent); QInputDialog dialog(parent);
dialog.setWindowFlags(dialog.windowFlags() & ~Qt::WindowContextHelpButtonHint);
dialog.setWindowTitle(title); dialog.setWindowTitle(title);
dialog.setLabelText(prompt); dialog.setLabelText(prompt);
dialog.setTextValue(*s); dialog.setTextValue(*s);

View File

@@ -227,7 +227,6 @@ LogChangeDialog::LogChangeDialog(bool isReset, QWidget *parent) :
connect(m_widget, &LogChangeWidget::activated, okButton, [okButton] { okButton->animateClick(); }); connect(m_widget, &LogChangeWidget::activated, okButton, [okButton] { okButton->animateClick(); });
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
resize(600, 400); resize(600, 400);
} }

View File

@@ -53,7 +53,6 @@ public:
m_remoteNames(remoteNames) m_remoteNames(remoteNames)
{ {
m_ui.setupUi(this); m_ui.setupUi(this);
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
m_ui.nameEdit->setValidationFunction([this](Utils::FancyLineEdit *edit, QString *errorMessage) { m_ui.nameEdit->setValidationFunction([this](Utils::FancyLineEdit *edit, QString *errorMessage) {
if (!edit) if (!edit)
return false; return false;
@@ -127,7 +126,6 @@ RemoteDialog::RemoteDialog(QWidget *parent) :
m_remoteModel(new RemoteModel(this)) m_remoteModel(new RemoteModel(this))
{ {
setModal(false); setModal(false);
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
setAttribute(Qt::WA_DeleteOnClose, true); // Do not update unnecessarily setAttribute(Qt::WA_DeleteOnClose, true); // Do not update unnecessarily
m_ui->setupUi(this); m_ui->setupUi(this);

View File

@@ -102,7 +102,6 @@ StashDialog::StashDialog(QWidget *parent) : QDialog(parent),
m_restoreCurrentInBranchButton(new QPushButton(tr("Restore to &Branch..."))), m_restoreCurrentInBranchButton(new QPushButton(tr("Restore to &Branch..."))),
m_refreshButton(new QPushButton(tr("Re&fresh"))) m_refreshButton(new QPushButton(tr("Re&fresh")))
{ {
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
setAttribute(Qt::WA_DeleteOnClose, true); // Do not update unnecessarily setAttribute(Qt::WA_DeleteOnClose, true); // Do not update unnecessarily
ui->setupUi(this); ui->setupUi(this);

View File

@@ -88,8 +88,6 @@ ExportDialog::ExportDialog(QWidget *parent)
, m_heightSpinBox(new QSpinBox(this)) , m_heightSpinBox(new QSpinBox(this))
, m_aspectRatio(1) , m_aspectRatio(1)
{ {
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
auto formLayout = new QFormLayout(this); auto formLayout = new QFormLayout(this);
m_pathChooser->setMinimumWidth(QApplication::desktop()->availableGeometry(this).width() / 5); m_pathChooser->setMinimumWidth(QApplication::desktop()->availableGeometry(this).width() / 5);

View File

@@ -184,8 +184,6 @@ MultiExportDialog::MultiExportDialog(QWidget *parent)
, m_pathChooser(new Utils::PathChooser(this)) , m_pathChooser(new Utils::PathChooser(this))
, m_sizesLineEdit(new QLineEdit) , m_sizesLineEdit(new QLineEdit)
{ {
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
auto formLayout = new QFormLayout(this); auto formLayout = new QFormLayout(this);
m_pathChooser->setMinimumWidth(QApplication::desktop()->availableGeometry(this).width() / 5); m_pathChooser->setMinimumWidth(QApplication::desktop()->availableGeometry(this).width() / 5);

View File

@@ -842,7 +842,6 @@ public:
connect(filter, &QLineEdit::textChanged, proxy, &QSortFilterProxyModel::setFilterWildcard); connect(filter, &QLineEdit::textChanged, proxy, &QSortFilterProxyModel::setFilterWildcard);
listView->setModel(proxy); listView->setModel(proxy);
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
setModal(true); setModal(true);
} }

View File

@@ -124,7 +124,6 @@ DeviceProcessesDialogPrivate::DeviceProcessesDialogPrivate(KitChooser *chooser,
, buttonBox(new QDialogButtonBox(parent)) , buttonBox(new QDialogButtonBox(parent))
{ {
q->setWindowTitle(DeviceProcessesDialog::tr("List of Processes")); q->setWindowTitle(DeviceProcessesDialog::tr("List of Processes"));
q->setWindowFlags(q->windowFlags() & ~Qt::WindowContextHelpButtonHint);
q->setMinimumHeight(500); q->setMinimumHeight(500);
processList = nullptr; processList = nullptr;

View File

@@ -39,7 +39,6 @@ WaitForStopDialog::WaitForStopDialog(QList<ProjectExplorer::RunControl *> runCon
m_runControls(runControls) m_runControls(runControls)
{ {
setWindowTitle(tr("Waiting for Applications to Stop")); setWindowTitle(tr("Waiting for Applications to Stop"));
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
auto layout = new QVBoxLayout(); auto layout = new QVBoxLayout();
setLayout(layout); setLayout(layout);

View File

@@ -48,7 +48,6 @@ AnnotationEditorDialog::AnnotationEditorDialog(QWidget *parent, const QString &t
{ {
ui->setupUi(this); ui->setupUi(this);
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
setWindowFlag(Qt::Tool, true); setWindowFlag(Qt::Tool, true);
setWindowTitle(titleString); setWindowTitle(titleString);
setModal(true); setModal(true);

View File

@@ -45,7 +45,6 @@ BindingEditorDialog::BindingEditorDialog(QWidget *parent, DialogType type)
: QDialog(parent) : QDialog(parent)
, m_dialogType(type) , m_dialogType(type)
{ {
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
setWindowFlag(Qt::Tool, true); setWindowFlag(Qt::Tool, true);
setWindowTitle(defaultTitle()); setWindowTitle(defaultTitle());
setModal(false); setModal(false);

View File

@@ -95,7 +95,6 @@ QString AddImagesDialog::getDirectory(const QStringList &fileNames, const QStrin
QString directory = defaultDirectory; QString directory = defaultDirectory;
dialog->setModal(true); dialog->setModal(true);
dialog->setWindowFlags(dialog->windowFlags() & ~Qt::WindowContextHelpButtonHint);
dialog->setWindowTitle(QCoreApplication::translate("AddImageToResources","Add Resources")); dialog->setWindowTitle(QCoreApplication::translate("AddImageToResources","Add Resources"));
QTableWidget *table = createFilesTable(fileNames); QTableWidget *table = createFilesTable(fileNames);
table->setParent(dialog); table->setParent(dialog);

View File

@@ -34,7 +34,6 @@ AddNewBackendDialog::AddNewBackendDialog(QWidget *parent) :
QDialog(parent), QDialog(parent),
m_ui(new Ui::AddNewBackendDialog) m_ui(new Ui::AddNewBackendDialog)
{ {
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
m_ui->setupUi(this); m_ui->setupUi(this);
connect(m_ui->comboBox, &QComboBox::currentTextChanged, this, &AddNewBackendDialog::invalidate); connect(m_ui->comboBox, &QComboBox::currentTextChanged, this, &AddNewBackendDialog::invalidate);

View File

@@ -33,14 +33,12 @@ AnimationCurveDialog::AnimationCurveDialog(QWidget *parent)
: QDialog(parent) : QDialog(parent)
, m_editor(nullptr) , m_editor(nullptr)
{ {
setWindowFlag(Qt::WindowContextHelpButtonHint, false);
} }
AnimationCurveDialog::AnimationCurveDialog(DesignTools::CurveEditorModel *model, QWidget *parent) AnimationCurveDialog::AnimationCurveDialog(DesignTools::CurveEditorModel *model, QWidget *parent)
: QDialog(parent) : QDialog(parent)
, m_editor(nullptr) , m_editor(nullptr)
{ {
setWindowFlag(Qt::WindowContextHelpButtonHint, false);
setModel(model); setModel(model);
} }

View File

@@ -61,7 +61,6 @@ EasingCurveDialog::EasingCurveDialog(const QList<ModelNode> &frames, QWidget *pa
, m_label(new QLabel) , m_label(new QLabel)
, m_frames(frames) , m_frames(frames)
{ {
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
setWindowFlag(Qt::Tool, true); setWindowFlag(Qt::Tool, true);
auto tw = new QTabWidget; auto tw = new QTabWidget;

View File

@@ -36,7 +36,6 @@ SetFrameValueDialog::SetFrameValueDialog(qreal frame, const QVariant &value,
, ui(new Ui::SetFrameValueDialog) , ui(new Ui::SetFrameValueDialog)
{ {
ui->setupUi(this); ui->setupUi(this);
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
setWindowTitle(tr("Edit Keyframe")); setWindowTitle(tr("Edit Keyframe"));
setFixedSize(size()); setFixedSize(size());

View File

@@ -102,7 +102,6 @@ TimelineSettingsDialog::TimelineSettingsDialog(QWidget *parent, TimelineView *vi
{ {
m_timelineSettingsModel = new TimelineSettingsModel(this, view); m_timelineSettingsModel = new TimelineSettingsModel(this, view);
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
ui->setupUi(this); ui->setupUi(this);
auto *timelineCornerWidget = new QToolBar; auto *timelineCornerWidget = new QToolBar;

View File

@@ -36,7 +36,6 @@ OpenUiQmlFileDialog::OpenUiQmlFileDialog(QWidget *parent) :
QDialog(parent), QDialog(parent),
ui(new Ui::OpenUiQmlFileDialog) ui(new Ui::OpenUiQmlFileDialog)
{ {
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
ui->setupUi(this); ui->setupUi(this);
connect(ui->cancelButton, &QPushButton::clicked, this, &QDialog::close); connect(ui->cancelButton, &QPushButton::clicked, this, &QDialog::close);

View File

@@ -51,7 +51,6 @@ QmlProfilerAttachDialog::QmlProfilerAttachDialog(QWidget *parent) :
QDialog(parent), QDialog(parent),
d(new QmlProfilerAttachDialogPrivate) d(new QmlProfilerAttachDialogPrivate)
{ {
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
setWindowTitle(tr("Start QML Profiler")); setWindowTitle(tr("Start QML Profiler"));
d->kitChooser = new KitChooser(this); d->kitChooser = new KitChooser(this);

View File

@@ -995,7 +995,6 @@ void SubversionPluginPrivate::slotDescribe()
QTC_ASSERT(state.hasTopLevel(), return); QTC_ASSERT(state.hasTopLevel(), return);
QInputDialog inputDialog(ICore::dialogParent()); QInputDialog inputDialog(ICore::dialogParent());
inputDialog.setWindowFlags(inputDialog.windowFlags() & ~Qt::WindowContextHelpButtonHint);
inputDialog.setInputMode(QInputDialog::IntInput); inputDialog.setInputMode(QInputDialog::IntInput);
inputDialog.setIntRange(1, INT_MAX); inputDialog.setIntRange(1, INT_MAX);
inputDialog.setWindowTitle(tr("Describe")); inputDialog.setWindowTitle(tr("Describe"));

View File

@@ -1338,9 +1338,6 @@ HeobDialog::HeobDialog(QWidget *parent) :
m_profileDeleteButton->setEnabled(m_profilesCombo->count() > 1); m_profileDeleteButton->setEnabled(m_profilesCombo->count() > 1);
setWindowTitle(tr("Heob")); setWindowTitle(tr("Heob"));
// disable context help button
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
} }
QString HeobDialog::arguments() const QString HeobDialog::arguments() const

View File

@@ -145,7 +145,6 @@ CleanDialog::CleanDialog(QWidget *parent) :
d(new Internal::CleanDialogPrivate) d(new Internal::CleanDialogPrivate)
{ {
setModal(true); setModal(true);
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
d->ui.setupUi(this); d->ui.setupUi(this);
d->ui.buttonBox->addButton(tr("Delete..."), QDialogButtonBox::AcceptRole); d->ui.buttonBox->addButton(tr("Delete..."), QDialogButtonBox::AcceptRole);

View File

@@ -169,7 +169,6 @@ NickNameDialog::NickNameDialog(QStandardItemModel *model, QWidget *parent) :
m_model(model), m_model(model),
m_filterModel(new QSortFilterProxyModel(this)) m_filterModel(new QSortFilterProxyModel(this))
{ {
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
m_ui->setupUi(this); m_ui->setupUi(this);
okButton()->setEnabled(false); okButton()->setEnabled(false);