Commit 24bcbaef authored by Roberto Raggi's avatar Roberto Raggi
Browse files

Don't use modality to inform the user about the dangerous world of code refactoring.

parent f92b1428
...@@ -571,6 +571,8 @@ CPPEditor::CPPEditor(QWidget *parent) ...@@ -571,6 +571,8 @@ CPPEditor::CPPEditor(QWidget *parent)
CPPEditor::~CPPEditor() CPPEditor::~CPPEditor()
{ {
Core::EditorManager::instance()->hideEditorInfoBar(QLatin1String("CppEditor.Rename"));
m_semanticHighlighter->abort(); m_semanticHighlighter->abort();
m_semanticHighlighter->wait(); m_semanticHighlighter->wait();
} }
...@@ -763,13 +765,18 @@ void CPPEditor::renameUsages() ...@@ -763,13 +765,18 @@ void CPPEditor::renameUsages()
Core::EditorManager::instance()->showEditorInfoBar(QLatin1String("CppEditor.Rename"), Core::EditorManager::instance()->showEditorInfoBar(QLatin1String("CppEditor.Rename"),
tr("This change cannot be undone."), tr("This change cannot be undone."),
tr("Yes, I know what I am doing."), tr("Yes, I know what I am doing."),
this, SLOT(renameUsagesNow())); this, SLOT(hideRenameNotification()));
renameUsagesNow();
}
void CPPEditor::hideRenameNotification()
{
Core::EditorManager::instance()->hideEditorInfoBar(QLatin1String("CppEditor.Rename"));
} }
void CPPEditor::renameUsagesNow() void CPPEditor::renameUsagesNow()
{ {
if (Symbol *canonicalSymbol = markSymbols()) { if (Symbol *canonicalSymbol = markSymbols()) {
Core::EditorManager::instance()->hideEditorInfoBar(QLatin1String("CppEditor.Rename"));
m_modelManager->renameUsages(canonicalSymbol); m_modelManager->renameUsages(canonicalSymbol);
} }
} }
......
...@@ -196,6 +196,7 @@ public Q_SLOTS: ...@@ -196,6 +196,7 @@ public Q_SLOTS:
void renameUsages(); void renameUsages();
void findUsages(); void findUsages();
void renameUsagesNow(); void renameUsagesNow();
void hideRenameNotification();
protected: protected:
bool event(QEvent *e); bool event(QEvent *e);
......
...@@ -682,6 +682,8 @@ static void applyChanges(QTextDocument *doc, const QString &text, const QList<Fi ...@@ -682,6 +682,8 @@ static void applyChanges(QTextDocument *doc, const QString &text, const QList<Fi
void CppFindReferences::onReplaceButtonClicked(const QString &text, void CppFindReferences::onReplaceButtonClicked(const QString &text,
const QList<Find::SearchResultItem> &items) const QList<Find::SearchResultItem> &items)
{ {
Core::EditorManager::instance()->hideEditorInfoBar(QLatin1String("CppEditor.Rename"));
if (text.isEmpty()) if (text.isEmpty())
return; return;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment