Commit Graph

31073 Commits

Author SHA1 Message Date
Marc Mutz
8f7776df5e QGuiVariant: fix unintended fall-through
Found by GCC 7.

Change-Id: I8a9cca5236f077335031afc90b2683a2846d3b79
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2017-03-22 09:42:35 +00:00
Thiago Macieira
cd58abb1db Autotest: make tst_QDir more reliable on tests being run out of order
mkdir(data2) depended on mkdir(data1) being run before, or it would
fail. In addition, the rmdir() test required the equivalent mkdir() test
being run before. So drop these annoying dependencies and make the tests
cleaner by having clear separation of the test data and merging the two
tests into one

The entryList() test still depends on the testdir being clean: it will
fail if mkdirRmdir() previously failed.

Change-Id: Iaddbecfbba5441c8b2e4fffd14a3e35972d2a3d8
Reviewed-by: David Faure <david.faure@kdab.com>
2017-03-22 06:40:59 +00:00
Thiago Macieira
524f39db89 gtk3: Fix use of dangling pointers
QString::toUtf8() returns QByteArray, which got implicitly converted to
C strings and promptly deleted. Instead, return the QByteArray to the
caller.

Found by ASAN:
==13935==ERROR: AddressSanitizer: heap-use-after-free on address 0x6060000dffb8 at pc 0x7f764f27320b bp 0x7ffd49b11bb0 sp 0x7ffd49b11358
READ of size 7 at 0x6060000dffb8 thread T0
    #1 0x7f7649d174e2 in g_strdup (/lib/x86_64-linux-gnu/libglib-2.0.so.0+0x684e2)
    #2 0x7f763f7abe5b  (/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0+0x39e5b)
    #3 0x7f763f78915a in g_object_new_valist (/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0+0x1715a)
    #4 0x7f763f789520 in g_object_new (/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0+0x17520)
    #5 0x7f7640f6bcb0 in gtk_dialog_add_button (/usr/lib/x86_64-linux-gnu/libgtk-3.so.0+0x186cb0)
    #6 0x7f7640f8d2c9 in gtk_file_chooser_dialog_new (/usr/lib/x86_64-linux-gnu/libgtk-3.so.0+0x1a82c9)
    #7 0x7f7641727281  (/opt/Qt5.8.0/5.8/gcc_64/plugins/platformthemes/libqgtk3.so+0x13281)

Task-number: QTBUG-59611
Change-Id: I37cc967e689f4523b504fffd14adbf944b53b754
Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
2017-03-22 06:40:47 +00:00
Marc Mutz
26bc4ac5cb QToolBox: fix potential UB (invalid cast) in Private::_q_widgetDestroyed()
Don't cast an expiring QObject down to QWidget. Cast the QWidgets stored
internally up to QObject to perform the comparison. The result is the
same, but no invalid casts are possible anymore.

Found by independent review.

Change-Id: Iffa8a66cf5cab0270961befe982637ac8e4f0f7b
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2017-03-21 14:30:31 +00:00
David Faure
05924ddff9 tst_qurl: skip test with ':' in filename, on Windows
Task-number: QTBUG-59622
Change-Id: Ib4b458b5d0fc2dd9ea6758b8517a953f6d768a39
Reviewed-by: Liang Qi <liang.qi@qt.io>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2017-03-21 13:15:53 +00:00
Thiago Macieira
99fc96fd37 QMetaType & QVariant: "load" and "save" std::nullptr_t
We don't load and save pointers usually because the pointer value cannot
be guaranteed to remain across program invocations. However, nullptr is
an exception: a null pointer is always a null pointer.

We don't actually have to read or write anything: there's only one value
possible for a std::nullptr_t and it is nullptr.

[ChangeLog][Important Behavior Changes] A QVariant containing a
std::nullptr_t is now streamable to/from QDataStream.

Task-number: QTBUG-59391
Change-Id: Iae839f6a131a4f0784bffffd14aa374f6475d283
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2017-03-20 21:53:32 +00:00
Thiago Macieira
3548cdedb6 qmake: Add _CRT_SECURE_NO_WARNINGS to all MSVC-like compilers
The warning comes from the MS headers, not from the compiler.

