OfficeAssistant_Win10/OfficeAssistant_msvc/exitmanager.h

24 lines
358 B
C
Raw Normal View History

#pragma once
#include <QObject>
#include <QList>
2023-08-13 12:16:22 +08:00
#include "sqlitehelper.h"
class ExitManager : public QObject
{
Q_OBJECT
public:
2023-08-13 17:00:01 +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");
// <20><><EFBFBD><EFBFBD><EFBFBD>˳<EFBFBD>Ӧ<EFBFBD>ó<EFBFBD><C3B3><EFBFBD><EFBFBD>ź<EFBFBD>
2023-08-13 17:00:01 +08:00
::exit(exitCode);
}
};