macOS: Remove 'cocoa' infix in QPA logging categories

Makes the naming of QPA logging categories the same across different
platforms, which makes it easier to debug an unfamiliar platform.

Change-Id: I60ed34892d154e86723c8e4bcff3c28fcab1f7a1
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
This commit is contained in:
Tor Arne Vestbø 2018-03-14 17:29:50 +01:00
parent 9e26ca82fe
commit 8899074d72
7 changed files with 48 additions and 48 deletions

View File

@ -44,7 +44,7 @@
QT_BEGIN_NAMESPACE QT_BEGIN_NAMESPACE
Q_LOGGING_CATEGORY(lcCocoaBackingStore, "qt.qpa.cocoa.backingstore"); Q_LOGGING_CATEGORY(lcQpaBackingStore, "qt.qpa.backingstore");
QCocoaBackingStore::QCocoaBackingStore(QWindow *window) QCocoaBackingStore::QCocoaBackingStore(QWindow *window)
: QRasterBackingStore(window) : QRasterBackingStore(window)
@ -101,13 +101,13 @@ void QCocoaBackingStore::flush(QWindow *window, const QRegion &region, const QPo
QNSView *topLevelView = qnsview_cast(static_cast<QCocoaWindow *>(topLevelWindow->handle())->view()); QNSView *topLevelView = qnsview_cast(static_cast<QCocoaWindow *>(topLevelWindow->handle())->view());
QNSView *view = qnsview_cast(static_cast<QCocoaWindow *>(window->handle())->view()); QNSView *view = qnsview_cast(static_cast<QCocoaWindow *>(window->handle())->view());
if (lcCocoaBackingStore().isDebugEnabled()) { if (lcQpaBackingStore().isDebugEnabled()) {
QString targetViewDescription; QString targetViewDescription;
if (view != topLevelView) { if (view != topLevelView) {
QDebug targetDebug(&targetViewDescription); QDebug targetDebug(&targetViewDescription);
targetDebug << "onto" << topLevelView << "at" << offset; targetDebug << "onto" << topLevelView << "at" << offset;
} }
qCDebug(lcCocoaBackingStore) << "Flushing" << region << "of" << view << qPrintable(targetViewDescription); qCDebug(lcQpaBackingStore) << "Flushing" << region << "of" << view << qPrintable(targetViewDescription);
} }
// Prevent potentially costly color conversion by assigning the display color space // Prevent potentially costly color conversion by assigning the display color space

View File

@ -62,9 +62,9 @@ Q_FORWARD_DECLARE_OBJC_CLASS(QT_MANGLE_NAMESPACE(QNSView));
QT_BEGIN_NAMESPACE QT_BEGIN_NAMESPACE
Q_DECLARE_LOGGING_CATEGORY(lcQpaCocoaWindow) Q_DECLARE_LOGGING_CATEGORY(lcQpaWindow)
Q_DECLARE_LOGGING_CATEGORY(lcQpaCocoaDrawing) Q_DECLARE_LOGGING_CATEGORY(lcQpaDrawing)
Q_DECLARE_LOGGING_CATEGORY(lcQpaCocoaMouse) Q_DECLARE_LOGGING_CATEGORY(lcQpaMouse)
class QPixmap; class QPixmap;
class QString; class QString;

View File

@ -57,9 +57,9 @@
QT_BEGIN_NAMESPACE QT_BEGIN_NAMESPACE
Q_LOGGING_CATEGORY(lcQpaCocoaWindow, "qt.qpa.cocoa.window"); Q_LOGGING_CATEGORY(lcQpaWindow, "qt.qpa.window");
Q_LOGGING_CATEGORY(lcQpaCocoaDrawing, "qt.qpa.cocoa.drawing"); Q_LOGGING_CATEGORY(lcQpaDrawing, "qt.qpa.drawing");
Q_LOGGING_CATEGORY(lcQpaCocoaMouse, "qt.qpa.cocoa.mouse"); Q_LOGGING_CATEGORY(lcQpaMouse, "qt.qpa.input.mouse");
// //
// Conversion Functions // Conversion Functions

View File

@ -225,7 +225,7 @@ QCocoaIntegration::Options QCocoaIntegration::options() const
return mOptions; return mOptions;
} }
Q_LOGGING_CATEGORY(lcCocoaScreen, "qt.qpa.cocoa.screens"); Q_LOGGING_CATEGORY(lcQpaScreen, "qt.qpa.screen");
/*! /*!
\brief Synchronizes the screen list, adds new screens, removes deleted ones \brief Synchronizes the screen list, adds new screens, removes deleted ones
@ -266,11 +266,11 @@ void QCocoaIntegration::updateScreens()
if (screen) { if (screen) {
remainingScreens.remove(screen); remainingScreens.remove(screen);
screen->updateGeometry(); screen->updateGeometry();
qCDebug(lcCocoaScreen) << "Updated properties of" << screen; qCDebug(lcQpaScreen) << "Updated properties of" << screen;
} else { } else {
screen = new QCocoaScreen(i); screen = new QCocoaScreen(i);
mScreens.append(screen); mScreens.append(screen);
qCDebug(lcCocoaScreen) << "Adding" << screen; qCDebug(lcQpaScreen) << "Adding" << screen;
screenAdded(screen); screenAdded(screen);
} }
siblings << screen; siblings << screen;
@ -287,7 +287,7 @@ void QCocoaIntegration::updateScreens()
mScreens.removeOne(screen); mScreens.removeOne(screen);
// Prevent stale references to NSScreen during destroy // Prevent stale references to NSScreen during destroy
screen->m_screenIndex = -1; screen->m_screenIndex = -1;
qCDebug(lcCocoaScreen) << "Removing" << screen; qCDebug(lcQpaScreen) << "Removing" << screen;
destroyScreen(screen); destroyScreen(screen);
} }
} }

View File

@ -129,7 +129,7 @@ static void qRegisterNotificationCallbacks()
for (QCocoaWindow *cocoaWindow : cocoaWindows) { for (QCocoaWindow *cocoaWindow : cocoaWindows) {
if (!method.invoke(cocoaWindow, Qt::DirectConnection)) { if (!method.invoke(cocoaWindow, Qt::DirectConnection)) {
qCWarning(lcQpaCocoaWindow) << "Failed to invoke NSNotification callback for" qCWarning(lcQpaWindow) << "Failed to invoke NSNotification callback for"
<< notification.name << "on" << cocoaWindow; << notification.name << "on" << cocoaWindow;
} }
} }
@ -168,7 +168,7 @@ QCocoaWindow::QCocoaWindow(QWindow *win, WId nativeHandle)
, m_topContentBorderThickness(0) , m_topContentBorderThickness(0)
, m_bottomContentBorderThickness(0) , m_bottomContentBorderThickness(0)
{ {
qCDebug(lcQpaCocoaWindow) << "QCocoaWindow::QCocoaWindow" << window(); qCDebug(lcQpaWindow) << "QCocoaWindow::QCocoaWindow" << window();
if (nativeHandle) { if (nativeHandle) {
m_view = reinterpret_cast<NSView *>(nativeHandle); m_view = reinterpret_cast<NSView *>(nativeHandle);
@ -178,7 +178,7 @@ QCocoaWindow::QCocoaWindow(QWindow *win, WId nativeHandle)
void QCocoaWindow::initialize() void QCocoaWindow::initialize()
{ {
qCDebug(lcQpaCocoaWindow) << "QCocoaWindow::initialize" << window(); qCDebug(lcQpaWindow) << "QCocoaWindow::initialize" << window();
QMacAutoReleasePool pool; QMacAutoReleasePool pool;
@ -212,7 +212,7 @@ void QCocoaWindow::initialize()
QCocoaWindow::~QCocoaWindow() QCocoaWindow::~QCocoaWindow()
{ {
qCDebug(lcQpaCocoaWindow) << "QCocoaWindow::~QCocoaWindow" << window(); qCDebug(lcQpaWindow) << "QCocoaWindow::~QCocoaWindow" << window();
QMacAutoReleasePool pool; QMacAutoReleasePool pool;
[m_nsWindow makeFirstResponder:nil]; [m_nsWindow makeFirstResponder:nil];
@ -250,7 +250,7 @@ QSurfaceFormat QCocoaWindow::format() const
void QCocoaWindow::setGeometry(const QRect &rectIn) void QCocoaWindow::setGeometry(const QRect &rectIn)
{ {
qCDebug(lcQpaCocoaWindow) << "QCocoaWindow::setGeometry" << window() << rectIn; qCDebug(lcQpaWindow) << "QCocoaWindow::setGeometry" << window() << rectIn;
QBoolBlocker inSetGeometry(m_inSetGeometry, true); QBoolBlocker inSetGeometry(m_inSetGeometry, true);
@ -292,7 +292,7 @@ QRect QCocoaWindow::geometry() const
void QCocoaWindow::setCocoaGeometry(const QRect &rect) void QCocoaWindow::setCocoaGeometry(const QRect &rect)
{ {
qCDebug(lcQpaCocoaWindow) << "QCocoaWindow::setCocoaGeometry" << window() << rect; qCDebug(lcQpaWindow) << "QCocoaWindow::setCocoaGeometry" << window() << rect;
QMacAutoReleasePool pool; QMacAutoReleasePool pool;
QPlatformWindow::setGeometry(rect); QPlatformWindow::setGeometry(rect);
@ -316,7 +316,7 @@ void QCocoaWindow::setCocoaGeometry(const QRect &rect)
void QCocoaWindow::setVisible(bool visible) void QCocoaWindow::setVisible(bool visible)
{ {
qCDebug(lcQpaCocoaWindow) << "QCocoaWindow::setVisible" << window() << visible; qCDebug(lcQpaWindow) << "QCocoaWindow::setVisible" << window() << visible;
m_inSetVisible = true; m_inSetVisible = true;
@ -671,7 +671,7 @@ bool QCocoaWindow::isAlertState() const
void QCocoaWindow::raise() void QCocoaWindow::raise()
{ {
qCDebug(lcQpaCocoaWindow) << "QCocoaWindow::raise" << window(); qCDebug(lcQpaWindow) << "QCocoaWindow::raise" << window();
// ### handle spaces (see Qt 4 raise_sys in qwidget_mac.mm) // ### handle spaces (see Qt 4 raise_sys in qwidget_mac.mm)
if (!isContentView()) if (!isContentView())
@ -696,7 +696,7 @@ void QCocoaWindow::raise()
void QCocoaWindow::lower() void QCocoaWindow::lower()
{ {
qCDebug(lcQpaCocoaWindow) << "QCocoaWindow::lower" << window(); qCDebug(lcQpaWindow) << "QCocoaWindow::lower" << window();
if (!isContentView()) if (!isContentView())
return; return;
@ -728,7 +728,7 @@ void QCocoaWindow::propagateSizeHints()
if (!isContentView()) if (!isContentView())
return; return;
qCDebug(lcQpaCocoaWindow) << "QCocoaWindow::propagateSizeHints" << window() qCDebug(lcQpaWindow) << "QCocoaWindow::propagateSizeHints" << window()
<< "min:" << windowMinimumSize() << "max:" << windowMaximumSize() << "min:" << windowMinimumSize() << "max:" << windowMaximumSize()
<< "increment:" << windowSizeIncrement() << "increment:" << windowSizeIncrement()
<< "base:" << windowBaseSize(); << "base:" << windowBaseSize();
@ -762,7 +762,7 @@ void QCocoaWindow::propagateSizeHints()
void QCocoaWindow::setOpacity(qreal level) void QCocoaWindow::setOpacity(qreal level)
{ {
qCDebug(lcQpaCocoaWindow) << "QCocoaWindow::setOpacity" << level; qCDebug(lcQpaWindow) << "QCocoaWindow::setOpacity" << level;
if (!isContentView()) if (!isContentView())
return; return;
@ -771,7 +771,7 @@ void QCocoaWindow::setOpacity(qreal level)
void QCocoaWindow::setMask(const QRegion &region) void QCocoaWindow::setMask(const QRegion &region)
{ {
qCDebug(lcQpaCocoaWindow) << "QCocoaWindow::setMask" << window() << region; qCDebug(lcQpaWindow) << "QCocoaWindow::setMask" << window() << region;
if (m_view.layer) { if (m_view.layer) {
if (!region.isEmpty()) { if (!region.isEmpty()) {
@ -805,7 +805,7 @@ void QCocoaWindow::setMask(const QRegion &region)
bool QCocoaWindow::setKeyboardGrabEnabled(bool grab) bool QCocoaWindow::setKeyboardGrabEnabled(bool grab)
{ {
qCDebug(lcQpaCocoaWindow) << "QCocoaWindow::setKeyboardGrabEnabled" << window() << grab; qCDebug(lcQpaWindow) << "QCocoaWindow::setKeyboardGrabEnabled" << window() << grab;
if (!isContentView()) if (!isContentView())
return false; return false;
@ -817,7 +817,7 @@ bool QCocoaWindow::setKeyboardGrabEnabled(bool grab)
bool QCocoaWindow::setMouseGrabEnabled(bool grab) bool QCocoaWindow::setMouseGrabEnabled(bool grab)
{ {
qCDebug(lcQpaCocoaWindow) << "QCocoaWindow::setMouseGrabEnabled" << window() << grab; qCDebug(lcQpaWindow) << "QCocoaWindow::setMouseGrabEnabled" << window() << grab;
if (!isContentView()) if (!isContentView())
return false; return false;
@ -834,7 +834,7 @@ WId QCocoaWindow::winId() const
void QCocoaWindow::setParent(const QPlatformWindow *parentWindow) void QCocoaWindow::setParent(const QPlatformWindow *parentWindow)
{ {
qCDebug(lcQpaCocoaWindow) << "QCocoaWindow::setParent" << window() << (parentWindow ? parentWindow->window() : 0); qCDebug(lcQpaWindow) << "QCocoaWindow::setParent" << window() << (parentWindow ? parentWindow->window() : 0);
// recreate the window for compatibility // recreate the window for compatibility
bool unhideAfterRecreate = parentWindow && !m_viewIsToBeEmbedded && ![m_view isHidden]; bool unhideAfterRecreate = parentWindow && !m_viewIsToBeEmbedded && ![m_view isHidden];
@ -1074,7 +1074,7 @@ void QCocoaWindow::windowWillClose()
bool QCocoaWindow::windowShouldClose() bool QCocoaWindow::windowShouldClose()
{ {
qCDebug(lcQpaCocoaWindow) << "QCocoaWindow::windowShouldClose" << window(); qCDebug(lcQpaWindow) << "QCocoaWindow::windowShouldClose" << window();
// This callback should technically only determine if the window // This callback should technically only determine if the window
// should (be allowed to) close, but since our QPA API to determine // should (be allowed to) close, but since our QPA API to determine
// that also involves actually closing the window we do both at the // that also involves actually closing the window we do both at the
@ -1121,7 +1121,7 @@ void QCocoaWindow::handleGeometryChange()
newGeometry = QRectF::fromCGRect(m_view.frame).toRect(); newGeometry = QRectF::fromCGRect(m_view.frame).toRect();
} }
qCDebug(lcQpaCocoaWindow) << "QCocoaWindow::handleGeometryChange" << window() qCDebug(lcQpaWindow) << "QCocoaWindow::handleGeometryChange" << window()
<< "current" << geometry() << "new" << newGeometry; << "current" << geometry() << "new" << newGeometry;
QWindowSystemInterface::handleGeometryChange(window(), newGeometry); QWindowSystemInterface::handleGeometryChange(window(), newGeometry);
@ -1153,7 +1153,7 @@ void QCocoaWindow::handleExposeEvent(const QRegion &region)
m_exposedRect = QRect(); m_exposedRect = QRect();
} }
qCDebug(lcQpaCocoaDrawing) << "QCocoaWindow::handleExposeEvent" << window() << region << "isExposed" << isExposed(); qCDebug(lcQpaDrawing) << "QCocoaWindow::handleExposeEvent" << window() << region << "isExposed" << isExposed();
QWindowSystemInterface::handleExposeEvent<QWindowSystemInterface::SynchronousDelivery>(window(), region); QWindowSystemInterface::handleExposeEvent<QWindowSystemInterface::SynchronousDelivery>(window(), region);
} }
@ -1163,7 +1163,7 @@ void QCocoaWindow::handleWindowStateChanged(HandleFlags flags)
if (!(flags & HandleUnconditionally) && currentState == m_lastReportedWindowState) if (!(flags & HandleUnconditionally) && currentState == m_lastReportedWindowState)
return; return;
qCDebug(lcQpaCocoaWindow) << "QCocoaWindow::handleWindowStateChanged" << qCDebug(lcQpaWindow) << "QCocoaWindow::handleWindowStateChanged" <<
m_lastReportedWindowState << "-->" << currentState; m_lastReportedWindowState << "-->" << currentState;
QWindowSystemInterface::handleWindowStateChanged<QWindowSystemInterface::SynchronousDelivery>( QWindowSystemInterface::handleWindowStateChanged<QWindowSystemInterface::SynchronousDelivery>(
@ -1249,7 +1249,7 @@ void QCocoaWindow::recreateWindowIfNeeded()
if (isPanel != shouldBePanel) if (isPanel != shouldBePanel)
recreateReason |= PanelChanged; recreateReason |= PanelChanged;
qCDebug(lcQpaCocoaWindow) << "QCocoaWindow::recreateWindowIfNeeded" << window() << recreateReason; qCDebug(lcQpaWindow) << "QCocoaWindow::recreateWindowIfNeeded" << window() << recreateReason;
if (recreateReason == RecreationNotNeeded) if (recreateReason == RecreationNotNeeded)
return; return;
@ -1259,9 +1259,9 @@ void QCocoaWindow::recreateWindowIfNeeded()
// Remove current window (if any) // Remove current window (if any)
if ((isContentView() && !shouldBeContentView) || (recreateReason & PanelChanged)) { if ((isContentView() && !shouldBeContentView) || (recreateReason & PanelChanged)) {
if (m_nsWindow) { if (m_nsWindow) {
qCDebug(lcQpaCocoaWindow) << "Getting rid of existing window" << m_nsWindow; qCDebug(lcQpaWindow) << "Getting rid of existing window" << m_nsWindow;
if (m_nsWindow.observationInfo) { if (m_nsWindow.observationInfo) {
qCCritical(lcQpaCocoaWindow) << m_nsWindow << "has active key-value observers (KVO)!" qCCritical(lcQpaWindow) << m_nsWindow << "has active key-value observers (KVO)!"
<< "These will stop working now that the window is recreated, and will result in exceptions" << "These will stop working now that the window is recreated, and will result in exceptions"
<< "when the observers are removed. Break in QCocoaWindow::recreateWindowIfNeeded to debug."; << "when the observers are removed. Break in QCocoaWindow::recreateWindowIfNeeded to debug.";
} }
@ -1285,7 +1285,7 @@ void QCocoaWindow::recreateWindowIfNeeded()
// Move view to new NSWindow if needed // Move view to new NSWindow if needed
if (newWindow) { if (newWindow) {
qCDebug(lcQpaCocoaWindow) << "Ensuring that" << m_view << "is content view for" << newWindow; qCDebug(lcQpaWindow) << "Ensuring that" << m_view << "is content view for" << newWindow;
[m_view setPostsFrameChangedNotifications:NO]; [m_view setPostsFrameChangedNotifications:NO];
[newWindow setContentView:m_view]; [newWindow setContentView:m_view];
[m_view setPostsFrameChangedNotifications:YES]; [m_view setPostsFrameChangedNotifications:YES];
@ -1331,7 +1331,7 @@ void QCocoaWindow::recreateWindowIfNeeded()
void QCocoaWindow::requestUpdate() void QCocoaWindow::requestUpdate()
{ {
qCDebug(lcQpaCocoaDrawing) << "QCocoaWindow::requestUpdate" << window(); qCDebug(lcQpaDrawing) << "QCocoaWindow::requestUpdate" << window();
[qnsview_cast(m_view) requestUpdate]; [qnsview_cast(m_view) requestUpdate];
} }
@ -1357,7 +1357,7 @@ QCocoaNSWindow *QCocoaWindow::createNSWindow(bool shouldBePanel)
} }
if (!targetScreen) { if (!targetScreen) {
qCWarning(lcQpaCocoaWindow) << "Window position outside any known screen, using primary screen"; qCWarning(lcQpaWindow) << "Window position outside any known screen, using primary screen";
targetScreen = QGuiApplication::primaryScreen(); targetScreen = QGuiApplication::primaryScreen();
} }

View File

@ -363,7 +363,7 @@ Q_LOGGING_CATEGORY(lcQpaTablet, "qt.qpa.input.tablet")
for (int i = 0; i < numDirtyRects; ++i) for (int i = 0; i < numDirtyRects; ++i)
exposedRegion += QRectF::fromCGRect(dirtyRects[i]).toRect(); exposedRegion += QRectF::fromCGRect(dirtyRects[i]).toRect();
qCDebug(lcQpaCocoaDrawing) << "[QNSView drawRect:]" << m_platformWindow->window() << exposedRegion; qCDebug(lcQpaDrawing) << "[QNSView drawRect:]" << m_platformWindow->window() << exposedRegion;
[self updateRegion:exposedRegion]; [self updateRegion:exposedRegion];
} }
@ -380,7 +380,7 @@ Q_LOGGING_CATEGORY(lcQpaTablet, "qt.qpa.input.tablet")
if (m_updateRequested) { if (m_updateRequested) {
Q_ASSERT(windowPrivate->updateRequestPending); Q_ASSERT(windowPrivate->updateRequestPending);
qCDebug(lcQpaCocoaWindow) << "Delivering update request to" << m_platformWindow->window(); qCDebug(lcQpaWindow) << "Delivering update request to" << m_platformWindow->window();
windowPrivate->deliverUpdateRequest(); windowPrivate->deliverUpdateRequest();
m_updateRequested = false; m_updateRequested = false;
} else { } else {
@ -392,7 +392,7 @@ Q_LOGGING_CATEGORY(lcQpaTablet, "qt.qpa.input.tablet")
// but AppKit will reset the needsDisplay state of the view after completing // 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. // the current display cycle, so we need to defer the request to redisplay.
// FIXME: Perhaps this should be a trigger to enable CADisplayLink? // FIXME: Perhaps this should be a trigger to enable CADisplayLink?
qCDebug(lcQpaCocoaDrawing) << "[QNSView drawRect:] issuing deferred setNeedsDisplay due to pending update request"; qCDebug(lcQpaDrawing) << "[QNSView drawRect:] issuing deferred setNeedsDisplay due to pending update request";
dispatch_async(dispatch_get_main_queue (), ^{ [self requestUpdate]; }); dispatch_async(dispatch_get_main_queue (), ^{ [self requestUpdate]; });
} }
} }
@ -407,7 +407,7 @@ Q_LOGGING_CATEGORY(lcQpaTablet, "qt.qpa.input.tablet")
if (!m_platformWindow) if (!m_platformWindow)
return; return;
qCDebug(lcQpaCocoaDrawing) << "[QNSView updateLayer]" << m_platformWindow->window(); qCDebug(lcQpaDrawing) << "[QNSView updateLayer]" << m_platformWindow->window();
// FIXME: Find out if there's a way to resolve the dirty rect like in drawRect: // FIXME: Find out if there's a way to resolve the dirty rect like in drawRect:
[self updateRegion:QRectF::fromCGRect(self.bounds).toRect()]; [self updateRegion:QRectF::fromCGRect(self.bounds).toRect()];
@ -846,7 +846,7 @@ Q_LOGGING_CATEGORY(lcQpaTablet, "qt.qpa.input.tablet")
- (void)cursorUpdate:(NSEvent *)theEvent - (void)cursorUpdate:(NSEvent *)theEvent
{ {
qCDebug(lcQpaCocoaMouse) << "[QNSView cursorUpdate:]" << self.cursor; qCDebug(lcQpaMouse) << "[QNSView cursorUpdate:]" << self.cursor;
// Note: We do not get this callback when moving from a subview that // 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 // uses the legacy cursorRect API, so the cursor is reset to the arrow
@ -1363,7 +1363,7 @@ static QTabletEvent::TabletDevice wacomTabletDevice(NSEvent *theEvent)
// "isInverted": natural OS X scrolling, inverted from the Qt/other platform/Jens perspective. // "isInverted": natural OS X scrolling, inverted from the Qt/other platform/Jens perspective.
bool isInverted = [theEvent isDirectionInvertedFromDevice]; bool isInverted = [theEvent isDirectionInvertedFromDevice];
qCDebug(lcQpaCocoaMouse) << "scroll wheel @ window pos" << qt_windowPoint << "delta px" << pixelDelta << "angle" << angleDelta << "phase" << ph << (isInverted ? "inverted" : ""); qCDebug(lcQpaMouse) << "scroll wheel @ window pos" << qt_windowPoint << "delta px" << pixelDelta << "angle" << angleDelta << "phase" << ph << (isInverted ? "inverted" : "");
QWindowSystemInterface::handleWheelEvent(m_platformWindow->window(), qt_timestamp, qt_windowPoint, qt_screenPoint, pixelDelta, angleDelta, currentWheelModifiers, ph, source, isInverted); QWindowSystemInterface::handleWheelEvent(m_platformWindow->window(), qt_timestamp, qt_windowPoint, qt_screenPoint, pixelDelta, angleDelta, currentWheelModifiers, ph, source, isInverted);
} }
#endif // QT_CONFIG(wheelevent) #endif // QT_CONFIG(wheelevent)

View File

@ -45,7 +45,7 @@
#include <qpa/qwindowsysteminterface.h> #include <qpa/qwindowsysteminterface.h>
#include <qoperatingsystemversion.h> #include <qoperatingsystemversion.h>
Q_LOGGING_CATEGORY(lcCocoaEvents, "qt.qpa.cocoa.events"); Q_LOGGING_CATEGORY(lcQpaEvents, "qt.qpa.events");
static bool isMouseEvent(NSEvent *ev) static bool isMouseEvent(NSEvent *ev)
{ {
@ -201,7 +201,7 @@ static bool isMouseEvent(NSEvent *ev)
- (void)sendEvent:(NSEvent*)theEvent - (void)sendEvent:(NSEvent*)theEvent
{ {
qCDebug(lcCocoaEvents) << "Sending" << theEvent << "to" << self; qCDebug(lcQpaEvents) << "Sending" << theEvent << "to" << self;
// We might get events for a NSWindow after the corresponding platform // We might get events for a NSWindow after the corresponding platform
// window has been deleted, as the NSWindow can outlive the QCocoaWindow // window has been deleted, as the NSWindow can outlive the QCocoaWindow
@ -238,7 +238,7 @@ static bool isMouseEvent(NSEvent *ev)
- (void)closeAndRelease - (void)closeAndRelease
{ {
qCDebug(lcQpaCocoaWindow) << "closeAndRelease" << self; qCDebug(lcQpaWindow) << "closeAndRelease" << self;
[self.delegate release]; [self.delegate release];
self.delegate = nil; self.delegate = nil;
@ -251,7 +251,7 @@ static bool isMouseEvent(NSEvent *ev)
#pragma clang diagnostic ignored "-Wobjc-missing-super-calls" #pragma clang diagnostic ignored "-Wobjc-missing-super-calls"
- (void)dealloc - (void)dealloc
{ {
qCDebug(lcQpaCocoaWindow) << "dealloc" << self; qCDebug(lcQpaWindow) << "dealloc" << self;
qt_objcDynamicSuper(); qt_objcDynamicSuper();
} }
#pragma clang diagnostic pop #pragma clang diagnostic pop