Task-number: QTBUG-59576
Change-Id: Ie67d35dff21147e99ad9fffd14acd7fb628fa1d4
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-03-20 19:31:40 +00:00
Tony Sarajärvi
bd6838d54d Blacklist tst_QPauseAnimation::multipleSequentialGroups on all macOS
Task-number: QTBUG-59218
Change-Id: Ic839a36af1ecab39da0c3394c34181b6717e24e2
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2017-03-20 16:53:16 +00:00
David Faure
035e0eafa6 QUrl::fromUserInput: fix handling of files with a ':' in the name
QUrl::isRelative(str) would be false for such files, so first check for
file existence before doing any URL parsing.

Change-Id: I51b6229251ad94877ac408b2f8018456d3e10a36
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-03-20 12:55:36 +00:00
Eskil Abrahamsen Blomfeldt
391e3aeef4 Fix char format of preedit text in empty text block
When a text block is empty, and we are adding preedit text to it,
we need to merge the format of the preedit text with the current
format of the cursor, otherwise we will use a default format and
then suddenly switch to the proper one when the text is committed.

The reason this becomes a bit complex is that there are no rules
preventing someone from using several ime attributes to specify
formats for isolated parts of the text, and no rules defining the
order of such attributes. So even if the common case is one
text format attribute for the entire string, we need to make sure
we also handle the other cases gracefully, e.g. when we are setting
different formats for different substrings and then providing these
out of order. To make sure we have these corner cases covered, we
also add a set of autotests.

[ChangeLog][Qt Widgets][TextEdit] Fixed initial char format of
input method text as it is in pre-edit mode.

Task-number: QTBUG-59196
Change-Id: I1e37928e3bd1395fec1b5591908d4c69b84eb618
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2017-03-20 10:10:26 +00:00
Michael Jabbour
ac74abdf50 PostgreSQL: fix datetime format when system locale doesn't use arabic numerals
psql driver was previously using QDateTime::toString() function which is locale-depndent.

Task-number: QTBUG-59524
Change-Id: I7f50f95b5c82e66476abfee24ad28b78b3257041
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-03-18 19:37:35 +00:00
Marc Mutz
5c724a6087 QChar: fix ambiguous comparisons with 0, '\0', ... for good
Commit e0ea0f6178 optimized QChar <->
QString(Ref) comparisons by adding more overloads to avoid creating
QStrings from QChars just to compare them.

But these new overloads made existing comparisons to QChar ambiguous.
This was known at the time for QChar/int comparisons.

It has since turned out that also comparing to '\0' is ambiguous,
ie. not comparing to int or char per se is ambiguous, but comparing to
nullptr constants is, because QString(const char*) is just as good a
candidate as QChar(char)/QChar(int).

Since we allow QString/QChar comparisons, it seems logical to solve
the problem by adding QChar<->nullptr overloads.

[ChangeLog][QtCore][QChar] Disambiguated comparisons with nullptr
constants such as '\0', which 5.8.0 broke. As a consequence,
QChar<->int comparisons are no longer deprecated, as this was a failed
attempt at fixing the ambiguity.

Change-Id: I680dd509c2286e96894e13078899dbe3b2dd83bc
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-03-17 20:28:32 +00:00
Thiago Macieira
4ee7425794 Work around Linux libc overflow in mmap64
The mmap64 functions in all Linux libc fail to properly check that the
value fits in the system call parameter. I guess the developers just
said "16 PB are enough for everyone"...

Change-Id: Ic39b2c4fd9c84522a8fafffd14ac91567ce09c09
Reviewed-by: Sami Nurmenniemi <sami.nurmenniemi@qt.io>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2017-03-17 20:24:57 +00:00
Thiago Macieira
cdaea16964 Protect better against timer ID replacement
Timer IDs have been reused since Qt 4.5 or thereabouts, so just checking
if the timer ID is in the timer dictionary is an incorrect check: our
timer may have been deleted and replaced by another with the same ID.

