Commit Graph

40870 Commits

Author SHA1 Message Date
Friedemann Kleint
9dc594b2bf QNetworkConnectionMonitor: Fix compilation with older Windows Kits
Remove "final" since it has problems with 10.0.15063.0:

qnetconmonitor_win.cpp
C:\Program Files (x86)\Windows Kits\10\include\10.0.15063.0\winrt\wrl/client.h(61): error C3246: 'Microsoft::WRL::Details::RemoveIUnknownBase<T>': cannot inherit from 'QNetworkConnectionEvents' as it has been declared as 'final'
        with
        [
            T=QNetworkConnectionEvents
        ]
kernel\qnetconmonitor_win.cpp(102): note: see declaration of 'QNetworkConnectionEvents'
kernel\qnetconmonitor_win.cpp(373): note: see reference to class template instantiation 'Microsoft::WRL::Details::RemoveIUnknownBase<T>' being compiled
        with
        [
            T=QNetworkConnectionEvents
        ]
C:\Program Files (x86)\Windows Kits\10\include\10.0.15063.0\winrt\wrl/client.h(61): error C3246: 'Microsoft::WRL::Details::RemoveIUnknownBase<T>': cannot inherit from 'QNetworkListManagerEvents' as it has been declared as 'final'
        with
        [
            T=QNetworkListManagerEvents
        ]
kernel\qnetconmonitor_win.cpp(468): note: see declaration of 'QNetworkListManagerEvents'
kernel\qnetconmonitor_win.cpp(650): note: see reference to class template instantiation 'Microsoft::WRL::Details::RemoveIUnknownBase<T>' being compiled
        with
        [
            T=QNetworkListManagerEvents
        ]

Change-Id: Ia35545b65acaebea3fcff194884be8a156974123
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2019-08-13 10:32:04 +02:00
Liang Qi
275ad4ce4c Merge "Merge remote-tracking branch 'origin/5.13' into dev" 2019-08-13 10:20:13 +02:00
Liang Qi
1dade1bd8a Merge remote-tracking branch 'origin/5.13' into dev
Conflicts:
	mkspecs/win32-clang-msvc/qmake.conf
	src/corelib/tools/qlist.h
	src/gui/painting/qcompositionfunctions.cpp
	src/gui/painting/qtriangulator_p.h
	src/gui/text/qfontengine_p.h
	src/network/kernel/qhostinfo_p.h
	src/platformsupport/fontdatabases/freetype/qfontengine_ft.cpp

Done-With: Allan Sandfeld Jensen <allan.jensen@qt.io>
Change-Id: Ib8a0308cf77224c4fbdcf56778fdac4a43e37798
2019-08-13 09:46:17 +02:00
Joerg Bornemann
42d32e468a Determine dependencies of Windows resource files
Windows resource files support a subset of C preprocessor directives.
Among others they can have #include directives.

Use QMake's own scanner to retrieve the files that are included by a
Windows resource file and add them to its dependencies.

For the test case the TestCompiler class had to be extended:
runCommand is now public, and commandOutput is less peculiar.

Fixes: QTBUG-3859
Change-Id: I138703352c37c98297c0574a9a440510c1c494b8
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2019-08-13 09:38:46 +02:00
Volker Krause
3d29f2198f Add Q_ENUM for QCompleter enums
This is necessary in order to use the properties of QCompleter that use
these enums.

Change-Id: I9f7edfc1137f200810b6bc98d27709695f37de5d
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2019-08-13 08:44:40 +02:00
Lars Knoll
00076a2695 Don't insert items into the wrong row
This happened to work by chance, as QList::insert() would
gracefully handle out of bounds insertions.

Change-Id: I7ee1e645ed9a538946a509957ce5155641ffea1d
Reviewed-by: David Faure <david.faure@kdab.com>
2019-08-13 07:34:00 +01:00
Lars Knoll
b68dbdd009 Fix return value
The method actually returns a boolean.

Change-Id: I5887ad23e19be9a9c87c7858d81891378fd23cc9
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2019-08-13 07:33:21 +01:00
Lars Knoll
965a5cc5ad Inline QMetaObjectPrivate::signalOffset()
This saves one more function call in activate().

                       before          after
string based connect:  2436            2380
pointer based connect: 3265            3160
not connected:          400             307
disconnected:           489             404
5 slots connected:     4515            4522

