Compare commits
6 Commits
Author | SHA1 | Date |
---|---|---|
Rex Dieter | 04661b7de7 | |
Than Ngo | f1a8d41bb2 | |
Rex Dieter | 73aff94c60 | |
Rex Dieter | 9f91c6fd2e | |
Jan Grulich | 1c75053c8f | |
Rex Dieter | 21748c29f1 |
|
@ -0,0 +1,47 @@
|
|||
From 0cfdfcc82ec58b2016f4ab2973343eb85874f27d Mon Sep 17 00:00:00 2001
|
||||
From: Christoph Schleifenbaum <christoph.schleifenbaum@kdab.com>
|
||||
Date: Sun, 11 Oct 2015 15:27:37 +0200
|
||||
Subject: [PATCH 2/3] QListView: Use correct available size when calculating
|
||||
scrollbars.
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Calculation was working as long as one didn't use per pixel scrolling.
|
||||
|
||||
Task-number: QTBUG-48579
|
||||
Change-Id: Ie02e28b008c5c81ed45d7dd17fed96148c23b598
|
||||
Reviewed-by: Thorbjørn Lindeijer <bjorn@lindeijer.nl>
|
||||
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
|
||||
Reviewed-by: David Faure <david.faure@kdab.com>
|
||||
---
|
||||
src/widgets/itemviews/qlistview.cpp | 6 ++----
|
||||
1 file changed, 2 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/src/widgets/itemviews/qlistview.cpp b/src/widgets/itemviews/qlistview.cpp
|
||||
index f3fd3e7..8257944 100644
|
||||
--- a/src/widgets/itemviews/qlistview.cpp
|
||||
+++ b/src/widgets/itemviews/qlistview.cpp
|
||||
@@ -1846,8 +1846,7 @@ void QCommonListViewBase::updateHorizontalScrollBar(const QSize &step)
|
||||
const bool bothScrollBarsAuto = qq->verticalScrollBarPolicy() == Qt::ScrollBarAsNeeded &&
|
||||
qq->horizontalScrollBarPolicy() == Qt::ScrollBarAsNeeded;
|
||||
|
||||
- const QSize viewportSize(viewport()->width() + (qq->verticalScrollBar()->maximum() > 0 ? qq->verticalScrollBar()->width() : 0),
|
||||
- viewport()->height() + (qq->horizontalScrollBar()->maximum() > 0 ? qq->horizontalScrollBar()->height() : 0));
|
||||
+ const QSize viewportSize = qq->contentsRect().size();
|
||||
|
||||
bool verticalWantsToShow = contentsSize.height() > viewportSize.height();
|
||||
bool horizontalWantsToShow;
|
||||
@@ -1877,8 +1876,7 @@ void QCommonListViewBase::updateVerticalScrollBar(const QSize &step)
|
||||
const bool bothScrollBarsAuto = qq->verticalScrollBarPolicy() == Qt::ScrollBarAsNeeded &&
|
||||
qq->horizontalScrollBarPolicy() == Qt::ScrollBarAsNeeded;
|
||||
|
||||
- const QSize viewportSize(viewport()->width() + (qq->verticalScrollBar()->maximum() > 0 ? qq->verticalScrollBar()->width() : 0),
|
||||
- viewport()->height() + (qq->horizontalScrollBar()->maximum() > 0 ? qq->horizontalScrollBar()->height() : 0));
|
||||
+ const QSize viewportSize = qq->contentsRect().size();
|
||||
|
||||
bool horizontalWantsToShow = contentsSize.width() > viewportSize.width();
|
||||
bool verticalWantsToShow;
|
||||
--
|
||||
2.5.0
|
||||
|
|
@ -0,0 +1,32 @@
|
|||
From a3b8e355fc17783a5d4badfb9ad50247655000cd Mon Sep 17 00:00:00 2001
|
||||
From: Anton Kudryavtsev <a.kudryavtsev@netris.ru>
|
||||
Date: Fri, 12 Feb 2016 15:31:07 +0300
|
||||
Subject: [PATCH 3/3] QListView: fix skipping indexes in selectedIndexes().
|
||||
|
||||
Remove spurious increment of i.
|
||||
|
||||
Task-number: QTBUG-51086
|
||||
Change-Id: I4307a6728de1e7f25c8afa31fe2066f92373f3fc
|
||||
Reviewed-by: Edward Welbourne <edward.welbourne@theqtcompany.com>
|
||||
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
|
||||
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
|
||||
---
|
||||
src/widgets/itemviews/qlistview.cpp | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/widgets/itemviews/qlistview.cpp b/src/widgets/itemviews/qlistview.cpp
|
||||
index 9c79509..a17d89e 100644
|
||||
--- a/src/widgets/itemviews/qlistview.cpp
|
||||
+++ b/src/widgets/itemviews/qlistview.cpp
|
||||
@@ -1437,7 +1437,7 @@ QModelIndexList QListView::selectedIndexes() const
|
||||
return QModelIndexList();
|
||||
|
||||
QModelIndexList viewSelected = d->selectionModel->selectedIndexes();
|
||||
- for (int i = 0; i < viewSelected.count(); ++i) {
|
||||
+ for (int i = 0; i < viewSelected.count();) {
|
||||
const QModelIndex &index = viewSelected.at(i);
|
||||
if (!isIndexHidden(index) && index.parent() == d->root && index.column() == d->column)
|
||||
++i;
|
||||
--
|
||||
2.5.0
|
||||
|
|
@ -0,0 +1,44 @@
|
|||
From eaa3a9d0108cdf692f1686cafefb7b834f0e5af6 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?B=C5=82a=C5=BCej=20Szczygie=C5=82?= <spaz16@wp.pl>
|
||||
Date: Fri, 1 Jan 2016 20:02:42 +0100
|
||||
Subject: [PATCH 84/87] Fix crash because of NULL screen in QXcbWindow
|
||||
|
||||
Change-Id: If7bbe3ad1656dadcb098bcd3ece2e7b064eeb44d
|
||||
Task-number: QTBUG-50081
|
||||
Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
|
||||
---
|
||||
src/gui/kernel/qwindow.cpp | 14 ++++++--------
|
||||
1 file changed, 6 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/src/gui/kernel/qwindow.cpp b/src/gui/kernel/qwindow.cpp
|
||||
index e728d32..83e8777 100644
|
||||
--- a/src/gui/kernel/qwindow.cpp
|
||||
+++ b/src/gui/kernel/qwindow.cpp
|
||||
@@ -609,18 +609,16 @@ void QWindow::setParent(QWindow *parent)
|
||||
}
|
||||
|
||||
QObject::setParent(parent);
|
||||
- if (parent)
|
||||
+
|
||||
+ QPlatformWindow *parentPlatformWindow = parent ? parent->d_func()->platformWindow : Q_NULLPTR;
|
||||
+
|
||||
+ if (parentPlatformWindow)
|
||||
d->disconnectFromScreen();
|
||||
else
|
||||
d->connectToScreen(newScreen);
|
||||
|
||||
- if (d->platformWindow) {
|
||||
- if (parent && parent->d_func()->platformWindow) {
|
||||
- d->platformWindow->setParent(parent->d_func()->platformWindow);
|
||||
- } else {
|
||||
- d->platformWindow->setParent(0);
|
||||
- }
|
||||
- }
|
||||
+ if (d->platformWindow)
|
||||
+ d->platformWindow->setParent(parentPlatformWindow);
|
||||
|
||||
d->parentWindow = parent;
|
||||
|
||||
--
|
||||
2.5.0
|
||||
|
17
138201.patch
17
138201.patch
|
@ -1,14 +1,6 @@
|
|||
diff -rupN qtbase-opensource-src-5.5.1/src/plugins/platforms/xcb/qxcbconnection.cpp qtbase-opensource-src-5.5.1-new/src/plugins/platforms/xcb/qxcbconnection.cpp
|
||||
--- qtbase-opensource-src-5.5.1/src/plugins/platforms/xcb/qxcbconnection.cpp 2015-10-13 06:35:27.000000000 +0200
|
||||
+++ qtbase-opensource-src-5.5.1-new/src/plugins/platforms/xcb/qxcbconnection.cpp 2015-10-21 21:02:53.056198256 +0200
|
||||
@@ -229,7 +229,6 @@ void QXcbConnection::updateScreens(const
|
||||
if (screen->mode() != crtc.mode)
|
||||
screen->updateRefreshRate(crtc.mode);
|
||||
}
|
||||
-
|
||||
} else if (event->subCode == XCB_RANDR_NOTIFY_OUTPUT_CHANGE) {
|
||||
xcb_randr_output_change_t output = event->u.oc;
|
||||
QXcbVirtualDesktop *virtualDesktop = virtualDesktopForRootWindow(output.window);
|
||||
@@ -242,20 +241,18 @@ void QXcbConnection::updateScreens(const
|
||||
|
||||
if (screen && output.connection == XCB_RANDR_CONNECTION_DISCONNECTED) {
|
||||
|
@ -318,15 +310,6 @@ diff -rupN qtbase-opensource-src-5.5.1/src/plugins/platforms/xcb/qxcbwindow.cpp
|
|||
Q_XCB_CALL(xcb_send_event(xcb_connection(), 0, xcbScreen()->root(), XCB_EVENT_MASK_STRUCTURE_NOTIFY | XCB_EVENT_MASK_SUBSTRUCTURE_REDIRECT, (const char *)&event));
|
||||
}
|
||||
|
||||
@@ -1493,8 +1496,6 @@ void QXcbWindow::setParent(const QPlatfo
|
||||
xcb_parent_id = qXcbParent->xcb_window();
|
||||
m_embedded = qXcbParent->window()->type() == Qt::ForeignWindow;
|
||||
} else {
|
||||
- if (!xcbScreen())
|
||||
- return;
|
||||
xcb_parent_id = xcbScreen()->root();
|
||||
m_embedded = false;
|
||||
}
|
||||
@@ -2323,8 +2324,6 @@ void QXcbWindow::handleEnterNotifyEvent(
|
||||
|
||||
const int dpr = int(devicePixelRatio());
|
||||
|
|
|
@ -0,0 +1,120 @@
|
|||
diff --git a/src/widgets/widgets/qlineedit_p.cpp b/src/widgets/widgets/qlineedit_p.cpp
|
||||
index 6645a37..e24cc8a 100644
|
||||
--- a/src/widgets/widgets/qlineedit_p.cpp
|
||||
+++ b/src/widgets/widgets/qlineedit_p.cpp
|
||||
@@ -329,7 +329,7 @@ void QLineEditIconButton::actionEvent(QActionEvent *e)
|
||||
switch (e->type()) {
|
||||
case QEvent::ActionChanged: {
|
||||
const QAction *action = e->action();
|
||||
- if (isVisible() != action->isVisible()) {
|
||||
+ if (isVisibleTo(parentWidget()) != action->isVisible()) {
|
||||
setVisible(action->isVisible());
|
||||
if (QLineEdit *le = qobject_cast<QLineEdit *>(parentWidget()))
|
||||
static_cast<QLineEditPrivate *>(qt_widget_private(le))->positionSideWidgets();
|
||||
@@ -433,13 +433,13 @@ void QLineEditPrivate::positionSideWidgets()
|
||||
QRect widgetGeometry(QPoint(QLineEditIconButton::IconMargin, (contentRect.height() - iconSize.height()) / 2), iconSize);
|
||||
foreach (const SideWidgetEntry &e, leftSideWidgetList()) {
|
||||
e.widget->setGeometry(widgetGeometry);
|
||||
- if (e.widget->isVisible())
|
||||
+ if (e.action->isVisible())
|
||||
widgetGeometry.moveLeft(widgetGeometry.left() + delta);
|
||||
}
|
||||
widgetGeometry.moveLeft(contentRect.width() - iconSize.width() - QLineEditIconButton::IconMargin);
|
||||
foreach (const SideWidgetEntry &e, rightSideWidgetList()) {
|
||||
e.widget->setGeometry(widgetGeometry);
|
||||
- if (e.widget->isVisible())
|
||||
+ if (e.action->isVisible())
|
||||
widgetGeometry.moveLeft(widgetGeometry.left() - delta);
|
||||
}
|
||||
}
|
||||
diff --git a/tests/auto/widgets/widgets/qlineedit/tst_qlineedit.cpp b/tests/auto/widgets/widgets/qlineedit/tst_qlineedit.cpp
|
||||
index e6d63ee..1a5acbd 100644
|
||||
--- a/tests/auto/widgets/widgets/qlineedit/tst_qlineedit.cpp
|
||||
+++ b/tests/auto/widgets/widgets/qlineedit/tst_qlineedit.cpp
|
||||
@@ -4319,10 +4319,10 @@ void tst_QLineEdit::clearButtonVisibleAfterSettingText_QTBUG_45518()
|
||||
#endif // QT_BUILD_INTERNAL
|
||||
}
|
||||
|
||||
-static inline QIcon sideWidgetTestIcon()
|
||||
+static inline QIcon sideWidgetTestIcon(Qt::GlobalColor color = Qt::yellow)
|
||||
{
|
||||
QImage image(QSize(20, 20), QImage::Format_ARGB32);
|
||||
- image.fill(Qt::yellow);
|
||||
+ image.fill(color);
|
||||
return QIcon(QPixmap::fromImage(image));
|
||||
}
|
||||
|
||||
@@ -4360,6 +4360,15 @@ void tst_QLineEdit::sideWidgets()
|
||||
lineEdit->addAction(iconAction);
|
||||
}
|
||||
|
||||
+template <class T> T *findAssociatedWidget(const QAction *a)
|
||||
+{
|
||||
+ foreach (QWidget *w, a->associatedWidgets()) {
|
||||
+ if (T *result = qobject_cast<T *>(w))
|
||||
+ return result;
|
||||
+ }
|
||||
+ return Q_NULLPTR;
|
||||
+}
|
||||
+
|
||||
void tst_QLineEdit::sideWidgetsActionEvents()
|
||||
{
|
||||
// QTBUG-39660, verify whether action events are handled by the widget.
|
||||
@@ -4369,27 +4378,43 @@ void tst_QLineEdit::sideWidgetsActionEvents()
|
||||
l->addWidget(lineEdit);
|
||||
l->addSpacerItem(new QSpacerItem(0, 50, QSizePolicy::Ignored, QSizePolicy::Fixed));
|
||||
QAction *iconAction = lineEdit->addAction(sideWidgetTestIcon(), QLineEdit::LeadingPosition);
|
||||
+ QAction *iconAction1 = lineEdit->addAction(sideWidgetTestIcon(Qt::red), QLineEdit::LeadingPosition);
|
||||
+ QAction *iconAction2 = lineEdit->addAction(sideWidgetTestIcon(Qt::blue), QLineEdit::LeadingPosition);
|
||||
+ QAction *iconAction3 = lineEdit->addAction(sideWidgetTestIcon(Qt::yellow), QLineEdit::LeadingPosition);
|
||||
+ iconAction3->setVisible(false);
|
||||
+
|
||||
testWidget.move(300, 300);
|
||||
testWidget.show();
|
||||
QVERIFY(QTest::qWaitForWindowExposed(&testWidget));
|
||||
|
||||
- QWidget *toolButton = Q_NULLPTR;
|
||||
- foreach (QWidget *w, iconAction->associatedWidgets()) {
|
||||
- if (qobject_cast<QToolButton *>(w)) {
|
||||
- toolButton = w;
|
||||
- break;
|
||||
- }
|
||||
- }
|
||||
- QVERIFY(toolButton);
|
||||
+ QWidget *toolButton1 = findAssociatedWidget<QToolButton>(iconAction1);
|
||||
+ QWidget *toolButton2 = findAssociatedWidget<QToolButton>(iconAction2);
|
||||
+ QWidget *toolButton3 = findAssociatedWidget<QToolButton>(iconAction3);
|
||||
+
|
||||
+ QVERIFY(toolButton1);
|
||||
+ QVERIFY(toolButton2);
|
||||
+ QVERIFY(toolButton3);
|
||||
+
|
||||
+ QVERIFY(!toolButton3->isVisible()); // QTBUG-48899 , action hidden before show().
|
||||
+
|
||||
+ QVERIFY(toolButton1->isVisible());
|
||||
+ QVERIFY(toolButton1->isEnabled());
|
||||
+
|
||||
+ QVERIFY(toolButton2->isVisible());
|
||||
+ QVERIFY(toolButton2->isEnabled());
|
||||
+
|
||||
+ const int toolButton1X = toolButton1->x();
|
||||
+ const int toolButton2X = toolButton2->x();
|
||||
+ QVERIFY(toolButton1X < toolButton2X); // QTBUG-48806, positioned beside each other.
|
||||
|
||||
- QVERIFY(toolButton->isVisible());
|
||||
- QVERIFY(toolButton->isEnabled());
|
||||
+ iconAction1->setEnabled(false);
|
||||
+ QVERIFY(!toolButton1->isEnabled());
|
||||
|
||||
- iconAction->setEnabled(false);
|
||||
- QVERIFY(!toolButton->isEnabled());
|
||||
+ iconAction1->setVisible(false);
|
||||
+ QVERIFY(!toolButton1->isVisible());
|
||||
|
||||
- iconAction->setVisible(false);
|
||||
- QVERIFY(!toolButton->isVisible());
|
||||
+ // QTBUG-39660, button 2 takes position of invisible button 1.
|
||||
+ QCOMPARE(toolButton2->x(), toolButton1X);
|
||||
}
|
||||
|
||||
Q_DECLARE_METATYPE(Qt::AlignmentFlag)
|
|
@ -44,7 +44,7 @@
|
|||
Summary: Qt5 - QtBase components
|
||||
Name: qt5-qtbase
|
||||
Version: 5.5.1
|
||||
Release: 8%{?dist}
|
||||
Release: 12%{?dist}
|
||||
|
||||
# See LGPL_EXCEPTIONS.txt, for exception details
|
||||
License: LGPLv2 with exceptions or GPLv3 with exceptions
|
||||
|
@ -91,12 +91,19 @@ Patch50: qt5-poll.patch
|
|||
Patch51: qtbase-opensource-src-5.5-disconnect_displays.patch
|
||||
# Followup https://codereview.qt-project.org/#/c/138201/ adapted for 5.5
|
||||
Patch52: https://smani.fedorapeople.org/138201.patch
|
||||
Patch53: 0084-Fix-crash-because-of-NULL-screen-in-QXcbWindow.patch
|
||||
|
||||
## upstream patches
|
||||
# workaround https://bugreports.qt-project.org/browse/QTBUG-43057
|
||||
# 'make docs' crash on el6, use qSort instead of std::sort
|
||||
Patch100: qtbase-opensource-src-5.4.0-QTBUG-43057.patch
|
||||
|
||||
# Fix for https://bugreports.qt.io/browse/QTBUG-4246
|
||||
Patch101: qt5-qtbase-qlineedit-fix-visibility-of-side-widgets.patch
|
||||
|
||||
Patch102: 0002-QListView-Use-correct-available-size-when-calculatin.patch
|
||||
Patch103: 0003-QListView-fix-skipping-indexes-in-selectedIndexes.patch
|
||||
|
||||
# macros, be mindful to keep sync'd with macros.qt5
|
||||
Source1: macros.qt5
|
||||
%define _qt5 %{name}
|
||||
|
@ -181,6 +188,9 @@ BuildRequires: pkgconfig(xkbcommon)
|
|||
%endif
|
||||
%else
|
||||
# not Fedora
|
||||
%if 0%{?rhel} == 6
|
||||
%global xcb -qt-xcb
|
||||
%endif
|
||||
%global xkbcommon -qt-xkbcommon
|
||||
Provides: bundled(libxkbcommon) = 0.4.1
|
||||
%endif
|
||||
|
@ -366,11 +376,16 @@ rm -fv mkspecs/linux-g++*/qmake.conf.multilib-optflags
|
|||
#patch50 -p1 -b .poll
|
||||
%patch51 -p1 -b .disconnect_displays
|
||||
%patch52 -p1 -b .138201
|
||||
%patch53 -p1 -b .0084
|
||||
|
||||
%if 0%{?rhel} == 6
|
||||
%patch100 -p1 -b .QTBUG-43057
|
||||
%endif
|
||||
|
||||
%patch101 -p1 -b .qlineedit-fix-visibility-of-side-widgets
|
||||
%patch102 -p1 -b .0002
|
||||
%patch103 -p1 -b .0003
|
||||
|
||||
# drop -fexceptions from $RPM_OPT_FLAGS
|
||||
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS | sed 's|-fexceptions||g'`
|
||||
|
||||
|
@ -388,10 +403,13 @@ sed -i -e 's|^\(QMAKE_STRIP.*=\).*$|\1|g' mkspecs/common/linux.conf
|
|||
# move some bundled libs to ensure they're not accidentally used
|
||||
pushd src/3rdparty
|
||||
mkdir UNUSED
|
||||
mv freetype libjpeg libpng zlib xcb UNUSED/
|
||||
mv freetype libjpeg libpng zlib UNUSED/
|
||||
%if "%{?sqlite}" == "-system-sqlite"
|
||||
mv sqlite UNUSED/
|
||||
%endif
|
||||
%if "%{?xcb}" != "-qt-xcb"
|
||||
mv xcb UNUSED/
|
||||
%endif
|
||||
popd
|
||||
|
||||
# builds failing mysteriously on f20
|
||||
|
@ -449,6 +467,7 @@ test -x configure || chmod +x configure
|
|||
%{?pcre} \
|
||||
%{?sqlite} \
|
||||
%{?tds} \
|
||||
%{?xcb} \
|
||||
%{?xkbcommon} \
|
||||
-system-zlib \
|
||||
%{?use_gold_linker} \
|
||||
|
@ -932,6 +951,19 @@ fi
|
|||
|
||||
|
||||
%changelog
|
||||
* Wed Feb 24 2016 Rex Dieter <rdieter@fedoraproject.org> 5.5.1-12
|
||||
- Item views don't handle insert/remove of rows robustly (QTBUG-48870)
|
||||
|
||||
* Fri Jan 15 2016 Than Ngo <than@redhat.com> - 5.5.1-11
|
||||
- Crash in QXcbWindow::setParent() due to NULL xcbScreen (QTBUG-50081, #1291003)
|
||||
- enable -qt-xcb to fix non-US keys under VNC (#1295713)
|
||||
|
||||
* Tue Jan 05 2016 Jan Grulich <jgrulich@redhat.com> - 5.5.1-10
|
||||
- QLineEdit - fix visibility handling of side widgets
|
||||
|
||||
* Thu Dec 31 2015 Rex Dieter <rdieter@fedoraproject.org> 5.5.1-9
|
||||
- qt-5.5 segfault on QFileDialog without parent (#1291003)
|
||||
|
||||
* Mon Nov 09 2015 Helio Chissini de Castro <helio@kde.org> - 5.5.1-8
|
||||
- qt5-qdoc need requires >= current version, otherwise will prevent the usage further when moved to qttools
|
||||
|
||||
|
|
Loading…
Reference in New Issue