Instead of deleting the WinTimerInfo object, let's just mark it as
unregistered by setting timerId to -1 and cooperate in deleting at the
appropriate places. Since unregisterTimer skips deleting if inTimerEvent
is true, the appropriate places are everywhere that set inTimerEvent to
true.

Change-Id: I057e93314e41372ae7a5ff93c467767c8a6d92ea
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2017-03-17 20:24:04 +00:00
Marc Mutz
1b73d13975 tst_QMimeDatabase: increase update-mime-database timeout to 4mins
in the vain hope to get the CI unstuck again.

Change-Id: I1b01bb1d59a8850f68d1d80838f5606f4159bcbd
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
2017-03-17 20:08:56 +00:00
Daiwei Li
dfb6850b91 Android: Bearer jar shouldn't be a dependency if disabled
Task-number: QTBUG-59264
Change-Id: I960d5bff902b06ca5dda447fd60002a756a11e51
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2017-03-17 19:25:43 +00:00
Peter Seiderer
e9a7739e77 eglfs: fix x11 header related compile failure
Add egl config and QT_EGL_NO_X11 define (as all other eglfs project
files do).

Task-number: QTBUG-59427
Change-Id: Ifbb11eae0fdf0e58c0b7feecb9a7914a889c8f77
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2017-03-17 11:43:46 +00:00
Thiago Macieira
f418d1b26a Remove a Q_GLOBAL_STATIC with QMutex in favor of QBasicAtomicInt
Much simpler, no memory allocation, no locking.

Change-Id: Iae839f6a131a4f0784bffffd14a9e70c7b62d9a7
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2017-03-17 06:10:16 +00:00
Konstantin Ritt
b21069d6fa Android: Fix Accessibility items positioning with QHighDpi enabled
the View's position and metrics are in pixels, not points

Change-Id: I285d5378db98187f54019bff9b8a1cde05dc3b35
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
2017-03-16 20:05:34 +00:00
Olivier Goffart
5cda0172e0 Fix crash in QWindowPrivate::applyCursor when screen is null
QWindow::setVisible calls QWindowPrivate::applyCursor without checking
if screen() returns null. This patch adds a check in QWindowPrivate::applyCursor
that the screen is not null. Now that it is tested there, no need to test
it from the other caller (setCursor)
This patch should not change behavior of setCursor at all, it should only
fix the crash when coming from setVisible

Task-number: QTBUG-59528
Change-Id: I06bbdb4e04c02ac840ba637242d1f2cfde5bdd62
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2017-03-16 18:03:24 +00:00
Marc Mutz
e364384d9f QChar: fix docs of (uchar) ctor
The constructor is not only disabled under QT_NO_CAST_FROM_ASCII,
but also under QT_RESTRICTED_CAST_FROM_ASCII.

Change-Id: I7bbaf2891913d5256dff7f80c49075ea3326155a
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-03-16 07:53:25 +00:00
Gatis Paeglis
c75e3f70b4 xcb: cleanup QXcbWindow::relayFocusToModalWindow()
- recursion is not needed for walking up the parent chain;
- use camel-case, modal_window -> modalWindow;

Change-Id: I4b7697f2388fd16f11be67ba475bd63ad249d89e
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2017-03-14 11:41:32 +00:00
Dan Cape
4f324d4655 Fix item keeping hover highlight even when mouse has left it
Made change to clear the hover index when the mouse leaves the widget.
This will ensure the component does not think the item still has the
mouse over it.

Task-number: QTBUG-46785
Change-Id: I34b7f0e171e9cf07ca23150af1b0e6e59a10a58a
Reviewed-by: David Faure <david.faure@kdab.com>
2017-03-13 15:47:10 +00:00
Samuli Piippo
edf0be818c Use lowercase name for iphlpapi library
Cross-compilation on linux with mingw-w64 failed, since it provides
all libraries in lowercase name.

