Commit Graph

39899 Commits

Author SHA1 Message Date
Tobias Hunger
37ed6dae00 CMake: Map xkbcommon_support
Qt 5.12 comes with xkbcommon_support now. Map that accordingly.

Change-Id: Id10708349d377f6bdfed654428ebcef0b533bd69
Reviewed-by: Albert Astals Cid <albert.astals.cid@kdab.com>
2019-04-12 14:06:07 +00:00
Friedemann Kleint
6dca11e1af uic: Port WriteInitialization::writeBrush() be able to generate Python
Task-number: PYSIDE-797
Change-Id: I7c4e204a5ac9be2dee8f06c38323a15a0372fe5c
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
2019-04-12 13:47:47 +00:00
Friedemann Kleint
d63a76af8c uic: Refactor WriteInitialization::writeIconProperties() and add Python
Unfold the function with returns to reduce nesting and add language
handling.

Task-number: PYSIDE-797
Change-Id: Ie6c47745b118d75c0bb2c9eea7d52c8f0377f1a6
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
2019-04-12 13:47:34 +00:00
Tobias Hunger
ce809cab29 CMake: pro2cmake.py: Fix handling of libraries in QT
Change-Id: I5737a285ca0575a454e60fad231435d96b2f1be7
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-04-12 11:35:18 +00:00
Tobias Hunger
95cdb0d1ae CMake: pro2cmake.py: Inherrit VPATH from parent scopes
Change-Id: I95b62fdf3a4cba674bef5a58f0d414464daa3b0c
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-04-12 11:35:09 +00:00
Tobias Hunger
2ec3f492a7 CMake: pro2cmake.py: Handle setting a key with $$key in the value
Change-Id: I86552ed2a30f07f8c6060b2bad04fd5489b1d482
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-04-12 11:35:01 +00:00
Tobias Hunger
8f0eb65579 CMake: Configurejson2cmake: Always enable system-pcre2 and handle dlopen
Handle dlopen properly. Code is ifdef-ed on it, so we need it:-/

Change-Id: I7f35d24b97530796a4cdcdc1acbe139757170215
Reviewed-by: Albert Astals Cid <albert.astals.cid@kdab.com>
2019-04-12 11:33:39 +00:00
Tobias Hunger
859b36ca14 CMake: Use imported target to create _nolink targets
Use an imported target to create _nolink targets. This gets rid of
the need to have an helper target that gets aliases to get work
around the problem of the original target might having a "::" in
its name.

Change-Id: I4618980cf2c673ebf5caca593bccf122b3c81480
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-04-11 15:07:14 +00:00
Tobias Hunger
f9676fdd91 CMake: Re-generate gui
Change-Id: Ia944a66d75e0bfda888a208f93d581bb5a43a87f
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-04-11 15:07:01 +00:00
Tobias Hunger
dac32e95d6 CMake: Update src/corelib
Change-Id: I0321883f762460b146666bfbad0d8b27c3fdeadd
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-04-11 15:06:52 +00:00
Ulf Hermann
e7e557cea2 moc: Add a standard way of specifying a URI as part of Q_PLUGIN_METADATA
Usually, when you load a plugin, you don't want to load just any plugin
that fulfills a given interface, but rather a specific one. When loading
dynamic plugins you can differentiate the plugins by file name. This
doesn't work in the static case, and file names are also separate from
the plugin metadata shipped inside the plugin files.

To solve this problem, different hacks have been developed in various
places. QML extension plugins add a special property "uri" via the -M
option of moc, QML debug plugins expect you to add a json file with
an array of "Keys", Qt Creator plugins have a "Name" in their json
files, etc.

By allowing the identifier for the plugin to be specified inline with
the metadata declaration we can make many of the above workarounds
obsolete and provide a clean way for users to find their plugins.

Task-number: QTBUG-74775
Change-Id: Ie2af16c49d4c5aa5a77fab0fae1e0a4449bd7a39
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2019-04-11 14:43:27 +00:00
Johan Klokkhammer Helsing
217f3d83d7 tst_QWidget: Skip based on capabilities instead of platform == wayland
Skip based on support for window activation instead of platform. Makes it clear
why the tests are skipped, and also enables them automatically if we implement
a shell extension that adds support for it.

Task-number: QTBUG-66849
Change-Id: I322aba5ce5f8db651db7b71f223ffacec037c920
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2019-04-11 11:48:33 +00:00
Liang Qi
c7af193d2e Merge remote-tracking branch 'origin/5.13' into dev
Conflicts:
	src/widgets/styles/qstyle_p.h

