Move logging from QDebug to QCDebug and introduce LoggingCategories.

This commit is contained in:
Lukas Brübach 2025-01-17 11:37:30 +01:00
parent 92a903b035
commit 710f7b0f07
63 changed files with 262 additions and 123 deletions

View file

@ -76,7 +76,7 @@ QString ServersSettings::getPort(QString defaultPort)
{
int index = getPrevioushostindex(getPrevioushostName());
QVariant port = getValue(QString("port%1").arg(index), "server", "server_details");
qDebug() << "getPort() index = " << index << " port.val = " << port.toString();
qCDebug(ServersSettingsLog) << "getPort() index = " << index << " port.val = " << port.toString();
return port == QVariant() ? std::move(defaultPort) : port.toString();
}
@ -84,7 +84,7 @@ QString ServersSettings::getPlayerName(QString defaultName)
{
int index = getPrevioushostindex(getPrevioushostName());
QVariant name = getValue(QString("username%1").arg(index), "server", "server_details");
qDebug() << "getPlayerName() index = " << index << " name.val = " << name.toString();
qCDebug(ServersSettingsLog) << "getPlayerName() index = " << index << " name.val = " << name.toString();
return name == QVariant() ? std::move(defaultName) : name.toString();
}