QTfrontend/game.cpp
changeset 5289 9d18b61bd3eb
parent 5213 a86768368309
child 5772 c09c50efe8b5
--- a/QTfrontend/game.cpp	Wed Jun 22 01:04:38 2011 +0200
+++ b/QTfrontend/game.cpp	Thu Jun 23 21:12:27 2011 +0400
@@ -20,6 +20,7 @@
 #include <QByteArray>
 #include <QUuid>
 #include <QColor>
+#include <QStringListModel>
 
 #include "game.h"
 #include "hwconsts.h"
@@ -110,7 +111,7 @@
 
     HWProto::addStringToBuffer(teamscfg, "TL");
     HWProto::addStringToBuffer(teamscfg, QString("etheme %1")
-            .arg((Themes->size() > 0) ? Themes->at(rand() % Themes->size()) : "steel"));
+            .arg((themesModel->rowCount() > 0) ? themesModel->index(rand() % themesModel->rowCount()).data().toString() : "steel"));
     HWProto::addStringToBuffer(teamscfg, "eseed " + QUuid::createUuid().toString());
 
     HWNamegen namegen;