Change-Id: I8e82a4504d4ec9d3047af6b1d6a11945754f182d
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2017-03-13 09:39:19 +00:00
Jake Petroules
c0da37a806 Fix QStandardPaths values on Apple Platforms containing URL encoding
This corrects an issue where the file system paths returned for some
QStandardPaths values on Apple Platforms would be URL encoded, for
example having %20 instead of an actual space character.

Task-number: QTBUG-59389
Change-Id: I771a44eb20b756842c324ac6fc9bdc475ce84826
Reviewed-by: David Faure <david.faure@kdab.com>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
2017-03-11 02:10:10 +00:00
Olivier Goffart
b52b509ae4 QLockFile: Don't deadlock if the lock file has a mtime in the future
Stale Lock files in the future can happen in some situations. For exemple
two computers with different clocks access the same file system. It could
be that one of the timestamp is totaly off (several years into the future).

[ChangeLog][QtCore][QLockFile] Fixed a deadlock occurring if a corrupted
lock file's modification time is in the future.

Change-Id: I8dac98a0e898c76bcef67f8c195e126c996b6add
Reviewed-by: David Faure <david.faure@kdab.com>
2017-03-10 17:09:24 +00:00
Kevin Funk
137e6632c8 qlalr: Use forward slashes in #include directives
Makes sure we don't use backslashes on Windows systems, which could lead
to the following warnings being emitted:

In file included from main.cpp:43:0:
repparser.h:2:10: warning: unknown escape sequence: '\.'
  #line 57 "..\..\src\repparser\parser.g"

caused by lines like
  #line 57 "..\..\src\\repparser\parser.g"

Change-Id: I6cfe0e39a2a58eb39f9d385ece30374bcfa09e05
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Brett Stottlemyer <bstottle@ford.com>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-03-10 08:47:19 +00:00
Marc Mutz
5cc0de2e08 QAtomic: pass explicit failure memory order to std::atomic::compare_exchange_strong
GCC 4.8 seems to get the failure memory order wrong when using the
overload that only accepts one memory order and produces errors such
as:

  bits/atomic_base.h:577:70: error: failure memory model cannot be stronger than success memory model for '__atomic_compare_exchange'
  return __atomic_compare_exchange_n(&_M_i, &__i1, __i2, 0, __m1, __m2);
                                                                      ^
(as seen on Android).

Fix by explicitly passing the failure orders corresponding to the
success orders, as specified by the standard:

 relaxed → relaxed
 release → relaxed
 acquire → acquire
 acq_rel → acquire

(cf. http://en.cppreference.com/w/cpp/atomic/atomic/compare_exchange).

Task-number: QTBUG-59399
Change-Id: If046e735888cf331d2d6506d8d5ca9aa7402f9ad
Reviewed-by: David Faure <david.faure@kdab.com>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2017-03-10 08:24:41 +00:00
Edward Welbourne
9ed389bf15 Bugfix in QDateTimeParser's findTextEntry()
If a later month-or-day were to have a name that's a prefix of an
earlier one's name, the code would have selected the longer name as
best match when the text matched is the shorter name, simply because
it found that one first.  (Found, on Turkish Cuma(rtesi)? in Thiago's
recent new test, by reversing the loop that iterated the list.)

Make an exact match win and a match of a full name beat any prefix
match of the same length.

Change-Id: I8d954b83ccc25e4f47af2e558036d714685cef5e
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-03-09 19:27:13 +00:00
Edward Welbourne
326f1fdb7d Simplify QDateTimeParser's shiny new findTextEntry()
Decouple from the callers' offset into a larger list; just search for
an entry in a list, let the caller deal with the offset.  Also, defer
a .tolower() to save the need to allocate a copy of each list entry.

Change-Id: I748d5214c2cc6dc592fe2bd41e3f8150f71c335b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-03-09 19:27:06 +00:00
Andy Shaw
65bafcc29d Android: Enable the usage of QPrinter
Since QPrinter can be used to write to PDF and this was working in
previous versions, there is no reason not to enable it here.

Task-number: QTBUG-58376
Change-Id: I5760b74881995679e8df657b7d770bba00a33551
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
2017-03-09 11:04:03 +00:00
Thiago Macieira
7fd483f3de QDateTimeParser: Merge the code to parse names of months and weekdays
Simplifies everything and avoids bugfixes in one not propagating to the
other.

Change-Id: I95c9e502ccc74af3bcf0fffd14a69f0cde60cc8c
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2017-03-08 16:44:54 +00:00
Kevin Funk
375bbcdd01 qlalr: Fix and re-run qlalr on its own sources
So the generated files are up-to-date again.

Generated with:
  qlalr --qt --no-lines --no-debug lalr.g

Change-Id: I3c4adb0083be7e66fed3db92c079493b574295aa
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-03-08 15:05:55 +00:00
Timur Pocheptsov
8b9d246225 QHttpNetworkConnection: fall back gracefully to HTTP/1.1
Both SPDY and HTTP/2 work with a single qhttpnetworkchannel (and this means one
socket per qhttpnetworkconnection). Normally, HTTP/1.1 connection is using up to 6
channels/sockets though. At the moment a failure to negotiate SPDY/HTTP/2 leaves us
with a downgraded HTTP/1.1 connection (with only one channel vs. default 6).
Since we initialize channels (and establish connections) in a 'lazy' manner
it's ok to pre-allocate all 6 channels and then either use 1 (if SPDY/HTTP/2
indeed was negotiated) or switch back to 6 in case of failure.

