Use QDir::Files to read ammo schemes
authorWuzzy <Wuzzy2@mail.ru>
Thu, 12 Apr 2018 16:56:06 +0200 (2018-04-12)
changeset 13325 b024cf25bde1
parent 13324 78f097923bcb
child 13326 23ade5604f8d
Use QDir::Files to read ammo schemes
QTfrontend/ui/widget/selectWeapon.cpp
--- a/QTfrontend/ui/widget/selectWeapon.cpp	Thu Apr 12 14:52:47 2018 +0200
+++ b/QTfrontend/ui/widget/selectWeapon.cpp	Thu Apr 12 16:56:06 2018 +0200
@@ -123,12 +123,10 @@
         }
         qDebug("%d weapon scheme(s) imported.", imported);
     } else {
-        QStringList schemes = QDir(cfgdir->absolutePath() + "/Schemes/Ammo").entryList();
+        QStringList schemes = QDir(cfgdir->absolutePath() + "/Schemes/Ammo").entryList(QDir::Files);
 
         for(int i = 0; i < schemes.size(); i++)
         {
-            if (schemes[i] == "." || schemes[i] == "..") continue;
-
             QFile file(cfgdir->absolutePath() + "/Schemes/Ammo/" + schemes[i]);
             QString config;
             if (file.open(QIODevice::ReadOnly)) {