Merge branch 'master' into f21
This commit is contained in:
commit
750ca6ef77
2
.gitignore
vendored
2
.gitignore
vendored
@ -1 +1 @@
|
||||
/qtbase-opensource-src-5.3.2.tar.xz
|
||||
/qtbase-opensource-src-5.4.0.tar.xz
|
||||
|
45
0009-Do-not-apply-subpixel-gamma-correction-on-XCB.patch
Normal file
45
0009-Do-not-apply-subpixel-gamma-correction-on-XCB.patch
Normal file
@ -0,0 +1,45 @@
|
||||
From 501c510cc3cb6215aed27af7599395480a049667 Mon Sep 17 00:00:00 2001
|
||||
From: Allan Sandfeld Jensen <allan.jensen@digia.com>
|
||||
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 <srodal@gmail.com>
|
||||
Reviewed-by: Sérgio Martins <sergio.martins@kdab.com>
|
||||
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
|
||||
---
|
||||
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
|
||||
|
30
macros.qt5
Normal file
30
macros.qt5
Normal file
@ -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=
|
||||
|
209
qt5-qtbase.spec
209
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: 1%{?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,15 @@ 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
|
||||
|
||||
# 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 +107,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 +148,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 +171,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 +210,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 +220,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 +312,11 @@ 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
|
||||
|
||||
# drop -fexceptions from $RPM_OPT_FLAGS
|
||||
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS | sed 's|-fexceptions||g'`
|
||||
@ -367,6 +374,7 @@ popd
|
||||
-icu \
|
||||
-openssl-linked \
|
||||
-optimized-qmake \
|
||||
%{!?examples:-nomake examples} \
|
||||
-nomake tests \
|
||||
-no-pch \
|
||||
-no-rpath \
|
||||
@ -429,28 +437,14 @@ Version: %{version}
|
||||
EOF
|
||||
|
||||
# rpm macros
|
||||
mkdir -p %{buildroot}%{rpm_macros_dir}
|
||||
cat >%{buildroot}%{rpm_macros_dir}/macros.qt5<<EOF
|
||||
%%_qt5 %{name}
|
||||
%%_qt5_epoch %{?epoch}%{!?epoch:0}
|
||||
%%_qt5_version %{version}
|
||||
%%_qt5_evr %{?epoch:%{epoch:}}%{version}-%{release}
|
||||
%%_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
|
||||
EOF
|
||||
install -p -m644 -D %{SOURCE1} \
|
||||
%{buildroot}%{rpm_macros_dir}/macros.qt5
|
||||
sed -i \
|
||||
-e "s|@@NAME@@|%{name}|g" \
|
||||
-e "s|@@EPOCH@@|%{?epoch}%{!?epoch:0}|g" \
|
||||
-e "s|@@VERSION@@|%{version}|g" \
|
||||
-e "s|@@EVR@@|%{?epoch:%{epoch:}}%{version}-%{release}|g" \
|
||||
%{buildroot}%{rpm_macros_dir}/macros.qt5
|
||||
|
||||
# create/own dirs
|
||||
mkdir -p %{buildroot}{%{_qt5_archdatadir}/mkspecs/modules,%{_qt5_importdir},%{_qt5_libexecdir},%{_qt5_plugindir}/iconengines,%{_qt5_translationdir}}
|
||||
@ -548,7 +542,7 @@ fi
|
||||
|
||||
|
||||
%files
|
||||
%doc LICENSE.GPL LICENSE.LGPL LGPL_EXCEPTION.txt
|
||||
%doc LICENSE.LGPL* LGPL_EXCEPTION.txt
|
||||
%if 0%{?qtchooser}
|
||||
%dir %{_sysconfdir}/xdg/qtchooser
|
||||
# not editable config files, so not using %%config here
|
||||
@ -563,6 +557,19 @@ fi
|
||||
%{_qt5_libdir}/libQt5Sql.so.5*
|
||||
%{_qt5_libdir}/libQt5Test.so.5*
|
||||
%{_qt5_libdir}/libQt5Xml.so.5*
|
||||
%dir %{_qt5_libdir}/cmake/
|
||||
%dir %{_qt5_libdir}/cmake/Qt5/
|
||||
%dir %{_qt5_libdir}/cmake/Qt5Concurrent/
|
||||
%dir %{_qt5_libdir}/cmake/Qt5Core/
|
||||
%dir %{_qt5_libdir}/cmake/Qt5DBus/
|
||||
%dir %{_qt5_libdir}/cmake/Qt5Gui/
|
||||
%dir %{_qt5_libdir}/cmake/Qt5Network/
|
||||
%dir %{_qt5_libdir}/cmake/Qt5OpenGL/
|
||||
%dir %{_qt5_libdir}/cmake/Qt5PrintSupport/
|
||||
%dir %{_qt5_libdir}/cmake/Qt5Sql/
|
||||
%dir %{_qt5_libdir}/cmake/Qt5Test/
|
||||
%dir %{_qt5_libdir}/cmake/Qt5Widgets/
|
||||
%dir %{_qt5_libdir}/cmake/Qt5Xml/
|
||||
%dir %{_qt5_docdir}/
|
||||
%{_qt5_docdir}/global/
|
||||
%{_qt5_importdir}/
|
||||
@ -575,7 +582,10 @@ fi
|
||||
%{_qt5_plugindir}/bearer/libqconnmanbearer.so
|
||||
%{_qt5_plugindir}/bearer/libqgenericbearer.so
|
||||
%{_qt5_plugindir}/bearer/libqnmbearer.so
|
||||
%dir %{_qt5_plugindir}/accessible/
|
||||
%{_qt5_libdir}/cmake/Qt5Network/Qt5Network_QConnmanEnginePlugin.cmake
|
||||
%{_qt5_libdir}/cmake/Qt5Network/Qt5Network_QGenericEnginePlugin.cmake
|
||||
%{_qt5_libdir}/cmake/Qt5Network/Qt5Network_QNetworkManagerEnginePlugin.cmake
|
||||
#dir %{_qt5_plugindir}/accessible/
|
||||
%dir %{_qt5_plugindir}/generic/
|
||||
%dir %{_qt5_plugindir}/imageformats/
|
||||
%dir %{_qt5_plugindir}/platforminputcontexts/
|
||||
@ -584,9 +594,11 @@ fi
|
||||
%dir %{_qt5_plugindir}/printsupport/
|
||||
%dir %{_qt5_plugindir}/sqldrivers/
|
||||
%{_qt5_plugindir}/sqldrivers/libqsqlite.so
|
||||
%{_qt5_libdir}/cmake/Qt5Sql/Qt5Sql_QSQLiteDriverPlugin.cmake
|
||||
|
||||
%if 0%{?docs}
|
||||
%files doc
|
||||
%doc LICENSE.FDL
|
||||
%doc dist/README dist/changes-5.*
|
||||
%{_qt5_docdir}/*.qch
|
||||
%{_qt5_docdir}/qdoc/
|
||||
@ -597,6 +609,7 @@ fi
|
||||
%{_qt5_docdir}/qtgui/
|
||||
%{_qt5_docdir}/qtnetwork/
|
||||
%{_qt5_docdir}/qtopengl/
|
||||
%{_qt5_docdir}/qtplatformheaders/
|
||||
%{_qt5_docdir}/qtprintsupport/
|
||||
%{_qt5_docdir}/qtsql/
|
||||
%{_qt5_docdir}/qttestlib/
|
||||
@ -636,6 +649,7 @@ fi
|
||||
%{_qt5_headerdir}/QtGui/
|
||||
%{_qt5_headerdir}/QtNetwork/
|
||||
%{_qt5_headerdir}/QtOpenGL/
|
||||
%{_qt5_headerdir}/QtPlatformHeaders/
|
||||
%{_qt5_headerdir}/QtPrintSupport/
|
||||
%{_qt5_headerdir}/QtSql/
|
||||
%{_qt5_headerdir}/QtTest/
|
||||
@ -664,19 +678,22 @@ fi
|
||||
%{_qt5_libdir}/libQt5Widgets.so
|
||||
%{_qt5_libdir}/libQt5Xml.prl
|
||||
%{_qt5_libdir}/libQt5Xml.so
|
||||
%dir %{_qt5_libdir}/cmake/
|
||||
%{_qt5_libdir}/cmake/Qt5/
|
||||
%{_qt5_libdir}/cmake/Qt5Concurrent/
|
||||
%{_qt5_libdir}/cmake/Qt5Core/
|
||||
%{_qt5_libdir}/cmake/Qt5DBus/
|
||||
%{_qt5_libdir}/cmake/Qt5Gui/
|
||||
%{_qt5_libdir}/cmake/Qt5Network/
|
||||
%{_qt5_libdir}/cmake/Qt5OpenGL/
|
||||
%{_qt5_libdir}/cmake/Qt5PrintSupport/
|
||||
%{_qt5_libdir}/cmake/Qt5Sql/
|
||||
%{_qt5_libdir}/cmake/Qt5Test/
|
||||
%{_qt5_libdir}/cmake/Qt5Widgets/
|
||||
%{_qt5_libdir}/cmake/Qt5Xml/
|
||||
%{_qt5_libdir}/cmake/Qt5/Qt5Config*.cmake
|
||||
%{_qt5_libdir}/cmake/Qt5Concurrent/Qt5ConcurrentConfig*.cmake
|
||||
%{_qt5_libdir}/cmake/Qt5Core/Qt5CoreConfig*.cmake
|
||||
%{_qt5_libdir}/cmake/Qt5Core/Qt5CoreMacros.cmake
|
||||
%{_qt5_libdir}/cmake/Qt5Core/Qt5CTestMacros.cmake
|
||||
%{_qt5_libdir}/cmake/Qt5DBus/Qt5DBusConfig*.cmake
|
||||
%{_qt5_libdir}/cmake/Qt5DBus/Qt5DBusMacros.cmake
|
||||
%{_qt5_libdir}/cmake/Qt5Gui/Qt5GuiConfig*.cmake
|
||||
%{_qt5_libdir}/cmake/Qt5Network/Qt5NetworkConfig*.cmake
|
||||
%{_qt5_libdir}/cmake/Qt5OpenGL/Qt5OpenGLConfig*.cmake
|
||||
%{_qt5_libdir}/cmake/Qt5PrintSupport/Qt5PrintSupportConfig*.cmake
|
||||
%{_qt5_libdir}/cmake/Qt5Sql/Qt5SqlConfig*.cmake
|
||||
%{_qt5_libdir}/cmake/Qt5Test/Qt5TestConfig*.cmake
|
||||
%{_qt5_libdir}/cmake/Qt5Widgets/Qt5WidgetsConfig*.cmake
|
||||
%{_qt5_libdir}/cmake/Qt5Widgets/Qt5WidgetsMacros.cmake
|
||||
%{_qt5_libdir}/cmake/Qt5Xml/Qt5XmlConfig*.cmake
|
||||
%{_qt5_libdir}/pkgconfig/Qt5.pc
|
||||
%{_qt5_libdir}/pkgconfig/Qt5Concurrent.pc
|
||||
%{_qt5_libdir}/pkgconfig/Qt5Core.pc
|
||||
@ -704,26 +721,33 @@ fi
|
||||
%{_qt5_libdir}/libQt5PlatformSupport.prl
|
||||
%{_qt5_libdir}/pkgconfig/Qt5PlatformSupport.pc
|
||||
|
||||
%if 0%{?examples}
|
||||
%files examples
|
||||
%{_qt5_examplesdir}/
|
||||
%endif
|
||||
|
||||
%if "%{?ibase}" != "-no-sql-ibase"
|
||||
%files ibase
|
||||
%{_qt5_plugindir}/sqldrivers/libqsqlibase.so
|
||||
%{_qt5_libdir}/cmake/Qt5Sql/Qt5Sql_QIBaseDriverPlugin.cmake
|
||||
%endif
|
||||
|
||||
%files mysql
|
||||
%{_qt5_plugindir}/sqldrivers/libqsqlmysql.so
|
||||
%{_qt5_libdir}/cmake/Qt5Sql/Qt5Sql_QMYSQLDriverPlugin.cmake
|
||||
|
||||
%files odbc
|
||||
%{_qt5_plugindir}/sqldrivers/libqsqlodbc.so
|
||||
%{_qt5_libdir}/cmake/Qt5Sql/Qt5Sql_QODBCDriverPlugin.cmake
|
||||
|
||||
%files postgresql
|
||||
%{_qt5_plugindir}/sqldrivers/libqsqlpsql.so
|
||||
%{_qt5_libdir}/cmake/Qt5Sql/Qt5Sql_QPSQLDriverPlugin.cmake
|
||||
|
||||
%if "%{?tds}" != "-no-sql-tds"
|
||||
%files tds
|
||||
%{_qt5_plugindir}/sqldrivers/libqsqltds.so
|
||||
%{_qt5_libdir}/cmake/Qt5Sql/Qt5Sql_QTDSDriverPlugin.cmake
|
||||
%endif
|
||||
|
||||
%post gui -p /sbin/ldconfig
|
||||
@ -737,30 +761,77 @@ fi
|
||||
%{_qt5_libdir}/libQt5OpenGL.so.5*
|
||||
%{_qt5_libdir}/libQt5PrintSupport.so.5*
|
||||
%{_qt5_libdir}/libQt5Widgets.so.5*
|
||||
%{_qt5_plugindir}/accessible/libqtaccessiblewidgets.so
|
||||
#{_qt5_plugindir}/accessible/libqtaccessiblewidgets.so
|
||||
%{_qt5_plugindir}/generic/libqevdevkeyboardplugin.so
|
||||
%{_qt5_plugindir}/generic/libqevdevmouseplugin.so
|
||||
%{_qt5_plugindir}/generic/libqevdevtabletplugin.so
|
||||
%{_qt5_plugindir}/generic/libqevdevtouchplugin.so
|
||||
%{_qt5_libdir}/cmake/Qt5Gui/Qt5Gui_QEvdevKeyboardPlugin.cmake
|
||||
%{_qt5_libdir}/cmake/Qt5Gui/Qt5Gui_QEvdevMousePlugin.cmake
|
||||
%{_qt5_libdir}/cmake/Qt5Gui/Qt5Gui_QEvdevTabletPlugin.cmake
|
||||
%{_qt5_libdir}/cmake/Qt5Gui/Qt5Gui_QEvdevTouchScreenPlugin.cmake
|
||||
%{_qt5_plugindir}/imageformats/libqgif.so
|
||||
%{_qt5_plugindir}/imageformats/libqico.so
|
||||
%{_qt5_plugindir}/imageformats/libqjpeg.so
|
||||
%{_qt5_libdir}/cmake/Qt5Gui/Qt5Gui_QGifPlugin.cmake
|
||||
%{_qt5_libdir}/cmake/Qt5Gui/Qt5Gui_QICOPlugin.cmake
|
||||
%{_qt5_libdir}/cmake/Qt5Gui/Qt5Gui_QJpegPlugin.cmake
|
||||
%{_qt5_plugindir}/platforminputcontexts/libcomposeplatforminputcontextplugin.so
|
||||
%{_qt5_plugindir}/platforminputcontexts/libibusplatforminputcontextplugin.so
|
||||
%{_qt5_libdir}/cmake/Qt5Gui/Qt5Gui_QComposePlatformInputContextPlugin.cmake
|
||||
%{_qt5_libdir}/cmake/Qt5Gui/Qt5Gui_QIbusPlatformInputContextPlugin.cmake
|
||||
%if 0%{?egl}
|
||||
%{_qt5_plugindir}/platforms/libqeglfs.so
|
||||
%{_qt5_plugindir}/platforms/libqkms.so
|
||||
%{_qt5_plugindir}/platforms/libqminimalegl.so
|
||||
%{_qt5_libdir}/cmake/Qt5Gui/Qt5Gui_QKmsIntegrationPlugin.cmake
|
||||
%{_qt5_libdir}/cmake/Qt5Gui/Qt5Gui_QMinimalEglIntegrationPlugin.cmake
|
||||
%{_qt5_libdir}/cmake/Qt5Gui/Qt5Gui_QEglFSIntegrationPlugin.cmake
|
||||
%endif
|
||||
%{_qt5_plugindir}/platforms/libqlinuxfb.so
|
||||
%{_qt5_plugindir}/platforms/libqminimal.so
|
||||
%{_qt5_plugindir}/platforms/libqoffscreen.so
|
||||
%{_qt5_plugindir}/platforms/libqxcb.so
|
||||
%{_qt5_libdir}/cmake/Qt5Gui/Qt5Gui_QLinuxFbIntegrationPlugin.cmake
|
||||
%{_qt5_libdir}/cmake/Qt5Gui/Qt5Gui_QMinimalIntegrationPlugin.cmake
|
||||
%{_qt5_libdir}/cmake/Qt5Gui/Qt5Gui_QOffscreenIntegrationPlugin.cmake
|
||||
%{_qt5_libdir}/cmake/Qt5Gui/Qt5Gui_QXcbIntegrationPlugin.cmake
|
||||
%{_qt5_plugindir}/platformthemes/libqgtk2.so
|
||||
%{_qt5_libdir}/cmake/Qt5Gui/Qt5Gui_QGtk2ThemePlugin.cmake
|
||||
%{_qt5_plugindir}/printsupport/libcupsprintersupport.so
|
||||
%{_qt5_libdir}/cmake/Qt5PrintSupport/Qt5PrintSupport_QCupsPrinterSupportPlugin.cmake
|
||||
|
||||
|
||||
%changelog
|
||||
* Wed Dec 10 2014 Rex Dieter <rdieter@fedoraproject.org> 5.4.0-1
|
||||
- 5.4.0 (final)
|
||||
|
||||
* Fri Nov 28 2014 Rex Dieter <rdieter@fedoraproject.org> 5.4.0-0.8.rc
|
||||
- restore font rendering patch (#1052389,QTBUG-41590)
|
||||
|
||||
* Thu Nov 27 2014 Rex Dieter <rdieter@fedoraproject.org> 5.4.0-0.7.rc
|
||||
- 5.4.0-rc
|
||||
|
||||
* Wed Nov 12 2014 Rex Dieter <rdieter@fedoraproject.org> 5.4.0-0.6.beta
|
||||
- add versioned Requires: libxkbcommon dep
|
||||
|
||||
* Tue Nov 11 2014 Rex Dieter <rdieter@fedoraproject.org> 5.4.0-0.5.beta
|
||||
- pull in slightly different upstreamed font rendering fix (#1052389,QTBUG-41590)
|
||||
|
||||
* Mon Nov 10 2014 Rex Dieter <rdieter@fedoraproject.org> 5.4.0-0.4.beta
|
||||
- Bad font rendering (#1052389,QTBUG-41590)
|
||||
|
||||
* Mon Nov 03 2014 Rex Dieter <rdieter@fedoraproject.org> 5.4.0-0.3.beta
|
||||
- macros.qt5: +%%qmake_qt5 , to help set standard build flags (CFLAGS, etc...)
|
||||
|
||||
* Wed Oct 22 2014 Kevin Kofler <Kevin@tigcc.ticalc.org> - 5.4.0-0.2.beta
|
||||
- -gui: don't require gtk2 (__requires_exclude_from platformthemes) (#1154884)
|
||||
|
||||
* Sat Oct 18 2014 Rex Dieter <rdieter@fedoraproject.org> - 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 <jgrulich@redhat.com> 5.3.2-3
|
||||
- QFileDialog: implement getOpenFileUrl and friends for real
|
||||
|
||||
|
@ -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<QPlatformSystemTrayIcon::MessageIcon>(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<QPlatformSystemTrayIcon::MessageIcon>(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 <qscreen.h>
|
||||
#include <qbackingstore.h>
|
||||
#include <qpa/qplatformnativeinterface.h>
|
||||
+#include <qpa/qplatformsystemtrayicon.h>
|
||||
+#include <qpa/qplatformtheme.h>
|
||||
+#include <private/qguiapplication_p.h>
|
||||
#include <qdebug.h>
|
||||
|
||||
#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<QPlatformSystemTrayIcon> 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<QPlatformSystemTrayIcon> 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();
|
@ -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 <xcb/xcb_keysyms.h>
|
||||
|
||||
#include <xkbcommon/xkbcommon.h>
|
@ -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<int>();
|
||||
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<int> 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();
|
@ -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<QUrl> 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<QUrl> QFileDialog::getOpenFileUrls(QWidget *parent,
|
||||
{
|
||||
Q_UNUSED(supportedSchemes);
|
||||
|
||||
- // Falls back to local files
|
||||
- QList<QUrl> 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<QUrl>();
|
||||
}
|
||||
|
||||
/*!
|
||||
@@ -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)
|
Loading…
Reference in New Issue
Block a user