macro guard for checking std::initializer_list
This commit is contained in:
parent
1f1cd29fc2
commit
da876f37b2
|
|
@ -271,14 +271,10 @@ QString SqlGeneratorBase::fromTableText(const QString &tableName,
|
||||||
.arg(rel->localColumn);
|
.arg(rel->localColumn);
|
||||||
orderBy = tableName + "." + pk;
|
orderBy = tableName + "." + pk;
|
||||||
} else {
|
} else {
|
||||||
qWarning(
|
qWarning("Relation between table %s and class %s (%s) not exists!",
|
||||||
QString(
|
qPrintable(tableName),
|
||||||
"Relation between table %1 and class %2 (%3) not exists!")
|
qPrintable(joinClassName),
|
||||||
.arg(tableName)
|
qPrintable(joinTableName.isNull() ? "NULL" : joinTableName));
|
||||||
.arg(joinClassName)
|
|
||||||
.arg(joinTableName.isNull() ? "NULL" : joinTableName)
|
|
||||||
.toLatin1()
|
|
||||||
.data());
|
|
||||||
joinClassName = QString::null;
|
joinClassName = QString::null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -32,7 +32,9 @@
|
||||||
#include "defines.h"
|
#include "defines.h"
|
||||||
#include "types/dbgeography.h"
|
#include "types/dbgeography.h"
|
||||||
|
|
||||||
|
#if __cplusplus >= 201103L
|
||||||
#include <initializer_list>
|
#include <initializer_list>
|
||||||
|
#endif
|
||||||
|
|
||||||
NUT_BEGIN_NAMESPACE
|
NUT_BEGIN_NAMESPACE
|
||||||
|
|
||||||
|
|
@ -448,11 +450,13 @@ public:
|
||||||
return WherePhrase(this, PhraseData::In, vlist);
|
return WherePhrase(this, PhraseData::In, vlist);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if __cplusplus >= 201103L
|
||||||
template<typename T>
|
template<typename T>
|
||||||
WherePhrase in(std::initializer_list<T> list)
|
WherePhrase in(std::initializer_list<T> list)
|
||||||
{
|
{
|
||||||
return in(QList<T>(list));
|
return in(QList<T>(list));
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
WherePhrase in(int count, ...)
|
WherePhrase in(int count, ...)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue