Commit f42fff76 authored by hjk's avatar hjk

Find: Avoid virtual signals

Very unusual construct...

Task-number: QTCREATORBUG-12922
Change-Id: Ia7c3a3c2520ed53fdb83d91b50a0a6737f87d4f6
Reviewed-by: default avatarEike Ziller <eike.ziller@digia.com>
parent 9e3441df
......@@ -135,7 +135,7 @@ void BaseTextFind::resetIncrementalSearch()
void BaseTextFind::clearHighlights()
{
emit highlightAll(QString(), 0);
highlightAll(QString(), 0);
}
QString BaseTextFind::currentFindString() const
......@@ -184,9 +184,9 @@ IFindSupport::Result BaseTextFind::findIncremental(const QString &txt, FindFlags
showWrapIndicator(d->m_widget);
}
if (found)
emit highlightAll(txt, findFlags);
highlightAll(txt, findFlags);
else
emit highlightAll(QString(), 0);
highlightAll(QString(), 0);
return found ? Found : NotFound;
}
......@@ -424,4 +424,9 @@ void BaseTextFind::clearFindScope()
d->m_findScopeVerticalBlockSelectionLastColumn);
}
void BaseTextFind::highlightAll(const QString &txt, FindFlags findFlags)
{
emit highlightAllRequested(txt, findFlags);
}
} // namespace Core
......@@ -66,8 +66,10 @@ public:
void defineFindScope();
void clearFindScope();
signals:
void highlightAll(const QString &txt, Core::FindFlags findFlags);
signals:
void highlightAllRequested(const QString &txt, Core::FindFlags findFlags);
void findScopeChanged(const QTextCursor &start, const QTextCursor &end,
int verticalBlockSelectionFirstColumn,
int verticalBlockSelectionLastColumn);
......
......@@ -490,7 +490,7 @@ BaseTextEditorWidgetPrivate::BaseTextEditorWidgetPrivate(BaseTextEditorWidget *p
{
Aggregation::Aggregate *aggregate = new Aggregation::Aggregate;
BaseTextFind *baseTextFind = new BaseTextFind(q);
connect(baseTextFind, &BaseTextFind::highlightAll,
connect(baseTextFind, &BaseTextFind::highlightAllRequested,
this, &BaseTextEditorWidgetPrivate::highlightSearchResultsSlot);
connect(baseTextFind, &BaseTextFind::findScopeChanged,
this, &BaseTextEditorWidgetPrivate::setFindScope);
......
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