QML Observer: Complain about not having it if debugging .qmlprojects

Reviewed-by: hjk
This commit is contained in:
Lasse Holmstedt
2010-09-28 17:26:27 +02:00
parent 96d991bbdc
commit 89443cfb1f
11 changed files with 94 additions and 5 deletions

View File

@@ -1054,6 +1054,35 @@ void DebuggerEngine::showQtDumperLibraryWarning(const QString &details)
}
}
void DebuggerEngine::showQmlObserverToolWarning()
{
QMessageBox dialog;
QPushButton *qtPref = dialog.addButton(tr("Open Qt4 Options"),
QMessageBox::ActionRole);
QPushButton *helperOff = dialog.addButton(tr("Turn off QML Observer Usage"),
QMessageBox::ActionRole);
QPushButton *justContinue = dialog.addButton(tr("Continue Anyway"),
QMessageBox::AcceptRole);
dialog.setDefaultButton(justContinue);
dialog.setWindowTitle(tr("QML Observer Missing"));
dialog.setText(tr("QML Observer could not be found."));
dialog.setInformativeText(tr(
"QML Observer is used to offer additional debugging features for "
"QML applications, such as interactive debugging and inspection tools."
"It must be compiled for each used Qt version separately. "
"On the Qt4 options page, select a Qt installation "
"and click Rebuild."));
dialog.exec();
if (dialog.clickedButton() == qtPref) {
Core::ICore::instance()->showOptionsDialog(
_(Qt4ProjectManager::Constants::QT_SETTINGS_CATEGORY),
_(Qt4ProjectManager::Constants::QTVERSION_SETTINGS_PAGE_ID));
} else if (dialog.clickedButton() == helperOff) {
theDebuggerAction(UseQmlObserver)
->setValue(qVariantFromValue(false), false);
}
}
QString DebuggerEngine::qtDumperLibraryName() const
{
if (theDebuggerAction(UseCustomDebuggingHelperLocation)->value().toBool())