qt4 sorting part compile error fixed
This commit is contained in:
parent
adda96c3ef
commit
c9d71e5e2c
1 changed files with 4 additions and 0 deletions
|
@ -161,7 +161,11 @@ void ProfileInterface::insertSnapmaticIPI(QWidget *widget)
|
||||||
QString widgetKey = widgets[proWidget];
|
QString widgetKey = widgets[proWidget];
|
||||||
QStringList widgetsKeyList = widgets.values();
|
QStringList widgetsKeyList = widgets.values();
|
||||||
QStringList pictureKeyList = widgetsKeyList.filter("PIC", Qt::CaseSensitive);
|
QStringList pictureKeyList = widgetsKeyList.filter("PIC", Qt::CaseSensitive);
|
||||||
|
#if QT_VERSION >= 0x050000
|
||||||
qSort(pictureKeyList.rbegin(), pictureKeyList.rend());
|
qSort(pictureKeyList.rbegin(), pictureKeyList.rend());
|
||||||
|
#else
|
||||||
|
qSort(pictureKeyList.begin(), pictureKeyList.end(), qGreater<QString>());
|
||||||
|
#endif
|
||||||
int picIndex = pictureKeyList.indexOf(QRegExp(widgetKey));
|
int picIndex = pictureKeyList.indexOf(QRegExp(widgetKey));
|
||||||
ui->vlSnapmatic->insertWidget(picIndex, proWidget);
|
ui->vlSnapmatic->insertWidget(picIndex, proWidget);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue