Commit Graph

41877 Commits

Author SHA1 Message Date
Tor Arne Vestbø
92918e567a Flatten version-specific blacklisting on macOS to all macOS versions
We don't know which versions these blacklistings actually apply on
unless we actually get macOS 10.14 and 10.15 into the CI and running
tests, so let's start with that, and then granularize the blacklists
after that.

Task-number: QTBUG-75786
Change-Id: Id79642afa50cb20efa2cd209286b6933918d3a4a
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2020-01-22 17:58:31 +01:00
Tor Arne Vestbø
db81129240 macOS: Remove doc references to the Carbon framework
Change-Id: I4d496acfc3d810d6334baba99cd697168bef0b75
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2020-01-22 17:26:23 +01:00
Tor Arne Vestbø
c31c5d08d8 Blacklist tstPauseAnimation::noTimerUpdates on macOS
Task-number: QTBUG-75786
Change-Id: I89d81a9d0f5f301f325044dee2395d441c0d5970
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2020-01-22 17:26:23 +01:00
Tor Arne Vestbø
f047c44e71 Extend blacklisting for a few tests to include all macOS versions
Task-number: QTBUG-75786
Change-Id: I06867de99a19f9e46ac0eeea10a7365a30c49c6d
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2020-01-22 17:26:23 +01:00
Tor Arne Vestbø
14690e9cf1 Blacklist two tst_QScroller tests on macOS
Task-number: QTBUG-75786
Change-Id: I43e0a9a6e28a67f6aa1f2adaecd60ed0d65601d4
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2020-01-22 17:26:22 +01:00
Tor Arne Vestbø
751d0ace96 Blacklist tst_QAbstractItemView::task200665_itemEntered on macOS
Task-number: QTBUG-75786
Change-Id: I74720b4015e38c846dbc5c6a93f056f8deb3552a
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2020-01-22 17:26:22 +01:00
Alexandra Cherdantseva
0a4c5b5119 wasm: fix redundant string conversions between wasm and JavaScript
Avoid redundant conversions from UTF16 to UTF8 to UTF16 with
help of new class QWasmString static methods:
+ QWasmString::fromQString to convert QString to js string
using js Module.UTF16ToString
+ QWasmString::toQString to convert js string to QString
using js Module.stringToUTF16

Fixed document.getElementById calls for cavasId with unicode characters.

Change-Id: I3fc55bfeb6aeda75fa3acd85d22cea667b542f38
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
2020-01-22 19:26:22 +03:00
Venugopal Shivashankar
21ee3b17b7 Doc: Add the line-height CSS property to the list
Apparently, it is one of the text CSS properties
that Qt supports.

Fixes: QTBUG-34053
Task-number: QTBUG-34053
Change-Id: I3076ab2f51f1519f41610b1e81dfecbb8dbc0256
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2020-01-21 11:05:37 +01:00
Sze Howe Koh
520f7bb832 Doc: Fix QSql*Model snippets
- QSqlQueryModel docs contained a snippet about QSqlTableModel.
- Snippet #25 was about QSqlTableModel, but it was previously unused.
- This patch ensures that snippet code matches the corresponding text
  descriptions.

Change-Id: I2a5ffbe0978ef9b8d0b027db59647b824e52d214
Reviewed-by: Samuel Gaist <samuel.gaist@idiap.ch>
2020-01-19 07:19:47 +08:00
Artem Pisarenko
78a6b80719 Fix win32 support for linking against static builds in CMake
CMake mkspec feature sets CMAKE_PRL_FILE_LOCATION_* values inconsistent
with actual .prl file names being generated/installed, causing
dependency extraction mechanism in Qt5BasicConfig.cmake.in to not work
(function _qt5_$${CMAKE_MODULE_NAME}_process_prl_file silently fails
to find file at given location and skips filling libs deps).

[ChangeLog][CMake][Windows] Fixed linking with Qt static build

Fixes: QTBUG-81401
Change-Id: I5861cc0c42163d898ba55ad83cbad1994dcb1db2
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-01-19 02:50:32 +06:00
Paul Wicking
9c172af7d5 Doc: Update text that refers to deprecated member function width()
* Add see also links from the deprecated function to the replacement.
* Change introduction text to reflect new function name rather than the
  old and deprecated width().
