Fixed utf-8 bug in server profiles.
This commit is contained in:
@@ -83,7 +83,7 @@ void joinNetworkGameDialogImpl::exec() {
|
|||||||
TiXmlElement * profiles = new TiXmlElement( "ServerProfiles" );
|
TiXmlElement * profiles = new TiXmlElement( "ServerProfiles" );
|
||||||
root->LinkEndChild( profiles );
|
root->LinkEndChild( profiles );
|
||||||
|
|
||||||
doc.SaveFile( myServerProfilesFile );
|
doc.SaveFile(QString::fromUtf8(myServerProfilesFile.c_str()).toStdString());
|
||||||
}
|
}
|
||||||
|
|
||||||
//Liste Füllen
|
//Liste Füllen
|
||||||
@@ -143,7 +143,7 @@ void joinNetworkGameDialogImpl::itemFillForm (QTreeWidgetItem* item, int column)
|
|||||||
|
|
||||||
bool toIntTrue;
|
bool toIntTrue;
|
||||||
|
|
||||||
TiXmlDocument doc(myServerProfilesFile);
|
TiXmlDocument doc(QString::fromUtf8(myServerProfilesFile.c_str()).toStdString());
|
||||||
if(!doc.LoadFile()) {
|
if(!doc.LoadFile()) {
|
||||||
QMessageBox::warning(this, tr("Load Server-Profile-File Error"),
|
QMessageBox::warning(this, tr("Load Server-Profile-File Error"),
|
||||||
tr("Could not load server-profiles-file:\n"+QString::fromUtf8(myServerProfilesFile.c_str()).toAscii()),
|
tr("Could not load server-profiles-file:\n"+QString::fromUtf8(myServerProfilesFile.c_str()).toAscii()),
|
||||||
@@ -169,7 +169,7 @@ void joinNetworkGameDialogImpl::saveServerProfile() {
|
|||||||
|
|
||||||
// bool toIntTrue;
|
// bool toIntTrue;
|
||||||
|
|
||||||
TiXmlDocument doc(myServerProfilesFile);
|
TiXmlDocument doc(QString::fromUtf8(myServerProfilesFile.c_str()).toStdString());
|
||||||
if(!doc.LoadFile()) {
|
if(!doc.LoadFile()) {
|
||||||
QMessageBox::warning(this, tr("Load Server-Profile-File Error"),
|
QMessageBox::warning(this, tr("Load Server-Profile-File Error"),
|
||||||
tr("Could not load server-profiles-file:\n"+QString::fromUtf8(myServerProfilesFile.c_str()).toAscii()),
|
tr("Could not load server-profiles-file:\n"+QString::fromUtf8(myServerProfilesFile.c_str()).toAscii()),
|
||||||
@@ -236,7 +236,7 @@ void joinNetworkGameDialogImpl::saveServerProfile() {
|
|||||||
|
|
||||||
void joinNetworkGameDialogImpl::deleteServerProfile() {
|
void joinNetworkGameDialogImpl::deleteServerProfile() {
|
||||||
|
|
||||||
TiXmlDocument doc(myServerProfilesFile);
|
TiXmlDocument doc(QString::fromUtf8(myServerProfilesFile.c_str()).toStdString());
|
||||||
if(!doc.LoadFile()) {
|
if(!doc.LoadFile()) {
|
||||||
QMessageBox::warning(this, tr("Load Server-Profile-File Error"),
|
QMessageBox::warning(this, tr("Load Server-Profile-File Error"),
|
||||||
tr("Could not load server-profiles-file:\n"+QString::fromUtf8(myServerProfilesFile.c_str()).toAscii()),
|
tr("Could not load server-profiles-file:\n"+QString::fromUtf8(myServerProfilesFile.c_str()).toAscii()),
|
||||||
|
|||||||
Reference in New Issue
Block a user