Change-Id: I4789c7400497c2aa08886ea964af5e5e4703eeab
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2019-08-13 07:32:33 +01:00
Friedemann Kleint
cc3918abbc RHI/Windows: Fix launching of MSVC binaries on Windows 7
Dynamically resolve CreateDXGIFactory2() which is not present
on the platform.

Task-number: QTBUG-76845
Change-Id: I4d15d72633544a8c11d2b78c8736cd20a2afdff1
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2019-08-13 08:19:10 +02:00
Thiago Macieira
7922cd5272 QChar: add FormFeed (FF) special character
[ChangeLog][QtCore][QChar] Added FormFeed (FF) special character.

Fixes: QTBUG-77089
Change-Id: I1024ee42da0c4323953afffd15b245a508f545f0
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2019-08-12 22:06:39 -07:00
Marc Mutz
09b0038513 Short live qt_unique_lock/qt_scoped_lock! (until C++17)
Now that QRecursiveMutex is getting split off of QMutex, QMutexLocker
will stop working on QRecursiveMutex once the split has been finalized
in Qt 6.

Even today, QMutexLocker contains casts from QBasicMutex to QMutex
that some reviewers are uncomfortable with. One way to carry
QMutexLocker forward is to template it on the mutex type, possibly
with aliases like QBasicMutexLocker and QRecursiveMutexLocker. C++17
code would then not require a port, thanks to CTAD.

But we have the problem now, and we can't template QMutexLocker in Qt 5.

The alternative is to look at std and realize that they have surpassed
QMutexLocker in expressiveness already. A scoped_lock cannot be
unlocked again, a unique_lock can be moved around. QMutexLocker
doesn't do either. The only "problem" is that the std lock classes are
already templates, but we can't, yet, rely on C++17 CTAD to make them
look as if they weren't.

So, prepare for a future with C++17 CTAD by writing factory functions,
qt_scoped_lock and qt_unique_lock, which will later port mechanically
to their C++17 equivalents (mostly).

The functions are added to a new private qlocking_p.h becauee we don't
want to make them public. These are for use in Qt's own implementation,
or for users that don't care about compatibility and will not mind them
to be removed once we depend on C++17. Originally, I planned to use
qmutex_p.h instead, but that header is not self-contained and causes
build errors when we started to include it into libraries other than
QtCore.

Regarding the return value of qt_scoped_lock: Ideally, we'd like to
return a std::scoped_lock, but two things stand in the way: First,
scoped_lock was only added in C++17 (we fall back to lock_guard if
scoped_lock is not available). Second, returning one from a function
requires C++17 guaranteed copy elision, because neither scoped_lock
not lock_guard have a copy ctor. In order for code not to come to
depend on a particular lock class, we return any of lock_guard,
unique_lock or scoped_guard, depending on what the compiler supports,
and therefore wrap the functions in the unnamed namespace to avoid
running into ODR if (private) headers are used from different projects
(autotests, e.g.). By the time we can drop them, however, qt_*_lock
will be semantically 100% identical to their replacements.

Port some initial users.

Change-Id: I2a208ef2a4a533ee8e675812273986460e6b4d00
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2019-08-13 05:05:59 +00:00
Alessandro Portale
fb703aea69 Docs: Fix the snippet lookup for QFileDialog::getOpenFileContent
src_gui_dialogs_qfiledialog.cpp had two snippets labeled "14". This
change bumps one of them to "15" and fixes the the snippet lookup for
QFileDialog::getOpenFileContent accordingly.

Also, fix two typos:
"QSting" -> "QString" and "contents has" -> "contents have".

Change-Id: Ic018c23b6ca585f30c116b8a6eb29293560c7a35
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2019-08-12 19:51:51 +00:00
Liang Qi
41f77a6179 Merge "Merge remote-tracking branch 'origin/5.12' into 5.13" 2019-08-12 19:40:48 +02:00
Allan Sandfeld Jensen
d45908e242 Support missing white-space:pre-line CSS
A mode that only preserves new lines.

Change-Id: I612347b181c6e6c41dfae0cf60b22a662cba1b7e
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2019-08-12 17:24:05 +01:00
Alexandru Croitor
a1609d1603 CMake: Add documentation for qt5_import_plugins()
Task-number: QTBUG-38913
Change-Id: If4a51e695864ab658fb5223fd8c2162b14a267c8
Reviewed-by: Kavindra Palaraja <kpalaraja@luxoft.com>
2019-08-12 18:24:02 +02:00
Kyle Edwards
63d9cd17d0 CMake: Add support for auto-importing plugins in CMake
This commit adds transitive dependencies to the plugins, so that a
sane set of default plugins get auto-imported when linking against a
module. It also provides a new function, qt5_import_plugins(), which
allows you to override the set of plugins that get imported. The decision
of whether or not to import a specific plugin is based on several custom
target properties and a very clever generator expression.