* Change see also and inline references to width(), so that they now
  refer to horizontalAdvance().

Task-number: QTBUG-65141
Change-Id: Iadfbc517e5df96e32058516f8795bd210cc4c5e4
Reviewed-by: Nico Vertriest <nico.vertriest@qt.io>
Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
2020-01-17 14:19:03 +01:00
Paul Wicking
fd31e4ce43 Doc: Display correct include for QWindowsWindowFunctions
Fixes: QTBUG-55412
Change-Id: I3a38fa26911b1c151af9f0b47f1be602058aa4af
Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
2020-01-17 14:19:00 +01:00
Nico Vertriest
28f95d4688 Doc: Fix qdoc compilation errors qtbase
Task-number: QTBUG-79824
Change-Id: I5a39525e3e735415ba96e2d585c5de754deb15de
Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
2020-01-17 12:56:08 +00:00
Volker Hilsheimer
89312b2eab Remove unused parameters from default-synthesized members
Fixes build error with gcc when compiled with -Werror=unused-parameters.

Change-Id: I12c3ecb30f489986b112f9736caec40aa50c7283
Fixes: QTBUG-81465
Reviewed-by: Liang Qi <liang.qi@qt.io>
2020-01-17 11:31:55 +01:00
Giuseppe D'Angelo
a3b2eac380 QColor: add casts to ushort
Silence lossy conversion warnings on MSVC.

Task-number: QTBUG-80997
Change-Id: I0e5778b9f20b599de6fc8894c4b98fbc1b1510b9
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2020-01-17 11:16:17 +01:00
Topi Reinio
5dc16d1324 Doc: Fix ButtonRole enum docs for QMessageBox and QDialogButtonBox
Multiple topic commands (in this case, \enum) do not work across
different classes.

Reuse the documentation comment via an \include statement instead.

Fixes: QTBUG-78910
Change-Id: Ife83bdc9bbad650835fafc072180d10037648d0a
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2020-01-17 01:11:21 +00:00
Edward Welbourne
c0ea88a677 Fix MS-Win system locale code to return QString for numeric tokens
QSystemLocale::query() is specified to return a QString (wrapped in a
QVariant) for the various tokens used in formatting numbers (zero
digit, signs, separators) but the MS-Win back-end was returning QChar
(wrapped as QVariant) instead, using the first UCS-2 code-point of the
string (even if this was the first of a surrogate pair). The same
error shall be perpetrated by its caller, but we can at least DTRT in
the back-end, ready for the coming fix (in Qt 6) to its caller.

In the process, eliminate some local variables that shadowed a member
variable and adapt number-conversion to cope with surrogate-pair
digits. Optimised the latter for the case where zero is "0".

Change-Id: Idfb416c301add4c961dde613b3dc28b2e31fd0af
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-01-16 10:28:08 +01:00
Topi Reinio
e05511a364 Pad Navigator example: Remove duplicated property animations
The example created two QPropertyAnimation instances that controlled
the same property; this caused a clash for some transitions.

Remove the smoothFlipXRotation and smoothFlipYRotation animations;
they are not needed as equivalent animations are already set as
defaults for the state machine.

Fixes: QTBUG-28081
Change-Id: Ifa7a09d48cd4905df720e3327914320ed74ebae6
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2020-01-16 10:24:06 +01:00
Giuseppe D'Angelo
9f1948f59b QRegularExpression: fixup docs of wildcardToRegularExpression
Fix a couple of typos, and add a paragraph explaining
that there is no need of anchor the pattern again; a wildcard
is always anchored.

Fixes: QTBUG-81396
Change-Id: Ia67dc7477a05a450bdcc3def1ebbacce2006da4d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-01-15 22:59:00 +01:00
Nico Vertriest
7a59d6f138 Doc: Correct non-link related qdoc compilation errors
Task-number: QTBUG-79824
Change-Id: I94dc566c9fb11bc8c598c0d5c043b6f388ebdc80
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2020-01-14 16:38:48 +00:00
Tor Arne Vestbø
8298118c52 macOS: Move palette setup into platform theme
The theme was the only client, so there's no point in keeping it separate
from its only call site.

