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 @@ ...@@ -35,7 +35,7 @@
#include <coreplugin/coreconstants.h> #include <coreplugin/coreconstants.h>
#include <coreplugin/helpmanager.h> #include <coreplugin/helpmanager.h>
#include <qtsupport/debugginghelper.h> #include <qtsupport/qtkitinformation.h>
#include <projectexplorer/environmentwidget.h> #include <projectexplorer/environmentwidget.h>
#include <projectexplorer/target.h> #include <projectexplorer/target.h>
...@@ -217,17 +217,12 @@ void CMakeRunConfiguration::setCommandLineArguments(const QString &newText) ...@@ -217,17 +217,12 @@ void CMakeRunConfiguration::setCommandLineArguments(const QString &newText)
QString CMakeRunConfiguration::dumperLibrary() const QString CMakeRunConfiguration::dumperLibrary() const
{ {
Utils::FileName qmakePath = QtSupport::DebuggingHelperLibrary::findSystemQt(environment()); return QtSupport::QtKitInformation::dumperLibrary(target()->kit());
QString qtInstallData = QtSupport::DebuggingHelperLibrary::qtInstallDataDir(qmakePath);
QString dhl = QtSupport::DebuggingHelperLibrary::debuggingHelperLibraryByInstallData(qtInstallData);
return dhl;
} }
QStringList CMakeRunConfiguration::dumperLibraryLocations() const QStringList CMakeRunConfiguration::dumperLibraryLocations() const
{ {
Utils::FileName qmakePath = QtSupport::DebuggingHelperLibrary::findSystemQt(environment()); return QtSupport::QtKitInformation::dumperLibraryLocations(target()->kit());
QString qtInstallData = QtSupport::DebuggingHelperLibrary::qtInstallDataDir(qmakePath);
return QtSupport::DebuggingHelperLibrary::debuggingHelperLibraryDirectories(qtInstallData);
} }
Utils::Environment CMakeRunConfiguration::baseEnvironment() const Utils::Environment CMakeRunConfiguration::baseEnvironment() const
......
...@@ -673,18 +673,12 @@ QString Qt4RunConfiguration::proFilePath() const ...@@ -673,18 +673,12 @@ QString Qt4RunConfiguration::proFilePath() const
QString Qt4RunConfiguration::dumperLibrary() const QString Qt4RunConfiguration::dumperLibrary() const
{ {
QtSupport::BaseQtVersion *version = QtSupport::QtKitInformation::qtVersion(target()->kit()); return QtSupport::QtKitInformation::dumperLibrary(target()->kit());
if (version)
return version->gdbDebuggingHelperLibrary();
return QString();
} }
QStringList Qt4RunConfiguration::dumperLibraryLocations() const QStringList Qt4RunConfiguration::dumperLibraryLocations() const
{ {
QtSupport::BaseQtVersion *version = QtSupport::QtKitInformation::qtVersion(target()->kit()); return QtSupport::QtKitInformation::dumperLibraryLocations(target()->kit());
if (version)
return version->debuggingHelperLibraryLocations();
return QStringList();
} }
QString Qt4RunConfiguration::defaultDisplayName() QString Qt4RunConfiguration::defaultDisplayName()
......
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
#include "customexecutablerunconfiguration.h" #include "customexecutablerunconfiguration.h"
#include "customexecutableconfigurationwidget.h" #include "customexecutableconfigurationwidget.h"
#include "debugginghelper.h" #include "qtkitinformation.h"
#include <projectexplorer/buildconfiguration.h> #include <projectexplorer/buildconfiguration.h>
#include <projectexplorer/project.h> #include <projectexplorer/project.h>
...@@ -365,16 +365,12 @@ QWidget *CustomExecutableRunConfiguration::createConfigurationWidget() ...@@ -365,16 +365,12 @@ QWidget *CustomExecutableRunConfiguration::createConfigurationWidget()
QString CustomExecutableRunConfiguration::dumperLibrary() const QString CustomExecutableRunConfiguration::dumperLibrary() const
{ {
Utils::FileName qmakePath = DebuggingHelperLibrary::findSystemQt(environment()); return QtKitInformation::dumperLibrary(target()->kit());
QString qtInstallData = DebuggingHelperLibrary::qtInstallDataDir(qmakePath);
return DebuggingHelperLibrary::debuggingHelperLibraryByInstallData(qtInstallData);
} }
QStringList CustomExecutableRunConfiguration::dumperLibraryLocations() const QStringList CustomExecutableRunConfiguration::dumperLibraryLocations() const
{ {
Utils::FileName qmakePath = DebuggingHelperLibrary::findSystemQt(environment()); return QtKitInformation::dumperLibraryLocations(target()->kit());
QString qtInstallData = DebuggingHelperLibrary::qtInstallDataDir(qmakePath);
return DebuggingHelperLibrary::debuggingHelperLibraryDirectories(qtInstallData);
} }
ProjectExplorer::Abi CustomExecutableRunConfiguration::abi() const ProjectExplorer::Abi CustomExecutableRunConfiguration::abi() const
......
...@@ -180,6 +180,22 @@ void QtKitInformation::setQtVersion(ProjectExplorer::Kit *k, const BaseQtVersion ...@@ -180,6 +180,22 @@ void QtKitInformation::setQtVersion(ProjectExplorer::Kit *k, const BaseQtVersion
setQtVersionId(k, v->uniqueId()); 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, void QtKitInformation::qtVersionsChanged(const QList<int> &addedIds,
const QList<int> &removedIds, const QList<int> &removedIds,
const QList<int> &changedIds) const QList<int> &changedIds)
......
...@@ -69,6 +69,11 @@ public: ...@@ -69,6 +69,11 @@ public:
static BaseQtVersion *qtVersion(const ProjectExplorer::Kit *k); static BaseQtVersion *qtVersion(const ProjectExplorer::Kit *k);
static void setQtVersion(ProjectExplorer::Kit *k, const BaseQtVersion *v); 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: private slots:
void qtVersionsChanged(const QList<int> &addedIds, void qtVersionsChanged(const QList<int> &addedIds,
const QList<int> &removedIds, 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