some bugfixes in Log and guiLog

This commit is contained in:
floty
2010-12-18 23:10:10 +00:00
parent 4f89969bd3
commit 0e46188ff3
11 changed files with 78 additions and 29 deletions
+1 -1
View File
@@ -37,7 +37,7 @@ public:
void setSession(boost::shared_ptr<Session> session);
gameTableImpl* getMyW() const {return NULL;}
guiLog* getMyLog() const {return NULL;}
guiLog* getMyGuiLog() const {return NULL;}
void refreshSet() const;
void refreshCash() const;
+1 -2
View File
@@ -28,7 +28,6 @@
#include <boost/shared_ptr.hpp>
class guiLog;
class Log;
class Session;
class gameTableImpl;
@@ -42,7 +41,7 @@ public:
virtual void setSession(boost::shared_ptr<Session> session) =0;
virtual gameTableImpl *getMyW() const=0;
virtual guiLog* getMyLog() const=0;
virtual guiLog* getMyGuiLog() const=0;
//refresh-Funktionen
-15
View File
@@ -126,21 +126,6 @@ guiLog::~guiLog()
{
delete myLogDir;
delete myHtmlLogFile;
if(SQLITE_LOG) {
sqlite3_close(mySqliteLogDb);
// delete mySqliteLogDb;
}
}
void guiLog::closeLogDbAtExit()
{
if(SQLITE_LOG) {
// close sqlite-db
sqlite3_close(mySqliteLogDb);
// delete mySqliteLogDb;
mySqliteLogDb = NULL;
}
}
+1 -2
View File
@@ -44,8 +44,7 @@ public:
public slots:
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 logNewBlindsSetsMsg(int sbSet, int bbSet, QString sbName, QString bbName);
void logPlayerWinsMsg(QString playerName, int pot, bool main);
+1 -3
View File
@@ -21,7 +21,6 @@
#include "guiwrapper.h"
#include "session.h"
#include "guilog.h"
#include "log.h"
#include "gametableimpl.h"
#include "startwindowimpl.h"
#include "configfile.h"
@@ -31,13 +30,12 @@
using namespace std;
GuiWrapper::GuiWrapper(ConfigFile *c, startWindowImpl *s) : myGuiLog(NULL), myLog(NULL), myW(NULL), myConfig(c), myStartWindow(s)
GuiWrapper::GuiWrapper(ConfigFile *c, startWindowImpl *s) : myGuiLog(NULL), myW(NULL), myConfig(c), myStartWindow(s)
{
myW = new gameTableImpl(myConfig);
myGuiLog = new guiLog(myW, myConfig);
myLog = new Log(myConfig);
myW->setStartWindow(myStartWindow);
}
+1 -3
View File
@@ -28,7 +28,6 @@ class Session;
class gameTableImpl;
class startWindowImpl;
class guiLog;
class Log;
class ConfigFile;
@@ -45,7 +44,7 @@ public:
void setSession(boost::shared_ptr<Session> session);
gameTableImpl* getMyW() const { return myW; }
guiLog* getMyLog() const { return myGuiLog; }
guiLog* getMyGuiLog() const { return myGuiLog; }
void refreshSet() const;
void refreshCash() const;
@@ -169,7 +168,6 @@ public:
private:
guiLog *myGuiLog;
Log *myLog;
gameTableImpl *myW;
ConfigFile *myConfig;
startWindowImpl *myStartWindow;
+1 -2
View File
@@ -26,7 +26,6 @@
#include <net/socket_msg.h>
#include "tools.h"
#include "guilog.h"
#include "session.h"
#include "game.h"
#include "guiwrapper.h"
@@ -988,7 +987,7 @@ bool startWindowImpl::eventFilter(QObject *obj, QEvent *event)
{
if (event->type() == QEvent::Close) {
event->ignore();
myGuiInterface->getMyLog()->closeLogDbAtExit();
// mySession->getMyLog()->closeLogDbAtExit();
return QMainWindow::eventFilter(obj, event);
}
else {