remove configfile and exit(0)
This commit is contained in:
@@ -744,3 +744,7 @@ void ConfigFile::writeConfigStringList(string varName, list<string> varCont)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ConfigFile::deleteConfigFile()
|
||||||
|
{
|
||||||
|
remove(configFileName.c_str());
|
||||||
|
}
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ public:
|
|||||||
std::list<int> readConfigIntList(std::string varName) const;
|
std::list<int> readConfigIntList(std::string varName) const;
|
||||||
void writeConfigInt(std::string varName, int varCont);
|
void writeConfigInt(std::string varName, int varCont);
|
||||||
void writeConfigIntList(std::string varName, std::list<int> varCont);
|
void writeConfigIntList(std::string varName, std::list<int> varCont);
|
||||||
|
void deleteConfigFile();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
|
|||||||
@@ -1376,6 +1376,8 @@ void settingsDialogImpl::resetSettings()
|
|||||||
QMessageBox::Yes | QMessageBox::No);
|
QMessageBox::Yes | QMessageBox::No);
|
||||||
if(ret == QMessageBox::Yes)
|
if(ret == QMessageBox::Yes)
|
||||||
{
|
{
|
||||||
//TODO delete config.xml and directly close PokerTH
|
myConfig->deleteConfigFile();
|
||||||
|
exit(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user