5.4.0-0.1.beta
- 5.4.0-beta - avoid extra -devel deps by moving *Plugin.cmake files to base pkgs - disable -doc,-examples to bootstrap other 5.4.0 modules
This commit is contained in:
parent
1d141c16c7
commit
721ded4bfb
1
.gitignore
vendored
1
.gitignore
vendored
@ -1 +1,2 @@
|
|||||||
/qtbase-opensource-src-5.3.2.tar.xz
|
/qtbase-opensource-src-5.3.2.tar.xz
|
||||||
|
/qtbase-opensource-src-5.4.0-beta.tar.xz
|
||||||
|
127
qt5-qtbase.spec
127
qt5-qtbase.spec
@ -15,32 +15,37 @@
|
|||||||
|
|
||||||
%global rpm_macros_dir %(d=%{_rpmconfigdir}/macros.d; [ -d $d ] || d=%{_sysconfdir}/rpm; echo $d)
|
%global rpm_macros_dir %(d=%{_rpmconfigdir}/macros.d; [ -d $d ] || d=%{_sysconfdir}/rpm; echo $d)
|
||||||
|
|
||||||
|
%global bootstrap 1
|
||||||
|
|
||||||
# define to build docs, need to undef this for bootstrapping
|
# define to build docs, need to undef this for bootstrapping
|
||||||
# where qt5-qttools builds are not yet available
|
# where qt5-qttools builds are not yet available
|
||||||
# only primary archs (for now), allow secondary to bootstrap
|
# only primary archs (for now), allow secondary to bootstrap
|
||||||
|
%if ! 0%{?bootstrap}
|
||||||
%ifarch %{arm} %{ix86} x86_64
|
%ifarch %{arm} %{ix86} x86_64
|
||||||
%define docs 1
|
%define docs 1
|
||||||
%endif
|
%endif
|
||||||
|
%define examples 1
|
||||||
|
%endif
|
||||||
|
|
||||||
#define pre rc1
|
%define pre beta
|
||||||
#define snap 2013-11-08_141
|
#define snap 2014-10-07_40
|
||||||
#define snap_tag 20131108_141
|
#define snap_tag 20141007_40
|
||||||
|
|
||||||
Summary: Qt5 - QtBase components
|
Summary: Qt5 - QtBase components
|
||||||
Name: qt5-qtbase
|
Name: qt5-qtbase
|
||||||
Version: 5.3.2
|
Version: 5.4.0
|
||||||
Release: 3%{?dist}
|
Release: 0.1.%{pre}%{?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
|
License: LGPLv2 with exceptions or GPLv3 with exceptions
|
||||||
Url: http://qt-project.org/
|
Url: http://qt-project.org/
|
||||||
%if 0%{?snap:1}
|
%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
|
%else
|
||||||
%if 0%{?pre:1}
|
%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
|
%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
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
@ -65,9 +70,6 @@ Patch2: qtbase-multilib_optflags.patch
|
|||||||
# fix QTBUG-35459 (too low entityCharacterLimit=1024 for CVE-2013-4549)
|
# fix QTBUG-35459 (too low entityCharacterLimit=1024 for CVE-2013-4549)
|
||||||
Patch4: qtbase-opensource-src-5.3.2-QTBUG-35459.patch
|
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
|
# unconditionally enable freetype lcdfilter support
|
||||||
Patch12: qtbase-opensource-src-5.2.0-enable_ft_lcdfilter.patch
|
Patch12: qtbase-opensource-src-5.2.0-enable_ft_lcdfilter.patch
|
||||||
|
|
||||||
@ -78,7 +80,6 @@ Patch12: qtbase-opensource-src-5.2.0-enable_ft_lcdfilter.patch
|
|||||||
Patch50: qt5-poll.patch
|
Patch50: qt5-poll.patch
|
||||||
|
|
||||||
##upstream patches
|
##upstream patches
|
||||||
Patch100: qtbase-qfiledialog-implement-getopenfileurl-and-friends.patch
|
|
||||||
|
|
||||||
# macros
|
# macros
|
||||||
%define _qt5 %{name}
|
%define _qt5 %{name}
|
||||||
@ -193,16 +194,6 @@ handling.
|
|||||||
Summary: Development files for %{name}
|
Summary: Development files for %{name}
|
||||||
Requires: %{name}%{?_isa} = %{version}-%{release}
|
Requires: %{name}%{?_isa} = %{version}-%{release}
|
||||||
Requires: %{name}-gui%{?_isa}
|
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}
|
%if 0%{?egl}
|
||||||
Requires: pkgconfig(egl)
|
Requires: pkgconfig(egl)
|
||||||
%endif
|
%endif
|
||||||
@ -213,6 +204,7 @@ Requires: pkgconfig(gl)
|
|||||||
%if 0%{?docs}
|
%if 0%{?docs}
|
||||||
%package doc
|
%package doc
|
||||||
Summary: API documentation for %{name}
|
Summary: API documentation for %{name}
|
||||||
|
License: GFDL
|
||||||
Requires: %{name} = %{version}-%{release}
|
Requires: %{name} = %{version}-%{release}
|
||||||
# for qhelpgenerator
|
# for qhelpgenerator
|
||||||
BuildRequires: qt5-qttools-devel
|
BuildRequires: qt5-qttools-devel
|
||||||
@ -304,13 +296,10 @@ Qt5 libraries used for drawing widgets and OpenGL items.
|
|||||||
rm -fv mkspecs/linux-g++*/qmake.conf.multilib-optflags
|
rm -fv mkspecs/linux-g++*/qmake.conf.multilib-optflags
|
||||||
|
|
||||||
%patch4 -p1 -b .QTBUG-35459
|
%patch4 -p1 -b .QTBUG-35459
|
||||||
%patch5 -p1 -b .prefer-qpa
|
|
||||||
%patch12 -p1 -b .enable_ft_lcdfilter
|
%patch12 -p1 -b .enable_ft_lcdfilter
|
||||||
|
|
||||||
#patch50 -p1 -b .poll
|
#patch50 -p1 -b .poll
|
||||||
|
|
||||||
%patch100 -p1 -b .qfiledialog-implement-getopenfileurl-and-friends
|
|
||||||
|
|
||||||
# drop -fexceptions from $RPM_OPT_FLAGS
|
# drop -fexceptions from $RPM_OPT_FLAGS
|
||||||
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS | sed 's|-fexceptions||g'`
|
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS | sed 's|-fexceptions||g'`
|
||||||
|
|
||||||
@ -367,6 +356,7 @@ popd
|
|||||||
-icu \
|
-icu \
|
||||||
-openssl-linked \
|
-openssl-linked \
|
||||||
-optimized-qmake \
|
-optimized-qmake \
|
||||||
|
%{!?examples:-nomake examples} \
|
||||||
-nomake tests \
|
-nomake tests \
|
||||||
-no-pch \
|
-no-pch \
|
||||||
-no-rpath \
|
-no-rpath \
|
||||||
@ -548,7 +538,7 @@ fi
|
|||||||
|
|
||||||
|
|
||||||
%files
|
%files
|
||||||
%doc LICENSE.GPL LICENSE.LGPL LGPL_EXCEPTION.txt
|
%doc LICENSE.LGPL* LGPL_EXCEPTION.txt
|
||||||
%if 0%{?qtchooser}
|
%if 0%{?qtchooser}
|
||||||
%dir %{_sysconfdir}/xdg/qtchooser
|
%dir %{_sysconfdir}/xdg/qtchooser
|
||||||
# not editable config files, so not using %%config here
|
# not editable config files, so not using %%config here
|
||||||
@ -563,6 +553,19 @@ fi
|
|||||||
%{_qt5_libdir}/libQt5Sql.so.5*
|
%{_qt5_libdir}/libQt5Sql.so.5*
|
||||||
%{_qt5_libdir}/libQt5Test.so.5*
|
%{_qt5_libdir}/libQt5Test.so.5*
|
||||||
%{_qt5_libdir}/libQt5Xml.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}/
|
%dir %{_qt5_docdir}/
|
||||||
%{_qt5_docdir}/global/
|
%{_qt5_docdir}/global/
|
||||||
%{_qt5_importdir}/
|
%{_qt5_importdir}/
|
||||||
@ -575,7 +578,10 @@ fi
|
|||||||
%{_qt5_plugindir}/bearer/libqconnmanbearer.so
|
%{_qt5_plugindir}/bearer/libqconnmanbearer.so
|
||||||
%{_qt5_plugindir}/bearer/libqgenericbearer.so
|
%{_qt5_plugindir}/bearer/libqgenericbearer.so
|
||||||
%{_qt5_plugindir}/bearer/libqnmbearer.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}/generic/
|
||||||
%dir %{_qt5_plugindir}/imageformats/
|
%dir %{_qt5_plugindir}/imageformats/
|
||||||
%dir %{_qt5_plugindir}/platforminputcontexts/
|
%dir %{_qt5_plugindir}/platforminputcontexts/
|
||||||
@ -584,9 +590,11 @@ fi
|
|||||||
%dir %{_qt5_plugindir}/printsupport/
|
%dir %{_qt5_plugindir}/printsupport/
|
||||||
%dir %{_qt5_plugindir}/sqldrivers/
|
%dir %{_qt5_plugindir}/sqldrivers/
|
||||||
%{_qt5_plugindir}/sqldrivers/libqsqlite.so
|
%{_qt5_plugindir}/sqldrivers/libqsqlite.so
|
||||||
|
%{_qt5_libdir}/cmake/Qt5Sql/Qt5Sql_QSQLiteDriverPlugin.cmake
|
||||||
|
|
||||||
%if 0%{?docs}
|
%if 0%{?docs}
|
||||||
%files doc
|
%files doc
|
||||||
|
%doc LICENSE.FDL
|
||||||
%doc dist/README dist/changes-5.*
|
%doc dist/README dist/changes-5.*
|
||||||
%{_qt5_docdir}/*.qch
|
%{_qt5_docdir}/*.qch
|
||||||
%{_qt5_docdir}/qdoc/
|
%{_qt5_docdir}/qdoc/
|
||||||
@ -597,6 +605,7 @@ fi
|
|||||||
%{_qt5_docdir}/qtgui/
|
%{_qt5_docdir}/qtgui/
|
||||||
%{_qt5_docdir}/qtnetwork/
|
%{_qt5_docdir}/qtnetwork/
|
||||||
%{_qt5_docdir}/qtopengl/
|
%{_qt5_docdir}/qtopengl/
|
||||||
|
%{_qt5_docdir}/qtplatformheaders/
|
||||||
%{_qt5_docdir}/qtprintsupport/
|
%{_qt5_docdir}/qtprintsupport/
|
||||||
%{_qt5_docdir}/qtsql/
|
%{_qt5_docdir}/qtsql/
|
||||||
%{_qt5_docdir}/qttestlib/
|
%{_qt5_docdir}/qttestlib/
|
||||||
@ -636,6 +645,7 @@ fi
|
|||||||
%{_qt5_headerdir}/QtGui/
|
%{_qt5_headerdir}/QtGui/
|
||||||
%{_qt5_headerdir}/QtNetwork/
|
%{_qt5_headerdir}/QtNetwork/
|
||||||
%{_qt5_headerdir}/QtOpenGL/
|
%{_qt5_headerdir}/QtOpenGL/
|
||||||
|
%{_qt5_headerdir}/QtPlatformHeaders/
|
||||||
%{_qt5_headerdir}/QtPrintSupport/
|
%{_qt5_headerdir}/QtPrintSupport/
|
||||||
%{_qt5_headerdir}/QtSql/
|
%{_qt5_headerdir}/QtSql/
|
||||||
%{_qt5_headerdir}/QtTest/
|
%{_qt5_headerdir}/QtTest/
|
||||||
@ -664,19 +674,22 @@ fi
|
|||||||
%{_qt5_libdir}/libQt5Widgets.so
|
%{_qt5_libdir}/libQt5Widgets.so
|
||||||
%{_qt5_libdir}/libQt5Xml.prl
|
%{_qt5_libdir}/libQt5Xml.prl
|
||||||
%{_qt5_libdir}/libQt5Xml.so
|
%{_qt5_libdir}/libQt5Xml.so
|
||||||
%dir %{_qt5_libdir}/cmake/
|
%{_qt5_libdir}/cmake/Qt5/Qt5Config*.cmake
|
||||||
%{_qt5_libdir}/cmake/Qt5/
|
%{_qt5_libdir}/cmake/Qt5Concurrent/Qt5ConcurrentConfig*.cmake
|
||||||
%{_qt5_libdir}/cmake/Qt5Concurrent/
|
%{_qt5_libdir}/cmake/Qt5Core/Qt5CoreConfig*.cmake
|
||||||
%{_qt5_libdir}/cmake/Qt5Core/
|
%{_qt5_libdir}/cmake/Qt5Core/Qt5CoreMacros.cmake
|
||||||
%{_qt5_libdir}/cmake/Qt5DBus/
|
%{_qt5_libdir}/cmake/Qt5Core/Qt5CTestMacros.cmake
|
||||||
%{_qt5_libdir}/cmake/Qt5Gui/
|
%{_qt5_libdir}/cmake/Qt5DBus/Qt5DBusConfig*.cmake
|
||||||
%{_qt5_libdir}/cmake/Qt5Network/
|
%{_qt5_libdir}/cmake/Qt5DBus/Qt5DBusMacros.cmake
|
||||||
%{_qt5_libdir}/cmake/Qt5OpenGL/
|
%{_qt5_libdir}/cmake/Qt5Gui/Qt5GuiConfig*.cmake
|
||||||
%{_qt5_libdir}/cmake/Qt5PrintSupport/
|
%{_qt5_libdir}/cmake/Qt5Network/Qt5NetworkConfig*.cmake
|
||||||
%{_qt5_libdir}/cmake/Qt5Sql/
|
%{_qt5_libdir}/cmake/Qt5OpenGL/Qt5OpenGLConfig*.cmake
|
||||||
%{_qt5_libdir}/cmake/Qt5Test/
|
%{_qt5_libdir}/cmake/Qt5PrintSupport/Qt5PrintSupportConfig*.cmake
|
||||||
%{_qt5_libdir}/cmake/Qt5Widgets/
|
%{_qt5_libdir}/cmake/Qt5Sql/Qt5SqlConfig*.cmake
|
||||||
%{_qt5_libdir}/cmake/Qt5Xml/
|
%{_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/Qt5.pc
|
||||||
%{_qt5_libdir}/pkgconfig/Qt5Concurrent.pc
|
%{_qt5_libdir}/pkgconfig/Qt5Concurrent.pc
|
||||||
%{_qt5_libdir}/pkgconfig/Qt5Core.pc
|
%{_qt5_libdir}/pkgconfig/Qt5Core.pc
|
||||||
@ -704,26 +717,33 @@ fi
|
|||||||
%{_qt5_libdir}/libQt5PlatformSupport.prl
|
%{_qt5_libdir}/libQt5PlatformSupport.prl
|
||||||
%{_qt5_libdir}/pkgconfig/Qt5PlatformSupport.pc
|
%{_qt5_libdir}/pkgconfig/Qt5PlatformSupport.pc
|
||||||
|
|
||||||
|
%if 0%{?examples}
|
||||||
%files examples
|
%files examples
|
||||||
%{_qt5_examplesdir}/
|
%{_qt5_examplesdir}/
|
||||||
|
%endif
|
||||||
|
|
||||||
%if "%{?ibase}" != "-no-sql-ibase"
|
%if "%{?ibase}" != "-no-sql-ibase"
|
||||||
%files ibase
|
%files ibase
|
||||||
%{_qt5_plugindir}/sqldrivers/libqsqlibase.so
|
%{_qt5_plugindir}/sqldrivers/libqsqlibase.so
|
||||||
|
%{_qt5_libdir}/cmake/Qt5Sql/Qt5Sql_QIBaseDriverPlugin.cmake
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%files mysql
|
%files mysql
|
||||||
%{_qt5_plugindir}/sqldrivers/libqsqlmysql.so
|
%{_qt5_plugindir}/sqldrivers/libqsqlmysql.so
|
||||||
|
%{_qt5_libdir}/cmake/Qt5Sql/Qt5Sql_QMYSQLDriverPlugin.cmake
|
||||||
|
|
||||||
%files odbc
|
%files odbc
|
||||||
%{_qt5_plugindir}/sqldrivers/libqsqlodbc.so
|
%{_qt5_plugindir}/sqldrivers/libqsqlodbc.so
|
||||||
|
%{_qt5_libdir}/cmake/Qt5Sql/Qt5Sql_QODBCDriverPlugin.cmake
|
||||||
|
|
||||||
%files postgresql
|
%files postgresql
|
||||||
%{_qt5_plugindir}/sqldrivers/libqsqlpsql.so
|
%{_qt5_plugindir}/sqldrivers/libqsqlpsql.so
|
||||||
|
%{_qt5_libdir}/cmake/Qt5Sql/Qt5Sql_QPSQLDriverPlugin.cmake
|
||||||
|
|
||||||
%if "%{?tds}" != "-no-sql-tds"
|
%if "%{?tds}" != "-no-sql-tds"
|
||||||
%files tds
|
%files tds
|
||||||
%{_qt5_plugindir}/sqldrivers/libqsqltds.so
|
%{_qt5_plugindir}/sqldrivers/libqsqltds.so
|
||||||
|
%{_qt5_libdir}/cmake/Qt5Sql/Qt5Sql_QTDSDriverPlugin.cmake
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%post gui -p /sbin/ldconfig
|
%post gui -p /sbin/ldconfig
|
||||||
@ -737,30 +757,53 @@ fi
|
|||||||
%{_qt5_libdir}/libQt5OpenGL.so.5*
|
%{_qt5_libdir}/libQt5OpenGL.so.5*
|
||||||
%{_qt5_libdir}/libQt5PrintSupport.so.5*
|
%{_qt5_libdir}/libQt5PrintSupport.so.5*
|
||||||
%{_qt5_libdir}/libQt5Widgets.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/libqevdevkeyboardplugin.so
|
||||||
%{_qt5_plugindir}/generic/libqevdevmouseplugin.so
|
%{_qt5_plugindir}/generic/libqevdevmouseplugin.so
|
||||||
%{_qt5_plugindir}/generic/libqevdevtabletplugin.so
|
%{_qt5_plugindir}/generic/libqevdevtabletplugin.so
|
||||||
%{_qt5_plugindir}/generic/libqevdevtouchplugin.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/libqgif.so
|
||||||
%{_qt5_plugindir}/imageformats/libqico.so
|
%{_qt5_plugindir}/imageformats/libqico.so
|
||||||
%{_qt5_plugindir}/imageformats/libqjpeg.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/libcomposeplatforminputcontextplugin.so
|
||||||
%{_qt5_plugindir}/platforminputcontexts/libibusplatforminputcontextplugin.so
|
%{_qt5_plugindir}/platforminputcontexts/libibusplatforminputcontextplugin.so
|
||||||
|
%{_qt5_libdir}/cmake/Qt5Gui/Qt5Gui_QComposePlatformInputContextPlugin.cmake
|
||||||
|
%{_qt5_libdir}/cmake/Qt5Gui/Qt5Gui_QIbusPlatformInputContextPlugin.cmake
|
||||||
%if 0%{?egl}
|
%if 0%{?egl}
|
||||||
%{_qt5_plugindir}/platforms/libqeglfs.so
|
%{_qt5_plugindir}/platforms/libqeglfs.so
|
||||||
%{_qt5_plugindir}/platforms/libqkms.so
|
%{_qt5_plugindir}/platforms/libqkms.so
|
||||||
%{_qt5_plugindir}/platforms/libqminimalegl.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
|
%endif
|
||||||
%{_qt5_plugindir}/platforms/libqlinuxfb.so
|
%{_qt5_plugindir}/platforms/libqlinuxfb.so
|
||||||
%{_qt5_plugindir}/platforms/libqminimal.so
|
%{_qt5_plugindir}/platforms/libqminimal.so
|
||||||
%{_qt5_plugindir}/platforms/libqoffscreen.so
|
%{_qt5_plugindir}/platforms/libqoffscreen.so
|
||||||
%{_qt5_plugindir}/platforms/libqxcb.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_plugindir}/platformthemes/libqgtk2.so
|
||||||
|
%{_qt5_libdir}/cmake/Qt5Gui/Qt5Gui_QGtk2ThemePlugin.cmake
|
||||||
%{_qt5_plugindir}/printsupport/libcupsprintersupport.so
|
%{_qt5_plugindir}/printsupport/libcupsprintersupport.so
|
||||||
|
%{_qt5_libdir}/cmake/Qt5PrintSupport/Qt5PrintSupport_QCupsPrinterSupportPlugin.cmake
|
||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* 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
|
||||||
|
- disable -doc,-examples to bootstrap other 5.4.0 modules
|
||||||
|
|
||||||
* Mon Oct 13 2014 Jan Grulich <jgrulich@redhat.com> 5.3.2-3
|
* Mon Oct 13 2014 Jan Grulich <jgrulich@redhat.com> 5.3.2-3
|
||||||
- QFileDialog: implement getOpenFileUrl and friends for real
|
- 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,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