fixing many destruktors
This commit is contained in:
@@ -518,8 +518,6 @@ gameTableImpl::gameTableImpl(ConfigFile *c, QMainWindow *parent)
|
|||||||
|
|
||||||
gameTableImpl::~gameTableImpl() {
|
gameTableImpl::~gameTableImpl() {
|
||||||
|
|
||||||
delete myConfig;
|
|
||||||
myConfig = 0;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -197,13 +197,10 @@ Log::Log(gameTableImpl* w, ConfigFile *c) : myW(w), myConfig(c), myLogDir(0), my
|
|||||||
|
|
||||||
Log::~Log()
|
Log::~Log()
|
||||||
{
|
{
|
||||||
cerr << "log destruktor";
|
|
||||||
delete myConfig;
|
|
||||||
delete myLogDir;
|
delete myLogDir;
|
||||||
delete myHtmlLogFile;
|
delete myHtmlLogFile;
|
||||||
delete mySqliteLogDb;
|
delete mySqliteLogDb;
|
||||||
|
|
||||||
myConfig = 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Log::closeLogDbAtExit()
|
void Log::closeLogDbAtExit()
|
||||||
|
|||||||
@@ -127,6 +127,10 @@ settingsDialogImpl::settingsDialogImpl(QWidget *parent, ConfigFile *c, selectAva
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
settingsDialogImpl::~settingsDialogImpl()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
void settingsDialogImpl::prepareDialog()
|
void settingsDialogImpl::prepareDialog()
|
||||||
{
|
{
|
||||||
playerNickIsChanged = FALSE;
|
playerNickIsChanged = FALSE;
|
||||||
|
|||||||
@@ -41,6 +41,8 @@ Q_OBJECT
|
|||||||
public:
|
public:
|
||||||
settingsDialogImpl(QWidget *parent = 0, ConfigFile *c = 0, selectAvatarDialogImpl *s = 0);
|
settingsDialogImpl(QWidget *parent = 0, ConfigFile *c = 0, selectAvatarDialogImpl *s = 0);
|
||||||
|
|
||||||
|
~settingsDialogImpl();
|
||||||
|
|
||||||
void prepareDialog();
|
void prepareDialog();
|
||||||
void exec();
|
void exec();
|
||||||
|
|
||||||
@@ -117,7 +119,7 @@ private:
|
|||||||
std::list<std::string> myCardDeckStylesList;
|
std::list<std::string> myCardDeckStylesList;
|
||||||
|
|
||||||
ConfigFile* myConfig;
|
ConfigFile* myConfig;
|
||||||
boost::shared_ptr<selectAvatarDialogImpl> mySelectAvatarDialogImpl;
|
selectAvatarDialogImpl *mySelectAvatarDialogImpl;
|
||||||
manualBlindsOrderDialogImpl *myManualBlindsOrderDialog;
|
manualBlindsOrderDialogImpl *myManualBlindsOrderDialog;
|
||||||
|
|
||||||
QString myAppDataPath;
|
QString myAppDataPath;
|
||||||
|
|||||||
@@ -22,8 +22,8 @@ using namespace std;
|
|||||||
SDLPlayer::SDLPlayer(ConfigFile *c)
|
SDLPlayer::SDLPlayer(ConfigFile *c)
|
||||||
: soundData(NULL), currentChannel(0) , audioEnabled(0), myConfig(c)
|
: soundData(NULL), currentChannel(0) , audioEnabled(0), myConfig(c)
|
||||||
{
|
{
|
||||||
SDL_Init(SDL_INIT_AUDIO);
|
SDL_Init(SDL_INIT_AUDIO);
|
||||||
initAudio();
|
initAudio();
|
||||||
|
|
||||||
myAppDataPath = QString::fromUtf8(myConfig->readConfigString("AppDataDir").c_str());
|
myAppDataPath = QString::fromUtf8(myConfig->readConfigString("AppDataDir").c_str());
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -176,19 +176,6 @@ startWindowImpl::startWindowImpl(ConfigFile *c)
|
|||||||
|
|
||||||
startWindowImpl::~startWindowImpl()
|
startWindowImpl::~startWindowImpl()
|
||||||
{
|
{
|
||||||
// delete myNewGameDialog;
|
|
||||||
// delete mySelectAvatarDialog;
|
|
||||||
// delete mySettingsDialog;
|
|
||||||
// delete myChangeHumanPlayerNameDialog;
|
|
||||||
// delete myJoinNetworkGameDialog;
|
|
||||||
// delete myConnectToServerDialog;
|
|
||||||
// delete myStartNetworkGameDialog;
|
|
||||||
// delete myCreateNetworkGameDialog;
|
|
||||||
// delete myAboutPokerthDialog;
|
|
||||||
// delete myGameLobbyDialog;
|
|
||||||
// delete myTimeoutDialog;
|
|
||||||
// delete myServerListDialog;
|
|
||||||
// delete myInternetGameLoginDialog;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void startWindowImpl::callNewGameDialog() {
|
void startWindowImpl::callNewGameDialog() {
|
||||||
|
|||||||
+4
-3
@@ -147,14 +147,15 @@ int main( int argc, char **argv )
|
|||||||
qRegisterMetaType<DenyGameInvitationReason>("DenyGameInvitationReason");
|
qRegisterMetaType<DenyGameInvitationReason>("DenyGameInvitationReason");
|
||||||
///////////////////////////////////////////////////
|
///////////////////////////////////////////////////
|
||||||
|
|
||||||
startWindowImpl *mainWin = new startWindowImpl(myConfig);
|
startWindowImpl mainWin(myConfig);
|
||||||
|
a.setActivationWindow(&mainWin, true);
|
||||||
a.setActivationWindow(mainWin, true);
|
|
||||||
|
|
||||||
int retVal = a.exec();
|
int retVal = a.exec();
|
||||||
|
|
||||||
curl_global_cleanup();
|
curl_global_cleanup();
|
||||||
socket_cleanup();
|
socket_cleanup();
|
||||||
|
|
||||||
|
|
||||||
return retVal;
|
return retVal;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -54,8 +54,6 @@ Session::~Session()
|
|||||||
{
|
{
|
||||||
terminateNetworkClient();
|
terminateNetworkClient();
|
||||||
terminateNetworkServer();
|
terminateNetworkServer();
|
||||||
delete myConfig;
|
|
||||||
myConfig = 0;
|
|
||||||
delete myQtToolsInterface;
|
delete myQtToolsInterface;
|
||||||
myQtToolsInterface = 0;
|
myQtToolsInterface = 0;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user