QtSupport: De-virtualize BaseQtVersion::sourcePath

... as it was never re-implemented. Also inline the private
BaseQtVersion::updateSourcePath in this only user.

Change-Id: I505395b5e9b0723ceab790f3b776cea12fe64780
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
hjk
2019-02-13 18:08:07 +01:00
parent 83e08a0d50
commit 992df45cd5
2 changed files with 5 additions and 11 deletions

View File

@@ -744,17 +744,12 @@ QString BaseQtVersion::toHtml(bool verbose) const
return rc; return rc;
} }
void BaseQtVersion::updateSourcePath() const
{
if (!m_sourcePath.isEmpty())
return;
updateVersionInfo();
m_sourcePath = sourcePath(m_versionInfo);
}
FileName BaseQtVersion::sourcePath() const FileName BaseQtVersion::sourcePath() const
{ {
updateSourcePath(); if (m_sourcePath.isEmpty()) {
updateVersionInfo();
m_sourcePath = sourcePath(m_versionInfo);
}
return m_sourcePath; return m_sourcePath;
} }

View File

@@ -148,7 +148,7 @@ public:
virtual Utils::Environment qmakeRunEnvironment() const; virtual Utils::Environment qmakeRunEnvironment() const;
// source path defined by qmake property QT_INSTALL_PREFIX/src or by qmake.stash QT_SOURCE_TREE // source path defined by qmake property QT_INSTALL_PREFIX/src or by qmake.stash QT_SOURCE_TREE
virtual Utils::FileName sourcePath() const; Utils::FileName sourcePath() const;
// returns source path for installed qt packages and empty string for self build qt // returns source path for installed qt packages and empty string for self build qt
Utils::FileName qtPackageSourcePath() const; Utils::FileName qtPackageSourcePath() const;
bool isInSourceDirectory(const Utils::FileName &filePath); bool isInSourceDirectory(const Utils::FileName &filePath);
@@ -270,7 +270,6 @@ protected:
private: private:
void setAutoDetectionSource(const QString &autodetectionSource); void setAutoDetectionSource(const QString &autodetectionSource);
void updateSourcePath() const;
void updateVersionInfo() const; void updateVersionInfo() const;
enum HostBinaries { Designer, Linguist, Uic, QScxmlc }; enum HostBinaries { Designer, Linguist, Uic, QScxmlc };
QString findHostBinary(HostBinaries binary) const; QString findHostBinary(HostBinaries binary) const;