Change-Id: Ia6c3061463c4d634aaed05ce0dde47bfb5e24dd8
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2017-03-08 14:14:26 +00:00
Marc Mutz
9e7d769462 Use the same timeout value for all QTest::qWaitForWindow*() functions
Some were 5s, others 1s. Pick one (the higher).

Change-Id: I81929d4f49c2e41b4d4b75c3e2bf8ff75af868ad
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2017-03-08 07:19:45 +00:00
Thiago Macieira
3a1f4b186d Stop trying to discover the system timer resolution on Windows
Let's take the beginning of the description: WaitForSingleObjectEx can
be up to 16 milliseconds early. This is proven by the fact that there
are tests doing:

    wait(waitTime);
    QVERIFY(timer.elapsed() >= waitTime - systemTimersResolution);

and failing.

Task-number: QTBUG-59337
Change-Id: Iae839f6a131a4f0784bffffd14a9a79523d69d94
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2017-03-08 05:52:47 +00:00
Samuel Gaist
2d81968c3b Example: migrate treemodelcompleter example to use QRegularExpression
Update the treemodelcompleter example to use the new QRegularExpression
class in place of the deprecated QRegExp.

Change-Id: I9fa91ca6e847603de37019e4ca86fc69a51a3772
Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com>
2017-03-07 23:11:31 +00:00
Samuel Gaist
9e933de7f2 Example: fix memory leak in relationnaltablemodel example
The example creates a view on the heap but doesn't delete it on
application end. This patch uses a QScopedPointer to fix that.

Change-Id: I3b0c8589999d243c193bd02e1470c03eabfabe40
Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com>
2017-03-07 23:11:20 +00:00
Nikita Krupenko
895b4e6f89 Enable QStyleHints::useHoverEffects for KDE and other unix systems
By default, it enabled only for Gnome

Task-number: QTBUG-59298
Change-Id: Ib44f52b3175ed1904f24ec9e21f00ea3f3334287
Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
2017-03-07 15:22:17 +00:00
Thiago Macieira
e7295c959b Add -Wfloat-equal to Qt's header clean check
Task-number: QTBUG-57649
Change-Id: I15b62e0f9cec482fbb40fffd1490d802c54bf0fe
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2017-03-07 10:51:54 +00:00
Andy Shaw
7eb11df19e Don't call releaseKey a second time if the insertion fails
When the insertion into the cache fails then it will delete the entry
for us which already calls releaseKey(). So we should not call it a
second time.