Change-Id: I0e6e856bd6628da1135b3ba674dddffabbeb5c09
2019-04-11 07:47:21 +02:00
Liang Qi
63e88f60a7 Merge "Merge remote-tracking branch 'origin/5.12' into 5.13" into refs/staging/5.13 2019-04-10 17:33:14 +00:00
Edward Welbourne
235ac95520 Improve the default selection of locale for QCollator
QCollator was using the default-constructed QLocale() as its default;
this locale's default was the system locale; however, that didn't pay
any attention to system settings for collation such as Unix's
environment variable LC_COLLATE or the MS-Win LOCALE_SSORTLOCALE
configuration option.

Teach the system locale back-ends to look up their relevant settings,
add QLocale::collation() as a channel via which to access that and
change no-parameter construction of QCollator to a separate
implementation (rather than the constructor taking QLocale having a
default) using it.

[ChangeLog][QtCore][QLocale] The system locale now knows what to use
for collation, QLocale::system().collation().

[ChangeLog][QtCore][QCollator] The default QCollator now uses the
system's collation locale, rather than the system locale itself.

Fixes: QTBUG-58621
Change-Id: I90f86621541385330315d1f9d6a4b982bdcea9d5
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2019-04-10 13:31:07 +00:00
Tobias Hunger
92b0d7b911 CMake: Support /nolink libraries
Add a helper function to QtBuild that generates Foo_nolink versions
of Foo library targets.

Map 'Foo/nolink' libs found in qmake to Foo_nolink.

Automatically run helper function to create _nolink targets as
part of extend_target.

Change-Id: I4c23ea68b3037d23c9a31d4ac272a6bd0565f7c0
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-04-10 09:36:40 +00:00
Liang Qi
a20da2353c Merge remote-tracking branch 'origin/5.13' into dev
Conflicts:
	mkspecs/win32-clang-msvc/qmake.conf
	src/gui/image/qpnghandler.cpp

Change-Id: Ied79d02912ffb3a307a99483df7db08c7f9d0cd8
2019-04-10 08:16:20 +02:00
Johan Klokkhammer Helsing
0bdded64ac eglfs_viv_wl: Clean up the wl_display
Task-number: QTBUG-74879
Change-Id: Idb39a39a10bccb1822bdb80343fbe1b5c92560e9
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2019-04-10 06:12:54 +00:00
Qt Forward Merge Bot
ff88e20b83 Merge remote-tracking branch 'origin/5.12' into 5.13
Change-Id: I44eda44bf424fdcffab048a2534905d6162e5559
2019-04-10 01:00:08 +02:00
Allan Sandfeld Jensen
eaf20420f8 Fix precompiled headers with clang-cl
Clang-cl couldn't find the header given to it by -FI when it isn't in
any of the included directories.

Additionally clang-cl 8 has a bug with exported templated classes with
inline methods that causes it to have missing symbols at link time. We
work around this.

Fixes: QTBUG-74563
Change-Id: I7becf05fa8edb07bd4cefe12bee3737e5e1dfa14
Reviewed-by: Yuhang Zhao <2546789017@qq.com>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
2019-04-09 21:58:54 +00:00
Allan Sandfeld Jensen
fe7a8d61d1 Update precompiled headers
Include many headers that are commonly used now, and avoid listing them
twice.

Change-Id: I679dc24cff2cb3a3c9c18585ec78007ab3550743
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2019-04-09 21:57:17 +00:00
Liang Qi
ac244dbcf2 Merge "Merge remote-tracking branch 'origin/5.12' into 5.13" into refs/staging/5.13 2019-04-09 19:43:30 +00:00
Christian Ehrlicher
1029a2e010 QTableView: don't draw additional grid lines top and left
QTableView drew additional grid lines on the top and left side when
the corresponding header was not visible and the ScrollMode was
ScrollPerItem. After 8f2bacea41 they were
also drawn for ScrolPerPixel for consistency. But they are not needed at
all and only create visual artifacts.
Therefore remove the drawing of the additional lines completely.

Fixes: QTBUG-74706
Change-Id: I5c77d53a2eeefab9b9bfe0efea6439f5afede4ac
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2019-04-09 18:54:02 +00:00
Christian Ehrlicher
37c24c6b1b QTableView: fix Ctrl+End behavior with disabled columns
Ctrl+End moves the visual index to the bottom left index. This does not
work correctly when the item in the bottom left is disabled. It should
be fixed with 7863be3115 but does not due
to a typo.
Fix the typo by using the newly calculated visualColumn instead the
initial column.
There are cases where the algorithm still does not work as expected when
there are more disabled items but fixing them would add a lot of
complexity with no (much) gain.

