Use QT_INSTALL_DATA instead of path() for searching the debugger helper

This commit is contained in:
dt
2009-04-08 15:16:02 +02:00
parent 8261498c11
commit e6779aaeb2
2 changed files with 18 additions and 5 deletions

View File

@@ -870,9 +870,12 @@ void QtVersion::setPath(const QString &path)
QString QtVersion::dumperLibrary() const
{
uint hash = qHash(path());
QString qtInstallData = versionInfo().value("QT_INSTALL_DATA");
if (qtInstallData.isEmpty())
qtInstallData = path();
QStringList directories;
directories
<< (path() + "/qtc-debugging-helper/")
<< (qtInstallData + "/qtc-debugging-helper/")
<< (QApplication::applicationDirPath() + "/../qtc-debugging-helper/" + QString::number(hash)) + "/"
<< (QDesktopServices::storageLocation(QDesktopServices::DataLocation) + "/qtc-debugging-helper/" + QString::number(hash)) + "/";
foreach(const QString &directory, directories) {
@@ -1390,9 +1393,12 @@ QString QtVersion::buildDebuggingHelperLibrary()
QString output;
uint hash = qHash(path());
QString qtInstallData = versionInfo().value("QT_INSTALL_DATA");
if (qtInstallData.isEmpty())
qtInstallData = path();
QStringList directories;
directories
<< path() + "/qtc-debugging-helper/"
<< qtInstallData + "/qtc-debugging-helper/"
<< QApplication::applicationDirPath() + "/../qtc-debugging-helper/" + QString::number(hash) +"/"
<< QDesktopServices::storageLocation (QDesktopServices::DataLocation) + "/qtc-debugging-helper/" + QString::number(hash) +"/";