session refactoring
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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(); }
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user