piintrospector/containers_view.cpp
This commit is contained in:
@@ -158,19 +158,19 @@ Qt::ItemFlags ContainersModel::flags(const QModelIndex & index) const {
|
|||||||
|
|
||||||
|
|
||||||
//bool cmp(const PIIntrospectionContainers::TypeInfo & a, const PIIntrospectionContainers::TypeInfo & b);
|
//bool cmp(const PIIntrospectionContainers::TypeInfo & a, const PIIntrospectionContainers::TypeInfo & b);
|
||||||
#if PIP_VERSION > PIP_MAKE_VERSION(2,34,1)
|
#if PIP_VERSION >= PIP_MAKE_VERSION(2,35,0)
|
||||||
bool cmp_func_name_a(const PIIntrospectionContainers::TypeInfo & t0, const PIIntrospectionContainers::TypeInfo & t1) {
|
bool cmp_func_name_a(const PIIntrospectionContainers::TypeInfo & t0, const PIIntrospectionContainers::TypeInfo & t1) {
|
||||||
return QString::localeAwareCompare(PI2QString(t0.name), PI2QString(t1.name)) > 0;
|
return QString::localeAwareCompare(PI2QString(t0.name), PI2QString(t1.name)) < 0;
|
||||||
}
|
}
|
||||||
bool cmp_func_name_d(const PIIntrospectionContainers::TypeInfo & t0, const PIIntrospectionContainers::TypeInfo & t1) {
|
bool cmp_func_name_d(const PIIntrospectionContainers::TypeInfo & t0, const PIIntrospectionContainers::TypeInfo & t1) {
|
||||||
return -cmp_func_name_a(t0, t1);
|
return !cmp_func_name_a(t0, t1);
|
||||||
}
|
}
|
||||||
# define CMP_FUNC(field) \
|
# define CMP_FUNC(field) \
|
||||||
bool cmp_func_##field##_a(const PIIntrospectionContainers::TypeInfo & t0, const PIIntrospectionContainers::TypeInfo & t1) { \
|
bool cmp_func_##field##_a(const PIIntrospectionContainers::TypeInfo & t0, const PIIntrospectionContainers::TypeInfo & t1) { \
|
||||||
return t0.field < t1.field; \
|
return t0.field < t1.field; \
|
||||||
} \
|
} \
|
||||||
bool cmp_func_##field##_d(const PIIntrospectionContainers::TypeInfo & t0, const PIIntrospectionContainers::TypeInfo & t1) { \
|
bool cmp_func_##field##_d(const PIIntrospectionContainers::TypeInfo & t0, const PIIntrospectionContainers::TypeInfo & t1) { \
|
||||||
return -cmp_func_##field##_a(t0, t1); \
|
return t0.field > t1.field; \
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
int cmp_func_name_a(const PIIntrospectionContainers::TypeInfo * t0, const PIIntrospectionContainers::TypeInfo * t1) {
|
int cmp_func_name_a(const PIIntrospectionContainers::TypeInfo * t0, const PIIntrospectionContainers::TypeInfo * t1) {
|
||||||
|
|||||||
Reference in New Issue
Block a user