diff --git a/.gitignore b/.gitignore index 93c4a9b..9c844e1 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -/qtbase-opensource-src-5.3.2.tar.xz +/qtbase-opensource-src-5.4.0.tar.xz diff --git a/0009-Do-not-apply-subpixel-gamma-correction-on-XCB.patch b/0009-Do-not-apply-subpixel-gamma-correction-on-XCB.patch new file mode 100644 index 0000000..f167026 --- /dev/null +++ b/0009-Do-not-apply-subpixel-gamma-correction-on-XCB.patch @@ -0,0 +1,45 @@ +From 501c510cc3cb6215aed27af7599395480a049667 Mon Sep 17 00:00:00 2001 +From: Allan Sandfeld Jensen +Date: Tue, 11 Nov 2014 13:48:27 +0100 +Subject: [PATCH 009/131] Do not apply subpixel gamma-correction on XCB +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +To match rendering of subpixel antialiased text in Qt 4.8 and other +toolkits on X11, we should not apply gamma-correction. This also +makes the rendering of subpixel antialiased text closer to normal +antialiased text. + +Task-number: QTBUG-41590 +Change-Id: I45ad3448334951353657b878d002eea429858f2d +Reviewed-by: Samuel Rødal +Reviewed-by: Sérgio Martins +Reviewed-by: Eskil Abrahamsen Blomfeldt +--- + src/plugins/platforms/xcb/qxcbintegration.cpp | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/src/plugins/platforms/xcb/qxcbintegration.cpp b/src/plugins/platforms/xcb/qxcbintegration.cpp +index cace087..3818494 100644 +--- a/src/plugins/platforms/xcb/qxcbintegration.cpp ++++ b/src/plugins/platforms/xcb/qxcbintegration.cpp +@@ -427,12 +427,14 @@ QVariant QXcbIntegration::styleHint(QPlatformIntegration::StyleHint hint) const + case QPlatformIntegration::StartDragTime: + case QPlatformIntegration::KeyboardAutoRepeatRate: + case QPlatformIntegration::PasswordMaskDelay: +- case QPlatformIntegration::FontSmoothingGamma: + case QPlatformIntegration::StartDragVelocity: + case QPlatformIntegration::UseRtlExtensions: + case QPlatformIntegration::PasswordMaskCharacter: + // TODO using various xcb, gnome or KDE settings + break; // Not implemented, use defaults ++ case QPlatformIntegration::FontSmoothingGamma: ++ // Match Qt 4.8 text rendering, and rendering of other X11 toolkits. ++ return qreal(1.0); + case QPlatformIntegration::StartDragDistance: { + // The default (in QPlatformTheme::defaultThemeHint) is 10 pixels, but + // on a high-resolution screen it makes sense to increase it. +-- +1.9.3 + diff --git a/0173-qimage_conversions.cpp-Fix-build-on-big-endian-syste.patch b/0173-qimage_conversions.cpp-Fix-build-on-big-endian-syste.patch new file mode 100644 index 0000000..1e13016 --- /dev/null +++ b/0173-qimage_conversions.cpp-Fix-build-on-big-endian-syste.patch @@ -0,0 +1,38 @@ +From 404f4281fda764cafdaa5635db995dabc4f1de8c Mon Sep 17 00:00:00 2001 +From: Dmitry Shachnev +Date: Tue, 9 Dec 2014 09:27:53 +0300 +Subject: [PATCH 173/179] qimage_conversions.cpp: Fix build on big endian + systems + +Change-Id: I8149eb2deaa101daf85a957ff48c3a7140c43bbc +Reviewed-by: Timo Jyrinki +Reviewed-by: Allan Sandfeld Jensen +--- + src/gui/image/qimage_conversions.cpp | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/gui/image/qimage_conversions.cpp b/src/gui/image/qimage_conversions.cpp +index 17563b1..858a0d9 100644 +--- a/src/gui/image/qimage_conversions.cpp ++++ b/src/gui/image/qimage_conversions.cpp +@@ -2252,7 +2252,7 @@ Image_Converter qimage_converter_map[QImage::NImageFormats][QImage::NImageFormat + convert_ARGB_to_ARGB_PM, + #else + 0, +- 0 ++ 0, + #endif + 0, 0, 0, 0 + }, // Format_RGBA8888 +@@ -2281,7 +2281,7 @@ Image_Converter qimage_converter_map[QImage::NImageFormats][QImage::NImageFormat + #else + 0, + 0, +- 0 ++ 0, + #endif + 0, 0, 0, 0 + }, // Format_RGBA8888_Premultiplied +-- +1.9.3 + diff --git a/macros.qt5 b/macros.qt5 new file mode 100644 index 0000000..b8fb250 --- /dev/null +++ b/macros.qt5 @@ -0,0 +1,30 @@ +%_qt5 @@NAME@@ +%_qt5_epoch @@EPOCH@@ +%_qt5_version @@VERSION@@ +%_qt5_evr @@EVR@@ +%_qt5_prefix %{_libdir}/qt5 +%_qt5_archdatadir %{_qt5_prefix} +%_qt5_bindir %{_qt5_prefix}/bin +%_qt5_datadir %{_datadir}/qt5 +%_qt5_docdir %{_docdir}/qt5 +%_qt5_examplesdir %{_qt5_prefix}/examples +%_qt5_headerdir %{_includedir}/qt5 +%_qt5_importdir %{_qt5_archdatadir}/imports +%_qt5_libdir %{_libdir} +%_qt5_libexecdir %{_qt5_archdatadir}/libexec +%_qt5_plugindir %{_qt5_archdatadir}/plugins +%_qt5_qmake %{_qt5_bindir}/qmake +%_qt5_settingsdir %{_sysconfdir}/xdg +%_qt5_sysconfdir %{_qt5_settingsdir} +%_qt5_translationdir %{_datadir}/qt5/translations + +%qmake_qt5 \ + %{_qt5_qmake} \\\ + QMAKE_CFLAGS_DEBUG="${CFLAGS:-%optflags}" \\\ + QMAKE_CFLAGS_RELEASE="${CFLAGS:-%optflags}" \\\ + QMAKE_CXXFLAGS_DEBUG="${CXXFLAGS:-%optflags}" \\\ + QMAKE_CXXFLAGS_RELEASE="${CXXFLAGS:-%optflags}" \\\ + QMAKE_LFLAGS_DEBUG="${LDFLAGS:-%{?__global_ldflags}}" \\\ + QMAKE_LFLAGS_RELEASE="${LDFLAGS:-%{?__global_ldflags}}" \\\ + QMAKE_STRIP= + diff --git a/qt5-qtbase.spec b/qt5-qtbase.spec index 3ee5722..cc542bc 100644 --- a/qt5-qtbase.spec +++ b/qt5-qtbase.spec @@ -18,29 +18,33 @@ # define to build docs, need to undef this for bootstrapping # where qt5-qttools builds are not yet available # only primary archs (for now), allow secondary to bootstrap +# skip docs on el6, qdoc crashes: https://bugreports.qt-project.org/browse/QTBUG-43057 +%if ! 0%{?bootstrap} && 0%{?rhel} != 6 %ifarch %{arm} %{ix86} x86_64 %define docs 1 %endif +%define examples 1 +%endif -#define pre rc1 -#define snap 2013-11-08_141 -#define snap_tag 20131108_141 +#define pre rc +#define snap 2014-10-07_40 +#define snap_tag 20141007_40 Summary: Qt5 - QtBase components Name: qt5-qtbase -Version: 5.3.2 -Release: 3%{?dist} +Version: 5.4.0 +Release: 2%{?dist} -# See LGPL_EXCEPTIONS.txt, LICENSE.GPL3, respectively, for exception details +# See LGPL_EXCEPTIONS.txt, for exception details License: LGPLv2 with exceptions or GPLv3 with exceptions Url: http://qt-project.org/ %if 0%{?snap:1} -Source0: http://download.qt-project.org/snapshots/qt/5.3/%{version}-%{pre}/%{snap}/submodules/%{qt_module}-opensource-src-%{version}-%{pre}.tar.xz +Source0: http://download.qt-project.org/snapshots/qt/5.4/%{version}-%{pre}/%{snap}/submodules/%{qt_module}-opensource-src-%{version}-%{pre}.tar.xz %else %if 0%{?pre:1} -Source0: http://download.qt-project.org/development_releases/qt/5.3/%{version}-%{pre}/submodules/%{qt_module}-opensource-src-%{version}-%{pre}.tar.xz +Source0: http://download.qt-project.org/development_releases/qt/5.4/%{version}-%{pre}/submodules/%{qt_module}-opensource-src-%{version}-%{pre}.tar.xz %else -Source0: http://download.qt-project.org/official_releases/qt/5.3/%{version}/submodules/%{qt_module}-opensource-src-%{version}.tar.xz +Source0: http://download.qt-project.org/official_releases/qt/5.4/%{version}/submodules/%{qt_module}-opensource-src-%{version}.tar.xz %endif %endif @@ -54,10 +58,10 @@ Source6: 10-qt5-check-opengl2.sh # support the old version of libxcb and the resulting lack of libxkbcommon-x11 # in F19 and F20 -Patch0: qtbase-opensource-src-5.3.2-old_xcb.patch +Patch0: qtbase-opensource-src-5.4.0-rc-old_xcb.patch -# support the old version of libxkbcommon in F19 and F20 -Patch1: qtbase-opensource-src-5.3.2-old_xkbcommon.patch +# support the old version of libxkbcommon in F19 +Patch1: qtbase-opensource-src-5.4.0-rc-old_xkbcommon.patch # support multilib optflags Patch2: qtbase-multilib_optflags.patch @@ -65,9 +69,6 @@ Patch2: qtbase-multilib_optflags.patch # fix QTBUG-35459 (too low entityCharacterLimit=1024 for CVE-2013-4549) Patch4: qtbase-opensource-src-5.3.2-QTBUG-35459.patch -# Prefer QPA implementation in qsystemtrayicon_x11 if available -Patch5: qtbase-5.3.1-prefer-qpa-implementation.patch - # unconditionally enable freetype lcdfilter support Patch12: qtbase-opensource-src-5.2.0-enable_ft_lcdfilter.patch @@ -77,10 +78,16 @@ Patch12: qtbase-opensource-src-5.2.0-enable_ft_lcdfilter.patch # NEEDS REBASE Patch50: qt5-poll.patch -##upstream patches -Patch100: qtbase-qfiledialog-implement-getopenfileurl-and-friends.patch +## upstream patches -# macros +# Bad font rendering, http://bugzilla.redhat.com/1052389 +# tweak font gamma correction, from: +# https://bugreports.qt-project.org/browse/QTBUG-41590 +Patch109: 0009-Do-not-apply-subpixel-gamma-correction-on-XCB.patch +Patch273: 0173-qimage_conversions.cpp-Fix-build-on-big-endian-syste.patch + +# macros, be mindful to keep sync'd with macros.qt5 +Source1: macros.qt5 %define _qt5 %{name} %define _qt5_prefix %{_libdir}/qt5 %define _qt5_archdatadir %{_libdir}/qt5 @@ -101,6 +108,13 @@ Patch100: qtbase-qfiledialog-implement-getopenfileurl-and-friends.patch %define _qt5_sysconfdir %{_qt5_settingsdir} %define _qt5_translationdir %{_datadir}/qt5/translations +# Do not check any files in %%{_qt5_plugindir}/platformthemes/ for requires. +# Those themes are there for platform integration. If the required libraries are +# not there, the platform to integrate with isn't either. Then Qt will just +# silently ignore the plugin that fails to load. Thus, there is no need to let +# RPM drag in gtk2 as a dependency for the GTK+ 2 dialog support. +%global __requires_exclude_from ^%{_qt5_plugindir}/platformthemes/.*$ + # for %%check BuildRequires: cmake BuildRequires: cups-devel @@ -135,6 +149,8 @@ BuildRequires: pkgconfig(xkbcommon-x11) >= 0.4.1 %if 0%{?fedora} > 19 # Fedora 20 BuildRequires: pkgconfig(xkbcommon) >= 0.4.1 +%global xkbcommon_version %(pkg-config --modversion xkbcommon 2> /dev/null || echo '0.4.1') +Requires: libxkbcommon%{?_isa} >= %{xkbcommon_version} %else # Fedora 19 and older BuildRequires: pkgconfig(xkbcommon) @@ -156,8 +172,10 @@ BuildRequires: pkgconfig(gbm) BuildRequires: pkgconfig(glesv2) BuildRequires: pkgconfig(sqlite3) >= 3.7 %define sqlite -system-sqlite -BuildRequires: pkgconfig(harfbuzz) >= 0.9.19 +%if 0%{?fedora} > 20 +BuildRequires: pkgconfig(harfbuzz) >= 0.9.31 %define harfbuzz -system-harfbuzz +%endif BuildRequires: pkgconfig(icu-i18n) BuildRequires: pkgconfig(libpcre) >= 8.30 %define pcre -system-pcre @@ -193,16 +211,6 @@ handling. Summary: Development files for %{name} Requires: %{name}%{?_isa} = %{version}-%{release} Requires: %{name}-gui%{?_isa} -# qtsql apparently wants all drivers available at buildtime -%if "%{?ibase}" != "-no-sql-ibase" -Requires: %{name}-ibase%{?_isa} -%endif -Requires: %{name}-mysql%{?_isa} -Requires: %{name}-odbc%{?_isa} -Requires: %{name}-postgresql%{?_isa} -%if "%{?tds}" != "-no-sql-tds" -Requires: %{name}-tds%{?_isa} -%endif %if 0%{?egl} Requires: pkgconfig(egl) %endif @@ -213,6 +221,7 @@ Requires: pkgconfig(gl) %if 0%{?docs} %package doc Summary: API documentation for %{name} +License: GFDL Requires: %{name} = %{version}-%{release} # for qhelpgenerator BuildRequires: qt5-qttools-devel @@ -304,12 +313,12 @@ Qt5 libraries used for drawing widgets and OpenGL items. rm -fv mkspecs/linux-g++*/qmake.conf.multilib-optflags %patch4 -p1 -b .QTBUG-35459 -%patch5 -p1 -b .prefer-qpa %patch12 -p1 -b .enable_ft_lcdfilter #patch50 -p1 -b .poll -%patch100 -p1 -b .qfiledialog-implement-getopenfileurl-and-friends +%patch109 -p1 -b .0009 +%patch273 -p1 -b .0173 # drop -fexceptions from $RPM_OPT_FLAGS RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS | sed 's|-fexceptions||g'` @@ -367,6 +376,7 @@ popd -icu \ -openssl-linked \ -optimized-qmake \ + %{!?examples:-nomake examples} \ -nomake tests \ -no-pch \ -no-rpath \ @@ -429,28 +439,14 @@ Version: %{version} EOF # rpm macros -mkdir -p %{buildroot}%{rpm_macros_dir} -cat >%{buildroot}%{rpm_macros_dir}/macros.qt5< 5.4.0-2 +- fix bootstrapping logic + +* Wed Dec 10 2014 Rex Dieter 5.4.0-1 +- 5.4.0 (final) + +* Fri Nov 28 2014 Rex Dieter 5.4.0-0.8.rc +- restore font rendering patch (#1052389,QTBUG-41590) + +* Thu Nov 27 2014 Rex Dieter 5.4.0-0.7.rc +- 5.4.0-rc + +* Wed Nov 12 2014 Rex Dieter 5.4.0-0.6.beta +- add versioned Requires: libxkbcommon dep + +* Tue Nov 11 2014 Rex Dieter 5.4.0-0.5.beta +- pull in slightly different upstreamed font rendering fix (#1052389,QTBUG-41590) + +* Mon Nov 10 2014 Rex Dieter 5.4.0-0.4.beta +- Bad font rendering (#1052389,QTBUG-41590) + +* Mon Nov 03 2014 Rex Dieter 5.4.0-0.3.beta +- macros.qt5: +%%qmake_qt5 , to help set standard build flags (CFLAGS, etc...) + +* Wed Oct 22 2014 Kevin Kofler - 5.4.0-0.2.beta +- -gui: don't require gtk2 (__requires_exclude_from platformthemes) (#1154884) + +* Sat Oct 18 2014 Rex Dieter - 5.4.0-0.1.beta +- 5.4.0-beta +- avoid extra -devel deps by moving *Plugin.cmake files to base pkgs +- support bootstrap macro, to disable -doc,-examples + * Mon Oct 13 2014 Jan Grulich 5.3.2-3 - QFileDialog: implement getOpenFileUrl and friends for real diff --git a/qtbase-5.3.1-prefer-qpa-implementation.patch b/qtbase-5.3.1-prefer-qpa-implementation.patch deleted file mode 100644 index a91838c..0000000 --- a/qtbase-5.3.1-prefer-qpa-implementation.patch +++ /dev/null @@ -1,312 +0,0 @@ ---- a/src/widgets/util/qsystemtrayicon.cpp -+++ b/src/widgets/util/qsystemtrayicon.cpp -@@ -672,6 +672,74 @@ - QWidget::timerEvent(e); - } - -+////////////////////////////////////////////////////////////////////// -+void QSystemTrayIconPrivate::install_sys_qpa() -+{ -+ qpa_sys->init(); -+ QObject::connect(qpa_sys, SIGNAL(activated(QPlatformSystemTrayIcon::ActivationReason)), -+ q_func(), SLOT(_q_emitActivated(QPlatformSystemTrayIcon::ActivationReason))); -+ QObject::connect(qpa_sys, &QPlatformSystemTrayIcon::messageClicked, -+ q_func(), &QSystemTrayIcon::messageClicked); -+ updateMenu_sys(); -+ updateIcon_sys(); -+ updateToolTip_sys(); -+} -+ -+void QSystemTrayIconPrivate::remove_sys_qpa() -+{ -+ qpa_sys->cleanup(); -+} -+ -+QRect QSystemTrayIconPrivate::geometry_sys_qpa() const -+{ -+ return qpa_sys->geometry(); -+} -+ -+void QSystemTrayIconPrivate::updateIcon_sys_qpa() -+{ -+ qpa_sys->updateIcon(icon); -+} -+ -+void QSystemTrayIconPrivate::updateMenu_sys_qpa() -+{ -+ if (menu) { -+ if (!menu->platformMenu()) { -+ QPlatformMenu *platformMenu = qpa_sys->createMenu(); -+ if (platformMenu) -+ menu->setPlatformMenu(platformMenu); -+ } -+ qpa_sys->updateMenu(menu->platformMenu()); -+ } -+} -+ -+void QSystemTrayIconPrivate::updateToolTip_sys_qpa() -+{ -+ qpa_sys->updateToolTip(toolTip); -+} -+ -+void QSystemTrayIconPrivate::showMessage_sys_qpa(const QString &message, -+ const QString &title, -+ QSystemTrayIcon::MessageIcon icon, -+ int msecs) -+{ -+ QIcon notificationIcon; -+ switch (icon) { -+ case QSystemTrayIcon::Information: -+ notificationIcon = QApplication::style()->standardIcon(QStyle::SP_MessageBoxInformation); -+ break; -+ case QSystemTrayIcon::Warning: -+ notificationIcon = QApplication::style()->standardIcon(QStyle::SP_MessageBoxWarning); -+ break; -+ case QSystemTrayIcon::Critical: -+ notificationIcon = QApplication::style()->standardIcon(QStyle::SP_MessageBoxCritical); -+ break; -+ default: -+ break; -+ } -+ qpa_sys->showMessage(message, title, notificationIcon, -+ static_cast(icon), msecs); -+} -+ - QT_END_NAMESPACE - - #endif // QT_NO_SYSTEMTRAYICON ---- a/src/widgets/util/qsystemtrayicon_p.h -+++ b/src/widgets/util/qsystemtrayicon_p.h -@@ -98,6 +98,15 @@ - QSystemTrayIconSys *sys; - QPlatformSystemTrayIcon *qpa_sys; - bool visible; -+ -+private: -+ void install_sys_qpa(); -+ void remove_sys_qpa(); -+ void updateIcon_sys_qpa(); -+ void updateToolTip_sys_qpa(); -+ void updateMenu_sys_qpa(); -+ QRect geometry_sys_qpa() const; -+ void showMessage_sys_qpa(const QString &msg, const QString &title, QSystemTrayIcon::MessageIcon icon, int secs); - }; - - class QBalloonTip : public QWidget ---- a/src/widgets/util/qsystemtrayicon_qpa.cpp -+++ b/src/widgets/util/qsystemtrayicon_qpa.cpp -@@ -65,28 +65,20 @@ - - void QSystemTrayIconPrivate::install_sys() - { -- if (qpa_sys) { -- qpa_sys->init(); -- QObject::connect(qpa_sys, SIGNAL(activated(QPlatformSystemTrayIcon::ActivationReason)), -- q_func(), SLOT(_q_emitActivated(QPlatformSystemTrayIcon::ActivationReason))); -- QObject::connect(qpa_sys, SIGNAL(messageClicked()), -- q_func(), SIGNAL(messageClicked())); -- updateMenu_sys(); -- updateIcon_sys(); -- updateToolTip_sys(); -- } -+ if (qpa_sys) -+ install_sys_qpa(); - } - - void QSystemTrayIconPrivate::remove_sys() - { - if (qpa_sys) -- qpa_sys->cleanup(); -+ remove_sys_qpa(); - } - - QRect QSystemTrayIconPrivate::geometry_sys() const - { - if (qpa_sys) -- return qpa_sys->geometry(); -+ return geometry_sys_qpa(); - else - return QRect(); - } - - -@@ -94,25 +86,19 @@ - void QSystemTrayIconPrivate::updateIcon_sys() - { - if (qpa_sys) -- qpa_sys->updateIcon(icon); -+ updateIcon_sys_qpa(); - } - - void QSystemTrayIconPrivate::updateMenu_sys() - { -- if (qpa_sys && menu) { -- if (!menu->platformMenu()) { -- QPlatformMenu *platformMenu = qpa_sys->createMenu(); -- if (platformMenu) -- menu->setPlatformMenu(platformMenu); -- } -- qpa_sys->updateMenu(menu->platformMenu()); -- } -+ if (qpa_sys) -+ updateMenu_sys_qpa(); - } - - void QSystemTrayIconPrivate::updateToolTip_sys() - { - if (qpa_sys) -- qpa_sys->updateToolTip(toolTip); -+ updateToolTip_sys_qpa(); - } - - bool QSystemTrayIconPrivate::isSystemTrayAvailable_sys() -@@ -138,25 +124,8 @@ - QSystemTrayIcon::MessageIcon icon, - int msecs) - { -- if (!qpa_sys) -- return; -- -- QIcon notificationIcon; -- switch (icon) { -- case QSystemTrayIcon::Information: -- notificationIcon = QApplication::style()->standardIcon(QStyle::SP_MessageBoxInformation); -- break; -- case QSystemTrayIcon::Warning: -- notificationIcon = QApplication::style()->standardIcon(QStyle::SP_MessageBoxWarning); -- break; -- case QSystemTrayIcon::Critical: -- notificationIcon = QApplication::style()->standardIcon(QStyle::SP_MessageBoxCritical); -- break; -- default: -- break; -- } -- qpa_sys->showMessage(message, title, notificationIcon, -- static_cast(icon), msecs); -+ if (qpa_sys) -+ showMessage_sys_qpa(message, title, icon, msecs); - } - - QT_END_NAMESPACE ---- a/src/widgets/util/qsystemtrayicon_x11.cpp -+++ b/src/widgets/util/qsystemtrayicon_x11.cpp -@@ -55,6 +55,9 @@ - #include - #include - #include -+#include -+#include -+#include - #include - - #ifndef QT_NO_SYSTEMTRAYICON - - -@@ -209,16 +212,22 @@ - - QSystemTrayIconPrivate::QSystemTrayIconPrivate() - : sys(0), -+ qpa_sys(QGuiApplicationPrivate::platformTheme()->createPlatformSystemTrayIcon()), - visible(false) - { - } - - QSystemTrayIconPrivate::~QSystemTrayIconPrivate() - { -+ delete qpa_sys; - } - - void QSystemTrayIconPrivate::install_sys() - { -+ if (qpa_sys) { -+ install_sys_qpa(); -+ return; -+ } - Q_Q(QSystemTrayIcon); - if (!sys && locateSystemTray()) { - sys = new QSystemTrayIconSys(q); -@@ -229,6 +238,8 @@ - - QRect QSystemTrayIconPrivate::geometry_sys() const - { -+ if (qpa_sys) -+ return geometry_sys_qpa(); - if (!sys) - return QRect(); - return sys->globalGeometry(); -@@ -236,6 +247,10 @@ - - void QSystemTrayIconPrivate::remove_sys() - { -+ if (qpa_sys) { -+ remove_sys_qpa(); -+ return; -+ } - if (!sys) - return; - QBalloonTip::hideBalloon(); - - -@@ -246,17 +261,26 @@ - - void QSystemTrayIconPrivate::updateIcon_sys() - { -+ if (qpa_sys) { -+ updateIcon_sys_qpa(); -+ return; -+ } - if (sys) - sys->updateIcon(); - } - - void QSystemTrayIconPrivate::updateMenu_sys() - { -- -+ if (qpa_sys) -+ updateMenu_sys_qpa(); - } - - void QSystemTrayIconPrivate::updateToolTip_sys() - { -+ if (qpa_sys) { -+ updateToolTip_sys_qpa(); -+ return; -+ } - if (!sys) - return; - #ifndef QT_NO_TOOLTIP -@@ -266,6 +290,11 @@ - - bool QSystemTrayIconPrivate::isSystemTrayAvailable_sys() - { -+ QScopedPointer sys(QGuiApplicationPrivate::platformTheme()->createPlatformSystemTrayIcon()); -+ if (sys) -+ return sys->isSystemTrayAvailable(); -+ -+ // no QPlatformSystemTrayIcon so fall back to default xcb platform behavior - const QString platform = QGuiApplication::platformName(); - if (platform.compare(QStringLiteral("xcb"), Qt::CaseInsensitive) == 0) - return locateSystemTray(); - -@@ -274,12 +303,21 @@ - - bool QSystemTrayIconPrivate::supportsMessages_sys() - { -+ QScopedPointer sys(QGuiApplicationPrivate::platformTheme()->createPlatformSystemTrayIcon()); -+ if (sys) -+ return sys->supportsMessages(); -+ -+ // no QPlatformSystemTrayIcon so fall back to default xcb platform behavior - return true; - } - - void QSystemTrayIconPrivate::showMessage_sys(const QString &message, const QString &title, - QSystemTrayIcon::MessageIcon icon, int msecs) - { -+ if (qpa_sys) { -+ showMessage_sys_qpa(message, title, icon, msecs); -+ return; -+ } - if (!sys) - return; - const QPoint g = sys->globalGeometry().topLeft(); \ No newline at end of file diff --git a/qtbase-opensource-src-5.3.2-old_xcb.patch b/qtbase-opensource-src-5.4.0-rc-old_xcb.patch similarity index 73% rename from qtbase-opensource-src-5.3.2-old_xcb.patch rename to qtbase-opensource-src-5.4.0-rc-old_xcb.patch index 0f6ce5b..b910287 100644 --- a/qtbase-opensource-src-5.3.2-old_xcb.patch +++ b/qtbase-opensource-src-5.4.0-rc-old_xcb.patch @@ -1,7 +1,7 @@ -diff -ur qtbase-opensource-src-5.3.2/configure qtbase-opensource-src-5.3.2-old_xcb/configure ---- qtbase-opensource-src-5.3.2/configure 2014-09-11 12:47:55.000000000 +0200 -+++ qtbase-opensource-src-5.3.2-old_xcb/configure 2014-10-08 19:46:02.000000000 +0200 -@@ -4982,10 +4982,8 @@ +diff -ur qtbase-opensource-src-5.4.0-rc/configure qtbase-opensource-src-5.4.0-rc-old_xcb/configure +--- qtbase-opensource-src-5.4.0-rc/configure 2014-11-24 15:59:27.000000000 +0100 ++++ qtbase-opensource-src-5.4.0-rc-old_xcb/configure 2014-11-29 03:07:40.000000000 +0100 +@@ -5041,10 +5041,8 @@ QMAKE_LIBS_XCB="`$PKG_CONFIG --libs $XCB_PACKAGES 2>/dev/null`" fi @@ -13,10 +13,10 @@ diff -ur qtbase-opensource-src-5.3.2/configure qtbase-opensource-src-5.3.2-old_x QMAKE_CFLAGS_XKB="`$PKG_CONFIG --cflags xcb xcb-xkb 2>/dev/null`" QMAKE_LIBS_XKB="`$PKG_CONFIG --libs xcb xcb-xkb 2>/dev/null`" if compileTest qpa/xcb-xkb "xcb-xkb" $QMAKE_CFLAGS_XKB $QMAKE_LIBS_XKB; then -@@ -5092,9 +5090,9 @@ - # currently only xcb platform plugin supports building xkbcommon +@@ -5151,16 +5149,16 @@ if [ "$CFG_XCB" != "no" ]; then - if [ "$CFG_XKBCOMMON" = "auto" ] || [ "$CFG_XKBCOMMON" = "system" ]; then + if [ "$CFG_XKBCOMMON" != "no" ] && [ "$CFG_XKBCOMMON" != "qt" ]; then + # Check if there is a suitable system-wide xkbcommon - if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists "xkbcommon xkbcommon-x11 >= $MIN_REQ_XKBCOMMON" 2>/dev/null; then - QMAKE_CFLAGS_XKBCOMMON="`$PKG_CONFIG --cflags xkbcommon xkbcommon-x11 2>/dev/null`" - QMAKE_LIBS_XKBCOMMON="`$PKG_CONFIG --libs xkbcommon xkbcommon-x11 2>/dev/null`" @@ -26,19 +26,19 @@ diff -ur qtbase-opensource-src-5.3.2/configure qtbase-opensource-src-5.3.2-old_x QMakeVar set QMAKE_CFLAGS_XKBCOMMON "$QMAKE_CFLAGS_XKBCOMMON" QMakeVar set QMAKE_LIBS_XKBCOMMON "$QMAKE_LIBS_XKBCOMMON" -@@ -6588,7 +6586,7 @@ - echo - fi - if [ "$ORIG_CFG_XKBCOMMON" != qt ] && [ "$CFG_XKBCOMMON" = qt ]; then -- echo "NOTE: libxkbcommon and libxkbcommon-x11 $MIN_REQ_XKBCOMMON or higher not found on the system, will use " -+ echo "NOTE: libxkbcommon $MIN_REQ_XKBCOMMON or higher not found on the system, will use " - echo "the bundled version from 3rd party directory." - fi - if [ "$CFG_XKBCOMMON" = "qt" ] && [ "$CFG_XKB_CONFIG_ROOT" = "not found" ]; then -diff -ur qtbase-opensource-src-5.3.2/src/plugins/platforms/xcb/qxcbconnection.cpp qtbase-opensource-src-5.3.2-old_xcb/src/plugins/platforms/xcb/qxcbconnection.cpp ---- qtbase-opensource-src-5.3.2/src/plugins/platforms/xcb/qxcbconnection.cpp 2014-09-11 12:48:06.000000000 +0200 -+++ qtbase-opensource-src-5.3.2-old_xcb/src/plugins/platforms/xcb/qxcbconnection.cpp 2014-10-08 19:46:02.000000000 +0200 -@@ -1710,7 +1710,7 @@ + CFG_XKBCOMMON=system + elif [ "$CFG_XKBCOMMON" = "system" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then +- echo " xkbcommon support cannot be enabled because either xkbcommon or " +- echo " xkbcommon-x11 >= $MIN_REQ_XKBCOMMON was not found via pkg-config!" ++ echo " xkbcommon support cannot be enabled because xkbcommon" ++ echo " >= $MIN_REQ_XKBCOMMON was not found via pkg-config!" + echo " Turn on verbose messaging (-v) to $0 to see the final report." + echo " If you believe this message is in error you may use the continue" + echo " switch (-continue) to $0 to continue." +diff -ur qtbase-opensource-src-5.4.0-rc/src/plugins/platforms/xcb/qxcbconnection.cpp qtbase-opensource-src-5.4.0-rc-old_xcb/src/plugins/platforms/xcb/qxcbconnection.cpp +--- qtbase-opensource-src-5.4.0-rc/src/plugins/platforms/xcb/qxcbconnection.cpp 2014-11-24 16:00:12.000000000 +0100 ++++ qtbase-opensource-src-5.4.0-rc-old_xcb/src/plugins/platforms/xcb/qxcbconnection.cpp 2014-11-29 03:07:40.000000000 +0100 +@@ -1761,7 +1761,7 @@ xcb_xkb_use_extension_cookie_t xkb_query_cookie; xcb_xkb_use_extension_reply_t *xkb_query; @@ -47,10 +47,10 @@ diff -ur qtbase-opensource-src-5.3.2/src/plugins/platforms/xcb/qxcbconnection.cp xkb_query = xcb_xkb_use_extension_reply(c, xkb_query_cookie, 0); if (!xkb_query) { -diff -ur qtbase-opensource-src-5.3.2/src/plugins/platforms/xcb/qxcbkeyboard.cpp qtbase-opensource-src-5.3.2-old_xcb/src/plugins/platforms/xcb/qxcbkeyboard.cpp ---- qtbase-opensource-src-5.3.2/src/plugins/platforms/xcb/qxcbkeyboard.cpp 2014-09-11 12:48:06.000000000 +0200 -+++ qtbase-opensource-src-5.3.2-old_xcb/src/plugins/platforms/xcb/qxcbkeyboard.cpp 2014-10-08 19:46:02.000000000 +0200 -@@ -697,50 +697,65 @@ +diff -ur qtbase-opensource-src-5.4.0-rc/src/plugins/platforms/xcb/qxcbkeyboard.cpp qtbase-opensource-src-5.4.0-rc-old_xcb/src/plugins/platforms/xcb/qxcbkeyboard.cpp +--- qtbase-opensource-src-5.4.0-rc/src/plugins/platforms/xcb/qxcbkeyboard.cpp 2014-11-24 16:00:11.000000000 +0100 ++++ qtbase-opensource-src-5.4.0-rc-old_xcb/src/plugins/platforms/xcb/qxcbkeyboard.cpp 2014-11-29 03:29:53.000000000 +0100 +@@ -693,50 +693,65 @@ // log only critical errors, we do our own error logging from printKeymapError() xkb_context_set_log_level(xkb_context, (xkb_log_level)XKB_LOG_LEVEL_CRITICAL); } @@ -92,7 +92,7 @@ diff -ur qtbase-opensource-src-5.3.2/src/plugins/platforms/xcb/qxcbkeyboard.cpp - if (xkb_keymap) { - new_state = xkb_state_new(xkb_keymap); - } else { -- printKeymapError("Failed to compile a keymap!"); +- printKeymapError("Qt: Failed to compile a keymap!"); - m_config = false; - return; - } @@ -148,10 +148,10 @@ diff -ur qtbase-opensource-src-5.3.2/src/plugins/platforms/xcb/qxcbkeyboard.cpp +#endif + updateXKBMods(); + } - } - #ifndef QT_NO_XKB -@@ -995,11 +1010,23 @@ + checkForLatinLayout(); + } +@@ -1096,11 +1111,23 @@ if (connection->hasXKB()) { updateVModMapping(); updateVModToRModMapping(); @@ -177,10 +177,10 @@ diff -ur qtbase-opensource-src-5.3.2/src/plugins/platforms/xcb/qxcbkeyboard.cpp } else { #endif m_key_symbols = xcb_key_symbols_alloc(xcb_connection()); -diff -ur qtbase-opensource-src-5.3.2/src/plugins/platforms/xcb/qxcbkeyboard.h qtbase-opensource-src-5.3.2-old_xcb/src/plugins/platforms/xcb/qxcbkeyboard.h ---- qtbase-opensource-src-5.3.2/src/plugins/platforms/xcb/qxcbkeyboard.h 2014-09-11 12:48:06.000000000 +0200 -+++ qtbase-opensource-src-5.3.2-old_xcb/src/plugins/platforms/xcb/qxcbkeyboard.h 2014-10-08 19:46:02.000000000 +0200 -@@ -47,9 +47,6 @@ +diff -ur qtbase-opensource-src-5.4.0-rc/src/plugins/platforms/xcb/qxcbkeyboard.h qtbase-opensource-src-5.4.0-rc-old_xcb/src/plugins/platforms/xcb/qxcbkeyboard.h +--- qtbase-opensource-src-5.4.0-rc/src/plugins/platforms/xcb/qxcbkeyboard.h 2014-11-24 16:00:12.000000000 +0100 ++++ qtbase-opensource-src-5.4.0-rc-old_xcb/src/plugins/platforms/xcb/qxcbkeyboard.h 2014-11-29 03:07:40.000000000 +0100 +@@ -39,9 +39,6 @@ #include #include diff --git a/qtbase-opensource-src-5.3.2-old_xkbcommon.patch b/qtbase-opensource-src-5.4.0-rc-old_xkbcommon.patch similarity index 58% rename from qtbase-opensource-src-5.3.2-old_xkbcommon.patch rename to qtbase-opensource-src-5.4.0-rc-old_xkbcommon.patch index a2c0fd2..ea7c60a 100644 --- a/qtbase-opensource-src-5.3.2-old_xkbcommon.patch +++ b/qtbase-opensource-src-5.4.0-rc-old_xkbcommon.patch @@ -1,46 +1,46 @@ -diff -ur qtbase-opensource-src-5.3.2-old_xcb/configure qtbase-opensource-src-5.3.2-old_xkbcommon/configure ---- qtbase-opensource-src-5.3.2-old_xcb/configure 2014-10-08 19:46:02.000000000 +0200 -+++ qtbase-opensource-src-5.3.2-old_xkbcommon/configure 2014-10-08 19:42:46.000000000 +0200 -@@ -5085,7 +5085,7 @@ +diff -ur qtbase-opensource-src-5.4.0-rc-old_xcb/configure qtbase-opensource-src-5.4.0-rc-old_xkbcommon/configure +--- qtbase-opensource-src-5.4.0-rc-old_xcb/configure 2014-11-29 03:07:40.000000000 +0100 ++++ qtbase-opensource-src-5.4.0-rc-old_xkbcommon/configure 2014-11-29 03:32:16.000000000 +0100 +@@ -5144,7 +5144,7 @@ fi # Detect libxkbcommon -MIN_REQ_XKBCOMMON="0.4.1" +MIN_REQ_XKBCOMMON="0.3.0" - ORIG_CFG_XKBCOMMON="$CFG_XKBCOMMON" # currently only xcb platform plugin supports building xkbcommon if [ "$CFG_XCB" != "no" ]; then -diff -ur qtbase-opensource-src-5.3.2-old_xcb/src/plugins/platforms/xcb/qxcbkeyboard.cpp qtbase-opensource-src-5.3.2-old_xkbcommon/src/plugins/platforms/xcb/qxcbkeyboard.cpp ---- qtbase-opensource-src-5.3.2-old_xcb/src/plugins/platforms/xcb/qxcbkeyboard.cpp 2014-10-08 19:46:02.000000000 +0200 -+++ qtbase-opensource-src-5.3.2-old_xkbcommon/src/plugins/platforms/xcb/qxcbkeyboard.cpp 2014-10-08 19:42:46.000000000 +0200 -@@ -871,7 +871,7 @@ - return QList(); + if [ "$CFG_XKBCOMMON" != "no" ] && [ "$CFG_XKBCOMMON" != "qt" ]; then +diff -ur qtbase-opensource-src-5.4.0-rc-old_xcb/src/plugins/platforms/xcb/qxcbkeyboard.cpp qtbase-opensource-src-5.4.0-rc-old_xkbcommon/src/plugins/platforms/xcb/qxcbkeyboard.cpp +--- qtbase-opensource-src-5.4.0-rc-old_xcb/src/plugins/platforms/xcb/qxcbkeyboard.cpp 2014-11-29 03:29:53.000000000 +0100 ++++ qtbase-opensource-src-5.4.0-rc-old_xkbcommon/src/plugins/platforms/xcb/qxcbkeyboard.cpp 2014-11-29 03:35:36.000000000 +0100 +@@ -971,7 +971,7 @@ + } QList result; -- int baseQtKey = keysymToQtKey(sym, modifiers, lookupString(kb_state, event->nativeScanCode())); +- int baseQtKey = keysymToQtKey(sym, modifiers, lookupString(kb_state, keycode)); + int baseQtKey = keysymToQtKey(sym, modifiers, keysymToUnicode(sym)); result += (baseQtKey + modifiers); // The base key is _always_ valid, of course xkb_mod_index_t shiftMod = xkb_keymap_mod_get_index(xkb_keymap, "Shift"); -@@ -918,7 +918,7 @@ +@@ -1008,7 +1008,7 @@ continue; Qt::KeyboardModifiers mods = modifiers & ~neededMods; -- qtKey = keysymToQtKey(sym, mods, lookupString(kb_state, event->nativeScanCode())); +- qtKey = keysymToQtKey(sym, mods, lookupString(kb_state, keycode)); + qtKey = keysymToQtKey(sym, mods, keysymToUnicode(sym)); - - if (qtKey == baseQtKey) + if (!qtKey || qtKey == baseQtKey) continue; -@@ -1363,7 +1363,7 @@ - Qt::KeyboardModifiers modifiers = translateModifiers(state); +@@ -1462,7 +1462,7 @@ + return; + } - QString string = lookupString(xkb_state, code); + QString string = keysymToUnicode(sym); int count = string.size(); string.truncate(count); -@@ -1427,12 +1427,18 @@ +@@ -1535,12 +1535,18 @@ } } @@ -63,10 +63,10 @@ diff -ur qtbase-opensource-src-5.3.2-old_xcb/src/plugins/platforms/xcb/qxcbkeybo return QString::fromUtf8(chars); } -diff -ur qtbase-opensource-src-5.3.2-old_xcb/src/plugins/platforms/xcb/qxcbkeyboard.h qtbase-opensource-src-5.3.2-old_xkbcommon/src/plugins/platforms/xcb/qxcbkeyboard.h ---- qtbase-opensource-src-5.3.2-old_xcb/src/plugins/platforms/xcb/qxcbkeyboard.h 2014-10-08 19:46:02.000000000 +0200 -+++ qtbase-opensource-src-5.3.2-old_xkbcommon/src/plugins/platforms/xcb/qxcbkeyboard.h 2014-10-08 19:42:46.000000000 +0200 -@@ -83,7 +83,7 @@ +diff -ur qtbase-opensource-src-5.4.0-rc-old_xcb/src/plugins/platforms/xcb/qxcbkeyboard.h qtbase-opensource-src-5.4.0-rc-old_xkbcommon/src/plugins/platforms/xcb/qxcbkeyboard.h +--- qtbase-opensource-src-5.4.0-rc-old_xcb/src/plugins/platforms/xcb/qxcbkeyboard.h 2014-11-29 03:07:40.000000000 +0100 ++++ qtbase-opensource-src-5.4.0-rc-old_xkbcommon/src/plugins/platforms/xcb/qxcbkeyboard.h 2014-11-29 03:32:16.000000000 +0100 +@@ -75,7 +75,7 @@ void handleKeyEvent(xcb_window_t sourceWindow, QEvent::Type type, xcb_keycode_t code, quint16 state, xcb_timestamp_t time); void resolveMaskConflicts(); diff --git a/qtbase-qfiledialog-implement-getopenfileurl-and-friends.patch b/qtbase-qfiledialog-implement-getopenfileurl-and-friends.patch deleted file mode 100644 index 702ce7b..0000000 --- a/qtbase-qfiledialog-implement-getopenfileurl-and-friends.patch +++ /dev/null @@ -1,261 +0,0 @@ -diff --git a/src/widgets/dialogs/qfiledialog.cpp b/src/widgets/dialogs/qfiledialog.cpp -index 9219757..22fbe37 100644 ---- a/src/widgets/dialogs/qfiledialog.cpp -+++ b/src/widgets/dialogs/qfiledialog.cpp -@@ -2100,35 +2100,9 @@ QString QFileDialog::getOpenFileName(QWidget *parent, - QString *selectedFilter, - Options options) - { -- QFileDialogArgs args; -- args.parent = parent; -- args.caption = caption; -- args.directory = QFileDialogPrivate::workingDirectory(dir); -- args.selection = QFileDialogPrivate::initialSelection(dir); -- args.filter = filter; -- args.mode = ExistingFile; -- args.options = options; --#if defined(Q_WS_WIN) -- if (QGuiApplicationPrivate::platformIntegration()->usePlatformNativeDialog() && !(args.options & DontUseNativeDialog)) { -- return qt_win_get_open_file_name(args, &(args.directory), selectedFilter); -- } --#endif -- -- // create a qt dialog -- QFileDialog dialog(args); -- if (selectedFilter && !selectedFilter->isEmpty()) -- dialog.selectNameFilter(*selectedFilter); -- if (dialog.exec() == QDialog::Accepted) { -- if (selectedFilter) -- *selectedFilter = dialog.selectedNameFilter(); -- return dialog.selectedFiles().value(0); -- } -- return QString(); --} -- --static inline QUrl dialogResultToUrl(const QString &file) --{ -- return file.isEmpty() ? QUrl() : QUrl::fromLocalFile(file); -+ const QStringList schemes = QStringList(QStringLiteral("file")); -+ const QUrl selectedUrl = getOpenFileUrl(parent, caption, QUrl::fromLocalFile(dir), filter, selectedFilter, options, schemes); -+ return selectedUrl.toLocalFile(); - } - - /*! -@@ -2166,10 +2140,26 @@ QUrl QFileDialog::getOpenFileUrl(QWidget *parent, - Options options, - const QStringList &supportedSchemes) - { -- Q_UNUSED(supportedSchemes); -+ Q_UNUSED(supportedSchemes); // TODO -+ -+ QFileDialogArgs args; -+ args.parent = parent; -+ args.caption = caption; -+ args.directory = QFileDialogPrivate::workingDirectory(dir.toLocalFile()); -+ args.selection = QFileDialogPrivate::initialSelection(dir.toLocalFile()); -+ args.filter = filter; -+ args.mode = ExistingFile; -+ args.options = options; - -- // Falls back to local file -- return dialogResultToUrl(getOpenFileName(parent, caption, dir.toLocalFile(), filter, selectedFilter, options)); -+ QFileDialog dialog(args); -+ if (selectedFilter && !selectedFilter->isEmpty()) -+ dialog.selectNameFilter(*selectedFilter); -+ if (dialog.exec() == QDialog::Accepted) { -+ if (selectedFilter) -+ *selectedFilter = dialog.selectedNameFilter(); -+ return dialog.selectedUrls().value(0); -+ } -+ return QUrl(); - } - - /*! -@@ -2228,31 +2218,12 @@ QStringList QFileDialog::getOpenFileNames(QWidget *parent, - QString *selectedFilter, - Options options) - { -- QFileDialogArgs args; -- args.parent = parent; -- args.caption = caption; -- args.directory = QFileDialogPrivate::workingDirectory(dir); -- args.selection = QFileDialogPrivate::initialSelection(dir); -- args.filter = filter; -- args.mode = ExistingFiles; -- args.options = options; -- --#if defined(Q_WS_WIN) -- if (QGuiApplicationPrivate::platformIntegration()->usePlatformNativeDialog() && !(args.options & DontUseNativeDialog)) { -- return qt_win_get_open_file_names(args, &(args.directory), selectedFilter); -- } --#endif -- -- // create a qt dialog -- QFileDialog dialog(args); -- if (selectedFilter && !selectedFilter->isEmpty()) -- dialog.selectNameFilter(*selectedFilter); -- if (dialog.exec() == QDialog::Accepted) { -- if (selectedFilter) -- *selectedFilter = dialog.selectedNameFilter(); -- return dialog.selectedFiles(); -- } -- return QStringList(); -+ const QStringList schemes = QStringList(QStringLiteral("file")); -+ const QList selectedUrls = getOpenFileUrls(parent, caption, QUrl::fromLocalFile(dir), filter, selectedFilter, options, schemes); -+ QStringList fileNames; -+ foreach (const QUrl &url, selectedUrls) -+ fileNames << url.toLocalFile(); -+ return fileNames; - } - - /*! -@@ -2293,14 +2264,24 @@ QList QFileDialog::getOpenFileUrls(QWidget *parent, - { - Q_UNUSED(supportedSchemes); - -- // Falls back to local files -- QList urls; -- -- const QStringList fileNames = getOpenFileNames(parent, caption, dir.toLocalFile(), filter, selectedFilter, options); -- foreach (const QString &fileName, fileNames) -- urls << QUrl::fromLocalFile(fileName); -+ QFileDialogArgs args; -+ args.parent = parent; -+ args.caption = caption; -+ args.directory = QFileDialogPrivate::workingDirectory(dir.toLocalFile()); -+ args.selection = QFileDialogPrivate::initialSelection(dir.toLocalFile()); -+ args.filter = filter; -+ args.mode = ExistingFiles; -+ args.options = options; - -- return urls; -+ QFileDialog dialog(args); -+ if (selectedFilter && !selectedFilter->isEmpty()) -+ dialog.selectNameFilter(*selectedFilter); -+ if (dialog.exec() == QDialog::Accepted) { -+ if (selectedFilter) -+ *selectedFilter = dialog.selectedNameFilter(); -+ return dialog.selectedUrls(); -+ } -+ return QList(); - } - - /*! -@@ -2360,33 +2341,9 @@ QString QFileDialog::getSaveFileName(QWidget *parent, - QString *selectedFilter, - Options options) - { -- QFileDialogArgs args; -- args.parent = parent; -- args.caption = caption; -- args.directory = QFileDialogPrivate::workingDirectory(dir); -- args.selection = QFileDialogPrivate::initialSelection(dir); -- args.filter = filter; -- args.mode = AnyFile; -- args.options = options; -- --#if defined(Q_WS_WIN) -- if (QGuiApplicationPrivate::platformIntegration()->usePlatformNativeDialog() && !(args.options & DontUseNativeDialog)) { -- return qt_win_get_save_file_name(args, &(args.directory), selectedFilter); -- } --#endif -- -- // create a qt dialog -- QFileDialog dialog(args); -- dialog.setAcceptMode(AcceptSave); -- if (selectedFilter && !selectedFilter->isEmpty()) -- dialog.selectNameFilter(*selectedFilter); -- if (dialog.exec() == QDialog::Accepted) { -- if (selectedFilter) -- *selectedFilter = dialog.selectedNameFilter(); -- return dialog.selectedFiles().value(0); -- } -- -- return QString(); -+ const QStringList schemes = QStringList(QStringLiteral("file")); -+ const QUrl selectedUrl = getSaveFileUrl(parent, caption, QUrl::fromLocalFile(dir), filter, selectedFilter, options, schemes); -+ return selectedUrl.toLocalFile(); - } - - /*! -@@ -2426,8 +2383,25 @@ QUrl QFileDialog::getSaveFileUrl(QWidget *parent, - { - Q_UNUSED(supportedSchemes); - -- // Falls back to local file -- return dialogResultToUrl(getSaveFileName(parent, caption, dir.toLocalFile(), filter, selectedFilter, options)); -+ QFileDialogArgs args; -+ args.parent = parent; -+ args.caption = caption; -+ args.directory = QFileDialogPrivate::workingDirectory(dir.toLocalFile()); -+ args.selection = QFileDialogPrivate::initialSelection(dir.toLocalFile()); -+ args.filter = filter; -+ args.mode = AnyFile; -+ args.options = options; -+ -+ QFileDialog dialog(args); -+ dialog.setAcceptMode(AcceptSave); -+ if (selectedFilter && !selectedFilter->isEmpty()) -+ dialog.selectNameFilter(*selectedFilter); -+ if (dialog.exec() == QDialog::Accepted) { -+ if (selectedFilter) -+ *selectedFilter = dialog.selectedNameFilter(); -+ return dialog.selectedUrls().value(0); -+ } -+ return QUrl(); - } - - /*! -@@ -2474,29 +2448,9 @@ QString QFileDialog::getExistingDirectory(QWidget *parent, - const QString &dir, - Options options) - { -- QFileDialogArgs args; -- args.parent = parent; -- args.caption = caption; -- args.directory = QFileDialogPrivate::workingDirectory(dir); -- args.mode = (options & ShowDirsOnly ? DirectoryOnly : Directory); -- args.options = options; -- --#if defined(Q_WS_WIN) -- if (QGuiApplicationPrivate::platformIntegration()->usePlatformNativeDialog() && !(args.options & DontUseNativeDialog) && (options & ShowDirsOnly) --#if defined(Q_OS_WINCE) -- && qt_priv_ptr_valid --#endif -- ) { -- return qt_win_get_existing_directory(args); -- } --#endif -- -- // create a qt dialog -- QFileDialog dialog(args); -- if (dialog.exec() == QDialog::Accepted) { -- return dialog.selectedFiles().value(0); -- } -- return QString(); -+ const QStringList schemes = QStringList(QStringLiteral("file")); -+ const QUrl selectedUrl = getExistingDirectoryUrl(parent, caption, QUrl::fromLocalFile(dir), options, schemes); -+ return selectedUrl.toLocalFile(); - } - - /*! -@@ -2534,8 +2488,17 @@ QUrl QFileDialog::getExistingDirectoryUrl(QWidget *parent, - { - Q_UNUSED(supportedSchemes); - -- // Falls back to local file -- return dialogResultToUrl(getExistingDirectory(parent, caption, dir.toLocalFile(), options)); -+ QFileDialogArgs args; -+ args.parent = parent; -+ args.caption = caption; -+ args.directory = QFileDialogPrivate::workingDirectory(dir.toLocalFile()); -+ args.mode = (options & ShowDirsOnly ? DirectoryOnly : Directory); -+ args.options = options; -+ -+ QFileDialog dialog(args); -+ if (dialog.exec() == QDialog::Accepted) -+ return dialog.selectedUrls().value(0); -+ return QUrl(); - } - - inline static QString _qt_get_directory(const QString &path) diff --git a/sources b/sources index 49ec7bc..f556783 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -563e2b10274171f1184b3fd7260b4991 qtbase-opensource-src-5.3.2.tar.xz +eaaa72a5cb25713ca8d17f3a8d149765 qtbase-opensource-src-5.4.0.tar.xz