# HG changeset patch
# User sheepluva
# Date 1492892629 -7200
# Node ID d3a52e51efd42781b2bd538a60193146818cf13e
# Parent  95cd64676f73671247471888a6b24eaeb2f390ab
fix campaign missions not showing up for me

diff -r 95cd64676f73 -r d3a52e51efd4 QTfrontend/campaign.cpp
--- a/QTfrontend/campaign.cpp	Sat Apr 22 20:37:51 2017 +0200
+++ b/QTfrontend/campaign.cpp	Sat Apr 22 22:23:49 2017 +0200
@@ -107,11 +107,10 @@
 }
 
 /** Returns the localized campaign name */
-QString getRealCampName(QString & campaignName)
+QString getRealCampName(const QString & campaignName)
 {
-    QString campaignNameOrig = campaignName;
-    QString campaignNameSpaces = campaignName.replace(QString("_"), QString(" "));
-    return getCampMetaInfo()->value(campaignNameOrig+".name", campaignNameSpaces).toString();
+    QString campaignNameSpaces = QString(campaignName).replace(QString("_"), QString(" "));
+    return getCampMetaInfo()->value(campaignName+".name", campaignNameSpaces).toString();
 }
 
 QList<MissionInfo> getCampMissionList(QString & campaignName, QString & teamName)
diff -r 95cd64676f73 -r d3a52e51efd4 QTfrontend/campaign.h
--- a/QTfrontend/campaign.h	Sat Apr 22 20:37:51 2017 +0200
+++ b/QTfrontend/campaign.h	Sat Apr 22 22:23:49 2017 +0200
@@ -37,7 +37,7 @@
 QSettings* getCampMetaInfo();
 bool isCampWon(QString & campaignName, QString & teamName);
 bool isMissionWon(QString & campaignName, int missionInList, QString & teamName);
-QString getRealCampName(QString & campaignName);
+QString getRealCampName(const QString & campaignName);
 QList<MissionInfo> getCampMissionList(QString & campaignName, QString & teamName);
 
 #endif
diff -r 95cd64676f73 -r d3a52e51efd4 QTfrontend/hwform.cpp
--- a/QTfrontend/hwform.cpp	Sat Apr 22 20:37:51 2017 +0200
+++ b/QTfrontend/hwform.cpp	Sat Apr 22 22:23:49 2017 +0200
@@ -1911,7 +1911,7 @@
 
     for(unsigned int i = 0; i < n; i++)
     {
-        QString campaignName = QString(entries[i]);
+        const QString & campaignName = entries[i];
         QString tName = team.name();
         ui.pageCampaign->CBCampaign->addItem(getRealCampName(campaignName), campaignName);
     }