Skip to content
Snippets Groups Projects
Commit efb453da authored by Thorbjørn Lindeijer's avatar Thorbjørn Lindeijer
Browse files

Fixed reused message box to still update the text when necessary

The Variables message box is used for both the external editor as well
as the file browser instructions.

Reviewed-by: Daniel Molkentin
parent 7ffc3733
No related branches found
No related tags found
No related merge requests found
......@@ -37,7 +37,6 @@
#include <coreplugin/editormanager/editormanager.h>
#include <coreplugin/icore.h>
#include <QtGui/QMessageBox>
#include <QtGui/QMainWindow>
#include <QtCore/QCoreApplication>
......@@ -219,9 +218,12 @@ void GeneralSettings::resetFileBrowser()
#endif
void GeneralSettings::variableHelpDialogCreator(const QString& helpText)
void GeneralSettings::variableHelpDialogCreator(const QString &helpText)
{
if (m_dialog) {
if (m_dialog->text() != helpText)
m_dialog->setText(helpText);
m_dialog->show();
m_dialog->raise();
m_dialog->activateWindow();
......
......@@ -32,7 +32,7 @@
#include <coreplugin/dialogs/ioptionspage.h>
#include <QtCore/QPointer>
#include <QtGui/QWidget>
#include <QtGui/QMessageBox>
namespace Core {
namespace Internal {
......@@ -71,13 +71,13 @@ private slots:
#endif
private:
void variableHelpDialogCreator(const QString& helpText);
void variableHelpDialogCreator(const QString &helpText);
void fillLanguageBox() const;
QString language() const;
void setLanguage(const QString&);
Ui::GeneralSettings *m_page;
QString m_searchKeywords;
QPointer<QWidget> m_dialog;
QPointer<QMessageBox> m_dialog;
};
} // namespace Internal
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment