diff options
author | Marc Mutz <marc.mutz@kdab.com> | 2015-06-27 11:07:57 +0200 |
---|---|---|
committer | Marc Mutz <marc.mutz@kdab.com> | 2015-06-28 15:56:07 +0000 |
commit | a8df43cd650f6c51bf9a84ac04776c659b86d92c (patch) | |
tree | 0e7aee4d25f9fa40f062bb686764a67300b5536b /src/corelib/tools | |
parent | 435a3d77415d6b9f859839edd907df17ee54f569 (diff) |
QCommandLineOption: Q_DECL_NOTHROW -> Q_DECL_NOEXCEPT
In IsInvalidName::operator(), marked as _NOTHROW, we're calling qWarning(),
which, of course, _can_ throw. We don't care in that case, but then we
musn't use _NOTHROW, which causes UB on MSVC, but _NOEXCEPT, which causes
std::terminate to be called.
Change-Id: I18f74546ea3b388495fdb173d3abd9a162fb78a9
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/tools')
-rw-r--r-- | src/corelib/tools/qcommandlineoption.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/corelib/tools/qcommandlineoption.cpp b/src/corelib/tools/qcommandlineoption.cpp index 58fec597bc..8ab98741f5 100644 --- a/src/corelib/tools/qcommandlineoption.cpp +++ b/src/corelib/tools/qcommandlineoption.cpp @@ -250,7 +250,7 @@ namespace { typedef bool result_type; typedef QString argument_type; - result_type operator()(const QString &name) const Q_DECL_NOTHROW + result_type operator()(const QString &name) const Q_DECL_NOEXCEPT { if (name.isEmpty()) { qWarning("QCommandLineOption: Option names cannot be empty"); |