Commit Graph

48636 Commits

Author SHA1 Message Date
Lars Knoll
194f0ab50c Make some QMetaType members constexpr and inline
Since QMetaType::fromType() is constexpr, it makes sense to also
make some of it's members constexpr.

Change-Id: Ia2d63a904abb680ed63c1f88cb68f1d0309d029c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2020-10-23 09:50:11 +02:00
Lars Knoll
4175175588 Rename the QMetaType::MovableType flag to RelocatableType
Keep this in sync with the changes we have done in QTypeInfo.

Change-Id: Iaacb0f3cc5c46d3486084a1f6eca480a233d5e1a
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2020-10-23 09:49:36 +02:00
Lars Knoll
f2df8033f0 Support Java style iterators for QMultiHash
Take the opportunity to clean up the implementation for QHash and
use the standard macro there instead of an inlined copy.

Fixes: QTBUG-86986
Change-Id: Iea846ca97bd8b9be5d6534b31d4c7707fd1a53e1
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-10-23 09:49:32 +02:00
Elvis Lee
ee3adcc642 Export gbm device integration to build it outside
Support external build for device integration which uses
kms and gbm. QKmsScreenConfig supports inheritance
to consider platform specific screen configuration.

Task-number: QTBUG-85268
Change-Id: Iac58898a9cf0bb1d53237a719667a6ebd53d88b9
Reviewed-by: Elvis Lee <kwangwoong.lee@lge.com>
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2020-10-23 16:46:02 +09:00
Fabian Kosmale
47d2f3cfe8 QPaintDevice: Remove reserved without reservations
It was not during all of Qt 5, and nobody found a use for it when
transitioning to Qt 6. It's probably safe to assume that we will not
need it during Qt 6's lifetime either.
This changes shrinks QPaintDevice to 16 bytes (on 64bit systems), and
its child classes like QImage to 24 bytes, meaning that they fit into
QVariant's SSO buffer.

Change-Id: Ic3b020ad43afe45c76ca0c4056a440345a4e139e
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2020-10-23 09:33:29 +02:00
Allan Sandfeld Jensen
e356ab2c32 Make QPointer comparisons hidden friends
Reduces ADL noise.

Change-Id: Id0aa4b32b7bb6d70ed9106b949452d895d9060a9
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2020-10-23 09:32:37 +02:00
Andreas Buhr
2516fc935c Add benchmark for QString::number(int)
Add a almost trivial benchmark for QString::number(int).

Change-Id: Ice67eaf28e8d7b235fd5ec5e0b87b3b9053ae61e
Reviewed-by: Karsten Heimrich <karsten.heimrich@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2020-10-23 06:55:35 +02:00
Giuseppe D'Angelo
cca62a7360 QRectF/QPointF/QSizeF: document that operator== and != are fuzzy
This has been the case for a _very_ long time, and I can't
believe this hasn't been documented anywhere.

Change-Id: Ib157edf14e87a6f546c155496f70a760ab218cca
Pick-to: 5.15 5.12
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2020-10-23 01:57:27 +02:00
Alexandru Croitor
f595c1523e CMake: Check for system_xcb_xinput feature
When compiling the xcb qpa plugin we should check the value of the
'system_xcb_xinput' feature to decide whether to use the system
library or the bundled one, instead of checking for the existence of
the XCB::INPUT target.

This fixes -DINPUT_bundled_xcb_xinput=yes aka -xcb-native-painting
to influence what gets built into our release Linux packages.

Task-number: QTBUG-86053
Change-Id: I78c5eaacb7b6bd6e46afea49189e6111e198fb27
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2020-10-23 01:32:53 +02:00
Alexandru Croitor
5d81a5d4f9 CMake: Fix headersclean to build with proper flags
It's not sufficient to pass -I{prefix}/include when doing the header
clean check.

We need to propagate all target include directories and compile
definitions, and also the compile flags for good measure.

For macOS frameworks we also need to explicitly pass an -iframework
flag (qmake passses -F instead), to ensure that <QtGui/qfoo.h> style
includes are found when building other repos than qtbase.

Task-number: QTBUG-82615
Change-Id: I76d12340bc01c5c948ff04df9a3df384dcb7e076
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2020-10-23 01:32:39 +02:00
Alexandru Croitor
2a3a99fe44 CMake: Use compiler launcher for headerclean rules
This ensures ccache or sccache is used to cache the compilation of the
headerclean checks.

