QTfrontend/game.cpp
changeset 13318 93780a3b846a
parent 13316 574d34577ee9
child 13394 24b531dcebe7
child 13633 d5e029b84e16
equal deleted inserted replaced
13317:092adcf707c5 13318:93780a3b846a
   138 }
   138 }
   139 
   139 
   140 void HWGame::SendQuickConfig()
   140 void HWGame::SendQuickConfig()
   141 {
   141 {
   142     QByteArray teamscfg;
   142     QByteArray teamscfg;
   143     ThemeModel * themeModel = DataManager::instance().themeModel();
   143     QAbstractItemModel * themeModel = DataManager::instance().themeModel()->withoutHidden();
   144 
   144 
   145     HWProto::addStringToBuffer(teamscfg, "TL");
   145     HWProto::addStringToBuffer(teamscfg, "TL");
   146     HWProto::addStringToBuffer(teamscfg, QString("etheme %1")
   146     HWProto::addStringToBuffer(teamscfg, QString("etheme %1")
   147                                .arg((themeModel->rowCount() > 0) ? themeModel->index(rand() % themeModel->rowCount()).data(ThemeModel::ActualNameRole).toString() : "Nature"));
   147                                .arg((themeModel->rowCount() > 0) ? themeModel->index(rand() % themeModel->rowCount(), 0).data(ThemeModel::ActualNameRole).toString() : "Nature"));
   148     HWProto::addStringToBuffer(teamscfg, "eseed " + QUuid::createUuid().toString());
   148     HWProto::addStringToBuffer(teamscfg, "eseed " + QUuid::createUuid().toString());
   149 
   149 
   150     HWProto::addStringToBuffer(teamscfg, "e$template_filter 2");
   150     HWProto::addStringToBuffer(teamscfg, "e$template_filter 2");
   151     HWProto::addStringToBuffer(teamscfg, "e$feature_size "+QString::number(rand()%18+4));
   151     HWProto::addStringToBuffer(teamscfg, "e$feature_size "+QString::number(rand()%18+4));
   152 
   152