mirror of
https://github.com/overte-org/overte.git
synced 2025-04-21 17:24:08 +02:00
Few tweaks before PR
This commit is contained in:
parent
0c5b3b60b2
commit
cf20c448a3
1 changed files with 18 additions and 2 deletions
|
@ -54,7 +54,7 @@ static const QString propertiesIds[MODEL_METADATA_COUNT] = {
|
|||
DO_NOT_MODIFY_TAG,
|
||||
"Type",
|
||||
"Gender",
|
||||
"x-amz-request-id",
|
||||
"Creator",
|
||||
"Last-Modified"
|
||||
};
|
||||
|
||||
|
@ -97,7 +97,7 @@ void ModelsBrowser::applyFilter(const QString &filter) {
|
|||
for (int k = 0; k < filters.count(); ++k) {
|
||||
match = false;
|
||||
for (int j = 0; j < MODEL_METADATA_COUNT; ++j) {
|
||||
if (model->item(i, j)->text().contains(filters.at(k))) {
|
||||
if (model->item(i, j)->text().contains(filters.at(k), Qt::CaseInsensitive)) {
|
||||
match = true;
|
||||
break;
|
||||
}
|
||||
|
@ -359,6 +359,22 @@ bool ModelHandler::parseHeaders(QNetworkReply* reply) {
|
|||
_model.item(_model.indexFromItem(items.first()).row(), i)->setText(item);
|
||||
}
|
||||
}
|
||||
|
||||
// Rand properties for now (Will be taken out when we have real metadata on the server)
|
||||
if (_model.item(_model.indexFromItem(items.first()).row(), i)->text().isEmpty()) {
|
||||
if (i == CREATOR) {
|
||||
static QString creator[] = {"Ryan", "Philip", "Andzrej", "Phteven", "Brad"};
|
||||
_model.item(_model.indexFromItem(items.first()).row(), i)->setText(creator[randIntInRange(0, 4)]);
|
||||
} else if (i == TYPE) {
|
||||
static QString type[] = {"human", "beast", "pet", "elfe"};
|
||||
_model.item(_model.indexFromItem(items.first()).row(), i)->setText(type[randIntInRange(0, 3)]);
|
||||
} else if (i == GENDER) {
|
||||
static QString gender[] = {"male", "female", "none"};
|
||||
_model.item(_model.indexFromItem(items.first()).row(), i)->setText(gender[randIntInRange(0, 2)]);
|
||||
}
|
||||
}
|
||||
////////////////////////////////////////////////////////////
|
||||
|
||||
}
|
||||
_lock.unlock();
|
||||
|
||||
|
|
Loading…
Reference in a new issue