Task-number: QTBUG-82615
Change-Id: Ie944eb1d643e7271551c9f8337609741e419e9d8
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2020-10-23 01:32:34 +02:00
Alexandru Croitor
7c23281db3 CMake: Fix headersclean to work on macOS
It appears there's a difference between the chosen macOS compiler path
in the CI versus the compiler path on my local machine.

In the CI the chosen compiler path ends up 'being /usr/bin/clang++'
whereas for me locally it's

/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++

For some reason the headersclean commands succeed in the CI, but
locally they fail for me saying that standard library includes can not
be found, unless an explicit sysroot flag is specified.

I assume that in the CI the '/usr/bin/clang++' compiler shim chooses some
implcit sysroot, whereas the longer Xcode compiler expects an explicit
sysroot.
It's probably also affected by the fact that in the CI we pass an
explicit CMAKE_OSX_SYSROOT to a non-standard Xcode location e.g.

/Applications/Xcode11.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk

Note the '11' in the Xcode app name.

Locally I don't pass a custom CMAKE_OSX_SYSROOT, and my Xcode is
installed in a regular location e.g /Applications/Xcode.app.

The sysroot flag and path is added to regular CXX compilation rules
inside CMake's core (in cmLocalGenerator.cxx).

Reuse the same variables that CMake uses and add them to our headersclean
command rules.

Task-number: QTBUG-82615
Change-Id: Ic03ea27e39471f5fa168eb5970bf3d3f1d1be251
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2020-10-23 01:32:29 +02:00
Alexandru Croitor
df9c7456d1 CMake: Add convenience custom targets to build Qt plugins
Add 3 new convenience custom targets:
'qt_plugins', 'qpa_plugins' and 'qpa_default_plugins'.

Additionally, if we detect that an internal executable / test
links against Gui, add a dependency on the 'qpa_default_plugins'
custom target, so that if a developer configures Qt for the first time
and then calls ninja 'tst_foo_check', we ensure the test will launch
successfully because the default QPA plugin will also be built.

Change-Id: If6dd70844b5effdf8a293f65f8785855cc85b132
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-10-22 23:32:23 +00:00
Morten Johan Sørvig
4fed50f4ab Prepare for having multiple highdpi manual tests
Move the existing “kitchen sink” test out of the way,
and rename it to “kitchensink”

Change-Id: I121260e640bb2810a94f8112fcea212e97055fb3
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2020-10-23 00:58:11 +02:00
Morten Johan Sørvig
007d207a8c qWaitFor: check predicate before sleeping
Return immediately if processing events caused the
predicate to become true.

This gives us a nice speedup on tests with call
qWaitForWindowExposed() or qWaitForWindowActive(),
for example tst_QGraphicsView::itemsInRect_cosmeticAdjust:

cocoa       1164ms -> 825ms   ~30% decrease
offscreen    296ms  -> 15ms   ~95% decrease

Change-Id: Ifbab0ca662c082e7dfb609d0cb4bc1161709067b
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2020-10-22 22:58:11 +00:00
Volker Hilsheimer
48758816db Fix documentation for QIterable and related classes
Correctly specify template parameters, fix typos, add \fn where missing,
explicitly specify scope in see-also references.

Change-Id: I8b04a2b76033b206098e816d1d07d105b838c260
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2020-10-23 00:58:11 +02:00
Volker Hilsheimer
a6327d7305 Fix documentation for hidden friend operators
At least for qdoc, hidden friends are class members.

Change-Id: I6eaa21565937cd49c0905ee47b8b82b0c1765bc1
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2020-10-23 00:58:11 +02:00
Tor Arne Vestbø
35e4740385 doc: Fix table bottom margin
It was way too small, and should match the margins
for other content such as paragraphs, so that an
inline table in between two paragraphs has a balanced
spacing.

Change-Id: I2adb434ac7773e9796199f40d5318368ca380aca
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2020-10-23 00:58:11 +02:00
Andrei Golubev
bfc6e2d69d Use parameter_type in QList methods
QList::parameter_type is defined and used to give better
performance e.g. for arithmetic types. Let's use it consistently
in QList API instead of const T &

