From d32f47b70387713335656a8e93f289c819fb9b05 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Wed, 3 Jun 2015 17:04:53 +0200 Subject: fix usage of wince scope Fix style issues along the way. Change-Id: Ic6a6de28e198eb0b14c198b802e78845703909b9 Reviewed-by: Joerg Bornemann --- src/widgets/dialogs/dialogs.pri | 2 +- src/widgets/kernel/kernel.pri | 2 +- src/widgets/kernel/win.pri | 2 +- src/widgets/util/util.pri | 2 +- src/widgets/widgets.pro | 2 +- src/widgets/widgets/widgets.pri | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) (limited to 'src/widgets') diff --git a/src/widgets/dialogs/dialogs.pri b/src/widgets/dialogs/dialogs.pri index 53d1985fb5..a5b4883db8 100644 --- a/src/widgets/dialogs/dialogs.pri +++ b/src/widgets/dialogs/dialogs.pri @@ -25,7 +25,7 @@ win32 { SOURCES += dialogs/qwizard_win.cpp } -wince*: FORMS += dialogs/qfiledialog_embedded.ui +wince: FORMS += dialogs/qfiledialog_embedded.ui else: FORMS += dialogs/qfiledialog.ui INCLUDEPATH += $$PWD diff --git a/src/widgets/kernel/kernel.pri b/src/widgets/kernel/kernel.pri index 21a982f349..0060ad2d31 100644 --- a/src/widgets/kernel/kernel.pri +++ b/src/widgets/kernel/kernel.pri @@ -69,7 +69,7 @@ macx: { SOURCES += kernel/qmacgesturerecognizer.cpp } -wince*: { +wince { HEADERS += \ ../corelib/kernel/qfunctions_wince.h \ kernel/qwidgetsfunctions_wince.h diff --git a/src/widgets/kernel/win.pri b/src/widgets/kernel/win.pri index 76bb709e2b..e2d5afdeec 100644 --- a/src/widgets/kernel/win.pri +++ b/src/widgets/kernel/win.pri @@ -2,6 +2,6 @@ # -------------------------------------------------------------------- INCLUDEPATH += ../3rdparty/wintab -!wince*:!winrt { +!wince:!winrt { LIBS_PRIVATE *= -lshell32 } diff --git a/src/widgets/util/util.pri b/src/widgets/util/util.pri index b4bbc5fc30..9f43dc42f0 100644 --- a/src/widgets/util/util.pri +++ b/src/widgets/util/util.pri @@ -27,7 +27,7 @@ SOURCES += \ util/qundostack.cpp \ util/qundoview.cpp -win32:!wince*:!winrt { +win32:!wince:!winrt { SOURCES += util/qsystemtrayicon_win.cpp } else:contains(QT_CONFIG, xcb) { SOURCES += util/qsystemtrayicon_x11.cpp diff --git a/src/widgets/widgets.pro b/src/widgets/widgets.pro index d819436f66..ceb6f96f7c 100644 --- a/src/widgets/widgets.pro +++ b/src/widgets/widgets.pro @@ -1,5 +1,5 @@ TARGET = QtWidgets -wince*:ORIG_TARGET = $$TARGET +wince: ORIG_TARGET = $$TARGET QT = core-private gui-private MODULE_CONFIG = uic diff --git a/src/widgets/widgets/widgets.pri b/src/widgets/widgets/widgets.pri index 342d2093db..c31a7f7682 100644 --- a/src/widgets/widgets/widgets.pri +++ b/src/widgets/widgets/widgets.pri @@ -154,7 +154,7 @@ macx { widgets/qmaccocoaviewcontainer_mac.mm } -wince*: { +wince { SOURCES += widgets/qmenu_wince.cpp HEADERS += widgets/qmenu_wince_resource_p.h RC_FILE = widgets/qmenu_wince.rc -- cgit v1.2.3 From 6468cf4e79cca74fa3704c1a1c03fc5da3778416 Mon Sep 17 00:00:00 2001 From: Alexander Volkov Date: Tue, 10 Feb 2015 17:43:03 +0300 Subject: Fix centering dialogs QDialog::setVisible() tries to adjusts the dialog position, but it's not really possible if the dialog size is not defined yet. Besides, if the dialog window is not created, QWidget::move() will not really move it and will set WA_PendingMoveEvent flag. And QWidget::setVisible() also will not change the position, because we reset WA_Moved flag. Thus it may break adjusting the position in QDialog::showEvent(). So adjust the position only in QDialog::showEvent(). Task-number: QTBUG-36185 Task-number: QTBUG-39259 Task-number: QTBUG-41844 Change-Id: I015a19f2e533f68178f4ee7519b17f5e9b5def7b Reviewed-by: Timur Pocheptsov --- src/widgets/dialogs/qdialog.cpp | 7 ------- 1 file changed, 7 deletions(-) (limited to 'src/widgets') diff --git a/src/widgets/dialogs/qdialog.cpp b/src/widgets/dialogs/qdialog.cpp index 6676a3ccba..68a419afc9 100644 --- a/src/widgets/dialogs/qdialog.cpp +++ b/src/widgets/dialogs/qdialog.cpp @@ -720,13 +720,6 @@ void QDialog::setVisible(bool visible) if (testAttribute(Qt::WA_WState_ExplicitShowHide) && !testAttribute(Qt::WA_WState_Hidden)) return; - if (!testAttribute(Qt::WA_Moved)) { - Qt::WindowStates state = windowState(); - adjustPosition(parentWidget()); - setAttribute(Qt::WA_Moved, false); // not really an explicit position - if (state != windowState()) - setWindowState(state); - } QWidget::setVisible(visible); showExtension(d->doShowExtension); QWidget *fw = window()->focusWidget(); -- cgit v1.2.3 From eb926dc31f2a3e7fa287889ba478225ed2498a39 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Fri, 29 May 2015 14:02:03 +0200 Subject: QSwipeGestureRecognizer: Allow for small direction changes. When trying to do a straight right/left/up/down swipe, a minimal change in the other direction caused to the gesture to be canceled. Introduce a threshold for checking such to prevent this. Task-number: QTBUG-46195 Change-Id: I3e199f2ec0c81d23a16073b1f5b8fff004958239 Reviewed-by: Shawn Rutledge --- src/widgets/kernel/qstandardgestures.cpp | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) (limited to 'src/widgets') diff --git a/src/widgets/kernel/qstandardgestures.cpp b/src/widgets/kernel/qstandardgestures.cpp index d19e473d18..3d6ae3f322 100644 --- a/src/widgets/kernel/qstandardgestures.cpp +++ b/src/widgets/kernel/qstandardgestures.cpp @@ -334,23 +334,27 @@ QGestureRecognizer::Result QSwipeGestureRecognizer::recognize(QGesture *state, d->swipeAngle = QLineF(p1.startScreenPos(), p1.screenPos()).angle(); static const int MoveThreshold = 50; + static const int directionChangeThreshold = MoveThreshold / 8; if (qAbs(xDistance) > MoveThreshold || qAbs(yDistance) > MoveThreshold) { // measure the distance to check if the direction changed d->lastPositions[0] = p1.screenPos().toPoint(); d->lastPositions[1] = p2.screenPos().toPoint(); d->lastPositions[2] = p3.screenPos().toPoint(); - QSwipeGesture::SwipeDirection horizontal = - xDistance > 0 ? QSwipeGesture::Right : QSwipeGesture::Left; - QSwipeGesture::SwipeDirection vertical = - yDistance > 0 ? QSwipeGesture::Down : QSwipeGesture::Up; - if (d->verticalDirection == QSwipeGesture::NoDirection) + result = QGestureRecognizer::TriggerGesture; + // QTBUG-46195, small changes in direction should not cause the gesture to be canceled. + if (d->verticalDirection == QSwipeGesture::NoDirection || qAbs(yDistance) > directionChangeThreshold) { + const QSwipeGesture::SwipeDirection vertical = yDistance > 0 + ? QSwipeGesture::Down : QSwipeGesture::Up; + if (d->verticalDirection != QSwipeGesture::NoDirection && d->verticalDirection != vertical) + result = QGestureRecognizer::CancelGesture; d->verticalDirection = vertical; - if (d->horizontalDirection == QSwipeGesture::NoDirection) + } + if (d->horizontalDirection == QSwipeGesture::NoDirection || qAbs(xDistance) > directionChangeThreshold) { + const QSwipeGesture::SwipeDirection horizontal = xDistance > 0 + ? QSwipeGesture::Right : QSwipeGesture::Left; + if (d->horizontalDirection != QSwipeGesture::NoDirection && d->horizontalDirection != horizontal) + result = QGestureRecognizer::CancelGesture; d->horizontalDirection = horizontal; - if (d->verticalDirection != vertical || d->horizontalDirection != horizontal) { - result = QGestureRecognizer::CancelGesture; - } else { - result = QGestureRecognizer::TriggerGesture; } } else { if (q->state() != Qt::NoGesture) -- cgit v1.2.3 From 81054b117b5a3d0d9e4d17a531b453515410432b Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Mon, 8 Jun 2015 11:12:50 +0200 Subject: Inline QSpacerItem::sizePolicy() There's zero reason not to do it, esp. given how small a QSizePolicy is. Change-Id: I88b92bb27e6341b60a2cb3f2ddcc232f25f03ca8 Reviewed-by: Lars Knoll --- src/widgets/kernel/qlayoutitem.cpp | 5 +---- src/widgets/kernel/qlayoutitem.h | 2 +- 2 files changed, 2 insertions(+), 5 deletions(-) (limited to 'src/widgets') diff --git a/src/widgets/kernel/qlayoutitem.cpp b/src/widgets/kernel/qlayoutitem.cpp index 21f4c9a221..3d444136e3 100644 --- a/src/widgets/kernel/qlayoutitem.cpp +++ b/src/widgets/kernel/qlayoutitem.cpp @@ -332,14 +332,11 @@ QSpacerItem * QSpacerItem::spacerItem() } /*! + \fn QSizePolicy QSpacerItem::sizePolicy() const \since 5.5 Returns the size policy of this item. */ -QSizePolicy QSpacerItem::sizePolicy() const -{ - return sizeP; -} /*! If this item is a QWidget, it is returned as a QWidget; otherwise diff --git a/src/widgets/kernel/qlayoutitem.h b/src/widgets/kernel/qlayoutitem.h index eaa129a85b..650e114c76 100644 --- a/src/widgets/kernel/qlayoutitem.h +++ b/src/widgets/kernel/qlayoutitem.h @@ -102,7 +102,7 @@ public: void setGeometry(const QRect&); QRect geometry() const; QSpacerItem *spacerItem(); - QSizePolicy sizePolicy() const; + QSizePolicy sizePolicy() const { return sizeP; } private: int width; -- cgit v1.2.3 From aec2b28eea3354ec80350e25f4305c74ca9bc184 Mon Sep 17 00:00:00 2001 From: Shawn Rutledge Date: Tue, 16 Jun 2015 15:09:09 +0200 Subject: OSX: show file dialog in showCocoaFilePanel, don't wait for exec() This reverts commit 21e6c7ae4745a76b676dfaa9fe17a2dd40fc0c5c because in QtQuick.Controls, we do not call exec(): we just set the dialog visible. If it is a sheet, then it is already acting as a modal dialog, basically. Task-number: QTBUG-46691 Change-Id: I7fe89f2a2ade0d4ddcf540c9bfc4f5963a077471 Reviewed-by: Timur Pocheptsov --- src/widgets/dialogs/qdialog.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'src/widgets') diff --git a/src/widgets/dialogs/qdialog.cpp b/src/widgets/dialogs/qdialog.cpp index 6676a3ccba..65def6d4b8 100644 --- a/src/widgets/dialogs/qdialog.cpp +++ b/src/widgets/dialogs/qdialog.cpp @@ -534,10 +534,7 @@ int QDialog::exec() QPointer guard = this; if (d->nativeDialogInUse) { - if (windowModality() == Qt::WindowModal) - d->platformHelper()->execModalForWindow(d->parentWindow()); - else - d->platformHelper()->exec(); + d->platformHelper()->exec(); } else { QEventLoop eventLoop; d->eventLoop = &eventLoop; -- cgit v1.2.3 From 56aad2ad6074237537fecf10d0cda0f3872e7f71 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Thu, 18 Jun 2015 10:08:01 +0200 Subject: Fix global coordinate mapping for child widgets in QGraphicsView. Move the code path handling widgets embedded in QGraphicsProxyWidget into the loop moving up the parent hierarchy. Add child widget to test. Task-number: QTBUG-41135 Change-Id: Ibd86413faaa927145a85a2f5864f162979135053 Reviewed-by: Marc Mutz --- src/widgets/kernel/qwidget.cpp | 46 ++++++++++++++++++++++-------------------- 1 file changed, 24 insertions(+), 22 deletions(-) (limited to 'src/widgets') diff --git a/src/widgets/kernel/qwidget.cpp b/src/widgets/kernel/qwidget.cpp index e701eb07ba..88d7cdce76 100644 --- a/src/widgets/kernel/qwidget.cpp +++ b/src/widgets/kernel/qwidget.cpp @@ -12264,20 +12264,21 @@ QPaintEngine *QWidget::paintEngine() const */ QPoint QWidget::mapToGlobal(const QPoint &pos) const { -#ifndef QT_NO_GRAPHICSVIEW - Q_D(const QWidget); - if (d->extra && d->extra->proxyWidget && d->extra->proxyWidget->scene()) { - const QList views = d->extra->proxyWidget->scene()->views(); - if (!views.isEmpty()) { - const QPointF scenePos = d->extra->proxyWidget->mapToScene(pos); - const QPoint viewPortPos = views.first()->mapFromScene(scenePos); - return views.first()->viewport()->mapToGlobal(viewPortPos); - } - } -#endif // !QT_NO_GRAPHICSVIEW int x = pos.x(), y = pos.y(); const QWidget *w = this; while (w) { +#ifndef QT_NO_GRAPHICSVIEW + const QWidgetPrivate *d = w->d_func(); + if (d->extra && d->extra->proxyWidget && d->extra->proxyWidget->scene()) { + const QList views = d->extra->proxyWidget->scene()->views(); + if (!views.isEmpty()) { + const QPointF scenePos = d->extra->proxyWidget->mapToScene(QPoint(x, y)); + const QPoint viewPortPos = views.first()->mapFromScene(scenePos); + return views.first()->viewport()->mapToGlobal(viewPortPos); + } + } +#endif // !QT_NO_GRAPHICSVIEW + QWindow *window = w->windowHandle(); if (window && window->handle()) return window->mapToGlobal(QPoint(x, y)); @@ -12299,20 +12300,21 @@ QPoint QWidget::mapToGlobal(const QPoint &pos) const */ QPoint QWidget::mapFromGlobal(const QPoint &pos) const { -#ifndef QT_NO_GRAPHICSVIEW - Q_D(const QWidget); - if (d->extra && d->extra->proxyWidget && d->extra->proxyWidget->scene()) { - const QList views = d->extra->proxyWidget->scene()->views(); - if (!views.isEmpty()) { - const QPoint viewPortPos = views.first()->viewport()->mapFromGlobal(pos); - const QPointF scenePos = views.first()->mapToScene(viewPortPos); - return d->extra->proxyWidget->mapFromScene(scenePos).toPoint(); - } - } -#endif // !QT_NO_GRAPHICSVIEW int x = pos.x(), y = pos.y(); const QWidget *w = this; while (w) { +#ifndef QT_NO_GRAPHICSVIEW + const QWidgetPrivate *d = w->d_func(); + if (d->extra && d->extra->proxyWidget && d->extra->proxyWidget->scene()) { + const QList views = d->extra->proxyWidget->scene()->views(); + if (!views.isEmpty()) { + const QPoint viewPortPos = views.first()->viewport()->mapFromGlobal(QPoint(x, y)); + const QPointF scenePos = views.first()->mapToScene(viewPortPos); + return d->extra->proxyWidget->mapFromScene(scenePos).toPoint(); + } + } +#endif // !QT_NO_GRAPHICSVIEW + QWindow *window = w->windowHandle(); if (window && window->handle()) return window->mapFromGlobal(QPoint(x, y)); -- cgit v1.2.3 From f0fecf7b61433595ee53de7685f6a4c47bbed6e1 Mon Sep 17 00:00:00 2001 From: Laszlo Agocs Date: Fri, 19 Jun 2015 10:51:38 +0200 Subject: Fix incorrect warning message in QOpenGLWidget MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I3b99894171a3e63b75a14357a1be0c0dd1f45e93 Reviewed-by: Jørgen Lind --- src/widgets/kernel/qopenglwidget.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/widgets') diff --git a/src/widgets/kernel/qopenglwidget.cpp b/src/widgets/kernel/qopenglwidget.cpp index 9bfdc62e60..1ee28f2e9a 100644 --- a/src/widgets/kernel/qopenglwidget.cpp +++ b/src/widgets/kernel/qopenglwidget.cpp @@ -639,7 +639,7 @@ GLuint QOpenGLWidgetPrivate::textureId() const Q_Q(const QOpenGLWidget); if (!q->isWindow() && q->internalWinId()) { qWarning() << "QOpenGLWidget cannot be used as a native child widget." - << "Consider setting Qt::AA_DontCreateNativeWidgetAncestors and Siblings."; + << "Consider setting Qt::WA_DontCreateNativeAncestors and Qt::AA_DontCreateNativeWidgetSiblings."; return 0; } return resolvedFbo ? resolvedFbo->texture() : (fbo ? fbo->texture() : 0); -- cgit v1.2.3 From e1b7c55a43ed62fb558cb3895865cef2b2d63fe6 Mon Sep 17 00:00:00 2001 From: Nico Vertriest Date: Wed, 10 Jun 2015 09:49:29 +0200 Subject: Doc: rearrange tables with overflow Task-number: QTBUG-46475 Change-Id: Id599b2eb0dee0c003475c094ad61700150e37e65 Reviewed-by: Venugopal Shivashankar --- .../doc/snippets/code/doc_src_stylesheet.qdoc | 12 ++++++---- src/widgets/doc/src/model-view-programming.qdoc | 28 +++++++++++----------- src/widgets/doc/src/widgets-tutorial.qdoc | 2 ++ 3 files changed, 24 insertions(+), 18 deletions(-) (limited to 'src/widgets') diff --git a/src/widgets/doc/snippets/code/doc_src_stylesheet.qdoc b/src/widgets/doc/snippets/code/doc_src_stylesheet.qdoc index ef9f1fe919..efb0b33cd1 100644 --- a/src/widgets/doc/snippets/code/doc_src_stylesheet.qdoc +++ b/src/widgets/doc/snippets/code/doc_src_stylesheet.qdoc @@ -360,7 +360,8 @@ QSpinBox::down-button { height: 10px } //! [59] -/* implicitly sets the size of down-button to the size of spindown.png */ +// implicitly sets the size of down-button to the +// size of spindown.png QSpinBox::down-button { image: url(:/images/spindown.png) } //! [59] @@ -489,7 +490,8 @@ QDialog { etch-disabled-text: 1 } QLabel { border-color: red } /* red red red red */ QLabel { border-color: red blue } /* red blue red blue */ QLabel { border-color: red blue green } /* red blue green blue */ -QLabel { border-color: red blue green yellow } /* red blue green yellow */ +QLabel { border-color: red blue green yellow } +/* red blue green yellow */ //! [82] @@ -522,7 +524,8 @@ QTextEdit { /* linear gradient from white to green */ QTextEdit { background: qlineargradient(x1:0, y1:0, x2:1, y2:1, - stop:0 white, stop: 0.4 rgba(10, 20, 30, 40), stop:1 rgb(0, 200, 230, 200)) + stop:0 white, stop: 0.4 rgba(10, 20, 30, 40), + stop:1 rgb(0, 200, 230, 200)) } @@ -549,7 +552,8 @@ QTextEdit { QMessageBox { dialogbuttonbox-buttons-have-icons: true; dialog-ok-icon: url(ok.svg); - dialog-cancel-icon: url(cancel.png), url(grayed_cancel.png) disabled; + dialog-cancel-icon: url(cancel.png), + url(grayed_cancel.png) disabled; } //! [86] diff --git a/src/widgets/doc/src/model-view-programming.qdoc b/src/widgets/doc/src/model-view-programming.qdoc index 8fee91f0e5..098bb39fe2 100644 --- a/src/widgets/doc/src/model-view-programming.qdoc +++ b/src/widgets/doc/src/model-view-programming.qdoc @@ -354,7 +354,7 @@ the above code indicates, we need to supply more information when obtaining a model index. - \table + \table 70% \row \li \inlineimage modelview-tablemodel.png \li \b{Rows and columns} @@ -386,7 +386,7 @@ \snippet code/doc_src_model-view-programming.cpp 3 - \table + \table 70% \row \li \inlineimage modelview-treemodel.png \li \b{Parents, rows, and columns} @@ -417,7 +417,7 @@ \snippet code/doc_src_model-view-programming.cpp 6 - \table + \table 70% \row \li \inlineimage modelview-roles.png \li \b{Item roles} @@ -902,7 +902,7 @@ The table below highlights the differences between current item and selected items. - \table + \table 70% \header \li Current Item \li Selected Items @@ -1557,7 +1557,7 @@ of items. The selection mode works in the same way for all of the above widgets. - \table + \table 70% \row \li \image selection-single.png \li \b{Single item selections:} @@ -1957,7 +1957,7 @@ To provide read-only access to data provided by a model, the following functions \e{must} be implemented in the model's subclass: - \table 90% + \table 70% \row \li \l{QAbstractItemModel::flags()}{flags()} \li Used by other components to obtain information about each item provided by the model. In many models, the combination of flags should include @@ -1982,7 +1982,7 @@ Additionally, the following functions \e{must} be implemented in direct subclasses of QAbstractTableModel and QAbstractItemModel: - \table 90% + \table 70% \row \li \l{QAbstractItemModel::columnCount()}{columnCount()} \li Provides the number of columns of data exposed by the model. List models do not provide this function because it is already implemented in QAbstractListModel. @@ -1994,7 +1994,7 @@ functions to allow rows and columns to be inserted and removed. To enable editing, the following functions must be implemented correctly: - \table 90% + \table 70% \row \li \l{QAbstractItemModel::flags()}{flags()} \li Must return an appropriate combination of flags for each item. In particular, the value returned by this function must include \l{Qt::ItemIsEditable} in @@ -2024,7 +2024,7 @@ ensure that the appropriate functions are called to notify attached views and delegates: - \table 90% + \table 70% \row \li \l{QAbstractItemModel::insertRows()}{insertRows()} \li Used to add new rows and items of data to all types of model. Implementations must call @@ -2119,7 +2119,7 @@ structure, it is up to each model subclass to create its own model indexes by providing implementations of the following functions: - \table 90% + \table 70% \row \li \l{QAbstractItemModel::index()}{index()} \li Given a model index for a parent item, this function allows views and delegates to access children of that item. If no valid child item - corresponding to the @@ -2164,7 +2164,7 @@ The following types are used to store information about each item as it is streamed into a QByteArray and stored in a QMimeData object: - \table 90% + \table 70% \header \li Description \li Type \row \li Row \li int \row \li Column \li int @@ -2180,7 +2180,7 @@ export items of data in specialized formats by reimplementing the following function: - \table 90% + \table 70% \row \li \l{QAbstractItemModel::mimeData()}{mimeData()} \li This function can be reimplemented to return data in formats other than the default \c{application/x-qabstractitemmodeldatalist} internal @@ -2215,7 +2215,7 @@ To take advantage of QAbstractItemModel's default implementation for the built-in MIME type, new models must provide reimplementations of the following functions: - \table 90% + \table 70% \row \li \l{QAbstractItemModel::insertRows()}{insertRows()} \li {1, 2} These functions enable the model to automatically insert new data using the existing implementation provided by QAbstractItemModel::dropMimeData(). @@ -2228,7 +2228,7 @@ To accept other forms of data, these functions must be reimplemented: - \table 90% + \table 70% \row \li \l{QAbstractItemModel::supportedDropActions()}{supportedDropActions()} \li Used to return a combination of \l{Qt::DropActions}{drop actions}, indicating the types of drag and drop operations that the model accepts. diff --git a/src/widgets/doc/src/widgets-tutorial.qdoc b/src/widgets/doc/src/widgets-tutorial.qdoc index 31d8c612e9..1734f57712 100644 --- a/src/widgets/doc/src/widgets-tutorial.qdoc +++ b/src/widgets/doc/src/widgets-tutorial.qdoc @@ -160,6 +160,7 @@ \table \row \li \snippet tutorials/widgets/childwidget/main.cpp main program + \row \li \inlineimage widgets-tutorial-childwidget.png \endtable \enddiv @@ -182,6 +183,7 @@ \table \row \li \snippet tutorials/widgets/windowlayout/main.cpp main program + \row \li \inlineimage widgets-tutorial-windowlayout.png \endtable \enddiv -- cgit v1.2.3 From f1b01b7d159bcf04a2b832dba36f876479669641 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thorbj=C3=B8rn=20Martsum?= Date: Fri, 26 Jun 2015 07:17:03 +0200 Subject: QHeaderView - fix a logical / visual index mismatch f9408317e70bc2e635a2f9baeff35d1c06227734 was unfortunately approved though it had an annoying bug. The patch had an assign of a visual index into a logical index. This patch fixes that issue. Change-Id: I9cc75e4e9701858c92e2c3e5817415041b42f8e8 Reviewed-by: J-P Nurmi --- src/widgets/itemviews/qheaderview.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/widgets') diff --git a/src/widgets/itemviews/qheaderview.cpp b/src/widgets/itemviews/qheaderview.cpp index bca315f80b..4cb28d0804 100644 --- a/src/widgets/itemviews/qheaderview.cpp +++ b/src/widgets/itemviews/qheaderview.cpp @@ -2450,7 +2450,7 @@ void QHeaderView::mouseMoveEvent(QMouseEvent *e) case QHeaderViewPrivate::SelectSections: { int logical = logicalIndexAt(qMax(-d->offset, pos)); if (logical == -1 && pos > 0) - logical = d->lastVisibleVisualIndex(); + logical = logicalIndex(d->lastVisibleVisualIndex()); if (logical == d->pressed) return; // nothing to do else if (d->pressed != -1) -- cgit v1.2.3 From a7f2af09114cfa0996794c85bc48a601f665772d Mon Sep 17 00:00:00 2001 From: Nico Vertriest Date: Thu, 28 May 2015 12:45:48 +0200 Subject: Replace MAC OS X with OS X Task-number: QTBUG-46374 Change-Id: I7bc633ab551740bd328a24b0ccae1d534af47138 Reviewed-by: Martin Smith --- src/widgets/dialogs/qfiledialog.cpp | 10 +++++----- src/widgets/dialogs/qmessagebox.cpp | 18 +++++++++--------- src/widgets/dialogs/qwizard.cpp | 22 +++++++++++----------- src/widgets/doc/snippets/macmainwindow.mm | 2 +- src/widgets/doc/src/graphicsview.qdoc | 2 +- src/widgets/doc/src/widgets-and-layouts/focus.qdoc | 4 ++-- .../doc/src/widgets-and-layouts/styles.qdoc | 2 +- .../doc/src/widgets-and-layouts/stylesheet.qdoc | 8 ++++---- src/widgets/doc/src/widgets-tutorial.qdoc | 2 +- src/widgets/graphicsview/qgraphicssceneevent.cpp | 2 +- src/widgets/itemviews/qfileiconprovider.cpp | 2 +- src/widgets/kernel/qapplication.cpp | 6 +++--- src/widgets/kernel/qdesktopwidget.qdoc | 2 +- src/widgets/kernel/qstandardgestures.cpp | 2 +- src/widgets/kernel/qwidget.cpp | 12 ++++++------ src/widgets/kernel/qwidgetaction.cpp | 4 ++-- src/widgets/styles/qmacstyle.qdoc | 12 ++++++------ src/widgets/styles/qmacstyle_mac.mm | 2 +- src/widgets/styles/qstyle.cpp | 4 ++-- src/widgets/styles/qstyleoption.cpp | 2 +- src/widgets/util/qscroller.cpp | 2 +- src/widgets/util/qsystemtrayicon.cpp | 8 ++++---- src/widgets/widgets/qcombobox.cpp | 2 +- src/widgets/widgets/qdialogbuttonbox.cpp | 4 ++-- src/widgets/widgets/qmaccocoaviewcontainer_mac.mm | 4 ++-- src/widgets/widgets/qmacnativewidget_mac.mm | 4 ++-- src/widgets/widgets/qmainwindow.cpp | 2 +- src/widgets/widgets/qmenu.cpp | 2 +- src/widgets/widgets/qrubberband.cpp | 2 +- src/widgets/widgets/qtabbar.cpp | 2 +- src/widgets/widgets/qtabwidget.cpp | 2 +- src/widgets/widgets/qtoolbar.cpp | 2 +- src/widgets/widgets/qtoolbutton.cpp | 2 +- src/widgets/widgets/qwidgettextcontrol.cpp | 2 +- 34 files changed, 80 insertions(+), 80 deletions(-) (limited to 'src/widgets') diff --git a/src/widgets/dialogs/qfiledialog.cpp b/src/widgets/dialogs/qfiledialog.cpp index a9d5574428..d2666026bb 100644 --- a/src/widgets/dialogs/qfiledialog.cpp +++ b/src/widgets/dialogs/qfiledialog.cpp @@ -2039,7 +2039,7 @@ QString QFileDialog::labelText(DialogLabel label) const The dialog's caption is set to \a caption. If \a caption is not specified then a default caption will be used. - On Windows, and Mac OS X, this static function will use the + On Windows, and OS X, this static function will use the native file dialog and not a QFileDialog. On Windows the dialog will spin a blocking modal event loop that will not @@ -2151,7 +2151,7 @@ QUrl QFileDialog::getOpenFileUrl(QWidget *parent, The dialog's caption is set to \a caption. If \a caption is not specified then a default caption will be used. - On Windows, and Mac OS X, this static function will use the + On Windows, and OS X, this static function will use the native file dialog and not a QFileDialog. On Windows the dialog will spin a blocking modal event loop that will not @@ -2279,12 +2279,12 @@ QList QFileDialog::getOpenFileUrls(QWidget *parent, The dialog's caption is set to \a caption. If \a caption is not specified, a default caption will be used. - On Windows, and Mac OS X, this static function will use the + On Windows, and OS X, this static function will use the native file dialog and not a QFileDialog. On Windows the dialog will spin a blocking modal event loop that will not dispatch any QTimers, and if \a parent is not 0 then it will position the - dialog just below the parent's title bar. On Mac OS X, with its native file + dialog just below the parent's title bar. On OS X, with its native file dialog, the filter argument is ignored. On Unix/X11, the normal behavior of the file dialog is to resolve and @@ -2388,7 +2388,7 @@ QUrl QFileDialog::getSaveFileUrl(QWidget *parent, pass. To ensure a native file dialog, \l{QFileDialog::}{ShowDirsOnly} must be set. - On Windows, and Mac OS X, this static function will use the + On Windows, and OS X, this static function will use the native file dialog and not a QFileDialog. On Windows CE, if the device has no native file dialog, a QFileDialog will be used. diff --git a/src/widgets/dialogs/qmessagebox.cpp b/src/widgets/dialogs/qmessagebox.cpp index 571b01802d..ef9b55acd6 100644 --- a/src/widgets/dialogs/qmessagebox.cpp +++ b/src/widgets/dialogs/qmessagebox.cpp @@ -580,7 +580,7 @@ void QMessageBoxPrivate::_q_clicked(QPlatformDialogHelper::StandardButton button This is the approach recommended in the \l{http://developer.apple.com/library/mac/documentation/UserExperience/Conceptual/AppleHIGuidelines/Windows/Windows.html#//apple_ref/doc/uid/20000961-BABCAJID} - {Mac OS X Guidelines}. Similar guidelines apply for the other + {OS X Guidelines}. Similar guidelines apply for the other platforms, but note the different ways the \l{QMessageBox::informativeText} {informative text} is handled for different platforms. @@ -795,7 +795,7 @@ void QMessageBoxPrivate::_q_clicked(QPlatformDialogHelper::StandardButton button Constructs a message box with no text and no buttons. \a parent is passed to the QDialog constructor. - On Mac OS X, if you want your message box to appear + On OS X, if you want your message box to appear as a Qt::Sheet of its \a parent, set the message box's \l{setWindowModality()} {window modality} to Qt::WindowModal or use open(). Otherwise, the message box will be a standard dialog. @@ -817,7 +817,7 @@ QMessageBox::QMessageBox(QWidget *parent) The message box is an \l{Qt::ApplicationModal} {application modal} dialog box. - On Mac OS X, if \a parent is not 0 and you want your message box + On OS X, if \a parent is not 0 and you want your message box to appear as a Qt::Sheet of that parent, set the message box's \l{setWindowModality()} {window modality} to Qt::WindowModal (default). Otherwise, the message box will be a standard dialog. @@ -985,7 +985,7 @@ QAbstractButton *QMessageBox::button(StandardButton which) const \list 1 \li If there is only one button, it is made the escape button. \li If there is a \l Cancel button, it is made the escape button. - \li On Mac OS X only, if there is exactly one button with the role + \li On OS X only, if there is exactly one button with the role QMessageBox::RejectRole, it is made the escape button. \endlist @@ -1803,7 +1803,7 @@ QMessageBox::StandardButton QMessageBox::critical(QWidget *parent, const QString \li As a last resort it uses the Information icon. \endlist - The about box has a single button labelled "OK". On Mac OS X, the + The about box has a single button labelled "OK". On OS X, the about box is popped up as a modeless window; on other platforms, it is currently application modal. @@ -1857,7 +1857,7 @@ void QMessageBox::about(QWidget *parent, const QString &title, const QString &te QApplication provides this functionality as a slot. - On Mac OS X, the about box is popped up as a modeless window; on + On OS X, the about box is popped up as a modeless window; on other platforms, it is currently application modal. \sa QApplication::aboutQt() @@ -2622,8 +2622,8 @@ void QMessageBox::setInformativeText(const QString &text) This function shadows QWidget::setWindowTitle(). - Sets the title of the message box to \a title. On Mac OS X, - the window title is ignored (as required by the Mac OS X + Sets the title of the message box to \a title. On OS X, + the window title is ignored (as required by the OS X Guidelines). */ void QMessageBox::setWindowTitle(const QString &title) @@ -2644,7 +2644,7 @@ void QMessageBox::setWindowTitle(const QString &title) Sets the modality of the message box to \a windowModality. - On Mac OS X, if the modality is set to Qt::WindowModal and the message box + On OS X, if the modality is set to Qt::WindowModal and the message box has a parent, then the message box will be a Qt::Sheet, otherwise the message box will be a standard dialog. */ diff --git a/src/widgets/dialogs/qwizard.cpp b/src/widgets/dialogs/qwizard.cpp index bf3e44b6a6..139fbc3843 100644 --- a/src/widgets/dialogs/qwizard.cpp +++ b/src/widgets/dialogs/qwizard.cpp @@ -876,7 +876,7 @@ void QWizardPrivate::switchToPage(int newId, Direction direction) /* If there is no default button and the Next or Finish button is enabled, give focus directly to it as a convenience to the - user. This is the normal case on Mac OS X. + user. This is the normal case on OS X. Otherwise, give the focus to the new page's first child that can handle it. If there is no such child, give the focus to @@ -1815,7 +1815,7 @@ void QWizardAntiFlickerWidget::paintEvent(QPaintEvent *) \inmodule QtWidgets - A wizard (also called an assistant on Mac OS X) is a special type + A wizard (also called an assistant on OS X) is a special type of input dialog that consists of a sequence of pages. A wizard's purpose is to guide the user through a process step by step. Wizards are useful for complex or infrequent tasks that users may @@ -2113,10 +2113,10 @@ void QWizardAntiFlickerWidget::paintEvent(QPaintEvent *) This enum specifies the buttons in a wizard. - \value BackButton The \uicontrol Back button (\uicontrol {Go Back} on Mac OS X) - \value NextButton The \uicontrol Next button (\uicontrol Continue on Mac OS X) + \value BackButton The \uicontrol Back button (\uicontrol {Go Back} on OS X) + \value NextButton The \uicontrol Next button (\uicontrol Continue on OS X) \value CommitButton The \uicontrol Commit button - \value FinishButton The \uicontrol Finish button (\uicontrol Done on Mac OS X) + \value FinishButton The \uicontrol Finish button (\uicontrol Done on OS X) \value CancelButton The \uicontrol Cancel button (see also NoCancelButton) \value HelpButton The \uicontrol Help button (see also HaveHelpButton) \value CustomButton1 The first user-defined button (see also HaveCustomButton1) @@ -2156,7 +2156,7 @@ void QWizardAntiFlickerWidget::paintEvent(QPaintEvent *) \value ClassicStyle Classic Windows look \value ModernStyle Modern Windows look - \value MacStyle Mac OS X look + \value MacStyle OS X look \value AeroStyle Windows Aero look \omitvalue NStyles @@ -2629,7 +2629,7 @@ bool QWizard::testOption(WizardOption option) const \list \li Windows: HelpButtonOnRight. - \li Mac OS X: NoDefaultButton and NoCancelButton. + \li OS X: NoDefaultButton and NoCancelButton. \li X11 and QWS (Qt for Embedded Linux): none. \endlist @@ -2673,7 +2673,7 @@ QWizard::WizardOptions QWizard::options() const Sets the text on button \a which to be \a text. By default, the text on buttons depends on the wizardStyle. For - example, on Mac OS X, the \uicontrol Next button is called \uicontrol + example, on OS X, the \uicontrol Next button is called \uicontrol Continue. To add extra buttons to the wizard (e.g., a \uicontrol Print button), @@ -2705,7 +2705,7 @@ void QWizard::setButtonText(WizardButton which, const QString &text) If a text has ben set using setButtonText(), this text is returned. By default, the text on buttons depends on the wizardStyle. For - example, on Mac OS X, the \uicontrol Next button is called \uicontrol + example, on OS X, the \uicontrol Next button is called \uicontrol Continue. \sa button(), setButton(), setButtonText(), QWizardPage::buttonText(), @@ -2891,7 +2891,7 @@ void QWizard::setPixmap(WizardPixmap which, const QPixmap &pixmap) Returns the pixmap set for role \a which. By default, the only pixmap that is set is the BackgroundPixmap on - Mac OS X. + OS X. \sa QWizardPage::pixmap(), {Elements of a Wizard Page} */ @@ -3803,7 +3803,7 @@ void QWizardPage::setButtonText(QWizard::WizardButton which, const QString &text this text is returned. By default, the text on buttons depends on the QWizard::wizardStyle. - For example, on Mac OS X, the \uicontrol Next button is called \uicontrol + For example, on OS X, the \uicontrol Next button is called \uicontrol Continue. \sa setButtonText(), QWizard::buttonText(), QWizard::setButtonText() diff --git a/src/widgets/doc/snippets/macmainwindow.mm b/src/widgets/doc/snippets/macmainwindow.mm index e1df77089c..d0d74631ab 100755 --- a/src/widgets/doc/snippets/macmainwindow.mm +++ b/src/widgets/doc/snippets/macmainwindow.mm @@ -269,7 +269,7 @@ MacMainWindow::MacMainWindow() textedit->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOn); textedit->setText("





This demo shows how to create a \ Qt main window application that has the same appearance as other \ - Mac OS X applications such as Mail or iTunes. This includes \ + OS X applications such as Mail or iTunes. This includes \ customizing the item views and QSplitter and wrapping native widgets \ such as the search field.
"); diff --git a/src/widgets/doc/src/graphicsview.qdoc b/src/widgets/doc/src/graphicsview.qdoc index 3b0d841d53..6895466977 100644 --- a/src/widgets/doc/src/graphicsview.qdoc +++ b/src/widgets/doc/src/graphicsview.qdoc @@ -491,7 +491,7 @@ not supported. For example, you can create decorated windows by passing the Qt::Window window flag to QGraphicsWidget's constructor, but Graphics View currently doesn't support the Qt::Sheet and - Qt::Drawer flags that are common on Mac OS X. + Qt::Drawer flags that are common on OS X. The capabilities of QGraphicsWidget are expected to grow depending on community feedback. diff --git a/src/widgets/doc/src/widgets-and-layouts/focus.qdoc b/src/widgets/doc/src/widgets-and-layouts/focus.qdoc index 7add31a194..d7a2361dda 100644 --- a/src/widgets/doc/src/widgets-and-layouts/focus.qdoc +++ b/src/widgets/doc/src/widgets-and-layouts/focus.qdoc @@ -162,13 +162,13 @@ \section2 The User Rotates the Mouse Wheel On Microsoft Windows, mouse wheel usage is always handled by the - widget that has keyboard focus. On Mac OS X and X11, it's handled by + widget that has keyboard focus. On OS X and X11, it's handled by the widget that gets other mouse events. The way Qt handles this platform difference is by letting widgets move the keyboard focus when the wheel is used. With the right focus policy on each widget, applications can work idiomatically correctly on - Windows, Mac OS X, and X11. + Windows, OS X, and X11. \section2 The User Moves the Focus to This Window diff --git a/src/widgets/doc/src/widgets-and-layouts/styles.qdoc b/src/widgets/doc/src/widgets-and-layouts/styles.qdoc index c15281cb69..0a5a079969 100644 --- a/src/widgets/doc/src/widgets-and-layouts/styles.qdoc +++ b/src/widgets/doc/src/widgets-and-layouts/styles.qdoc @@ -115,7 +115,7 @@ The widget is passed as the last argument in case the style needs it to perform special effects (such as animated default buttons on - Mac OS X), but it isn't mandatory. + OS X), but it isn't mandatory. In the course of this section, we will look at the style elements, the style options, and the functions of QStyle. Finally, we describe diff --git a/src/widgets/doc/src/widgets-and-layouts/stylesheet.qdoc b/src/widgets/doc/src/widgets-and-layouts/stylesheet.qdoc index 8dbc716027..fc3ac345a8 100644 --- a/src/widgets/doc/src/widgets-and-layouts/stylesheet.qdoc +++ b/src/widgets/doc/src/widgets-and-layouts/stylesheet.qdoc @@ -80,7 +80,7 @@ the QPalette::Button role to red for a QPushButton to obtain a red push button. However, this wasn't guaranteed to work for all styles, because style authors are restricted by the different - platforms' guidelines and (on Windows XP and Mac OS X) by the + platforms' guidelines and (on Windows XP and OS X) by the native theme engine. Style sheets let you perform all kinds of customizations that are @@ -121,7 +121,7 @@ \row \li \inlineimage stylesheet-coffee-cleanlooks.png \li \inlineimage stylesheet-pagefold-mac.png \row \li Coffee theme running on Ubuntu Linux - \li Pagefold theme running on Mac OS X + \li Pagefold theme running on OS X \endtable When a style sheet is active, the QStyle returned by QWidget::style() @@ -130,7 +130,7 @@ otherwise forwards the drawing operations to the underlying, platform-specific style (e.g., QWindowsXPStyle on Windows XP). - Since Qt 4.5, Qt style sheets fully supports Mac OS X. + Since Qt 4.5, Qt style sheets fully supports OS X. */ @@ -3745,7 +3745,7 @@ \snippet code/doc_src_stylesheet.qdoc 135 If you want the scroll buttons of the scroll bar to be placed together - (instead of the edges) like on Mac OS X, you can use the following + (instead of the edges) like on OS X, you can use the following stylesheet: \snippet code/doc_src_stylesheet.qdoc 136 diff --git a/src/widgets/doc/src/widgets-tutorial.qdoc b/src/widgets/doc/src/widgets-tutorial.qdoc index 1734f57712..a337a7a487 100644 --- a/src/widgets/doc/src/widgets-tutorial.qdoc +++ b/src/widgets/doc/src/widgets-tutorial.qdoc @@ -110,7 +110,7 @@ make sure that the executable is on your path, or enter its full location. - \li On Linux/Unix and Mac OS X, type \c make and press + \li On Linux/Unix and OS X, type \c make and press \uicontrol{Return}; on Windows with Visual Studio, type \c nmake and press \uicontrol{Return}. diff --git a/src/widgets/graphicsview/qgraphicssceneevent.cpp b/src/widgets/graphicsview/qgraphicssceneevent.cpp index 425bd50d42..071d34280a 100644 --- a/src/widgets/graphicsview/qgraphicssceneevent.cpp +++ b/src/widgets/graphicsview/qgraphicssceneevent.cpp @@ -143,7 +143,7 @@ platforms, this means the right mouse button was clicked. \value Keyboard The keyboard caused this event to be sent. On - Windows and Mac OS X, this means the menu button was pressed. + Windows and OS X, this means the menu button was pressed. \value Other The event was sent by some other means (i.e. not by the mouse or keyboard). diff --git a/src/widgets/itemviews/qfileiconprovider.cpp b/src/widgets/itemviews/qfileiconprovider.cpp index 1cc3a2a905..5bab531290 100644 --- a/src/widgets/itemviews/qfileiconprovider.cpp +++ b/src/widgets/itemviews/qfileiconprovider.cpp @@ -445,7 +445,7 @@ QString QFileIconProvider::type(const QFileInfo &info) const if (info.isSymLink()) #ifdef Q_OS_MAC - return QApplication::translate("QFileDialog", "Alias", "Mac OS X Finder"); + return QApplication::translate("QFileDialog", "Alias", "OS X Finder"); #else return QApplication::translate("QFileDialog", "Shortcut", "All other platforms"); #endif diff --git a/src/widgets/kernel/qapplication.cpp b/src/widgets/kernel/qapplication.cpp index aa7940b623..b9fd6312e7 100644 --- a/src/widgets/kernel/qapplication.cpp +++ b/src/widgets/kernel/qapplication.cpp @@ -1530,7 +1530,7 @@ void QApplicationPrivate::setPalette_helper(const QPalette &palette, const char* \note Some styles do not use the palette for all drawing, for instance, if they make use of native theme engines. This is the case for the Windows XP, - Windows Vista, and Mac OS X styles. + Windows Vista, and OS X styles. \sa QWidget::setPalette(), palette(), QStyle::polish() */ @@ -3229,7 +3229,7 @@ bool QApplication::notify(QObject *receiver, QEvent *e) QApplicationPrivate::giveFocusAccordingToFocusPolicy(w, e, relpos); // ### Qt 5 These dynamic tool tips should be an OPT-IN feature. Some platforms - // like Mac OS X (probably others too), can optimize their views by not + // like OS X (probably others too), can optimize their views by not // dispatching mouse move events. We have attributes to control hover, // and mouse tracking, but as long as we are deciding to implement this // feature without choice of opting-in or out, you ALWAYS have to have @@ -3934,7 +3934,7 @@ bool QApplication::keypadNavigationEnabled() Currently this function does nothing on Qt for Embedded Linux. - On Mac OS X, this works more at the application level and will cause the + On OS X, this works more at the application level and will cause the application icon to bounce in the dock. On Windows, this causes the window's taskbar entry to flash for a time. If diff --git a/src/widgets/kernel/qdesktopwidget.qdoc b/src/widgets/kernel/qdesktopwidget.qdoc index 6ce312dc2f..31a99f1acb 100644 --- a/src/widgets/kernel/qdesktopwidget.qdoc +++ b/src/widgets/kernel/qdesktopwidget.qdoc @@ -149,7 +149,7 @@ Returns the available geometry of the screen with index \a screen. What is available will be subrect of screenGeometry() based on what the platform decides is available (for example excludes the dock and menu bar - on Mac OS X, or the task bar on Windows). The default screen is used if + on OS X, or the task bar on Windows). The default screen is used if \a screen is -1. \sa screenNumber(), screenGeometry() diff --git a/src/widgets/kernel/qstandardgestures.cpp b/src/widgets/kernel/qstandardgestures.cpp index 3d6ae3f322..d7589cc594 100644 --- a/src/widgets/kernel/qstandardgestures.cpp +++ b/src/widgets/kernel/qstandardgestures.cpp @@ -53,7 +53,7 @@ QGesture *QPanGestureRecognizer::create(QObject *target) { if (target && target->isWidgetType()) { #if (defined(Q_OS_MACX) || defined(Q_OS_WIN)) && !defined(QT_NO_NATIVE_GESTURES) - // for scroll areas on Windows and Mac OS X we want to use native gestures instead + // for scroll areas on Windows and OS X we want to use native gestures instead if (!qobject_cast(target->parent())) static_cast(target)->setAttribute(Qt::WA_AcceptTouchEvents); #else diff --git a/src/widgets/kernel/qwidget.cpp b/src/widgets/kernel/qwidget.cpp index 88d7cdce76..bd77e7f616 100644 --- a/src/widgets/kernel/qwidget.cpp +++ b/src/widgets/kernel/qwidget.cpp @@ -2454,7 +2454,7 @@ QWidget *QWidget::find(WId id) If a widget is non-native (alien) and winId() is invoked on it, that widget will be provided a native handle. - On Mac OS X, the type returned depends on which framework Qt was linked + On OS X, the type returned depends on which framework Qt was linked against. If Qt is using Carbon, the {WId} is actually an HIViewRef. If Qt is using Cocoa, {WId} is a pointer to an NSView. @@ -2590,7 +2590,7 @@ QWindow *QWidget::windowHandle() const The style sheet contains a textual description of customizations to the widget's style, as described in the \l{Qt Style Sheets} document. - Since Qt 4.5, Qt style sheets fully supports Mac OS X. + Since Qt 4.5, Qt style sheets fully supports OS X. \warning Qt style sheets are currently not supported for custom QStyle subclasses. We plan to address this in some future release. @@ -5065,7 +5065,7 @@ void QWidget::render(QPaintDevice *target, const QPoint &targetOffset, Transformations and settings applied to the \a painter will be used when rendering. - \note The \a painter must be active. On Mac OS X the widget will be + \note The \a painter must be active. On OS X the widget will be rendered into a QPixmap and then drawn by the \a painter. \sa QPainter::device() @@ -6181,7 +6181,7 @@ QString QWidget::windowIconText() const If the window title is set at any point, then the window title takes precedence and will be shown instead of the file path string. - Additionally, on Mac OS X, this has an added benefit that it sets the + Additionally, on OS X, this has an added benefit that it sets the \l{http://developer.apple.com/documentation/UserExperience/Conceptual/OSXHIGuidelines/XHIGWindows/chapter_17_section_3.html}{proxy icon} for the window, assuming that the file path exists. @@ -11204,7 +11204,7 @@ bool QWidget::testAttribute_helper(Qt::WidgetAttribute attribute) const By default the value of this property is 1.0. - This feature is available on Embedded Linux, Mac OS X, Windows, + This feature is available on Embedded Linux, OS X, Windows, and X11 platforms that support the Composite extension. This feature is not available on Windows CE. @@ -11267,7 +11267,7 @@ void QWidgetPrivate::setWindowOpacity_sys(qreal level) A modified window is a window whose content has changed but has not been saved to disk. This flag will have different effects - varied by the platform. On Mac OS X the close button will have a + varied by the platform. On OS X the close button will have a modified look; on other platforms, the window title will have an '*' (asterisk). diff --git a/src/widgets/kernel/qwidgetaction.cpp b/src/widgets/kernel/qwidgetaction.cpp index 27d4a650b4..3c0c203fd6 100644 --- a/src/widgets/kernel/qwidgetaction.cpp +++ b/src/widgets/kernel/qwidgetaction.cpp @@ -79,8 +79,8 @@ QT_BEGIN_NAMESPACE Note that it is up to the widget to activate the action, for example by reimplementing mouse event handlers and calling QAction::trigger(). - \b {Mac OS X}: If you add a widget to a menu in the application's menu - bar on Mac OS X, the widget will be added and it will function but with some + \b {OS X}: If you add a widget to a menu in the application's menu + bar on OS X, the widget will be added and it will function but with some limitations: \list 1 \li The widget is reparented away from the QMenu to the native menu diff --git a/src/widgets/styles/qmacstyle.qdoc b/src/widgets/styles/qmacstyle.qdoc index 58a185d15c..0800e2d608 100644 --- a/src/widgets/styles/qmacstyle.qdoc +++ b/src/widgets/styles/qmacstyle.qdoc @@ -28,7 +28,7 @@ /*! \class QMacStyle - \brief The QMacStyle class provides a Mac OS X style using the Apple Appearance Manager. + \brief The QMacStyle class provides a OS X style using the Apple Appearance Manager. \ingroup appearance \inmodule QtWidgets @@ -36,10 +36,10 @@ This class is implemented as a wrapper to the HITheme APIs, allowing applications to be styled according to the current - theme in use on Mac OS X. This is done by having primitives - in QStyle implemented in terms of what Mac OS X would normally theme. + theme in use on OS X. This is done by having primitives + in QStyle implemented in terms of what OS X would normally theme. - \warning This style is only available on Mac OS X because it relies on the + \warning This style is only available on OS X because it relies on the HITheme APIs. There are additional issues that should be taken @@ -56,7 +56,7 @@ involve horizontal and vertical widget alignment and widget size (covered below). - \li Widget size - Mac OS X allows widgets to have specific fixed sizes. Qt + \li Widget size - OS X allows widgets to have specific fixed sizes. Qt does not fully implement this behavior so as to maintain cross-platform compatibility. As a result some widgets sizes may be inappropriate (and subsequently not rendered correctly by the HITheme APIs).The @@ -75,7 +75,7 @@ There are other issues that need to be considered in the feel of your application (including the general color scheme to match the Aqua colors). The Guidelines mentioned above will remain current - with new advances and design suggestions for Mac OS X. + with new advances and design suggestions for OS X. Note that the functions provided by QMacStyle are reimplementations of QStyle functions; see QStyle for their diff --git a/src/widgets/styles/qmacstyle_mac.mm b/src/widgets/styles/qmacstyle_mac.mm index 67970ba33d..d9238dc9d5 100644 --- a/src/widgets/styles/qmacstyle_mac.mm +++ b/src/widgets/styles/qmacstyle_mac.mm @@ -7193,7 +7193,7 @@ static CGColorSpaceRef qt_mac_colorSpaceForDeviceType(const QPaintDevice *paintD returned if it can't be obtained. It is the caller's responsibility to CGContextRelease the context when finished using it. - \warning This function is only available on Mac OS X. + \warning This function is only available on OS X. \warning This function is duplicated in the Cocoa platform plugin. */ diff --git a/src/widgets/styles/qstyle.cpp b/src/widgets/styles/qstyle.cpp index 1849331b79..5e51866d8f 100644 --- a/src/widgets/styles/qstyle.cpp +++ b/src/widgets/styles/qstyle.cpp @@ -98,7 +98,7 @@ static int unpackControlTypes(QSizePolicy::ControlTypes controls, QSizePolicy::C The style gets all the information it needs to render the graphical element from the QStyleOption class. The widget is passed as the last argument in case the style needs it to perform - special effects (such as animated default buttons on Mac OS X), + special effects (such as animated default buttons on OS X), but it isn't mandatory. In fact, QStyle can be used to draw on any paint device (not just widgets), in which case the widget argument is a zero pointer. @@ -197,7 +197,7 @@ static int unpackControlTypes(QSizePolicy::ControlTypes controls, QSizePolicy::C QStyle gets all the information it needs to render the graphical element from QStyleOption. The widget is passed as the last argument in case the style needs it to perform special effects - (such as animated default buttons on Mac OS X), but it isn't + (such as animated default buttons on OS X), but it isn't mandatory. In fact, you can use QStyle to draw on any paint device, not just widgets, by setting the QPainter properly. diff --git a/src/widgets/styles/qstyleoption.cpp b/src/widgets/styles/qstyleoption.cpp index f4977103a5..cab56e329e 100644 --- a/src/widgets/styles/qstyleoption.cpp +++ b/src/widgets/styles/qstyleoption.cpp @@ -1739,7 +1739,7 @@ QStyleOptionMenuItem::QStyleOptionMenuItem(int version) \value DefaultItem A menu item that is the default action as specified with \l QMenu::defaultAction(). \value Separator A menu separator. \value SubMenu Indicates the menu item points to a sub-menu. - \value Scroller A popup menu scroller (currently only used on Mac OS X). + \value Scroller A popup menu scroller (currently only used on OS X). \value TearOff A tear-off handle for the menu. \value Margin The margin of the menu. \value EmptyArea The empty area of the menu. diff --git a/src/widgets/util/qscroller.cpp b/src/widgets/util/qscroller.cpp index e3ac7348e7..de12983f21 100644 --- a/src/widgets/util/qscroller.cpp +++ b/src/widgets/util/qscroller.cpp @@ -558,7 +558,7 @@ void QScroller::stop() \note Please note that this value should be physically correct. The actual DPI settings that Qt returns for the display may be reported wrongly on purpose by the underlying - windowing system, for example on Mac OS X. + windowing system, for example on OS X. */ QPointF QScroller::pixelPerMeter() const { diff --git a/src/widgets/util/qsystemtrayicon.cpp b/src/widgets/util/qsystemtrayicon.cpp index dc2737cbf8..358e4c38d6 100644 --- a/src/widgets/util/qsystemtrayicon.cpp +++ b/src/widgets/util/qsystemtrayicon.cpp @@ -76,7 +76,7 @@ QT_BEGIN_NAMESPACE \li All X11 desktop environments that implement the D-Bus \l{http://www.freedesktop.org/wiki/Specifications/StatusNotifierItem/ StatusNotifierItem} specification, including recent versions of KDE and Unity. - \li All supported versions of Mac OS X. Note that the Growl + \li All supported versions of OS X. Note that the Growl notification system must be installed for QSystemTrayIcon::showMessage() to display messages on Mac OS X prior to 10.8 (Mountain Lion). \endlist @@ -157,7 +157,7 @@ QSystemTrayIcon::~QSystemTrayIcon() The menu will pop up when the user requests the context menu for the system tray icon by clicking the mouse button. - On Mac OS X, this is currenly converted to a NSMenu, so the + On OS X, this is currenly converted to a NSMenu, so the aboutToHide() signal is not emitted. \note The system tray icon does not take ownership of the menu. You must @@ -323,7 +323,7 @@ bool QSystemTrayIcon::event(QEvent *e) This signal is emitted when the message displayed using showMessage() was clicked by the user. - Currently this signal is not sent on Mac OS X. + Currently this signal is not sent on OS X. \note We follow Microsoft Windows XP/Vista behavior, so the signal is also emitted when the user clicks on a tray icon with @@ -374,7 +374,7 @@ bool QSystemTrayIcon::supportsMessages() On Windows, the \a millisecondsTimeoutHint is usually ignored by the system when the application has focus. - On Mac OS X, the Growl notification system must be installed for this function to + On OS X, the Growl notification system must be installed for this function to display messages. Has been turned into a slot in Qt 5.2. diff --git a/src/widgets/widgets/qcombobox.cpp b/src/widgets/widgets/qcombobox.cpp index ef80e359df..ba19b63c12 100644 --- a/src/widgets/widgets/qcombobox.cpp +++ b/src/widgets/widgets/qcombobox.cpp @@ -2699,7 +2699,7 @@ void QComboBox::showPopup() qScrollEffect(container, scrollDown ? QEffects::DownScroll : QEffects::UpScroll, 150); #endif -// Don't disable updates on Mac OS X. Windows are displayed immediately on this platform, +// Don't disable updates on OS X. Windows are displayed immediately on this platform, // which means that the window will be visible before the call to container->show() returns. // If updates are disabled at this point we'll miss our chance at painting the popup // menu before it's shown, causing flicker since the window then displays the standard gray diff --git a/src/widgets/widgets/qdialogbuttonbox.cpp b/src/widgets/widgets/qdialogbuttonbox.cpp index 3e8c08f923..5b6bfb3b3c 100644 --- a/src/widgets/widgets/qdialogbuttonbox.cpp +++ b/src/widgets/widgets/qdialogbuttonbox.cpp @@ -118,7 +118,7 @@ QT_BEGIN_NAMESPACE \endtable Additionally, button boxes that contain only buttons with ActionRole or - HelpRole can be considered modeless and have an alternate look on Mac OS X: + HelpRole can be considered modeless and have an alternate look on OS X: \table \row \li modeless horizontal MacLayout @@ -583,7 +583,7 @@ QDialogButtonBox::~QDialogButtonBox() contained in the button box. \value WinLayout Use a policy appropriate for applications on Windows. - \value MacLayout Use a policy appropriate for applications on Mac OS X. + \value MacLayout Use a policy appropriate for applications on OS X. \value KdeLayout Use a policy appropriate for applications on KDE. \value GnomeLayout Use a policy appropriate for applications on GNOME. diff --git a/src/widgets/widgets/qmaccocoaviewcontainer_mac.mm b/src/widgets/widgets/qmaccocoaviewcontainer_mac.mm index 5a02be7ee1..a384e41d1b 100644 --- a/src/widgets/widgets/qmaccocoaviewcontainer_mac.mm +++ b/src/widgets/widgets/qmaccocoaviewcontainer_mac.mm @@ -43,7 +43,7 @@ \class QMacCocoaViewContainer \since 4.5 - \brief The QMacCocoaViewContainer class provides a widget for Mac OS X that can be used to wrap arbitrary + \brief The QMacCocoaViewContainer class provides a widget for OS X that can be used to wrap arbitrary Cocoa views (i.e., NSView subclasses) and insert them into Qt hierarchies. \ingroup advanced @@ -61,7 +61,7 @@ Cocoa. However, QCocoaContainerView requires Mac OS X 10.5 or better to be used with Carbon. - It should be also noted that at the low level on Mac OS X, there is a + It should be also noted that at the low level on OS X, there is a difference between windows (top-levels) and view (widgets that are inside a window). For this reason, make sure that the NSView that you are wrapping doesn't end up as a top-level. The best way to ensure this is to make sure diff --git a/src/widgets/widgets/qmacnativewidget_mac.mm b/src/widgets/widgets/qmacnativewidget_mac.mm index cfd66b8eac..7a7492e717 100644 --- a/src/widgets/widgets/qmacnativewidget_mac.mm +++ b/src/widgets/widgets/qmacnativewidget_mac.mm @@ -42,13 +42,13 @@ /*! \class QMacNativeWidget \since 4.5 - \brief The QMacNativeWidget class provides a widget for Mac OS X that provides + \brief The QMacNativeWidget class provides a widget for OS X that provides a way to put Qt widgets into Cocoa hierarchies. \ingroup advanced \inmodule QtWidgets - On Mac OS X, there is a difference between a window and view; + On OS X, there is a difference between a window and view; normally expressed as widgets in Qt. Qt makes assumptions about its parent-child hierarchy that make it complex to put an arbitrary Qt widget into a hierarchy of "normal" views from Apple frameworks. QMacNativeWidget diff --git a/src/widgets/widgets/qmainwindow.cpp b/src/widgets/widgets/qmainwindow.cpp index 2a1e8428ab..4d5d3e5ec1 100644 --- a/src/widgets/widgets/qmainwindow.cpp +++ b/src/widgets/widgets/qmainwindow.cpp @@ -1499,7 +1499,7 @@ bool QMainWindow::event(QEvent *event) /*! \property QMainWindow::unifiedTitleAndToolBarOnMac - \brief whether the window uses the unified title and toolbar look on Mac OS X + \brief whether the window uses the unified title and toolbar look on OS X Note that the Qt 5 implementation has several limitations compared to Qt 4: \list diff --git a/src/widgets/widgets/qmenu.cpp b/src/widgets/widgets/qmenu.cpp index 2f0dcc49d1..e81359feac 100644 --- a/src/widgets/widgets/qmenu.cpp +++ b/src/widgets/widgets/qmenu.cpp @@ -1432,7 +1432,7 @@ void QMenu::initStyleOption(QStyleOptionMenuItem *option, const QAction *action) do not support the signals: aboutToHide (), aboutToShow () and hovered (). It is not possible to display an icon in a native menu on Windows Mobile. - \section1 QMenu on Mac OS X with Qt Build Against Cocoa + \section1 QMenu on OS X with Qt Build Against Cocoa QMenu can be inserted only once in a menu/menubar. Subsequent insertions will have no effect or will result in a disabled menu item. diff --git a/src/widgets/widgets/qrubberband.cpp b/src/widgets/widgets/qrubberband.cpp index abddbcb64a..3315e2703a 100644 --- a/src/widgets/widgets/qrubberband.cpp +++ b/src/widgets/widgets/qrubberband.cpp @@ -126,7 +126,7 @@ void QRubberBand::initStyleOption(QStyleOptionRubberBand *option) const By default a rectangular rubber band (\a s is \c Rectangle) will use a mask, so that a small border of the rectangle is all - that is visible. Some styles (e.g., native Mac OS X) will + that is visible. Some styles (e.g., native OS X) will change this and call QWidget::setWindowOpacity() to make a semi-transparent filled selection rectangle. */ diff --git a/src/widgets/widgets/qtabbar.cpp b/src/widgets/widgets/qtabbar.cpp index b2973bd8b3..f2e98474b3 100644 --- a/src/widgets/widgets/qtabbar.cpp +++ b/src/widgets/widgets/qtabbar.cpp @@ -2299,7 +2299,7 @@ void QTabBar::setMovable(bool movable) \since 4.5 This property is used as a hint for styles to draw the tabs in a different - way then they would normally look in a tab widget. On Mac OS X this will + way then they would normally look in a tab widget. On OS X this will look similar to the tabs in Safari or Leopard's Terminal.app. \sa QTabWidget::documentMode diff --git a/src/widgets/widgets/qtabwidget.cpp b/src/widgets/widgets/qtabwidget.cpp index 8ca5f0dc01..1edb548206 100644 --- a/src/widgets/widgets/qtabwidget.cpp +++ b/src/widgets/widgets/qtabwidget.cpp @@ -1318,7 +1318,7 @@ void QTabWidget::setUsesScrollButtons(bool useButtons) /*! \property QTabWidget::documentMode \brief Whether or not the tab widget is rendered in a mode suitable for document - pages. This is the same as document mode on Mac OS X. + pages. This is the same as document mode on OS X. \since 4.5 When this property is set the tab widget frame is not rendered. This mode is useful diff --git a/src/widgets/widgets/qtoolbar.cpp b/src/widgets/widgets/qtoolbar.cpp index 08dea699e0..ecba6f1974 100644 --- a/src/widgets/widgets/qtoolbar.cpp +++ b/src/widgets/widgets/qtoolbar.cpp @@ -240,7 +240,7 @@ bool QToolBarPrivate::mousePressEvent(QMouseEvent *event) q->initStyleOption(&opt); if (q->style()->subElementRect(QStyle::SE_ToolBarHandle, &opt, q).contains(event->pos()) == false) { #ifdef Q_OS_OSX - // When using the unified toolbar on Mac OS X, the user can click and + // When using the unified toolbar on OS X, the user can click and // drag between toolbar contents to move the window. Make this work by // implementing the standard mouse-dragging code and then call // window->move() in mouseMoveEvent below. diff --git a/src/widgets/widgets/qtoolbutton.cpp b/src/widgets/widgets/qtoolbutton.cpp index 8473b261fc..93f0b60058 100644 --- a/src/widgets/widgets/qtoolbutton.cpp +++ b/src/widgets/widgets/qtoolbutton.cpp @@ -863,7 +863,7 @@ QToolButton::ToolButtonPopupMode QToolButton::popupMode() const The default is disabled (i.e. false). - This property is currently ignored on Mac OS X when using QMacStyle. + This property is currently ignored on OS X when using QMacStyle. */ void QToolButton::setAutoRaise(bool enable) { diff --git a/src/widgets/widgets/qwidgettextcontrol.cpp b/src/widgets/widgets/qwidgettextcontrol.cpp index faa63cb400..72007ac3e8 100644 --- a/src/widgets/widgets/qwidgettextcontrol.cpp +++ b/src/widgets/widgets/qwidgettextcontrol.cpp @@ -248,7 +248,7 @@ bool QWidgetTextControlPrivate::cursorMoveKeyEvent(QKeyEvent *e) return false; } -// Except for pageup and pagedown, Mac OS X has very different behavior, we don't do it all, but +// Except for pageup and pagedown, OS X has very different behavior, we don't do it all, but // here's the breakdown: // Shift still works as an anchor, but only one of the other keys can be down Ctrl (Command), // Alt (Option), or Meta (Control). -- cgit v1.2.3 From 69e9459e095a3aded7e7e884a35cac00dd0e34f5 Mon Sep 17 00:00:00 2001 From: Andreas Holzammer Date: Tue, 30 Jun 2015 09:25:33 +0200 Subject: Switch to new not deprecated api SPI_GETPLATFORMTYPE is deprecated as of Windows Embedded Compact 2013, SPI_GETPLATFORMNAME is a full replacement. Use this instead because it produces deprecation messages and slows down execution. Task-number: QTBUG-46916 Change-Id: I7f162b488dd0b1aa256c47a9e76358df101e3d0f Reviewed-by: Maurice Kalinowski --- src/widgets/kernel/qwidgetsfunctions_wince.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'src/widgets') diff --git a/src/widgets/kernel/qwidgetsfunctions_wince.cpp b/src/widgets/kernel/qwidgetsfunctions_wince.cpp index f06514dbe4..d42e4ebc21 100644 --- a/src/widgets/kernel/qwidgetsfunctions_wince.cpp +++ b/src/widgets/kernel/qwidgetsfunctions_wince.cpp @@ -51,14 +51,10 @@ HINSTANCE qt_wince_ShellExecute(HWND hwnd, LPCWSTR, LPCWSTR file, LPCWSTR params } #endif -#ifndef SPI_GETPLATFORMTYPE -#define SPI_GETPLATFORMTYPE 257 -#endif - // Internal Qt ----------------------------------------------------- bool qt_wince_is_platform(const QString &platformString) { wchar_t tszPlatform[64]; - if (SystemParametersInfo(SPI_GETPLATFORMTYPE, sizeof(tszPlatform) / sizeof(wchar_t), tszPlatform, 0)) + if (SystemParametersInfo(SPI_GETPLATFORMNAME, sizeof(tszPlatform) / sizeof(wchar_t), tszPlatform, 0)) if (0 == _tcsicmp(reinterpret_cast (platformString.utf16()), tszPlatform)) return true; return false; -- cgit v1.2.3 From 52e7aba6bf717c673151c9267040c7a90dbea039 Mon Sep 17 00:00:00 2001 From: Gabriel de Dietrich Date: Wed, 24 Jun 2015 10:31:07 +0200 Subject: QFileIconEngine: Remove reference to QFileIconProvider MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Keeping the reference may end up in a crash if a created QIcon outlives the QFileIconProvider and we then try to generate a pixmap. The reference is not necessary since the options are queried only when creating the icon, so they can be saved in the icon provider. Task-number: QTBUG-46755 Change-Id: I5c60887c2ed39030a2a20298ff10fd652189e4e7 Reviewed-by: Timur Pocheptsov Reviewed-by: Marc Mutz Reviewed-by: Morten Johan Sørvig --- src/widgets/itemviews/qfileiconprovider.cpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'src/widgets') diff --git a/src/widgets/itemviews/qfileiconprovider.cpp b/src/widgets/itemviews/qfileiconprovider.cpp index 5bab531290..051cb8e7cc 100644 --- a/src/widgets/itemviews/qfileiconprovider.cpp +++ b/src/widgets/itemviews/qfileiconprovider.cpp @@ -63,8 +63,8 @@ static bool isCacheable(const QFileInfo &fi); class QFileIconEngine : public QPixmapIconEngine { public: - QFileIconEngine(const QFileIconProvider *fip, const QFileInfo &info) - : QPixmapIconEngine(), m_fileIconProvider(fip), m_fileInfo(info) + QFileIconEngine(const QFileInfo &info, QFileIconProvider::Options opts) + : QPixmapIconEngine(), m_fileInfo(info), m_fipOpts(opts) { } QPixmap pixmap(const QSize &size, QIcon::Mode mode, QIcon::State state) Q_DECL_OVERRIDE @@ -90,7 +90,7 @@ public: } QPlatformTheme::IconOptions iconOptions; - if (m_fileIconProvider->options() & QFileIconProvider::DontUseCustomDirectoryIcons) + if (m_fipOpts & QFileIconProvider::DontUseCustomDirectoryIcons) iconOptions |= QPlatformTheme::DontUseCustomDirectoryIcons; pixmap = theme->fileIconPixmap(m_fileInfo, size, iconOptions); @@ -152,8 +152,8 @@ public: } private: - const QFileIconProvider *m_fileIconProvider; QFileInfo m_fileInfo; + QFileIconProvider::Options m_fipOpts; }; @@ -346,8 +346,7 @@ QIcon QFileIconProviderPrivate::getIcon(const QFileInfo &fi) const if (sizes.isEmpty()) return QIcon(); - Q_Q(const QFileIconProvider); - return QIcon(new QFileIconEngine(q, fi)); + return QIcon(new QFileIconEngine(fi, options)); } /*! -- cgit v1.2.3