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);
|
||||
orderBy = tableName + "." + pk;
|
||||
} else {
|
||||
qWarning(
|
||||
QString(
|
||||
"Relation between table %1 and class %2 (%3) not exists!")
|
||||
.arg(tableName)
|
||||
.arg(joinClassName)
|
||||
.arg(joinTableName.isNull() ? "NULL" : joinTableName)
|
||||
.toLatin1()
|
||||
.data());
|
||||
qWarning("Relation between table %s and class %s (%s) not exists!",
|
||||
qPrintable(tableName),
|
||||
qPrintable(joinClassName),
|
||||
qPrintable(joinTableName.isNull() ? "NULL" : joinTableName));
|
||||
joinClassName = QString::null;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -32,7 +32,9 @@
|
|||
#include "defines.h"
|
||||
#include "types/dbgeography.h"
|
||||
|
||||
#if __cplusplus >= 201103L
|
||||
#include <initializer_list>
|
||||
#endif
|
||||
|
||||
NUT_BEGIN_NAMESPACE
|
||||
|
||||
|
|
@ -448,11 +450,13 @@ public:
|
|||
return WherePhrase(this, PhraseData::In, vlist);
|
||||
}
|
||||
|
||||
#if __cplusplus >= 201103L
|
||||
template<typename T>
|
||||
WherePhrase in(std::initializer_list<T> list)
|
||||
{
|
||||
return in(QList<T>(list));
|
||||
}
|
||||
#endif
|
||||
|
||||
WherePhrase in(int count, ...)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue