equal
deleted
inserted
replaced
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 |