Commit Graph

7999 Commits

Author SHA1 Message Date
Ulf Hermann
e0b5ff4ad5 QWidgetWindow: Immediately forward close events to QWindow
This way the platform window is destroyed in a timely manner, preventing
redundant close events from the window system.

Task-number: QTBUG-43344
Change-Id: Ifdfca59ceacef54405f1c227c493dc514a1b27ea
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2018-04-27 07:00:13 +00:00
Kari Oikarinen
e69b6d2dbc tst_Gestures: Use QTest::qWaitForWindowExposed()
Instead of a local wrapper for it.

Change-Id: I0708dfad44b3db0c7a13e75ba5b4193ab50ac315
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
2018-04-27 06:20:48 +00:00
Kari Oikarinen
0cb940b1d3 tests/auto/widgets/widgets: Avoid unconditional qWait()s
Task-number: QTBUG-63992
Change-Id: I7b0c259800082284ddae4e25d139ad3adc858467
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
2018-04-25 11:55:34 +00:00
Kari Oikarinen
73031ebb99 tests/auto/widgets/{effects,styles}: Avoid unconditional qWait()s
Task-number: QTBUG-63992
Change-Id: I1af537bae705d4627880c5ae50669b1ef72562f2
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2018-04-25 05:47:01 +00:00
Johan Klokkhammer Helsing
8ac0e6592b Skip flaky tst_QWindow::childWindowPositioning on Wayland
Sometimes causes protocol errors (i.e. termination) on Wayland with xdg-shell
v6.

Task-number: QTBUG-67648
Change-Id: I6c855affb145590f47a425d233c5fd6b7e1e8914
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@liri.io>
2018-04-25 04:51:34 +00:00
Allan Sandfeld Jensen
e413874467 Fix division by zero in radial gradiants with NEON
The NEON implementation uses rsqrt and thus can not be taken on 0, so
replace the minimum with something close to zero instead of zero.

Task-number: QTBUG-59961
Change-Id: Ia39e45be675b056c1e22900495ce9ba4e8b70e5f
Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
2018-04-24 18:16:54 +00:00
Thiago Macieira
309dacedac Atomics: remove requirement for alignment equality with plain types
This was originally added so that you could replace a T with
QAtomicInteger<T> in the same class and still keep ABI. However, for
legacy reasons, on 32-bit x86, types larger than 4 bytes keep an old
1990s alignment of only 4 bytes, but modern std::atomic<T> for those 8-
byte types enforces an alignment of 8 bytes. Therefore, the requirement
to keep alignment is not possible to guarantee.

In other words: you may not replace T with QAtomicInteger<T> or
std::atomic<T> and assume no ABI breakages in all platforms.

This is a requirement to implement atomicity. An 8-byte type aligned to
only a 4-byte boundary could cross a 16-byte boundary or, worse, cross a
cacheline boundary. Crossing the 16-byte boundary could be bad on some
processors, but crossing the cacheline boundary (addresses ending in
0x3C, 0x7C, 0xCC and 0xFC, or 4 out of 64 possible addresses or 6.25%)
is always bad: the CPUs cannot guarantee an atomic load or store
operation.

See also <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71660>.

Task-number: QTBUG-67858
Change-Id: If90a92b041d3442fa0a4fffd15283e4615474582
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
2018-04-24 17:36:42 +00:00
Kari Oikarinen
15ada2b917 tests/auto/widgets/kernel: Avoid unconditional qWait()s
Task-number: QTBUG-63992
Change-Id: Icb32b516002c3bb2841c8e7a29624e54cfcbbcac
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
2018-04-24 05:01:57 +00:00
Kari Oikarinen
12559058b0 tst_QFile: Don't expect Windows HANDLE equality in nativeHandleLeaks()
That check is flaky on Windows. It doesn't seem to be testing Qt functionality.
I also don't see CreateFile2() documentation mentioning any guarantees that
opening the same file twice would give the same HANDLE each time.

Change-Id: Ica2e60571ae9fc39bf822803a2a9dd6add8323d7
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2018-04-23 12:45:32 +00:00
Andy Shaw
7c532891e0 Send ShortcutOverride event when receiving a non-spontaneous key press
When a key press is received which is not spontaneous then it needs to
be manually sent as a shortcut override event to ensure that any
matching shortcut is triggered first. This enables emulation/playback
of recorded events to still have the same effect.

[ChangeLog][QtWidgets] Sending a key press event with sendEvent() now
sends a ShortCutOverride event first to the widget to trigger any
shortcuts set first.

