Fixed server profile file names for utf-8 support.
This commit is contained in:
@@ -56,7 +56,7 @@ joinNetworkGameDialogImpl::joinNetworkGameDialogImpl(QWidget *parent)
|
|||||||
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
|
||||||
@@ -86,7 +86,7 @@ void joinNetworkGameDialogImpl::fillServerProfileList() {
|
|||||||
|
|
||||||
treeWidget->clear();
|
treeWidget->clear();
|
||||||
|
|
||||||
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