forked from qt-creator/qt-creator
QmlDesigner: If no types are available the dialog is implicitly canceled
Task-number: QTCREATORBUG-17179 Change-Id: I89cf2240f9f54072dc35c40fb56a709284ff3187 Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
This commit is contained in:
committed by
Tim Jenssen
parent
a0f1473dc1
commit
de6021c71a
@@ -26,6 +26,8 @@
|
||||
#include "addnewbackenddialog.h"
|
||||
#include "ui_addnewbackenddialog.h"
|
||||
|
||||
#include <QPushButton>
|
||||
|
||||
namespace QmlDesigner {
|
||||
|
||||
AddNewBackendDialog::AddNewBackendDialog(QWidget *parent) :
|
||||
@@ -57,6 +59,7 @@ void AddNewBackendDialog::setupPossibleTypes(const QList<CppTypeData> &types)
|
||||
for (const CppTypeData &typeData : types)
|
||||
m_ui->comboBox->addItem(typeData.typeName);
|
||||
|
||||
m_ui->buttonBox->button(QDialogButtonBox::Ok)->setEnabled(m_ui->comboBox->count() > 0);
|
||||
invalidate();
|
||||
blockSignals(block);
|
||||
}
|
||||
|
Reference in New Issue
Block a user