diff options
| author | Christian Stenger <christian.stenger@qt.io> | 2019-07-24 13:17:01 +0200 |
|---|---|---|
| committer | Christian Stenger <christian.stenger@qt.io> | 2019-07-24 11:56:50 +0000 |
| commit | b0bee4b947c45103a06c3d747fbdd569afcb5450 (patch) | |
| tree | b8ec9d45f904f724b545ae5f7f774daaf8428227 /src | |
| parent | 39aa3252452b005c9b36cd75326e8460383d14da (diff) | |
| download | qt-creator-b0bee4b947c45103a06c3d747fbdd569afcb5450.tar.gz | |
Fix compile on macOS
Amends 44acfc0702d0.
Change-Id: I1abfb757c88f60ed22a2c94f55dd0e418d2fb6a0
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Diffstat (limited to 'src')
| -rw-r--r-- | src/plugins/coreplugin/locator/spotlightlocatorfilter.mm | 25 |
1 files changed, 9 insertions, 16 deletions
diff --git a/src/plugins/coreplugin/locator/spotlightlocatorfilter.mm b/src/plugins/coreplugin/locator/spotlightlocatorfilter.mm index f8cdd8189e..049c5bebaf 100644 --- a/src/plugins/coreplugin/locator/spotlightlocatorfilter.mm +++ b/src/plugins/coreplugin/locator/spotlightlocatorfilter.mm @@ -54,9 +54,8 @@ public: void toFront(); bool hasNext() const; - QString next(); - QString filePath() const; - QString fileName() const; + Utils::FilePath next() override; + Utils::FilePath filePath() const override; private: void ensureNext(); @@ -132,24 +131,18 @@ bool SpotlightIterator::hasNext() const return (m_index + 1 < m_filePaths.size()); } -QString SpotlightIterator::next() +Utils::FilePath SpotlightIterator::next() { ensureNext(); ++m_index; - QTC_ASSERT(m_index < m_filePaths.size(), return QString()); - return m_filePaths.at(m_index); + QTC_ASSERT(m_index < m_filePaths.size(), return Utils::FilePath()); + return Utils::FilePath::fromString(m_filePaths.at(m_index)); } -QString SpotlightIterator::filePath() const +Utils::FilePath SpotlightIterator::filePath() const { - QTC_ASSERT(m_index < m_filePaths.size(), return QString()); - return m_filePaths.at(m_index); -} - -QString SpotlightIterator::fileName() const -{ - QTC_ASSERT(m_index < m_fileNames.size(), return QString()); - return m_fileNames.at(m_index); + QTC_ASSERT(m_index < m_filePaths.size(), return Utils::FilePath()); + return Utils::FilePath::fromString(m_filePaths.at(m_index)); } void SpotlightIterator::ensureNext() @@ -183,7 +176,7 @@ void SpotlightLocatorFilter::prepareSearch(const QString &entry) { const EditorManager::FilePathInfo fp = EditorManager::splitLineAndColumnNumber(entry); if (fp.filePath.isEmpty()) { - setFileIterator(new BaseFileFilter::ListIterator(QStringList())); + setFileIterator(new BaseFileFilter::ListIterator(Utils::FilePathList())); } else { // only pass the file name part to spotlight to allow searches like "somepath/*foo" int lastSlash = fp.filePath.lastIndexOf(QLatin1Char('/')); |