Note that this change only imports plugins on static Qt builds. It
does nothing on shared Qt builds, as the shared libraries already have
their own plugin import mechanism.

[ChangeLog][CMake] Added ability to auto-import non-qml plugins on
CMake builds

Task-number: QTBUG-38913
Task-number: QTBUG-76562
Change-Id: I2d6c8908b521cf6ba1ebbbc33a87cb7ddd9935cf
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-08-12 18:23:58 +02:00
Alexandru Croitor
ef74730a59 CMake: Prevent creation of library target when it already exists
When doing plugin auto-importing as part of a Qt static build, it can
happen that the same module FooConfig.cmake file is loaded twice.
Make sure not to create the same target twice if it was already
created previously.

Task-number: QTBUG-38913
Change-Id: I734c83ff3c0bb9e3ee9bff37971209c57abaa2b9
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
2019-08-12 18:23:54 +02:00
Joerg Bornemann
7f4f346e51 Fix escaping of < and > in QMake's XML generator
Having those characters in QMAKE_EXTRA_COMPILERS broke the generated
VS project file. They must be replaced by XML entities.

Fixes: QTBUG-1935
Change-Id: Iff1edbeabec4cedef777071682412970b7769f19
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2019-08-12 14:46:20 +02:00
Liang Qi
44c393f9b6 Merge remote-tracking branch 'origin/5.12' into 5.13
Conflicts:
	config.tests/arch/write_info.pri
		Repair architecture config test for the WASM_OBJECT_FILES=1 build mode
	configure.pri
	tests/auto/gui/text/qtextdocument/tst_qtextdocument.cpp

Done-With: Jörg Bornemann <joerg.bornemann@qt.io>
Change-Id: I9e12088356eb5bc65b53211cd7a8e330cccd1bb4
2019-08-12 13:23:11 +02:00
Joerg Bornemann
50e496bd3a Do not use QList<QMakeLocalFileName>
QMakeLocalFileName is not suitable for QList. Use QVector instead.

Change-Id: I5a3c4c8da14c0a920b5a57cba148ad68ac0f85a2
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2019-08-12 08:05:14 +02:00
Joerg Bornemann
e66f247ccf Doc: Extend QMake's documentation of RC_FILE and RES_FILE
RC_FILE is not an internal variable that "rarely needs to be
modified". Mention that it's about Windows resources and link to the
corresponding section.

RES_FILE: Add link to RC_FILE and the more general section. Also
rephrase "compiled Windows resource file" to "Windows resource
compiler's output file" which is more precise.

Fixes: QTBUG-8709
Change-Id: I19c61e6a9505d45fc13fefbcd0ba9441191aa42e
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
Reviewed-by: Kavindra Palaraja <kpalaraja@luxoft.com>
2019-08-12 08:04:39 +02:00
Samuel Gaist
08f0db4a72 doc: Fix QImage Format_RGBX64 documentation
The current explanation refers to itself rather than Format_RGBA64.
This patch fixes that.

Change-Id: Idc4c44ca71813ea2bdddba0c936f772cb7091ca8
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com>
2019-08-11 22:31:14 +02:00
Morten Johan Sørvig
fcc5323a08 Make test less dependent on moving the cursor
The sendMouseMove() function calls QTest::mouseMove(),
which again calls QCursor::setPos() to move the cursor.
It then creates and sends a MouseMove event, using
the constructor which picks up the global position
by calling QCursor::pos().

On macOS 10.14, QCursor::setPos() may silently fail
if the user does not grant the application permission
to move the cursor (via a dialog). As result of this
the mouse move event gets an incorrect global position.

Provide the global position directly when creating
the event to make sure it gets the correct value.

Task-number: QTBUG-75786
Change-Id: I3e8df450fea802783a3d1dbe471753f502b42de3
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2019-08-11 12:01:54 +02:00
Morten Johan Sørvig
9bcbba36c7 QWizard: Account for missing background image on macOS 10.14+
We were loading “Background.png” from the KeyboardSetupAssistant
app bundle. As of macOS 10.14 that image is no longer
there.