Task-number: QTBUG-48325
Change-Id: Iafcc2cdb1773bffe89edaeb0abc44cd5a51088e6
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2018-04-20 10:18:49 +00:00
Kari Oikarinen
c6ee1899ea Blacklist tst_QWindow::isActive on Ubuntu
Task-number: QTBUG-67768
Change-Id: Ie1e0b406c152c854ef3629fa4d469dd73452f128
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
2018-04-18 13:23:18 +00:00
Oliver Wolff
215e0f35d0 tst_qdir: Fix absoluteFilePath for winrt
The drive has to be defined for every Windows configuration (also
including winrt).

Change-Id: I94a3131b8aec20cda97dc78f55b1d87aa10240e4
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
2018-04-16 05:23:17 +00:00
Kari Oikarinen
0dd3e02aac tests/auto/widgets/util: Avoid unconditional qWait()s
Task-number: QTBUG-63992
Change-Id: I795e564b051bbabd1fc2d2fca8171da6072f99eb
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
2018-04-13 12:32:52 +00:00
Kari Oikarinen
66cc08961f tst_QWidget: Avoid unconditional qWait()s
Task-number: QTBUG-63992
Change-Id: I1696ccbdf0523ece694f2dac52c015443c8b19fb
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
2018-04-13 05:43:45 +00:00
Eirik Aavitsland
7f782e1fc4 Fix crash if QPixmap::defaultDepth() is called when no QGuiApplication
This static method can be called before QGuiApplication is created. At
that point there is yet no primary screen, so the implementation
needs to guard against dereferencing a nullptr.

Task-number: QTBUG-67309
Change-Id: I6b7b9e97b1c3c79bf2f9c6d6247c3b10f39f7a55
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2018-04-12 21:22:20 +00:00
Alex Trotsenko
e8733ffc51 QWindowsPipeReader: fix waiting on inactive pipe
To read data from a named pipe, QWindowsPipeReader uses the ReadFileEx()
function which runs asynchronously. When reading is completed and the
thread is in an alertable wait state, the notified() callback is called
by the system, reporting a completion status of that operation. Then the
callback queues a readyRead signal and starts a new sequence. The latter
is skipped if the pipe is broken or the read buffer is full.

Thus, if an application does not run the event loop, the next call to
QWindowsPipeReader::waitForReadyRead() should emit the queued signal
and report true to the caller even if no new read operation was started.

Change-Id: I37102dbb1c00191d93365bfc2e94e743d9f3962a
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2018-04-12 18:08:29 +00:00
Timur Pocheptsov
9917eb2ec6 HTTP/2 - reset uploadByteDevice if necessary
1. If a request was redirected or some error was encountered, we
   try to reset the uploading byte-device.
2. Disconnecting from the byte-device is not enough, since we have a
   queued connection, _q_uploadDataReadyRead() gets called even if
   byte-device was deleted and thus sender() can return null -
   we have to check this condition.
3. Update auto-test with a case where our server immediately
   replies with a redirect status code.

Task-number: QTBUG-67469
Task-number: QTBUG-66913
Change-Id: I9b364cf3dee1717940ddbe50cba37c3398cc9c95
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2018-04-12 14:02:20 +00:00
Kari Oikarinen
a88063008d Blacklist tst_QItemDelegate::comboBox on openSUSE
This failed (occasionally) in finding the editor widget, so wait for the window
to be shown properly. Also enter the event loop with QTRY_VERIFY and not for a
fixed time of 1 s.

This however just moved the point of failure. Now the test fails since the
clearing and setting of focus does not dismiss the editor widget sometimes, so
still blacklist it.

Task-number: QTBUG-67282
Task-number: QTBUG-66216
Change-Id: Iec598609fce23a25d7b955082d0973685d612715
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
2018-04-12 12:48:12 +00:00
Kari Oikarinen
b096982899 Don't mark tst_QFiledialog as insignificant_test
Change-Id: Id3fef4e66bd8f96c8f87dd94bbca216cc65f8489
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2018-04-12 12:21:55 +00:00
Kari Oikarinen
350a64196f tests/auto/dbus: Avoid unconditional qWait()s
Use QTRY_COMPARE instead of a wait followed by QCOMPARE. Unless the condition
doesn't change and the wait provides the opportunity for things to go wrong.

