Commit Graph

39761 Commits

Author SHA1 Message Date
Dmitry Kazakov
06b8644953 Fix notification of QDockWidget when it gets undocked
Before the patch the notification was emitted only when the docker
was attached to the panel or changed a position on it.

It looks like the old behavior was documented in a unittest,
so this patch might actually be a "behavior change".

Change-Id: Id3ffbd2018a8e68844d174328dd1c4ceb7fa01d3
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2019-05-07 17:28:23 +00:00
Lars Knoll
92f9842732 Deprecate conversion functions between QList and QSet
Users should use range constructors instead to do the conversion.
Keep conversion methods between QList and QVector as these will turn
into a no-op in Qt 6, whereas forcing people to use range constructors
would lead to deep copies of the data.

Change-Id: Id9fc9e4d007044e019826da523e8418857c91283
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-05-07 14:15:44 +00:00
Lars Knoll
d510e1e7f9 Add swapItemsAt() to QVector
This closes one compatibility gap with QList, to make
it easier to replace QList with QVector in Qt6.

Change-Id: I5655bc4cd2150a6f09a1ed68c0742f3b42ca47e4
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-05-07 14:15:37 +00:00
Ulf Hermann
587bdd144b Add QUrl to bootstrap set
The QML language server needs to use QUrl as that is what the language
server protocol uses to specify files.

As we cannot implicitly cast char to QChar in the bootstrap library, we
need to apply a build fix in qipaddress.cpp.

Change-Id: Ifaf8421457b1f734402b5aad965ecdec764a73e8
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
2019-05-07 13:22:42 +00:00
Liang Qi
35b25bc917 Merge "Merge remote-tracking branch 'origin/5.13' into dev" into refs/staging/dev 2019-05-07 13:28:29 +00:00
Tor Arne Vestbø
83347e2d39 macOS: Guard backingstore composeAndFlush with QT_NO_OPENGL
Fixes: QTBUG-75612
Change-Id: I0e90a84697c1eb055c4150f2519829977fce7244
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2019-05-07 11:09:51 +00:00
Morten Johan Sørvig
24eb0b33a4 macOS: don’t crash when wrapping foreign views
window.contentView can be of any NSView subclass.
Get to the QCocoaWindow via QCocoaNSWindow instead.

Change-Id: I8c761fd22e6078b075d8dd035ad767b9e4cb6da2
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2019-05-07 10:59:12 +00:00
Vova Mshanetskiy
fc9baeeb9f QWidgetTextControl: Emit cursorPositionChanged() when handling IM event
QWidgetTextControl and consequently QTextEdit did not emit
cursorPositionChanged() signal when cursor position was changed by a
QInputMethodEvent with a QInputMethodEvent::Selection attribute.

This is especially important on Android because QAndroidInputContext
uses such events extensively to move the cursor and also relies on
cursorPositionChanged() signal being emitted by the focus object. If the
signal is not emitted, QAndroidInputContext does not notify the virtual
keyboard about cursor position change which results in various glitches.

Change-Id: I7edd141258c483e6f103adcd6e40049b49c13387
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2019-05-07 10:49:12 +00:00
Tor Arne Vestbø
a3d6a04949 macOS: Move off deprecated handleFrameStrutMouseEvent API
Change-Id: Id95c096700a8bfa733d8620064c2a37eb19cc3db
Fixes: QTBUG-72741
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2019-05-07 10:39:31 +00:00
Giuseppe D'Angelo
aea6ff4f57 Fix the generation of docs for qobject_pointer_cast
QSharedPointer uses a dummy header for qdoc; the functions
were implemented and documented as qdoc comments, but not
added to the dummy header.

Change-Id: Iec78e3566a528631557067fbeb5606916ea74f2d
Reviewed-by: Martin Smith <martin.smith@qt.io>
2019-05-07 10:33:38 +00:00
Frederik Gladhorn
490ee4c5e6 Fix compilation of tst_qaccessibilitylinux
Note that the test is still disabled, but this is needed in any case.

