diff options
author | Frederik Gladhorn <frederik.gladhorn@digia.com> | 2013-02-20 11:50:04 +0100 |
---|---|---|
committer | Frederik Gladhorn <frederik.gladhorn@digia.com> | 2013-02-20 22:08:29 +0100 |
commit | dcb710dd87ab15c3af803133ff2449902dbec036 (patch) | |
tree | 1f3ed87165f05e45260ff45fb15d5df96d684abb /src/plugins | |
parent | 4606ea53958df33fffba680dd75c8b1733ca9f40 (diff) | |
parent | e47c2744e6cefa42fc70320e07d534742934f737 (diff) |
Merge remote-tracking branch 'origin/stable' into dev
Conflicts:
mkspecs/features/unix/separate_debug_info.prf
src/gui/kernel/qwindow_p.h
src/plugins/platforms/cocoa/qcocoacursor.mm
tests/auto/tools/moc/tst_moc.cpp
Change-Id: Ieb57834c00f961a747ffe51e6eb9fc9612cebccf
Diffstat (limited to 'src/plugins')
-rw-r--r-- | src/plugins/platforms/cocoa/qcocoacursor.h | 1 | ||||
-rw-r--r-- | src/plugins/platforms/cocoa/qcocoacursor.mm | 9 | ||||
-rw-r--r-- | src/plugins/platforms/qnx/qqnxwindow.cpp | 9 |
3 files changed, 17 insertions, 2 deletions
diff --git a/src/plugins/platforms/cocoa/qcocoacursor.h b/src/plugins/platforms/cocoa/qcocoacursor.h index f8829c53e6..dfa1fcff81 100644 --- a/src/plugins/platforms/cocoa/qcocoacursor.h +++ b/src/plugins/platforms/cocoa/qcocoacursor.h @@ -53,6 +53,7 @@ class QCocoaCursor : public QPlatformCursor { public: QCocoaCursor(); + ~QCocoaCursor(); virtual void changeCursor(QCursor * widgetCursor, QWindow * widget); virtual QPoint pos() const; diff --git a/src/plugins/platforms/cocoa/qcocoacursor.mm b/src/plugins/platforms/cocoa/qcocoacursor.mm index 85ac083d3c..12808b7041 100644 --- a/src/plugins/platforms/cocoa/qcocoacursor.mm +++ b/src/plugins/platforms/cocoa/qcocoacursor.mm @@ -49,6 +49,10 @@ QT_BEGIN_NAMESPACE QCocoaCursor::QCocoaCursor() { +} + +QCocoaCursor::~QCocoaCursor() +{ // release cursors QHash<Qt::CursorShape, NSCursor *>::const_iterator i = m_cursors.constBegin(); while (i != m_cursors.constEnd()) { @@ -97,10 +101,15 @@ void QCocoaCursor::changeCursor(QCursor *cursor, QWindow *window) break; case Qt::DragLinkCursor: [[NSCursor dragLinkCursor] set]; + break; default : { // No suitable OS cursor exist, use cursors provided // by Qt for the rest. Check for a cached cursor: NSCursor *cocoaCursor = m_cursors.value(newShape); + if (cocoaCursor && cursor->shape() == Qt::BitmapCursor) { + [cocoaCursor release]; + cocoaCursor = 0; + } if (cocoaCursor == 0) { cocoaCursor = createCursorData(cursor); if (cocoaCursor == 0) { diff --git a/src/plugins/platforms/qnx/qqnxwindow.cpp b/src/plugins/platforms/qnx/qqnxwindow.cpp index 2cee666e23..ab9c94772b 100644 --- a/src/plugins/platforms/qnx/qqnxwindow.cpp +++ b/src/plugins/platforms/qnx/qqnxwindow.cpp @@ -335,7 +335,11 @@ void QQnxWindow::setBufferSize(const QSize &size) // Set window buffer size errno = 0; - int val[2] = { size.width(), size.height() }; + + // libscreen fails when creating empty buffers + const QSize nonEmptySize = size.isEmpty() ? QSize(1, 1) : size; + + int val[2] = { nonEmptySize.width(), nonEmptySize.height() }; int result = screen_set_window_property_iv(m_window, SCREEN_PROPERTY_BUFFER_SIZE, val); if (result != 0) { qFatal("QQnxWindow: failed to set window buffer size, errno=%d", errno); @@ -362,6 +366,7 @@ void QQnxWindow::setBufferSize(const QSize &size) errno = 0; result = screen_create_window_buffers(m_window, MAX_BUFFER_COUNT); if (result != 0) { + qWarning() << "QQnxWindow: Buffer size was" << size; qFatal("QQnxWindow: failed to create window buffers, errno=%d", errno); } @@ -380,7 +385,7 @@ void QQnxWindow::setBufferSize(const QSize &size) } // Cache new buffer size - m_bufferSize = size; + m_bufferSize = nonEmptySize; // Buffers were destroyed; reacquire them m_currentBufferIndex = -1; |