diff options
author | Antti Hölttä <AHoelttae@luxoft.com> | 2018-04-25 14:49:56 +0200 |
---|---|---|
committer | Dominik Holland <dominik.holland@pelagicore.com> | 2018-04-27 08:06:19 +0000 |
commit | 34a1b32ecf116d7c4a6ad43f0f6f9d68494a63be (patch) | |
tree | c2d3cfc0640c617776006e1a5a002b14dd5d3e5d | |
parent | 4b4a086f310ccf6570214e5ed4911116f8c96240 (diff) |
Add missing QStringLiterals
Change-Id: I2859595e28983297047fb2bf8bc37db6e8b2ad38
Reviewed-by: Dominik Holland <dominik.holland@pelagicore.com>
-rw-r--r-- | src/tools/ivigenerator/templates_backend_qtro/backend.cpp.tpl | 10 | ||||
-rw-r--r-- | src/tools/ivigenerator/templates_server_qtro/core.cpp.tpl | 8 |
2 files changed, 9 insertions, 9 deletions
diff --git a/src/tools/ivigenerator/templates_backend_qtro/backend.cpp.tpl b/src/tools/ivigenerator/templates_backend_qtro/backend.cpp.tpl index 33f65dd..0d0f146 100644 --- a/src/tools/ivigenerator/templates_backend_qtro/backend.cpp.tpl +++ b/src/tools/ivigenerator/templates_backend_qtro/backend.cpp.tpl @@ -66,17 +66,17 @@ QT_BEGIN_NAMESPACE void {{class}}::initialize() { - QString configPath = "./server.conf"; + QString configPath(QStringLiteral("./server.conf")); if (qEnvironmentVariableIsSet("SERVER_CONF_PATH")) - configPath = QString::fromLatin1(qgetenv("SERVER_CONF_PATH")); + configPath = QString::fromLocal8Bit(qgetenv("SERVER_CONF_PATH")); else qDebug() << "Environment variable SERVER_CONF_PATH not defined, using " << configPath; QSettings settings(configPath, QSettings::IniFormat); - settings.beginGroup("{{module.module_name|lower}}"); - QUrl url = QUrl(settings.value("Registry", "local:{{module.module_name|lower}}").toString()); + settings.beginGroup(QStringLiteral("{{module.module_name|lower}}")); + QUrl url = QUrl(settings.value(QStringLiteral("Registry"), QStringLiteral("local:{{module.module_name|lower}}")).toString()); m_node = new QRemoteObjectNode(url); connect(m_node, &QRemoteObjectNode::error, this, &{{class}}::onNodeError); - m_replica.reset(m_node->acquire<{{interface}}Replica>("{{interface.qualified_name}}")); + m_replica.reset(m_node->acquire<{{interface}}Replica>(QStringLiteral("{{interface.qualified_name}}"))); setupConnections(); {% for property in interface.properties %} diff --git a/src/tools/ivigenerator/templates_server_qtro/core.cpp.tpl b/src/tools/ivigenerator/templates_server_qtro/core.cpp.tpl index dceef27..575cb0e 100644 --- a/src/tools/ivigenerator/templates_server_qtro/core.cpp.tpl +++ b/src/tools/ivigenerator/templates_server_qtro/core.cpp.tpl @@ -63,14 +63,14 @@ QT_BEGIN_NAMESPACE void {{class}}::init() { {{module.module_name|upperfirst}}Module::registerTypes(); - QString configPath = "./server.conf"; + QString configPath(QStringLiteral("./server.conf")); if (qEnvironmentVariableIsSet("SERVER_CONF_PATH")) - configPath = QString::fromLatin1(qgetenv("SERVER_CONF_PATH")); + configPath = QString::fromLocal8Bit(qgetenv("SERVER_CONF_PATH")); else qDebug() << "Environment variable SERVER_CONF_PATH not defined, using " << configPath; QSettings settings(configPath, QSettings::IniFormat); - settings.beginGroup("{{module.module_name|lower}}"); - QUrl url = QUrl(settings.value("Registry", "local:{{module.module_name|lower}}").toString()); + settings.beginGroup(QStringLiteral("{{module.module_name|lower}}")); + QUrl url = QUrl(settings.value(QStringLiteral("Registry"), QStringLiteral("local:{{module.module_name|lower}}")).toString()); m_host = new QRemoteObjectRegistryHost(url); qDebug() << "registry at: " << m_host->registryUrl().toString(); connect(m_host, &QRemoteObjectNode::error, this, &{{class}}::reportError); |