Adjust auto tests and document the behavior.

Change-Id: Icb4dd73b3fa88927e87bb86db2bc9f7b4a8094f7
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2019-08-11 10:01:46 +00:00
Morten Johan Sørvig
3729695cc9 macOS: Don’t show hidden windows while z-ordering
Calling [NSWindow orderBack] will make the window visible
again, and will e.g. bring back closed menus on application
modality changes.

Fixes: QTBUG-77281
Change-Id: I2f89b852ea9f8ab34c709cec96d93fe305984fb9
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2019-08-11 10:01:36 +00:00
Morten Johan Sørvig
5d7f113320 Add nullptr guard to QHighDScaling::scaleAndOrigin(QPlatformScreen *)
Commit b6ded193 added an unconditional dereference
of the platformScreen pointer, for calls where nativePostion
is non-nullptr.

Change-Id: I4a6fbbd0337f91d4fcb76c17b4dc60e1b9ad10ed
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2019-08-11 12:01:26 +02:00
Thiago Macieira
ffc2d57223 QList: fix some integer cast warnings from 64- to 32-bit
Not tested because we're not promising to fix them all. Just those two
that were reported.

Fixes: QTBUG-77391
Change-Id: Iec9c051acd73484c8d94fffd15b91f5e6348635d
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2019-08-10 17:10:47 -07:00
Thiago Macieira
a08ac1986d Fix integer overflow in QCryptographicHash's SHA-3 support
Because 256 MB * 8 = 2 Gbit, but length*8 is a signed integer overflow,
hence UB.

Can't really autotest this. Not all systems where we're going to test
can allocate 256 MB of RAM.

[ChangeLog][QtCore][QCryptographicHash] Fixed a bug that caused the
SHA-3 and Keccak algorithms to crash if passed 256 MB of data or more.

Fixes: QTBUG-77362
Change-Id: Iec9c051acd73484c8d94fffd15b91f4b1450f5d7
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2019-08-10 17:09:18 -07:00
Marc Mutz
c58ca4256d Deprecate QStringViewLiteral
As a macro, we can't directly deprecate it, but need to make it call
something deprecated. That is a new ctor with a new enum type
added. The type might be useful for other such ventures, so put it
into qglobal.h

Remove the QT_NO_UNICODE_LITERAL protection, as it's always false
these days, and QT_UNICODE_LITERAL is unconditionally #defined a 20
lines above.

[ChangeLog][QtCore][QStringView] Deprecated the (undocumented)
QStringViewLiteral macro. Just use u"" or QStringView(u"") instead.

Change-Id: I9141320225037e1bc6b7f920bf01a9d0144fdac2
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2019-08-10 22:13:49 +02:00
Volker Hilsheimer
b7d073e990 Refactor memory allocation for arguments of QMetaCallEvents
There are two cases:

In a BlockingQueuedConnection, QMetaCallEvent doesn't allocate memory
and instead passes already existing pointers through. A QSemaphore
is used to serialize data access between threads. So the constructor
taking a QSemaphore can be simplified to only accept an existing arg
array.

In a QueuedConnection, QMetaCallEvent needs to make deep copies of
the arguments, and memory needs to be allocated based on the number
of arguments. The previous code put the burden of memory allocation
on the code generating the event, while the memory was free'd by
~QMetaCallEvent. Instead, make it QMetaCallEvent's responsibility
to allocate and free the memory as needed, and adjust the code
generating QMetaCallEvents.

We can allocate the memory for types and pointers to arguments in a
single block, starting with the space for the array of void*, followed
by the space for the array of integers to avoid byte alignment issues.
By pre-allocating the space that's needed by three arguments, we can
avoid all mallocs for the majority of QMetaCallEvents.

Until this change has propagated through qt5.git, we need to keep the
old API that is still used by QtDeclarative around. Once QtDeclarative
has migrated to the new API, it can be removed.

Change-Id: Id7359ffc14897237ea9672dabae9ef199a821907
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-08-10 22:04:11 +02:00
Joerg Bornemann
e75aed1a96 Warn about conflicting DESTDIR/TARGET combination in debug_and_release
If a project has DESTDIR and TARGET set to fixed values, then the
target paths conflict when doing debug_and_release builds.

With this change we're detecting this situation and yield a warning.

