Commit f04cd91c authored by dt's avatar dt
Browse files

Simplyfy the DebuggingHelper functions.

By only providing a qtInstallDir variant
parent 744eb55d
......@@ -167,14 +167,16 @@ void CMakeRunConfiguration::setArguments(const QString &newText)
QString CMakeRunConfiguration::dumperLibrary() const
{
QString qmakePath = ProjectExplorer::DebuggingHelperLibrary::findSystemQt(environment());
QString dhl = ProjectExplorer::DebuggingHelperLibrary::debuggingHelperLibrary(qmakePath);
QString qtInstallData = ProjectExplorer::DebuggingHelperLibrary::qtInstallDataDir(qmakePath);
QString dhl = ProjectExplorer::DebuggingHelperLibrary::debuggingHelperLibraryByInstallData(qtInstallData);
return dhl;
}
QStringList CMakeRunConfiguration::dumperLibraryLocations() const
{
QString qmakePath = ProjectExplorer::DebuggingHelperLibrary::findSystemQt(environment());
return ProjectExplorer::DebuggingHelperLibrary::debuggingHelperLibraryLocations(qmakePath);
QString qtInstallData = ProjectExplorer::DebuggingHelperLibrary::qtInstallDataDir(qmakePath);
return ProjectExplorer::DebuggingHelperLibrary::debuggingHelperLibraryLocationsByInstallData(qtInstallData);
}
ProjectExplorer::Environment CMakeRunConfiguration::baseEnvironment() const
......
......@@ -470,13 +470,15 @@ void CustomExecutableRunConfiguration::setUserName(const QString &name)
QString CustomExecutableRunConfiguration::dumperLibrary() const
{
QString qmakePath = ProjectExplorer::DebuggingHelperLibrary::findSystemQt(environment());
return ProjectExplorer::DebuggingHelperLibrary::debuggingHelperLibrary(qmakePath);
QString qtInstallData = ProjectExplorer::DebuggingHelperLibrary::qtInstallDataDir(qmakePath);
return ProjectExplorer::DebuggingHelperLibrary::debuggingHelperLibraryByInstallData(qtInstallData);
}
QStringList CustomExecutableRunConfiguration::dumperLibraryLocations() const
{
QString qmakePath = ProjectExplorer::DebuggingHelperLibrary::findSystemQt(environment());
return ProjectExplorer::DebuggingHelperLibrary::debuggingHelperLibraryLocations(qmakePath);
QString qtInstallData = ProjectExplorer::DebuggingHelperLibrary::qtInstallDataDir(qmakePath);
return ProjectExplorer::DebuggingHelperLibrary::debuggingHelperLibraryLocationsByInstallData(qtInstallData);
}
ProjectExplorer::ToolChain::ToolChainType CustomExecutableRunConfiguration::toolChainType() const
......
......@@ -57,11 +57,6 @@ QString DebuggingHelperLibrary::findSystemQt(const Environment &env)
return QString::null;
}
bool DebuggingHelperLibrary::hasDebuggingHelperLibrary(const QString &qmakePath)
{
return !debuggingHelperLibrary(qmakePath).isNull();
}
QStringList DebuggingHelperLibrary::debuggingHelperLibraryDirectories(const QString &qtInstallData)
{
const QChar slash = QLatin1Char('/');
......@@ -74,16 +69,6 @@ QStringList DebuggingHelperLibrary::debuggingHelperLibraryDirectories(const QStr
return directories;
}
QStringList DebuggingHelperLibrary::debuggingHelperLibraryLocations(const QString &qmakePath)
{
return debuggingHelperLibraryLocationsByInstallData(qtInstallDataDir(qmakePath));
}
QString DebuggingHelperLibrary::debuggingHelperLibrary(const QString &qmakePath)
{
return debuggingHelperLibraryByInstallData(qtInstallDataDir(qmakePath));
}
QString DebuggingHelperLibrary::qtInstallDataDir(const QString &qmakePath)
{
QProcess proc;
......
......@@ -48,24 +48,18 @@ public:
// return true if the qmake at qmakePath is qt4 (used by QtVersion)
static QString qtVersionForQMake(const QString &qmakePath);
static bool hasDebuggingHelperLibrary(const QString &qmakePath);
static QString debuggingHelperLibrary(const QString &qmakePath);
static QString debuggingHelperLibraryByInstallData(const QString &qtInstallData);
static QStringList debuggingHelperLibraryLocationsByInstallData(const QString &qtInstallData);
// Build the helpers and return the output log/errormessage.
static QString buildDebuggingHelperLibrary(const QString &qmakePath, const QString &make, const Environment &env);
static QString buildDebuggingHelperLibrary(const QString &directory, const QString &makeCommand, const QString &qmakeCommand, const QString &mkspec, const Environment &env);
// Build the helpers and return the output log/errormessage.
static QStringList debuggingHelperLibraryLocations(const QString &qmakePath);
static QStringList debuggingHelperLibraryLocationsByInstallData(const QString &qtInstallData);
// Copy the source files to a target location and return the chosen target location.
static QString copyDebuggingHelperLibrary(const QString &qtInstallData, QString *errorMessage);
static QString qtInstallDataDir(const QString &qmakePath);
private:
static QStringList debuggingHelperLibraryDirectories(const QString &qtInstallData);
static QString qtInstallDataDir(const QString &qmakePath);
};
}
......
......@@ -1245,7 +1245,7 @@ QStringList QtVersion::debuggingHelperLibraryLocations() const
QString qtInstallData = versionInfo().value("QT_INSTALL_DATA");
if (qtInstallData.isEmpty())
return QStringList();
return DebuggingHelperLibrary::debuggingHelperLibraryLocations(qtInstallData);
return DebuggingHelperLibrary::debuggingHelperLibraryLocationsByInstallData(qtInstallData);
}
bool QtVersion::hasDocumentation() const
......
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