diff options
Diffstat (limited to 'src/corelib/global')
-rw-r--r-- | src/corelib/global/qcompilerdetection.h | 5 | ||||
-rw-r--r-- | src/corelib/global/qlogging.cpp | 8 |
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; |