diff options
Diffstat (limited to 'src/plugins/platforms/cocoa')
-rw-r--r-- | src/plugins/platforms/cocoa/qcocoafiledialoghelper.mm | 6 | ||||
-rw-r--r-- | src/plugins/platforms/cocoa/qcocoahelpers.h | 2 | ||||
-rw-r--r-- | src/plugins/platforms/cocoa/qcocoahelpers.mm | 2 | ||||
-rw-r--r-- | src/plugins/platforms/cocoa/qcocoawindow.mm | 6 | ||||
-rw-r--r-- | src/plugins/platforms/cocoa/qnsview.mm | 8 | ||||
-rw-r--r-- | src/plugins/platforms/cocoa/qnswindowdelegate.mm | 16 |
6 files changed, 12 insertions, 28 deletions
diff --git a/src/plugins/platforms/cocoa/qcocoafiledialoghelper.mm b/src/plugins/platforms/cocoa/qcocoafiledialoghelper.mm index 98b9f7c9ba..00bfc8bef5 100644 --- a/src/plugins/platforms/cocoa/qcocoafiledialoghelper.mm +++ b/src/plugins/platforms/cocoa/qcocoafiledialoghelper.mm @@ -162,11 +162,7 @@ QT_NAMESPACE_ALIAS_OBJC_CLASS(QNSOpenSavePanelDelegate); // resetting our mCurrentDir, set the delegate // here to make sure it gets the correct value. [mSavePanel setDelegate:self]; - -#if QT_OSX_PLATFORM_SDK_EQUAL_OR_ABOVE(__MAC_10_11) - if (__builtin_available(macOS 10.11, *)) - mOpenPanel.accessoryViewDisclosed = YES; -#endif + mOpenPanel.accessoryViewDisclosed = YES; if (mOptions->isLabelExplicitlySet(QFileDialogOptions::Accept)) [mSavePanel setPrompt:[self strip:options->labelText(QFileDialogOptions::Accept)]]; diff --git a/src/plugins/platforms/cocoa/qcocoahelpers.h b/src/plugins/platforms/cocoa/qcocoahelpers.h index 2c4783b1e3..84632c1487 100644 --- a/src/plugins/platforms/cocoa/qcocoahelpers.h +++ b/src/plugins/platforms/cocoa/qcocoahelpers.h @@ -63,6 +63,8 @@ Q_FORWARD_DECLARE_OBJC_CLASS(QT_MANGLE_NAMESPACE(QNSView)); QT_BEGIN_NAMESPACE Q_DECLARE_LOGGING_CATEGORY(lcQpaCocoaWindow) +Q_DECLARE_LOGGING_CATEGORY(lcQpaCocoaDrawing) +Q_DECLARE_LOGGING_CATEGORY(lcQpaCocoaMouse) class QPixmap; class QString; diff --git a/src/plugins/platforms/cocoa/qcocoahelpers.mm b/src/plugins/platforms/cocoa/qcocoahelpers.mm index 677f92863b..3b45793944 100644 --- a/src/plugins/platforms/cocoa/qcocoahelpers.mm +++ b/src/plugins/platforms/cocoa/qcocoahelpers.mm @@ -58,6 +58,8 @@ QT_BEGIN_NAMESPACE Q_LOGGING_CATEGORY(lcQpaCocoaWindow, "qt.qpa.cocoa.window"); +Q_LOGGING_CATEGORY(lcQpaCocoaDrawing, "qt.qpa.cocoa.drawing"); +Q_LOGGING_CATEGORY(lcQpaCocoaMouse, "qt.qpa.cocoa.mouse"); // // Conversion Functions diff --git a/src/plugins/platforms/cocoa/qcocoawindow.mm b/src/plugins/platforms/cocoa/qcocoawindow.mm index 88851f7441..e4dd71f01b 100644 --- a/src/plugins/platforms/cocoa/qcocoawindow.mm +++ b/src/plugins/platforms/cocoa/qcocoawindow.mm @@ -1158,7 +1158,7 @@ void QCocoaWindow::handleExposeEvent(const QRegion ®ion) // rect as a real expose event (including going from non-exposed to // exposed). FIXME: Should this logic live in QGuiApplication? if (isExposed() && m_exposedRect == previouslyExposedRect) { - qCDebug(lcQpaCocoaWindow) << "QCocoaWindow::handleExposeEvent" << window() << region << "as update request"; + qCDebug(lcQpaCocoaDrawing) << "QCocoaWindow::handleExposeEvent" << window() << region << "as update request"; windowPrivate->deliverUpdateRequest(); return; } else { @@ -1168,7 +1168,7 @@ void QCocoaWindow::handleExposeEvent(const QRegion ®ion) } } - qCDebug(lcQpaCocoaWindow) << "QCocoaWindow::handleExposeEvent" << window() << region << "isExposed" << isExposed(); + qCDebug(lcQpaCocoaDrawing) << "QCocoaWindow::handleExposeEvent" << window() << region << "isExposed" << isExposed(); QWindowSystemInterface::handleExposeEvent<QWindowSystemInterface::SynchronousDelivery>(window(), region); } @@ -1341,7 +1341,7 @@ void QCocoaWindow::recreateWindowIfNeeded() void QCocoaWindow::requestUpdate() { - qCDebug(lcQpaCocoaWindow) << "QCocoaWindow::requestUpdate" << window(); + qCDebug(lcQpaCocoaDrawing) << "QCocoaWindow::requestUpdate" << window(); [m_view setNeedsDisplay:YES]; } diff --git a/src/plugins/platforms/cocoa/qnsview.mm b/src/plugins/platforms/cocoa/qnsview.mm index af16ed103e..f9c28542a9 100644 --- a/src/plugins/platforms/cocoa/qnsview.mm +++ b/src/plugins/platforms/cocoa/qnsview.mm @@ -314,7 +314,7 @@ Q_LOGGING_CATEGORY(lcQpaTablet, "qt.qpa.input.tablet") for (int i = 0; i < numDirtyRects; ++i) exposedRegion += QRectF::fromCGRect(dirtyRects[i]).toRect(); - qCDebug(lcQpaCocoaWindow) << "[QNSView drawRect:]" << m_platformWindow->window() << exposedRegion; + qCDebug(lcQpaCocoaDrawing) << "[QNSView drawRect:]" << m_platformWindow->window() << exposedRegion; #ifndef QT_NO_OPENGL if (m_glContext && m_shouldSetGLContextinDrawRect) { @@ -331,7 +331,7 @@ Q_LOGGING_CATEGORY(lcQpaTablet, "qt.qpa.input.tablet") // But AppKit will reset the needsDisplay state of the view after completing // the current display cycle, so we need to defer the request to redisplay. // FIXME: Perhaps this should be a trigger to enable CADisplayLink? - qCDebug(lcQpaCocoaWindow) << "[QNSView drawRect:] issuing deferred setNeedsDisplay due to pending update request"; + qCDebug(lcQpaCocoaDrawing) << "[QNSView drawRect:] issuing deferred setNeedsDisplay due to pending update request"; dispatch_async(dispatch_get_main_queue (), ^{ [self setNeedsDisplay:YES]; }); @@ -348,7 +348,7 @@ Q_LOGGING_CATEGORY(lcQpaTablet, "qt.qpa.input.tablet") if (!m_platformWindow) return; - qCDebug(lcQpaCocoaWindow) << "[QNSView updateLayer]" << m_platformWindow->window(); + qCDebug(lcQpaCocoaDrawing) << "[QNSView updateLayer]" << m_platformWindow->window(); // FIXME: Find out if there's a way to resolve the dirty rect like in drawRect: m_platformWindow->handleExposeEvent(QRectF::fromCGRect(self.bounds).toRect()); @@ -787,7 +787,7 @@ Q_LOGGING_CATEGORY(lcQpaTablet, "qt.qpa.input.tablet") - (void)cursorUpdate:(NSEvent *)theEvent { - qCDebug(lcQpaCocoaWindow) << "[QNSView cursorUpdate:]" << self.cursor; + qCDebug(lcQpaCocoaMouse) << "[QNSView cursorUpdate:]" << self.cursor; // Note: We do not get this callback when moving from a subview that // uses the legacy cursorRect API, so the cursor is reset to the arrow diff --git a/src/plugins/platforms/cocoa/qnswindowdelegate.mm b/src/plugins/platforms/cocoa/qnswindowdelegate.mm index cdecd86dfb..6e5623d679 100644 --- a/src/plugins/platforms/cocoa/qnswindowdelegate.mm +++ b/src/plugins/platforms/cocoa/qnswindowdelegate.mm @@ -80,22 +80,6 @@ static QRegExp whitespaceRegex = QRegExp(QStringLiteral("\\s*")); return NSRectFromCGRect(m_cocoaWindow->screen()->availableGeometry().toCGRect()); } -#if QT_MACOS_DEPLOYMENT_TARGET_BELOW(__MAC_10_11) -/* - AppKit on OS X 10.10 wrongly calls windowWillUseStandardFrame:defaultFrame - from -[NSWindow _frameForFullScreenMode] when going into fullscreen, resulting - in black bars on top and bottom of the window. By implementing the following - method, AppKit will choose that instead, and resolve the right fullscreen - geometry. -*/ -- (NSSize)window:(NSWindow *)window willUseFullScreenContentSize:(NSSize)proposedSize -{ - Q_UNUSED(proposedSize); - Q_ASSERT(window == m_cocoaWindow->nativeWindow()); - return NSSizeFromCGSize(m_cocoaWindow->screen()->geometry().size().toCGSize()); -} -#endif - - (BOOL)window:(NSWindow *)window shouldPopUpDocumentPathMenu:(NSMenu *)menu { Q_UNUSED(window); |