Commit f2922549 authored by hjk's avatar hjk
Browse files

debugger: attempt to re-try examining dumper location after build.

Still does not work as the location itself is unknown.
parent 3b64a6cc
......@@ -236,7 +236,7 @@ public:
bool qtDumperLibraryEnabled() const;
QString qtDumperLibraryName() const;
QStringList qtDumperLibraryLocations() const;
void showQtDumperLibraryWarning(const QString &details = QString());
void showQtDumperLibraryWarning(const QString &details);
static const char *stateName(int s);
......
......@@ -145,6 +145,10 @@ static DebuggerStartParameters localStartParameters(RunConfiguration *runConfigu
sp.useTerminal = rc->runMode() == LocalApplicationRunConfiguration::Console;
sp.dumperLibrary = rc->dumperLibrary();
sp.dumperLibraryLocations = rc->dumperLibraryLocations();
// FIXME: If it's not yet build this will be empty and not filled
// when rebuild as the runConfiguration is not stored and therefore
// cannot be used to retrieve the dumper location.
//qDebug() << "DUMPER: " << sp.dumperLibrary << sp.dumperLibraryLocations;
sp.displayName = rc->displayName();
// Find qtInstallPath.
......@@ -171,7 +175,8 @@ RunControl *DebuggerRunControlFactory::create
return create(sp, runConfiguration);
}
DebuggerRunControl *DebuggerRunControlFactory::create(const DebuggerStartParameters &sp,
DebuggerRunControl *DebuggerRunControlFactory::create(
const DebuggerStartParameters &sp,
RunConfiguration *runConfiguration)
{
DebuggerRunControl *runControl =
......
......@@ -695,16 +695,15 @@ bool GdbEngine::checkDebuggingHelpersClassic()
if (!qtDumperLibraryEnabled())
return false;
const QString lib = qtDumperLibraryName();
const QFileInfo fi(lib);
if (!fi.exists()) {
const QStringList &locations = qtDumperLibraryLocations();
const QString loc = locations.join(QLatin1String(", "));
const QString msg = tr("The debugging helper library was not found at %1.").arg(loc);
showMessage(msg);
showQtDumperLibraryWarning(msg);
return false;
}
return true;
if (QFileInfo(lib).exists())
return true;
const QStringList &locations = qtDumperLibraryLocations();
const QString loc = locations.join(QLatin1String(", "));
const QString msg = tr("The debugging helper library was not found at %1.")
.arg(loc);
showMessage(msg);
showQtDumperLibraryWarning(msg); // This might build the library.
return QFileInfo(lib).exists();
}
void GdbEngine::handleQueryDebuggingHelperClassic(const GdbResponse &response)
......
......@@ -803,8 +803,9 @@ void QtDumperHelper::clear()
QString QtDumperHelper::msgDumperOutdated(double requiredVersion, double currentVersion)
{
return QCoreApplication::translate("QtDumperHelper",
"Found an outdated version of the debugging helper library (%1); version %2 is required.").
arg(currentVersion).arg(requiredVersion);
"Found an outdated version of the debugging helper library (%1); "
"version %2 is required.").
arg(currentVersion).arg(requiredVersion);
}
static inline void formatQtVersion(int v, QTextStream &str)
......@@ -840,9 +841,9 @@ QString QtDumperHelper::toString(bool debug) const
}
const QString nameSpace = m_qtNamespace.isEmpty() ? QCoreApplication::translate("QtDumperHelper", "<none>") : m_qtNamespace;
return QCoreApplication::translate("QtDumperHelper",
"%n known types, Qt version: %1, Qt namespace: %2 Dumper version: %3",
0, QCoreApplication::CodecForTr,
m_nameTypeMap.size()).arg(qtVersionString(), nameSpace).arg(m_dumperVersion);
"%n known types, Qt version: %1, Qt namespace: %2 Dumper version: %3",
0, QCoreApplication::CodecForTr,
m_nameTypeMap.size()).arg(qtVersionString(), nameSpace).arg(m_dumperVersion);
}
QtDumperHelper::Type QtDumperHelper::simpleType(const QString &simpleType) 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