From cd07c580f66dec3e7abdcd6192ae7e0c4f0b487c Mon Sep 17 00:00:00 2001 From: Hamed Masafi Date: Mon, 26 Feb 2018 10:23:50 +0330 Subject: [PATCH] FieldPhrase specialization --- src/phrase.h | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/phrase.h b/src/phrase.h index 8b22dfb..d56b1dc 100644 --- a/src/phrase.h +++ b/src/phrase.h @@ -25,7 +25,7 @@ #include #include #include -#if __cplusplus >= 201103L +#ifdef Q_COMPILER_INITIALIZER_LISTS # include #endif @@ -330,6 +330,15 @@ public: AssignmentPhrase operator =(const bool &other) { return AssignmentPhrase(this, other); } + + FieldPhrase operator !() + { + FieldPhrase f(data->className, data->fieldName); + f.data = new PhraseData(data); + f.data->isNot = !data->isNot; + return f; + } + operator ConditionalPhrase() { return ConditionalPhrase(this, PhraseData::Equal, !data->isNot);