Task-number: QTBUG-63992
Change-Id: I13474a45f1f4df9d77a418729a5748235ae0dd1a
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
2018-04-12 05:49:07 +00:00
Gabriel de Dietrich
91fa300cbe QMacStyle: CC_ComboBox is now HITheme-free
For the time being, no more stretched QComboBox. They
were already looking bad before and nobody complained,
so it's a non-issue. In the future, we might use square
combo boxes in the same way as we do for push buttons
but for non-editable QComboBox only.

Removes what is now dead code, including some leftovers.

tst_QMacStyle updated to reflect size changes to accom-
modate the focus ring.

Change-Id: I60fac86b9acb52cc96373bca0b3cad598ec4f1e7
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2018-04-12 00:20:42 +00:00
Timur Pocheptsov
e3cea2a7b9 QSslSocket (OpenSSL 1.1) - respect requested protocol version
Properly handle single protocol TLS configurations. Previously,
due to the use of generic (non version-specific) client/server method
they worked as ranges of protocols instead. This also fixes a couple
of previously broken tests.

Task-number: QTBUG-67584
Change-Id: Ied23113a4fab6b407a34c953e3bd33eab153bb67
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2018-04-11 12:10:01 +00:00
Kari Oikarinen
edef007137 tests/auto/gui/kernel: Use QTRY_VERIFY instead of manual wait loops
This reduces the timeout from 10 seconds to the default 5, but the tested events
(resize events, painting) seem like something that should happen in 5 seconds.

Change-Id: I1d12372f37264bf7be64096e43813cd03f567102
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2018-04-11 06:11:27 +00:00
Kari Oikarinen
b318c14bd5 Stabilize tst_QWidget_window::setWindowState
Bumping the timeout removed flaky failures in an RHEL debug VM.

Task-number: QTBUG-67151
Task-number: QTBUG-66216
Change-Id: I2fde636149f5104a41b757df956d84edc420e7c7
Reviewed-by: Sami Nurmenniemi <sami.nurmenniemi@qt.io>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2018-04-11 06:07:26 +00:00
Kari Oikarinen
8c3475c190 tst_QGL: Use qWaitForWindowExposed()
Instead of an unconditional wait.

Change-Id: I360cd665c10c3fd4f936c95ef04957ae1c49c0de
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
2018-04-11 06:05:46 +00:00
Juan Jose Casafranca
95c8f24b71 Enable BuiltIn input in the shader graph builder
BuiltIn inputs shouldnt be translated into a code input. We comment the
input line for this variables

Change-Id: I3b7d2fd06afc6a122d90a999fc5a5246fc93234e
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
2018-04-10 23:49:37 +00:00
Kari Oikarinen
32d9cf7310 Fix tst_QFiledialog::completer
The test was failing because the files it expected to create were not actually
visible on the disk.

This was because 189e9c93d7 made QTemporaryFile
use unnamed files if the file name is not actually requested. Fix by forcing the
temporary file to be made with the requested name.

CI has not caught this because the test executable is marked insignificant_test
on Linux.

Change-Id: Ibe0244fdfcc66acf3be4314da51b4c0b3b520b71
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2018-04-10 08:33:15 +00:00
Kari Oikarinen
3e2c930242 tst_QEventLoop: Remove unconditional qWait()
Task-number: QTBUG-63992
Change-Id: I9d9e3966252f01cded489313561641e1c0292b91
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
2018-04-10 08:32:21 +00:00
Mårten Nordheim
5c4e5032b5 Unblacklist qsslkey for Linux
Except RHEL-6.6 and 7.4

It was blacklisted in f3939d943e, along
with a lot of other entries. No specifics are known about why it was
blacklisted originally, but now it only fails on RHEL because they
use OpenSSL 1.0.1.

Change-Id: I6d1d1b7b7bf5386b2115b8780163550cf03bbad7
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2018-04-09 09:34:50 +00:00
Johan Klokkhammer Helsing
1b109dbd91 tst_QClipboard: Skip on Wayland, as it requires real input events
On Wayland, manipulating the clipboard requires an input event serial, which is
not possible to get unless the compositor sends us input events.

Change-Id: If5231a5db85f8d6ad988ea93f240cee0c3466f9f
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2018-04-09 07:12:29 +00:00
Johan Klokkhammer Helsing
b451c9dfdc tst_QTouchEvent: Wait for window exposed instead of active
This makes the tests pass on Wayland compositors that don't automatically give
focus to newly created windows. Such as a headless Weston, which is very useful
for testing.

