Commit Graph

39753 Commits

Author SHA1 Message Date
Allan Sandfeld Jensen
78a7e54f8f Custom color-space based on chromaticities
Change-Id: I7fa6efa8993aa2b79ea60b6a21bf57c4f67a120f
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2019-05-02 20:50:46 +00:00
Giuseppe D'Angelo
fe57936d8c qIsNull: redo implementation
The reason for using type-punning through an integer was
to avoid compiler warnings about float comparisons. We have
now a better mechanism to suppress such warnings,
so there is no need to be "clever" and trigger UB because
of the union usage.

Drive-by change: add constexpr+noexcept because now there's no
longer UB.

Change-Id: I29f7514e39055658d4ef6c431daf5abfc660df16
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2019-05-02 20:10:11 +00:00
Giuseppe D'Angelo
1b16f79bf2 QSharedData: delete the copy assignment operator
Do not merely declare it as private, use C++11's = delete.
This has the nice side effect that subclasses are no longer
implicitly copy assignable either (they shouldn't be).

Change-Id: Icd03f71006c31baf7d079365fa3bea1a2a9d559b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2019-05-02 19:44:08 +00:00
Andy Shaw
047633a945 Cocoa: Get the right zero digit for the locale
Change-Id: Ic23e541e1b12b3c94f8d191cb8fb0f76086b69a5
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2019-05-02 17:48:39 +00:00
Giuseppe D'Angelo
513e29af1d QSharedPointer: fix docs for create()
In 5.12 only the variadic argument version is left (as all
supported compilers have variadic templates). Remove the docs
of the nullary overload, and fix the docs for the remaining
overload.

Change-Id: I54cc7ea71cc61ba1330a9ad92e4fa2ae7f749bac
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2019-05-02 16:18:43 +00:00
Friedemann Kleint
0d39cf6865 QTextMarkdownImporter: Fix deprecation warning
Use QTextCharFormat::setAnchorNames(), fixing:
text/qtextmarkdownimporter.cpp:322:36: warning: 'void QTextCharFormat::setAnchorName(const QString&)' is deprecated: Use setAnchorNames() instead [-Wdeprecated-declarations]

Amends 65314b6ce8.

Task-number: QTBUG-72349
Change-Id: I7f909d1fcc5c4045c738b5a5c491b2ac1de6eac5
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2019-05-02 15:24:09 +00:00
BogDan Vatra
595d816c58 Android: Copy extra libs in aux mode
Change-Id: Ibbdd6b9c23c094923bc60a8a013f3ac356444510
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-05-02 14:50:33 +00:00
Robert Loehning
884dc0be7f Remove redundant file from tests
Change-Id: Icb398f1ba32dd1cc3a1e042818750c253539fae3
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2019-05-02 14:40:14 +00:00
Milian Wolff
75634c9a53 Reduce amount of tracepoints required for event tracking
Encode the consumed/filtered state in the _exit tracepoint and remove
the separate tracking of receiver event handling. Combined, this
reduces the size of the trace file.

Change-Id: Icb3cb2dd47798543905cea450046d6fad559a15b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2019-05-02 14:15:58 +00:00
Giuseppe D'Angelo
bfe8b506c7 Upgrade PCRE2 to 10.33
Adjust also the attribution file.

Change-Id: I27bdbcf07bdca51bb5ae169ca50dd63502f5468f
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2019-05-02 13:38:54 +00:00
Giuseppe D'Angelo
936632c9c1 QList: fix regression in swapItemsAt
Commit e0d2b50249 makes swapItemsAt
use ADL to find swap(). Problem is, QList has a swap() function
(that swaps the elements at the specificed _indices_); that function
will be found before ADL kicks in.

So do the second best thing: use qSwap instead.

Change-Id: Icf2b4e3ce09117e4056acbad3e2d8a625861d807
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2019-05-02 13:24:36 +00:00
Joerg Bornemann
d5071a4016 Fix prl replacements if libdir is in QMAKE_DEFAULT_LIBDIRS
QMAKE_PRL_LIBS contains absolute paths to libraries, e.g. libqtpcre2.a.
On "make install" the libdir is replaced with the installation target
libdir. If the libdir is in QMAKE_DEFAULT_LIBDIRS (e.g. /usr) then the
replacement was empty. That worked fine for include paths but not for
paths referencing files in that libdir:
/my/build/lib/qtbase/lib/libqtpcre2.a would become /libqtpcre2.a.

Add another replacement that takes care of file paths and inserts
$$[QT_INSTALL_LIBS].

Fixes: QTBUG-75460
Change-Id: I4e84478a50c24d4143ad5695493cad2992735cf2
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Samuli Piippo <samuli.piippo@qt.io>
2019-05-02 13:04:22 +00:00
Paul Lemire
389dec3e7c Only generate temporaries when it makes sense
- Never for global inputs
- Otherwise only if the temporary is referenced more than once
  -> meaning it's actually caching the result of some operation

Tests updated accordingly.

Change-Id: Ic76615370d23dee3965ca6350d5257a8be5a3e22
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
2019-05-02 12:47:05 +00:00
Lars Knoll
91b3099d71 Compile with Qt 6
Change-Id: I6efa420acab070e625f99b49eee08076d4a6a9ff
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2019-05-02 11:52:51 +00:00
Lars Knoll
9c04e7c61e Fix API for Qt 6
Change-Id: Ic07b5cf09ed410a27ca95f106747f98de4d86d68
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2019-05-02 11:52:45 +00:00
Lars Knoll
1e4042d03f Compile with Qt 6
Change-Id: I6d8d562a871a2f49db5db8630a08f53a14c0f7d3
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2019-05-02 11:52:39 +00:00
Lars Knoll
c7a5cdb98c Compile with Qt 6
Change-Id: I2cd5f93d01b2a7645bf6bccede484fc301209007
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2019-05-02 11:52:34 +00:00
Lars Knoll
857a83259d Compile with Qt 6
Change-Id: Ie45f4dc6d44723c8992872e6c4c2e30d7257ca0c
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2019-05-02 11:52:28 +00:00
Lars Knoll
93d3248ed0 Compile for Qt 6
Change-Id: I3069081d1c706980a8133b06d46588c4310cb304
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2019-05-02 11:52:18 +00:00
Lars Knoll
a08c0ca949 Prepare QDataStream for Qt 6.0
Add the required datastream versions for 6.0. Of course the number for
5.15 and 6.0 is still something we can bump.

Change-Id: I676385817befc06ea8d0ff1e9eba9c94cb4698b0
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2019-05-02 11:52:13 +00:00
Lars Knoll
415c435d60 Compile when bumping the Qt version to 6.0
Change-Id: Idae1a2df144598df3921ef9a12e0e0b740fd723d
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2019-05-02 11:52:07 +00:00
Lars Knoll
343528841e Prefix textstream operators with Qt::
As the non prefixed variants are deprecated

Change-Id: I2ba09d71b9cea5203b54297a3f2332e6d44fedcf
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2019-05-02 11:52:02 +00:00
Volker Hilsheimer
185ba7f4cf Increase entityCharacterLimit to 4096
The previous fix to decrease the limit to 1024 breaks the parsing
for some files. The limit is arbitrary, so increasing it to 4096,
which is what some linux distros have been working with.

Change-Id: I131f15278aa99c3f91db2e1ec2d14156ceed4775
Fixes: QTBUG-35459
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Reviewed-by: David Faure <david.faure@kdab.com>
2019-05-02 11:42:57 +00:00
Allan Sandfeld Jensen
a2b38f64e6 Remove handling of missing =delete and =default support
Change-Id: I006dfd0b7cfa3bda5e5ab01bcefa851f031dfe0e
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2019-05-02 11:14:29 +00:00
Edward Welbourne
7a0d4b39da Doc-fix: mention FP_ZERO as a possible return of qFpClassify()
This follows up on commit 84aea6c091, in
which I forgot to mention this possible return value.

Change-Id: I109bed66bc0fd63d7ee289bfaea65b3d05c6560c
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2019-05-02 10:56:11 +00:00
Edward Welbourne
c940ca50ce Remove spurious class-name prefixes in its own methods
Change-Id: I13093e02b251a084e468a50471cf1b9256555e40
Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2019-05-02 10:56:01 +00:00
Liang Qi
166889ddcb Merge remote-tracking branch 'origin/5.12' into 5.13
Conflicts:
	src/corelib/kernel/qobject.cpp

Change-Id: I8ca1163a1fa8072dcd16ea4426c58219149599fd
2019-05-02 09:39:31 +02:00
Timur Pocheptsov
402cb62d5d Introduce QNetworkConnection/Status/Monitor
Private classes to replace broken or even not working at all 'session management'
and 'bearer manager' (on at least two major platforms we support). This
implementation is macOS/iOS-specific and uses SystemConfiguration framework,
or more precisely SCNetworkReachability's part of it.

Task-number: QTBUG-40332
Change-Id: Iac5f44c4063c4092b93b8cf2bde3fb2c524855b3
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2019-05-02 05:07:39 +00:00
Shawn Rutledge
355ecfb11c Add QTextMarkdownWriter::writeTable(QAbstractTableModel)
This provides the ability to write live data from a table to Markdown,
which can be useful to load it into a text document or a wiki.
But so far QTextMarkdownWriter is still a private class, intended to be
used experimentally from QtQuick and perhaps later exposed in other ways.

Change-Id: I0de4673987e4172178604e49b5a024a05d4486ba
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2019-05-02 04:10:35 +00:00
Shawn Rutledge
0df30ff22e Add task list checkbox manipulation features to the TextEdit example
Change-Id: I5f0b8cb94d1af609ec531f9765d58be65b1129a3
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
2019-05-02 04:10:28 +00:00
Shawn Rutledge
75256d62d2 Render markdown task lists (checkboxes instead of bullets) in QTextEdit
Checkboxes are right-aligned with any bullets that are in the same
QTextList so that there is enough space to make them larger than bullets.
But hopefully mixing bullets and checkboxes will be a rarely-used feature.

Change-Id: I28e274d1f7883aa093df29eb4988e99641e87a71
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
2019-05-02 04:10:21 +00:00
Shawn Rutledge
deae75ae09 TextEdit example: add Markdown as a supported format
Also use QT_CONFIG to disable features gracefully if Qt is
configured without them.

Change-Id: I38e92bf5fd70f77fc4d5158769d590619be8905f
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
2019-05-02 04:10:10 +00:00
Alexander Volkov
ef3daddae1 Use QPlatformTheme::TouchDoubleTapDistance for touch events
... and update the cached values on theme change.

Modify tst_QWidget::touchEventSynthesizedMouseEvent()
to avoid unexpected double click detection.

Change-Id: I151c47e851ebba7550b1b09caca2781c28d7d3d9
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2019-05-01 20:29:16 +00:00
Allan Sandfeld Jensen
b32b61f17e Remove handling of missing Q_COMPILER_RVALUE_REFS
Remove remaining handling of missing support for rvalue refs.

Change-Id: I78bab8bccfeeb9c76f464f345874364a37e4840a
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2019-05-01 20:24:45 +00:00
Giuseppe D'Angelo
2ded0043ca Moc: compile generate_keywords with corelib only
It does not depend on QtGui.

Change-Id: If7b01d1a6d2ce3945562f4480177ce883abfdbf4
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2019-05-01 18:37:44 +00:00
Giuseppe D'Angelo
d4435a37ca Add qobject_cast operators for std::shared_ptr
Mimicking what we currently have for QSharedPointer, but also adding
* snake_case version (matching the ones in std)
* rvalue-overloaded versions (matching the C++2a overloads).

[ChangeLog][QtCore][QSharedPointer] Overloads of
qSharedPointerObjectCast have been added to work on std::shared_ptr.

Change-Id: I26ddffd82b000bf876e7c141fdce86a7b8c1d75a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2019-05-01 18:37:32 +00:00
Shawn Rutledge
23c2da3cc2 Add QTextMarkdownWriter, QTextEdit::markdown property etc.
A QTextDocument can now be written out in Markdown format.

- Add the QTextMarkdownWriter as a private class for now
- Add QTextDocument::toMarkdown()
- QTextDocumentWriter uses QTextMarkdownWriter if setFormat("markdown")
  is called or if the file suffix is .md or .mkd
- Add QTextEdit::toMarkdown() and the markdown property

[ChangeLog][QtGui][Text] Markdown (CommonMark or GitHub dialect) is now
a supported format for reading into and writing from QTextDocument.

Change-Id: I663a77017fac7ae1b3f9a400f5cd357bb40750af
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
2019-05-01 14:31:27 +00:00
James McDonnell
9ec564b0bf Basic foreign window support for QNX
Requires a screen with working context permission parsing.  Currently,
all context permission requests fail because the parsing is incorrect.
A context permission is added temporarily to prevent CLOSE/CREATE
events when Qt reparents foreign windows.  Qt does this temporarily
when a foreign window is wrapped in a widget.

Change-Id: I84c18e70d43239286fcd53715332d7015cf1a826
Reviewed-by: Rafael Roquetto <rafael@roquetto.com>
2019-05-01 13:49:18 +00:00
Vova Mshanetskiy
5f4b03659b Android: Fix positioning of text editor context menu
The old code in QtActivityDelegate.updateHandles() and
EditPopupMenu.setPosition() could use size of EditPopupMenu.m_view to
calculate position of context menu before that size was calculated
during an asynchronous layout pass. In particular m_view reports size
0x0 when context menu is opened for the first time after start of the
application. In this case the context menu was displayed on top of the
text editor instead of being displayed above it.

This patch fixes that problem by moving all positioning code from
QtActivityDelegate.updateHandles() to EditPopupMenu.setPosition() and
adding an OnLayoutChangeListener which calls setPosition() again each
time the size of m_view changes, including when it changes for the first
time from 0x0 to a real value.

Change-Id: I670fef811a4dcba5524f7520ea41a47978dd10f1
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
2019-05-01 12:11:04 +00:00
Vova Mshanetskiy
a04629d9c2 Android: Fix positioning of selection handles in text editors
The old code used size of m_cursorView to calculate position of the
cursor handle popup. But since on Android layout process is
asynchronous, both width and height of m_cursorView was 0 upon first
call to setPosition(). This resulted in selection handles being
initially displayed at a wrong position for a fraction of second and
then quickly moving to the correct position. In some cases handles
stayed at the wrong position until touched by user.

This patch replaces use of m_cursorView's size with use of m_popup's
size. Width and height of m_popup may be used immediately because they
are explicitly assigned in initOverlay(). The size of m_popup should be
always equal to the would-be size of m_cursorView because of how it is
calculated.

Change-Id: I9868c9a5ce0103d8328b2478cf82feaceba7f404
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
2019-05-01 12:10:50 +00:00
Giuseppe D'Angelo
e0d2b50249 QList: do not call std::swap directly; use ADL
Change-Id: Iaf6b965dd123f39436ba134ea1065d8dc4278c1e
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2019-05-01 10:31:05 +00:00
Allan Sandfeld Jensen
ef05c48898 Fix -Wdeprecated-copy warnings
Implicit copy constructors or methods are considered deprecated for
classes that has one of the two or a destructor.

The warning is enabled with -Wextra in gcc 9

Change-Id: Ic9be654f2a142fb186a4d5a7d6b4f7d6f4e611d8
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2019-05-01 07:39:55 +00:00
Edward Welbourne
abd2cf3b0a Remove extraneous sodipodi/inkskape cruft from Qt SVG
Change-Id: Ib2d77331b33cac97e819e8273362703fcd80886c
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2019-04-30 16:15:04 +00:00
Volker Hilsheimer
78d0b6e975 Ignore failing test for free space on APFS
The file system appears to cache too aggressively, so if the reported
storage size doesn't change after flushing to disk, ignore the failure.

Change-Id: Iba7dce79591447fac296bfe92c2dc993d36d0c2a
Fixes: QTBUG-69868
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2019-04-30 10:58:13 +00:00
Volker Hilsheimer
dc3e5c4838 Consolidate Unix and Windows implementations of QHostInfo::fromName
The implementations were practically identical, so we can just move the
code into qhostinfo.cpp, cleaning up things along the way.

Since QHostInfoAgent is an internal class, add the shared code as
additional static helper functions. And since half the code already used
QCoreApplication::translate anyway, we can remove the QObject
inheritance which was only added for getting a tr().

Change-Id: I58eafbdc3e7d06d2e898486a1add63cd63d98c96
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2019-04-30 10:57:56 +00:00
Joerg Bornemann
0e4326d717 Remove cruft from testProcessEOF.pro
TEMPLATE_PREFIX is gone since Qt 5.0.0.

Change-Id: I181962b942191187baf62f13d0abd17e7ebdcce1
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
2019-04-30 10:51:02 +00:00
Milian Wolff
75c0c02641 Don't pass scope args to _exit trace points
When we trace a scope, then we pass the scope args to the _entry trace
point. There is no need to do that also for the _exit trace points, it
just blows up the trace data for no obvious gain. Any decent tracing
consumer can easily find the args for the _exit call by matching it to
its _entry call.

Note that this is standard practice in trace points, and also done like
this in the Linux Kernel trace points for example.

Change-Id: I273293b0c7e799767acc1960b50ab675fc765a36
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2019-04-30 07:42:19 +00:00
Milian Wolff
e5eaae100b Refactor QMetaObject::activate tracepoints
Use Q_TRACE_SCOPE and the corresponding naming scheme. Additionally,
don't change the behavior of the code when tracing is enabled, i.e.
continue to return early if possible.

Change-Id: I9ba9679869db1541a19bc832beede902224c52f2
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2019-04-30 07:42:10 +00:00
Tony Sarajärvi
3308a81942 Extend blacklisting of setWindowState to cover RHELs
Task-number: QTBUG-68864
Change-Id: I7503877fbbe6109806d9fd087514588d2ac640c7
Reviewed-by: Heikki Halmet <heikki.halmet@qt.io>
2019-04-29 17:11:08 +00:00
Jesus Fernandez
d647cf85fa Tests: Simplify MyCookieJar
Don't reimplement the protected functions in the base class just
override the access with the using keyword.

Change-Id: I323487d9ddb1d458d5faca020c3eb4d931a9b226
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2019-04-29 14:11:00 +00:00