Commit e0f05e3b authored by Tobias Hunger's avatar Tobias Hunger
Browse files

Unify handling of dumperLibrary/dumperLibraryLocations



across its uses. We have the kits now, so we can use the information
from there and no longer need to guess at the dumpers to use.

Change-Id: I058304198e9c7fdbad45a84658e1bcea8ed9834d
Reviewed-by: default avatarDaniel Teske <daniel.teske@digia.com>
parent 403f41ef
......@@ -35,7 +35,7 @@
#include <coreplugin/coreconstants.h>
#include <coreplugin/helpmanager.h>
#include <qtsupport/debugginghelper.h>
#include <qtsupport/qtkitinformation.h>
#include <projectexplorer/environmentwidget.h>
#include <projectexplorer/target.h>
......@@ -217,17 +217,12 @@ void CMakeRunConfiguration::setCommandLineArguments(const QString &newText)
QString CMakeRunConfiguration::dumperLibrary() const
{
Utils::FileName qmakePath = QtSupport::DebuggingHelperLibrary::findSystemQt(environment());
QString qtInstallData = QtSupport::DebuggingHelperLibrary::qtInstallDataDir(qmakePath);
QString dhl = QtSupport::DebuggingHelperLibrary::debuggingHelperLibraryByInstallData(qtInstallData);
return dhl;
return QtSupport::QtKitInformation::dumperLibrary(target()->kit());
}
QStringList CMakeRunConfiguration::dumperLibraryLocations() const
{
Utils::FileName qmakePath = QtSupport::DebuggingHelperLibrary::findSystemQt(environment());
QString qtInstallData = QtSupport::DebuggingHelperLibrary::qtInstallDataDir(qmakePath);
return QtSupport::DebuggingHelperLibrary::debuggingHelperLibraryDirectories(qtInstallData);
return QtSupport::QtKitInformation::dumperLibraryLocations(target()->kit());
}
Utils::Environment CMakeRunConfiguration::baseEnvironment() const
......
......@@ -673,18 +673,12 @@ QString Qt4RunConfiguration::proFilePath() const
QString Qt4RunConfiguration::dumperLibrary() const
{
QtSupport::BaseQtVersion *version = QtSupport::QtKitInformation::qtVersion(target()->kit());
if (version)
return version->gdbDebuggingHelperLibrary();
return QString();
return QtSupport::QtKitInformation::dumperLibrary(target()->kit());
}
QStringList Qt4RunConfiguration::dumperLibraryLocations() const
{
QtSupport::BaseQtVersion *version = QtSupport::QtKitInformation::qtVersion(target()->kit());
if (version)
return version->debuggingHelperLibraryLocations();
return QStringList();
return QtSupport::QtKitInformation::dumperLibraryLocations(target()->kit());
}
QString Qt4RunConfiguration::defaultDisplayName()
......
......@@ -29,7 +29,7 @@
#include "customexecutablerunconfiguration.h"
#include "customexecutableconfigurationwidget.h"
#include "debugginghelper.h"
#include "qtkitinformation.h"
#include <projectexplorer/buildconfiguration.h>
#include <projectexplorer/project.h>
......@@ -365,16 +365,12 @@ QWidget *CustomExecutableRunConfiguration::createConfigurationWidget()
QString CustomExecutableRunConfiguration::dumperLibrary() const
{
Utils::FileName qmakePath = DebuggingHelperLibrary::findSystemQt(environment());
QString qtInstallData = DebuggingHelperLibrary::qtInstallDataDir(qmakePath);
return DebuggingHelperLibrary::debuggingHelperLibraryByInstallData(qtInstallData);
return QtKitInformation::dumperLibrary(target()->kit());
}
QStringList CustomExecutableRunConfiguration::dumperLibraryLocations() const
{
Utils::FileName qmakePath = DebuggingHelperLibrary::findSystemQt(environment());
QString qtInstallData = DebuggingHelperLibrary::qtInstallDataDir(qmakePath);
return DebuggingHelperLibrary::debuggingHelperLibraryDirectories(qtInstallData);
return QtKitInformation::dumperLibraryLocations(target()->kit());
}
ProjectExplorer::Abi CustomExecutableRunConfiguration::abi() const
......
......@@ -180,6 +180,22 @@ void QtKitInformation::setQtVersion(ProjectExplorer::Kit *k, const BaseQtVersion
setQtVersionId(k, v->uniqueId());
}
QString QtKitInformation::dumperLibrary(const ProjectExplorer::Kit *k)
{
BaseQtVersion *version = QtKitInformation::qtVersion(k);
if (version)
return version->gdbDebuggingHelperLibrary();
return QString();
}
QStringList QtKitInformation::dumperLibraryLocations(const ProjectExplorer::Kit *k)
{
BaseQtVersion *version = QtKitInformation::qtVersion(k);
if (version)
return version->debuggingHelperLibraryLocations();
return QStringList();
}
void QtKitInformation::qtVersionsChanged(const QList<int> &addedIds,
const QList<int> &removedIds,
const QList<int> &changedIds)
......
......@@ -69,6 +69,11 @@ public:
static BaseQtVersion *qtVersion(const ProjectExplorer::Kit *k);
static void setQtVersion(ProjectExplorer::Kit *k, const BaseQtVersion *v);
// Information derived from the Qt version:
// FIXME: This should be part of an RunConfigurationAspect...
static QString dumperLibrary(const ProjectExplorer::Kit *k);
static QStringList dumperLibraryLocations(const ProjectExplorer::Kit *k);
private slots:
void qtVersionsChanged(const QList<int> &addedIds,
const QList<int> &removedIds,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment