diff options
author | hjk <hjk@qt.io> | 2019-08-15 09:28:32 +0200 |
---|---|---|
committer | hjk <hjk@qt.io> | 2019-08-20 10:37:40 +0000 |
commit | 583cf69391fc11d868d59368ce178704b1827b12 (patch) | |
tree | 8d97906dddcb82d469375eff9f0700e3031ef1c0 /src/plugins/qtsupport/baseqtversion.cpp | |
parent | 9d206a2bc45af5ae4680fad0ab0db9b6415abcda (diff) |
QtSupport: Move qmlsceneCommand down to BaseQtVersion
This had already accessors to all kind of commands, having also
qmlsceneCommand there makes it more consistent and lets us un-export
DesktopQtVersion.
Change-Id: I3ba5a840125b2b1197abb1564b7906571230f2c4
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Diffstat (limited to 'src/plugins/qtsupport/baseqtversion.cpp')
-rw-r--r-- | src/plugins/qtsupport/baseqtversion.cpp | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/plugins/qtsupport/baseqtversion.cpp b/src/plugins/qtsupport/baseqtversion.cpp index 8d3b24d9606..4fdf25da2eb 100644 --- a/src/plugins/qtsupport/baseqtversion.cpp +++ b/src/plugins/qtsupport/baseqtversion.cpp @@ -547,6 +547,9 @@ void BaseQtVersion::fromMap(const QVariantMap &map) } m_qmakeCommand = Utils::FilePath::fromString(string); + + // Clear the cached qmlscene command, it might not match the restored path anymore. + m_qmlsceneCommand.clear(); } QVariantMap BaseQtVersion::toMap() const @@ -814,6 +817,24 @@ QString BaseQtVersion::qscxmlcCommand() const return m_qscxmlcCommand; } +QString BaseQtVersion::qmlsceneCommand() const +{ + if (!isValid()) + return QString(); + + if (!m_qmlsceneCommand.isNull()) + return m_qmlsceneCommand; + + ensureMkSpecParsed(); + + const QString path = + qmlBinPath().pathAppended(Utils::HostOsInfo::withExecutableSuffix("qmlscene")).toString(); + + m_qmlsceneCommand = QFileInfo(path).isFile() ? path : QString(); + + return m_qmlsceneCommand; +} + QString BaseQtVersion::findHostBinary(HostBinaries binary) const { QString baseDir; |