From a8df43cd650f6c51bf9a84ac04776c659b86d92c Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Sat, 27 Jun 2015 11:07:57 +0200 Subject: 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 --- src/corelib/tools/qcommandlineoption.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/corelib/tools/qcommandlineoption.cpp') diff --git a/src/corelib/tools/qcommandlineoption.cpp b/src/corelib/tools/qcommandlineoption.cpp index 58fec597bc6..8ab98741f58 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"); -- cgit v1.2.3