Change-Id: Ib7523ba800b94c32690c1bd09b23fc2078c71d4e
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
2019-05-07 10:07:59 +00:00
Frederik Gladhorn
eba3b567d6 Accessibility: Improve handling of read-only state
We have been rather sloppy in how read-only versus editable is handled.
According to the definition, editable signifies that in principle a
widget allows the user to change its text. Read-only means that this
ability is (currently) disabled.

Task-number: QTBUG-75002
Change-Id: I5d71843abcdaac52f4a60a1abcac2604341f6c96
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
2019-05-07 10:05:30 +00:00
Liang Qi
c2b553784d Merge remote-tracking branch 'origin/5.13' into dev
Conflicts:
	src/corelib/kernel/qobject.cpp
	src/corelib/kernel/qvariant.h
	src/corelib/tools/qlist.h

Done-With: Milian Wolff <milian.wolff@kdab.com>
Done-With: Allan Sandfeld Jensen <allan.jensen@qt.io>
Change-Id: I6803f7239aa137a51a7467fab7cc7a01302a848d
2019-05-07 11:58:30 +02:00
Dmitry Kazakov
48a12735d8 Add an ID for recognition of UGEE tablets
Change-Id: I2228ee9d53aa23a2d2cd9970a363d8424e744093
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2019-05-07 09:56:35 +00:00
Dmitry Kazakov
dffad7e3cc Fix swizzling when rendering QPainter on QOpenGLWidget with Angle
OpenGLES specification does not support GL_TEXTURE_SWIZZLE_RGBA,
it supports only per-channel calls. And since Qt supports QpenGLES,
it should use the latter approach only.

The regression was introduced in Qt 5.12 by commit
ede3791df8

Task-number: QTBUG-74968
Change-Id: I9c531b248715992fb30df6af95dfa605e2ee2a25
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2019-05-07 09:56:17 +00:00
Dmitry Kazakov
7e5b35935e Fix generation of Leave events when using tablet devices
When both mouse and tablet events are handled by QWindowsPointerHandler,
m_currentWindow variable is shared among the two event streams, therefore
each stream should ensure it does equivalent operations, when changing it.

Here we should subscribe to the Leave events, when we emit Enter event
from the inside of the tablet events flow. Without whis subscription,
the cursor may stuck in "resize" state when crossing the window's
frame multiple times.

Change-Id: I88df4a42ae86243e10ecd4a4cedf87639c96d169
Reviewed-by: Andre de la Rocha <andre.rocha@qt.io>
2019-05-07 09:56:02 +00:00
Edward Welbourne
43abe86e2f Update locale data to CLDR v35.1
The formatting of times in Norwegian has reverted to using dots in
place of colons, as it did before v31 (commit 82deb0ad1), so reverted
the tests to their state before that.

Change-Id: I8a09ce253731bb0f0f3caca117f06ad568940a81
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2019-05-07 09:29:51 +00:00
Edward Welbourne
b58cfb2f1f Update cldr2qlocalexml.py's claimed CLDR version support
It was up to date with v34 (and seems to cope with v35.1) but only
clained support for v29.

Change-Id: I686cae1977824a4deec4633f19604b91061fe78a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
2019-05-07 09:29:36 +00:00
Edward Welbourne
8c8b4b8fde Correct and expand support for CLDR's date/time format strings
Our conversion from CLDR's format to our own was missing some things
it could support sensibly, and some it could do better than ignore or
treat as literal, while mis-handling the 'E'-based formats for day
names.  At least in CLDR v34 this doesn't actually make any difference
(on regenerating our locale data, the only change is the date of
generation).

Task-number: QTBUG-70516
Change-Id: I9d27b9bf24afd168c2f8a5258143d3d695bca0ad
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
2019-05-07 09:29:18 +00:00
Matthias Doerfel
f6238e2d3b qmake: Distinguish local header files by directory and name
Information about header files is cached by qmake. The key is the
filename of the #include directive. For system includes (<stdio.h>) this
is unique, according to the search order in INCLUDE_PATH.

