forked from qt-creator/qt-creator
Find: Fix an issue found by clang static analyzer
Change-Id: Id556e670930b0f8e2ee47fb413c443b79a86f4d4 Reviewed-by: Eike Ziller <eike.ziller@digia.com>
This commit is contained in:
@@ -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)
|
||||
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());
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user