diff options
author | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2019-08-22 01:00:34 +0200 |
---|---|---|
committer | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2019-08-22 01:00:35 +0200 |
commit | 0c9f8ff2a869d967880319eb3e4b06fe79be9262 (patch) | |
tree | e5a565eb0c276d15c7a28b83392817b6c9a950c0 /src | |
parent | 987cca7bca559295e69bc4c34f76651732fd4c8f (diff) | |
parent | c4aa90cb566a58ce3e2a18de134b83d0a959fed2 (diff) |
Merge remote-tracking branch 'origin/5.12' into 5.13
Change-Id: Ia4bcd81eff948e56a5eda9519cdbee59b7da54d9
Diffstat (limited to 'src')
-rw-r--r-- | src/corelib/global/qlogging.cpp | 4 | ||||
-rw-r--r-- | src/corelib/kernel/qmetaobject.cpp | 7 | ||||
-rw-r--r-- | src/plugins/platforms/cocoa/qnsview_mouse.mm | 4 | ||||
-rw-r--r-- | src/plugins/platforms/ios/quiview_accessibility.mm | 2 |
4 files changed, 14 insertions, 3 deletions
diff --git a/src/corelib/global/qlogging.cpp b/src/corelib/global/qlogging.cpp index d724d1e7eb..9ae963fc43 100644 --- a/src/corelib/global/qlogging.cpp +++ b/src/corelib/global/qlogging.cpp @@ -1923,12 +1923,14 @@ void qErrnoWarning(const char *msg, ...) { // qt_error_string() will allocate anyway, so we don't have // to be careful here (like we do in plain qWarning()) + QString error_string = qt_error_string(-1); // before vasprintf changes errno/GetLastError() + va_list ap; va_start(ap, msg); QString buf = QString::vasprintf(msg, ap); va_end(ap); - buf += QLatin1String(" (") + qt_error_string(-1) + QLatin1Char(')'); + buf += QLatin1String(" (") + error_string + QLatin1Char(')'); QMessageLogContext context; qt_message_output(QtCriticalMsg, context, buf); } diff --git a/src/corelib/kernel/qmetaobject.cpp b/src/corelib/kernel/qmetaobject.cpp index 8b2febbbb7..51866a1867 100644 --- a/src/corelib/kernel/qmetaobject.cpp +++ b/src/corelib/kernel/qmetaobject.cpp @@ -112,6 +112,13 @@ QT_BEGIN_NAMESPACE are returned by classInfo(), and you can search for pairs with indexOfClassInfo(). + \note Operations that use the meta object system are generally thread- + safe, as QMetaObjects are typically static read-only instances + generated at compile time. However, if meta objects are dynamically + modified by the application (for instance, when using QQmlPropertyMap), + then the application has to explicitly synchronize access to the + respective meta object. + \sa QMetaClassInfo, QMetaEnum, QMetaMethod, QMetaProperty, QMetaType, {Meta-Object System} */ diff --git a/src/plugins/platforms/cocoa/qnsview_mouse.mm b/src/plugins/platforms/cocoa/qnsview_mouse.mm index a887cb841d..3a5a074264 100644 --- a/src/plugins/platforms/cocoa/qnsview_mouse.mm +++ b/src/plugins/platforms/cocoa/qnsview_mouse.mm @@ -389,14 +389,16 @@ } // Close the popups if the click was outside. if (!inside) { + bool selfClosed = false; Qt::WindowType type = QCocoaIntegration::instance()->activePopupWindow()->window()->type(); while (QCocoaWindow *popup = QCocoaIntegration::instance()->popPopupWindow()) { + selfClosed = self == popup->view(); QWindowSystemInterface::handleCloseEvent(popup->window()); QWindowSystemInterface::flushWindowSystemEvents(); } // Consume the mouse event when closing the popup, except for tool tips // were it's expected that the event is processed normally. - if (type != Qt::ToolTip) + if (type != Qt::ToolTip || selfClosed) return; } } diff --git a/src/plugins/platforms/ios/quiview_accessibility.mm b/src/plugins/platforms/ios/quiview_accessibility.mm index 458ddcc9b8..6612dc131e 100644 --- a/src/plugins/platforms/ios/quiview_accessibility.mm +++ b/src/plugins/platforms/ios/quiview_accessibility.mm @@ -101,7 +101,7 @@ - (id)accessibilityElementAtIndex:(NSInteger)index { [self initAccessibility]; - if (index >= [m_accessibleElements count]) + if (NSUInteger(index) >= [m_accessibleElements count]) return nil; return m_accessibleElements[index]; } |