For local includes, given as "foo.h", there may be name collisions. Usually a
compiler first searches in the directory of the current file (stored in the
sourceDir variable), and only in case of a miss the INCLUDE_PATH is
considered.

The dependency generation now distinguishes local header files by their full
relative path. This is implemented by forcing the use of the full relative
path as key into the SourceFiles data structure if the flag try_local is set.

Change-Id: Ifd75325b53496824054595f7fc98d71bbd9d8aa6
Fixes: QTBUG-72383
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2019-05-07 08:41:09 +00:00
Jüri Valdmann
b5154b5254 Fix QTextEngine::shapeText casing of surrogate pairs
The high part was not copied to output.

Fixes: QTBUG-75559
Change-Id: I9350e52d256510f52b3fcc0015bf879d2c609532
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
2019-05-07 07:50:33 +00:00
Shawn Rutledge
6afdbfdaaf Use "monospace" as fallback system FixedFont in KDE theme; logging
Also de-duplicate the "monospace" string in qgenericunixthemes.cpp,
and add tst_QFontDatabase::systemFixedFont() to verify that
QFontDatabase::systemFont(QFontDatabase::FixedFont) really returns
a monospace font across platforms.  Replace commented-out qDebug()s
with qt.text.font.match and qt.text.font.db logging categories to
troubleshoot when the test fails (among other uses).  Add qt.qpa.fonts
logging category to unix themes to show default system and fixed fonts
(font engines on other platforms are already using this category).

Fixes: QTBUG-54623
Change-Id: I2aa62b8c783d9ddb591a5e06e8df85c4af5bcb0c
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2019-05-07 07:48:43 +00:00
Kai Koehne
c57520e491 Document how to use CMake on Qt Core, Qt GUI's central pages
Add documentation on how to use a module from CMake, alongside
the existing documentation about qmake. Separate generic info
from module-specific examples, to make it possible to use one
include file in all modules.

While at it, also remove the mentioning of the central include;
it is not something we should actively advocate anymore. Instead,
the documentation of every class gives the correct include to use.

Task-number: QTBUG-73058
Change-Id: I6b3c0e5ea218dd9c06a491c8fb799a7fcf42dd92
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2019-05-07 07:46:21 +00:00
Lorn Potter
050e7bafad wasm: add fixedPitch font
Also define our default font so as to return something we actually have

Task-number: QTBUG-75587
Change-Id: I26e3c62921d369c3017af9796c0a20f7ac06d07c
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2019-05-07 07:21:58 +00:00
Lars Knoll
0b373c2e36 Don't rely on functions that are deprecated
Change-Id: I4150368e44b43e45f3604bf0fc7dab38a15e5ec9
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-05-06 20:04:51 +00:00
Lars Knoll
5ced1ff9fc Fix compilation with Qt 6
Change-Id: Ie165ab2f17740a996112b7e918b595d5873674a1
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-05-06 20:04:45 +00:00
Shawn Rutledge
1b8a1e04ef Fix heading level in style combobox in TextEdit example
Amends 0df30ff22e: when adding the
checked and unchecked styles to the combobox, it changed the offsets
for the heading styles; so the combobox stopped changing to the correct
index when clicking on a heading, and also changed the heading
two sizes smaller than it should when attempting to select a different
heading level.

Change-Id: Ib3f61987c786e34f32a81bf7b3ebc5ca730f40df
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
2019-05-06 19:25:12 +00:00
Shawn Rutledge
b922c97c9c TextEdit example: add indent/unindent feature
It was not possible to interactively create the example text without
this feature; and in general it's necessary to work with nested lists.
But currently it does not deal with all possible changes of list nesting,
because the API seems incomplete for that purpose.

