Commit Graph

31684 Commits

Author SHA1 Message Date
Giuseppe D'Angelo
9390c44338 QtXml: add some missing Q_DECLARE_TYPEINFO
Change-Id: I4b58aad1c337fe5fdfb70eb517a66b15a34dffc4
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2017-03-07 01:55:44 +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
Stephan Binner
00e6863552 Add feature.pushbutton
Change-Id: I654d91635e60b177df16f6dfe00acc940132f66a
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2017-03-06 20:35:07 +00:00
Stephan Binner
0884e42410 Add feature.checkbox
Change-Id: Ib387390b796c3cab6de4ce94e0d217280a300df8
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2017-03-06 20:34:58 +00:00
Stephan Binner
5c62fd9a2e Add feature.dialogbuttonbox
Change-Id: I8c136024c3bf431529033a806be646d867919daa
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2017-03-06 20:34:42 +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
Paul Olav Tvete
0b109a952b Build fix for -no-feature-formlayout
Change-Id: I10a1c4b742bb446f7baa219d4118a03d9f60495c
Reviewed-by: Stephan Binner <stephan.binner@basyskom.com>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2017-03-06 15:32:38 +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
Olivier Goffart
80cbe30798 Remove unused src/tools/moc/mwerks_mac.* files
These files are unused.
They still contains Qt3 code (QCString for example)

Task-number: QTBUG-59302
Change-Id: I661f08db4092311df1d6c7d54b9780d86adab8aa
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2017-03-06 10:11:25 +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
Edward Welbourne
a1c27748d2 Make QLocale consistent about special handling of the C locale
QLocale::matchingLocales() simply created each locale using the basic
data, without (unless the matching conditions stipulated Language C)
applying number-options hacks that it applies everywhere else, when
creating the C locale.  Thus the C locale in its returned list (if it
wasn't the only entry) ended up with the default number options,
without omiting separators in numbers.  Thus QLocale::c() didn't
actually appear as an entry in the list.  Discovered while
investigating QTBUG-58947.

Added a dumb autotest that checks various ways of getting the C locale
do actually give us equal locale objects.  Fixed matchingLocales() to
apply the same hack as is used elsewhere for the C locale.

Change-Id: I263f31da623052b63171f5b5a83c65802383df21
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-03-06 09:51:49 +00:00
Thiago Macieira
3a2f4bde14 QStaticByteArrayMatcher: enforce alignment
The data is 256 bytes, so might as well align it on a 16-byte boundary
to facilitate copying (if that happens). We should consider similar for
QByteArrayMatcher in 6.0.

Change-Id: I74966ed02f674a7295f8fffd14a8c64526d734bb
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2017-03-06 09:42:45 +00:00
Thiago Macieira
03b3f7a3af Make new QtCore code conform to the coding style
Change-Id: I74966ed02f674a7295f8fffd14a8c6389da538c1
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2017-03-06 09:42:23 +00:00
Marc Mutz
51bec76d10 QLineEditPrivate: introduce SideWidgetLocation class
... as a replacement for QPair<enum, int>, and move some
repsonsibilities into it.

This avoids the repeated use of the magic number -1 to indicate
invalid locations and does away with the confusing .first and .second,
replacing them instead with proper names, .position and .index.

Change-Id: If904c5333cecf8ce3d5160ca4be9264a13a2b72a
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2017-03-06 09:19:58 +00:00
Paul Olav Tvete
d5fe06a94e Make uic handle -no-feature-shortcut
Change-Id: I0f8c9fdc8b0fe573443cfc126f21e473544ddcba
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2017-03-06 09:08:34 +00:00
Oleg Yadrov
f2e103296f QMenu: make wide submenu appear on the same screen with its parent menu
On a multi-display system wide submenu might either appear on wrong
screen or not appear at all (depending on the specific display
configuration).

Task-number: QTBUG-56917
Change-Id: I40013b0bee340a01ae1c08a5e074afa63da4dbfd
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
Reviewed-by: Błażej Szczygieł <spaz16@wp.pl>
2017-03-04 05:37:30 +00:00
Oleg Yadrov
ad5565b643 Wide QMenu: fix size and position
This patch fixes 2 issues related to wide menus:
1) Menu took on full screen height when menu width was larger than
screen width;
2) On a multi-display system wide menu might appear on wrong monitor
(not the one where show event was triggered).

The idea is we limit parent menu and all its submenus within the screen
where it was opened.

Note that this patch fixes only geometry-related issues and there are
also some style flaws which need to be addressed (for example, currently
the text does not elide if it doesn’t fit to the menu’s width).

Task-number: QTBUG-56917
Change-Id: I7e9ff4a48bf03060d76e34d33a13ad6cc890c133
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
2017-03-04 00:43:50 +00:00
Oleg Yadrov
d46afc24c1 QMacStyle::sizeFromContents(CT_Menu): take proxy style into account
This is missed in 10d0f4cba9

