Implemented dependency solving for db schemas creation. Added macro for

begin/end iterator.
This commit is contained in:
2015-11-15 22:26:50 +01:00
parent d4da3cb6cf
commit 07bb708437
10 changed files with 89 additions and 25 deletions
+2 -1
View File
@@ -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 {