chore: 格式化ElaWidgetTools代码
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user