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