Change-Id: If3566eb4b1f00f6882c290c83e10e51e1bf1d6d9
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
2017-03-03 21:21:45 +00:00
Stephan Binner
dc2512f308 Add feature.label and feature.formlayout
Change-Id: Ic8dc0aee7f3fc0d8218ba709352b1378078c6070
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2017-03-03 20:34:58 +00:00
Jake Petroules
840aa67146 Fix Bitcode handling for both makefile and Xcode generators
This fixes an issue which caused certain iOS projects to fail to link
when building with Xcode, and also fixes an issue where projects were
only ever built with -fembed-bitcode instead of -fembed-bitcode-marker
for debug builds with the makefile generator.

Task-number: QTBUG-58754
Change-Id: Icf0c9f0d64dbc0b38d6c48bf635c5383a78bd6d5
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
2017-03-03 20:25:52 +00:00
Shawn Rutledge
46bf3d71e5 xcb: stringify enums for tablet qt.qpa.input.events qCDebug
It's a bit easier to read, not having to look up TabletDevice and
PointerType enum values manually.

Change-Id: I53353be4dcea3e2cb875f04250502ffe802fc971
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2017-03-03 20:24:31 +00:00
Joerg Bornemann
80145d556e Increase timeout of tst_QProcess::softExitInSlots even more
Commit eab7efd1 increased the timeout for this test, but apparently 10
seconds are still not enough. Set the timeout to a minute.

Task-number: QTBUG-59075
Change-Id: Iebab8e5c73c4858ca90063a82aedfbb2546a62cc
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2017-03-03 16:26:41 +00:00
Thiago Macieira
b736d2d7ce Remove the last remaining non-SSL use of QMutexPool in Qt
Task-number: QTBUG-59164
Change-Id: Idd5ceba1eba34cb78c46fffd14a734735991f4fb
Reviewed-by: David Faure <david.faure@kdab.com>
2017-03-03 15:29:57 +00:00
Kimmo Ollila
51e8bc9be5 Remove library feature condition from the imageformatplugin
Change-Id: I951ec5fa6d5788accdc82327326d39aac540bd7b
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2017-03-03 11:20:22 +00:00
Stephan Binner
fd08361ad3 Add feature.radiobutton
Change-Id: Ie11f178ce22e2fafdfdf1760288e90563569e0cb
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2017-03-03 09:21:33 +00:00
Marc Mutz
863debd720 Revert "Add expandingListItems property to QListView"
This reverts commit a4c25c0205.

The API is too limited in scope, and a good name is hard to find, as
evidenced in the API review discussion preceding Qt 5.9 beta.

This API will hopefully return as something like setItemAlignment().

[ChangeLog][QtWidgets][QListView] EDIT: REMOVE: Added expandingListItems property.

Conflicts:
	tests/auto/widgets/itemviews/qlistview/tst_qlistview.cpp

Change-Id: I397acd8a7a6c716e2d3c96eee45a276eb6d4f9dd
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Alexander Volkov <a.volkov@rusbitech.ru>
2017-03-03 08:34:19 +00:00
Albert Astals Cid
0cd15fd94d Make "finger touch" not be a tablet
Otherwise QTouchDevices::devices() doesn't return the touchscreen on my Thinkpad Yoga 460

Change-Id: Ibb829df95f92152a77c512e4325522825901074e
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2017-03-03 08:14:44 +00:00
Paul Olav Tvete
259adc5e77 Fix build with -no-opengl
Change-Id: I6fb61944ef88e328a94ea6b7ab42db271828a602
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2017-03-03 08:05:03 +00:00
Paul Olav Tvete
6cff40c195 Build fix for -no-feature-shortcut
Change-Id: I99144b114b3c2eacb56b522b3059aa53a6bbd969
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2017-03-03 08:04:53 +00:00
Kai Koehne
585bb526c4 config.tests: Replace LGPL21 with LGPL license header
Also use canonical contact url.

Change-Id: Ia1f814ce822d247f3af14c1ea46e07cfad0fda09
Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
2017-03-03 07:26:50 +00:00
Kai Koehne
032d402485 mkspecs: Replace LGPL21 with LGPL license header
Also use canonical contact url.

Change-Id: I04c403f81bb8a8d6d6222573030d1e6d09ec4c3d
Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
2017-03-03 07:26:43 +00:00
Kai Koehne
63fa8aa1ce Gui: Replace LGPL21 with LGPL license header
Also use canonical contact url.

Change-Id: Ic0bf112998707844eb0c2853d7516b76f4d5afa8
Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
2017-03-03 07:26:37 +00:00
Kai Koehne
fb2732c43d Testlib: Replace LGPL21 with LGPL license header
Also use canonical contact url.

Change-Id: I7ffe7a8afa28fe8b66e00bc5e51595edeac042a9
Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
2017-03-03 07:26:31 +00:00
Kai Koehne
00696c32bc BSD plugins: Replace LGPL21 with LGPL license header
Also use canonical contact url.

