summaryrefslogtreecommitdiff
path: root/src/plugins/qmlprojectmanager/qmlprojectrunconfiguration.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/qmlprojectmanager/qmlprojectrunconfiguration.cpp')
-rw-r--r--src/plugins/qmlprojectmanager/qmlprojectrunconfiguration.cpp16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/plugins/qmlprojectmanager/qmlprojectrunconfiguration.cpp b/src/plugins/qmlprojectmanager/qmlprojectrunconfiguration.cpp
index 1e47de5b1f..25f395034b 100644
--- a/src/plugins/qmlprojectmanager/qmlprojectrunconfiguration.cpp
+++ b/src/plugins/qmlprojectmanager/qmlprojectrunconfiguration.cpp
@@ -98,6 +98,8 @@ void QmlProjectRunConfiguration::ctor()
Qt4ProjectManager::QtVersionManager *qtVersions = Qt4ProjectManager::QtVersionManager::instance();
connect(qtVersions, SIGNAL(qtVersionsChanged(QList<int>)), this, SLOT(updateEnabled()));
+ connect(qtVersions, SIGNAL(qtVersionsChanged(QList<int>)), this, SLOT(onViewerChanged()));
+
setDisplayName(tr("QML Viewer", "QMLRunConfiguration display name."));
}
@@ -174,16 +176,21 @@ QWidget *QmlProjectRunConfiguration::createConfigurationWidget()
Utils::PathChooser *qmlViewer = new Utils::PathChooser;
qmlViewer->setExpectedKind(Utils::PathChooser::Command);
- qmlViewer->setPath(viewerPath());
+ qmlViewer->setPath(m_qmlViewerCustomPath);
connect(qmlViewer, SIGNAL(changed(QString)), this, SLOT(onViewerChanged()));
+ m_qmlViewerExecutable = new QLabel;
+ m_qmlViewerExecutable.data()->setText(viewerPath() + " " + m_qmlViewerArgs);
+
QLineEdit *qmlViewerArgs = new QLineEdit;
qmlViewerArgs->setText(m_qmlViewerArgs);
connect(qmlViewerArgs, SIGNAL(textChanged(QString)), this, SLOT(onViewerArgsChanged()));
form->addRow(tr("QML Viewer"), qmlViewer);
form->addRow(tr("QML Viewer arguments:"), qmlViewerArgs);
+ form->addRow(QString(), m_qmlViewerExecutable.data());
+
form->addRow(tr("Main QML File:"), m_fileListCombo.data());
return config;
@@ -258,12 +265,19 @@ void QmlProjectRunConfiguration::onViewerChanged()
if (Utils::PathChooser *chooser = qobject_cast<Utils::PathChooser *>(sender())) {
m_qmlViewerCustomPath = chooser->path();
}
+ if (!m_qmlViewerExecutable.isNull()) {
+ m_qmlViewerExecutable.data()->setText(viewerPath() + " " + m_qmlViewerArgs);
+ }
}
void QmlProjectRunConfiguration::onViewerArgsChanged()
{
if (QLineEdit *lineEdit = qobject_cast<QLineEdit*>(sender()))
m_qmlViewerArgs = lineEdit->text();
+
+ if (!m_qmlViewerExecutable.isNull()) {
+ m_qmlViewerExecutable.data()->setText(viewerPath() + " " + m_qmlViewerArgs);
+ }
}
void QmlProjectRunConfiguration::onDebugServerPortChanged()