Change-Id: I2e12bd83f55679b55a14fbb23ab6172a9cf7bbcc
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-10-22 20:47:10 +02:00
Joerg Bornemann
115ead8fe4 CMake: Remove superfluous del call in qt-configure-module.bat
We're ensuring its existence right in the next line.

Change-Id: If7a55511c9ef839a9f9ae70a7928b58ad768ae65
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-10-22 20:47:10 +02:00
Joerg Bornemann
da9e22f029 CMake: Fix running qt-configure-module without arguments
We need to make sure to create a config.opt file, even if it's empty.
This is the same fix we did for the .bat file in
dad9550305.

Change-Id: I79c507cfe0f9517d3033a773d3a5cf69eb13cfe6
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-10-22 20:47:10 +02:00
Joerg Bornemann
736408880b CMake: Do not prepend -l to libs starting with dash in prl files
For example, we must not prepend -l to -pthread, -framework and -lfoo.

Fixes: QTBUG-87760
Change-Id: Ie1bc7a76183c2c4980c519b5f23dde6c47ec85a9
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-10-22 20:47:10 +02:00
Joerg Bornemann
4b016c87c1 CMake: Advertise qt-configure-module in configure output
...instead of qt-cmake-private.
Also, add ".bat" on Windows.

Change-Id: I2aa94ac76f2dadfb8e94d68b19bb379b3d45a93d
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-10-22 20:47:10 +02:00
Joerg Bornemann
90e384d286 CMake: Fix CMake generator auto-selection on Windows
The variable to check for a Windows host system was mis-typed.

Change-Id: I25b14b80d25bfec0c1a00e99833520b6fb6a4b02
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2020-10-22 20:47:10 +02:00
Joerg Bornemann
4c0ca7dd26 Allow paths with backslashes in qt-configure-module.bat
Fixes: QTBUG-87730
Change-Id: I93172062ec8dfd86529491ffb031edbd2e24592a
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2020-10-22 20:47:09 +02:00
Liang Qi
88f3f33beb tests: blacklist tst_QGraphicsAnchorLayout::layoutDirection()
on Ubuntu 20.04

There is some issue with the glib event dispatcher.

Task-number: QTBUG-87728
Pick-to: 5.15
Change-Id: I4d64206898dd2c8356d5fc51a68c2e5759b38aac
Reviewed-by: Tony Sarajärvi <tony.sarajarvi@qt.io>
2020-10-22 18:06:19 +02:00
Liang Qi
93f19445a4 tests: blacklist tst_QMdiArea::tileSubWindows() on CentOS
Task-number: QTBUG-87768
Change-Id: Iad86e3114e546c0cab92f0fccdc7a265575a687e
Reviewed-by: Tony Sarajärvi <tony.sarajarvi@qt.io>
2020-10-22 18:06:19 +02:00
Alexandru Croitor
9a7de1abf5 CMake: Pad the configure summary string with one more dot
This makes the diff-ing of the config summary between qmake and CMake
builds correct.

Change-Id: I720b69572c23afd78e6d0bea6cdf0740980c3b36
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2020-10-22 18:06:19 +02:00
Joerg Bornemann
9ff9a54bfb CMake: Fix INPUT_* names with dashes
In configure.json files we have inputs with dashes, e.g.
bundlex-xcb-xinput. In configure.cmake files, these are read in their
normalized form, e.g. INPUT_bundled_xcb_xinput.

Normalize the input names in QtProcessConfigureArgs.cmake like we
already do for feature names.

Change-Id: Iece414d40a0e9e2920580f2fda68e25cd32674c9
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-10-22 18:06:19 +02:00
Andrei Golubev
e7d1a5ace5 Use American "canceled" in QPromise docs
Change-Id: I4c416f52c7102750a77c3f91274dd0a235569d6e
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2020-10-22 13:54:46 +02:00
Allan Sandfeld Jensen
b38d5fd8e4 Make QLatin1Char and QChar comparisons hidden friends
Reduces the ADL noise on missing comparisons errors.

Change-Id: I16a17d73504917feb25a94053bb54db0b083118b
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2020-10-22 13:54:46 +02:00
Andreas Buhr
373fdc9126 Add unit test for malformed RFC2822 dates
RFC2822 requires times to be in the format 'HH:mm' or 'HH:mm:ss'.
We did not have unit tests to check that malformed RFC2822
dates are rejected. This patch adds such unit tests for
truncated hours/minutes/seconds.

