From adad842bbe240b87a9f93bbb48fa77ae0daf6831 Mon Sep 17 00:00:00 2001 From: Kai Koehne <kai.koehne@nokia.com> Date: Thu, 20 May 2010 11:59:42 +0200 Subject: [PATCH] Rename QML Runtime to QML Viewer again in the UI Latest qt renamed qml executable back to qmlviewer, and also named the executable again QML Viewer instead of Runtime/Launcher. --- src/plugins/projectexplorer/userfileaccessor.cpp | 4 ++-- .../qmlprojectmanagerconstants.h | 4 ++-- .../qmlprojectrunconfiguration.cpp | 15 +++++++++++---- .../qmlprojectmanager/qmlprojecttarget.cpp | 6 +++--- 4 files changed, 18 insertions(+), 11 deletions(-) diff --git a/src/plugins/projectexplorer/userfileaccessor.cpp b/src/plugins/projectexplorer/userfileaccessor.cpp index d554513ab86..0cf21a6dfd7 100644 --- a/src/plugins/projectexplorer/userfileaccessor.cpp +++ b/src/plugins/projectexplorer/userfileaccessor.cpp @@ -796,8 +796,8 @@ QVariantMap Version1Handler::update(Project *project, const QVariantMap &map) else if (project->id() == QLatin1String("QmlProjectManager.QmlProject")) targets << TargetDescription(QString::fromLatin1("QmlProjectManager.QmlTarget"), QCoreApplication::translate("QmlProjectManager::QmlTarget", - "QML Runtime", - "QML Runtime target display name")); + "QML Viewer", + "QML Viewer target display name")); else return QVariantMap(); // We do not know how to handle this. diff --git a/src/plugins/qmlprojectmanager/qmlprojectmanagerconstants.h b/src/plugins/qmlprojectmanager/qmlprojectmanagerconstants.h index 1799b6d5626..bcd4c4856c9 100644 --- a/src/plugins/qmlprojectmanager/qmlprojectmanagerconstants.h +++ b/src/plugins/qmlprojectmanager/qmlprojectmanagerconstants.h @@ -33,11 +33,11 @@ namespace QmlProjectManager { namespace Constants { const char * const QML_RC_ID("QmlProjectManager.QmlRunConfiguration"); -const char * const QML_RC_DISPLAY_NAME(QT_TRANSLATE_NOOP("QmlProjectManager::Internal::QmlRunConfiguration", "QML Runtime")); +const char * const QML_RC_DISPLAY_NAME(QT_TRANSLATE_NOOP("QmlProjectManager::Internal::QmlRunConfiguration", "QML Viewer")); const char * const QML_VIEWER_KEY("QmlProjectManager.QmlRunConfiguration.QDeclarativeViewer"); const char * const QML_VIEWER_ARGUMENTS_KEY("QmlProjectManager.QmlRunConfiguration.QDeclarativeViewerArguments"); const char * const QML_VIEWER_TARGET_ID("QmlProjectManager.QmlTarget"); -const char * const QML_VIEWER_TARGET_DISPLAY_NAME("QML Runtime"); +const char * const QML_VIEWER_TARGET_DISPLAY_NAME("QML Viewer"); const char * const QML_MAINSCRIPT_KEY("QmlProjectManager.QmlRunConfiguration.MainScript"); const char * const QML_DEBUG_SERVER_ADDRESS_KEY("QmlProjectManager.QmlRunConfiguration.DebugServerAddress"); const char * const QML_DEBUG_SERVER_PORT_KEY("QmlProjectManager.QmlRunConfiguration.DebugServerPort"); diff --git a/src/plugins/qmlprojectmanager/qmlprojectrunconfiguration.cpp b/src/plugins/qmlprojectmanager/qmlprojectrunconfiguration.cpp index 31508c1f55b..da51b8bc591 100644 --- a/src/plugins/qmlprojectmanager/qmlprojectrunconfiguration.cpp +++ b/src/plugins/qmlprojectmanager/qmlprojectrunconfiguration.cpp @@ -99,13 +99,20 @@ void QmlProjectRunConfiguration::ctor() connect(em, SIGNAL(currentEditorChanged(Core::IEditor*)), this, SLOT(changeCurrentFile(Core::IEditor*))); - setDisplayName(tr("QML Runtime", "QMLRunConfiguration display name.")); + setDisplayName(tr("QML Viewer", "QMLRunConfiguration display name.")); // prepend creator/bin dir to search path (only useful for special creator-qml package) const QString searchPath = QCoreApplication::applicationDirPath() + Utils::SynchronousProcess::pathSeparator() + QString(qgetenv("PATH")); - m_qmlViewerDefaultPath = Utils::SynchronousProcess::locateBinary(searchPath, QLatin1String("qml")); + +#ifdef Q_OS_MAC + const QString qmlViewerName = QLatin1String("QMLViewer"); +#else + const QString qmlViewerName = QLatin1String("qmlviewer"); +#endif + + m_qmlViewerDefaultPath = Utils::SynchronousProcess::locateBinary(searchPath, qmlViewerName); } QmlProjectRunConfiguration::~QmlProjectRunConfiguration() @@ -196,8 +203,8 @@ QWidget *QmlProjectRunConfiguration::createConfigurationWidget() debugPort->setValue(m_debugData.serverPort); connect(debugPort, SIGNAL(valueChanged(int)), this, SLOT(onDebugServerPortChanged())); - form->addRow(tr("QML Runtime"), qmlViewer); - form->addRow(tr("QML Runtime arguments:"), qmlViewerArgs); + form->addRow(tr("QML Viewer"), qmlViewer); + form->addRow(tr("QML Viewer arguments:"), qmlViewerArgs); form->addRow(tr("Main QML File:"), m_fileListCombo.data()); form->addRow(tr("Debugging Address:"), debugServer); form->addRow(tr("Debugging Port:"), debugPort); diff --git a/src/plugins/qmlprojectmanager/qmlprojecttarget.cpp b/src/plugins/qmlprojectmanager/qmlprojecttarget.cpp index c7bf7dee25d..dded0394549 100644 --- a/src/plugins/qmlprojectmanager/qmlprojecttarget.cpp +++ b/src/plugins/qmlprojectmanager/qmlprojecttarget.cpp @@ -45,7 +45,7 @@ QmlProjectTarget::QmlProjectTarget(QmlProject *parent) : { setDisplayName(QApplication::translate("QmlProjectManager::QmlTarget", Constants::QML_VIEWER_TARGET_DISPLAY_NAME, - "QML Runtime target display name")); + "QML Viewer target display name")); setIcon(qApp->style()->standardIcon(QStyle::SP_ComputerIcon)); } @@ -75,7 +75,7 @@ bool QmlProjectTarget::fromMap(const QVariantMap &map) setDisplayName(QApplication::translate("QmlProjectManager::QmlTarget", Constants::QML_VIEWER_TARGET_DISPLAY_NAME, - "QML Runtime target display name")); + "QML Viewer target display name")); return true; } @@ -101,7 +101,7 @@ QString QmlProjectTargetFactory::displayNameForId(const QString &id) const if (id == QLatin1String(Constants::QML_VIEWER_TARGET_ID)) return QCoreApplication::translate("QmlProjectManager::QmlTarget", Constants::QML_VIEWER_TARGET_DISPLAY_NAME, - "QML Runtime target display name"); + "QML Viewer target display name"); return QString(); } -- GitLab