Fixes: QTBUG-72400
Change-Id: Ie90f6b3e41e00f54e826c2b4e7303e85ac1e4115
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2019-04-09 18:53:59 +00:00
Milian Wolff
5f2afe18cc Fix QMetaObject::newInstance on non-QObject meta object
QMetaObject::newInstance returns a QObject, thus it's not possible to
create a new instance of a Q_GADGET using this function. Previously, we
returned a non-null QObject pointer for such scenarios, which then
leads to crashes when one tries to use it. Now, we check whether the
meta object inherits QObject's meta object, and error out early
otherwise.

Change-Id: I7b1fb6c8d48b3e98161894be2f281a491963345e
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2019-04-09 15:46:35 +00:00
Allan Sandfeld Jensen
95f787bfdc Replace Q_DECL_NOTHROW with noexcept the remaining places
The first replacement had missed objective-C++ code some places ourside
the src dir.

In C-files Q_DECL_NOTHROW is replaced with Q_DECL_NOEXCEPT as we still
need to turn it off when compiled in C mode, but can get rid of the old
NOTHROW moniker.

Change-Id: I6370f57066679c5120d0265a69e7e378e09d4759
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2019-04-09 14:48:42 +00:00
Alexandru Croitor
be0cf9f8d7 Regenerate cocoa platform plugin
Change-Id: I701b6c20566448074f3a51cef698c89a3b6e21eb
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2019-04-09 14:29:27 +00:00
Alexandru Croitor
e7c992755e Turn off linker version script support on macOS
The test erroneously succeeds on macOS with an XCode generator.
Explicitly set the test result to be turned off.

Change-Id: Id6fcb96f420f611517e81cc3697f1c88b508bd7c
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2019-04-09 14:26:14 +00:00
Liang Qi
677a7a3066 CMake: Fix mappings in helper.py - WUIAS
This amends 9afc605eb5.

Change-Id: If246811d267d091c692875a1645c96767f781010
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2019-04-09 14:26:05 +00:00
Alexandru Croitor
b7a55b0931 On second thought, install tracegen and qfloat16-tables tools
They are not needed per se for a host build, but they are still
needed for a cross build (because we don't build tools in that
case).

Task-number: QTBUG-74133
Change-Id: I891e3852c6846119956982a7bdbf449ad7c4836c
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2019-04-09 14:26:04 +00:00
Friedemann Kleint
434c866e1b QtGui: Use member initialization for QWindowPrivate, QScreenPrivate
Remove the constructors, destructors in favor of member initialization.

Change-Id: I323826328fb783ea2cd931c0e6aad45a98a2ebeb
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2019-04-09 14:23:04 +00:00
Allan Sandfeld Jensen
0bee05f4c1 Make the 64 bit raster backend an optional feature
Can be used to make smaller binaries, and possibly speed up ARGB32
rendering on some platforms.

Change-Id: I7647b197ba7a6582187cc9736b7e0d752bd5bee5
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2019-04-09 12:53:19 +00:00
Friedemann Kleint
84ce5022ce QFileDialog (widgets-based): Remember selection in history
Extend the history by a persistent model index list
reflecting the selection.

[ChangeLog][QtWidgets][QFileDialog] The widgets-based dialog now
remembers the selected files when navigating the history

Fixes: QTBUG-71415
Change-Id: I86774439be070c1b922acd0e9a27d029f02f68d3
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2019-04-09 11:15:36 +00:00
Tobias Hunger
f233249207 CMake: FindATSPI2: Ignore repeated attempts to find ATSPI2
Change-Id: I4d6f59d144910d2f194f73e3b9bc8a5cc6726bcd
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-04-09 11:14:12 +00:00
Tobias Hunger
511124bf1d CMake: pro2cmake.py: Fix plugin type only prints first letter
Change-Id: Ib8989d2c13199d804d0c069903ca1c5eb61763e6
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-04-09 09:54:23 +00:00
Liang Qi
341729db15 cmake: use WindowsUIAutomationSupportPrivate for windows plugin
Change-Id: Ie7d74ff3431b1ac9bac4255d561ae2c2fb28550a
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-04-09 09:22:42 +00:00
Edward Welbourne
6d4a456a28 Fix off-by-one error in QTranslatorPrivate::do_load()
The central loop starts by reading five bytes; but
the loop condition only checked that four were available.

