From 5016615e334c56458ad28d66e227094e3b224901 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Thu, 27 Jun 2013 12:21:21 +0200 Subject: Fix system tray icon on X11. Observe Qt::BypassWindowManagerHint in XCB and use it for the tray. Remove the call to XSync(), which sometimes was causing the window to appear in the wrong place for a short time. Task-number: QTBUG-31762 Change-Id: I7b4fc5e42b8c8bb9d03b1575be99d6d1c727be37 Reviewed-by: Shawn Rutledge --- src/widgets/util/qsystemtrayicon_x11.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/widgets') diff --git a/src/widgets/util/qsystemtrayicon_x11.cpp b/src/widgets/util/qsystemtrayicon_x11.cpp index e04656974d..5204b85a9a 100644 --- a/src/widgets/util/qsystemtrayicon_x11.cpp +++ b/src/widgets/util/qsystemtrayicon_x11.cpp @@ -153,16 +153,17 @@ private: QSystemTrayIcon *q; }; -QSystemTrayIconSys::QSystemTrayIconSys(QSystemTrayIcon *qIn) : - q(qIn) +QSystemTrayIconSys::QSystemTrayIconSys(QSystemTrayIcon *qIn) + : QWidget(0, Qt::Window | Qt::FramelessWindowHint | Qt::BypassWindowManagerHint) + , q(qIn) { + setObjectName(QStringLiteral("QSystemTrayIconSys")); setToolTip(q->toolTip()); QX11SystemTrayContext *context = qX11SystemTrayContext(); Q_ASSERT(context->isValid()); setAttribute(Qt::WA_AlwaysShowToolTips, true); setAttribute(Qt::WA_TranslucentBackground, true); setAttribute(Qt::WA_QuitOnClose, false); - setWindowFlags(Qt::Window | Qt::FramelessWindowHint); const QSize size(22, 22); // Gnome, standard size setGeometry(QRect(QPoint(0, 0), size)); setMinimumSize(size); @@ -182,7 +183,6 @@ QSystemTrayIconSys::QSystemTrayIconSys(QSystemTrayIcon *qIn) : ev.xclient.format = 32; memcpy((char *)&ev.xclient.data, (const char *) l, sizeof(l)); XSendEvent(display, ev.xclient.window, False, 0, &ev); - XSync(display, False); show(); } -- cgit v1.2.3 From cfd207212de785d98fe716fec2158417ba0a9fdf Mon Sep 17 00:00:00 2001 From: J-P Nurmi Date: Thu, 27 Jun 2013 15:42:08 +0200 Subject: Fix the cursor position of an empty QLineEdit with a placeholder text Task-number: QTBUG-32061 Change-Id: I43b689d8d7bc3c93036de48518f7a0f9f2aa33cf Reviewed-by: Gabriel de Dietrich --- src/widgets/widgets/qlineedit.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/widgets') diff --git a/src/widgets/widgets/qlineedit.cpp b/src/widgets/widgets/qlineedit.cpp index d44e9ad02f..70083d7267 100644 --- a/src/widgets/widgets/qlineedit.cpp +++ b/src/widgets/widgets/qlineedit.cpp @@ -1808,9 +1808,9 @@ void QLineEdit::paintEvent(QPaintEvent *) col.setAlpha(128); QPen oldpen = p.pen(); p.setPen(col); - lineRect.adjust(minLB, 0, 0, 0); - QString elidedText = fm.elidedText(d->placeholderText, Qt::ElideRight, lineRect.width()); - p.drawText(lineRect, va, elidedText); + QRect ph = lineRect.adjusted(minLB, 0, 0, 0); + QString elidedText = fm.elidedText(d->placeholderText, Qt::ElideRight, ph.width()); + p.drawText(ph, va, elidedText); p.setPen(oldpen); } } -- cgit v1.2.3 From 64a7ac344ee324d47b96b411482b666cc619633f Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Fri, 28 Jun 2013 13:15:13 -0700 Subject: Deal with unused functions, as found by the Intel compiler Use Q_DECL_UNUSED for the one that is possibly unused (we have two overloads so that one gets selected): qglobal.cpp(2069): warning #177: function "::fromstrerror_helper(int, const QByteArray &)" was declared but never referenced Remove functions really not used: qbezier.cpp(153): warning #177: function "findInflections" was declared but never referenced qbezier.cpp(534): warning #177: function "splitBezierAt" was declared but never referenced qpathclipper.cpp(1039): warning #177: function "midPoint" was declared but never referenced qpainter.cpp(119): warning #177: function "check_gradient" was declared but never referenced qdockarealayout.cpp(2580): warning #177: function "qMin(int, int, int)" was declared but never referenced qmainwindowlayout.cpp(1019): warning #177: function "validateDockWidgetArea" was declared but never referenced qgraphicsanchorlayout_p.cpp(670): warning #177: function "checkAdd" was declared but never referenced qcups.cpp(481): warning #177: function "paperSize2String" was declared but never referenced complexwidgets.cpp(373): warning #177: function "removeInvisibleWidgetsFromList" was declared but never referenced Change-Id: I1e5558e206b04edea381442030dc69536198d966 Reviewed-by: Frederik Gladhorn Reviewed-by: Robin Burchell --- src/widgets/graphicsview/qgraphicsanchorlayout_p.cpp | 14 -------------- src/widgets/widgets/qdockarealayout.cpp | 1 - src/widgets/widgets/qmainwindowlayout.cpp | 13 ------------- 3 files changed, 28 deletions(-) (limited to 'src/widgets') diff --git a/src/widgets/graphicsview/qgraphicsanchorlayout_p.cpp b/src/widgets/graphicsview/qgraphicsanchorlayout_p.cpp index e281e4a7a3..93fb968d69 100644 --- a/src/widgets/graphicsview/qgraphicsanchorlayout_p.cpp +++ b/src/widgets/graphicsview/qgraphicsanchorlayout_p.cpp @@ -660,20 +660,6 @@ Qt::AnchorPoint QGraphicsAnchorLayoutPrivate::oppositeEdge(Qt::AnchorPoint edge) } -/*! - * \internal - * - * helper function in order to avoid overflowing anchor sizes - * the returned size will never be larger than FLT_MAX - * - */ -inline static qreal checkAdd(qreal a, qreal b) -{ - if (FLT_MAX - b < a) - return FLT_MAX; - return a + b; -} - /*! \internal diff --git a/src/widgets/widgets/qdockarealayout.cpp b/src/widgets/widgets/qdockarealayout.cpp index ca831f5a39..ac061e7071 100644 --- a/src/widgets/widgets/qdockarealayout.cpp +++ b/src/widgets/widgets/qdockarealayout.cpp @@ -2577,7 +2577,6 @@ void QDockAreaLayout::remove(const QList &path) docks[index].remove(path.mid(1)); } -static inline int qMin(int i1, int i2, int i3) { return qMin(i1, qMin(i2, i3)); } static inline int qMax(int i1, int i2, int i3) { return qMax(i1, qMax(i2, i3)); } void QDockAreaLayout::getGrid(QVector *_ver_struct_list, diff --git a/src/widgets/widgets/qmainwindowlayout.cpp b/src/widgets/widgets/qmainwindowlayout.cpp index cfeb0e2c67..92a1274d7c 100644 --- a/src/widgets/widgets/qmainwindowlayout.cpp +++ b/src/widgets/widgets/qmainwindowlayout.cpp @@ -1016,19 +1016,6 @@ void QMainWindowLayout::toggleToolBarsVisible() #ifndef QT_NO_DOCKWIDGET -static inline void validateDockWidgetArea(Qt::DockWidgetArea &area) -{ - switch (area) { - case Qt::LeftDockWidgetArea: - case Qt::RightDockWidgetArea: - case Qt::TopDockWidgetArea: - case Qt::BottomDockWidgetArea: - break; - default: - area = Qt::LeftDockWidgetArea; - } -} - static QInternal::DockPosition toDockPos(Qt::DockWidgetArea area) { switch (area) { -- cgit v1.2.3 From 9f763d2fbe00425fc622bd6c5087acbca9fd3c90 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Fri, 28 Jun 2013 13:36:57 -0700 Subject: Remove unused variables (as found by ICC) qgraphicsscene.cpp(1814): warning #177: variable "v1" was declared but never referenced Change-Id: I8f14bb47f00ec0c56b2fe0794a71edfc872b3daa Reviewed-by: Robin Burchell --- src/widgets/graphicsview/qgraphicsscene.cpp | 4 ---- 1 file changed, 4 deletions(-) (limited to 'src/widgets') diff --git a/src/widgets/graphicsview/qgraphicsscene.cpp b/src/widgets/graphicsview/qgraphicsscene.cpp index 88cccb5118..394c24d671 100644 --- a/src/widgets/graphicsview/qgraphicsscene.cpp +++ b/src/widgets/graphicsview/qgraphicsscene.cpp @@ -1810,10 +1810,6 @@ void QGraphicsScene::render(QPainter *painter, const QRectF &target, const QRect .translate(-sourceRect.left(), -sourceRect.top()); painter->setWorldTransform(painterTransform, true); - // Two unit vectors. - QLineF v1(0, 0, 1, 0); - QLineF v2(0, 0, 0, 1); - // Generate the style options QStyleOptionGraphicsItem *styleOptionArray = new QStyleOptionGraphicsItem[numItems]; for (int i = 0; i < numItems; ++i) -- cgit v1.2.3 From 032d2c9e8eaa98ba191d5f90fa7509ebdf846ed1 Mon Sep 17 00:00:00 2001 From: Gunnar Sletta Date: Wed, 26 Jun 2013 15:38:05 +0200 Subject: Fix dropshadow and blur graphics effects. The effects are making assumptions about implementation details of the paint engine, which had changed between Qt 4 and Qt 5. The engines no longer implement the pixmap filters and so the assumption made here was wrong and should be removed. Task-number: QTBUG-29945 Change-Id: I146d8c8cc12842a323bd613288003afcf89a47c7 Reviewed-by: Friedemann Kleint --- src/widgets/effects/qgraphicseffect.cpp | 4 ---- 1 file changed, 4 deletions(-) (limited to 'src/widgets') diff --git a/src/widgets/effects/qgraphicseffect.cpp b/src/widgets/effects/qgraphicseffect.cpp index ac873709e1..420392c0fb 100644 --- a/src/widgets/effects/qgraphicseffect.cpp +++ b/src/widgets/effects/qgraphicseffect.cpp @@ -864,8 +864,6 @@ void QGraphicsBlurEffect::draw(QPainter *painter) } PixmapPadMode mode = PadToEffectiveBoundingRect; - if (painter->paintEngine()->type() == QPaintEngine::OpenGL2) - mode = NoPad; QPoint offset; QPixmap pixmap = sourcePixmap(Qt::LogicalCoordinates, &offset, mode); @@ -1057,8 +1055,6 @@ void QGraphicsDropShadowEffect::draw(QPainter *painter) } PixmapPadMode mode = PadToEffectiveBoundingRect; - if (painter->paintEngine()->type() == QPaintEngine::OpenGL2) - mode = NoPad; // Draw pixmap in device coordinates to avoid pixmap scaling. QPoint offset; -- cgit v1.2.3 From 40894d28748e6f1299180652e4235eafb59ea102 Mon Sep 17 00:00:00 2001 From: Parker Coates Date: Thu, 20 Jun 2013 11:31:42 -0300 Subject: Fix rotation of text in vertical QDockWidget titlebars in QFusionStyle. Presumably this was just an omission when QFusionStyle was first written. These three lines were taken directly from the equivalent portion of QWindowsStyle and seem to work as expected. Task-number: QTBUG-31904 Change-Id: I2f288d3cf2bfa3fe4f7f4a71e2726a172ec8e1b3 Reviewed-by: Jens Bache-Wiig --- src/widgets/styles/qfusionstyle.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/widgets') diff --git a/src/widgets/styles/qfusionstyle.cpp b/src/widgets/styles/qfusionstyle.cpp index 41046a1254..149a5c6674 100644 --- a/src/widgets/styles/qfusionstyle.cpp +++ b/src/widgets/styles/qfusionstyle.cpp @@ -1219,6 +1219,10 @@ void QFusionStyle::drawControl(ControlElement element, const QStyleOption *optio - titleRect.bottom(), r.top() + titleRect.left() - rect.left(), titleRect.height(), titleRect.width()); + + painter->translate(r.left(), r.top() + r.width()); + painter->rotate(-90); + painter->translate(-r.left(), -r.top()); } if (!dwOpt->title.isEmpty()) { -- cgit v1.2.3 From 17fe17d525ffde65fcbe88c6ade539ab8bca1772 Mon Sep 17 00:00:00 2001 From: J-P Nurmi Date: Thu, 27 Jun 2013 13:31:34 +0200 Subject: Set correct cell when selecting custom color cell with arrow keys Correct cell is now set when selecting a custom color cell with arrow keys so that the custom coor is actually added to the selected cell (as with mouse events). Task-number: QTBUG-32054 Change-Id: Ic271a0be76070b4f5364954b2dfe464964c1380b Reviewed-by: Friedemann Kleint --- src/widgets/dialogs/qcolordialog.cpp | 11 ++++++++++- src/widgets/dialogs/qcolordialog.h | 1 + src/widgets/dialogs/qcolordialog_p.h | 1 + 3 files changed, 12 insertions(+), 1 deletion(-) (limited to 'src/widgets') diff --git a/src/widgets/dialogs/qcolordialog.cpp b/src/widgets/dialogs/qcolordialog.cpp index 79a71599c0..c08a034d9e 100644 --- a/src/widgets/dialogs/qcolordialog.cpp +++ b/src/widgets/dialogs/qcolordialog.cpp @@ -134,6 +134,7 @@ public: signals: void selected(int row, int col); + void currentChanged(int row, int col); protected: virtual void paintCell(QPainter *, int row, int col, const QRect&); @@ -309,6 +310,8 @@ void QWellArray::setCurrent(int row, int col) updateCell(oldRow, oldCol); updateCell(curRow, curCol); + + emit currentChanged(curRow, curCol); } /* @@ -342,6 +345,7 @@ void QWellArray::setSelected(int row, int col) void QWellArray::focusInEvent(QFocusEvent*) { updateCell(curRow, curCol); + emit currentChanged(curRow, curCol); } void QWellArray::setCellBrush(int row, int col, const QBrush &b) @@ -1426,11 +1430,15 @@ void QColorDialogPrivate::_q_newColorTypedIn(QRgb rgb) lp->setCol(h, s, v); } +void QColorDialogPrivate::_q_nextCustom(int r, int c) +{ + nextCust = r + 2 * c; +} + void QColorDialogPrivate::_q_newCustom(int r, int c) { const int i = r + 2 * c; setCurrentColor(QColorDialogOptions::customColor(i)); - nextCust = i; if (standard) standard->setSelected(-1,-1); } @@ -1494,6 +1502,7 @@ void QColorDialogPrivate::init(const QColor &initial) custom->setAcceptDrops(true); q->connect(custom, SIGNAL(selected(int,int)), SLOT(_q_newCustom(int,int))); + q->connect(custom, SIGNAL(currentChanged(int,int)), SLOT(_q_nextCustom(int,int))); lblCustomColors = new QLabel(q); #ifndef QT_NO_SHORTCUT lblCustomColors->setBuddy(custom); diff --git a/src/widgets/dialogs/qcolordialog.h b/src/widgets/dialogs/qcolordialog.h index 80a31c4268..f6dc627a05 100644 --- a/src/widgets/dialogs/qcolordialog.h +++ b/src/widgets/dialogs/qcolordialog.h @@ -120,6 +120,7 @@ private: Q_PRIVATE_SLOT(d_func(), void _q_addCustom()) Q_PRIVATE_SLOT(d_func(), void _q_newHsv(int h, int s, int v)) Q_PRIVATE_SLOT(d_func(), void _q_newColorTypedIn(QRgb rgb)) + Q_PRIVATE_SLOT(d_func(), void _q_nextCustom(int, int)) Q_PRIVATE_SLOT(d_func(), void _q_newCustom(int, int)) Q_PRIVATE_SLOT(d_func(), void _q_newStandard(int, int)) friend class QColorShower; diff --git a/src/widgets/dialogs/qcolordialog_p.h b/src/widgets/dialogs/qcolordialog_p.h index 900b38fc61..695e95d26c 100644 --- a/src/widgets/dialogs/qcolordialog_p.h +++ b/src/widgets/dialogs/qcolordialog_p.h @@ -98,6 +98,7 @@ public: void _q_newHsv(int h, int s, int v); void _q_newColorTypedIn(QRgb rgb); + void _q_nextCustom(int, int); void _q_newCustom(int, int); void _q_newStandard(int, int); -- cgit v1.2.3 From 563c9445d4df8d38f776daf46a8132f90981e6d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Thu, 4 Jul 2013 15:44:53 +0200 Subject: Clean up evaluation license logic MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Instead of storing the application type as a uint, we use the enum provided by QCoreApplicationPrivate. The former resulted in a few cases of wrong logic where the values got mixed up, such as always printing the QtCore console warning, even for GUI applications. The qt_eval_is_supported function has been refactored to return enums instead of magic values, to make the logic easier to read. The same goes for qt_eval_days_left, which now only concerns itself with the number of days left. qt_eval_is_expired() has been added to use for easy checking of expiration date. Reviewed-by: Thiago Macieira Change-Id: Ia0e85b2103f790a7e02e0d6e567a477b3145fcb9 Reviewed-by: Tor Arne Vestbø --- src/widgets/kernel/qapplication.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/widgets') diff --git a/src/widgets/kernel/qapplication.cpp b/src/widgets/kernel/qapplication.cpp index 61f3b6b8eb..777342d7ae 100644 --- a/src/widgets/kernel/qapplication.cpp +++ b/src/widgets/kernel/qapplication.cpp @@ -556,7 +556,7 @@ void QApplicationPrivate::construct() eventDispatcher->startingUp(); #ifdef QT_EVAL - extern void qt_gui_eval_init(uint); + extern void qt_gui_eval_init(QCoreApplicationPrivate::Type); qt_gui_eval_init(application_type); #endif -- cgit v1.2.3 From a096b4680dca367ec26725d064eba1df6c37d6b7 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Wed, 3 Jul 2013 16:16:17 +0200 Subject: Search toplevel when setting the active window from focus window. Task-number: QTBUG-32177 Task-number: QTBUG-32180 Change-Id: I44bea8c15636d788d85d6cbfa737aca5901c532c Reviewed-by: Shawn Rutledge --- src/widgets/kernel/qapplication_qpa.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/widgets') diff --git a/src/widgets/kernel/qapplication_qpa.cpp b/src/widgets/kernel/qapplication_qpa.cpp index 2761c84a8d..852b6b9697 100644 --- a/src/widgets/kernel/qapplication_qpa.cpp +++ b/src/widgets/kernel/qapplication_qpa.cpp @@ -126,6 +126,8 @@ bool QApplicationPrivate::modalState() QWidget *qt_tlw_for_window(QWindow *wnd) { + while (wnd && !wnd->isTopLevel()) // QTBUG-32177, wnd might be a QQuickView embedded via window container. + wnd = wnd->parent(); if (wnd) foreach (QWidget *tlw, qApp->topLevelWidgets()) if (tlw->windowHandle() == wnd) -- cgit v1.2.3 From 6dec40628b48c673bff8d8fb341ddfdae9189f64 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thorbj=C3=B8rn=20Martsum?= Date: Sun, 7 Jul 2013 14:59:27 +0200 Subject: QComboBox - optimize (improve stupid code at enter-key) There is no need to do a search for an item if we already have the correct index. Change-Id: Iac0e7df7573b71b82aa491acb8e289fe02fb3285 Reviewed-by: J-P Nurmi --- src/widgets/widgets/qcombobox.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/widgets') diff --git a/src/widgets/widgets/qcombobox.cpp b/src/widgets/widgets/qcombobox.cpp index 6103b9b4c2..c59edf295c 100644 --- a/src/widgets/widgets/qcombobox.cpp +++ b/src/widgets/widgets/qcombobox.cpp @@ -1136,10 +1136,9 @@ Qt::MatchFlags QComboBoxPrivate::matchFlags() const void QComboBoxPrivate::_q_editingFinished() { Q_Q(QComboBox); - if (lineEdit && !lineEdit->text().isEmpty()) { - //here we just check if the current item was entered + if (lineEdit && !lineEdit->text().isEmpty() && itemText(currentIndex) != lineEdit->text()) { const int index = q_func()->findText(lineEdit->text(), matchFlags()); - if (index != -1 && itemText(currentIndex) != lineEdit->text()) { + if (index != -1) { q->setCurrentIndex(index); emitActivated(currentIndex); } -- cgit v1.2.3 From b4008713a2a6229de6d15b1f4050167bf6664e64 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Wed, 10 Jul 2013 14:13:39 +0200 Subject: Windows/ActiveQt: Pass native parent handle property from widget to widget window. Task-number: QTBUG-31672 Task-number: QTBUG-32343 Change-Id: I6b1eca13248da06db739b1a8356a0259f7f4ae6c Reviewed-by: Miikka Heikkinen Reviewed-by: Oliver Wolff --- src/widgets/kernel/qwidget_qpa.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/widgets') diff --git a/src/widgets/kernel/qwidget_qpa.cpp b/src/widgets/kernel/qwidget_qpa.cpp index dafe7dc42a..f0846bea6b 100644 --- a/src/widgets/kernel/qwidget_qpa.cpp +++ b/src/widgets/kernel/qwidget_qpa.cpp @@ -887,6 +887,10 @@ void QWidgetPrivate::deleteSysExtra() } +#ifdef Q_OS_WIN +static const char activeXNativeParentHandleProperty[] = "_q_embedded_native_parent_handle"; +#endif + void QWidgetPrivate::createTLSysExtra() { Q_Q(QWidget); @@ -897,6 +901,10 @@ void QWidgetPrivate::createTLSysExtra() if (extra->maxw != QWIDGETSIZE_MAX || extra->maxh != QWIDGETSIZE_MAX) extra->topextra->window->setMaximumSize(QSize(extra->maxw, extra->maxh)); #ifdef Q_OS_WIN + // Pass on native parent handle for Widget embedded into Active X. + const QVariant activeXNativeParentHandle = q->property(activeXNativeParentHandleProperty); + if (activeXNativeParentHandle.isValid()) + extra->topextra->window->setProperty(activeXNativeParentHandleProperty, activeXNativeParentHandle); if (q->inherits("QTipLabel") || q->inherits("QAlphaWidget")) extra->topextra->window->setProperty("_q_windowsDropShadow", QVariant(true)); #endif -- cgit v1.2.3 From 1ff0ac9415f7933b9fc9043646028897d87cbdb1 Mon Sep 17 00:00:00 2001 From: Mitch Curtis Date: Wed, 10 Jul 2013 13:20:53 +0200 Subject: Fix typo in setGraphicsEffect() occurrences. Change-Id: Iaca926ab47670616b55b0ab7ab735710237a5df8 Reviewed-by: Jerome Pasion --- src/widgets/graphicsview/qgraphicsitem.cpp | 2 +- src/widgets/kernel/qwidget.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src/widgets') diff --git a/src/widgets/graphicsview/qgraphicsitem.cpp b/src/widgets/graphicsview/qgraphicsitem.cpp index 668436c1a2..1c15905ff0 100644 --- a/src/widgets/graphicsview/qgraphicsitem.cpp +++ b/src/widgets/graphicsview/qgraphicsitem.cpp @@ -2741,7 +2741,7 @@ QGraphicsEffect *QGraphicsItem::graphicsEffect() const the new \a effect. You can delete an existing effect by calling setGraphicsEffect(0). - If \a effect is the installed on a different item, setGraphicsEffect() will remove + If \a effect is the installed effect on a different item, setGraphicsEffect() will remove the effect from the item and install it on this item. QGraphicsItem takes ownership of \a effect. diff --git a/src/widgets/kernel/qwidget.cpp b/src/widgets/kernel/qwidget.cpp index c6bd387a90..7cb0979c06 100644 --- a/src/widgets/kernel/qwidget.cpp +++ b/src/widgets/kernel/qwidget.cpp @@ -4836,7 +4836,7 @@ QGraphicsEffect *QWidget::graphicsEffect() const on this widget, QWidget will delete the existing effect before installing the new \a effect. - If \a effect is the installed on a different widget, setGraphicsEffect() will remove + If \a effect is the installed effect on a different widget, setGraphicsEffect() will remove the effect from the widget and install it on this widget. QWidget takes ownership of \a effect. -- cgit v1.2.3