summaryrefslogtreecommitdiffstats
path: root/src/plugins
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2020-08-12 14:14:02 +0200
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2020-08-14 15:52:58 +0200
commit6f0df02d002356625f10683ef84da7685d92a2c4 (patch)
tree46713209af459ebda534c3404f48c5f5c80ba3f8 /src/plugins
parent44cce1a2ea9dadd8b2de93f40de34269dda703c0 (diff)
Replace Qt CONSTEXPR defines with constexpr
Both normal and relaxed constexpr are required by our new minimum of C++17. Change-Id: Ic028b88a2e7a6cb7d5925f3133b9d54859a81744 Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/platforms/windows/qwindowsmime.cpp8
-rw-r--r--src/plugins/platforms/xcb/nativepainting/qt_x11_p.h2
-rw-r--r--src/plugins/sqldrivers/oci/qsql_oci.cpp2
3 files changed, 6 insertions, 6 deletions
diff --git a/src/plugins/platforms/windows/qwindowsmime.cpp b/src/plugins/platforms/windows/qwindowsmime.cpp
index 7cd35c7308..e5f544c385 100644
--- a/src/plugins/platforms/windows/qwindowsmime.cpp
+++ b/src/plugins/platforms/windows/qwindowsmime.cpp
@@ -934,8 +934,8 @@ QVariant QWindowsMimeHtml::convertToMime(const QString &mime, IDataObject *pData
QVariant result;
if (canConvertToMime(mime, pDataObj)) {
QByteArray html = getData(CF_HTML, pDataObj);
- static Q_RELAXED_CONSTEXPR auto startMatcher = qMakeStaticByteArrayMatcher("StartHTML:");
- static Q_RELAXED_CONSTEXPR auto endMatcher = qMakeStaticByteArrayMatcher("EndHTML:");
+ static constexpr auto startMatcher = qMakeStaticByteArrayMatcher("StartHTML:");
+ static constexpr auto endMatcher = qMakeStaticByteArrayMatcher("EndHTML:");
qCDebug(lcQpaMime) << __FUNCTION__ << "raw:" << html;
int start = startMatcher.indexIn(html);
int end = endMatcher.indexIn(html);
@@ -978,8 +978,8 @@ bool QWindowsMimeHtml::convertFromMime(const FORMATETC &formatetc, const QMimeDa
"StartFragment:0000000000\r\n" // 56-81
"EndFragment:0000000000\r\n\r\n"; // 82-107
- static Q_RELAXED_CONSTEXPR auto startFragmentMatcher = qMakeStaticByteArrayMatcher("<!--StartFragment-->");
- static Q_RELAXED_CONSTEXPR auto endFragmentMatcher = qMakeStaticByteArrayMatcher("<!--EndFragment-->");
+ static constexpr auto startFragmentMatcher = qMakeStaticByteArrayMatcher("<!--StartFragment-->");
+ static constexpr auto endFragmentMatcher = qMakeStaticByteArrayMatcher("<!--EndFragment-->");
if (startFragmentMatcher.indexIn(data) == -1)
result += "<!--StartFragment-->";
diff --git a/src/plugins/platforms/xcb/nativepainting/qt_x11_p.h b/src/plugins/platforms/xcb/nativepainting/qt_x11_p.h
index 1f7e7cf49b..117d5948cc 100644
--- a/src/plugins/platforms/xcb/nativepainting/qt_x11_p.h
+++ b/src/plugins/platforms/xcb/nativepainting/qt_x11_p.h
@@ -190,7 +190,7 @@ struct QX11InfoData {
};
template <class T>
-Q_DECL_RELAXED_CONSTEXPR inline int lowest_bit(T v) noexcept
+constexpr inline int lowest_bit(T v) noexcept
{
int result = qCountTrailingZeroBits(v);
return ((result >> 3) == sizeof(T)) ? -1 : result;
diff --git a/src/plugins/sqldrivers/oci/qsql_oci.cpp b/src/plugins/sqldrivers/oci/qsql_oci.cpp
index 48295f58e5..378e9322e2 100644
--- a/src/plugins/sqldrivers/oci/qsql_oci.cpp
+++ b/src/plugins/sqldrivers/oci/qsql_oci.cpp
@@ -2454,7 +2454,7 @@ static QString make_where_clause(const QString &user, Expression e)
"WMSYS",
};
static const char joinC[][4] = { "or" , "and" };
- static Q_CONSTEXPR QLatin1Char bang[] = { QLatin1Char(' '), QLatin1Char('!') };
+ static constexpr QLatin1Char bang[] = { QLatin1Char(' '), QLatin1Char('!') };
const QLatin1String join(joinC[e]);