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

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)
CPPEditor::~CPPEditor()
{
Core::EditorManager::instance()->hideEditorInfoBar(QLatin1String("CppEditor.Rename"));
m_semanticHighlighter->abort();
m_semanticHighlighter->wait();
}
......@@ -763,13 +765,18 @@ void CPPEditor::renameUsages()
Core::EditorManager::instance()->showEditorInfoBar(QLatin1String("CppEditor.Rename"),
tr("This change cannot be undone."),
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()
{
if (Symbol *canonicalSymbol = markSymbols()) {
Core::EditorManager::instance()->hideEditorInfoBar(QLatin1String("CppEditor.Rename"));
m_modelManager->renameUsages(canonicalSymbol);
}
}
......
......@@ -196,6 +196,7 @@ public Q_SLOTS:
void renameUsages();
void findUsages();
void renameUsagesNow();
void hideRenameNotification();
protected:
bool event(QEvent *e);
......
......@@ -682,6 +682,8 @@ static void applyChanges(QTextDocument *doc, const QString &text, const QList<Fi
void CppFindReferences::onReplaceButtonClicked(const QString &text,
const QList<Find::SearchResultItem> &items)
{
Core::EditorManager::instance()->hideEditorInfoBar(QLatin1String("CppEditor.Rename"));
if (text.isEmpty())
return;
......
Markdown is supported
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