明面上没bug了

This commit is contained in:
2026-08-02 00:06:33 +08:00
parent 6ea03829bc
commit 8b63f1f564
9 changed files with 50 additions and 30 deletions
+10
View File
@@ -5,6 +5,7 @@
#include <QTimer>
#include <QKeyEvent>
#include <QThread>
#include <cstdint>
#include <map>
class Back_End : public QObject {
@@ -25,6 +26,13 @@ public:
QString get_screenshot_save_file_name();
QString get_audio_file_location();
void stop_mock_thread() {
++mock_generation;
if (mock_timer) {
mock_timer->stop();
mock_timer->disconnect(this);
mock_timer->deleteLater();
mock_timer = nullptr;
}
if (mock_thread) {
mock_thread->quit();
mock_thread->wait();
@@ -39,6 +47,8 @@ protected:
~Back_End() override {
stop_mock_thread();
}
QTimer* mock_timer{};
std::uint64_t mock_generation{};
QThread* mock_thread{};
};