Fixes: QTBUG-2736
Change-Id: Ib163db3463322792ab9fa5b997285ac9fc9819ab
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
2019-08-09 10:29:28 +02:00
Joerg Bornemann
38cfd3a8cb tst_qmake: Pass /nologo to jom like we do for nmake
Change-Id: Id9b2ac4dd7d591d471d3e21e8d78d4915620a2c1
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2019-08-09 10:29:03 +02:00
Marc Mutz
3ed21726ec Give some TLC to QAppleRefCounted
- add conditional noexcept to move special member functions
- use qExchange() in the move ctor implementation (turns a copy into a move)
- separate the default ctor from the ctor that acquires a resource, then
- overload the latter for rvalue payloads

Change-Id: I6816143a94fe6a74cf0d02569b83a752a8da3089
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2019-08-09 07:36:26 +00:00
Simon Hausmann
aca43d29f8 Fix sign change warning
The conversion from int to uint is deliberate here, so let's cast and
avoid a warning for users compiling with warnings enabled.

Change-Id: I7136d6161ace735be49f8d987338f6d401a5c78a
Fixes: QTBUG-77245
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2019-08-09 09:32:59 +02:00
Nils Jeisecke
9c891bead8 QTextDocument: add manual test for table border logic
This adds a manual test for the QTextTable border logic.

Two HTML files are bundled as resources:

table-border-test.html: Contains various test cases for the border
logic.

table-border-test-header.html: Contains a test case for printing a table
with a repeated header.

The test application allows:
- editing
- previewing
- printing
- opening the HTML in the system browser (via temp. file)

It is possible to edit the HTML with "live preview" so new test cases
can easily be implemented.

Change-Id: Ic88488bc8b7dd74d5c03c3363f55840423462325
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2019-08-09 07:21:25 +00:00
Yuhang Zhao
d502b19b28 Fix std detection for win32-clang-msvc
clang-cl will never support C++ standards newer than
C++14 without these flags.
I didn't add them to msvc-based-version.conf because
on Windows, only clang-cl use the same flags with MSVC,
both ICC and MinGW have their own flags. So they are
clang-cl specific flags.

Change-Id: Ia44a5ea4237c77ea5e897fffded32cbc008a4729
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2019-08-09 15:16:18 +08:00
Thiago Macieira
48b3ec6e8e QBitArray: change modulo 8 with bitwise-AND 7
They're the same only for unsigned values. Modulo of negative numbers
since C++11 has an expected behavior and generates more code:

%rax = %rax & 7:
        andl    $7, %eax

%rax = %rax % 8 with GCC:
        cqto
        shrq    $61, %rdx
        addq    %rdx, %rax
        andl    $7, %eax
        subq    %rdx, %rax
[read as ((%rax + (%rax < 0 ? 7 : 0)) & 7) - (%rax < 0 ? 7 : 0))]

With Clang:
        movq    %rax, %rcx
        sarq    $63, %rcx
        shrq    $61, %rcx
        addq    %rax, %rcx
        andq    $-8, %rcx
        subq    %rcx, %rax

Change-Id: Ife213d861bb14c1787e1fffd15b83b004be7eba0
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2019-08-08 20:29:32 -07:00
Thiago Macieira
6ce9404a6e QBitArray: fix fromBits() and actually test it
When I initially added it, it was ony for QCborValue, but I never added
the tests. Turns out there were two bugs:

[ChangeLog][QtCore][QBitArray] Fixed two bugs that caused QBitArrays
created using fromBits() not to compare equal to the equivalent
QBitArray created using other methods if the size was zero or not a
multiple of 4. If the size modulus 8 was 5, 6, or 7, the data was
actually incorrect.

Fixes: QTBUG-77285
Change-Id: Ife213d861bb14c1787e1fffd15b70573d162042c
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2019-08-08 20:27:04 -07:00
Soroush Rabiei
c595878aa3 Extract a large format string as a module constant value
The template for the "This is a generated file" notice made a clumsy
intrusion in the code in which it appeared, so split it out as a
constant of the module and access it by name where it's used.

Change-Id: Ic4dfb8e873078c54410b191654d6c21d082c9016
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2019-08-08 18:04:05 +02:00
Joerg Bornemann
ee8509d6cb QMakeLocalFileName: remove mutable specifier from real_name
There is no need to have both QString member mutable.

Change-Id: I592963b7c66e564b918d750fb47e903df0b0f9bc
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
2019-08-08 17:05:19 +02:00
Shawn Rutledge
9e8cf8f75b doc: Fix text formatting in the CSS Properties table
Every property name was already monospace, except this one.

