fix Qt Database error message when close the app
This commit is contained in:
@@ -200,15 +200,12 @@ Log::~Log()
|
|||||||
myConfig = 0;
|
myConfig = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Log::closeLogDb()
|
void Log::closeLogDbAtExit()
|
||||||
{
|
{
|
||||||
// Datenbank schließen
|
// Datenbank schließen
|
||||||
mySqliteLogDb->close();
|
mySqliteLogDb->close();
|
||||||
*mySqliteLogDb = QSqlDatabase();
|
delete mySqliteLogDb;
|
||||||
if(mySqliteLogDb->isOpen())
|
mySqliteLogDb = NULL;
|
||||||
return FALSE;
|
|
||||||
else
|
|
||||||
return TRUE;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ public:
|
|||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
|
|
||||||
bool closeLogDb();
|
void closeLogDbAtExit();
|
||||||
void logPlayerActionMsg(QString playerName, int playerID, int action, int setValue);
|
void logPlayerActionMsg(QString playerName, int playerID, int action, int setValue);
|
||||||
void logNewGameHandMsg(int gameID, int handID);
|
void logNewGameHandMsg(int gameID, int handID);
|
||||||
void logNewBlindsSetsMsg(int sbSet, int bbSet, QString sbName, QString bbName);
|
void logNewBlindsSetsMsg(int sbSet, int bbSet, QString sbName, QString bbName);
|
||||||
|
|||||||
@@ -941,10 +941,9 @@ QString startWindowImpl::checkForFirstStartAfterUpdated()
|
|||||||
|
|
||||||
bool startWindowImpl::eventFilter(QObject *obj, QEvent *event)
|
bool startWindowImpl::eventFilter(QObject *obj, QEvent *event)
|
||||||
{
|
{
|
||||||
|
|
||||||
if (event->type() == QEvent::Close) {
|
if (event->type() == QEvent::Close) {
|
||||||
event->ignore();
|
event->ignore();
|
||||||
myGuiInterface->getMyLog()->closeLogDb();
|
myGuiInterface->getMyLog()->closeLogDbAtExit();
|
||||||
return QMainWindow::eventFilter(obj, event);
|
return QMainWindow::eventFilter(obj, event);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|||||||
Reference in New Issue
Block a user