Qt6 Migration: Complete migration with DDS/RTI support and build validation

Major Changes:
- Merged latest Qt5 devel content from dlbo (292 files changed, 7 new dirs)
- Consolidated forward-declarations and include folders
- Removed unneeded modules per Niklas' repo check list

Build System Fixes:
- Fixed CMake VERSION_GREATER syntax in ParticipantManagement/CMakeLists.txt
- Added VLC packages (libvlc-dev, vlc-plugin-base) to docker_build.sh
- Added PostgreSQL dev packages (libpq-dev, postgresql-server-dev-all) to Dockerfile
- Fixed locale warnings (ANSI_X3.4-1968 → C.UTF-8)
- Fixed ArcGIS SDK path warnings when BUILD_ARCGIS=OFF

Code Generation Fixes:
- Fixed IDL enum collisions (PortType→CorePortType/DdsutPortType, PdmEventType)
- Fixed Grantlee template svc_translation.cpp.grantlee:
  - Changed {{ idl_enum.name }}_def:: to {{ idl_enum.name }}::
  - Fixed .underlying() calls for C++11 scoped enums (enum class)
- Removed generated files from repo (moc_*, *_dtc.h, *_ftc.h)

Validation:
- BUILD_RTI=ON: SUCCESS
- BUILD_RTI=OFF: SUCCESS
- C++17 standard maintained for RTI 7.7 compatibility
- Ubuntu 26.04 Docker environment verified

Remaining Warnings (expected):
- BgViewer, KDChart, KDReports, Poppler-Qt6 not found (optional features)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
torstenandCopilot committed 2026-09-15 18:20:26 +00:00
1 parent f23384bb68
commit 7173785915
18662 files changed
+4115092 -5435

No files matched your search