Task-number: QTBUG-75589
Change-Id: I3e29ca15a2e7c37300a0103ceb90670716472ffb
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
2019-05-06 19:24:32 +00:00
Karim Pinter
8ea0a82a6a xcb: make beep work
Adding xcb_flush after xcb_bell makes it work, no need to move the
mouse.

Fixes: QTBUG-75617
Change-Id: Ieeb47468bf31cfa6fcf2d48da56d54b9e6eac6fe
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
2019-05-06 16:12:40 +00:00
Edward Welbourne
5146582b8d Compile-fix: add private/ prefix to qnetconmonitor_p.h
Build was failing without it.

Change-Id: I23a6e8a359e6208f78fa9ef571b8b27f8ecb3628
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2019-05-06 15:32:12 +00:00
Lorn Potter
837c80bad3 wasm: fix passing environmental variables
Task-number: QTBUG-75530
Change-Id: Ic0f0bd8ce863f55d737d96bbf9e5473466381c9b
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2019-05-06 09:49:38 +00:00
BogDan Vatra
854156dd07 Android: Nuke mips architectures
Mips archs were removed from Android NDK long time ago.

Change-Id: Icf64a1e2cfbe3fe7307c7898b14fd199d9eeaad3
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2019-05-06 08:01:04 +00:00
Mikhail Svetkin
a43c3b456a rtems: add mkspecs for new operation system RTEMS
Change-Id: Idd01ccd69c296df1a67a90260fc4e5547acf3079
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Ryan Chu <ryan.chu@qt.io>
2019-05-06 06:56:33 +00:00
BogDan Vatra
43763e2796 Android: Fix x86_64 linking
x86_64 libs are located in ANDROID_PLATFORM_ROOT_PATH/usr/lib64
not in ANDROID_PLATFORM_ROOT_PATH/usr/lib .

Fixes: QTBUG-47672
Change-Id: Ia1f74f7c2a30b276b95fd0e7dcf8370d739e3c41
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2019-05-06 06:42:23 +00:00
Qt Forward Merge Bot
e4e5a1f0b7 Merge remote-tracking branch 'origin/5.12' into 5.13
Change-Id: Iaad9509712c848ed42ada2c25065162a6fc5a930
2019-05-06 01:00:13 +02:00
Christian Ehrlicher
298ab596a1 QtSql: mark QSqlite2 plugin as obsolete
Mark QSqlite2 plugin as obsolete so it can be removed with Qt6. The last
sqlite2 release was 2005 so it's time to remove this plugin in Qt6.

[ChangeLog][QtSql][SQlite2] Marked QSQLITE2 plugin as obsolete - it will
be removed with Qt6 together with the QTDS plugin

Change-Id: I9861331d4eb2b13f38b9e0e09ad9472b70e9b6e2
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2019-05-05 20:59:46 +00:00
Lars Knoll
08101b2b27 Fix qplugin.h for Qt 6
Change-Id: I3ae6594a2982f990a5b3851a063b0b2f02d16bd9
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2019-05-05 17:34:57 +00:00
Lars Knoll
82ddecfb17 Deprecate {to,from}Std{List,Vector}
ask our users to use the range constructors instead. This will allow
us to remove the include dependency towards <list> and <vector> in
Qt 6.

Change-Id: Id90f2058432e19941de1fa847100a7920432ad71
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2019-05-05 17:34:43 +00:00
Mikhail Svetkin
a50b29d65b Fix dnd regression c427ba53aa
Qt starts drag-and-drop on a mouse button press event. Cococa in
this case won't send the matching release event, so we have to
synthesize it here.

Task-number: QTBUG-72417
Change-Id: I645b6a2733c1ea11ac4545cf3405f826af45fa47
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2019-05-05 16:43:31 +00:00
Joerg Bornemann
6288c12bb4 Resolve QMAKE_INCDIR_VULKAN on every qmake call
Do not store this variable locally, because
a) it might change if the SDK location changes
b) does not play well with Qt installer packages which would provide the
include path of the build machine.

