forked from qt-creator/qt-creator
Removed code duplication and unused methods in IFindSupport derivatives.
Change-Id: I6c76665c88f2d4678858081765e29a08566798b1 Reviewed-by: Eike Ziller <eike.ziller@nokia.com>
This commit is contained in:
committed by
Eike Ziller
parent
8c2972be05
commit
c6703af8f9
@@ -170,13 +170,6 @@ public:
|
||||
return result;
|
||||
}
|
||||
|
||||
void replace(const QString &, const QString &,
|
||||
Find::FindFlags) { }
|
||||
bool replaceStep(const QString &, const QString &,
|
||||
Find::FindFlags) { return false;}
|
||||
int replaceAll(const QString &, const QString &,
|
||||
Find::FindFlags) { return 0; }
|
||||
|
||||
private:
|
||||
BinEditor *m_editor;
|
||||
int m_incrementalStartPos;
|
||||
|
@@ -93,6 +93,20 @@ private:
|
||||
|
||||
using namespace Find;
|
||||
|
||||
void IFindSupport::replace(const QString &before, const QString &after, FindFlags findFlags)
|
||||
{
|
||||
}
|
||||
|
||||
bool IFindSupport::replaceStep(const QString &before, const QString &after, FindFlags findFlags)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
int IFindSupport::replaceAll(const QString &before, const QString &after, FindFlags findFlags)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
void IFindSupport::showWrapIndicator(QWidget *parent)
|
||||
{
|
||||
(new Internal::WrapIndicator(parent))->run();
|
||||
|
@@ -62,11 +62,11 @@ public:
|
||||
virtual Result findIncremental(const QString &txt, FindFlags findFlags) = 0;
|
||||
virtual Result findStep(const QString &txt, FindFlags findFlags) = 0;
|
||||
virtual void replace(const QString &before, const QString &after,
|
||||
FindFlags findFlags) = 0;
|
||||
FindFlags findFlags);
|
||||
virtual bool replaceStep(const QString &before, const QString &after,
|
||||
FindFlags findFlags) = 0;
|
||||
FindFlags findFlags);
|
||||
virtual int replaceAll(const QString &before, const QString &after,
|
||||
FindFlags findFlags) = 0;
|
||||
FindFlags findFlags);
|
||||
|
||||
virtual void defineFindScope(){}
|
||||
virtual void clearFindScope(){}
|
||||
|
@@ -131,25 +131,6 @@ IFindSupport::Result TreeViewFind::findStep(const QString &txt,
|
||||
return result;
|
||||
}
|
||||
|
||||
void TreeViewFind::replace(const QString &/*before*/, const QString &/*after*/,
|
||||
Find::FindFlags /*findFlags*/)
|
||||
{
|
||||
}
|
||||
|
||||
bool TreeViewFind::replaceStep(const QString &/*before*/,
|
||||
const QString &/*after*/,
|
||||
Find::FindFlags /*findFlags*/)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
int TreeViewFind::replaceAll(const QString &/*before*/,
|
||||
const QString &/*after*/,
|
||||
Find::FindFlags /*findFlags*/)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
IFindSupport::Result TreeViewFind::find(const QString &searchTxt,
|
||||
Find::FindFlags findFlags,
|
||||
bool startFromCurrentIndex,
|
||||
|
@@ -61,12 +61,6 @@ public:
|
||||
virtual void highlightAll(const QString &txt, FindFlags findFlags);
|
||||
Result findIncremental(const QString &txt, Find::FindFlags findFlags);
|
||||
Result findStep(const QString &txt, Find::FindFlags findFlags);
|
||||
void replace(const QString &before, const QString &after,
|
||||
Find::FindFlags findFlags);
|
||||
bool replaceStep(const QString &before, const QString &after,
|
||||
Find::FindFlags findFlags);
|
||||
int replaceAll(const QString &before, const QString &after,
|
||||
Find::FindFlags findFlags);
|
||||
|
||||
private:
|
||||
Result find(const QString &txt, Find::FindFlags findFlags,
|
||||
|
@@ -46,11 +46,6 @@ HelpFindSupport::~HelpFindSupport()
|
||||
{
|
||||
}
|
||||
|
||||
bool HelpFindSupport::isEnabled() const
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
Find::FindFlags HelpFindSupport::supportedFindFlags() const
|
||||
{
|
||||
return Find::FindBackward | Find::FindCaseSensitively;
|
||||
|
@@ -50,7 +50,6 @@ public:
|
||||
HelpFindSupport(CentralWidget *centralWidget);
|
||||
~HelpFindSupport();
|
||||
|
||||
bool isEnabled() const;
|
||||
bool supportsReplace() const { return false; }
|
||||
Find::FindFlags supportedFindFlags() const;
|
||||
|
||||
@@ -61,12 +60,6 @@ public:
|
||||
|
||||
Result findIncremental(const QString &txt, Find::FindFlags findFlags);
|
||||
Result findStep(const QString &txt, Find::FindFlags findFlags);
|
||||
void replace(const QString &, const QString &,
|
||||
Find::FindFlags ) { }
|
||||
bool replaceStep(const QString &, const QString &,
|
||||
Find::FindFlags ) { return false; }
|
||||
int replaceAll(const QString &, const QString &,
|
||||
Find::FindFlags ) { return 0; }
|
||||
|
||||
private:
|
||||
bool find(const QString &ttf, Find::FindFlags findFlags, bool incremental);
|
||||
@@ -80,7 +73,6 @@ class HelpViewerFindSupport : public Find::IFindSupport
|
||||
public:
|
||||
HelpViewerFindSupport(HelpViewer *viewer);
|
||||
|
||||
bool isEnabled() const { return true; }
|
||||
bool supportsReplace() const { return false; }
|
||||
Find::FindFlags supportedFindFlags() const;
|
||||
void resetIncrementalSearch() {}
|
||||
@@ -90,12 +82,6 @@ public:
|
||||
|
||||
Result findIncremental(const QString &txt, Find::FindFlags findFlags);
|
||||
Result findStep(const QString &txt, Find::FindFlags findFlags);
|
||||
void replace(const QString &, const QString &,
|
||||
Find::FindFlags ) { }
|
||||
bool replaceStep(const QString &, const QString &,
|
||||
Find::FindFlags ) { return false; }
|
||||
int replaceAll(const QString &, const QString &,
|
||||
Find::FindFlags ) { return 0; }
|
||||
|
||||
private:
|
||||
bool find(const QString &ttf, Find::FindFlags findFlags, bool incremental);
|
||||
|
Reference in New Issue
Block a user