Revert 5f34d3341fc1 and 28d5cebdf660, fix 9b789de8e5df instead 0.9.21
authorunc0rr
Fri, 02 Jan 2015 00:14:49 +0300
branch0.9.21
changeset 10733 b22c57f45e86
parent 10731 bc359abe0484
child 10735 42af3bfc832c
Revert 5f34d3341fc1 and 28d5cebdf660, fix 9b789de8e5df instead
QTfrontend/hwform.cpp
QTfrontend/model/ammoSchemeModel.cpp
QTfrontend/model/ammoSchemeModel.h
QTfrontend/net/newnetclient.h
--- a/QTfrontend/hwform.cpp	Thu Jan 01 12:41:28 2015 -0500
+++ b/QTfrontend/hwform.cpp	Fri Jan 02 00:14:49 2015 +0300
@@ -1832,14 +1832,14 @@
     if (hwnet)
     {
         NetAmmoSchemeModel * netAmmo = new NetAmmoSchemeModel(hwnet);
-        connect(hwnet, SIGNAL(netSchemeConfig(QStringList &)), netAmmo, SLOT(setNetSchemeConfig(QStringList &)));
+        connect(hwnet, SIGNAL(netSchemeConfig(QStringList)), netAmmo, SLOT(setNetSchemeConfig(QStringList)));
 
         ui.pageNetGame->pGameCFG->GameSchemes->setModel(netAmmo);
 
         ui.pageNetGame->setRoomName(hwnet->getRoom());
 
         ui.pageNetGame->pGameCFG->GameSchemes->view()->disconnect(hwnet);
-        connect(hwnet, SIGNAL(netSchemeConfig(QStringList &)),
+        connect(hwnet, SIGNAL(netSchemeConfig(QStringList)),
                 this, SLOT(selectFirstNetScheme()));
     }
 
--- a/QTfrontend/model/ammoSchemeModel.cpp	Thu Jan 01 12:41:28 2015 -0500
+++ b/QTfrontend/model/ammoSchemeModel.cpp	Fri Jan 02 00:14:49 2015 +0300
@@ -845,18 +845,15 @@
     return netScheme[index.column()];
 }
 
-void NetAmmoSchemeModel::setNetSchemeConfig(QStringList & cfg)
+void NetAmmoSchemeModel::setNetSchemeConfig(QStringList cfg)
 {
     if(cfg.size() != netScheme.size())
     {
         qWarning("Incorrect scheme cfg size");
         return;
     }
-    
-    if (cfg[42].at(0)=='!')
-        cfg[42] = cfg[42].mid(1);
-    else
-        qDebug() <<  "Script param didn't start with !: " << cfg[42];
+
+    cfg[42] = cfg[42].mid(1);
 
     for(int i = 0; i < cfg.size(); ++i)
         netScheme[i] = QVariant(cfg[i]);
--- a/QTfrontend/model/ammoSchemeModel.h	Thu Jan 01 12:41:28 2015 -0500
+++ b/QTfrontend/model/ammoSchemeModel.h	Fri Jan 02 00:14:49 2015 +0300
@@ -70,7 +70,7 @@
         QVariant data(const QModelIndex &index, int role) const;
 
     public slots:
-        void setNetSchemeConfig(QStringList & cfg);
+        void setNetSchemeConfig(QStringList cfg);
 
     private:
         QList<QVariant> netScheme;
--- a/QTfrontend/net/newnetclient.h	Thu Jan 01 12:41:28 2015 -0500
+++ b/QTfrontend/net/newnetclient.h	Fri Jan 02 00:14:49 2015 +0300
@@ -111,7 +111,7 @@
         void roomNameUpdated(const QString & name);
         void askForRoomPassword();
 
-        void netSchemeConfig(QStringList &);
+        void netSchemeConfig(QStringList);
         void paramChanged(const QString & param, const QStringList & value);
         void configAsked();