summaryrefslogtreecommitdiffstats
path: root/src/widgets
diff options
context:
space:
mode:
authorSergio Ahumada <sergio.ahumada@digia.com>2013-09-14 01:11:43 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-09-14 01:11:43 +0200
commit415f65fbff0ebbdeab09bbed8c06872352e3f5ca (patch)
tree82f6d0d85df04e9c145543ec1be4d3fa58a919ca /src/widgets
parent62fbf3ca6fc2d1736c6f5d5456f66ae1cfe94be8 (diff)
parentf7837e28b5f83d116fa43d0401b7188ce27fc346 (diff)
Merge "Merge branch 'stable' into dev" into refs/staging/dev
Diffstat (limited to 'src/widgets')
-rw-r--r--src/widgets/dialogs/qmessagebox.cpp11
-rw-r--r--src/widgets/doc/src/model-view-programming.qdoc4
-rw-r--r--src/widgets/kernel/qwidget_qpa.cpp5
-rw-r--r--src/widgets/styles/qcommonstyle.cpp5
-rw-r--r--src/widgets/styles/qwindowsstyle.cpp6
5 files changed, 26 insertions, 5 deletions
diff --git a/src/widgets/dialogs/qmessagebox.cpp b/src/widgets/dialogs/qmessagebox.cpp
index 5bcda9bf25..f545d1ffd2 100644
--- a/src/widgets/dialogs/qmessagebox.cpp
+++ b/src/widgets/dialogs/qmessagebox.cpp
@@ -143,6 +143,11 @@ public:
#endif
}
+ void selectAll()
+ {
+ textEdit->selectAll();
+ }
+
private slots:
void textCopyAvailable(bool available)
{
@@ -1410,6 +1415,10 @@ void QMessageBox::keyPressEvent(QKeyEvent *e)
e->setAccepted(true);
return;
}
+ } else if (e == QKeySequence::SelectAll && d->detailsText && d->detailsText->isVisible()) {
+ d->detailsText->selectAll();
+ e->setAccepted(true);
+ return;
}
#endif // !QT_NO_TEXTEDIT
@@ -1442,7 +1451,7 @@ void QMessageBox::keyPressEvent(QKeyEvent *e)
#endif // !QT_NO_CLIPBOARD && !QT_NO_SHORTCUT
#ifndef QT_NO_SHORTCUT
- if (!(e->modifiers() & Qt::AltModifier)) {
+ if (!(e->modifiers() & (Qt::AltModifier | Qt::ControlModifier | Qt::MetaModifier))) {
int key = e->key() & ~Qt::MODIFIER_MASK;
if (key) {
const QList<QAbstractButton *> buttons = d->buttonBox->buttons();
diff --git a/src/widgets/doc/src/model-view-programming.qdoc b/src/widgets/doc/src/model-view-programming.qdoc
index 377ecf204e..d0d925e74a 100644
--- a/src/widgets/doc/src/model-view-programming.qdoc
+++ b/src/widgets/doc/src/model-view-programming.qdoc
@@ -2033,14 +2033,14 @@
\li Used to remove rows and the items of data they contain from all types of model.
Implementations must call
\l{QAbstractItemModel::beginRemoveRows()}{beginRemoveRows()}
- \e before inserting new columns into any underlying data structures, and call
+ \e before rows are removed from any underlying data structures, and call
\l{QAbstractItemModel::endRemoveRows()}{endRemoveRows()}
\e{immediately afterwards}.
\row \li \l{QAbstractItemModel::insertColumns()}{insertColumns()}
\li Used to add new columns and items of data to table models and hierarchical models.
Implementations must call
\l{QAbstractItemModel::beginInsertColumns()}{beginInsertColumns()} \e before
- rows are removed from any underlying data structures, and call
+ inserting new columns into any underlying data structures, and call
\l{QAbstractItemModel::endInsertColumns()}{endInsertColumns()}
\e{immediately afterwards}.
\row \li \l{QAbstractItemModel::removeColumns()}{removeColumns()}
diff --git a/src/widgets/kernel/qwidget_qpa.cpp b/src/widgets/kernel/qwidget_qpa.cpp
index 665aa4b17a..a06283be02 100644
--- a/src/widgets/kernel/qwidget_qpa.cpp
+++ b/src/widgets/kernel/qwidget_qpa.cpp
@@ -153,7 +153,10 @@ void QWidgetPrivate::create_sys(WId window, bool initializeWindow, bool destroyO
}
setWindowModified_helper();
- setWinId(win->winId());
+ WId id = win->winId();
+ // See the QPlatformWindow::winId() documentation
+ Q_ASSERT(id != WId(0));
+ setWinId(id);
// Check children and create windows for them if necessary
q_createNativeChildrenAndSetParent(q);
diff --git a/src/widgets/styles/qcommonstyle.cpp b/src/widgets/styles/qcommonstyle.cpp
index 539cc70eb7..7f0813c303 100644
--- a/src/widgets/styles/qcommonstyle.cpp
+++ b/src/widgets/styles/qcommonstyle.cpp
@@ -1526,7 +1526,10 @@ void QCommonStyle::drawControl(ControlElement element, const QStyleOption *opt,
QRect aligned = alignedRect(header->direction, QFlag(header->iconAlignment), pixmap.size() / pixmap.devicePixelRatio(), rect);
QRect inter = aligned.intersected(rect);
- p->drawPixmap(inter.x(), inter.y(), pixmap, inter.x() - aligned.x(), inter.y() - aligned.y(), inter.width(), inter.height());
+ p->drawPixmap(inter.x(), inter.y(), pixmap,
+ inter.x() - aligned.x(), inter.y() - aligned.y(),
+ aligned.width() * pixmap.devicePixelRatio(),
+ pixmap.height() * pixmap.devicePixelRatio());
if (header->direction == Qt::LeftToRight)
rect.setLeft(rect.left() + pixw + 2);
diff --git a/src/widgets/styles/qwindowsstyle.cpp b/src/widgets/styles/qwindowsstyle.cpp
index 0acd6052c8..b153d05885 100644
--- a/src/widgets/styles/qwindowsstyle.cpp
+++ b/src/widgets/styles/qwindowsstyle.cpp
@@ -582,6 +582,12 @@ int QWindowsStyle::styleHint(StyleHint hint, const QStyleOption *opt, const QWid
ret = 1;
}
}
+#ifndef QT_NO_ACCESSIBILITY
+ if (!ret && opt && opt->type == QStyleOption::SO_MenuItem
+ && QStyleHelper::isInstanceOf(opt->styleObject, QAccessible::MenuItem)
+ && opt->styleObject->property("_q_showUnderlined").toBool())
+ ret = 1;
+#endif // QT_NO_ACCESSIBILITY
break;
}
#endif