aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/qtsupport/baseqtversion.cpp
diff options
context:
space:
mode:
authorTobias Hunger <tobias.hunger@qt.io>2019-10-01 13:34:58 +0200
committerTobias Hunger <tobias.hunger@qt.io>2019-10-21 12:02:24 +0000
commit0c4e2ada5cd5c9ee621ff11d09bdd12b838bc0db (patch)
tree37e6b89c84d35901ad25430dbff9646dcf222d11 /src/plugins/qtsupport/baseqtversion.cpp
parentb79f3c1f075bc093a11e5625b0c161a880bc36e7 (diff)
BaseQtVersion: Remove setupQmakeAndId method on private object
Inline it into its one user or move the code into the constructor of the object. Change-Id: Iae2882a6d82444b2603d4c98159c8ef95c5dd507 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Diffstat (limited to 'src/plugins/qtsupport/baseqtversion.cpp')
-rw-r--r--src/plugins/qtsupport/baseqtversion.cpp19
1 files changed, 9 insertions, 10 deletions
diff --git a/src/plugins/qtsupport/baseqtversion.cpp b/src/plugins/qtsupport/baseqtversion.cpp
index 93c8015f3e3..0b525f65430 100644
--- a/src/plugins/qtsupport/baseqtversion.cpp
+++ b/src/plugins/qtsupport/baseqtversion.cpp
@@ -130,9 +130,10 @@ enum HostBinaries { Designer, Linguist, Uic, QScxmlc };
class BaseQtVersionPrivate
{
public:
- BaseQtVersionPrivate(BaseQtVersion *parent) : q(parent) {}
+ BaseQtVersionPrivate(BaseQtVersion *parent)
+ : q(parent)
+ {}
- void setupQmakePathAndId(const FilePath &path);
void updateVersionInfo();
QString findHostBinary(HostBinaries binary) const;
@@ -300,13 +301,6 @@ BaseQtVersion::~BaseQtVersion()
delete d;
}
-void BaseQtVersionPrivate::setupQmakePathAndId(const FilePath &qmakeCommand)
-{
- m_id = QtVersionManager::getUniqueId();
- QTC_CHECK(m_qmakeCommand.isEmpty()); // Should only be used once.
- m_qmakeCommand = qmakeCommand;
-}
-
QString BaseQtVersion::defaultUnexpandedDisplayName() const
{
QString location;
@@ -2213,7 +2207,12 @@ BaseQtVersion *QtVersionFactory::createQtVersionFromQMakePath
if (!factory->m_restrictionChecker || factory->m_restrictionChecker(setup)) {
BaseQtVersion *ver = factory->create();
QTC_ASSERT(ver, continue);
- ver->d->setupQmakePathAndId(qmakePath);
+ ver->d->m_id = QtVersionManager::getUniqueId();
+ QTC_CHECK(ver->d->m_qmakeCommand.isEmpty()); // Should only be used once.
+ ver->d->m_qmakeCommand = qmakePath;
+ ver->d->m_unexpandedDisplayName = BaseQtVersion::defaultUnexpandedDisplayName(qmakePath,
+ false);
+
ver->d->m_autodetectionSource = autoDetectionSource;
ver->d->m_isAutodetected = isAutoDetected;
ver->updateDefaultDisplayName();