Change-Id: I27cee9135228dabcf1ece5dcf15db18a2aa536f9
Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
2017-03-03 07:26:25 +00:00
Kai Koehne
3ffb0b50a4 GTK3 plugin: Replace LGPL21 with LGPL license header
Also use canonical contact url.

Change-Id: I6e925378ef4e82bdc739d23186d2dd6f23370d7a
Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
2017-03-03 07:26:17 +00:00
Kai Koehne
4460b9c843 Replace outdated BSD license text
For examples and documentation, use new BSD license text that
includes the commercial licenses.

Change-Id: I1cd74bd8e9c8f2746d8702df00780ee100cbebac
Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
2017-03-03 07:26:11 +00:00
Maurice Kalinowski
66e1d20537 winrt: Fix potential warning
fix warning about non-portable-includepath due to case insensitivity on
windows file system.

Change-Id: Ib92db836910c2b9d06a18c841e7c6f0c2e9abab4
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2017-03-03 06:59:11 +00:00
Maurice Kalinowski
374e0223c2 winrt: Fix compiler warning
The drag event handler classes should have virtual destructors.

Change-Id: Ia011856eec37ed303649a1eda036c52f5fa9f8e5
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2017-03-03 06:59:05 +00:00
Stig Bjørlykke
62e6aa6195 QVector: Avoid implicit conversion warnings
This fixes compiling an application using QVector and -Wshorten-64-to-32
on a 64-bit system without getting this warning:

 ... 5.8/clang_64/lib/QtCore.framework/Headers/qvector.h:695:18:
 warning: implicit conversion loses integer precision: 'typename
 iterator_traits<QString *>::difference_type' (aka 'long') to 'int'
 [-Wshorten-64-to-32]
    int offset = std::distance(d->begin(), before);
        ~~~~~~   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

 ... 5.8/clang_64/lib/QtCore.framework/Headers/qvector.h:731:35:
 warning: implicit conversion loses integer precision: 'long' to
 'const int' [-Wshorten-64-to-32]
    const int itemsToErase = aend - abegin;
              ~~~~~~~~~~~~   ~~~~~^~~~~~~~

 ... 5.8/clang_64/lib/QtCore.framework/Headers/qvector.h:740:39:
 warning: implicit conversion loses integer precision: 'long' to
 'const int' [-Wshorten-64-to-32]
    const int itemsUntouched = abegin - d->begin();
              ~~~~~~~~~~~~~~   ~~~~~~~^~~~~~~~~~~~

Change-Id: I52d85908f4aac20c7e9ac8063ac760ce52f85541
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-03-02 20:03:03 +00:00
Olivier Goffart
1d9270ee42 Fix DPI of QWidget with parent on a different screen
If a floating QWidget has a parent on a different screen, its DPI was
still inherited from the parent instead of taken from the screen.

The only reason we did was in case there is a customDpi set.
(customDpi is a private thing that is only used in designer to change
the appearance of the previewed widget)

So instead of recursing into QWidget::metric for each ancestor, just
use a for loop to find if one parent has a customDpi. If no customDpi
is found, then return the DPI of the right screen.

Task-number: QTBUG-58959
Task-number: QTBUG-48242
Change-Id: Ie6e9e48cdd10234994c0919ba3aea9b0cdb52494
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2017-03-02 16:43:38 +00:00
Giuseppe D'Angelo
8cd99d24a8 QRegularExpression: build fix
Latest PCRE2 versions require a macro to be defined before
including pcre2.h, so do it.

Task-number: QTBUG-59226
Change-Id: I472ff557e29d1212fdcd99454778551323be4d4b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-03-02 16:25:17 +00:00
Olivier Goffart
2b13ba0ca0 Fix UB in QWidgetItemV2::~QWidgetItemV2
We might get there because 'wid' is already partially deleted (called
from ~QObject). In that case, it is an undefined behavior to call a
QWidget member function on it. Use QObjectPrivate::get instead.

Change-Id: I6da314bf8385684d1332aa031a2d92012941303b
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2017-03-02 15:31:28 +00:00
Olivier Goffart
8387d87bdc QDialogButtonGroup: Fix removal of deleted buttons
As the destroyed() signal is emitted from ~QObject, it is not allowed
to use static_cast to a QAbstractButton on that pointer anymore.
And the qobject_cast will also fail which will keep a dangling pointer
in the hash.

Change-Id: If0d22fcc30cde87e771e70914c3afb04ea207289
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2017-03-02 10:42:55 +00:00
Mitch Curtis
fef6819f5b Fix grammar in QIcon docs
Change-Id: I170662de5dde32a913acc5b681c2d2cefcb51a70
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2017-03-02 08:00:26 +00:00
Gerry Boland
87f8777b45 Mirclient: only enable if desired. Depend on content-hub>=0.2.0
Change-Id: I65050e7924b6f7564664e8f4c7270ddad5717336
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2017-03-02 08:00:06 +00:00