Use physfs here too flibqtfrontend
authorunc0rr
Tue, 18 Dec 2012 20:48:37 +0400
branchflibqtfrontend
changeset 8306 50fe80adbfcb
parent 8304 620560c89284
child 8363 0b4ac686fc44
Use physfs here too
QTfrontend/game.cpp
--- a/QTfrontend/game.cpp	Sun Dec 16 12:25:13 2012 +0400
+++ b/QTfrontend/game.cpp	Tue Dec 18 20:48:37 2012 +0400
@@ -409,7 +409,7 @@
 void HWGame::sendCampaignVar(const QByteArray &varToSend)
 {
     QString varToFind(varToSend);
-    QSettings teamfile(cfgdir->absolutePath() + "/Teams/" + campaignTeam + ".hwt", QSettings::IniFormat, 0);
+    QSettings teamfile("/Teams/" + campaignTeam + ".hwt", QSettings::IniFormat, 0);
     teamfile.setIniCodec("UTF-8");
     QString varValue = teamfile.value("Campaign " + campaign + "/" + varToFind, "").toString();
     QByteArray command;
@@ -426,7 +426,7 @@
     QString varToWrite = QString::fromUtf8(varVal.left(i));
     QString varValue = QString::fromUtf8(varVal.mid(i + 1));
 
-    QSettings teamfile(cfgdir->absolutePath() + "/Teams/" + campaignTeam + ".hwt", QSettings::IniFormat, 0);
+    QSettings teamfile("/Teams/" + campaignTeam + ".hwt", QSettings::IniFormat, 0);
     teamfile.setIniCodec("UTF-8");
     teamfile.setValue("Campaign " + campaign + "/" + varToWrite, varValue);
 }