Commit 29e4ed9f authored by hjk's avatar hjk

Find: Fix an issue found by clang static analyzer

Change-Id: Id556e670930b0f8e2ee47fb413c443b79a86f4d4
Reviewed-by: default avatarEike Ziller <eike.ziller@digia.com>
parent 1f45eb2c
......@@ -32,6 +32,7 @@
#include "findplugin.h"
#include <coreplugin/icore.h>
#include <utils/qtcassert.h>
#include <QSettings>
#include <QStringListModel>
......@@ -225,17 +226,18 @@ void FindToolWindow::acceptAndGetParameters(QString *term, IFindFilter **filter)
void FindToolWindow::search()
{
QString term;
IFindFilter *filter;
IFindFilter *filter = 0;
acceptAndGetParameters(&term, &filter);
if (filter)
filter->findAll(term, m_plugin->findFlags());
QTC_ASSERT(filter, return);
filter->findAll(term, m_plugin->findFlags());
}
void FindToolWindow::replace()
{
QString term;
IFindFilter *filter;
IFindFilter *filter = 0;
acceptAndGetParameters(&term, &filter);
QTC_ASSERT(filter, return);
filter->replaceAll(term, m_plugin->findFlags());
}
......
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