diff options
author | hjk <hjk@qt.io> | 2019-11-04 09:10:35 +0100 |
---|---|---|
committer | hjk <hjk@qt.io> | 2019-11-04 09:14:44 +0000 |
commit | ac37146e27ac0c85a28e31994e35f9cd9cd6b9c8 (patch) | |
tree | 4e3434287ffdc58d0690eaf4621ceb1b522992df | |
parent | e7144e4883d32cb59daae991834c98bf96cf19fb (diff) | |
download | qt-creator-ac37146e27ac0c85a28e31994e35f9cd9cd6b9c8.tar.gz |
ProjectExplorer: Export findFileInSession()
Would be useful for https://github.com/JakeSays/QtCreatorTerminalPlugin/
Change-Id: I6629c95535b5ce7af8f9d486005f41598b8dff47
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
-rw-r--r-- | src/plugins/projectexplorer/fileinsessionfinder.cpp | 5 | ||||
-rw-r--r-- | src/plugins/projectexplorer/fileinsessionfinder.h | 7 | ||||
-rw-r--r-- | src/plugins/projectexplorer/task.cpp | 2 |
3 files changed, 8 insertions, 6 deletions
diff --git a/src/plugins/projectexplorer/fileinsessionfinder.cpp b/src/plugins/projectexplorer/fileinsessionfinder.cpp index 8d42c409ad..204fa0f9af 100644 --- a/src/plugins/projectexplorer/fileinsessionfinder.cpp +++ b/src/plugins/projectexplorer/fileinsessionfinder.cpp @@ -79,11 +79,12 @@ FilePathList FileInSessionFinder::doFindFile(const FilePath &filePath) return m_finder.findFile(QUrl::fromLocalFile(filePath.toString())); } +} // namespace Internal + FilePathList findFileInSession(const FilePath &filePath) { - static FileInSessionFinder finder; + static Internal::FileInSessionFinder finder; return finder.doFindFile(filePath); } -} // namespace Internal } // namespace ProjectExplorer diff --git a/src/plugins/projectexplorer/fileinsessionfinder.h b/src/plugins/projectexplorer/fileinsessionfinder.h index f14b3708f3..307018a2fc 100644 --- a/src/plugins/projectexplorer/fileinsessionfinder.h +++ b/src/plugins/projectexplorer/fileinsessionfinder.h @@ -25,12 +25,13 @@ #pragma once +#include "projectexplorer_export.h" + #include <utils/fileutils.h> namespace ProjectExplorer { -namespace Internal { -Utils::FilePathList findFileInSession(const Utils::FilePath &filePath); +// Possibly used by "QtCreatorTerminalPlugin" +PROJECTEXPLORER_EXPORT Utils::FilePathList findFileInSession(const Utils::FilePath &filePath); -} // namespace Internal } // namespace ProjectExplorer diff --git a/src/plugins/projectexplorer/task.cpp b/src/plugins/projectexplorer/task.cpp index 2a323f0041..8b0b67a1eb 100644 --- a/src/plugins/projectexplorer/task.cpp +++ b/src/plugins/projectexplorer/task.cpp @@ -124,7 +124,7 @@ void Task::setFile(const Utils::FilePath &file_) { file = file_; if (!file.isEmpty() && !file.toFileInfo().isAbsolute()) { - Utils::FilePathList possiblePaths = Internal::findFileInSession(file); + Utils::FilePathList possiblePaths = findFileInSession(file); if (possiblePaths.length() == 1) file = possiblePaths.first(); else |