summaryrefslogtreecommitdiffstats
path: root/src/corelib/tools
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@kdab.com>2015-06-27 11:07:57 +0200
committerMarc Mutz <marc.mutz@kdab.com>2015-06-28 15:56:07 +0000
commita8df43cd650f6c51bf9a84ac04776c659b86d92c (patch)
tree0e7aee4d25f9fa40f062bb686764a67300b5536b /src/corelib/tools
parent435a3d77415d6b9f859839edd907df17ee54f569 (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.cpp2
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");