Merge branch 'master' into f29

This commit is contained in:
Rex Dieter 2018-12-21 13:58:36 -06:00
commit 34c3c2ba7b
7 changed files with 186 additions and 40 deletions

4
.gitignore vendored
View File

@ -1,3 +1 @@
/qtbase-everywhere-src-5.10.1.tar.xz
/qtbase-everywhere-src-5.11.0.tar.xz
/qtbase-everywhere-src-5.11.1.tar.xz
/qtbase-everywhere-src-5.11.3.tar.xz

View File

@ -1,6 +1,7 @@
diff -up qtbase-everywhere-src-5.11.1/mkspecs/linux-g++/qplatformdefs.h.glibc qtbase-everywhere-src-5.11.1/mkspecs/linux-g++/qplatformdefs.h
--- qtbase-everywhere-src-5.11.1/mkspecs/linux-g++/qplatformdefs.h.glibc 2018-06-15 09:29:31.000000000 +0200
+++ qtbase-everywhere-src-5.11.1/mkspecs/linux-g++/qplatformdefs.h 2018-07-26 15:40:56.887961897 +0200
diff --git a/mkspecs/linux-g++/qplatformdefs.h b/mkspecs/linux-g++/qplatformdefs.h
index 13523f07..d3245316 100644
--- a/mkspecs/linux-g++/qplatformdefs.h
+++ b/mkspecs/linux-g++/qplatformdefs.h
@@ -72,7 +72,9 @@
#include <sys/time.h>
#include <sys/shm.h>
@ -10,10 +11,11 @@ diff -up qtbase-everywhere-src-5.11.1/mkspecs/linux-g++/qplatformdefs.h.glibc qt
+#endif
#include <sys/wait.h>
#include <netinet/in.h>
diff -up qtbase-everywhere-src-5.11.1/src/corelib/io/qfilesystemengine_unix.cpp.glibc qtbase-everywhere-src-5.11.1/src/corelib/io/qfilesystemengine_unix.cpp
--- qtbase-everywhere-src-5.11.1/src/corelib/io/qfilesystemengine_unix.cpp.glibc 2018-06-15 09:29:31.000000000 +0200
+++ qtbase-everywhere-src-5.11.1/src/corelib/io/qfilesystemengine_unix.cpp 2018-07-26 16:34:54.346840184 +0200
diff --git a/src/corelib/io/qfilesystemengine_unix.cpp b/src/corelib/io/qfilesystemengine_unix.cpp
index deb4a9f2..d03cf86c 100644
--- a/src/corelib/io/qfilesystemengine_unix.cpp
+++ b/src/corelib/io/qfilesystemengine_unix.cpp
@@ -50,7 +50,9 @@
#include <pwd.h>
#include <stdlib.h> // for realpath()
@ -24,30 +26,18 @@ diff -up qtbase-everywhere-src-5.11.1/src/corelib/io/qfilesystemengine_unix.cpp.
#include <unistd.h>
#include <stdio.h>
#include <errno.h>
@@ -91,7 +93,9 @@ extern "C" NSString *NSTemporaryDirector
# include <sys/syscall.h>
# include <sys/sendfile.h>
# include <linux/fs.h>
+#if 0
# include <linux/stat.h>
+#endif
// in case linux/fs.h is too old and doesn't define it:
#ifndef FICLONE
@@ -105,13 +109,13 @@ extern "C" NSString *NSTemporaryDirector
# undef SYS_renameat2
@@ -105,12 +107,12 @@ extern "C" NSString *NSTemporaryDirectory();
# undef SYS_statx
# undef STATX_BASIC_STATS
-# else
# else
-# if !QT_CONFIG(renameat2) && defined(SYS_renameat2)
+# else
+# if 0 && !QT_CONFIG(renameat2) && defined(SYS_renameat2)
static int renameat2(int oldfd, const char *oldpath, int newfd, const char *newpath, unsigned flags)
{ return syscall(SYS_renameat2, oldfd, oldpath, newfd, newpath, flags); }
# endif
-# if !QT_CONFIG(statx) && defined(SYS_statx)
+# if 0 && !QT_CONFIG(statx) && defined(SYS_statx)
# include <linux/stat.h>
static int statx(int dirfd, const char *pathname, int flag, unsigned mask, struct statx *statxbuf)
{ return syscall(SYS_statx, dirfd, pathname, flag, mask, statxbuf); }
# elif !QT_CONFIG(statx) && !defined(SYS_statx)