Change-Id: I4783c5db6975ad2daaede704ab5855c57f190344
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2020-01-14 15:41:00 +01:00
Friedemann Kleint
21a14767b3 uic/Python: Fix missing QCursor import
Fixes: PYSIDE-1182
Change-Id: I1ccc524a152ea75508166f3d2c0c60f8d829cd8f
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
2020-01-14 14:17:52 +01:00
Edward Welbourne
e0be3ab28e Combine negativeYear() and printNegativeYear()
They overlapped and the latter had duplicated code, so make them into
a single data-driven test. At the same time, replace the '-' at the
start of the expected string with QLocale::negativeSign(), since the
test fails otherwise when LC_NUMERIC=nb_NO on Linux (Debian/testing).

Change-Id: I051c75abff16b2e6f8278fcb152b6bde14c71f9a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-01-14 10:47:19 +01:00
Edward Welbourne
7b3d0abfa2 Do fewer calendrical calculations in QDateTimeParser::setDigit()
It was calling a QDate's year(), month() and day() methods, each of
which repeats most of the same calendrical calculations; and the same
results can be obtained from the calendar's partsFromDate() all in one
go. This also reduces the number of local variables needed.

Change-Id: I8f84e66a5f677f55cb2113c56ebbdf7c2517e828
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-01-14 10:47:05 +01:00
Friedemann Kleint
01d24eea09 Windows QPA: Fix co-existence of several Qt versions in an application
Change qtbase/ef54abae43db79792b40dfdca30ac0fa1b582354 added a
new dummy message window for power notification. This causes the
static class name conflict check to assume there is no conflict
since it does not exist in previous Qt versions.
Change it to perform the for each class name.

Fixes: QTBUG-81347
Change-Id: I290806d021ac7de130a41e996d03b8fb4eb2c437
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2020-01-14 09:54:19 +01:00
Friedemann Kleint
2f366a63b2 Windows QPA: Fix message box and other system sounds
Re-add the code hooking into
QWindowsUiaAccessibility::notifyAccessibilityUpdate()
which was removed by
0cf6297c15.

Fixes: QTBUG-81342
Change-Id: Ie97d7cca5b774196d53b675c92d84f4ce208f987
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2020-01-14 09:54:04 +01:00
Cristián Maureira-Fredes
3f6275960c uic: add customwidget imports support for python
Fixes: QTBUG-81073
Change-Id: I29659481b14927ffcb8f2cb1829b577a67e4b937
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2020-01-14 08:11:53 +01:00
Joerg Bornemann
6d545dedad Fix mkdir warning for object_parallel_to_source projects
Source files that are right next to the project file result in an
empty "object subdirectory" if object_parallel_to_source is set.
We must not attempt to create empty directories.

Fixes: QTBUG-81271
Change-Id: I431f9fbe46f50fbbaa5d6a59966bfb059418036c
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
2020-01-14 07:58:03 +01:00
Samuel Gaist
44fd33e05c doc: improve SUBDIRS documentation for dependency handling
The use of the 'ordered' CONFIG option is known to not be efficient for
multi-core builds. This patch updates the documentation with an example
using the .depends modifier as well a discourage the use of 'ordered'.

Change-Id: I3575243a7c4138f0671d171441c932c3ad89a411
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com>
2020-01-14 06:55:48 +01:00
Paul Wicking
99b3966319 Doc: Add note about mac-specific behavior for setWindowIcon
Fixes: QTBUG-74985
Change-Id: I7379865ab9564301c1e636ba1fda40cbb9e04c61
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2020-01-14 06:52:29 +01:00
Tor Arne Vestbø
d8897e0b08 Clarify blacklisting of tst_QWidget::childEvents on macOS
The test expects a very explicit list of events during show, but on
macOS we also get an InputMethodQuery event as a result of the window
becoming active. The test needs to be written significantly to support
these kind of platform differences.

Change-Id: I395c1e9e4e9baf7d9f88f0d067586fc15afb9a16
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2020-01-14 00:50:04 +01:00
Tor Arne Vestbø
0617afb2d3 Extend blacklisting of tst_QWidget::showMinimizedKeepsFocus to all macOS versions
For some reason the firstChild gets the focus when clearing the focus.
This seems to be timing dependent, as removing the 30ms qWait 'fixes'
the issue. So does a processEvent call before minimzing. Both of these
require further investigation.