Task-number: QTBUG-66846
Change-Id: I502504b333499c89be193a3ebc19d41264a13580
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
2018-04-09 07:11:47 +00:00
Kai Koehne
335754d0a3 Fix license header for tst_toolingsupport.cpp
Change-Id: Id355afc8eb57a40a0f8d06fa2920f03d94ef9337
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2018-04-09 06:37:01 +00:00
Kari Oikarinen
b49a2e671a tst_QPrinter: Use qWaitForWindowActive() to wait for dialog
Instead of an unconditional wait.

The QSKIP is necessary because the PDF format is non-native and the Windows
implementation of QPrintDialog doesn't work then.

The macOS implementation has the same warning, so add the check for that OS
as well.

The test has previously passed, since it hasn't seen not actually opening the
dialog as an issue.

Change-Id: Ib53e378b232580358f13e0c5206404412f9e6ee2
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2018-04-09 05:59:39 +00:00
Edward Welbourne
28c9ad199c Revise dates of Pacific/Kiritimati's day-skip transition
The TZ database has recently revised its ccount of when they skipped a
day to cross the international date line, from skipping Jan 1st 1995
to skipping December 31st 1994.  So Move the before-days check to
December 30th; and correct the Feb 2nd that was meant to be Jan 2nd
(and does need to remain so, for compatibility with systems with out
of date data).

Task-number: QTBUG-67497
Change-Id: I5b9483c553205817f995f91793662a5a85e03192
Reviewed-by: Liang Qi <liang.qi@qt.io>
2018-04-06 18:05:04 +00:00
Andy Shaw
ec23d96c86 oci: Use OCIBindByPos2 to accommodate data longer than USHRT_MAX
OCIBindByPos2 is only needed when using execBatch(), binding data that
is longer than USHRT_MAX works for exec() so this is left unchanged.

Change-Id: Ifdcf91939d184f225d24c13052ea0b81611ecf91
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2018-04-06 12:44:37 +00:00
Kari Oikarinen
fd87c8da82 tests/auto/other: Avoid unconditional qWait()s
There is no need to qWait() before a QTRY_VERIFY. qWait() will also
intermittently handle events while waiting, so calling it in a loop isn't
necessary.

Change-Id: Ica7fbf18c03e673213dd9b72f31f71937cdcb145
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2018-04-06 07:19:19 +00:00
David Faure
a1b1dd3b84 QMimeDatabase: fix assert when fetching data for invalid mimetype
The Q_ASSERT(mimePrivate.fromCache) at qmimedatabase.cpp:218
which I added in commit 7a5644d648, was being triggered when calling comment()
for invalid mimetypes such as db.mimeTypeForName("").

Change-Id: I8037041a4b435d2a5ba24ec94b7858e38b2f0bf2
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-04-06 07:19:01 +00:00
David Faure
e729ac6dc5 QSqlDatabase: Skip confusing thread warning on invalid QSqlDatabase
If the db isn't valid, then that's the actual issue, not the fact that we're
getting the same invalid db (with the same driver QSqlNullDriver) in
multiple threads.

Change-Id: I95490818ed78e741c3823e115f139c2cff01b0b1
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2018-04-06 07:18:03 +00:00
Kari Oikarinen
b32d16d468 tst_QLocale: Avoid manual deletes
Also use data-driven test to reduce duplication.

Change-Id: I9516e52267cb3c7b239030fd73dbbf23ac8f52f7
Reviewed-by: Sami Nurmenniemi <sami.nurmenniemi@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-04-06 05:44:50 +00:00
Edward Welbourne
3c8181de70 Kludge QLocale test order to fix fall-out from setDefault()
This makes an irreversible global change: tests that do it will mess
with other tests.  So make sure they're all last.  This required
splitting up one test; and revealed another that secretly depended on
being run with C as default locale.

Task-number: QTBUG-67276
Change-Id: Ic24ef48b2c9bd5c37c1f11260b437628019624ca
Reviewed-by: Kari Oikarinen <kari.oikarinen@qt.io>
2018-04-05 19:56:47 +00:00
Friedemann Kleint
f2fd5f390c tst_QCursor::equality(): Silence warnings
Silence numerous warnings:
QCursor: Cannot create bitmap cursor; invalid bitmap(s)

Amends 6445aa4b06.

Change-Id: I7b467cdeeaa7a854c2878cf1ed2a6113d8c96059
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
2018-04-05 09:00:39 +00:00
Kai Koehne
50d301cfdd Hide global qtlogging.ini from autotest
Do not let a global qtlogging.ini interfere with an autotest.
This works around an issue on Ubuntu 17.10

