diff options
Diffstat (limited to 'src/tools/ivigenerator/templates_server_qtro/core.cpp.tpl')
-rw-r--r-- | src/tools/ivigenerator/templates_server_qtro/core.cpp.tpl | 8 |
1 files changed, 4 insertions, 4 deletions
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); |