Change-Id: I62833a5541712f97dc24bc63384fa4c051096537
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2020-01-14 00:50:03 +01:00
Tor Arne Vestbø
6ae9cc7cb9 Blacklist tests on macOS that rely on moving the cursor
Task-number: QTBUG-76312
Change-Id: Ibb29231141017ed608beaa12255cdd083317433c
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2020-01-14 00:50:01 +01:00
Tor Arne Vestbø
e1dbb73701 Blacklist tst_QTableView::mouseWheel on macOS
There's a timing issue that affects the position of the vertical
scrollbar when scrolling by pixels.

Change-Id: I29d73574785be539a5870b498a902b1aba887e9c
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2020-01-14 00:50:00 +01:00
Tor Arne Vestbø
3be91a89af Blacklist tst_QStyleSheetStyle::widgetStylePropagation on macOS
It's not clear why this is failing, but we need to blacklist it so that
we can move over to testing macOS 10.14 and 10.15 in the CI.

Task-number: QTBUG-75786
Change-Id: I208d5af92406c5da8d0210e0188568466b78b2a9
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2020-01-14 00:49:58 +01:00
Tor Arne Vestbø
b7a56ea3ee Skip tst_QMenu::pushButtonPopulateOnAboutToShow on macOS
The combobox popup can overlap a little with the button, and that's the
expected behavior.

Change-Id: I245bfce85cb5ee661ceb51dbe0d844492878a2bc
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2020-01-14 00:15:16 +01:00
Tor Arne Vestbø
eb2a7738a4 Skip instead of fail tests when test server is not available
We were being inconsistent in how we handled this, some tests skipping
while others using QVERIFY. It makes more sense to skip the tests, since
the problem is a missing pre-condition of the test, not the test itself
being bad or exposing real failures in the implementation.

Change-Id: I20eacfe12dbce0b0d926e48cbe2d2772819fa4a5
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2020-01-14 00:15:16 +01:00
Christian Ehrlicher
9dcbf2cf5c QScrollBar: allow scrolling any scrollbar with any mouse wheel
The most common mouse wheel movement corresponds to angleDelta().y().
We have previously allowed the user to use either wheel to scroll either
a horizontal or a vertical scrollbar when the mouse is hovering over it;
but 7d29807296 changed it so that the
vertical mouse wheel could no longer scroll a horizontal scrollbar.
The behavior is now restored as it was in
59cc316620.

Task-number: QTBUG-81007
Change-Id: Ieacdce539d5311499a86af645bbe0d5098e16be6
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2020-01-13 16:40:34 +01:00
Michal Klocek
7d7ba311e0 Fix isysroot for simulator only builds on ios
When not doing fat builds, QMAKE_MAC_SDK_PATH defaults
to iphoneos sysroot, which breaks compilation.

This fixes compilation when user sets also CONFIG-=device

Change-Id: I1d18269946cd2a5608e26d943159c824f31db09a
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2020-01-13 14:48:09 +00:00
Michal Klocek
95d5a8e74f Report error when qt ios is built with debug only
Doing only debug build is not supported at the moment.
Add error to configure.

Task-number: QTBUG-71990
Change-Id: If35d00c3f09d733efe63d5ea66d07e4a3ec922cc
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2020-01-13 15:48:04 +01:00
Paul Wicking
9233ffa2d1 Doc: Don't document QTextStreamManipulator
Fixes: QTBUG-81002
Change-Id: Ic7d0516a25a8a6e63e1a305ca87498948d41013c
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2020-01-13 15:29:06 +01:00
Shawn Rutledge
41b44c6f21 doc: explain QWheelEvent::angleDelta() more thoroughly
It has been a QPoint for a long time now, to support both the usual
vertical mouse wheel and also the wheel tilt for horizontal scrolling,
or the actual horizontal wheel if the mouse has one, or the simulation
of a horizontal wheel via touchpad gestures; but the docs continued to
read as if it was just one value.

Task-number: QTBUG-71575
Change-Id: I3efa686ace4f09c7f237f72bf0500fbfbd3213cb
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2020-01-13 15:28:31 +01:00
Edward Welbourne
04f6073da2 ICC compile-fix for __builtin_add_overflow()'s parameter type
Based on Glen Johnson's patch, but rearranged to avoid repetition.