Change-Id: I244cecacabeffbac10ad94081f32847f912d95d9
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: hjk <hjk@qt.io>
2019-04-09 09:12:11 +00:00
Alexandru Croitor
f0cc730197 Fix FindWrapOpenGL to choose the correct GL implementation
The find_package() call for WrapOpenGL was moved to the beginning of
the src/gui project file. This was incorrect, because the features
were not yet computed at that time, and the find module was incorrectly
always choosing the Desktop GL implementation.

Move the find_package() after the add_qt_module() call.

Amends 4f736db08c.

Task-number: QTBUG-74133
Change-Id: Ice1da8f23275843c7285ec748e6d673edbffffac
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2019-04-09 08:52:18 +00:00
Joerg Bornemann
9617791075 Let QINSTALL copy hidden files when installing directories
When installing directories, QINSTALL must not ignore contained hidden
files to be consistent with the old INSTALL_DIR.

Fixes: QTBUG-66835
Change-Id: I3a7c952dcac9732d5b17c5a258f87ca277b388d2
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
2019-04-09 08:16:25 +00:00
Tobias Hunger
9afc605eb5 CMake: Fix mappings in helper.py
Some of the Qt names were wrong. Fix them and remove the work-arounds
in the library mappings.

Change-Id: I9b9afa3fb35c578e5c8d9cdef77224eb072ec8da
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-04-09 07:29:21 +00:00
Tobias Hunger
3bc9586e61 CMake: pro2cmake.py: Move defines from QMAKE_CXX_FLAGS into DEFINES
Change-Id: If3bfe715032b21dc046e63a79b0318a161d7a371
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-04-09 07:29:08 +00:00
Tobias Hunger
3cf92ab183 CMake: pro2cmake.py: Better separation between public and private libraries
Change-Id: I95a941ae92a77e049437d3cdd7d06eece11588f4
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-04-09 07:28:58 +00:00
Tobias Hunger
8c28c85465 CMake: pro2cmake.py: Strip '-D' from compile options
Change-Id: I8239d36dc6af1b5eeded7f293dd6c151c10e289f
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-04-09 07:28:44 +00:00
Tobias Hunger
9d83b54015 CMake: pro2cmake.py: Fix handling of file paths
This patch makes sure to store unchanged filenames as taken from qmake
into the scopes it creates.

The scopes are then kept longer: Merging/including scopes is handled by
adding the scope to a private _included_children member of the parent scope.

The methods to access data from scopes are then changed to take the
_included_children into account and a new "get_files" method is added,
that does all the necessary mapping to handle scope-dependent things like
$$PWD, etc.

This makes sure src/network is converted correctly incl. all the .pri-files it
includes as well as src/platformsupport/themes.pro. Both have been troublesome
before.

Change-Id: I28e92b7bcee1b91b248c17201c2729a54a3ce4a1
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-04-09 07:28:30 +00:00
Tobias Hunger
52f676bf66 CMake: pro2cmake.py: Better representation of scopes as str
Include the current directory in the scope __repr__ output to make
it easier to understand where things wrt. include or file names go
wrong.

Change-Id: I09a6c17c6d8d547f1f64801bcde3c2e10c925ee1
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-04-09 07:28:18 +00:00
Tobias Hunger
77a465ea2d CMake: pro2cmake.py: Better handling of debug features
Improve way that debug features are detected.

Change-Id: Ic0f0e74885e6d1e7f236c9efe4c77482ac212dbc
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-04-09 07:28:08 +00:00
Tobias Hunger
9365a01531 CMake: pro2cmake.py: Fix typing information
Change-Id: Iaa6ea69c3c72eb1b626a976fcdb16243f15c609e
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-04-09 07:27:59 +00:00
Tobias Hunger
81542ffb91 CMake: Map linuxaccessibility_supportPrivate to Qt::LASP
Change-Id: I6066f69c74c39fb97a286eb92748b5c4172b1efd
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-04-09 07:27:48 +00:00
Kai Koehne
7482602e85 ANGLE: Remove superfluous -Gm- option
/GM at one point apparently was set by default for debug builds. However,
nowaways it's officially deprecated and even generates a warning in
Visual Studio 2019; so we don't have to 'unset' it specifically anymore.

Change-Id: I5b9b93c058c2ee8a5e025da43251d3859acbe061
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2019-04-09 07:00:25 +00:00
Kai Koehne
8cd0a39dd7 qmake: Remove special-handling of cl.exe's -Gm option
The comment hints that it's fixing an issue in Visual Studio 2013, which
we don't support anymore.

In all supported Visual Studio Versions -Gm is actually deprecated
anyhow, and not set anymore by default. So I guess it's safe
to remove the special handling here.

Change-Id: I2e8ff85350ba651d9a763aabba7b6494ba88d82e
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2019-04-09 07:00:18 +00:00