Task-number: QTBUG-58259
Change-Id: I816c6f29ef97fe3a245f145c4faf1e0649f72dc5
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2017-03-07 08:15:54 +00:00
Jake Petroules
c0af8cef2f Don't pass -headerpad_max_install_names when using Bitcode
It is ignored (and is unnecessary to begin with) in that case,
and emits an annoying warning which this patch silences.

Change-Id: I6059969724b203d6e0e2eea81ad3e3e8f8d536d6
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-03-07 01:05:16 +00:00
Oswald Buddenhagen
473248df14 put load(qt_plugin) at end of project file
amends a28364bc1.

Change-Id: I8e6044abcbfffde8688d87cd3aa722c0c362534c
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
2017-03-06 18:43:26 +00:00
Olivier Goffart
6797570a59 Fix UB in QFutureInterface: invalid casts from ResultStoreBase to ResultStore<>
ResultStore never actually exists, only ResutStoreBase does. So casting to
ResultStore<T> and calling its  member functions is UB. Put the type dependent
function as template member functions within ResultStoreBase and so we don't
need QtPrivate::ResultStore anymore.
Same goes for the iterator.

Change-Id: I739b9d234ba2238977863df77fde3a4471a9abd2
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2017-03-06 18:32:28 +00:00
Ulf Hermann
a170c974a5 Fix building of various examples and tools with -no-feature-process
We should not check for platforms, but rather for features. Also, if
dbus is available it doesn't automatically mean that QProcess is.

Change-Id: I27ef5863fcb107cca1aa47abba95b734962adc33
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-03-06 14:16:13 +00:00
Ulf Hermann
c925400bde qmake: Check for QT_CONFIG(process) in qmakebuiltins
The code in question is obviously checking for support of QProcess, not
for general bootstrap mode. You can manually disable QProcess, in which
case it is still not available after bootstrapping is done.

Change-Id: Ia99810b8900621911a31912034358a01af4f18a0
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-03-06 14:16:08 +00:00
Topi Reinio
8a1880029d Doc: Add macro for embedding YouTube videos
This macro adds a \youtube <ID> command that embeds a YouTube link
into the documentation.

The video container scales to a specified percentage of the available
horizontal area. It assumes a source aspect ratio of 16:9, but looks
acceptable with other ratios.

For backends that do not support <iframe> (e.g. QTextBrowser), shows
a clickable video thumbnail that open the YouTube link in an external
browser window. Unfortunately, QTextBrowser cannot load images from
a remote URL, so we need to store a thumbnail image in the .qch file.

Change-Id: I3a3a0c5a20dd90e5cec6357ba70a23ee47dbe825
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
2017-03-06 13:43:58 +00:00
Ulf Hermann
d6330a19b2 Use QT_CONFIG(library) instead of QT_NO_LIBRARY
For the windows file system engine, we add an extra macro to use
library loading if configured to do so, but avoid it on WinRT, as
none of the symbols would be found.

We also QT_REQUIRE_CONFIG(library) in the library headers and
exclude the sources from the build if library loading is disabled.
This, in turn, makes it necessary to clean up some header inclusions.

Change-Id: I2b152cb5b47a2658996b6f4702b038536a5704ec
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-03-06 11:27:20 +00:00
Marc Mutz
f31dbeb4c7 tst_QVersionNumber: fix Clang warning about superfluous move
Parameters passed by value, like local function variables, are subject
to NRVO/return-by-move already, so adding std::move, even disguised as
qMove(), makes Clang warn about a pessimizing move.

Change-Id: I7d59bfee4cf7ecddee0874ee489367044c702643
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2017-03-06 11:13:17 +00:00
Thiago Macieira
37fd42459e forkfd: fix calling the old signal handler when there wasn't one
On some stupid systems, execve() may clear the handler but not clear
the SA_SIGINFO flag.

This change now requires that sa_handler and sa_sigaction be in a union
together. We can't operate otherwise.

Task-number: QTBUG-59246
Change-Id: I33850dcdb2ce4a47878efffd14a84b48a8f6b1e8
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2017-03-06 09:56:35 +00:00