Task-number: QTBUG-67385
Change-Id: I0d02835eb7a561b43fe0b98f4383c170c6d51303
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Joni Jäntti <joni.jantti@qt.io>
2018-04-05 05:40:07 +00:00
Allan Sandfeld Jensen
559964849a Add lancelot based benchmark
Uses the scripts and tests we already have for lancelot as a painting
benchmark.

Change-Id: Idf8a55e2261162e619f6dbb567dc19f8dc96da4e
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2018-04-04 08:17:43 +00:00
Kari Oikarinen
3e1ecdd74c tst_QStateMachine: Don't use unconditional waits
Instead use QSignalSpy to wait directly for the expected events.

Change-Id: I319302ea7177fe690b5d885347c505454904518e
Reviewed-by: Sami Nurmenniemi <sami.nurmenniemi@qt.io>
Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
2018-04-04 07:07:40 +00:00
Kari Oikarinen
d31a68146d Narrow tst_QDnsLookup::lookup blacklist to only CI
It is suspected that the fault actually lies in CI infra.

Amends e3cf2a1ae9.

Task-number: QTBUG-66311
Change-Id: I967da283f0b94be1d0b99481d0cbd15ca7f98d45
Reviewed-by: Sami Nurmenniemi <sami.nurmenniemi@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-04-04 05:05:51 +00:00
Kari Oikarinen
c7dac6469c tst_QThread: Use QTRY_VERIFY instead of qWaits
These two places were sort of manually implementing QTRY_VERIFY except that they
never time out.

Change-Id: I136e6c7400194327c0475c6acfc019825ccec1b5
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Reviewed-by: Sami Nurmenniemi <sami.nurmenniemi@qt.io>
2018-04-03 10:20:36 +00:00
Kari Oikarinen
231ac1b878 tst_QFutureWatcher: Avoid unconditional qWait()s
Use QSignalSpy::wait or QTRY_VERIFY instead. This shaved off ~200 ms of the
running time of the test and is more reliable.

Some unconditional qWait()s still remain in this test. They are giving an
opportunity for the wrong thing to happen and thus are not waiting for any
specific condition to be fulfilled.

Task-number: QTBUG-63992
Change-Id: I25a4470fe8d6a5b8b5039b3ed77321d24faa1707
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Reviewed-by: Sami Nurmenniemi <sami.nurmenniemi@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2018-04-03 10:20:27 +00:00
Friedemann Kleint
f3a461c4a2 Stabilize tst_QGraphicsProxyWidget::tooltip_basic()
Use QTRY_VERIFY instead of hard-coded wait for the tooltip to appear.
Also use QTRY_VERIFY to verify that no top level widgets are left over
to account for tooltips and effect windows.

Change-Id: Ia9835fdc480c6abb034f6fc4ad3d6b32751ee536
Reviewed-by: Sami Nurmenniemi <sami.nurmenniemi@qt.io>
Reviewed-by: Kari Oikarinen <kari.oikarinen@qt.io>
2018-03-29 20:50:00 +00:00
Oswald Buddenhagen
e5d909d6d6 qmake: make VFS aware of exact vs. cumulative evaluation
sync-up with qt-creator; no effect on qmake.

comment on cherry-pick: this is actually a lot more than a cherry-pick,
because the dual VFS needs to deal with the file ids which were
concurrently introduced on the qmake side.

Change-Id: I2c1eb16c97526fa275a1c6a2eae9266d385859ac
(cherry picked from qtcreator/424639ecac9d2e404d2bfaff7f46b45ed98664b8)
(cherry picked from qtcreator/a8010b0fff47d903d4a1f80e3adb1a2ef41beb33)
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2018-03-29 18:15:10 +00:00
Oswald Buddenhagen
e2de837198 qmake: let QMakeVfs::readFile() report ENOFILE explicitly
when the QFile object is already constructed, querying whether the file
exists is actually cheap, so do it right away instead of later on
demand. that makes the calling code a bit cleaner.

fwiw, that we need to explicitly query the file's existence at all is a
result of QFile's completely useless error "codes" (which merely say
which function failed, as if the caller would not know).

Change-Id: Ifec39d05b1713d8128046f679287e510f10e45dc
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
(cherry picked from qtcreator/5ba32e3484ead2e35cc7732dcd59a97e7459dbfd)
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2018-03-29 18:14:58 +00:00