2023-08-08 15:15:19 +08:00
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
#include <QObject>
|
|
|
|
|
#include <QList>
|
2023-08-13 12:16:22 +08:00
|
|
|
|
#include "sqlitehelper.h"
|
2023-08-08 15:15:19 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class ExitManager : public QObject
|
|
|
|
|
{
|
|
|
|
|
Q_OBJECT
|
|
|
|
|
public:
|
2023-08-13 17:00:01 +08:00
|
|
|
|
|
2023-08-08 15:15:19 +08:00
|
|
|
|
// <20>˳<EFBFBD>Ӧ<EFBFBD>ó<EFBFBD><C3B3><EFBFBD>
|
|
|
|
|
void exit(int exitCode = 0)
|
|
|
|
|
{
|
2023-08-13 12:16:22 +08:00
|
|
|
|
SQLiteHelper sqlite_helper;
|
|
|
|
|
sqlite_helper.db.close();
|
|
|
|
|
QSqlDatabase::removeDatabase("mydb");
|
2023-08-08 15:15:19 +08:00
|
|
|
|
// <20><><EFBFBD><EFBFBD><EFBFBD>˳<EFBFBD>Ӧ<EFBFBD>ó<EFBFBD><C3B3><EFBFBD><EFBFBD>ź<EFBFBD>
|
2023-08-13 17:00:01 +08:00
|
|
|
|
::exit(exitCode);
|
2023-08-08 15:15:19 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
};
|