summaryrefslogtreecommitdiffstats
path: root/src/corelib/global
diff options
context:
space:
mode:
authorFrederik Gladhorn <frederik.gladhorn@theqtcompany.com>2015-02-10 09:54:23 +0100
committerFrederik Gladhorn <frederik.gladhorn@theqtcompany.com>2015-02-10 09:55:09 +0100
commit51ce5b482997f76b8890876b07337b29609728e5 (patch)
tree54f408028c7831428fca2772c6a909f2febffb54 /src/corelib/global
parent51ba25e0fc89882e5021bed718de91d58f7f3907 (diff)
parentd6ce94ae6367337ade2c590f182b973e2bcfa98c (diff)
Merge remote-tracking branch 'origin/5.4.1' into 5.4
Diffstat (limited to 'src/corelib/global')
-rw-r--r--src/corelib/global/qcompilerdetection.h5
-rw-r--r--src/corelib/global/qlogging.cpp8
2 files changed, 10 insertions, 3 deletions
diff --git a/src/corelib/global/qcompilerdetection.h b/src/corelib/global/qcompilerdetection.h
index 7effb24130..d144c4faad 100644
--- a/src/corelib/global/qcompilerdetection.h
+++ b/src/corelib/global/qcompilerdetection.h
@@ -557,7 +557,10 @@
# define Q_COMPILER_UNRESTRICTED_UNIONS
# endif
# if __INTEL_COMPILER >= 1500
-# define Q_COMPILER_CONSTEXPR
+# if __INTEL_COMPILER * 100 + __INTEL_COMPILER_UPDATE >= 150001
+// the bug mentioned above is fixed in 15.0.1
+# define Q_COMPILER_CONSTEXPR
+# endif
# define Q_COMPILER_ALIGNAS
# define Q_COMPILER_ALIGNOF
# define Q_COMPILER_INHERITING_CONSTRUCTORS
diff --git a/src/corelib/global/qlogging.cpp b/src/corelib/global/qlogging.cpp
index fa897d6d32..18b672d7ee 100644
--- a/src/corelib/global/qlogging.cpp
+++ b/src/corelib/global/qlogging.cpp
@@ -873,7 +873,7 @@ QMessagePattern::QMessagePattern()
QMessagePattern::~QMessagePattern()
{
- for (int i = 0; literals[i] != 0; ++i)
+ for (int i = 0; literals[i]; ++i)
delete [] literals[i];
delete [] literals;
literals = 0;
@@ -883,8 +883,12 @@ QMessagePattern::~QMessagePattern()
void QMessagePattern::setPattern(const QString &pattern)
{
+ if (literals) {
+ for (int i = 0; literals[i]; ++i)
+ delete [] literals[i];
+ delete [] literals;
+ }
delete [] tokens;
- delete [] literals;
// scanner
QList<QString> lexemes;