forked from qt-creator/qt-creator
Fix crash when restoring old .qmlproject files
The run configuration id changed, leaving restored qmlproject without any run configuration. Reviewed-by: kkoehne
This commit is contained in:
@@ -33,6 +33,7 @@
|
||||
#include "qmlprojectmanagerconstants.h"
|
||||
#include "qmlprojectrunconfiguration.h"
|
||||
|
||||
#include <QtCore/QDebug>
|
||||
#include <QtGui/QApplication>
|
||||
#include <QtGui/QStyle>
|
||||
|
||||
@@ -67,6 +68,11 @@ bool QmlProjectTarget::fromMap(const QVariantMap &map)
|
||||
if (!Target::fromMap(map))
|
||||
return false;
|
||||
|
||||
if (runConfigurations().isEmpty()) {
|
||||
qWarning() << "Failed to restore run configuration of QML project!";
|
||||
return false;
|
||||
}
|
||||
|
||||
setDisplayName(QApplication::translate("QmlProjectManager::QmlTarget",
|
||||
Constants::QML_VIEWER_TARGET_DISPLAY_NAME,
|
||||
"QML Runtime target display name"));
|
||||
|
||||
Reference in New Issue
Block a user