summaryrefslogtreecommitdiffstats
path: root/src/widgets/widgets
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@theqtcompany.com>2016-03-23 08:29:43 +0100
committerSimon Hausmann <simon.hausmann@theqtcompany.com>2016-03-23 08:29:43 +0100
commit8e2d3e3b90d7d35d2c91fc09ab5a9cccac0823e8 (patch)
treefe20315ed91d4babd73df69ece0af1d1550cb40c /src/widgets/widgets
parentbf17e30c8e98b311cdee397f1272e70863247ebc (diff)
parentf319b9b43c313dfa306a62c391e767bc6f14bdee (diff)
Merge remote-tracking branch 'origin/5.6' into 5.7
Diffstat (limited to 'src/widgets/widgets')
-rw-r--r--src/widgets/widgets/qbuttongroup_p.h1
-rw-r--r--src/widgets/widgets/qlineedit_p.cpp11
2 files changed, 7 insertions, 5 deletions
diff --git a/src/widgets/widgets/qbuttongroup_p.h b/src/widgets/widgets/qbuttongroup_p.h
index 01c0367876..95a72eb4fd 100644
--- a/src/widgets/widgets/qbuttongroup_p.h
+++ b/src/widgets/widgets/qbuttongroup_p.h
@@ -67,7 +67,6 @@ public:
QList<QAbstractButton *> buttonList;
QPointer<QAbstractButton> checkedButton;
void detectCheckedButton();
- void notifyChecked(QAbstractButton *button);
bool exclusive;
QHash<QAbstractButton*, int> mapping;
diff --git a/src/widgets/widgets/qlineedit_p.cpp b/src/widgets/widgets/qlineedit_p.cpp
index b852b8991c..6ff40e9c50 100644
--- a/src/widgets/widgets/qlineedit_p.cpp
+++ b/src/widgets/widgets/qlineedit_p.cpp
@@ -323,14 +323,17 @@ QLineEditIconButton::QLineEditIconButton(QWidget *parent)
void QLineEditIconButton::paintEvent(QPaintEvent *)
{
QPainter painter(this);
+ QWindow *window = Q_NULLPTR;
+ if (const QWidget *nativeParent = nativeParentWidget())
+ window = nativeParent->windowHandle();
// Note isDown should really use the active state but in most styles
// this has no proper feedback
QIcon::Mode state = QIcon::Disabled;
if (isEnabled())
state = isDown() ? QIcon::Selected : QIcon::Normal;
- const QPixmap iconPixmap = icon().pixmap(QSize(IconButtonSize, IconButtonSize),
- state, QIcon::Off);
- QRect pixmapRect = QRect(QPoint(0, 0), iconPixmap.size() / iconPixmap.devicePixelRatio());
+ const QSize iconSize(IconButtonSize, IconButtonSize);
+ const QPixmap iconPixmap = icon().pixmap(window, iconSize, state, QIcon::Off);
+ QRect pixmapRect = QRect(QPoint(0, 0), iconSize);
pixmapRect.moveCenter(rect().center());
painter.setOpacity(m_opacity);
painter.drawPixmap(pixmapRect, iconPixmap);
@@ -422,7 +425,7 @@ QIcon QLineEditPrivate::clearButtonIcon() const
Q_Q(const QLineEdit);
QStyleOptionFrame styleOption;
q->initStyleOption(&styleOption);
- return QIcon(q->style()->standardPixmap(QStyle::SP_LineEditClearButton, &styleOption, q));
+ return q->style()->standardIcon(QStyle::SP_LineEditClearButton, &styleOption, q);
}
void QLineEditPrivate::setClearButtonEnabled(bool enabled)