Implemented dependency solving for db schemas creation. Added macro for
begin/end iterator.
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
#include <QMetaProperty>
|
||||
#include <QModelIndex>
|
||||
|
||||
#include "define.h"
|
||||
#include "core_global.h"
|
||||
|
||||
template<class T>
|
||||
@@ -94,7 +95,7 @@ public:
|
||||
QObject *rawEntity = (QObject*)m_list.at(0).data();
|
||||
const char *prop = rawEntity->metaObject()->property(column + 1).name();
|
||||
|
||||
std::sort(m_list.begin(), m_list.end(), [prop, order](QSharedPointer<T> entA, QSharedPointer<T> entB) -> bool {
|
||||
std::sort(ALL(m_list), [prop, order](QSharedPointer<T> entA, QSharedPointer<T> entB) -> bool {
|
||||
if (order == Qt::AscendingOrder) {
|
||||
return ((QObject*)entA.data())->property(prop) < ((QObject*)entB.data())->property(prop);
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user