Supress compiler warning on unimplemented methods

+ Expose struct trough member variable
+ Try to enforce consistent naming
This commit is contained in:
Salanto 2021-08-24 15:43:40 +02:00
parent b7308c18fb
commit 5af2be130d
3 changed files with 19 additions and 12 deletions

View File

@ -93,7 +93,7 @@ private:
* @param Name of the area which buffer is modified.
* @param Formatted QString to be added into the buffer.
*/
void updateAreaBuffer(const QString& f_area, const QString& f_entry);
void updateAreaBuffer(const QString& f_areaName, const QString& f_entry);
/**
* @brief Returns the buffer of a respective area. Primarily used by the Discord Webhook.

View File

@ -35,6 +35,7 @@ public:
QString message;
AreaData* area;
};
m_content content;
};
/**
@ -55,6 +56,7 @@ public:
QString targetHDID;
AreaData* area;
};
m_content content;
};
/**
@ -72,12 +74,14 @@ public:
QString cmdArgs;
AreaData* area;
};
m_content content;
};
/**
* @brief Convenience class to transport login attempt information to the logger.
*/
class LoginLog {
public:
explicit LoginLog();
struct m_content {
QString charName;
@ -87,19 +91,22 @@ class LoginLog {
bool success;
QString modname;
};
m_content content;
};
/**
* @brief Convenience class to transport connection event information to the logger.
*/
class ConnectionLog {
public:
explicit ConnectionLog();
struct m_conntent {
struct m_content {
QString ip_address;
QString hdid;
QString ipid;
bool success;
};
m_content content;
};
#endif // U_LOGGER_DATATYPES_H

View File

@ -25,42 +25,42 @@ ULogger::ULogger(QObject* parent) :
void ULogger::logIC(MessageLog f_log)
{
Q_UNUSED(f_log)
}
void ULogger::logOOC(MessageLog f_log)
{
Q_UNUSED(f_log)
}
void ULogger::logLogin(LoginLog f_log)
{
Q_UNUSED(f_log)
}
void ULogger::logCMD(CommandLog f_log)
{
Q_UNUSED(f_log)
}
void ULogger::logKick(ModerativeLog f_log)
{
Q_UNUSED(f_log)
}
void ULogger::logBan(ModerativeLog f_log)
{
Q_UNUSED(f_log)
}
void ULogger::logConnectionAttempt(ConnectionLog f_log)
{
Q_UNUSED(f_log)
}
void ULogger::updateAreaBuffer(const QString& f_area, const QString& f_entry)
void ULogger::updateAreaBuffer(const QString& f_areaName, const QString& f_entry)
{
QQueue<QString>f_buffer = m_bufferMap.value(f_area);
QQueue<QString>f_buffer = m_bufferMap.value(f_areaName);
if (f_buffer.length() < ConfigManager::logBuffer()) {
f_buffer.enqueue(f_entry);
}
@ -68,7 +68,7 @@ void ULogger::updateAreaBuffer(const QString& f_area, const QString& f_entry)
f_buffer.dequeue();
f_buffer.enqueue(f_entry);
}
m_bufferMap.insert(f_area, f_buffer);
m_bufferMap.insert(f_areaName, f_buffer);
}
QQueue<QString> ULogger::buffer(const QString& f_areaName)