code cosmetics

This commit is contained in:
hjk
2010-06-09 13:57:23 +02:00
parent 9c4d7f1a95
commit 035cfd5506
2 changed files with 15 additions and 15 deletions

View File

@@ -32,17 +32,17 @@
namespace QmlProjectManager { namespace QmlProjectManager {
namespace Constants { namespace Constants {
const char * const QML_RC_ID("QmlProjectManager.QmlRunConfiguration"); const char * const QML_RC_ID = "QmlProjectManager.QmlRunConfiguration";
const char * const QML_RC_DISPLAY_NAME(QT_TRANSLATE_NOOP("QmlProjectManager::Internal::QmlRunConfiguration", "QML Viewer")); 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_KEY = "QmlProjectManager.QmlRunConfiguration.QDeclarativeViewer";
const char * const QML_VIEWER_ARGUMENTS_KEY("QmlProjectManager.QmlRunConfiguration.QDeclarativeViewerArguments"); 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_ID = "QmlProjectManager.QmlTarget";
const char * const QML_VIEWER_TARGET_DISPLAY_NAME("QML Viewer"); const char * const QML_VIEWER_TARGET_DISPLAY_NAME = "QML Viewer";
const char * const QML_MAINSCRIPT_KEY("QmlProjectManager.QmlRunConfiguration.MainScript"); 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_ADDRESS_KEY = "QmlProjectManager.QmlRunConfiguration.DebugServerAddress";
const char * const QML_DEBUG_SERVER_PORT_KEY("QmlProjectManager.QmlRunConfiguration.DebugServerPort"); const char * const QML_DEBUG_SERVER_PORT_KEY = "QmlProjectManager.QmlRunConfiguration.DebugServerPort";
const int QML_DEFAULT_DEBUG_SERVER_PORT(3768); const int QML_DEFAULT_DEBUG_SERVER_PORT = 3768;
} // namespace Constants } // namespace Constants
} // namespace QmlProjectManager } // namespace QmlProjectManager

View File

@@ -72,13 +72,13 @@ ProjectExplorer::RunConfiguration *QmlProjectRunConfigurationFactory::create(Pro
{ {
if (!canCreate(parent, id)) if (!canCreate(parent, id))
return 0; return 0;
QmlProjectTarget *qmlparent(static_cast<QmlProjectTarget *>(parent)); QmlProjectTarget *qmlparent = static_cast<QmlProjectTarget *>(parent);
return new QmlProjectRunConfiguration(qmlparent); return new QmlProjectRunConfiguration(qmlparent);
} }
bool QmlProjectRunConfigurationFactory::canRestore(ProjectExplorer::Target *parent, const QVariantMap &map) const bool QmlProjectRunConfigurationFactory::canRestore(ProjectExplorer::Target *parent, const QVariantMap &map) const
{ {
QString id(ProjectExplorer::idFromMap(map)); QString id = ProjectExplorer::idFromMap(map);
return canCreate(parent, id); return canCreate(parent, id);
} }
@@ -86,8 +86,8 @@ ProjectExplorer::RunConfiguration *QmlProjectRunConfigurationFactory::restore(Pr
{ {
if (!canRestore(parent, map)) if (!canRestore(parent, map))
return 0; return 0;
QmlProjectTarget *qmlparent(static_cast<QmlProjectTarget *>(parent)); QmlProjectTarget *qmlparent = static_cast<QmlProjectTarget *>(parent);
QmlProjectRunConfiguration *rc(new QmlProjectRunConfiguration(qmlparent)); QmlProjectRunConfiguration *rc = new QmlProjectRunConfiguration(qmlparent);
if (rc->fromMap(map)) if (rc->fromMap(map))
return rc; return rc;
delete rc; delete rc;
@@ -104,7 +104,7 @@ ProjectExplorer::RunConfiguration *QmlProjectRunConfigurationFactory::clone(Proj
{ {
if (!canClone(parent, source)) if (!canClone(parent, source))
return 0; return 0;
QmlProjectTarget *qmlparent(static_cast<QmlProjectTarget *>(parent)); QmlProjectTarget *qmlparent = static_cast<QmlProjectTarget *>(parent);
return new QmlProjectRunConfiguration(qmlparent, qobject_cast<QmlProjectRunConfiguration *>(source)); return new QmlProjectRunConfiguration(qmlparent, qobject_cast<QmlProjectRunConfiguration *>(source));
} }