commit cb5bb58773bbf4864bbea505bca027a0f1094b34
Author: Christian Ehringfeld <c.ehringfeld@t-online.de>
Date:   Fri Mar 25 17:27:43 2016 +0100

    added c++14 in .pro file and set macro for version check

diff --git a/EntityManager.pro b/EntityManager.pro
index 70ad8f8..9ac94ee 100644
--- a/EntityManager.pro
+++ b/EntityManager.pro
@@ -8,6 +8,7 @@ android {
 }
 
 CONFIG += ordered
+CONFIG += c++14
 
 tests.depends = src
 samples.depends = tests
diff --git a/src/querybuilder.cpp b/src/querybuilder.cpp
index 8aa3bd5..35fc258 100644
--- a/src/querybuilder.cpp
+++ b/src/querybuilder.cpp
@@ -497,7 +497,9 @@ QString QueryBuilder::getColumnType(const QString &type) const {
     }
     QRegularExpression reg = QRegularExpression(
                                  QRegularExpression::escape("/^(\\w+)\\((.+?)\\)(.*)$/"));
+#if QT_VERSION >= QT_VERSION_CHECK(5, 4, 0)
     reg.optimize();
+#endif
     QRegularExpressionMatchIterator i = reg.globalMatch(type, 0,
                                         QRegularExpression::PartialPreferFirstMatch);
     short s = 0;
diff --git a/src/queryinterpreter.cpp b/src/queryinterpreter.cpp
index 33112a8..0d63b26 100644
--- a/src/queryinterpreter.cpp
+++ b/src/queryinterpreter.cpp
@@ -90,7 +90,9 @@ QString QueryInterpreter::buildSelect(Query &q,
             QRegularExpression re =
                 QRegularExpression(
                     QRegularExpression::escape("/^(.*?)(?i:\\s+as\\s+|\\s+)([\\w\\-_\\.]+)$/"));
+#if QT_VERSION >= QT_VERSION_CHECK(5, 4, 0)
             re.optimize();
+#endif
             QRegularExpressionMatchIterator iterator = re.globalMatch(nExp, 0,
                     QRegularExpression::PartialPreferFirstMatch);
             if (iterator.hasNext()) {
