QtSupport: Remove dead code

"SourcePath" was meant to be set by the installer to make it easier
to find the installed source folder for a specific Qt version. This was
never implemented in the Installer and a workaround was later
created for it.

This patch removes the dead code.

Change-Id: I1c2f5c10e37a7df4643327d1071db9e2e62c8212
Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
Marcus Tillmanns
2024-01-17 13:05:20 +01:00
parent 45ef64f4f9
commit f5934d69de
5 changed files with 1 additions and 27 deletions

View File

@@ -214,16 +214,6 @@ void CdbEngine::init()
m_symbolAddressCache.clear(); m_symbolAddressCache.clear();
m_coreStopReason.reset(); m_coreStopReason.reset();
// Create local list of mappings in native separators
m_sourcePathMappings.clear();
const QString &packageSources = runParameters().qtPackageSourceLocation;
if (!packageSources.isEmpty()) {
for (const QString &buildPath : qtBuildPaths()) {
m_sourcePathMappings.push_back({QDir::toNativeSeparators(buildPath),
QDir::toNativeSeparators(packageSources)});
}
}
const SourcePathMap &sourcePathMap const SourcePathMap &sourcePathMap
= mergePlatformQtPath(runParameters(), settings().sourcePathMap()); = mergePlatformQtPath(runParameters(), settings().sourcePathMap());
if (!sourcePathMap.isEmpty()) { if (!sourcePathMap.isEmpty()) {

View File

@@ -160,7 +160,6 @@ public:
QString startMessage; // First status message shown. QString startMessage; // First status message shown.
Utils::FilePath debugInfoLocation; // Gdb "set-debug-file-directory". Utils::FilePath debugInfoLocation; // Gdb "set-debug-file-directory".
QStringList debugSourceLocation; // Gdb "directory" QStringList debugSourceLocation; // Gdb "directory"
QString qtPackageSourceLocation;
Utils::FilePath qtSourceLocation; Utils::FilePath qtSourceLocation;
bool isSnapshot = false; // Set if created internally. bool isSnapshot = false; // Set if created internally.
ProjectExplorer::Abi toolChainAbi; ProjectExplorer::Abi toolChainAbi;

View File

@@ -847,10 +847,8 @@ DebuggerRunTool::DebuggerRunTool(RunControl *runControl, AllowTerminal allowTerm
m_runParameters.cppEngineType = DebuggerKitAspect::engineType(kit); m_runParameters.cppEngineType = DebuggerKitAspect::engineType(kit);
m_runParameters.version = DebuggerKitAspect::version(kit); m_runParameters.version = DebuggerKitAspect::version(kit);
if (QtSupport::QtVersion *qtVersion = QtSupport::QtKitAspect::qtVersion(kit)) { if (QtSupport::QtVersion *qtVersion = QtSupport::QtKitAspect::qtVersion(kit))
m_runParameters.qtPackageSourceLocation = qtVersion->qtPackageSourcePath().toString();
m_runParameters.qtSourceLocation = qtVersion->sourcePath(); m_runParameters.qtSourceLocation = qtVersion->sourcePath();
}
if (auto aspect = runControl->aspect<DebuggerRunConfigurationAspect>()) { if (auto aspect = runControl->aspect<DebuggerRunConfigurationAspect>()) {
if (!aspect->useCppDebugger) if (!aspect->useCppDebugger)

View File

@@ -63,7 +63,6 @@ const char QTVERSIONAUTODETECTED[] = "isAutodetected";
const char QTVERSIONDETECTIONSOURCE[] = "autodetectionSource"; const char QTVERSIONDETECTIONSOURCE[] = "autodetectionSource";
const char QTVERSION_OVERRIDE_FEATURES[] = "overrideFeatures"; const char QTVERSION_OVERRIDE_FEATURES[] = "overrideFeatures";
const char QTVERSIONQMAKEPATH[] = "QMakePath"; const char QTVERSIONQMAKEPATH[] = "QMakePath";
const char QTVERSIONSOURCEPATH[] = "SourcePath";
const char QTVERSION_ABIS[] = "Abis"; const char QTVERSION_ABIS[] = "Abis";
@@ -91,7 +90,6 @@ public:
QString qtVersionString; QString qtVersionString;
FilePath sourcePath; FilePath sourcePath;
FilePath qtSources;
Utils::FilePath prefix; Utils::FilePath prefix;
@@ -148,7 +146,6 @@ public:
result.insert("QtVersionString", qtVersionString); result.insert("QtVersionString", qtVersionString);
result.insert("SourcePath", sourcePath.toSettings()); result.insert("SourcePath", sourcePath.toSettings());
result.insert("QtSources", qtSources.toSettings());
result.insert("Prefix", prefix.toSettings()); result.insert("Prefix", prefix.toSettings());
result.insert("BinPath", binPath.toSettings()); result.insert("BinPath", binPath.toSettings());
result.insert("LibExecPath", libExecPath.toSettings()); result.insert("LibExecPath", libExecPath.toSettings());
@@ -187,7 +184,6 @@ public:
unexpandedDisplayName.fromMap(map, "UnexpandedDisplayName"); unexpandedDisplayName.fromMap(map, "UnexpandedDisplayName");
qtVersionString = map.value("QtVersionString").toString(); qtVersionString = map.value("QtVersionString").toString();
sourcePath = FilePath::fromSettings(map.value("SourcePath")); sourcePath = FilePath::fromSettings(map.value("SourcePath"));
qtSources = FilePath::fromSettings(map.value("QtSources"));
prefix = FilePath::fromSettings(map.value("Prefix")); prefix = FilePath::fromSettings(map.value("Prefix"));
binPath = FilePath::fromSettings(map.value("BinPath")); binPath = FilePath::fromSettings(map.value("BinPath"));
libExecPath = FilePath::fromSettings(map.value("LibExecPath")); libExecPath = FilePath::fromSettings(map.value("LibExecPath"));
@@ -769,8 +765,6 @@ void QtVersion::fromMap(const Store &map, const FilePath &filePath, bool forceRe
if (persistentStore && !forceRefreshCache) if (persistentStore && !forceRefreshCache)
d->m_data.fromMap(*persistentStore); d->m_data.fromMap(*persistentStore);
else
d->m_data.qtSources = FilePath::fromSettings(map.value(QTVERSIONSOURCEPATH));
Store::const_iterator itQtAbis = map.find(QTVERSION_ABIS); Store::const_iterator itQtAbis = map.find(QTVERSION_ABIS);
if (itQtAbis != map.end()) { if (itQtAbis != map.end()) {
@@ -1046,11 +1040,6 @@ FilePath QtVersion::sourcePath() const
return d->m_data.sourcePath; return d->m_data.sourcePath;
} }
FilePath QtVersion::qtPackageSourcePath() const
{
return d->m_data.qtSources;
}
FilePath QtVersion::designerFilePath() const FilePath QtVersion::designerFilePath() const
{ {
if (!isValid()) if (!isValid())

View File

@@ -86,8 +86,6 @@ public:
// 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
Utils::FilePath sourcePath() const; Utils::FilePath sourcePath() const;
// returns source path for installed qt packages and empty string for self build qt
Utils::FilePath qtPackageSourcePath() const;
bool isInQtSourceDirectory(const Utils::FilePath &filePath) const; bool isInQtSourceDirectory(const Utils::FilePath &filePath) const;
bool isQtSubProject(const Utils::FilePath &filePath) const; bool isQtSubProject(const Utils::FilePath &filePath) const;