@@ -0,0 +1,32 @@
#
# CMake Script für nglsettings
# $Id$
# $HeadURL$
# $Author$
#
SET(nglsettings_SRCS
nglsettings_connections.cpp
nglsettings_settings.cpp
)
SET(nglsettings_HDRS
nglsettings_connections.h
nglsettings_export.h
nglsettings_settings.h
)
NGL_ADD_LIBRARY(ALL nglsettings SHARED ${nglsettings_SRCS} ${nglsettings_HDRS})
NGL_TARGET_LINK_LIBRARIES(nglsettings
PRIVATE
ngltools
Qt5::Network
PUBLIC
Qt5::Core
)
NGL_TARGET_INCLUDE_DIRECTORIES(nglsettings
INTERFACE
${CMAKE_CURRENT_SOURCE_DIR}/../
)
NGL_INSTALL_TARGET(nglsettings)
@@ -0,0 +1,180 @@
/**
* @RDE_HEADER@
* hold all TCP and UDP connection informations
* $Id$
* $HeadURL$
* $Author$
*/
#include "nglsettings_connections.h"
#include <QCoreApplication>
#include <QMap>
#include <QPair>
#include <QSettings>
#include <QtNetwork/QHostAddress>
#include <QtNetwork/QHostInfo>
#include <QtNetwork/QNetworkInterface>
namespace NGL
{
namespace Connections
{
enum class eHostConfig
{
public_local,
localhost,
server,
server_avs
};
struct configStruct
{
eHostConfig host;
unsigned short port;
QString name;
};
static QMap<eConnection, configStruct> *s_config = nullptr;
static QSettings *s_settings = nullptr;
static unsigned short s_portOffset = 9000;
static QString *s_serverHostname = nullptr;
static void cleanupSettings()
{
delete s_settings;
s_settings = nullptr;
delete s_serverHostname;
s_serverHostname = nullptr;
delete s_config;
s_config = nullptr;
}
static void insertConfig(eConnection conn, eHostConfig host, unsigned short port, const char *name)
{
if (!s_config)
s_config = new QMap<eConnection, configStruct>();
configStruct s;
s.host = host;
s.port = port;
s.name = QString::fromLatin1(name);
s_config->insert(conn, s);
}
static void initConfig()
{
if (s_config && !s_config->isEmpty())
return;
insertConfig(eConnection::AVS_WORKSTATION, eHostConfig::localhost, 6370, "AVS_WORKSTATION");
insertConfig(eConnection::AVS_WORKSTATION_VD, eHostConfig::localhost, 6380, "AVS_WORKSTATION_VD");
insertConfig(eConnection::AVS_ROOT, eHostConfig::server_avs, 6350, "AVS_ROOT");
insertConfig(eConnection::AVS_FM, eHostConfig::server_avs, 6360, "AVS_FM");
insertConfig(eConnection::AVS_MOTION_RECORDER, eHostConfig::server_avs, 6390, "AVS_MOTION_RECORDER");
insertConfig(eConnection::AVS_AVA, eHostConfig::server_avs, 6391, "AVS_AVA");
insertConfig(eConnection::PWS_WEBSOCKET, eHostConfig::server, 5701, "PWS_WEBSOCKET");
insertConfig(eConnection::SCM_WEBSOCKET, eHostConfig::server, 7300, "SCM_WEBSOCKET");
insertConfig(eConnection::ISM_WEBSOCKET, eHostConfig::server, 2080, "ISM_WEBSOCKET"); // see ICD
insertConfig(eConnection::FLM_THP_SERVER, eHostConfig::server, 2090, "FLM_THP_SERVER");
insertConfig(eConnection::FLM_PDF_SERVER, eHostConfig::server, 3000, "FLM_PDF_SERVER"); // TODO: verify port with team
insertConfig(eConnection::LVS, eHostConfig::server, 94, "LVS");
insertConfig(eConnection::ZWLVSV, eHostConfig::server, 95, "ZWLVSV");
insertConfig(eConnection::ZWLVWCS, eHostConfig::server, 97, "ZWLVWCS");
insertConfig(eConnection::ZWLVWMS, eHostConfig::server, 98, "ZWLVWMS");
insertConfig(eConnection::ZSLV, eHostConfig::server, 99, "ZSLV");
}
void setIniFile(const QString &iniFileName)
{
if (!s_settings)
qAddPostRoutine(cleanupSettings);
delete s_settings;
s_settings = new QSettings(iniFileName, QSettings::IniFormat);
}
QString iniFile()
{
return s_settings ? s_settings->fileName() : QString();
}
unsigned short portOffset()
{
return s_portOffset;
}
void setPortOffset(unsigned short portOffset)
{
s_portOffset = portOffset;
}
unsigned short port(eConnection connection)
{
initConfig();
unsigned short port = s_config->value(connection).port;
if (s_settings)
{
bool bOk;
QString key = s_config->value(connection).name + QLatin1String("/port");
unsigned short port2 = s_settings->value(key, port).toString().toUShort(&bOk);
if (bOk)
port = port2;
}
if (port < 100)
return portOffset() + port;
return port;
}
QString hostName(eConnection connection)
{
initConfig();
QString host;
switch (s_config->value(connection).host)
{
case eHostConfig::public_local:
host = QString::fromLocal8Bit(qgetenv("HOST"));
break;
case eHostConfig::localhost:
host = QLatin1String("127.0.0.1");
break;
case eHostConfig::server:
if (s_serverHostname)
host = *s_serverHostname;
if (host.isEmpty())
host = QLatin1String("EXCTDS01");
break;
case eHostConfig::server_avs:
host = QStringLiteral("EXCAVS01");
break;
}
if (s_settings)
{
QString key = s_config->value(connection).name + QLatin1String("/host");
QString host2 = s_settings->value(key, host).toString();
if (!host2.isEmpty())
host = host2;
}
return host;
}
void setServerHostname(const QString &serverHostName)
{
if (!s_serverHostname)
s_serverHostname = new QString(serverHostName);
else
*s_serverHostname = serverHostName;
}
QString connectionName(eConnection connection)
{
if (s_config)
{
auto it = s_config->constFind(connection);
if (it != s_config->constEnd())
return it.value().name;
}
return QString::number((int)connection);
}
} // namespace Connections
} // namespace NGL
@@ -0,0 +1,92 @@
/**
* @RDE_HEADER@
* hold all TCP and UDP connection informations
* $Id$
* $HeadURL$
* $Author$
*/
#pragma once
#include <QtCore/QString>
#include "nglsettings_export.h"
namespace NGL
{
/**
* Handle ports and hostnames for all connections between
* TDS Server and Workstation processes
*/
namespace Connections
{
/**
* All connections used in TDS
*/
enum class eConnection
{
UNKNOWN = 0, //!< not defined
AVS_WORKSTATION, //!< Audio/Video Workstation
AVS_WORKSTATION_VD, //!< Audio/Video Workstation exporter
AVS_ROOT, //!< Root process on server
AVS_FM, //!< FM process on server
AVS_MOTION_RECORDER, //!< MotionRecorder
AVS_AVA, //!< stripped AVA - Interface (provided by MotionRecorder)
ZWLVSV, //!< Port for Warehouse-Server
ZSLV, //!< Schnittstelle zwischen WMS und ECC
ZWLVWCS, //!< Schnittstelle WMS -> WCS (Unitechnik)
ZWLVWMS, //!< Schnittstelle WCS -> WMS
PWS_WEBSOCKET,//!< WebSocket Schnittstelle Projektions Workstation
SCM_WEBSOCKET,//!< WebSocket Schnittstelle ServiceManagement
ISM_WEBSOCKET,//!< WebSocket Schnittstelle InfrastructureManagemen
FLM_THP_SERVER, //!< Tcp Server for THP up/download
FLM_PDF_SERVER, //!< Tcp Server for PDF download
LVS , //!< Websocket Schnittstelle zwischen WarehouseGuez und LVS (neues Lagerververwaltungsystem)
};
/**
* Set the ini file (gfs_ws.ini or gfs_sv.ini or a custom one) to
* read the ports and hostnames from there. The section name must
* be the name of the connection (e.g. [ZWKOTP]). The port offset
* is then read from the key 'port' and the hostname from the key
* 'host'. If the given port is below 100 the portOffset() is added
* to the port.
* When there's not entry for a specified port, the hardcoeded
* default values are used. This should be the default use case.
* This function should not be called directly because
* NGL::Settings() does it for you.
* @param iniFileName the full path to the ini file
*/
NGLSETTINGS_EXPORT void setIniFile(const QString &iniFileName);
/**
* Retrieve the currently used config file
* @return the current config file
*/
NGLSETTINGS_EXPORT QString iniFile();
/**
* The port offset is set via setPortOffset()
*/
NGLSETTINGS_EXPORT unsigned short portOffset();
void setPortOffset(unsigned short portOffset);
/**
* Retrieve the port for a given connection
* @param connection the connection to get the port for
* @return the port for the given connection
*/
NGLSETTINGS_EXPORT unsigned short port(eConnection connection);
/**
* Retrieve the hostname for a given connection
* @param connection the connection to get the hostname for
* @return the hostname for the given connection
*/
NGLSETTINGS_EXPORT QString hostName(eConnection connection);
void setServerHostname(const QString &serverHostName);
/**
* Retrieve the connection name for a given connection. This
* name is equal to the ini section name and can be used
* for debug or error output.
* @param connection the connection to get the name for
* @return the name for the given connection
*/
NGLSETTINGS_EXPORT QString connectionName(eConnection connection);
} // namespace Connections
} // namespace NGL
@@ -0,0 +1,21 @@
/**
* Export definitions
* $Id$
* $HeadURL$
* $Author$
*/
#pragma once
#include <QtCore/qglobal.h>
#ifndef NGLSETTINGS_EXPORT
# ifdef BUILD_STATIC_LIBRARIES
# define NGLSETTINGS_EXPORT
# else
# ifdef MAKE_NGLSETTINGS_LIB
# define NGLSETTINGS_EXPORT Q_DECL_EXPORT
# else
# define NGLSETTINGS_EXPORT Q_DECL_IMPORT
# endif
# endif
#endif
@@ -0,0 +1,325 @@
/**
* @RDE_HEADER@
* Base settings class for all nglsettings
* $Id$
* $HeadURL$
* $Author$
*/
#include "nglsettings_settings.h"
#include "nglsettings_connections.h"
#include <ngltools/ngltools_filesystem.h>
#include <QCoreApplication>
#include <QDir>
#include <QSettings>
#include <QSize>
#include <QStandardPaths>
namespace NGL
{
QSettings *Settings::s_globalSettings = nullptr;
Settings::Settings(const QString &iniFile_)
: m_settings(nullptr)
{
QString iniFile = iniFile_;
if(iniFile == QLatin1String("gfs_ws.ini")) {
const QByteArray defUser = qgetenv("USER");
if( defUser == "ctc_aar" || defUser == "ctc_rbf" ) {
QByteArray home = qgetenv("HOME");
if(!home.isEmpty()) {
QString fn = QString::fromLocal8Bit(home) +
QLatin1String("/gfs_") +
QString::fromLocal8Bit(defUser.mid(4)) +
QLatin1String(".ini");
QFileInfo fi(fn);
if(fi.exists() && fi.isFile() && fi.isReadable()) {
iniFile = fn;
}
}
}
}
initializeGlobalSettings();
initPre();
if(!iniFile.isEmpty()) {
if(QFileInfo(iniFile).isAbsolute())
m_settings = new QSettings(iniFile, QSettings::IniFormat);
else
m_settings = new QSettings(basePath() + iniFile, QSettings::IniFormat);
initPost();
}
if (!m_settings)
m_settings = new QSettings(QLatin1String("RDE"));
}
Settings::Settings(const QString &organization, const QString &application)
: m_settings(new QSettings(organization, application))
{
initPre();
initPost();
}
Settings::~Settings()
{
delete m_settings;
}
void Settings::initializeGlobalSettings()
{
if (s_globalSettings)
return;
if (!s_globalSettings)
{
QString globalSettingsFile = NGL::findProjectConfigFile();
//std::cerr << "Using global settings file '" << qPrintable(globalSettingsFile)
// << "'" << std::endl;
if (!globalSettingsFile.isEmpty())
s_globalSettings = new QSettings(globalSettingsFile, QSettings::IniFormat);
}
if (!s_globalSettings)
s_globalSettings = new QSettings(QLatin1String("RDE"), QLatin1String("LTS-CC"));
Connections::setPortOffset(portOffset());
Connections::setServerHostname(serverHostname());
}
QString Settings::globalSectionName()
{
QString secName = QLatin1String("Global");
static const char envGlobSecName[] = "LTS_CONF_GLOBAL_SECTION_NAME";
if (qEnvironmentVariableIsSet(envGlobSecName))
secName = QString::fromLocal8Bit(qgetenv(envGlobSecName));
return secName;
}
QString Settings::basePath() const
{
return m_paths["GFS_PATH"];
}
QString Settings::tempPath() const
{
return m_paths["TMP_PATH"];
}
QString Settings::printPath()
{
return getDirectory("PDF", tempPath());
}
QString Settings::logoProject()
{
return QLatin1String(":project/logo.png");
}
QString Settings::bitmapPath()
{
return getDirectory("BITMAPS", basePath() + QLatin1String("DATA"));
}
QString Settings::zsks_rxPath()
{
return getDirectory("ZSKS_RX", tempPath());
}
QString Settings::zsks_txPath()
{
return getDirectory("ZSKS_TX", tempPath());
}
QString Settings::aarServerPath(int exerciseId)
{
return getDirectory(QByteArray::number(exerciseId), QString::fromLocal8Bit("/data/aar/"));
}
bool Settings::isDatabaseConnectionLocal()
{
return (databaseHostname() == QStringLiteral("localhost"));
}
QString Settings::databaseName()
{
initializeGlobalSettings();
//IO 12.12.2016 only here read from env variable
return s_globalSettings->value(globalSectionName()+ QLatin1String("/DatabaseName"), QLatin1String("lts_ets_pro")).toString();
}
QString Settings::databaseHostname()
{
initializeGlobalSettings();
return s_globalSettings->value(QLatin1String("Global/DatabaseHostname"), QLatin1String("EXCDBS01")).toString();
}
QString Settings::databaseUser()
{
#ifdef Q_OS_WIN
QByteArray defUser = qgetenv("USERNAME");
#else
QByteArray defUser = qgetenv("USER");
#endif
QString ret = m_settings->value(QLatin1String("db/user"), QString::fromLocal8Bit(defUser)).toString();
return ret;
}
QString Settings::databasePassword(const QString &databaseUser)
{
QString defaultPw = QStringLiteral("ctc11de");
if (!databaseUser.isEmpty())
{
const QVector<QStringRef> &sl = databaseUser.splitRef(QLatin1Char('_'));
if (sl.size() > 1)
defaultPw = sl.at(0).toString() + QStringLiteral("11de");
}
return m_settings->value(QLatin1String("db/passwd"), defaultPw).toString();
}
QString Settings::databaseDriver()
{
return m_settings->value(QLatin1String("db/driver"), QLatin1String("QPSQL")).toString();
}
int Settings::avsKeepAliveTimeout()
{
return m_settings->value(QLatin1String("avs/keepalivetimeout"), 20000).toInt();
}
QString Settings::avsServerHost()
{
return m_settings->value(QLatin1String("avs/serverhost"), QLatin1String("EXCAVS01")).toString();
}
quint16 Settings::avsServerPortAVE()
{
static const quint16 defaultPort = 6350;
bool bOk;
quint16 ret = m_settings->value(QLatin1String("avs/serverport_ave"), defaultPort).toUInt(&bOk);
return bOk ? ret : defaultPort;
}
QSettings *Settings::settings()
{
return m_settings;
}
const QSettings *Settings::settings() const
{
return m_settings;
}
QString Settings::fixupPath(const QString &_path) const
{
QString path = QDir::fromNativeSeparators(_path);
if(!QDir::isAbsolutePath(path))
path = basePath() + path;
path = QDir::cleanPath(path);
if(!path.endsWith(QLatin1Char('/')))
path += QLatin1Char('/');
return path;
}
QString Settings::getDirectory(const QByteArray &_dir, const QString &defPrefix, bool bPathLowercase)
{
if(m_paths[_dir].isEmpty()) {
const QString lowerDir = QString::fromLatin1(_dir.toLower());
const QString dir = bPathLowercase ? lowerDir : QString::fromLatin1(_dir);
QString def = defPrefix + QLatin1Char('/') + dir + QLatin1Char('/');
m_paths[_dir] = fixupPath(m_settings->value(QLatin1String("paths/") + lowerDir, def).toString());
QDir d(m_paths[_dir]);
if(!d.exists())
d.mkpath(d.absolutePath());
}
return m_paths[_dir];
}
void Settings::initPre()
{
#ifdef WIN32
QString path = QString::fromLocal8Bit(qgetenv("GFS_PATH"));
if(path.isEmpty())
path = QCoreApplication::applicationDirPath();
m_paths["GFS_PATH"] = fixupPath(path);
#else
QByteArray path = qgetenv("GFS_PATH");
if(path.isEmpty())
path = qgetenv("HOME");
m_paths["GFS_PATH"] = fixupPath(QString::fromLocal8Bit(path));
#endif
QByteArray tmppath = qgetenv("TMP_PATH");
if(tmppath.isEmpty())
tmppath = qgetenv("TMP");
if (tmppath.isEmpty())
tmppath = QDir::tempPath().toLocal8Bit();
m_paths["TMP_PATH"] = fixupPath(QString::fromLocal8Bit(tmppath));
}
void Settings::initPost()
{
NGL::Connections::setIniFile(m_settings->fileName());
}
int Settings::getInteger(const QString &key, int defVal) const
{
bool bOk;
int ret = m_settings->value(key, defVal).toInt(&bOk);
return bOk ? ret : defVal;
}
float Settings::getFloat(const QString &key, float defVal) const
{
bool bOk;
float ret = m_settings->value(key, defVal).toFloat(&bOk);
return bOk ? ret : defVal;
}
double Settings::getDouble(const QString &key, double defVal) const
{
bool bOk;
double ret = m_settings->value(key, defVal).toDouble(&bOk);
return bOk ? ret : defVal;
}
bool Settings::getBoolean(const QString &key, bool defVal) const
{
return m_settings->value(key, defVal).toBool();
}
QString Settings::getString(const QString &key, const QString &defVal) const
{
return m_settings->value(key, defVal).toString();
}
unsigned short Settings::domainId()
{
initializeGlobalSettings();
return s_globalSettings->value(QLatin1String("Global/DomainId"), 0).toUInt();
}
unsigned short Settings::portOffset()
{
initializeGlobalSettings();
return s_globalSettings->value(QLatin1String("Global/PortOffset"), 9000).toUInt();
}
QString Settings::serverHostname()
{
initializeGlobalSettings();
return s_globalSettings->value(QLatin1String("Global/ServerHostname"), QLatin1String("EXCTDS01")).toString();
}
QString Settings::logPath()
{
initializeGlobalSettings();
#ifdef WIN32
return s_globalSettings->value(QLatin1String("Global/LogPath"), QStandardPaths::writableLocation(QStandardPaths::TempLocation)).toString();
#else
return s_globalSettings->value(QLatin1String("Global/LogPath"), QLatin1String("/shd/CTC/LOG")).toString();
#endif
}
} // namespace NGL
@@ -0,0 +1,159 @@
/**
* @RDE_HEADER@
* Base settings class for all nglsettings
* $Id$
* $HeadURL$
* $Author$
*/
#pragma once
#include <QtCore/QString>
#include <QtCore/QHash>
#include "nglsettings_export.h"
class QSettings;
namespace NGL {
/**
* A base settings class to retrieve informations
* from the global ini file. All programs which need
* a config should derive from this class to have
* consistent settings handling in TDS
*/
class NGLSETTINGS_EXPORT Settings {
public:
/**
* ctor. The ini file should be either 'gfs_ws.ini' or
* 'gfs_sv.ini'
* @param iniFile 'gfs_ws.ini' for workstation processes and
* 'gfs_sv.ini' for server processes
*/
explicit Settings(const QString &iniFile);
/**
* ctor. see QSettings ctor
*/
explicit Settings(const QString &organization, const QString &application);
// no copy allowed
Settings(const Settings&) = delete;
Settings &operator=(const Settings&) = delete;
/**
* dtor
*/
virtual ~Settings();
//!< initialize global settings (db host, name, logpath, server name)
static void initializeGlobalSettings();
//!< Returns the base path ($GFS_PATH)
QString basePath() const;
//!< Returns the path for temporary files ($TMP_PATH)
QString tempPath() const;
//!< Return the path for PDF printing
QString printPath();
//!< Return project logo path
QString logoProject();
//!< Return the path for the bitmaps ($GFS_PATH/DATA/BITMAPS)
QString bitmapPath();
// Server
//!< Return the path for ZSKS_RX temp dir
QString zsks_rxPath();
//!< Return the path for ZSKS_TX temp dir
QString zsks_txPath();
// Database connection
//!< The database name (legatus), key: db/name
static QString databaseName();
//!< The database host (EXCDBS01), key: db/host
static QString databaseHostname();
//!< The user used to connect to the db (ctc_sv/ctc_ws), key: db/user
QString databaseUser();
//!< The password for dbUser(), key: db/passwd
QString databasePassword(const QString &databaseUser = QString());
//!< The Qt database driver name (QPSQL, QSQLITE), key: db/driver
QString databaseDriver();
// Server AAR Path
//!< Return the path for downloadable After Action Reviews ("/data/aar/%EXERCISEID%")
QString aarServerPath(int exerciseId);
bool isDatabaseConnectionLocal();
// AVS-Configuration
int avsKeepAliveTimeout();
QString avsServerHost();
quint16 avsServerPortAVE();
//!< Return the pointer to the QSettings object
QSettings *settings();
//!< Return the const pointer to the QSettings object
const QSettings *settings() const;
//!< Convenience function for settings()->value([int], [def]).toInt()
int getInteger(const QString &key, int defVal) const;
//!< Convenience function for settings()->value([int], [def]).toInt()
int getInteger(const QString &group, const QString &key, int defVal) const
{
return getInteger(group + QLatin1Char('/') + key, defVal);
}
//!< Convenience function for settings()->value([int], [def]).toFloat()
float getFloat(const QString &key, float defVal) const;
//!< Convenience function for settings()->value([int], [def]).toFloat()
float getFloat(const QString &group, const QString &key, float defVal) const
{
return getFloat(group + QLatin1Char('/') + key, defVal);
}
//!< Convenience function for settings()->value([int], [def]).toDouble()
double getDouble(const QString &key, double defVal) const;
//!< Convenience function for settings()->value([int], [def]).toDouble()
double getDouble(const QString &group, const QString &key, double defVal) const
{
return getDouble(group + QLatin1Char('/') + key, defVal);
}
//!< Convenience function for settings()->value([int], [def]).toBool()
bool getBoolean(const QString &key, bool defVal) const;
//!< Convenience function for settings()->value([int], [def]).toBool()
bool getBoolean(const QString &group, const QString &key, bool defVal) const
{
return getBoolean(group + QLatin1Char('/') + key, defVal);
}
//!< Convenience function for settings()->value([int], [def]).toString()
QString getString(const QString &key, const QString &defVal) const;
//!< Convenience function for settings()->value([int], [def]).toString()
QString getString(const QString &group, const QString &key, const QString &defVal) const
{
return getString(group + QLatin1Char('/') + key, defVal);
}
static unsigned short portOffset();
static unsigned short domainId();
static QString serverHostname();
static QString logPath();
static QString globalSectionName();
private:
//!< fixup the path (make absoulte, make sure it ends with '/')
QString fixupPath(const QString &path) const;
/** read dir from iniFile if not already done. If it's not in the
* ini file build it from <defPrefix>/<dir>
* The entry in the ini file must be paths/<dir.toLower()>
*/
QString getDirectory(const QByteArray &dir, const QString &defPrefix, bool bPathLowercase = false);
private:
void initPre();
void initPost();
QSettings *m_settings;
static QSettings *s_globalSettings;
QHash<QByteArray, QString> m_paths;
};
} // namespace NGL