Change-Id: Id5b9390112e633e617722439ad59439e6aeba841
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-10-22 13:54:45 +02:00
Shawn Rutledge
0e5bbf3507 Make QEvent::setAccepted() virtual; set QEventPoints state the same
In Qt Quick, when we deliver an item-specific QTouchEvent that contains
only the subset of eventpoints that are inside the Item's bounds,
traditionally the Item can accept the event to tell the delivery logic
that the event is handled and doesn't need to be delivered further.
But an Item cannot be expected to have total scene awareness; so now,
the delivery is "done" only when all eventpoints in the original event
are accepted.  This behavior has been working well enough already due to
logic in QQuickWindow that iterates the points and accepts them if the
event is accepted; but it seems appropriate to move this enforcement
into QPointerEvent itself.  Making setAccepted() virtual gives us a
useful degree of freedom.

Event-handling code should alternatively use QEventPoint:setAccepted()
or QPointerEvent::setExclusiveGrabber() to take resonsibility for only
a subset of the touchpoints.

Another way to put it is that we treat QPointerEvent::setAccepted() as a
convenience method: accepting the QEventPoints is what counts (at least
in Qt Quick).

Change-Id: Icec42dc980f407bb5116f5c0852c051a4521105a
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2020-10-22 04:54:17 +00:00
Volker Hilsheimer
3310e13a17 Don't show QPushButton as hovered unless the mouse is within the bevel
Previous fixes made QPushButton correctly respect the style sheet boxing
model (as it's documented to do), ignoring clicks that were within the
margin area of the button (ie outside the bevel). However, a hover state
selector in the style sheet would still be used for the entire widget.

Turn on mouse tracking for widgets that have a hover state selector, and
handle mouseMoveEvent to set an explicit hovered state only when the mouse
hits the button. Use that state to initialize the style option.

Fixes: QTBUG-87706
Change-Id: I2f423b760c85cfab9faac4be44a5c7dcf2ba1c23
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2020-10-22 02:43:40 +02:00
Volker Hilsheimer
875a7fad52 Fix a bunch of compiler warnings in event handling test cases
Leave the normalizedPos warnings, there is no equivalent function.

Change-Id: I50c72ab24b4855e36941aafdee30cdb0e94c1684
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2020-10-22 02:43:26 +02:00
Volker Hilsheimer
34943a6f70 Turn warning about missing xcodebuild into notice
On a mac that can build all of Qt with CMake, Ninja, and command line tools,
there should be no warning just because a build tool that
won't get used is not available.

Turn the warning into an informative message instead so that IDE
integrations (such as VSCode's CMake integration) don't flag warnings.

Change-Id: I250c0e5dd0633b36ff2b690a52ba7ce3ceb22218
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2020-10-22 02:43:17 +02:00
Andreas Buhr
dd0647b17a Fix to make g++-10.2 happy
g++-10.2 fails to compile qregion.cpp in RelWithDebInfo configuration,
with error message:
qregion.cpp:3617:12: error: ‘ET.EdgeTable::ymax’ may be used
uninitialized in this function [-Werror=maybe-uninitialized]
g++ is right here, for Count==1, 'ET' is not initialized but used.
This patch fixes this by Q_ASSUMEing Count > 1.

Pick-to: 5.15
Change-Id: I3b9f1f58de9f3811c60640a08334487e3f8f2b23
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2020-10-22 01:23:46 +02:00
Giuseppe D'Angelo
5d4c0accc1 QList docs: fix signature of removeAll
Change-Id: Ic52b6d9ab4b250dc931c650c6def35c18803ba43
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2020-10-22 00:51:40 +02:00
Andreas Buhr
5872a89474 name our glib event sources to ease debugging
glib event sources can have a name, but it is not required.
Internal to glib, it is common to give them a name, see for example
https://git.io/JTZ8g .
This patch gives a name to each glib event source created in qtbase.

Task-number: QTBUG-84291
Change-Id: I4f04526dcec082242312e3a66da2adf37a22e626
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2020-10-22 00:51:26 +02:00
Allan Sandfeld Jensen
ff776a3059 Whitespace cleanup in corelib/global
Change-Id: I087d7d949cfd43e48e8a008621a4eeaa9d104ceb
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-10-21 21:15:17 +02:00
Tor Arne Vestbø
33617c03a4 cmake: Sync FbSupport module name with pro file
Change-Id: I5374618a34811d516eb8fd12c1429b851fd108c4
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-10-21 17:56:48 +02:00
Andrei Golubev
a17e05bf20 Fix strange capacity check in tst_QString::append_special_cases
We cannot rely on "QString a; a.insert(0, u'A');" to give
a.capacity() >= 3, this is clearly an implementation detail. Changed
the check to a meaningful one

Task-number: QTBUG-87416
Change-Id: I2e017c1292d360e32b85b903361027485c08ea74
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-10-21 17:56:48 +02:00
Edward Welbourne
e69b81101c Fix locale look-up when language is unspecified
Looking up a locale with unspecified language got the C locale, due to
taking a short-cut that would make sense if no locale were found for a
specified language. Stop assuming the language was specified.

Task-number: QTBUG-74287
Pick-to: 5.15 5.12
Change-Id: I8b3c232da584fb187ebb6c190729c377d0083808
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2020-10-21 17:56:48 +02:00
Helio Chissini de Castro
c67ea659e5 Fix compilation when using -no-mimetype-database
Change-Id: I4f706a26d73f61e4a6022338e0fc0be48627e4a1
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: David Faure <david.faure@kdab.com>
2020-10-21 13:26:20 +00:00
Allan Sandfeld Jensen
f7f1a71ea4 Make QPoint*, QSize*, and QRect* binary operators hidden friends
Moves them to class scope, which will avoid them showing up as
possibilities in error messages for missing operators.

Also consolidates how they are compared, so QRectF and QSizeF act
similar to QPointF.

Change-Id: I1e12cb7e5a5c65e85c32281878da03c6136c17de
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2020-10-21 10:52:39 +00:00
Stanislav Yelenskiy
b39b018f4a QTabBar: update index of last visible tab in insertTab
Index of the last visible tab was not updated, if a new tab was inserted
after the current tab and before the last tab.

When the new tab is inserted before the last visible tab, the index of
the last tab increments by one.
When the new tab is inserted after the last visible tab, then the newly
inserted tab becomes the last visible.

Fixes: QTBUG-86898
Change-Id: I2f4b7f705261ec35a5aa7b883ecdddba25f007b7
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2020-10-21 07:19:36 +00:00
Stanislav Yelenskiy
9f9275f82f QTabBar test: refactor: extract checkPositions helper function
Extract checkPositions helper function to re-use in the new test.


Task-number: QTBUG-86898
Change-Id: I5c8241b5701cd8c8c3e21607c385217d4b75e728
Reviewed-by: Jordi Pujol Foyo <jordi@vikingsoftware.com>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
2020-10-21 07:18:28 +00:00
Piotr Mikolajczyk
a02ea26b46 [Android] Make sure expose events are emitted after window resize
Expose event would not be sent when window was resized

Fixes: QTBUG-69155
Pick-to: 5.15
Change-Id: I81bf2d54f830a0dabf15398e1f25b55ff7ff4479
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Rami Potinkara <rami.potinkara@qt.io>
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
Reviewed-by: Heikki Halmet <heikki.halmet@qt.io>
2020-10-21 07:08:54 +00:00
Allan Sandfeld Jensen
1be271713e Whitespace cleanup in corelib/ mimetypes, plugin and thread
Done with selective application of clang-format

Change-Id: Iee6bf2426de81356b6d480629ba972f980b6d93d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-10-21 08:53:38 +02:00
Jan Grulich
3e09ac369d OpenFile portal: use "writable" option to specify our FD is writable
When using OpenFile portal and passing a file descriptor, we open the
file with qt_safe_open() which by defaults make the file descriptor
writable. However we didn't specify in options that the FD is writable
which leads into rejection on xdg-desktop-portal side as there is a
mismatch between writable FD and read-only request.

Pick-to: 5.15
Change-Id: I7a430339a9615f0a054e777e0f3de56e219d1706
Reviewed-by: Aleix Pol Gonzalez <aleixpol@kde.org>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-10-21 08:38:15 +02:00