diff options
-rw-r--r-- | dist/changes-4.5.1 | 22 | ||||
-rw-r--r-- | src/gui/kernel/qcocoaview_mac.mm | 4 | ||||
-rw-r--r-- | src/gui/kernel/qwidget_x11.cpp | 4 | ||||
-rw-r--r-- | tests/auto/qtreeview/tst_qtreeview.cpp | 9 |
4 files changed, 35 insertions, 4 deletions
diff --git a/dist/changes-4.5.1 b/dist/changes-4.5.1 index 8d306d9..271f25d 100644 --- a/dist/changes-4.5.1 +++ b/dist/changes-4.5.1 @@ -28,6 +28,19 @@ General Improvements - Embedded Dialogs demo * [246517] Fixed warnings and bugs in hover handling on Mac OS X + +Optimizations +------------- + +- Graphics View has been optimized in several areas + * Improved the performance of QGraphicsItem::clipPath. + * Improved the performance of QGraphicsItem::setPos. + * Improved the performance of QGraphicsItem::effectiveOpacity. + * Improved the performance of QGrahicsScene::items(*). + * Improved update handling. + * Reduced the number of floating point operations. + * Reduced QVariant overhead. + Third party components ---------------------- @@ -316,6 +329,10 @@ Qt for Linux/X11 * Event posted to a thread before it is started are not processed until others events are posted. +- QWidget + * [213512] Fixed a bug that would cause wrong clipping when using the + Qt::WA_PaintOutsidePaintEvent attribute. + Qt for Windows -------------- @@ -331,6 +348,10 @@ Qt for Windows * [248036] Fixed an issue where tool buttons would incorrectly hover when disabled. +- QWidget + * [248391] Fixed a bug that made it impossible to dynamically switch + from QPainter based graphics to native graphics API and back. + - [249576] Fixed a crash when using a combobox with Qt::NoFocus. - [244875] System menu will now be shown for a fullscreen window. - [240891] Corrected the focus behavior of native file dialogs, when application has multiple toplevels. @@ -357,6 +378,7 @@ Qt for Mac OS X * Fixed a bug where the drag cursor was not updated when modifier keys are used. * [247947] Fixed a crash in drag and drop. * The command + h shortcut is now enabled. (Hides the current window.) + * [239043] Fixed a bug that would cause QGraphicsProxyWidget to shrink when moving it. - QDesktopWidget * [244004] Support multiple screens that have different sizes properly. diff --git a/src/gui/kernel/qcocoaview_mac.mm b/src/gui/kernel/qcocoaview_mac.mm index 7668d66..e84af90 100644 --- a/src/gui/kernel/qcocoaview_mac.mm +++ b/src/gui/kernel/qcocoaview_mac.mm @@ -630,7 +630,7 @@ extern "C" { for (NSView *lookView in viewsToLookAt) { NSPoint tmpPoint = [lookView convertPoint:windowPoint fromView:nil]; for (NSView *view in [lookView subviews]) { - if (view == mouseView) + if (view == mouseView || [view isHidden]) continue; NSRect frameRect = [view frame]; if (NSMouseInRect(tmpPoint, [view frame], [view isFlipped])) @@ -649,7 +649,7 @@ extern "C" { NSPoint tmpPoint = [viewForDescent convertPoint:windowPoint fromView:nil]; // Apply same rule as above wrt z-order. for (NSView *view in [viewForDescent subviews]) { - if (NSMouseInRect(tmpPoint, [view frame], [view isFlipped])) + if (![view isHidden] && NSMouseInRect(tmpPoint, [view frame], [view isFlipped])) lowerView = view; } if (!lowerView) // Low as we can be at this point. diff --git a/src/gui/kernel/qwidget_x11.cpp b/src/gui/kernel/qwidget_x11.cpp index ea8af93..76734d4 100644 --- a/src/gui/kernel/qwidget_x11.cpp +++ b/src/gui/kernel/qwidget_x11.cpp @@ -1750,8 +1750,8 @@ void QWidgetPrivate::show_sys() mwmhints.functions &= ~MWM_FUNC_RESIZE; } - mwmhints.flags |= MWM_HINTS_DECORATIONS; if (mwmhints.decorations == MWM_DECOR_ALL) { + mwmhints.flags |= MWM_HINTS_DECORATIONS; mwmhints.decorations = (MWM_DECOR_BORDER | MWM_DECOR_TITLE | MWM_DECOR_MENU); @@ -1760,10 +1760,12 @@ void QWidgetPrivate::show_sys() } if (q->windowFlags() & Qt::WindowMinimizeButtonHint) { + mwmhints.flags |= MWM_HINTS_DECORATIONS; mwmhints.decorations |= MWM_DECOR_MINIMIZE; mwmhints.functions |= MWM_FUNC_MINIMIZE; } if (q->windowFlags() & Qt::WindowMaximizeButtonHint) { + mwmhints.flags |= MWM_HINTS_DECORATIONS; mwmhints.decorations |= MWM_DECOR_MAXIMIZE; mwmhints.functions |= MWM_FUNC_MAXIMIZE; } diff --git a/tests/auto/qtreeview/tst_qtreeview.cpp b/tests/auto/qtreeview/tst_qtreeview.cpp index d9296ad..655ea4e 100644 --- a/tests/auto/qtreeview/tst_qtreeview.cpp +++ b/tests/auto/qtreeview/tst_qtreeview.cpp @@ -1674,9 +1674,16 @@ void tst_QTreeView::moveCursor() view.setColumnHidden(0, true); QVERIFY(view.isColumnHidden(0)); view.show(); + qApp->setActiveWindow(&view); - QModelIndex actual = view.moveCursor(PublicView::MoveDown, Qt::NoModifier); + //here the first visible index should be selected + //because the view got the focus QModelIndex expected = model.index(1, 1, QModelIndex()); + QCOMPARE(view.currentIndex(), expected); + + //then pressing down should go to the next line + QModelIndex actual = view.moveCursor(PublicView::MoveDown, Qt::NoModifier); + expected = model.index(2, 1, QModelIndex()); QCOMPARE(actual, expected); view.setRowHidden(0, QModelIndex(), false); |