Compare commits
9 Commits
Author | SHA1 | Date |
---|---|---|
|
af36745340 | |
|
faeac394c1 | |
|
51f0f46cf3 | |
|
ef0f887e51 | |
|
ad01462fdc | |
|
82b494dbc8 | |
|
f90371fa4a | |
|
ea881bcd07 | |
|
e22e0113cd |
|
@ -1,2 +1 @@
|
||||||
/qtbase-opensource-src-5.9.2.tar.xz
|
/qtbase-opensource-src-5.9.4.tar.xz
|
||||||
/qtbase-opensource-src-5.9.3.tar.xz
|
|
||||||
|
|
|
@ -0,0 +1,68 @@
|
||||||
|
From d196036024697a75868c1f1626525710495ca428 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Allan Sandfeld Jensen <allan.jensen@qt.io>
|
||||||
|
Date: Thu, 23 Nov 2017 14:25:04 +0100
|
||||||
|
Subject: [PATCH 12/74] Avoid providing bad pixelDeltas on X11
|
||||||
|
|
||||||
|
With libinput we now get a hardcoded resolution that is unrelated to
|
||||||
|
the hardware. So avoid using that as a real pixel delta and document
|
||||||
|
pixel deltas as being driver specific and unreliable on X11.
|
||||||
|
|
||||||
|
Task-number: QTBUG-59261
|
||||||
|
Change-Id: I9fe86d80e7ccd290ed2e4091d7eafa52cb537d34
|
||||||
|
Reviewed-by: David Edmundson <davidedmundson@kde.org>
|
||||||
|
Reviewed-by: Marco Martin <mart@kde.org>
|
||||||
|
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
|
||||||
|
---
|
||||||
|
src/gui/kernel/qevent.cpp | 1 +
|
||||||
|
src/plugins/platforms/xcb/qxcbconnection_xi2.cpp | 14 ++++++++------
|
||||||
|
2 files changed, 9 insertions(+), 6 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/src/gui/kernel/qevent.cpp b/src/gui/kernel/qevent.cpp
|
||||||
|
index 06d52aa78d..c68f9afa56 100644
|
||||||
|
--- a/src/gui/kernel/qevent.cpp
|
||||||
|
+++ b/src/gui/kernel/qevent.cpp
|
||||||
|
@@ -971,6 +971,7 @@ QWheelEvent::QWheelEvent(const QPointF &pos, const QPointF& globalPos,
|
||||||
|
\li scrolling is about to begin, but the distance did not yet change (Qt::ScrollBegin),
|
||||||
|
\li or scrolling has ended and the distance did not change anymore (Qt::ScrollEnd).
|
||||||
|
\endlist
|
||||||
|
+ \note On X11 this value is driver specific and unreliable, use angleDelta() instead
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*!
|
||||||
|
diff --git a/src/plugins/platforms/xcb/qxcbconnection_xi2.cpp b/src/plugins/platforms/xcb/qxcbconnection_xi2.cpp
|
||||||
|
index d1d97affe8..94f543fd39 100644
|
||||||
|
--- a/src/plugins/platforms/xcb/qxcbconnection_xi2.cpp
|
||||||
|
+++ b/src/plugins/platforms/xcb/qxcbconnection_xi2.cpp
|
||||||
|
@@ -953,10 +953,12 @@ void QXcbConnection::xi2HandleScrollEvent(void *event, ScrollingDevice &scrollin
|
||||||
|
double delta = scrollingDevice.lastScrollPosition.y() - value;
|
||||||
|
scrollingDevice.lastScrollPosition.setY(value);
|
||||||
|
angleDelta.setY((delta / scrollingDevice.verticalIncrement) * 120);
|
||||||
|
- // We do not set "pixel" delta if it is only measured in ticks.
|
||||||
|
- if (scrollingDevice.verticalIncrement > 1)
|
||||||
|
+ // With most drivers the increment is 1 for wheels.
|
||||||
|
+ // For libinput it is hardcoded to a useless 15.
|
||||||
|
+ // For a proper touchpad driver it should be in the same order of magnitude as 120
|
||||||
|
+ if (scrollingDevice.verticalIncrement > 15)
|
||||||
|
rawDelta.setY(delta);
|
||||||
|
- else if (scrollingDevice.verticalIncrement < -1)
|
||||||
|
+ else if (scrollingDevice.verticalIncrement < -15)
|
||||||
|
rawDelta.setY(-delta);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@@ -965,10 +967,10 @@ void QXcbConnection::xi2HandleScrollEvent(void *event, ScrollingDevice &scrollin
|
||||||
|
double delta = scrollingDevice.lastScrollPosition.x() - value;
|
||||||
|
scrollingDevice.lastScrollPosition.setX(value);
|
||||||
|
angleDelta.setX((delta / scrollingDevice.horizontalIncrement) * 120);
|
||||||
|
- // We do not set "pixel" delta if it is only measured in ticks.
|
||||||
|
- if (scrollingDevice.horizontalIncrement > 1)
|
||||||
|
+ // See comment under vertical
|
||||||
|
+ if (scrollingDevice.horizontalIncrement > 15)
|
||||||
|
rawDelta.setX(delta);
|
||||||
|
- else if (scrollingDevice.horizontalIncrement < -1)
|
||||||
|
+ else if (scrollingDevice.horizontalIncrement < -15)
|
||||||
|
rawDelta.setX(-delta);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
--
|
||||||
|
2.14.3
|
||||||
|
|
|
@ -0,0 +1,33 @@
|
||||||
|
From 43e444d1ffac9d63eeb2053465d02ce4a6cc7410 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Kevin Funk <kevin.funk@kdab.com>
|
||||||
|
Date: Fri, 29 Sep 2017 23:53:29 +0200
|
||||||
|
Subject: [PATCH 16/74] CMake: qt5_add_binary_resource: re-run if needed
|
||||||
|
|
||||||
|
qt5_add_binary_resources() macro did not recompile for CMake generated
|
||||||
|
input before this patch.
|
||||||
|
|
||||||
|
Adding the input files to the DEPENDS option corrects this issue:
|
||||||
|
|
||||||
|
Task-number: QTBUG-60714
|
||||||
|
Change-Id: I0f46918c6f1079fed7ee1b21305b18ff38f863f8
|
||||||
|
Reviewed-by: David Faure <david.faure@kdab.com>
|
||||||
|
---
|
||||||
|
src/corelib/Qt5CoreMacros.cmake | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/src/corelib/Qt5CoreMacros.cmake b/src/corelib/Qt5CoreMacros.cmake
|
||||||
|
index 8b65db95cb..8d3dbe3ecf 100644
|
||||||
|
--- a/src/corelib/Qt5CoreMacros.cmake
|
||||||
|
+++ b/src/corelib/Qt5CoreMacros.cmake
|
||||||
|
@@ -257,7 +257,7 @@ function(QT5_ADD_BINARY_RESOURCES target )
|
||||||
|
add_custom_command(OUTPUT ${rcc_destination}
|
||||||
|
COMMAND ${Qt5Core_RCC_EXECUTABLE}
|
||||||
|
ARGS ${rcc_options} --binary --name ${target} --output ${rcc_destination} ${infiles}
|
||||||
|
- DEPENDS ${rc_depends} ${out_depends} VERBATIM)
|
||||||
|
+ DEPENDS ${rc_depends} ${out_depends} ${infiles} VERBATIM)
|
||||||
|
add_custom_target(${target} ALL DEPENDS ${rcc_destination})
|
||||||
|
endfunction()
|
||||||
|
|
||||||
|
--
|
||||||
|
2.14.3
|
||||||
|
|
|
@ -0,0 +1,90 @@
|
||||||
|
From e211ab76d766878b4dbe88901b9a7a4a70ce7332 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Andre de la Rocha <andre.rocha@qt.io>
|
||||||
|
Date: Thu, 18 Jan 2018 18:43:25 +0100
|
||||||
|
Subject: [PATCH 45/74] Handle OOM condition in the validation of plugin
|
||||||
|
metadata
|
||||||
|
MIME-Version: 1.0
|
||||||
|
Content-Type: text/plain; charset=UTF-8
|
||||||
|
Content-Transfer-Encoding: 8bit
|
||||||
|
|
||||||
|
A large plugin dll (e.g., one with many MB of debug info) could cause
|
||||||
|
a 32-bit application to crash when the entire dll file could not fit
|
||||||
|
within the address space of the process. The code for validating a
|
||||||
|
plugin library and retrieving metadata from it first tried to map
|
||||||
|
the entire file in memory, which failed for large files, returning
|
||||||
|
NULL. In this case, the code tried then to read the entire file via
|
||||||
|
QFile::readAll(), which deep below caused a bad_alloc exception in
|
||||||
|
malloc, resulting in the termination of the application. This change
|
||||||
|
handles the case where the library could not be mapped into memory,
|
||||||
|
in spite of memory mapping being supported, by reporting the error
|
||||||
|
and returning false, making the plugin unavailable.
|
||||||
|
|
||||||
|
[ChangeLog][QtCore][QPluginLoader] Fixed a bug that would cause the
|
||||||
|
Qt plugin scanning system to allocate too much memory and possibly
|
||||||
|
crash the process.
|
||||||
|
|
||||||
|
Task-number: QTBUG-65197
|
||||||
|
Change-Id: I8c7235d86175c9fcd2b87fcb1151570da9b9ebe3
|
||||||
|
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
|
||||||
|
---
|
||||||
|
src/corelib/plugin/qlibrary.cpp | 29 +++++++++++++++++++++--------
|
||||||
|
1 file changed, 21 insertions(+), 8 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/src/corelib/plugin/qlibrary.cpp b/src/corelib/plugin/qlibrary.cpp
|
||||||
|
index ebad7f1751..9e6e70756f 100644
|
||||||
|
--- a/src/corelib/plugin/qlibrary.cpp
|
||||||
|
+++ b/src/corelib/plugin/qlibrary.cpp
|
||||||
|
@@ -237,21 +237,34 @@ static bool findPatternUnloaded(const QString &library, QLibraryPrivate *lib)
|
||||||
|
if (lib)
|
||||||
|
lib->errorString = file.errorString();
|
||||||
|
if (qt_debug_component()) {
|
||||||
|
- qWarning("%s: %s", (const char*) QFile::encodeName(library),
|
||||||
|
+ qWarning("%s: %s", QFile::encodeName(library).constData(),
|
||||||
|
qPrintable(QSystemError::stdString()));
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
QByteArray data;
|
||||||
|
- const char *filedata = 0;
|
||||||
|
ulong fdlen = file.size();
|
||||||
|
- filedata = (char *) file.map(0, fdlen);
|
||||||
|
+ const char *filedata = reinterpret_cast<char *>(file.map(0, fdlen));
|
||||||
|
+
|
||||||
|
if (filedata == 0) {
|
||||||
|
- // try reading the data into memory instead
|
||||||
|
- data = file.readAll();
|
||||||
|
- filedata = data.constData();
|
||||||
|
- fdlen = data.size();
|
||||||
|
+ if (uchar *mapdata = file.map(0, 1)) {
|
||||||
|
+ file.unmap(mapdata);
|
||||||
|
+ // Mapping is supported, but failed for the entire file, likely due to OOM.
|
||||||
|
+ // Return false, as readAll() would cause a bad_alloc and terminate the process.
|
||||||
|
+ if (lib)
|
||||||
|
+ lib->errorString = QLibrary::tr("Out of memory while loading plugin '%1'.").arg(library);
|
||||||
|
+ if (qt_debug_component()) {
|
||||||
|
+ qWarning("%s: %s", QFile::encodeName(library).constData(),
|
||||||
|
+ qPrintable(QSystemError::stdString(ENOMEM)));
|
||||||
|
+ }
|
||||||
|
+ return false;
|
||||||
|
+ } else {
|
||||||
|
+ // Try reading the data into memory instead.
|
||||||
|
+ data = file.readAll();
|
||||||
|
+ filedata = data.constData();
|
||||||
|
+ fdlen = data.size();
|
||||||
|
+ }
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
@@ -745,7 +758,7 @@ void QLibraryPrivate::updatePluginState()
|
||||||
|
if (qt_debug_component()) {
|
||||||
|
qWarning("In %s:\n"
|
||||||
|
" Plugin uses incompatible Qt library (%d.%d.%d) [%s]",
|
||||||
|
- (const char*) QFile::encodeName(fileName),
|
||||||
|
+ QFile::encodeName(fileName).constData(),
|
||||||
|
(qt_version&0xff0000) >> 16, (qt_version&0xff00) >> 8, qt_version&0xff,
|
||||||
|
debug ? "debug" : "release");
|
||||||
|
}
|
||||||
|
--
|
||||||
|
2.14.3
|
||||||
|
|
|
@ -0,0 +1,31 @@
|
||||||
|
From a69a0e8254b79c62fad7372e8c14f66d440ad744 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Laszlo Agocs <laszlo.agocs@qt.io>
|
||||||
|
Date: Tue, 23 Jan 2018 10:21:49 +0100
|
||||||
|
Subject: [PATCH 50/74] glx: Avoid losing the stereo flag in QSurfaceFormat
|
||||||
|
|
||||||
|
Task-number: QTBUG-59636
|
||||||
|
Change-Id: I38394009993e92ab9db853a1450687fc48e471f5
|
||||||
|
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
|
||||||
|
---
|
||||||
|
src/plugins/platforms/xcb/gl_integrations/xcb_glx/qglxintegration.cpp | 4 ++++
|
||||||
|
1 file changed, 4 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qglxintegration.cpp b/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qglxintegration.cpp
|
||||||
|
index e2e573f0e1..fc1806f982 100644
|
||||||
|
--- a/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qglxintegration.cpp
|
||||||
|
+++ b/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qglxintegration.cpp
|
||||||
|
@@ -134,7 +134,11 @@ static void updateFormatFromContext(QSurfaceFormat &format)
|
||||||
|
}
|
||||||
|
|
||||||
|
format.setProfile(QSurfaceFormat::NoProfile);
|
||||||
|
+ const bool isStereo = format.testOption(QSurfaceFormat::StereoBuffers);
|
||||||
|
format.setOptions(QSurfaceFormat::FormatOptions());
|
||||||
|
+ // Restore flags that come from the VisualInfo/FBConfig.
|
||||||
|
+ if (isStereo)
|
||||||
|
+ format.setOption(QSurfaceFormat::StereoBuffers);
|
||||||
|
|
||||||
|
if (format.renderableType() == QSurfaceFormat::OpenGL) {
|
||||||
|
if (format.version() < qMakePair(3, 0)) {
|
||||||
|
--
|
||||||
|
2.14.3
|
||||||
|
|
|
@ -0,0 +1,226 @@
|
||||||
|
From 3adfcbf1ed9b63c3ce41d7417658db3836fd3530 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Christian Ehrlicher <ch.ehrlicher@gmx.de>
|
||||||
|
Date: Sun, 21 Jan 2018 19:55:40 +0100
|
||||||
|
Subject: [PATCH 68/74] QHeaderView: properly restore section data after
|
||||||
|
layoutChanged()
|
||||||
|
MIME-Version: 1.0
|
||||||
|
Content-Type: text/plain; charset=UTF-8
|
||||||
|
Content-Transfer-Encoding: 8bit
|
||||||
|
|
||||||
|
QHeaderView is doing a complete rebuild of the sections when the layout
|
||||||
|
changed because everything could have happened. But since layoutChanged
|
||||||
|
is also called during e.g. sorting, the old data must be restored when
|
||||||
|
possible.
|
||||||
|
|
||||||
|
Task-number: QTBUG-65478
|
||||||
|
Change-Id: I088d4d843cad362b97df6dc5e0dcb9819b13547f
|
||||||
|
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
|
||||||
|
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
|
||||||
|
---
|
||||||
|
src/widgets/itemviews/qheaderview.cpp | 88 ++++++++++++++++------
|
||||||
|
src/widgets/itemviews/qheaderview_p.h | 11 +--
|
||||||
|
.../itemviews/qheaderview/tst_qheaderview.cpp | 13 +++-
|
||||||
|
3 files changed, 82 insertions(+), 30 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/src/widgets/itemviews/qheaderview.cpp b/src/widgets/itemviews/qheaderview.cpp
|
||||||
|
index 0905a20812..e1aec3f4bd 100644
|
||||||
|
--- a/src/widgets/itemviews/qheaderview.cpp
|
||||||
|
+++ b/src/widgets/itemviews/qheaderview.cpp
|
||||||
|
@@ -351,7 +351,7 @@ void QHeaderView::setModel(QAbstractItemModel *model)
|
||||||
|
if (model == this->model())
|
||||||
|
return;
|
||||||
|
Q_D(QHeaderView);
|
||||||
|
- d->persistentHiddenSections.clear();
|
||||||
|
+ d->layoutChangePersistentSections.clear();
|
||||||
|
if (d->model && d->model != QAbstractItemModelPrivate::staticEmptyModel()) {
|
||||||
|
if (d->orientation == Qt::Horizontal) {
|
||||||
|
QObject::disconnect(d->model, SIGNAL(columnsInserted(QModelIndex,int,int)),
|
||||||
|
@@ -2072,14 +2072,28 @@ void QHeaderViewPrivate::_q_layoutAboutToBeChanged()
|
||||||
|
|| model->columnCount(root) == 0)
|
||||||
|
return;
|
||||||
|
|
||||||
|
- if (hiddenSectionSize.count() == 0)
|
||||||
|
- return;
|
||||||
|
+ layoutChangePersistentSections.clear();
|
||||||
|
+ layoutChangePersistentSections.reserve(std::min(10, sectionItems.count()));
|
||||||
|
+ // after layoutChanged another section can be last stretched section
|
||||||
|
+ if (stretchLastSection) {
|
||||||
|
+ const int visual = visualIndex(lastSectionLogicalIdx);
|
||||||
|
+ sectionItems[visual].size = lastSectionSize;
|
||||||
|
+ }
|
||||||
|
+ for (int i = 0; i < sectionItems.size(); ++i) {
|
||||||
|
+ const auto &s = sectionItems.at(i);
|
||||||
|
+ // only add if the section is not default and not visually moved
|
||||||
|
+ if (s.size == defaultSectionSize && !s.isHidden && s.resizeMode == globalResizeMode)
|
||||||
|
+ continue;
|
||||||
|
|
||||||
|
- for (int i = 0; i < sectionItems.count(); ++i)
|
||||||
|
- if (isVisualIndexHidden(i)) // ### note that we are using column or row 0
|
||||||
|
- persistentHiddenSections.append(orientation == Qt::Horizontal
|
||||||
|
- ? model->index(0, logicalIndex(i), root)
|
||||||
|
- : model->index(logicalIndex(i), 0, root));
|
||||||
|
+ // ### note that we are using column or row 0
|
||||||
|
+ layoutChangePersistentSections.append({orientation == Qt::Horizontal
|
||||||
|
+ ? model->index(0, logicalIndex(i), root)
|
||||||
|
+ : model->index(logicalIndex(i), 0, root),
|
||||||
|
+ s});
|
||||||
|
+
|
||||||
|
+ if (layoutChangePersistentSections.size() > 1000)
|
||||||
|
+ break;
|
||||||
|
+ }
|
||||||
|
}
|
||||||
|
|
||||||
|
void QHeaderViewPrivate::_q_layoutChanged()
|
||||||
|
@@ -2087,25 +2101,57 @@ void QHeaderViewPrivate::_q_layoutChanged()
|
||||||
|
Q_Q(QHeaderView);
|
||||||
|
viewport->update();
|
||||||
|
|
||||||
|
- const auto hiddenSections = persistentHiddenSections;
|
||||||
|
- persistentHiddenSections.clear();
|
||||||
|
-
|
||||||
|
- clear();
|
||||||
|
- q->initializeSections();
|
||||||
|
- invalidateCachedSizeHint();
|
||||||
|
+ const auto oldPersistentSections = layoutChangePersistentSections;
|
||||||
|
+ layoutChangePersistentSections.clear();
|
||||||
|
|
||||||
|
- if (modelIsEmpty()) {
|
||||||
|
+ const int newCount = modelSectionCount();
|
||||||
|
+ const int oldCount = sectionItems.size();
|
||||||
|
+ if (newCount == 0) {
|
||||||
|
+ clear();
|
||||||
|
+ if (oldCount != 0)
|
||||||
|
+ emit q->sectionCountChanged(oldCount, 0);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
- for (const auto &index : hiddenSections) {
|
||||||
|
- if (index.isValid()) {
|
||||||
|
- const int logical = (orientation == Qt::Horizontal
|
||||||
|
- ? index.column()
|
||||||
|
- : index.row());
|
||||||
|
- q->setSectionHidden(logical, true);
|
||||||
|
+ // adjust section size
|
||||||
|
+ if (newCount != oldCount) {
|
||||||
|
+ const int min = qBound(0, oldCount, newCount - 1);
|
||||||
|
+ q->initializeSections(min, newCount - 1);
|
||||||
|
+ }
|
||||||
|
+ // reset sections
|
||||||
|
+ sectionItems.fill(SectionItem(defaultSectionSize, globalResizeMode), newCount);
|
||||||
|
+
|
||||||
|
+ // all hidden sections are in oldPersistentSections
|
||||||
|
+ hiddenSectionSize.clear();
|
||||||
|
+
|
||||||
|
+ for (const auto &item : oldPersistentSections) {
|
||||||
|
+ const auto &index = item.index;
|
||||||
|
+ if (!index.isValid())
|
||||||
|
+ continue;
|
||||||
|
+
|
||||||
|
+ const int newLogicalIndex = (orientation == Qt::Horizontal
|
||||||
|
+ ? index.column()
|
||||||
|
+ : index.row());
|
||||||
|
+ // the new visualIndices are already adjusted / reset by initializeSections()
|
||||||
|
+ const int newVisualIndex = visualIndex(newLogicalIndex);
|
||||||
|
+ auto &newSection = sectionItems[newVisualIndex];
|
||||||
|
+ newSection = item.section;
|
||||||
|
+
|
||||||
|
+ if (newSection.isHidden) {
|
||||||
|
+ // otherwise setSectionHidden will return without doing anything
|
||||||
|
+ newSection.isHidden = false;
|
||||||
|
+ q->setSectionHidden(newLogicalIndex, true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
+
|
||||||
|
+ recalcSectionStartPos();
|
||||||
|
+ length = headerLength();
|
||||||
|
+
|
||||||
|
+ if (stretchLastSection) {
|
||||||
|
+ // force rebuild of stretched section later on
|
||||||
|
+ lastSectionLogicalIdx = -1;
|
||||||
|
+ maybeRestorePrevLastSectionAndStretchLast();
|
||||||
|
+ }
|
||||||
|
}
|
||||||
|
|
||||||
|
/*!
|
||||||
|
diff --git a/src/widgets/itemviews/qheaderview_p.h b/src/widgets/itemviews/qheaderview_p.h
|
||||||
|
index 8fc8b88aa5..c9c2cf8493 100644
|
||||||
|
--- a/src/widgets/itemviews/qheaderview_p.h
|
||||||
|
+++ b/src/widgets/itemviews/qheaderview_p.h
|
||||||
|
@@ -231,10 +231,6 @@ public:
|
||||||
|
: model->rowCount(root));
|
||||||
|
}
|
||||||
|
|
||||||
|
- inline bool modelIsEmpty() const {
|
||||||
|
- return (model->rowCount(root) == 0 || model->columnCount(root) == 0);
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
inline void doDelayedResizeSections() {
|
||||||
|
if (!delayedResize.isActive())
|
||||||
|
delayedResize.start(0, q_func());
|
||||||
|
@@ -304,7 +300,6 @@ public:
|
||||||
|
QLabel *sectionIndicator;
|
||||||
|
#endif
|
||||||
|
QHeaderView::ResizeMode globalResizeMode;
|
||||||
|
- QList<QPersistentModelIndex> persistentHiddenSections;
|
||||||
|
mutable bool sectionStartposRecalc;
|
||||||
|
int resizeContentsPrecision;
|
||||||
|
// header sections
|
||||||
|
@@ -335,6 +330,11 @@ public:
|
||||||
|
};
|
||||||
|
|
||||||
|
QVector<SectionItem> sectionItems;
|
||||||
|
+ struct LayoutChangeItem {
|
||||||
|
+ QPersistentModelIndex index;
|
||||||
|
+ SectionItem section;
|
||||||
|
+ };
|
||||||
|
+ QVector<LayoutChangeItem> layoutChangePersistentSections;
|
||||||
|
|
||||||
|
void createSectionItems(int start, int end, int size, QHeaderView::ResizeMode mode);
|
||||||
|
void removeSectionsFromSectionItems(int start, int end);
|
||||||
|
@@ -388,6 +388,7 @@ public:
|
||||||
|
|
||||||
|
};
|
||||||
|
Q_DECLARE_TYPEINFO(QHeaderViewPrivate::SectionItem, Q_PRIMITIVE_TYPE);
|
||||||
|
+Q_DECLARE_TYPEINFO(QHeaderViewPrivate::LayoutChangeItem, Q_MOVABLE_TYPE);
|
||||||
|
|
||||||
|
QT_END_NAMESPACE
|
||||||
|
|
||||||
|
diff --git a/tests/auto/widgets/itemviews/qheaderview/tst_qheaderview.cpp b/tests/auto/widgets/itemviews/qheaderview/tst_qheaderview.cpp
|
||||||
|
index 90019a1798..6dae2cf8e4 100644
|
||||||
|
--- a/tests/auto/widgets/itemviews/qheaderview/tst_qheaderview.cpp
|
||||||
|
+++ b/tests/auto/widgets/itemviews/qheaderview/tst_qheaderview.cpp
|
||||||
|
@@ -2251,10 +2251,6 @@ void tst_QHeaderView::QTBUG6058_reset()
|
||||||
|
|
||||||
|
void tst_QHeaderView::QTBUG7833_sectionClicked()
|
||||||
|
{
|
||||||
|
-
|
||||||
|
-
|
||||||
|
-
|
||||||
|
-
|
||||||
|
QTableView tv;
|
||||||
|
QStandardItemModel *sim = new QStandardItemModel(&tv);
|
||||||
|
QSortFilterProxyModel *proxyModel = new QSortFilterProxyModel(&tv);
|
||||||
|
@@ -2278,11 +2274,20 @@ void tst_QHeaderView::QTBUG7833_sectionClicked()
|
||||||
|
tv.horizontalHeader()->setSectionResizeMode(QHeaderView::Interactive);
|
||||||
|
|
||||||
|
tv.setModel(proxyModel);
|
||||||
|
+ const int section4Size = tv.horizontalHeader()->sectionSize(4) + 1;
|
||||||
|
+ tv.horizontalHeader()->resizeSection(4, section4Size);
|
||||||
|
tv.setColumnHidden(5, true);
|
||||||
|
tv.setColumnHidden(6, true);
|
||||||
|
tv.horizontalHeader()->swapSections(8, 10);
|
||||||
|
tv.sortByColumn(1, Qt::AscendingOrder);
|
||||||
|
|
||||||
|
+ QCOMPARE(tv.isColumnHidden(5), true);
|
||||||
|
+ QCOMPARE(tv.isColumnHidden(6), true);
|
||||||
|
+ QCOMPARE(tv.horizontalHeader()->sectionsMoved(), true);
|
||||||
|
+ QCOMPARE(tv.horizontalHeader()->logicalIndex(8), 10);
|
||||||
|
+ QCOMPARE(tv.horizontalHeader()->logicalIndex(10), 8);
|
||||||
|
+ QCOMPARE(tv.horizontalHeader()->sectionSize(4), section4Size);
|
||||||
|
+
|
||||||
|
QSignalSpy clickedSpy(tv.horizontalHeader(), SIGNAL(sectionClicked(int)));
|
||||||
|
QSignalSpy pressedSpy(tv.horizontalHeader(), SIGNAL(sectionPressed(int)));
|
||||||
|
|
||||||
|
--
|
||||||
|
2.14.3
|
||||||
|
|
|
@ -0,0 +1,170 @@
|
||||||
|
From 4a7771f206d4b29be549d3827c36a46679d90de6 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Eike Hein <hein@kde.org>
|
||||||
|
Date: Sun, 7 Jan 2018 13:02:01 +0900
|
||||||
|
Subject: [PATCH 69/74] QSimpleDrag: Fix mouse release coords for delayed event
|
||||||
|
transmission
|
||||||
|
|
||||||
|
On platforms such as XCB, the drag cursor pixmap is shown via a window
|
||||||
|
(a QShapedPixmapWindow) under the cursor.
|
||||||
|
|
||||||
|
The mouse button release event at the end of the drag is received in
|
||||||
|
this QXcbWindow, but intercepted by an event filter that QSimpleDrag
|
||||||
|
installs on the QApplication. It then resends it unmodified(!) after
|
||||||
|
the drag has ended and the drag pixmap window destroyed, causing it to
|
||||||
|
be delivered to the new top-level window.
|
||||||
|
|
||||||
|
The local coordinates in the unmodified QMouseEvent are local to the
|
||||||
|
drag pixmap window and don't match the window it is delayed-transmitted
|
||||||
|
to.
|
||||||
|
|
||||||
|
This ends up having fatal, user-visible effects particularly in Qt
|
||||||
|
Quick: QQuickWindow synthesizes a hover event once per frame using
|
||||||
|
the last received mouse coordinates, here: the release posted by
|
||||||
|
QSimpleDrag. This is done to update the hover event state for items
|
||||||
|
under the cursor when the mouse hasn't moved (e.g. QQuickMouseArea::
|
||||||
|
containsMouse). The bogus event coordinates in the release event then
|
||||||
|
usually end up causing an item near the top-left of the QQuickWindow
|
||||||
|
to assume it is hovered (because drag pixmap windows tend to be small),
|
||||||
|
even when the mouse cursor is actually far away from it at the end of
|
||||||
|
the drag.
|
||||||
|
|
||||||
|
This shows up e.g. in the Plasma 5 desktop, where dragging an icon
|
||||||
|
on the desktop will cause the icon at the top-left of the screen (if
|
||||||
|
any) to switch to hovered state, as the release coordinates on the
|
||||||
|
drag pixmap window (showing a dragged icon) fall into the geometry
|
||||||
|
of the top-left icon.
|
||||||
|
|
||||||
|
QSimpleDrag contains a topLevelAt() function to find the top-level
|
||||||
|
window under the global cursor coordinates that is not the drag
|
||||||
|
pixmap window. This is used by the drop event delivery code.
|
||||||
|
|
||||||
|
This patch uses this function to find the relevant top-level window,
|
||||||
|
then asks it to map the global cusor coordinates to its local
|
||||||
|
coordinate system, then synthesizes a new QMouseEvent with local
|
||||||
|
coordinates computed in this fashion. As a result the window now
|
||||||
|
gets a release event with coordinates that make sense and are
|
||||||
|
correct.
|
||||||
|
|
||||||
|
Task-number: QTBUG-66103
|
||||||
|
Change-Id: I04ebe6ccd4a991fdd4b540ff0227973ea8896a9d
|
||||||
|
Reviewed-by: Eike Hein <hein@kde.org>
|
||||||
|
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
|
||||||
|
---
|
||||||
|
src/gui/kernel/qsimpledrag.cpp | 32 +++++++++++++++++++++++++++-----
|
||||||
|
src/gui/kernel/qsimpledrag_p.h | 6 +++---
|
||||||
|
2 files changed, 30 insertions(+), 8 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/src/gui/kernel/qsimpledrag.cpp b/src/gui/kernel/qsimpledrag.cpp
|
||||||
|
index a1e25dc53c..87d3ba5915 100644
|
||||||
|
--- a/src/gui/kernel/qsimpledrag.cpp
|
||||||
|
+++ b/src/gui/kernel/qsimpledrag.cpp
|
||||||
|
@@ -58,6 +58,7 @@
|
||||||
|
|
||||||
|
#include <QtCore/QEventLoop>
|
||||||
|
#include <QtCore/QDebug>
|
||||||
|
+#include <QtCore/QLoggingCategory>
|
||||||
|
|
||||||
|
#include <private/qguiapplication_p.h>
|
||||||
|
#include <private/qdnd_p.h>
|
||||||
|
@@ -69,6 +70,8 @@ QT_BEGIN_NAMESPACE
|
||||||
|
|
||||||
|
#ifndef QT_NO_DRAGANDDROP
|
||||||
|
|
||||||
|
+Q_LOGGING_CATEGORY(lcDnd, "qt.gui.dnd")
|
||||||
|
+
|
||||||
|
static QWindow* topLevelAt(const QPoint &pos)
|
||||||
|
{
|
||||||
|
QWindowList list = QGuiApplication::topLevelWindows();
|
||||||
|
@@ -94,10 +97,10 @@ static QWindow* topLevelAt(const QPoint &pos)
|
||||||
|
*/
|
||||||
|
|
||||||
|
QBasicDrag::QBasicDrag() :
|
||||||
|
- m_restoreCursor(false), m_eventLoop(0),
|
||||||
|
+ m_current_window(nullptr), m_restoreCursor(false), m_eventLoop(nullptr),
|
||||||
|
m_executed_drop_action(Qt::IgnoreAction), m_can_drop(false),
|
||||||
|
- m_drag(0), m_drag_icon_window(0), m_useCompositing(true),
|
||||||
|
- m_screen(Q_NULLPTR)
|
||||||
|
+ m_drag(nullptr), m_drag_icon_window(nullptr), m_useCompositing(true),
|
||||||
|
+ m_screen(nullptr)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -161,6 +164,7 @@ bool QBasicDrag::eventFilter(QObject *o, QEvent *e)
|
||||||
|
return true; // Eat all mouse move events
|
||||||
|
}
|
||||||
|
case QEvent::MouseButtonRelease:
|
||||||
|
+ {
|
||||||
|
disableEventFilter();
|
||||||
|
if (canDrop()) {
|
||||||
|
QPoint nativePosition = getNativeMousePos(e, m_drag_icon_window);
|
||||||
|
@@ -169,8 +173,25 @@ bool QBasicDrag::eventFilter(QObject *o, QEvent *e)
|
||||||
|
cancel();
|
||||||
|
}
|
||||||
|
exitDndEventLoop();
|
||||||
|
- QCoreApplication::postEvent(o, new QMouseEvent(*static_cast<QMouseEvent *>(e)));
|
||||||
|
+
|
||||||
|
+ // If a QShapedPixmapWindow (drag feedback) is being dragged along, the
|
||||||
|
+ // mouse event's localPos() will be relative to that, which is useless.
|
||||||
|
+ // We want a position relative to the window where the drag ends, if possible (?).
|
||||||
|
+ // If there is no such window (belonging to this Qt application),
|
||||||
|
+ // make the event relative to the window where the drag started. (QTBUG-66103)
|
||||||
|
+ const QMouseEvent *release = static_cast<QMouseEvent *>(e);
|
||||||
|
+ const QWindow *releaseWindow = topLevelAt(release->globalPos());
|
||||||
|
+ qCDebug(lcDnd) << "mouse released over" << releaseWindow << "after drag from" << m_current_window << "globalPos" << release->globalPos();
|
||||||
|
+ if (!releaseWindow)
|
||||||
|
+ releaseWindow = m_current_window;
|
||||||
|
+ QPoint releaseWindowPos = (releaseWindow ? releaseWindow->mapFromGlobal(release->globalPos()) : release->globalPos());
|
||||||
|
+ QMouseEvent *newRelease = new QMouseEvent(release->type(),
|
||||||
|
+ releaseWindowPos, releaseWindowPos, release->screenPos(),
|
||||||
|
+ release->button(), release->buttons(),
|
||||||
|
+ release->modifiers(), release->source());
|
||||||
|
+ QCoreApplication::postEvent(o, newRelease);
|
||||||
|
return true; // defer mouse release events until drag event loop has returned
|
||||||
|
+ }
|
||||||
|
case QEvent::MouseButtonDblClick:
|
||||||
|
case QEvent::Wheel:
|
||||||
|
return true;
|
||||||
|
@@ -349,7 +370,7 @@ static inline QPoint fromNativeGlobalPixels(const QPoint &point)
|
||||||
|
into account.
|
||||||
|
*/
|
||||||
|
|
||||||
|
-QSimpleDrag::QSimpleDrag() : m_current_window(0)
|
||||||
|
+QSimpleDrag::QSimpleDrag()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -373,6 +394,7 @@ void QSimpleDrag::startDrag()
|
||||||
|
updateCursor(Qt::IgnoreAction);
|
||||||
|
}
|
||||||
|
setExecutedDropAction(Qt::IgnoreAction);
|
||||||
|
+ qCDebug(lcDnd) << "drag began from" << m_current_window<< "cursor pos" << QCursor::pos() << "can drop?" << canDrop();
|
||||||
|
}
|
||||||
|
|
||||||
|
void QSimpleDrag::cancel()
|
||||||
|
diff --git a/src/gui/kernel/qsimpledrag_p.h b/src/gui/kernel/qsimpledrag_p.h
|
||||||
|
index 0b8a0bc703..bbd7f7f4bb 100644
|
||||||
|
--- a/src/gui/kernel/qsimpledrag_p.h
|
||||||
|
+++ b/src/gui/kernel/qsimpledrag_p.h
|
||||||
|
@@ -105,6 +105,9 @@ protected:
|
||||||
|
|
||||||
|
QDrag *drag() const { return m_drag; }
|
||||||
|
|
||||||
|
+protected:
|
||||||
|
+ QWindow *m_current_window;
|
||||||
|
+
|
||||||
|
private:
|
||||||
|
void enableEventFilter();
|
||||||
|
void disableEventFilter();
|
||||||
|
@@ -132,9 +135,6 @@ protected:
|
||||||
|
virtual void cancel() Q_DECL_OVERRIDE;
|
||||||
|
virtual void move(const QPoint &globalPos) Q_DECL_OVERRIDE;
|
||||||
|
virtual void drop(const QPoint &globalPos) Q_DECL_OVERRIDE;
|
||||||
|
-
|
||||||
|
-private:
|
||||||
|
- QWindow *m_current_window;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // QT_NO_DRAGANDDROP
|
||||||
|
--
|
||||||
|
2.14.3
|
||||||
|
|
|
@ -0,0 +1,48 @@
|
||||||
|
From 4cd90a3579986ae7441c3e982a5f34cdfd92c152 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Alex Richardson <arichardson.kde@gmail.com>
|
||||||
|
Date: Tue, 17 Jan 2017 22:31:04 +0000
|
||||||
|
Subject: [PATCH 70/74] Fix native QFileDialog initial selection for remote
|
||||||
|
URLs
|
||||||
|
|
||||||
|
When using QFileDialog::getOpenFileUrl() with dir set to e.g.
|
||||||
|
"sftp://foo/bar.cpp" we call q->selectDirectoryUrl("sftp://foo")
|
||||||
|
followed by q->selectFile("bar.cpp").
|
||||||
|
Inside QFileDialog::selectFile() we unconditionally convert "bar.cpp"
|
||||||
|
to an absolute URL and then call d->selectFile_sys("$CWD/bar.cpp")
|
||||||
|
This then calls platform integration that detects that an absolute URL
|
||||||
|
is being passed to selectFile() and therefore overrides the initial
|
||||||
|
directory.
|
||||||
|
|
||||||
|
Initially reported as https://bugs.kde.org/show_bug.cgi?id=374913
|
||||||
|
|
||||||
|
This is a regression that appeared some time between Qt 5.7.0 and 5.7.1.
|
||||||
|
I have not had time to bisect this but the only commit that may have
|
||||||
|
change behavior in that time range appears to be
|
||||||
|
007f92c6eef6191c48da0c44916591d48813ae62.
|
||||||
|
|
||||||
|
Change-Id: I6968abe9ed5c5b9de067c453a7e9d2c5cdb3a190
|
||||||
|
Reviewed-by: Christoph Resch
|
||||||
|
Reviewed-by: David Faure <david.faure@kdab.com>
|
||||||
|
---
|
||||||
|
src/widgets/dialogs/qfiledialog.cpp | 5 ++++-
|
||||||
|
1 file changed, 4 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/src/widgets/dialogs/qfiledialog.cpp b/src/widgets/dialogs/qfiledialog.cpp
|
||||||
|
index 8d37969be4..cb2c534b24 100644
|
||||||
|
--- a/src/widgets/dialogs/qfiledialog.cpp
|
||||||
|
+++ b/src/widgets/dialogs/qfiledialog.cpp
|
||||||
|
@@ -2830,7 +2830,10 @@ void QFileDialogPrivate::init(const QUrl &directory, const QString &nameFilter,
|
||||||
|
if (!nameFilter.isEmpty())
|
||||||
|
q->setNameFilter(nameFilter);
|
||||||
|
q->setDirectoryUrl(workingDirectory(directory));
|
||||||
|
- q->selectFile(initialSelection(directory));
|
||||||
|
+ if (directory.isLocalFile())
|
||||||
|
+ q->selectFile(initialSelection(directory));
|
||||||
|
+ else
|
||||||
|
+ q->selectUrl(directory);
|
||||||
|
|
||||||
|
#ifndef QT_NO_SETTINGS
|
||||||
|
// Try to restore from the FileDialog settings group; if it fails, fall back
|
||||||
|
--
|
||||||
|
2.14.3
|
||||||
|
|
|
@ -54,8 +54,8 @@ BuildRequires: pkgconfig(libsystemd)
|
||||||
|
|
||||||
Name: qt5-qtbase
|
Name: qt5-qtbase
|
||||||
Summary: Qt5 - QtBase components
|
Summary: Qt5 - QtBase components
|
||||||
Version: 5.9.3
|
Version: 5.9.4
|
||||||
Release: 2%{?dist}
|
Release: 4%{?dist}
|
||||||
|
|
||||||
# See LGPL_EXCEPTIONS.txt, for exception details
|
# See LGPL_EXCEPTIONS.txt, for exception details
|
||||||
License: LGPLv2 with exceptions or GPLv3 with exceptions
|
License: LGPLv2 with exceptions or GPLv3 with exceptions
|
||||||
|
@ -97,6 +97,13 @@ Patch51: qtbase-hidpi_scale_at_192.patch
|
||||||
# 2. Workaround sysmacros.h (pre)defining major/minor a breaking stuff
|
# 2. Workaround sysmacros.h (pre)defining major/minor a breaking stuff
|
||||||
Patch52: qtbase-opensource-src-5.7.1-moc_macros.patch
|
Patch52: qtbase-opensource-src-5.7.1-moc_macros.patch
|
||||||
|
|
||||||
|
# QMimeType: remove unwanted *.bin as preferredSuffix for octet-stream
|
||||||
|
# This leads to an automatically appended .bin when saving a file.
|
||||||
|
# https://bugs.freedesktop.org/show_bug.cgi?id=101667
|
||||||
|
# https://bugs.kde.org/382437
|
||||||
|
# Fixed upstream in shared-mime-info 1.10
|
||||||
|
Patch53: qtbase-fdo101667.patch
|
||||||
|
|
||||||
# drop -O3 and make -O2 by default
|
# drop -O3 and make -O2 by default
|
||||||
Patch61: qt5-qtbase-cxxflag.patch
|
Patch61: qt5-qtbase-cxxflag.patch
|
||||||
|
|
||||||
|
@ -116,7 +123,13 @@ Patch66: qtbase-mariadb.patch
|
||||||
Patch67: https://bugreports.qt.io/secure/attachment/66353/xcberror_filter.patch
|
Patch67: https://bugreports.qt.io/secure/attachment/66353/xcberror_filter.patch
|
||||||
|
|
||||||
## upstream patches (5.9 branch)
|
## upstream patches (5.9 branch)
|
||||||
Patch100: qtbase-opensource-src-5.9.3-QTBUG-64742-out-of-bounds-in-qdnslookup_unix.patch
|
Patch112: 0012-Avoid-providing-bad-pixelDeltas-on-X11.patch
|
||||||
|
Patch116: 0016-CMake-qt5_add_binary_resource-re-run-if-needed.patch
|
||||||
|
Patch445: 0045-Handle-OOM-condition-in-the-validation-of-plugin-met.patch
|
||||||
|
Patch150: 0050-glx-Avoid-losing-the-stereo-flag-in-QSurfaceFormat.patch
|
||||||
|
Patch168: 0068-QHeaderView-properly-restore-section-data-after-layo.patch
|
||||||
|
Patch169: 0069-QSimpleDrag-Fix-mouse-release-coords-for-delayed-eve.patch
|
||||||
|
Patch170: 0070-Fix-native-QFileDialog-initial-selection-for-remote-.patch
|
||||||
|
|
||||||
# Do not check any files in %%{_qt5_plugindir}/platformthemes/ for requires.
|
# Do not check any files in %%{_qt5_plugindir}/platformthemes/ for requires.
|
||||||
# Those themes are there for platform integration. If the required libraries are
|
# Those themes are there for platform integration. If the required libraries are
|
||||||
|
@ -131,8 +144,6 @@ BuildRequires: cups-devel
|
||||||
BuildRequires: desktop-file-utils
|
BuildRequires: desktop-file-utils
|
||||||
BuildRequires: findutils
|
BuildRequires: findutils
|
||||||
BuildRequires: libjpeg-devel
|
BuildRequires: libjpeg-devel
|
||||||
BuildRequires: libmng-devel
|
|
||||||
BuildRequires: libtiff-devel
|
|
||||||
BuildRequires: pkgconfig(alsa)
|
BuildRequires: pkgconfig(alsa)
|
||||||
# required for -accessibility
|
# required for -accessibility
|
||||||
BuildRequires: pkgconfig(atspi-2)
|
BuildRequires: pkgconfig(atspi-2)
|
||||||
|
@ -353,6 +364,7 @@ Qt5 libraries used for drawing widgets and OpenGL items.
|
||||||
%patch50 -p1 -b .QT_VERSION_CHECK
|
%patch50 -p1 -b .QT_VERSION_CHECK
|
||||||
%patch51 -p1 -b .hidpi_scale_at_192
|
%patch51 -p1 -b .hidpi_scale_at_192
|
||||||
%patch52 -p1 -b .moc_macros
|
%patch52 -p1 -b .moc_macros
|
||||||
|
%patch53 -p1 -b .fdo101667
|
||||||
%patch61 -p1 -b .qt5-qtbase-cxxflag
|
%patch61 -p1 -b .qt5-qtbase-cxxflag
|
||||||
%if 0%{?openssl11}
|
%if 0%{?openssl11}
|
||||||
%patch63 -p1 -b .openssl11
|
%patch63 -p1 -b .openssl11
|
||||||
|
@ -363,7 +375,15 @@ Qt5 libraries used for drawing widgets and OpenGL items.
|
||||||
%endif
|
%endif
|
||||||
%patch66 -p1 -b .mariadb
|
%patch66 -p1 -b .mariadb
|
||||||
%patch67 -p1 -b .xcberror_filter
|
%patch67 -p1 -b .xcberror_filter
|
||||||
%patch100 -p1 -b .QTBUG-64742-out-of-bounds-in-qdnslookup_unix
|
|
||||||
|
## upstream patches
|
||||||
|
%patch112 -p1 -b .0012
|
||||||
|
%patch116 -p1 -b .0016
|
||||||
|
%patch445 -p1 -b .0045
|
||||||
|
%patch150 -p1 -b .0050
|
||||||
|
#patch168 -p1 -b .0068
|
||||||
|
%patch169 -p1 -b .0069
|
||||||
|
%patch170 -p1 -b .0070
|
||||||
|
|
||||||
%if 0%{?inject_optflags}
|
%if 0%{?inject_optflags}
|
||||||
## adjust $RPM_OPT_FLAGS
|
## adjust $RPM_OPT_FLAGS
|
||||||
|
@ -523,7 +543,7 @@ translationdir=%{_qt5_translationdir}
|
||||||
|
|
||||||
Name: Qt5
|
Name: Qt5
|
||||||
Description: Qt5 Configuration
|
Description: Qt5 Configuration
|
||||||
Version: 5.9.2
|
Version: 5.9.4
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
# rpm macros
|
# rpm macros
|
||||||
|
@ -981,6 +1001,18 @@ fi
|
||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Feb 13 2018 Rex Dieter <rdieter@fedoraproject.org> - 5.9.4-4
|
||||||
|
- omit 0068-QHeaderView.patch, reports of regression'y behavior
|
||||||
|
|
||||||
|
* Fri Feb 02 2018 Rex Dieter <rdieter@fedoraproject.org> - 5.9.4-3
|
||||||
|
- 5.9 branch fixes
|
||||||
|
|
||||||
|
* Sun Jan 28 2018 Rex Dieter <rdieter@fedoraproject.org> - 5.9.4-2
|
||||||
|
- QMimeType: remove unwanted *.bin as preferredSuffix for octet-stream (fdo#101667,kde#382437)
|
||||||
|
|
||||||
|
* Tue Jan 23 2018 Rex Dieter <rdieter@fedoraproject.org> - 5.9.4-1
|
||||||
|
- 5.9.4
|
||||||
|
|
||||||
* Thu Nov 30 2017 Than Ngo <than@redhat.com> - 5.9.3-2
|
* Thu Nov 30 2017 Than Ngo <than@redhat.com> - 5.9.3-2
|
||||||
- bz#1518958, backport to fix out of bounds reads in qdnslookup_unix
|
- bz#1518958, backport to fix out of bounds reads in qdnslookup_unix
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,12 @@
|
||||||
|
diff -up qtbase-opensource-src-5.9.4/src/corelib/mimetypes/qmimetype.cpp.fdo101667 qtbase-opensource-src-5.9.4/src/corelib/mimetypes/qmimetype.cpp
|
||||||
|
--- qtbase-opensource-src-5.9.4/src/corelib/mimetypes/qmimetype.cpp.fdo101667 2018-01-16 00:53:43.000000000 -0600
|
||||||
|
+++ qtbase-opensource-src-5.9.4/src/corelib/mimetypes/qmimetype.cpp 2018-01-28 07:18:09.502534397 -0600
|
||||||
|
@@ -418,6 +418,8 @@ QStringList QMimeType::suffixes() const
|
||||||
|
*/
|
||||||
|
QString QMimeType::preferredSuffix() const
|
||||||
|
{
|
||||||
|
+ if (isDefault()) // workaround for unwanted *.bin suffix for octet-stream, https://bugs.freedesktop.org/show_bug.cgi?id=101667, fixed upstream in 1.10
|
||||||
|
+ return QString();
|
||||||
|
const QStringList suffixList = suffixes();
|
||||||
|
return suffixList.isEmpty() ? QString() : suffixList.at(0);
|
||||||
|
}
|
|
@ -1,50 +0,0 @@
|
||||||
diff -up qtbase-opensource-src-5.9.3/src/network/kernel/qdnslookup_unix.cpp.orig qtbase-opensource-src-5.9.3/src/network/kernel/qdnslookup_unix.cpp
|
|
||||||
--- qtbase-opensource-src-5.9.3/src/network/kernel/qdnslookup_unix.cpp.orig 2017-11-16 06:15:28.000000000 +0100
|
|
||||||
+++ qtbase-opensource-src-5.9.3/src/network/kernel/qdnslookup_unix.cpp 2017-11-30 09:22:47.525741040 +0100
|
|
||||||
@@ -42,6 +42,7 @@
|
|
||||||
#if QT_CONFIG(library)
|
|
||||||
#include <qlibrary.h>
|
|
||||||
#endif
|
|
||||||
+#include <qvarlengtharray.h>
|
|
||||||
#include <qscopedpointer.h>
|
|
||||||
#include <qurl.h>
|
|
||||||
#include <private/qnativesocketengine_p.h>
|
|
||||||
@@ -58,6 +59,8 @@
|
|
||||||
# include <gnu/lib-names.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
+#include <cstring>
|
|
||||||
+
|
|
||||||
QT_BEGIN_NAMESPACE
|
|
||||||
|
|
||||||
#if QT_CONFIG(library)
|
|
||||||
@@ -189,11 +192,25 @@ void QDnsLookupRunnable::query(const int
|
|
||||||
QScopedPointer<struct __res_state, QDnsLookupStateDeleter> state_ptr(&state);
|
|
||||||
|
|
||||||
// Perform DNS query.
|
|
||||||
- unsigned char response[PACKETSZ];
|
|
||||||
- memset(response, 0, sizeof(response));
|
|
||||||
- const int responseLength = local_res_nquery(&state, requestName, C_IN, requestType, response, sizeof(response));
|
|
||||||
+ QVarLengthArray<unsigned char, PACKETSZ> buffer(PACKETSZ);
|
|
||||||
+ memset(buffer.data(), 0, buffer.size());
|
|
||||||
+ int responseLength = local_res_nquery(&state, requestName, C_IN, requestType, buffer.data(), buffer.size());
|
|
||||||
+ if (Q_UNLIKELY(responseLength > PACKETSZ)) {
|
|
||||||
+ buffer.resize(responseLength);
|
|
||||||
+ memset(buffer.data(), 0, buffer.size());
|
|
||||||
+ responseLength = local_res_nquery(&state, requestName, C_IN, requestType, buffer.data(), buffer.size());
|
|
||||||
+ if (Q_UNLIKELY(responseLength > buffer.size())) {
|
|
||||||
+ // Ok, we give up.
|
|
||||||
+ reply->error = QDnsLookup::ResolverError;
|
|
||||||
+ reply->errorString.clear(); // We cannot be more specific, alas.
|
|
||||||
+ return;
|
|
||||||
+ }
|
|
||||||
+ }
|
|
||||||
|
|
||||||
- // Check the response header.
|
|
||||||
+ unsigned char *response = buffer.data();
|
|
||||||
+ // Check the response header. Though res_nquery returns -1 as a
|
|
||||||
+ // responseLength in case of error, we still can extract the
|
|
||||||
+ // exact error code from the response.
|
|
||||||
HEADER *header = (HEADER*)response;
|
|
||||||
const int answerCount = ntohs(header->ancount);
|
|
||||||
switch (header->rcode) {
|
|
2
sources
2
sources
|
@ -1 +1 @@
|
||||||
SHA512 (qtbase-opensource-src-5.9.3.tar.xz) = 256ffb8760e94c0f87790ed35e210d0c9613e14314ff442dd763cc93fbd5caa6c11c95f5d44b12a7687fb93c9f857878132cf6d76e5933f647ca7beb54b18c7c
|
SHA512 (qtbase-opensource-src-5.9.4.tar.xz) = 82be3af6cbe83458a17a5dc53b9f57e56d9c1dbc1bae11e36c5a44e11b1f4cf62ef609cb775f55bfad7be38fbfeffc9cf12dd557bf7c64cbd26634c024a394dd
|
||||||
|
|
Loading…
Reference in New Issue