session refactoring

This commit is contained in:
doitux
2008-10-08 07:52:06 +00:00
parent de6228bb7d
commit 6bfd0b0dfb
3 changed files with 4 additions and 9 deletions
-2
View File
@@ -58,7 +58,6 @@ public:
~gameTableImpl();
boost::shared_ptr<Session> getSession();
// void setSession(boost::shared_ptr<Session> session);
void setStartWindow(startWindowImpl* s) { myStartWindow = s; }
void setLog(Log* l) { myLog = l; }
@@ -281,7 +280,6 @@ public slots:
private:
boost::shared_ptr<GuiInterface> myServerGuiInterface;
boost::shared_ptr<Session> mySession;
Log *myLog;
Chat *myChat;
ConfigFile *myConfig;
+1 -4
View File
@@ -47,10 +47,7 @@ GuiWrapper::~GuiWrapper()
void GuiWrapper::initGui(int speed) { myW->signalInitGui(speed); }
boost::shared_ptr<Session> GuiWrapper::getSession() { return myStartWindow->getSession(); }
void GuiWrapper::setSession(boost::shared_ptr<Session> session) {
myStartWindow->setSession(session);
}
void GuiWrapper::setSession(boost::shared_ptr<Session> session) { /*myStartWindow->setSession(session);*/ }
void GuiWrapper::refreshSet() const { myW->signalRefreshSet(); }
void GuiWrapper::refreshCash() const { myW->signalRefreshCash(); }
+3 -3
View File
@@ -56,9 +56,9 @@ startWindowImpl::startWindowImpl(ConfigFile *c)
myGuiInterface.reset(new GuiWrapper(myConfig, this));
{
boost::shared_ptr<Session> session(new Session(myGuiInterface.get(), myConfig));
session->init(); // TODO handle error
myGuiInterface->setSession(session);
mySession.reset(new Session(myGuiInterface.get(), myConfig));
mySession->init(); // TODO handle error
// myGuiInterface->setSession(session);
}