Commit 45844197 authored by Kai Koehne's avatar Kai Koehne

Qt4ProjectManager: Helper Tools UI fix

Don't show 'cannot be built' if there is indeed already a tool (e.g. for the qtc-qmldump
we ship in the QtSDK.
parent ebae6dae
......@@ -509,27 +509,43 @@ void QtOptionsPageWidget::updateDebuggingHelperInfo(const QtVersion *version)
// Set detailed labels
m_debuggingHelperUi->gdbHelperStatus->setText(hasGdbHelper
? version->debuggingHelperLibrary()
: QLatin1String("-"));
: tr("<i>Not yet built.</i>"));
QString qmlDumpStatusText;
if (hasQmlDumper) {
QString qmlDumpPaths = version->qmlDumpTool(false);
{
QString debugQmlDumpPath = version->qmlDumpTool(true);
if (qmlDumpPaths != debugQmlDumpPath) {
if (!qmlDumpPaths.isEmpty())
qmlDumpPaths += QLatin1String("\n");
qmlDumpPaths += debugQmlDumpPath;
}
}
if (canBuildQmlDumper) {
m_debuggingHelperUi->qmlDumpStatus->setText(hasQmlDumper
? version->qmlDumpTool()
: QLatin1String("-"));
m_debuggingHelperUi->qmlDumpBuildButton->setEnabled(true);
qmlDumpStatusText = qmlDumpPaths;
} else {
m_debuggingHelperUi->qmlDumpStatus->setText(tr("<i>Cannot be compiled.</i>"));
m_debuggingHelperUi->qmlDumpBuildButton->setEnabled(false);
if (canBuildQmlDumper) {
qmlDumpStatusText = tr("<i>Not yet built.</i>");
} else {
qmlDumpStatusText = tr("<i>Cannot be compiled.</i>");
}
}
if (canBuildQmlObserver) {
m_debuggingHelperUi->qmlObserverStatus->setText(hasQmlObserver
? version->qmlObserverTool()
: QLatin1String("-"));
m_debuggingHelperUi->qmlObserverBuildButton->setEnabled(true);
} else {
m_debuggingHelperUi->qmlDumpStatus->setText(tr("<i>Cannot be compiled.</i>"));
m_debuggingHelperUi->qmlObserverBuildButton->setEnabled(false);
m_debuggingHelperUi->qmlDumpStatus->setText(qmlDumpStatusText);
m_debuggingHelperUi->qmlDumpBuildButton->setEnabled(canBuildQmlDumper);
QString qmlObserverStatusText;
if (hasQmlObserver) {
qmlObserverStatusText = version->qmlObserverTool();
} else {
if (canBuildQmlObserver) {
qmlObserverStatusText = tr("<i>Not yet built.</i>");
} else {
qmlObserverStatusText = tr("<i>Cannot be compiled.</i>");
}
}
m_debuggingHelperUi->qmlObserverStatus->setText(qmlObserverStatusText);
m_debuggingHelperUi->qmlObserverBuildButton->setEnabled(canBuildQmlObserver);
const QTreeWidgetItem *currentItem = m_ui->qtdirList->currentItem();
const bool hasLog = currentItem && !currentItem->data(0, BuildLogRole).toString().isEmpty();
......
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