Change-Id: I69f4e7cd67e6d4ab2a25b4f1d251ec5a2c925098
Reviewed-by: Nils Jeisecke <nils.jeisecke@saltation.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2019-08-08 16:46:13 +02:00
Nils Jeisecke
8664ee610d QTextDocument: allow css-styling of table cell borders
This allows to set the width, style and color of each table cell's edge
(left, right, top, bottom).

Setting the table's border-collapse mode will disable explicit cell
spacing. The basic CSS border collision rules are applied (wider border
wins, vertical over horizontal).

Setting the table's border width to a value >= 1 and enabling
borderCollapse will now draw a simple and clean table grid (1px) with an
outer border of the specified width and color.

[ChangeLog][QtGui][QTextDocument] Added CSS style table cell border
formatting with border-collapse mode.

Change-Id: I324d82284802df4c88c13c5b902fec1f4768b67e
Fixes: QTBUG-36152
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2019-08-08 16:46:09 +02:00
Joerg Bornemann
39e937a538 Fix host architecture detection for canadian cross builds
If the host architecture is different from -platform (canadian cross
build with -external-hostbindir) then we cannot use QMAKE_HOST.os to
deduce the executable extension for that platform, because this value
comes from the qmake binary that was pointed to by
-external-hostbindir.

Move the target name deduction mechanism to the actual configure test
.pro files to make sure the right scopes are available, and write the
deduced target name to a text file. That text file is read by
qtConfTest_architecture to get the right binary to analyze.

Fixes: QTBUG-77286
Change-Id: I68b844dd51dbfda6432a4b0dca6331899c82255f
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
2019-08-08 14:26:11 +02:00
Heikki Halmet
c76b86aec6 BLACKLIST contains_QPointF for msvc-2019
Task-number: QTBUG-77312
Change-Id: I5197d160d9b3c70b538c2e5a43c31120e1bed5f0
Reviewed-by: Tony Sarajärvi <tony.sarajarvi@qt.io>
2019-08-08 15:20:23 +03:00
Timur Pocheptsov
aef0fba3c5 QCocoaMenuLoader: get rid of lastAppSpecificItem
Look it up when needed instead. Also, simplify our
ownership logic - do not retain/autorelease that
is already owned by a menu (via its itemArray).

Fixes: QTBUG-76523
Change-Id: I60a2ed0d192396baf99eec7b37fa5cc10e5db626
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2019-08-08 13:15:36 +02:00
Lars Knoll
afb326f071 Refactor lockedAlphaMapForGlyph
Simply return a Glyph pointer and not a QImage to avoid allocating and
deleting lots of d pointers for QImage when drawing text. Saves one
new/delete pair per glyph drawn and speeds up text drawing by 10% for
relatively large glyphs (probably more for smaller ones).

The qtext::paintLayoutToPixmap() benchmark shows a 16% improvement
in performance with this change.

Renamed the method to glyphData().

Change-Id: I7a353de521e4f4321c770fb1ac6043d33f6f332c
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2019-08-08 11:18:02 +02:00
Tor Arne Vestbø
6ac610c79b Allow specifying explicit SDK version on Apple platforms
This enables building against the latest SDK, while still opting out
of features that this SDK normally enables, by lowering the SDK version
set in the BUILD_VERSION/VERSION_MIN_MACOSX load command.

Change-Id: Id5f13524740bfbf5eda10a5d0c2e3fda04bf3f52
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2019-08-08 10:27:28 +02:00
Ville Voutilainen
ca20b44959 A GCC 4.8 build fix
Change-Id: Ic128486711118e1124739e8dca30547ab8ba9816
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-08-08 10:53:53 +03:00
Jason Haslam
4d9375020c macOS: Fix tab button rendering issue
This fixes rendering artifacts for the specific case of the first
unselected vertical (west) tab button in a tab bar. The popup button
gets drawn at the beginning of the tab bar instead of translated to the
actual location of the tab.

Fixes: QTBUG-76385
Change-Id: I17112c56eabacf34e470314d4cc6b263ba632ec1
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2019-08-08 01:38:10 -06:00
Alex Blasche
bab8262bce Minor QSet doc cleanup
C++11 is a requirement since Qt 5.7. There is no point in highlighting
the condition anymore.

Change-Id: I0f7d6044db2528d3b5264c324cf71156ec833775
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2019-08-08 07:51:11 +02:00