chore: 格式化ElaWidgetTools代码

This commit is contained in:
sleepwithoutbz
2025-09-20 01:39:00 +08:00
parent d2fded145d
commit 4ab391f8a1
394 changed files with 10913 additions and 15860 deletions

View File

@@ -8,13 +8,11 @@ Q_SINGLETON_CREATE_CPP(ElaLog)
Q_PROPERTY_CREATE_Q_CPP(ElaLog, QString, LogSavePath)
Q_PROPERTY_CREATE_Q_CPP(ElaLog, QString, LogFileName)
Q_PROPERTY_CREATE_Q_CPP(ElaLog, bool, IsLogFileNameWithTime)
ElaLog::ElaLog(QObject* parent)
: QObject{parent}, d_ptr(new ElaLogPrivate())
{
ElaLog::ElaLog(QObject *parent) : QObject{parent}, d_ptr(new ElaLogPrivate()) {
Q_D(ElaLog);
d->q_ptr = this;
d->_pLogFileName = "ElaLog";
d->_pLogSavePath = QDir::currentPath();
d->q_ptr = this;
d->_pLogFileName = "ElaLog";
d->_pLogSavePath = QDir::currentPath();
d->_pIsLogFileNameWithTime = false;
d->_clearLogFile();
connect(this, &ElaLog::pLogSavePathChanged, d, &ElaLogPrivate::_clearLogFile);
@@ -22,12 +20,9 @@ ElaLog::ElaLog(QObject* parent)
connect(this, &ElaLog::pIsLogFileNameWithTimeChanged, d, &ElaLogPrivate::_clearLogFile);
}
ElaLog::~ElaLog()
{
}
ElaLog::~ElaLog() {}
void ElaLog::initMessageLog(bool isEnable)
{
void ElaLog::initMessageLog(bool isEnable) {
Q_D(ElaLog);
qInstallMessageHandler(isEnable ? d->_messageLogHander : 0);
}