-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[更新项目配置以支持最新的Qt6和Windows开发环境]: 主要涉及项目构建和日志处理模块的更新,以适配最新的Qt6库和Windows开…
…发环境。 - 更新了`.github/workflows/qmake.yml`文件,将Windows操作系统的版本从`windows-2019`更新为`windows-latest`,以支持最新的Windows版本。 - 在`LogAsynchronous/CMakeLists.txt`中,调整了项目源文件列表,移除了`fileutil.h`和`fileutil.cpp`,并添加了新的`logfile.cc`和`logfile.hpp`文件,以实现日志的异步写入功能。 - `LogAsynchronous/LogAsynchronous.pro`文件中,移除了`fileutil.cpp`,并添加了新的`logfile.cc`文件,同时更新了头文件列表。 - 删除了`LogAsynchronous/fileutil.h`文件,因为它已被新的日志文件处理模块替代。 - 在`LogAsynchronous/logasync.cpp`中,包含了新的`logfile.hpp`头文件,并更新了日志处理逻辑,以支持日志的异步写入到文件和控制台。 - `LogAsynchronous/logasync.h`文件中,添加了新的枚举值和方法,以支持日志方向和日志级别的设置。 - 将`LogAsynchronous/fileutil.cpp`文件重命名为`LogAsynchronous/logfile.cc`,并进行了相应的代码更新,以实现新的日志文件处理逻辑。 - 添加了新的`LogAsynchronous/logfile.hpp`文件,定义了新的`LogFile`类,用于处理日志文件的写入。 - 在`cmake/qt.cmake`文件中,添加了新的编译定义`-DQT_DEPRECATED_WARNINGS`,以启用Qt6中弃用的警告。 - 更新了`scripts/windows/setVsDev.ps1`脚本,以支持最新的Visual Studio安装路径和架构设置。
- Loading branch information
Showing
10 changed files
with
111 additions
and
89 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#pragma once | ||
|
||
#include <QObject> | ||
|
||
class LogFile : public QObject | ||
{ | ||
Q_OBJECT | ||
public: | ||
explicit LogFile(QObject *parent = nullptr); | ||
~LogFile() override; | ||
|
||
public slots: | ||
void onWrite(const QString &msg); | ||
|
||
private slots: | ||
void onFlush(); | ||
|
||
private: | ||
auto rollFile(int count) -> bool; | ||
void setTimer(); | ||
|
||
class LogFilePrivate; | ||
QScopedPointer<LogFilePrivate> d_ptr; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.