diff options
author | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2018-07-17 01:00:21 +0200 |
---|---|---|
committer | Edward Welbourne <edward.welbourne@qt.io> | 2018-07-17 10:19:22 +0200 |
commit | 1783fca89768a9d503d886673643dc4542ec467f (patch) | |
tree | 5055f39393017219e448ade71b3842896c4679c5 /src/widgets | |
parent | b82648bd59256abb8e7084e0424a1f8a6a034c34 (diff) | |
parent | 435d1d53bd61491010dbb2130a27e35cd9798965 (diff) |
Merge remote-tracking branch 'origin/5.11' into dev
Conflicts:
src/plugins/platforms/cocoa/qcocoawindow.mm
src/plugins/platforms/xcb/qxcbintegration.cpp
Conflicts git missed:
src/plugins/platforms/qnx/qqnxglcontext.cpp
Change-Id: I0582cdc9e66e43efe79038b9c43d4f9572ac88fc
Diffstat (limited to 'src/widgets')
-rw-r--r-- | src/widgets/kernel/qaction.cpp | 12 | ||||
-rw-r--r-- | src/widgets/widgets/qcalendarwidget.cpp | 2 | ||||
-rw-r--r-- | src/widgets/widgets/qsplashscreen.cpp | 1 | ||||
-rw-r--r-- | src/widgets/widgets/qtoolbutton.cpp | 4 | ||||
-rw-r--r-- | src/widgets/widgets/qwidgetlinecontrol.cpp | 3 |
5 files changed, 12 insertions, 10 deletions
diff --git a/src/widgets/kernel/qaction.cpp b/src/widgets/kernel/qaction.cpp index 0ef4ed0634..1ca5514655 100644 --- a/src/widgets/kernel/qaction.cpp +++ b/src/widgets/kernel/qaction.cpp @@ -232,10 +232,6 @@ void QActionPrivate::setShortcutEnabled(bool enable, QShortcutMap &map) the action. For example: \snippet mainwindows/application/mainwindow.cpp 19 - \codeline - \code - fileMenu->addAction(openAct); - \endcode We recommend that actions are created as children of the window they are used in. In most cases actions will be children of @@ -968,7 +964,10 @@ void QAction::toggle() Only checkable actions can be checked. By default, this is false (the action is unchecked). - \sa checkable + \note The notifier signal for this property is toggled(). As toggling + a QAction changes its state, it will also emit a changed() signal. + + \sa checkable, toggled() */ void QAction::setChecked(bool b) { @@ -1190,7 +1189,8 @@ void QAction::activate(ActionEvent event) This signal is emitted whenever a checkable action changes its isChecked() status. This can be the result of a user interaction, - or because setChecked() was called. + or because setChecked() was called. As setChecked() changes the + QAction, it emits changed() in addition to toggled(). \a checked is true if the action is checked, or false if the action is unchecked. diff --git a/src/widgets/widgets/qcalendarwidget.cpp b/src/widgets/widgets/qcalendarwidget.cpp index 9559b58339..4946969360 100644 --- a/src/widgets/widgets/qcalendarwidget.cpp +++ b/src/widgets/widgets/qcalendarwidget.cpp @@ -1946,8 +1946,8 @@ void QCalendarWidgetPrivate::updateNavigationBar() QString monthName = q->locale().standaloneMonthName(m_model->m_shownMonth, QLocale::LongFormat); monthButton->setText(monthName); - yearButton->setText(QString::number(m_model->m_shownYear)); yearEdit->setValue(m_model->m_shownYear); + yearButton->setText(yearEdit->text()); } void QCalendarWidgetPrivate::update() diff --git a/src/widgets/widgets/qsplashscreen.cpp b/src/widgets/widgets/qsplashscreen.cpp index 3dc396395f..277d2fd99f 100644 --- a/src/widgets/widgets/qsplashscreen.cpp +++ b/src/widgets/widgets/qsplashscreen.cpp @@ -349,6 +349,7 @@ bool QSplashScreen::event(QEvent *e) if (e->type() == QEvent::Paint) { Q_D(QSplashScreen); QPainter painter(this); + painter.setLayoutDirection(layoutDirection()); if (!d->pixmap.isNull()) painter.drawPixmap(QPoint(), d->pixmap); drawContents(&painter); diff --git a/src/widgets/widgets/qtoolbutton.cpp b/src/widgets/widgets/qtoolbutton.cpp index c94c10574f..03950ef44b 100644 --- a/src/widgets/widgets/qtoolbutton.cpp +++ b/src/widgets/widgets/qtoolbutton.cpp @@ -756,14 +756,14 @@ void QToolButtonPrivate::popupTimerDone() QSize sh = ((QToolButton*)(QMenu*)actualMenu)->receivers(SIGNAL(aboutToShow()))? QSize() : actualMenu->sizeHint(); if (horizontal) { if (q->isRightToLeft()) { - if (q->mapToGlobal(QPoint(0, rect.bottom())).y() + sh.height() <= screen.height()) { + if (q->mapToGlobal(QPoint(0, rect.bottom())).y() + sh.height() <= screen.bottom()) { p = q->mapToGlobal(rect.bottomRight()); } else { p = q->mapToGlobal(rect.topRight() - QPoint(0, sh.height())); } p.rx() -= sh.width(); } else { - if (q->mapToGlobal(QPoint(0, rect.bottom())).y() + sh.height() <= screen.height()) { + if (q->mapToGlobal(QPoint(0, rect.bottom())).y() + sh.height() <= screen.bottom()) { p = q->mapToGlobal(rect.bottomLeft()); } else { p = q->mapToGlobal(rect.topLeft() - QPoint(0, sh.height())); diff --git a/src/widgets/widgets/qwidgetlinecontrol.cpp b/src/widgets/widgets/qwidgetlinecontrol.cpp index b5af8e36aa..cf2d885b52 100644 --- a/src/widgets/widgets/qwidgetlinecontrol.cpp +++ b/src/widgets/widgets/qwidgetlinecontrol.cpp @@ -1848,7 +1848,8 @@ void QWidgetLineControl::processKeyEvent(QKeyEvent* event) else if (event == QKeySequence::DeleteStartOfWord) { if (!isReadOnly()) { cursorWordBackward(true); - del(); + if (hasSelectedText()) + del(); } } else if (event == QKeySequence::DeleteCompleteLine) { if (!isReadOnly()) { |