utf8 windows test
This commit is contained in:
@@ -43,11 +43,21 @@ void CardDeckStyleReader::readStyleFile(QString file) {
|
|||||||
//if style file failed --> default style fallback
|
//if style file failed --> default style fallback
|
||||||
if(QFile(file).exists()) {
|
if(QFile(file).exists()) {
|
||||||
currentFileName = QFile(file).fileName();
|
currentFileName = QFile(file).fileName();
|
||||||
|
#ifdef _WIN32
|
||||||
|
tinyFileName = currentFileName.toStdString();
|
||||||
|
#else
|
||||||
tinyFileName = currentFileName.toUtf8().constData();
|
tinyFileName = currentFileName.toUtf8().constData();
|
||||||
|
#endif
|
||||||
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
currentFileName = QFile(QString::fromUtf8(myConfig->readConfigString("AppDataDir").c_str())+"gfx/cards/default/defaultdeckstyle.xml").fileName();
|
currentFileName = QFile(QString::fromUtf8(myConfig->readConfigString("AppDataDir").c_str())+"gfx/cards/default/defaultdeckstyle.xml").fileName();
|
||||||
|
#ifdef _WIN32
|
||||||
|
tinyFileName = currentFileName.toStdString();
|
||||||
|
#else
|
||||||
tinyFileName = currentFileName.toUtf8().constData();
|
tinyFileName = currentFileName.toUtf8().constData();
|
||||||
|
#endif
|
||||||
|
|
||||||
fallBack = 1;
|
fallBack = 1;
|
||||||
}
|
}
|
||||||
QFileInfo info(currentFileName);
|
QFileInfo info(currentFileName);
|
||||||
|
|||||||
@@ -81,11 +81,21 @@ void GameTableStyleReader::readStyleFile(QString file) {
|
|||||||
//if style file failed --> default style fallback
|
//if style file failed --> default style fallback
|
||||||
if(QFile(file).exists()) {
|
if(QFile(file).exists()) {
|
||||||
currentFileName = QFile(file).fileName();
|
currentFileName = QFile(file).fileName();
|
||||||
|
#ifdef _WIN32
|
||||||
|
tinyFileName = currentFileName.toStdString();
|
||||||
|
#else
|
||||||
tinyFileName = currentFileName.toUtf8().constData();
|
tinyFileName = currentFileName.toUtf8().constData();
|
||||||
|
#endif
|
||||||
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
currentFileName = QFile(QString::fromUtf8(myConfig->readConfigString("AppDataDir").c_str())+"gfx/gui/table/default/defaulttablestyle.xml").fileName();
|
currentFileName = QFile(QString::fromUtf8(myConfig->readConfigString("AppDataDir").c_str())+"gfx/gui/table/default/defaulttablestyle.xml").fileName();
|
||||||
|
#ifdef _WIN32
|
||||||
|
tinyFileName = currentFileName.toStdString();
|
||||||
|
#else
|
||||||
tinyFileName = currentFileName.toUtf8().constData();
|
tinyFileName = currentFileName.toUtf8().constData();
|
||||||
|
#endif
|
||||||
|
|
||||||
fallBack = 1;
|
fallBack = 1;
|
||||||
}
|
}
|
||||||
QFileInfo info(currentFileName);
|
QFileInfo info(currentFileName);
|
||||||
|
|||||||
Reference in New Issue
Block a user