aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/texteditor/basefilefind.cpp
diff options
context:
space:
mode:
authorEike Ziller <eike.ziller@qt.io>2016-11-29 12:03:46 +0100
committerEike Ziller <eike.ziller@qt.io>2016-11-30 09:40:40 +0000
commit6d08973ced98ecbcc2d1ce5da256d1bb2c25a8f4 (patch)
tree0a9ab47053eee0c1379f621e3fd767f1a699920c /src/plugins/texteditor/basefilefind.cpp
parenta016c7f4f418e3d2c499b3b9069b147dd56428a3 (diff)
BaseFileFind: Make some methods static
Change-Id: I2cf75aabec2f44278c52e2bcff8a5278678517f3 Reviewed-by: David Schulz <david.schulz@qt.io>
Diffstat (limited to 'src/plugins/texteditor/basefilefind.cpp')
-rw-r--r--src/plugins/texteditor/basefilefind.cpp48
1 files changed, 24 insertions, 24 deletions
diff --git a/src/plugins/texteditor/basefilefind.cpp b/src/plugins/texteditor/basefilefind.cpp
index 9aaeeef7db..abd90776d0 100644
--- a/src/plugins/texteditor/basefilefind.cpp
+++ b/src/plugins/texteditor/basefilefind.cpp
@@ -125,6 +125,29 @@ public:
} // namespace Internal
+static void syncComboWithSettings(QComboBox *combo, const QString &setting)
+{
+ if (!combo)
+ return;
+ int index = combo->findText(setting);
+ if (index < 0)
+ combo->setEditText(setting);
+ else
+ combo->setCurrentIndex(index);
+}
+
+static void updateComboEntries(QComboBox *combo, bool onTop)
+{
+ int index = combo->findText(combo->currentText());
+ if (index < 0) {
+ if (onTop)
+ combo->insertItem(0, combo->currentText());
+ else
+ combo->addItem(combo->currentText());
+ combo->setCurrentIndex(combo->findText(combo->currentText()));
+ }
+}
+
using namespace Internal;
SearchEngine::SearchEngine()
@@ -390,29 +413,6 @@ void BaseFileFind::readCommonSettings(QSettings *settings, const QString &defaul
syncSearchEngineCombo(currentSearchEngineIndex);
}
-void BaseFileFind::syncComboWithSettings(QComboBox *combo, const QString &setting)
-{
- if (!combo)
- return;
- int index = combo->findText(setting);
- if (index < 0)
- combo->setEditText(setting);
- else
- combo->setCurrentIndex(index);
-}
-
-void BaseFileFind::updateComboEntries(QComboBox *combo, bool onTop)
-{
- int index = combo->findText(combo->currentText());
- if (index < 0) {
- if (onTop)
- combo->insertItem(0, combo->currentText());
- else
- combo->addItem(combo->currentText());
- combo->setCurrentIndex(combo->findText(combo->currentText()));
- }
-}
-
void BaseFileFind::openEditor(const SearchResultItem &item)
{
SearchResult *result = qobject_cast<SearchResult *>(sender());
@@ -540,7 +540,7 @@ QVariant BaseFileFind::getAdditionalParameters(SearchResult *search)
QFuture<FileSearchResultList> BaseFileFind::executeSearch(const FileFindParameters &parameters)
{
- return d->m_searchEngines[parameters.searchEngineIndex]->executeSearch(parameters,this);
+ return d->m_searchEngines[parameters.searchEngineIndex]->executeSearch(parameters, this);
}
namespace Internal {