To achieve this we introduce the (usual) magic value - for
QMAKE_EXPORT_INCDIR_VULKAN to denote "do not export this value".

Fixes: QTBUG-73796
Change-Id: Ied26ee12cbcdf7f5f6e1caef5d29dadf6309c5d6
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
2019-05-05 13:15:37 +00:00
Nick Shaforostov
5d76529580 fix crash when using ALDI usb-stick with broken filesystem
I was using a cheap usb-stick from ALDI supermarket with fat32,
and my application crashed because filesystem was empty.

Unrealistic scenario, but still just returning here false is better
than a crash

Change-Id: I8979d5a4e19ce57770ab03983e847b272ebf7019
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2019-05-05 09:15:25 +00:00
Nick Shaforostov
4d5fb551d6 fix compilation with various -no-feature-* options
Change-Id: Ic1975db497613e3efe50be4246c167efe10d8e31
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2019-05-05 09:14:48 +00:00
Allan Sandfeld Jensen
835c3e94f6 Only call addFontToDatabase once per family,style
We get a call to storeFont for each supported script-type of
a font, but we use the font signature to register all the supported
types at once, and can thus save ~3/4 calls to addFontToDatabase.

Change-Id: I9d06252fb7f805e7babac58d82fa412ec4e0e36a
Fixes: QTBUG-59360
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2019-05-03 19:22:59 +00:00
Christian Ehrlicher
615b02bfa2 QtCore: compile with QT_DISABLE_DEPRECATED_BEFORE=0x050d00
Don't call or implement functions which are not available when compiling
with QT_DISABLE_DEPRECATED_BEFORE=0x050d00

Change-Id: I949b12bba880c516391f312f58c8748303a1790d
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2019-05-03 18:29:52 +00:00
Massimo Callegari
ff447717a2 configure: skip Freetype/Fontconfig autodetection only on MSVC
In Windows there are package-based systems like MSYS2 that provide
pkg-config for packages lookup.
This change skips autodetection only for MSVC which doesn't
provide the aforementioned feature.

Task-number: QTBUG-57436
Change-Id: Iaed517e93031adbd2fd9dbf350764f76569b94ea
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
2019-05-03 17:00:42 +00:00
Liang Qi
76efe79d5c Merge "Merge remote-tracking branch 'origin/5.12' into 5.13" into refs/staging/5.13 2019-05-03 12:55:47 +00:00
Kevin Funk
b5547e49cd Fix minor compiler warning from Clang
Fixes:
.../qcolorspace_p.h:70:25: warning: explicitly defaulted copy assignment operator is implicitly deleted [-Wdefaulted-function-deleted]
    QColorSpacePrivate &operator=(const QColorSpacePrivate &other) = default;
                        ^
.../qcolorspace_p.h:63:28: note: copy assignment operator of 'QColorSpacePrivate' is implicitly deleted because base class 'QSharedData' has an inaccessible copy assignment operator
class QColorSpacePrivate : public QSharedData
                           ^

Change-Id: I20d453279ec2cb8b9b9d1364762c6e560d6f843d
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-05-03 12:04:43 +00:00
Lars Knoll
e929808c83 Prefix QTextStream operators with Qt::
Change-Id: I128769cb78abb8168f0bf29cef8c693073793ced
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2019-05-03 10:04:47 +00:00
Lars Knoll
1f1e04f29f Deprecate providing a function as a property flag
Property flags such as SCRIPTABLE should not get controlled by
a function. I can't see this feature being used anywhere and it
leads to additional overhead that I'd like to get rid of for Qt 6.

Change-Id: Iaa10b2b3bfb7eec11401f7b6bb887c9467b67183
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-05-03 09:36:48 +00:00
Lars Knoll
e3b55616e2 Prefix QTextStream operators with Qt:: in tests
Change-Id: I852f016fcb619a9e634deee6efb1fe7930d974c8
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2019-05-03 09:36:36 +00:00