Fixes: QTBUG-81248
Change-Id: I9c23ab233ebd5514bc05fd155999597ada7295ef
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-01-13 13:06:15 +01:00
Friedemann Kleint
caab0ad357 Fix Mandelbrot Example documentation with regards to qRegisterMetaType()
The call to qRegisterMetaType() has been removed since the type
is registered as a meta type in Qt 5. Assert on the meta type id instead.
Adapt the documentation accordingly.

Fixes: QTBUG-81254
Change-Id: I0cb459d0dda7a82fc37871605ff634004af0f9f9
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2020-01-13 12:50:03 +01:00
Thiago Macieira
f936ca4f86 qglobal.h: remove non-ASCII quotes from comment
Because MSVC warns. Added by me on commit.
c496fee2a5

Fixes: QTBUG-81310
Change-Id: I596aec77785a4e4e84d5fffd15e93a8e367e035e
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2020-01-13 02:36:08 -08:00
Rainer Keller
76fbe75abe Remove empty block at beginning of imported markdown
An empty QTextDocument already contains a block; so when the formatting
is fully determined, if the document is still empty, then instead of
inserting a new block, we can set formatting on the cursor, which
affects the pre-existing block, before inserting text.  This avoids
leaving a blank line (the default block) above the inserted content.

Fixes: QTBUG-81060
Change-Id: I14e45e300a602493aa59680417d74d4c2b25862d
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2020-01-13 09:25:39 +01:00
Alexandra Cherdantseva
18e06c37e1 wasm: do not get canvas as property of js global object
You cannot be sure that property with specified key in
a global object is really a canvas.
Should use `document.getElementById`.

Change-Id: Ife55adaad5517aed64122b0c9bff32489cf19a2f
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
2020-01-13 11:07:21 +03:00
Morten Johan Sørvig
3d1e257770 Wasm: Support event loop wakeup from secondary threads
Minimal fix for the missing wakeup issue, in leu of
a new event loop implementation.

So far, emscripten_async_run_in_main_runtime_thread_
looks to be our option for scheduling calls on the
main thread. This function is available on emsdk 1.38.22
and higher.

Requires making from QEventDispatcherUNIX::wakeUp()
non-final. The future event dispatcher implementation
will not inherit QEventDispatcherUNIX, so this is a
temporary change.

Fixes: QTBUG-75793
Task-number: QTBUG-76007
Change-Id: Ie6f6ee6f7674206fc0673a4fe866ac614432ab65
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
2020-01-12 21:38:21 +01:00
Giuseppe D'Angelo
2f536411d8 QRegularExpression: minor doc fixes
Amends d24a1d4323

Change-Id: I108f85b174e21ef71bf269fb9f6725972e76f107
Reviewed-by: David Faure <david.faure@kdab.com>
2020-01-12 12:29:58 +01:00
Giuseppe D'Angelo
577d698b8e QString::isLower/isUpper: redo the implementation
Use QStringIterator rather than indexed loops. This fixes handling of
non-BMP code points (which may be lower or uppercase, see the test).

Change also the semantics of the functions, adopting Unicode §3.13
definitions: a string is lowercase/uppercase if it's equal to its
own toLower/toUpper folding.

As a side effect, empty strings are now correctly reported to be
lowercase AND uppercase.

[ChangeLog][Important Behavior Changes] The semantics of
QString::isLower() and QString::isUpper() have been changed to match the
Unicode specification. Now lowercase (resp. uppercase) strings are
allowed to contain any character; a string is considered lowercase
(resp. uppercase) if it's equal to its own toLower() (resp. toUpper())
folding.  Previously, a non-letter character would make the string not
lowercase nor uppercase, and the mere presence of an uppercase (resp.
lowercase) letter would make isLower() (resp. isUpper()) return false,
even if the letter wouldn't change under case folding.  As a
consequence, now empty strings are lowercase and uppercase.

[ChangeLog][QtCore][QString] Fixed a number of bugs of
QString::isLower() and QString::isUpper(). Empty strings are now
correctly reported to be lowercase (resp. uppercase), and strings
containing code points outside the BMP are now correctly handled.
Note that the behavior of these functions has also been changed.

Change-Id: Iba1398279a072399a9f21295fe75f6e414f3f813
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-01-11 19:28:50 +01:00