Accepting request 283929 from KDE:Qt5
- Fixed qt_instdate generation, so the Qt5Core library doesn't have DATE embedded - Drop fdupes usage as it provides unpredictable results, and fools build-compare - Add libqt5-qtbase-rpmlintrc due to duplicates waste warnings: we rather have a few bytes more than to republish same binaries due to fdupes - Added make-qdbusxml2cpp-output-reproducible.patch: don't include date/time in the generated include guards; prevents unnecessary rebuilds - Added fix-drag-and-drop-regression.patch from upstream, fixes QTBUG-43436 OBS-URL: https://build.opensuse.org/request/show/283929 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/libqt5-qtbase?expand=0&rev=36
This commit is contained in:
parent
6851d4cabb
commit
42a9b4e863
124
fix-drag-and-drop-regression.patch
Normal file
124
fix-drag-and-drop-regression.patch
Normal file
@ -0,0 +1,124 @@
|
|||||||
|
From: Gatis Paeglis <gatis.paeglis@theqtcompany.com>
|
||||||
|
Date: Wed, 07 Jan 2015 12:51:38 +0000
|
||||||
|
Subject: Fix drag and drop regression
|
||||||
|
X-Git-Url: http://quickgit.kde.org/?p=qt%2Fqtbase.git&a=commitdiff&h=3c21c4581dbd957d9f660dd52d0298ecef1001cb
|
||||||
|
---
|
||||||
|
Fix drag and drop regression
|
||||||
|
|
||||||
|
Fix regression introduced by e4becdc3d310a0dd1a6d34d0796a52b21dedeb2d
|
||||||
|
|
||||||
|
Add QPlatformDrag::ownsDragObject() function, QDragManager can use the
|
||||||
|
return value of this function to decide if it should take care of deleting
|
||||||
|
QDrag object or platform plugin will take care of deleting QDrag.
|
||||||
|
|
||||||
|
XCB platform plugins uses async dnd data delivery mechanism. It allows
|
||||||
|
user to drop something and then continue working with the assurance that
|
||||||
|
the target will get the data regardless of how slow the network connections
|
||||||
|
are, which means that a source window should preserve QDrag data until
|
||||||
|
dnd has finished.
|
||||||
|
|
||||||
|
Change-Id: I1fbad7380cddec98b756698993dd397409833150
|
||||||
|
Task-number: QTBUG-43436
|
||||||
|
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
|
||||||
|
---
|
||||||
|
|
||||||
|
|
||||||
|
--- a/src/gui/kernel/qdnd.cpp
|
||||||
|
+++ b/src/gui/kernel/qdnd.cpp
|
||||||
|
@@ -134,7 +134,8 @@
|
||||||
|
QGuiApplicationPrivate::instance()->notifyDragStarted(o);
|
||||||
|
const Qt::DropAction result = m_platformDrag->drag(m_object);
|
||||||
|
m_object = 0;
|
||||||
|
- o->deleteLater();
|
||||||
|
+ if (!m_platformDrag->ownsDragObject())
|
||||||
|
+ o->deleteLater();
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
--- a/src/gui/kernel/qplatformdrag.cpp
|
||||||
|
+++ b/src/gui/kernel/qplatformdrag.cpp
|
||||||
|
@@ -241,6 +241,18 @@
|
||||||
|
return *qt_drag_default_pixmap();
|
||||||
|
}
|
||||||
|
|
||||||
|
+/*!
|
||||||
|
+ \since 5.4
|
||||||
|
+ \brief Returns bool indicating whether QPlatformDrag takes ownership
|
||||||
|
+ and therefore responsibility of deleting the QDrag object passed in
|
||||||
|
+ from QPlatformDrag::drag. This can be useful on platforms where QDrag
|
||||||
|
+ object has to be kept around.
|
||||||
|
+ */
|
||||||
|
+bool QPlatformDrag::ownsDragObject() const
|
||||||
|
+{
|
||||||
|
+ return false;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
#endif // QT_NO_DRAGANDDROP
|
||||||
|
|
||||||
|
QT_END_NAMESPACE
|
||||||
|
|
||||||
|
--- a/src/gui/kernel/qplatformdrag.h
|
||||||
|
+++ b/src/gui/kernel/qplatformdrag.h
|
||||||
|
@@ -98,6 +98,8 @@
|
||||||
|
|
||||||
|
static QPixmap defaultPixmap();
|
||||||
|
|
||||||
|
+ virtual bool ownsDragObject() const;
|
||||||
|
+
|
||||||
|
private:
|
||||||
|
QPlatformDragPrivate *d_ptr;
|
||||||
|
|
||||||
|
|
||||||
|
--- a/src/plugins/platforms/xcb/qxcbdrag.cpp
|
||||||
|
+++ b/src/plugins/platforms/xcb/qxcbdrag.cpp
|
||||||
|
@@ -999,6 +999,8 @@
|
||||||
|
if (at != -1) {
|
||||||
|
|
||||||
|
Transaction t = transactions.takeAt(at);
|
||||||
|
+ if (t.drag)
|
||||||
|
+ t.drag->deleteLater();
|
||||||
|
// QDragManager *manager = QDragManager::self();
|
||||||
|
|
||||||
|
// Window target = current_target;
|
||||||
|
@@ -1186,6 +1188,11 @@
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
+bool QXcbDrag::ownsDragObject() const
|
||||||
|
+{
|
||||||
|
+ return true;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
QXcbDropData::QXcbDropData(QXcbDrag *d)
|
||||||
|
: QXcbMime(),
|
||||||
|
drag(d)
|
||||||
|
|
||||||
|
--- a/src/plugins/platforms/xcb/qxcbdrag.h
|
||||||
|
+++ b/src/plugins/platforms/xcb/qxcbdrag.h
|
||||||
|
@@ -70,12 +70,11 @@
|
||||||
|
|
||||||
|
virtual QMimeData *platformDropData();
|
||||||
|
|
||||||
|
-
|
||||||
|
- void startDrag();
|
||||||
|
- void cancel();
|
||||||
|
- void move(const QMouseEvent *me);
|
||||||
|
- void drop(const QMouseEvent *me);
|
||||||
|
- void endDrag();
|
||||||
|
+ void startDrag() Q_DECL_OVERRIDE;
|
||||||
|
+ void cancel() Q_DECL_OVERRIDE;
|
||||||
|
+ void move(const QMouseEvent *me) Q_DECL_OVERRIDE;
|
||||||
|
+ void drop(const QMouseEvent *me) Q_DECL_OVERRIDE;
|
||||||
|
+ void endDrag() Q_DECL_OVERRIDE;
|
||||||
|
|
||||||
|
void handleEnter(QWindow *window, const xcb_client_message_event_t *event);
|
||||||
|
void handlePosition(QWindow *w, const xcb_client_message_event_t *event);
|
||||||
|
@@ -87,6 +86,7 @@
|
||||||
|
void handleFinished(const xcb_client_message_event_t *event);
|
||||||
|
|
||||||
|
bool dndEnable(QXcbWindow *win, bool on);
|
||||||
|
+ bool ownsDragObject() const Q_DECL_OVERRIDE;
|
||||||
|
|
||||||
|
void updatePixmap();
|
||||||
|
xcb_timestamp_t targetTime() { return target_time; }
|
2
libqt5-qtbase-rpmlintrc
Normal file
2
libqt5-qtbase-rpmlintrc
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
addFilter("files-duplicated-waste .*")
|
||||||
|
addFilter("files-duplicate .*")
|
@ -1,3 +1,19 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Feb 3 13:48:49 UTC 2015 - hrvoje.senjan@gmail.com
|
||||||
|
|
||||||
|
- Fixed qt_instdate generation, so the Qt5Core library doesn't have
|
||||||
|
DATE embedded
|
||||||
|
- Drop fdupes usage as it provides unpredictable results, and fools
|
||||||
|
build-compare
|
||||||
|
- Add libqt5-qtbase-rpmlintrc due to duplicates waste warnings: we
|
||||||
|
rather have a few bytes more than to republish same binaries due
|
||||||
|
to fdupes
|
||||||
|
- Added make-qdbusxml2cpp-output-reproducible.patch: don't include
|
||||||
|
date/time in the generated include guards; prevents unnecessary
|
||||||
|
rebuilds
|
||||||
|
- Added fix-drag-and-drop-regression.patch from upstream,
|
||||||
|
fixes QTBUG-43436
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Mon Jan 12 16:33:18 UTC 2015 - hrvoje.senjan@gmail.com
|
Mon Jan 12 16:33:18 UTC 2015 - hrvoje.senjan@gmail.com
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package libqt5-qtbase
|
# spec file for package libqt5-qtbase
|
||||||
#
|
#
|
||||||
# Copyright (c) 2015 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
|
||||||
#
|
#
|
||||||
# All modifications and additions to the file contributed by third parties
|
# All modifications and additions to the file contributed by third parties
|
||||||
# remain the property of their copyright owners, unless otherwise agreed
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
@ -41,6 +41,7 @@ Source: %{tar_version}.tar.xz
|
|||||||
Source1: libqt5-qtbase.changes
|
Source1: libqt5-qtbase.changes
|
||||||
Source2: macros.qt5
|
Source2: macros.qt5
|
||||||
Source3: baselibs.conf
|
Source3: baselibs.conf
|
||||||
|
Source99: libqt5-qtbase-rpmlintrc
|
||||||
# patches 0-1000 are openSUSE and/or non-upstream(able) patches #
|
# patches 0-1000 are openSUSE and/or non-upstream(able) patches #
|
||||||
# PATCH-FIX-UPSTREAM libqt5-libtool-nodate.diff -- for ommiting date/time on build
|
# PATCH-FIX-UPSTREAM libqt5-libtool-nodate.diff -- for ommiting date/time on build
|
||||||
Patch0: libqt5-libtool-nodate.diff
|
Patch0: libqt5-libtool-nodate.diff
|
||||||
@ -56,6 +57,8 @@ Patch4: protect-geometry-QTBUG-40584.patch
|
|||||||
Patch5: libqt5-do-not-use-shm-if-display-name-doesnt-look-local.patch
|
Patch5: libqt5-do-not-use-shm-if-display-name-doesnt-look-local.patch
|
||||||
# PATCH-FIX-OPENSUSE QTBUG41590.patch -- https://bugreports.qt-project.org/browse/QTBUG-40971 https://bugreports.qt-project.org/browse/QTBUG-41590
|
# PATCH-FIX-OPENSUSE QTBUG41590.patch -- https://bugreports.qt-project.org/browse/QTBUG-40971 https://bugreports.qt-project.org/browse/QTBUG-41590
|
||||||
Patch6: QTBUG41590.patch
|
Patch6: QTBUG41590.patch
|
||||||
|
# PATCH-FIX-OPENSUSE make-qdbusxml2cpp-output-reproducible.patch -- https://codereview.qt-project.org/#/c/105210/1
|
||||||
|
Patch7: make-qdbusxml2cpp-output-reproducible.patch
|
||||||
# patches 1000-2000 and above from upstream 5.3 branch #
|
# patches 1000-2000 and above from upstream 5.3 branch #
|
||||||
# patches 2000-3000 and above from upstream 5.4 branch #
|
# patches 2000-3000 and above from upstream 5.4 branch #
|
||||||
# PATCH-FIX-UPSTREAM Handle-SelectionClientClose-in-QXcbClipboard.patch -- kde#329174
|
# PATCH-FIX-UPSTREAM Handle-SelectionClientClose-in-QXcbClipboard.patch -- kde#329174
|
||||||
@ -64,9 +67,9 @@ Patch2000: Handle-SelectionClientClose-in-QXcbClipboard.patch
|
|||||||
Patch2001: qimage_conversions.cpp-Fix-build-on-big-endian-syste.patch
|
Patch2001: qimage_conversions.cpp-Fix-build-on-big-endian-syste.patch
|
||||||
# PATCH-FIX-UPSTREAM Fix-use-after-free-bug.patch
|
# PATCH-FIX-UPSTREAM Fix-use-after-free-bug.patch
|
||||||
Patch2002: Fix-use-after-free-bug.patch
|
Patch2002: Fix-use-after-free-bug.patch
|
||||||
|
Patch2003: fix-drag-and-drop-regression.patch
|
||||||
BuildRequires: alsa-devel
|
BuildRequires: alsa-devel
|
||||||
BuildRequires: cups-devel
|
BuildRequires: cups-devel
|
||||||
BuildRequires: fdupes
|
|
||||||
BuildRequires: gcc-c++
|
BuildRequires: gcc-c++
|
||||||
BuildRequires: libjpeg-devel
|
BuildRequires: libjpeg-devel
|
||||||
BuildRequires: libmng-devel
|
BuildRequires: libmng-devel
|
||||||
@ -150,9 +153,11 @@ handling.
|
|||||||
%patch4 -p1
|
%patch4 -p1
|
||||||
%patch5 -p1
|
%patch5 -p1
|
||||||
%patch6 -p1
|
%patch6 -p1
|
||||||
|
%patch7 -p0
|
||||||
%patch2000 -p1
|
%patch2000 -p1
|
||||||
%patch2001 -p1
|
%patch2001 -p1
|
||||||
%patch2002 -p1
|
%patch2002 -p1
|
||||||
|
%patch2003 -p1
|
||||||
|
|
||||||
# be sure not to use them
|
# be sure not to use them
|
||||||
rm -r src/3rdparty/{libjpeg,freetype,libpng,zlib}
|
rm -r src/3rdparty/{libjpeg,freetype,libpng,zlib}
|
||||||
@ -677,8 +682,8 @@ platform=""
|
|||||||
mkdir .git
|
mkdir .git
|
||||||
%endif
|
%endif
|
||||||
# Record mtime of changes file instead of build time
|
# Record mtime of changes file instead of build time
|
||||||
CHANGES=`stat --format="%y" %{SOURCE1}|cut --characters=1-10`
|
export CHANGES=`stat --format="%y" %{SOURCE1}|cut --characters=1-10`
|
||||||
sed -i -e "s/qt_instdate=\$TODAY/qt_instdate=$CHANGES/" configure
|
sed -i 's|qt_instdate=`date +%Y-%m-%d`|qt_instdate=$CHANGES|g' configure
|
||||||
# so non-qt5 apps/libs don't get stripped
|
# so non-qt5 apps/libs don't get stripped
|
||||||
sed -i -e 's|^\(QMAKE_STRIP.*=\).*$|\1|g' mkspecs/common/linux.conf
|
sed -i -e 's|^\(QMAKE_STRIP.*=\).*$|\1|g' mkspecs/common/linux.conf
|
||||||
|
|
||||||
@ -819,15 +824,6 @@ pushd %{buildroot}%{libqt5_docdir}/global/template/images
|
|||||||
chmod -R 644 *.png
|
chmod -R 644 *.png
|
||||||
popd
|
popd
|
||||||
|
|
||||||
# Only symlink mkspecs, as headers and cmake files are across different packages. If needed, call fdupes on every dir, as per package split
|
|
||||||
%fdupes -s %{buildroot}%{libqt5_archdatadir}/mkspecs/
|
|
||||||
|
|
||||||
%fdupes -s %{buildroot}%{libqt5_examplesdir}/
|
|
||||||
|
|
||||||
for headers in QtCore QtConcurrent QtTest QtNetwork QtXml QtSql QtGui QtWidgets QtDBus QtPrintSupport QtOpenGL; do
|
|
||||||
%fdupes -s %{buildroot}%{libqt5_includedir}/$headers
|
|
||||||
done
|
|
||||||
|
|
||||||
%post -n libQt5Core5 -p /sbin/ldconfig
|
%post -n libQt5Core5 -p /sbin/ldconfig
|
||||||
|
|
||||||
%post -n libQt5Concurrent5 -p /sbin/ldconfig
|
%post -n libQt5Concurrent5 -p /sbin/ldconfig
|
||||||
|
53
make-qdbusxml2cpp-output-reproducible.patch
Normal file
53
make-qdbusxml2cpp-output-reproducible.patch
Normal file
@ -0,0 +1,53 @@
|
|||||||
|
--- src/tools/qdbusxml2cpp/qdbusxml2cpp.cpp.old 2014-12-05 17:24:31.000000000 +0100
|
||||||
|
+++ src/tools/qdbusxml2cpp/qdbusxml2cpp.cpp 2015-02-03 16:11:26.574739176 +0100
|
||||||
|
@@ -32,7 +32,6 @@
|
||||||
|
****************************************************************************/
|
||||||
|
|
||||||
|
#include <qbytearray.h>
|
||||||
|
-#include <qdatetime.h>
|
||||||
|
#include <qdebug.h>
|
||||||
|
#include <qfile.h>
|
||||||
|
#include <qfileinfo.h>
|
||||||
|
@@ -58,7 +57,6 @@ static QString parentClassName;
|
||||||
|
static QString proxyFile;
|
||||||
|
static QString adaptorFile;
|
||||||
|
static QString inputFile;
|
||||||
|
-static QDateTime classCreationTime;
|
||||||
|
static bool skipNamespaces;
|
||||||
|
static bool verbose;
|
||||||
|
static bool includeMocs;
|
||||||
|
@@ -212,10 +210,8 @@ static QDBusIntrospection::Interfaces re
|
||||||
|
QFile input(inputFile);
|
||||||
|
if (inputFile.isEmpty() || inputFile == QLatin1String("-")) {
|
||||||
|
input.open(stdin, QIODevice::ReadOnly);
|
||||||
|
- classCreationTime = QDateTime::currentDateTime();
|
||||||
|
} else {
|
||||||
|
input.open(QIODevice::ReadOnly);
|
||||||
|
- classCreationTime = QFileInfo(input).lastModified();
|
||||||
|
}
|
||||||
|
|
||||||
|
QByteArray data = input.readAll();
|
||||||
|
@@ -551,9 +547,8 @@ static void writeProxy(const QString &fi
|
||||||
|
} else {
|
||||||
|
includeGuard = QLatin1String("QDBUSXML2CPP_PROXY");
|
||||||
|
}
|
||||||
|
- includeGuard = QString(QLatin1String("%1_%2"))
|
||||||
|
- .arg(includeGuard)
|
||||||
|
- .arg(classCreationTime.toTime_t());
|
||||||
|
+ includeGuard = QString(QLatin1String("%1"))
|
||||||
|
+ .arg(includeGuard);
|
||||||
|
hs << "#ifndef " << includeGuard << endl
|
||||||
|
<< "#define " << includeGuard << endl
|
||||||
|
<< endl;
|
||||||
|
@@ -859,9 +854,8 @@ static void writeAdaptor(const QString &
|
||||||
|
} else {
|
||||||
|
includeGuard = QLatin1String("QDBUSXML2CPP_ADAPTOR");
|
||||||
|
}
|
||||||
|
- includeGuard = QString(QLatin1String("%1_%2"))
|
||||||
|
- .arg(includeGuard)
|
||||||
|
- .arg(QDateTime::currentDateTime().toTime_t());
|
||||||
|
+ includeGuard = QString(QLatin1String("%1"))
|
||||||
|
+ .arg(includeGuard);
|
||||||
|
hs << "#ifndef " << includeGuard << endl
|
||||||
|
<< "#define " << includeGuard << endl
|
||||||
|
<< endl;
|
Loading…
Reference in New Issue
Block a user