QtSupport: allow relative paths for the qmake command

This change makes it possible to bake in settings for bundled/shipped
Qt versions like we have in the QtDesignStudio.app package.
The result is that the installer does not need to write absolute
paths to the settings anymore, so it stays like it was signed.

A signed package on macOS is more and more necessary
and recommended for a while. Especially If the application will
touch files in special folders like Download, Documents, or Desktop.

Change-Id: I3153ffd4229b34a59bdfe740937c21ee93de3e9b
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
This commit is contained in:
Tim Jenssen
2023-02-08 17:38:52 +01:00
parent dce852c7a4
commit a18ab6b11f
8 changed files with 19 additions and 10 deletions

View File

@@ -195,7 +195,7 @@ static bool restoreQtVersions()
bool restored = false;
for (QtVersionFactory *f : factories) {
if (f->canRestore(type)) {
if (QtVersion *qtv = f->restore(type, qtversionMap)) {
if (QtVersion *qtv = f->restore(type, qtversionMap, reader.filePath())) {
if (m_versions.contains(qtv->uniqueId())) {
// This shouldn't happen, we are restoring the same id multiple times?
qWarning() << "A Qt version with id"<<qtv->uniqueId()<<"already exists";
@@ -289,7 +289,7 @@ void QtVersionManager::updateFromInstaller(bool emitSignal)
qtversionMap[Constants::QTVERSIONNAME] = v->unexpandedDisplayName();
delete v;
if (QtVersion *qtv = factory->restore(type, qtversionMap)) {
if (QtVersion *qtv = factory->restore(type, qtversionMap, reader.filePath())) {
Q_ASSERT(qtv->isAutodetected());
m_versions.insert(id, qtv);
restored = true;
@@ -303,7 +303,7 @@ void QtVersionManager::updateFromInstaller(bool emitSignal)
// Create a new qtversion
if (!restored) { // didn't replace any existing versions
qCDebug(log) << " No Qt version found matching" << autoDetectionSource << " => Creating new version";
if (QtVersion *qtv = factory->restore(type, qtversionMap)) {
if (QtVersion *qtv = factory->restore(type, qtversionMap, reader.filePath())) {
Q_ASSERT(qtv->isAutodetected());
m_versions.insert(qtv->uniqueId(), qtv);
added << qtv->uniqueId();