View File

@ -45,8 +45,8 @@ BuildRequires: pkgconfig(libsystemd)
Name: qt5-qtbase
Summary: Qt5 - QtBase components
Version: 5.11.1
Release: 7%{?dist}
Version: 5.11.3
Release: 1%{?dist}
# See LGPL_EXCEPTIONS.txt, for exception details
License: LGPLv2 with exceptions or GPLv3 with exceptions
@ -116,9 +116,11 @@ Patch67: https://bugreports.qt.io/secure/attachment/66353/xcberror_filter.patch
Patch68: qtbase-everywhere-src-5.11.1-python3.patch
# glibc stat
Patch69: qt5-qtbase-glibc.patch
## upstream patches
# still needed for 5.12.x ? -- rex
Patch500: qtbase-everywhere-src-5.11.2-rendering-issue.patch
Patch501: qtbase-everywhere-src-5.11.2-optimize-insertionPointsForLine.patch
# Do not check any files in %%{_qt5_plugindir}/platformthemes/ for requires.
# Those themes are there for platform integration. If the required libraries are
@ -229,11 +231,12 @@ Requires: %{name}-common = %{version}-%{release}
%global tds -no-sql-tds
%endif
# workaround gold linker bug by not using it
# workaround gold linker bug(s) by not using it
# https://bugzilla.redhat.com/1458003
# https://sourceware.org/bugzilla/show_bug.cgi?id=21074
# reportedly fixed or worked-around, re-enable if there's evidence of problems -- rex
#global use_gold_linker -no-use-gold-linker
# https://bugzilla.redhat.com/show_bug.cgi?id=1635973
%global use_gold_linker -no-use-gold-linker
%description
Qt is a software toolkit for developing applications.
@ -317,7 +320,7 @@ Requires: %{name}%{?_isa} = %{version}-%{release}
%package postgresql
Summary: PostgreSQL driver for Qt5's SQL classes
BuildRequires: postgresql-devel
BuildRequires: libpq-devel
Requires: %{name}%{?_isa} = %{version}-%{release}
%description postgresql
%{summary}.
@ -369,12 +372,10 @@ Qt5 libraries used for drawing widgets and OpenGL items.
# FIXME/REBASE
#patch67 -p1 -b .xcberror_filter
%patch68 -p1
# workaround for new glibc conflict
%if 0%{?fedora} > 28
%patch69 -p1 -b .glibc
%endif
## upstream patches
%patch500 -p1 -b .rendering-issue
%patch501 -p1 -b .optimize-insertionPointsForLine
# move some bundled libs to ensure they're not accidentally used
pushd src/3rdparty
@ -983,6 +984,20 @@ fi
%changelog
* Fri Dec 07 2018 Rex Dieter <rdieter@fedoraproject.org> - 5.11.3-1
- 5.11.3
* Thu Oct 25 2018 Than Ngo <than@redhat.com> - 5.11.2-3
- backported patch to fix selection rendering issues if rounding leads to left-out pixels
- backported patch to optimize insertionPointsForLine
* Thu Oct 11 2018 Rex Dieter <rdieter@fedoraproject.org> - 5.11.2-2
- -no-use-gold-linker (#1635973)
* Fri Sep 21 2018 Jan Grulich <jgrulich@redhat.com> - 5.11.2-1
- 5.11.2
* Thu Jul 26 2018 Than Ngo <than@redhat.com> - 5.11.1-7
- fixed FTBFS

View File

@ -0,0 +1,105 @@
diff -up qtbase-everywhere-src-5.11.2/src/gui/text/qtextengine.cpp.me qtbase-everywhere-src-5.11.2/src/gui/text/qtextengine.cpp
--- qtbase-everywhere-src-5.11.2/src/gui/text/qtextengine.cpp.me 2018-10-25 11:30:37.371800942 +0200
+++ qtbase-everywhere-src-5.11.2/src/gui/text/qtextengine.cpp 2018-10-25 11:36:24.496953609 +0200
@@ -3663,11 +3663,12 @@ int QTextEngine::lineNumberForTextPositi
return -1;
}
-void QTextEngine::insertionPointsForLine(int lineNum, QVector<int> &insertionPoints)
+std::vector<int> QTextEngine::insertionPointsForLine(int lineNum)
{
QTextLineItemIterator iterator(this, lineNum);
- insertionPoints.reserve(iterator.line.length);
+ std::vector<int> insertionPoints;
+ insertionPoints.reserve(size_t(iterator.line.length));
bool lastLine = lineNum >= lines.size() - 1;
@@ -3685,25 +3686,22 @@ void QTextEngine::insertionPointsForLine
insertionPoints.push_back(i);
}
}
+ return insertionPoints;
}
int QTextEngine::endOfLine(int lineNum)
{
- QVector<int> insertionPoints;
- insertionPointsForLine(lineNum, insertionPoints);
-
+ const auto insertionPoints = insertionPointsForLine(lineNum);
if (insertionPoints.size() > 0)
- return insertionPoints.constLast();
+ return insertionPoints.back();
return 0;
}
int QTextEngine::beginningOfLine(int lineNum)
{
- QVector<int> insertionPoints;
- insertionPointsForLine(lineNum, insertionPoints);
-
+ const auto insertionPoints = insertionPointsForLine(lineNum);
if (insertionPoints.size() > 0)
- return insertionPoints.constFirst();
+ return insertionPoints.front();
return 0;
}
@@ -3720,10 +3718,8 @@ int QTextEngine::positionAfterVisualMove
if (lineNum < 0)
return pos;
- QVector<int> insertionPoints;
- insertionPointsForLine(lineNum, insertionPoints);
- int i, max = insertionPoints.size();
- for (i = 0; i < max; i++)
+ const auto insertionPoints = insertionPointsForLine(lineNum);
+ for (size_t i = 0, max = insertionPoints.size(); i < max; ++i)
if (pos == insertionPoints[i]) {
if (moveRight) {
if (i + 1 < max)
diff -up qtbase-everywhere-src-5.11.2/src/gui/text/qtextengine_p.h.me qtbase-everywhere-src-5.11.2/src/gui/text/qtextengine_p.h
--- qtbase-everywhere-src-5.11.2/src/gui/text/qtextengine_p.h.me 2018-10-25 11:36:39.243002574 +0200
+++ qtbase-everywhere-src-5.11.2/src/gui/text/qtextengine_p.h 2018-10-25 11:37:45.966224143 +0200
@@ -74,6 +74,7 @@
#include <private/qunicodetools_p.h>
#include <stdlib.h>
+#include <vector>
QT_BEGIN_NAMESPACE
@@ -632,7 +633,7 @@ public:
int nextLogicalPosition(int oldPos) const;
int lineNumberForTextPosition(int pos);
int positionAfterVisualMovement(int oldPos, QTextCursor::MoveOperation op);
- void insertionPointsForLine(int lineNum, QVector<int> &insertionPoints);
+ std::vector<int> insertionPointsForLine(int lineNum);
void resetFontEngineCache();
void enableDelayDecorations(bool enable = true) { delayDecorations = enable; }
diff -up qtbase-everywhere-src-5.11.2/src/gui/text/qtextlayout.cpp.me qtbase-everywhere-src-5.11.2/src/gui/text/qtextlayout.cpp
--- qtbase-everywhere-src-5.11.2/src/gui/text/qtextlayout.cpp.me 2018-10-25 11:38:04.426285436 +0200
+++ qtbase-everywhere-src-5.11.2/src/gui/text/qtextlayout.cpp 2018-10-25 11:40:23.919748643 +0200
@@ -2841,9 +2841,7 @@ int QTextLine::xToCursor(qreal _x, Curso
bool rtl = eng->isRightToLeft();
eng->shapeLine(line);
- QVector<int> insertionPoints;
- if (visual && rtl)
- eng->insertionPointsForLine(lineNum, insertionPoints);
+ const auto insertionPoints = (visual && rtl) ? eng->insertionPointsForLine(lineNum) : std::vector<int>();
int nchars = 0;
for (int i = 0; i < nItems; ++i) {
int item = visualOrder[i]+firstItem;
@@ -2975,7 +2973,7 @@ int QTextLine::xToCursor(qreal _x, Curso
continue;
}
if (rtl && nchars > 0)
- return insertionPoints[lastLine ? nchars : nchars - 1];
+ return insertionPoints[size_t(lastLine ? nchars : nchars - 1)];
}
return eng->positionInLigature(&si, end, x, pos, -1,
cpos == QTextLine::CursorOnCharacter);

View File

@ -0,0 +1,38 @@
diff -up qtbase-everywhere-src-5.11.2/src/gui/text/qtextlayout.cpp.me qtbase-everywhere-src-5.11.2/src/gui/text/qtextlayout.cpp
--- qtbase-everywhere-src-5.11.2/src/gui/text/qtextlayout.cpp.me 2018-10-25 10:54:48.849646288 +0200
+++ qtbase-everywhere-src-5.11.2/src/gui/text/qtextlayout.cpp 2018-10-25 10:58:19.054347658 +0200
@@ -1006,10 +1006,8 @@ static void addSelectedRegionsToPath(QTe
}
if (lastSelectionWidth > 0) {
- QRectF rect = boundingRect & QRectF(lastSelectionX.toReal(), selectionY, lastSelectionWidth.toReal(), lineHeight);
- rect.moveLeft(qFloor(rect.left()));
- rect.moveTop(qFloor(rect.top()));
- region->addRect(rect);
+ const QRectF rect = boundingRect & QRectF(lastSelectionX.toReal(), selectionY, lastSelectionWidth.toReal(), lineHeight);
+ region->addRect(rect.toAlignedRect());
}
lastSelectionX = selectionX;
@@ -1017,10 +1015,8 @@ static void addSelectedRegionsToPath(QTe
}
}
if (lastSelectionWidth > 0) {
- QRectF rect = boundingRect & QRectF(lastSelectionX.toReal(), selectionY, lastSelectionWidth.toReal(), lineHeight);
- rect.moveLeft(qFloor(rect.left()));
- rect.moveTop(qFloor(rect.top()));
- region->addRect(rect);
+ const QRectF rect = boundingRect & QRectF(lastSelectionX.toReal(), selectionY, lastSelectionWidth.toReal(), lineHeight);
+ region->addRect(rect.toAlignedRect());
}
}
@@ -2135,7 +2131,7 @@ static void setPenAndDrawBackground(QPai
QBrush bg = chf.background();
if (bg.style() != Qt::NoBrush && !chf.property(SuppressBackground).toBool())
- p->fillRect(QRectF(qFloor(r.x()), qFloor(r.y()), r.width(), r.height()), bg);
+ p->fillRect(r.toAlignedRect(), bg);
if (c.style() != Qt::NoBrush) {
p->setPen(QPen(c, 0));
}

View File

@ -1,9 +1,9 @@
diff --git a/src/plugins/platforms/xcb/qxcbscreen.cpp b/src/plugins/platforms/xcb/qxcbscreen.cpp
index ec0f9ba..6d0d7a6 100644
index 7f2793b2..3ff6a924 100644
--- a/src/plugins/platforms/xcb/qxcbscreen.cpp
+++ b/src/plugins/platforms/xcb/qxcbscreen.cpp
@@ -747,7 +747,7 @@ void QXcbScreen::updateGeometry(const QRect &geometry, uint8_t rotation)
m_sizeMillimeters = sizeInMillimeters(geometry.size(), virtualDpi());
@@ -753,7 +753,7 @@ void QXcbScreen::updateGeometry(const QRect &geometry, uint8_t rotation)
m_sizeMillimeters = sizeInMillimeters(geometry.size(), m_virtualDesktop->dpi());
qreal dpi = geometry.width() / physicalSize().width() * qreal(25.4);
- m_pixelDensity = qMax(1, qRound(dpi/96));

View File

@ -1 +1 @@
SHA512 (qtbase-everywhere-src-5.11.1.tar.xz) = 5f45405872e541565d811c1973ae95b0f19593f4495375306917b72e21146e14fe8f7db5fbd629476476807f89ef1679aa59737ca5efdd9cbe6b14d7aa371b81
SHA512 (qtbase-everywhere-src-5.11.3.tar.xz) = 93865e41c994211456a575b085c2e7491b7975a1c3b4deb48e9616b51104eb990c1fcfd53d5fb2146ba22457cb134e6254e9077ba73c8b4c4b4d1d525e66fb65