Commit Graph

8660 Commits

Author SHA1 Message Date
Qt Forward Merge Bot
42f84de26a Merge remote-tracking branch 'origin/5.11' into 5.12
Change-Id: Ic4c1a8041dcfd143861c39e0014fbdaaa3fb25c6
2018-09-14 01:00:08 +02:00
Florian Bruhin
49efea26a5 sqlite: Fix QSqlError handling when opening/closing database
Both sqlite3_open_v2 and sqlite3_close are documented to return an error code:
https://www.sqlite.org/c3ref/open.html https://sqlite.org/c3ref/close.html

However, those were ignored (other than checking whether the operation
succeeded), causing QSqlError::nativeErrorCode() to always be "-1" when there
was an error while opening/closing the database.

Additionally, the error string needs to be read (via sqlite3_errmsg16) in
qMakeError *before* d->access is set to 0, or the databaseText() will always be
"out of memory" no matter what error actually happened.

Task-number: QTBUG-70506
Change-Id: I75cbf178c9711442e640afd26c4502214d20c598
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2018-09-13 18:18:47 +00:00
Tor Arne Vestbø
14bae62bd2 Blacklist flaky tst_QGL::graphicsViewClipping on RHEL 7.4
Change-Id: Ic771b263c988525d4b887cb2a1de9f9c7343e49b
Reviewed-by: Liang Qi <liang.qi@qt.io>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2018-09-13 15:53:20 +00:00
Qt Forward Merge Bot
f5bf8ca9c3 Merge remote-tracking branch 'origin/5.12' into dev
Change-Id: Icd201bf6b634e44e0e2ab05eaf91a7d8588d7f05
2018-09-13 01:00:39 +02:00
Christian Ehrlicher
0d1481b4d2 SQL PostgreSQL/SQlite: Properly decode default varchar parameter
The default values for varchar columns were not decoded properly.

Task-number: QTBUG-46968
Change-Id: Ie13d48c316cd694240f7e287010b97afc8c6c341
Reviewed-by: Robert Szefner <robertsz27@interia.pl>
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2018-09-12 09:11:04 +00:00
Eirik Aavitsland
9d1c881f49 Texture file support: add mipmap reading to ktx handler
Change-Id: Ic2c10b3e64d63d2272a8a3922d2b3f99dfd45bdb
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2018-09-12 08:41:38 +00:00
Edward Welbourne
017ac02ec4 Clean up time-zone matching logic in tst_QLocale::macDefaultLocale()
The test was computing GMT with a suffix added to it for the offset;
but when the offset is zero there's no need for it.  Cleaned up the
logic so that it only checks for a "padded to two digits with zero" if
the number is single-digit (and use string arithmetic in preference to
wantonly complex .arg()ing; and use simpler names).  Since we don't
try to check anything unless GMT does appear in the string (because
the actual zone ID was used, instead of GMT with an offset), the case
of zero offset has nothing more to check than that GMT was present,
the precondition for checking anything.

Task-number: QTBUG-70322
Change-Id: I0b8abe7e63d9d72fa9cf32f188b47a78a849044b
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-09-11 14:40:22 +00:00
Tony Sarajärvi
fd6370d89f Extend opensuse blacklistings to opensuse-leap
In openSUSE 15.0 /etc/os-release the ID of the OS was
changed from "opensuse" to "opensuse-leap". So every blacklisting
we did for opensuse, didn't cover opensuse-leap. This one adds
opensuse-leap as a blacklisted platform whenever opensuse
was blacklisted.

Task-number: QTBUG-70463
Task-number: QTBUG-51399
Change-Id: I5879eb34926757163973d8b9442eae58f47d2f11
Reviewed-by: Liang Qi <liang.qi@qt.io>
2018-09-11 12:11:45 +00:00
Edward Welbourne
d5891036de Make updateSystemPrivate() local to qlocale.cpp
It's not thread-safe so should only be used within systemData()'s
locked code.  This eliminates the last callers of it by making it a
local function of the compilation unit, exposing a method from
QSystemLocale() to get round its use of private parts.  Make the
constructor for QSystemLocale only stomp its _systemLocale global if
previously unset, but let instantiation still clear
globalLocaleData.m_language_id, so that it can be used as a way to
trigger an update to system locale data.

Change-Id: I908dca9fd30bbf20f42321ab8f9094f2fa37b7b0
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-09-11 08:22:59 +00:00
Qt Forward Merge Bot
5d92f1793a Merge remote-tracking branch 'origin/5.12' into dev
Change-Id: I1df9adea124326ef7c7802839eb93efc4302b287
2018-09-11 01:00:36 +02:00
Liang Qi
683e144efb Merge remote-tracking branch 'origin/5.11' into 5.12
Conflicts:
	mkspecs/common/macx.conf

Change-Id: I8576493b417912fa5e5501bc2c1b935d186ac209
2018-09-10 12:12:46 +02:00
Thiago Macieira
b66357e3eb moc: Fix compilation of text strings containing non-ASCII
On platforms where char is signed, like x86, the following is an error
(narrowing conversion):

 unsigned char x[] = { '\xc3' };

Change-Id: I495bc19409f348069f5bfffd15518f9ef4e43faf
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-09-10 04:17:03 +00:00
Qt Forward Merge Bot
3d2832790a Merge remote-tracking branch 'origin/5.12' into dev
Change-Id: If1baf48f0f396fb223672d14f0e1847ac42ca1a6
2018-09-10 01:00:42 +02:00
Christian Ehrlicher
85917c4b72 Autotests/QItemView: re-enable tst_QItemView::indexAt()
tst_QItemView::indexAt() was disabled since Qt 5.0 (and maybe earlier)
maybe due to it's long runtime (15s on my machine).
Speed it up by checking only some special positions inside the visual
rect (borders, center) as it will likely not fail on other positions but
succeed for the ones which get tested.

Task-number: QTBUG-22470
Change-Id: I5c7135757049176f9daca4afc1b7f40c75b9ecd9
Reviewed-by: David Faure <david.faure@kdab.com>
2018-09-09 12:04:15 +00:00
Christian Ehrlicher
ef40cad3a9 QTableView: Fix PageUp not getting to top when first row is hidden
When the first row(s) of a QTableView is hidden, PageUp could not reach
the first visible row because logicalRow(0) is taken without checking
if the row is visible.

Task-number: QTBUG-70215
Change-Id: Ic7820352b8988accb685ea7d16908d3fa8bf2847
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Luca Beldi <v.ronin@yahoo.it>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Reviewed-by: David Faure <david.faure@kdab.com>
2018-09-09 12:03:55 +00:00
David Faure
c82ab86cea New proxy model: QConcatenateTablesProxyModel
It takes multiple source models and concatenates their rows into a single model.

With full unit tests.

[ChangeLog][QtCore] New class QConcatenateTablesProxyModel, to
concatenate the rows from multiple source models.

Change-Id: Iaf4f325473adef106f423677fdc5ee0e35e87d35
Reviewed-by: Luca Beldi <v.ronin@yahoo.it>
Reviewed-by: Sérgio Martins <sergio.martins@kdab.com>
2018-09-09 10:13:06 +00:00
Qt Forward Merge Bot
f21330b749 Merge remote-tracking branch 'origin/5.12' into dev
Change-Id: I799e2ca2fefa140c8b73b73aa959c6ed8da6eae6
2018-09-07 01:00:48 +02:00
Tor Arne Vestbø
5ed48895b6 tst_qglthreads::swapInThread(): Acquire context before resizing widget
Otherwise the QGLWidget's context may be owned by and used by the swap
thread when the resize happens on the main thread.

Change-Id: Id415747572e6b988924618b1df0efdee5fcb1805
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2018-09-06 12:42:06 +00:00
Friedemann Kleint
550d2a0a15 uic: Fix pixmap functions for QIcon
Task-number: QTBUG-8563
Change-Id: I69b16ac2327fee6dd6f26845bdda60ad4dde56fa
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2018-09-06 11:58:40 +00:00
Luca Beldi
dc73a691bf Fix QSIM::itemData returning role 255
Before this fix, QStandardItemModel::itemData returns
a map containing role 255 which is used internally to store the flags.
This role is an undocumented implementation detail so it should
not be returned to the user.

[ChangeLog][QtGui][QStandardItemModel] itemData does not return role 255

Change-Id: Ibead3cba84cfe92b3c664bc8ce87508cbcbdc9bd
Reviewed-by: David Faure <david.faure@kdab.com>
2018-09-06 11:51:28 +00:00
Luca Beldi
37a1c6dc4c Reimplement QStringListModel::setItemData
Before this patch QStringListModel::setItemData emitted dataChanged
twice if the roles map contained both DisplayRole and EditRole.
This fixes the duplication.

Increased efficiency of QStringListModel::itemData

Task-number: QTBUG-67511
Change-Id: Ibaea17530f15627a3cb8003e5284e54001731ded
Reviewed-by: David Faure <david.faure@kdab.com>
2018-09-06 09:27:09 +00:00
Luca Beldi
fcdb459c06 Implement QListModel::moveRows
Implemented the virtual method moveRows to allow row movement.

[ChangeLog][QtWidgets][QListWidget] Implemented moveRows in model

Task-number: QTBUG-69807
Change-Id: I212b560b8778306a0315d9d5e4710efcc7dbbe44
Reviewed-by: David Faure <david.faure@kdab.com>
2018-09-06 09:26:58 +00:00
Luca Beldi
551e11c286 Implement clearItemData in common models
A virtual method clearItemData was added to QAIM for Qt6.
This patch implements that method to all Qt concrete models for which
it makes sense.

Task-number: QTBUG-69616
Change-Id: If980fcfc36f723128bc56ec4587c5c3a338dbbcc
Reviewed-by: David Faure <david.faure@kdab.com>
2018-09-06 09:26:51 +00:00
Olga Radko
c88305b68d QSortFilterProxyModel: add test for inserting via a QComboBox
This new test double-checks the bugfix for QSortFilterProxyModel::insertRows
in commit 70ba75519d. Previously, when using QComboBox on top of
QSortFilterProxyModel and calling QComboBox::addItem with row==rowCount(),
an empty item was inserted in one place, and then another item was modified
(instead of the inserted empty one). This test checks that the above bugfix
indeed fixes the behavior of QComboBox::addItem when used in this manner.

Task-number: QTBUG-69158
Change-Id: Id01345e0525694a57250c656222d626e2267aa8e
Reviewed-by: Luca Beldi <v.ronin@yahoo.it>
Reviewed-by: David Faure <david.faure@kdab.com>
2018-09-06 05:56:18 +00:00
Qt Forward Merge Bot
e5d0289413 Merge remote-tracking branch 'origin/5.12' into dev
Change-Id: I2f6e1c0f649c5098723b776c774a8a689bb60582
2018-09-06 01:00:33 +02:00
Albert Astals Cid
8b6100d512 QStringList: add contains(QStringView) overload
Change-Id: I953e4ef3167011d0348ea482890e29478bd6f761
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-09-03 08:55:52 +00:00
Albert Astals Cid
64fe66e7be Add QString::compare(QStringView, CaseSensitivity)
There was a QStringView::compare(QString, CaseSensitivity) but it's
good that the symmetric also exists

Change-Id: Ic789f11d41eb8cfa393cb51c19bd1f89bb87d912
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-09-03 08:55:45 +00:00
Sergio Martins
179c88a1a9 Rename QTimer::connectTo() to QTimer::callOnTimeout()
Some people suggested the later, so let's have a second look at it
before it's too late.

Although I was in favor of the former I'm now having second thoughts.
connectTo() is meant to only be used in classes which have a clear dominant signal,
but there are rare classes that have two (example: QAbstractButton::toggled, QAbstractButton::clicked).
QAbstractButton::connectTo() would be ambiguous if we ever wanted to add these shorthand connects
to QtWidgets

Change-Id: I198ad3326d31dcf89b9c47a299124572ee7b11b3
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2018-09-03 08:43:39 +00:00
Allan Sandfeld Jensen
5d0ee89132 Fix reading 16bpc grayscale PNGs
They were incorrectly attempted to be read as Indexed8, instead use
the RGBA64 formats to read them with full accuracy.

Task-number: QTBUG-45858
Change-Id: I14fc3cb0d59fa2fc0e68fd870f3b32352c34161f
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2018-09-03 08:24:10 +00:00
Rolf Eike Beer
b3f9b2f148 remove internal use of SE_ViewItemCheckIndicator
This is marked to be removed in Qt6, so switch to
SE_ItemViewItemCheckIndicator internally and define the old value as
copy of the new one instead of the other way round.

Change-Id: I9e9804a7ff0e9b2ae1e24698d45b2cbd44423420
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2018-09-03 07:15:22 +00:00
Qt Forward Merge Bot
ae868dfbdc Merge remote-tracking branch 'origin/5.12' into dev
Change-Id: I33e0abc771a2a772d3334172d50e7b0efe896590
2018-09-02 01:00:15 +02:00
Thiago Macieira
7bd79b3cff Plugins: Save some architectural requirement flags
...not just the debug flag. The information is saved outside of the CBOR
map for two reasons:

 1) removing the hack that depended on how QCborStreamWriter and
 TinyCBOR internally work, allowing for the extra parameter to be
 written directly. We wouldn't be able to use that hack anyway and would
 have needed a further, uglier hack to encode a byte whose value we
 don't know.

 2) outside the map, this information can be parsed more quickly and
 then we can discard any plugins we shouldn't actually load.

Since we're doing this for a flag, I decided to move the Qt version
there too for reason #2.

Change-Id: I61ecce6b1324410bbab4fffd153d4e5fc696d19e
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2018-09-01 15:19:46 +00:00
Thiago Macieira
d9766ddc3d Plugins: store the metadata in CBOR instead of binary JSON
In preparation for Qt 6 deprecating the binary JSON format. Also reduces
the size of the metadata a little: for the xcb platform plugin, it went
down from 264 bytes to 138; for the jpeg image plugin, it went from 320
to 135.

I've had to change the signature so older versions of Qt won't try to
parse the CBOR data as Binary JSON. Unfortunately, before QJsonDocument
could get a chance to reject it, qJsonFromRawLibraryMetaData() needed to
allocate memory and that causes crashes with Qt < 5.11.2.

Change-Id: Ieb48f7c0dd0e4e0fb35efffd153bee34e16ce347
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2018-09-01 15:19:39 +00:00
Tor Arne Vestbø
917c2de203 Disable tst_macnativeevents
It's almost completely blacklisted anyways, and the parts that are
not are flakey.

Change-Id: I4601d751a2963c94c62ec439dd78b874034069a0
Reviewed-by: Liang Qi <liang.qi@qt.io>
2018-08-31 12:35:45 +00:00
Tor Arne Vestbø
b02fe1bfe7 Remove codepaths and checks for unsupported Apple platforms
We no longer support macOS 10.11, iOS/tvOS 10, or watchOS 3.

Change-Id: Ide03d8fac06185ef4162ba75ee54a0adf6916905
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2018-08-31 12:35:45 +00:00
Friedemann Kleint
f9431f5632 Fix tst_QSizePolicy::constExpr() to compile with MSVC 15.8.1
For ControlType != QSizePolicy::DefaultType, qCountTrailingZeroBits()
is used which, MSVC 15.8.1 does not consider constexpr due to built-ins.
Exclude the check by #ifdef.

Task-number: QTBUG-69983
Change-Id: Ifc3dc3d94a804246bee1705fc8f3ac9b04ee4d32
Reviewed-by: Alexander Shevchenko <sav_ix@ukr.net>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-08-30 06:23:51 +00:00
BogDan Vatra
19b12ac9c2 Update QMetaObjectBuilder::MetaObjectFlag enum
Synced QMetaObjectBuilder::MetaObjectFlag with the MetaObjectFlags enum
from qmetaobject_p.h. Also added a few comments for Qt 6.

Change-Id: Ieccd5cf8d512a6bf7256b2f4db88d45662774536
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2018-08-30 05:12:01 +00:00
BogDan Vatra
c2165f891c Allow registering constructor for a set of dynamic types
This feature is needed to register complex types (e.g. Q_GADGETS) at
runtime, using a single constructor method and added type parameter.
Without having the type id available to the Constructor it is impossible
to specialize behavior, thus requiring separate constructors for each
type. Generating these separate constructors at compile time is easy,
but not at runtime.

[ChangeLog][QMetaType] QMetaType can now register constructor for a set
of dynamic types.

Change-Id: I6071271d0e157864594dd07b4bc3a0abbeb15a44
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-08-30 05:11:38 +00:00
Christian Ehrlicher
81e298a51d QWidget: fix setTabOrder for compound widgets
When adjusting the tab order for compound widgets, it can happen that
the order is already correct. The check for this case forgot one case
which lead to a garbled focus chain.

Task-number: QTBUG-68393
Task-number: QTBUG-69619
Task-number: QTBUG-10907
Change-Id: Ic3242746bdcf3a4db6ea8daa1498381500ca116d
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2018-08-30 04:25:22 +00:00
Ryan Chu
09f59271e6 Postpone testing docker images and files until running 'make check'
To avoid bothering the user who just wants to build all the test cases
in qtbase. It is better to move the docker related testing to the check
target. Then, it won't break the build procedure and force users to
finish test server provisioning in advance.

Change-Id: I2c4212297342c3eec7bcbebff9f991b7346d9503
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit e798e8a03b)
2018-08-30 04:06:51 +00:00
Ryan Chu
e798e8a03b Postpone testing docker images and files until running 'make check'
To avoid bothering the user who just wants to build all the test cases
in qtbase. It is better to move the docker related testing to the check
target. Then, it won't break the build procedure and force users to
finish test server provisioning in advance.

Change-Id: I2c4212297342c3eec7bcbebff9f991b7346d9503
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2018-08-29 14:29:11 +00:00
Tor Arne Vestbø
825e1a0506 Add missing dependencies for tst_macnativeevents
Change-Id: I5578b78a90588117339562b65884b7bc46770647
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2018-08-29 02:47:47 +00:00
Tor Arne Vestbø
ed92be5007 Add missing dependencies for tst_qmacautoreleasepool
Change-Id: Idf94d419526f02e89608b1d105a0858bceabbba1
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2018-08-29 02:47:45 +00:00
Oswald Buddenhagen
a25ee4c1ce darwin: fix tst_qsettings deps
the test uses CoreFoundation api directly, so it must link it
explicitly.

amends 6c8f32388b.

Change-Id: I76b7d8ab41d6a66138eb45bd0f067cfee8e96cb8
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-08-29 02:47:41 +00:00
Oswald Buddenhagen
fa6bab9c58 darwin: fix tst_qimage deps
the test uses CoreGraphics api directly, so it must link it explicitly.

amends b0abe20d4.

Change-Id: I734bfbedff56df731c1e528670f686565b63f3b5
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2018-08-29 02:47:39 +00:00
Qt Forward Merge Bot
e1c2183374 Merge remote-tracking branch 'origin/5.12' into dev
Change-Id: Ifb032dc19053481e1b0ede5c5c72540110d62567
2018-08-29 01:00:40 +02:00
Joni Jäntti
546eb7b947 Blacklist tst_Gestures on Ubuntu 18.04
These autotests are not currently working with the Ubuntu 18.04
platform being introduced to the CI.

Task-number: QTBUG-70227
Task-number: QTBUG-70226
Task-number: QTBUG-70224
Task-number: QTBUG-70223
Task-number: QTBUG-70209
Change-Id: Ibe7cafd37763d7d305d8c3d9ec17bc6339db744a
Reviewed-by: Liang Qi <liang.qi@qt.io>
2018-08-28 16:30:28 +00:00
Andy Shaw
28702cb239 Initialize the QSqlQuery to be invalid when creating a sql model
When QSqlQueryModel or QSqlTableModel is created it will create a
QSqlQuery which defaults to using the default QSqlDatabase connection.

If this connection belongs to another thread then it will throw a
warning as this is not safe to use. Since the QSqlQuery is always
recreated when a query is set, the instance which is a member of
the class can effectively be invalid until a new one is set.

Task-number: QTBUG-69213
Change-Id: I68a5dd59fe62788f531d59a0680da11b118ee383
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2018-08-28 16:10:30 +00:00
Mikhail Svetkin
6b4e603c62 corelib/tools: Fix auto detection of QOffsetStringArray::m_offset type
The previous implementation wrongly calculated the necessary data type
to hold the offset indexes. It looked at the amount of elements,
but instead we should look at value for the last element in the offset
array

Change-Id: I84c6985dc3c329df3bbc5a14f9789170877b65bb
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-08-28 14:42:46 +00:00
Edward Welbourne
89451f5428 Add some missing language codes to our locale data
We were missing a few languages CLDR knew about; so add them to the
list in enumdata.py (and add trailing commas to lists to make future
additions not need to change the prior last line; python is perfectly
happy with this).

[ChangeLog][QtCore][QLocale] Added support for Western Balochi, Ido,
Lojban, Sicilian and Souther Kurdish.

Change-Id: I0d24cff46a0ae8db48ec1db8762088f877319982
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io>
2018-08-27 14:38:44 +00:00
Frederik Gladhorn
900ce73b6f Merge 5.11 into 5.11.2
Change-Id: I672bc167de3801c944315d92120c5e03da69e9c7
2018-08-27 15:49:03 +02:00
Mikhail Svetkin
f0066cae8f corelib/tools: Add QOffsetStringArray API
This function allows to generate an array of offsets of substrings in
a string at compile time. This produces less verbose and easier to maintain
source code.

Change-Id: I5774b8b91906f6191f2b1244a676c07e7eb15b47
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-08-27 10:33:46 +00:00
Shawn Rutledge
112c0632d9 tst_QLocale::formattedDataSize: add Russian
The table and macros weren't extensible enough for non-Latin-based
languages.

Change-Id: I950f06de57aaf6bd0b24e0056e4acee2fb655f3d
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-08-26 18:51:48 +00:00
Qt Forward Merge Bot
2cdbe29ef0 Merge remote-tracking branch 'origin/5.12' into dev
Change-Id: I9c2a18f5110adf3d8f630718238866aef47bb782
2018-08-26 01:00:16 +02:00
Liang Qi
563c9eb4ee Merge "Merge remote-tracking branch 'origin/5.11' into 5.12" into refs/staging/5.12 2018-08-25 04:11:12 +00:00
Qt Forward Merge Bot
1d077120f4 Merge remote-tracking branch 'origin/5.11' into 5.12
Change-Id: I5f1567c792992fc00f0256f39b76cfbe017e6a3a
2018-08-24 23:59:46 +02:00
Joni Jantti
4d38f22522 Blacklist tst_Gestures::autoCancelGestures2
This autotest fails on the Ubuntu 18.04 platform.

Task-number: QTBUG-70153
Change-Id: I2a2b0075a046664cdf5733d8629f634b4e33dc6f
Reviewed-by: Tony Sarajärvi <tony.sarajarvi@qt.io>
2018-08-24 17:31:09 +00:00
Edward Welbourne
bd42e2f0ce Blacklist two tests on macOS that a planned CI change shall break
We have #if-ery on Q_OS_DARWIN controlling an expectation of gettign
"GMT+1" and "GMT+2" instead of "CET" and "CEST" in two tests; this
turns out to not be a deficiency of macOS so much as of how we
configure Coin's VMs.  While we fix that, we need to ignore failures
in these tests, so that we can pull the #if-ery out and clear the
blacklist once the VMs are set up properly.

Task-number: QTBUG-70149
Change-Id: If3577200cf980b3329161ab3eea7bd2e9d0124e0
Reviewed-by: Tony Sarajärvi <tony.sarajarvi@qt.io>
2018-08-24 17:30:01 +00:00
Mårten Nordheim
01a359b53c tst_qnetworkcookiejar: fix build for without topleveldomain
The test fails in a few cases due to the simplistic internal
implementation of TLD-checking, but it's still useful to run the tests.

Change-Id: Idafaed13506fbac2e67b1d2ba72da2f0c4e2904c
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2018-08-24 12:25:40 +00:00
Friedemann Kleint
96c202e981 Refactor tst_QFiledialog::clearLineEdit()
The test had some shortcomings:
- Flakyness due to not waiting for the file dialog list
  to be populated.
- It assumed that the hardcoded directory name
  ____aaaa... always would show first in the list. This may
  not be true on Windows, where names like .designer show above.
- On failure, the test directory would leak.

This manifested in failures like:

FAIL!  : tst_QFiledialog::clearLineEdit() '(fd.directory().absolutePath() != QDir::home().absolutePath())' returned FALSE. ()

To fix this, use QTemporaryDir and introduce predicates that
can be used to check whether the dialog has been populated
and the right file/directory is selected by pressing cursor down.
Use the temporary directory as not to pollute the home directory.

Change-Id: Ic504b91325993dcd6099c99e125e7ed8ff1d7672
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: David Faure <david.faure@kdab.com>
2018-08-24 12:00:31 +00:00
Edward Welbourne
8a270dee2b Revert "Fix time-zone tests on macOS >= 10.13, which now knows what CET is"
This reverts commit fd38c97a6c.
Apparently our actual VMs for 10.13 don't get this right, although the
ones used in testing did (prompting the fix this reverts).  We
probably have mis-configured VMs, but this is the quick-fix to get
development moving again.

Task-number: QTBUG-70149
Change-Id: Ib96755d8e21d9b226e22fc985f13f34fa04117b1
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2018-08-24 11:05:38 +00:00
Eskil Abrahamsen Blomfeldt
f71048a531 Fix crash when combining QOpenGLWidget, QStaticText and Qt Quick
Under certain circumstances, if you had a widget with a QOpenGLPaintEngine,
and drew QStaticText into this, and then later had Qt Quick access the same
cache and try to resize it, we would get a crash because the resize function
would have a pointer to the paint engine and try to access its shader manager
(which would now be null, since this is outside the begin()/end() phase of the
paint engine.

The solution is to reset the paint engine pointer to null on the cache once it
has been populated and it is no longer needed.

[ChangeLog][QtGui][Text] Fixed a possible crash when combining QStaticText,
QOpenGLWidget and Qt Quick in the same application.

Task-number: QTBUG-70096
Change-Id: I7383ad7456d1a72499cfcd2da09a5a808d4b3eff
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2018-08-24 08:30:28 +00:00
hjk
d9e2bd5388 rcc: Add some tests
- three more tests cases on expected .qrc generation
- a new test comparing data read via resource with
  the same data directly read from the original file

Change-Id: Ic34e68c9fc3fa110110161b57d4129ae44419020
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-08-24 08:25:42 +00:00
Qt Forward Merge Bot
b73f1cc045 Merge remote-tracking branch 'origin/5.12' into dev
Change-Id: I1114f90a2ed04a784a66505960b0f2460778726d
2018-08-23 23:01:15 +02:00
Edward Welbourne
dc7e775c9c Test for fractional part of Costa Rican currency
CLDR up to somewhere between v29 (used by 5.9) and v31.0.1 (used by
5.10 and later) claimed Costa Ricans don't include fractions in their
currency; now it claims they expec two digits.  Apparently one of them
does expect those digits, so this is the regression test I'll be
cherry-picking back to LTS, to accompany the CLDR updates they need.

Task-number: QTBUG-70093
Change-Id: I138772cc6013fa74de4f7c54b836cac83421eab2
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-08-23 12:54:53 +00:00
Johan Klokkhammer Helsing
bc5953f35b tst_QMenu: Skip tests that require real input events on Wayland
Task-number: QTBUG-62188
Change-Id: I942c2ecadafe2caf430aa83fbba5c03a476c1e38
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2018-08-23 08:17:19 +00:00
Luca Beldi
da9aeb3e4e Implement QStringListModel::moveRows
Implemented the virtual method moveRows to allow row movement

[ChangeLog][QtCore][QStringListModel] Implemented moveRows

Task-number: QTBUG-69807
Change-Id: I518f48a321bd755ab56f2fe84883d27324cc42ec
Reviewed-by: David Faure <david.faure@kdab.com>
2018-08-23 05:51:55 +00:00
Tony Sarajärvi
c9c770d775 Extend blacklisting of tst_QWidget::maskedUpdate to cover all openSUSEs
Fails on previous 42.3 and also 15.0. Just covering "opensuse" saves
us from new commits every time we upgrade our openSUSE. We have a bug
open of it after all.

Task-number: QTBUG-51399
Change-Id: I5c0869daea41b1886faba3d0caaa0804a3705d54
Reviewed-by: Liang Qi <liang.qi@qt.io>
2018-08-22 14:32:55 +00:00
Liang Qi
ee51a2c4dc tests: blacklist tst_QDialog::showFullScreen() on macOS 10.13 in CI
Task-number: QTBUG-70109
Change-Id: I70b998c1853462f8ea2037cff59e9598923743e5
Reviewed-by: Tony Sarajärvi <tony.sarajarvi@qt.io>
2018-08-22 14:32:38 +00:00
Liang Qi
9be1256e0c Merge "Merge remote-tracking branch 'origin/5.11' into 5.12" into refs/staging/5.12 2018-08-22 10:31:09 +00:00
Allan Sandfeld Jensen
dc82a0f4f3 Smooth image scaling for 64bit images
Adds support for smooth scaling 64bit images.

Task-number: QTBUG-45858
Change-Id: If46030fb8e7d684159f852a3b8266a74e5e6700c
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2018-08-22 10:03:15 +00:00
Luca Beldi
02b3d43fd4 _q_interpolate<T> is unsafe with unsigned template arguments
_q_interpolate<T> subtracts 2 arguments of type T,
for unsigned types this can cause wrapping around

Task-number: QTBUG-57925
Change-Id: Iffa59f413579a3d5de8cb728fe71443d8e8a04aa
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2018-08-22 08:38:44 +00:00
Liang Qi
7533156b68 Merge remote-tracking branch 'origin/5.11' into 5.12
Conflicts:
	src/gui/text/qtextengine.cpp
	tests/auto/corelib/itemmodels/qsortfilterproxymodel_common/tst_qsortfilterproxymodel.cpp
	tests/auto/corelib/itemmodels/qsortfilterproxymodel_common/tst_qsortfilterproxymodel.h

Change-Id: Ib9f968edbb0f3387c89bc25e914321d0738bfadc
2018-08-22 10:35:12 +02:00
Thiago Macieira
330290e049 QPluginLoader: pave the way for Qt 6 plugin meta data
We want to store the metadata size and get it from the plugin in Qt 6.

Change-Id: Ieb48f7c0dd0e4e0fb35efffd153bebc2914d9a3c
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2018-08-21 23:59:44 +00:00
Friedemann Kleint
cf0ea18ac4 QWidgetWindow: Ensure Qt::WA_Mapped is set on obscured parent widgets
Frameless obscured windows do not receive WM_PAINT/expose events on
Windows. Qt::WA_Mapped needs to be set on them to ensure updating works.

Task-number: QTBUG-39220
Task-number: QTBUG-52039
Task-number: QTBUG-58575
Task-number: QTBUG-63927
Change-Id: Ic6c11f2be96378b6a6b61296f1f3e13cd49b50a6
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2018-08-21 13:18:07 +00:00
Friedemann Kleint
65b95b61d6 MinGW: Exclude failing value of tst_QEasingCurve::setCustomType()
After updating MinGW toolchain from 5.3.0 to 7.30 test starts to fail.

Task-number: QTBUG-69947
Change-Id: I850d854b27e1cb4e1dd2cb600e8e79bd18bff4a0
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Reviewed-by: Simo Fält <simo.falt@qt.io>
2018-08-21 07:12:19 +00:00
Heikki Halmet
d3dc3e7743 Extend blacklisting of qeventdispatcher to cover WinRT
They have been blacklisted on windows and macOS previously. Now failing
on WinRT as well.

Task-number: QTBUG-69962
Change-Id: I30ca23005b082e820ee896fa36a8984a1536ad6b
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2018-08-21 05:39:39 +00:00
Oswald Buddenhagen
5a03b75c50 Merge dev into 5.12
Change-Id: I63f632b595f66d2fc93e9aa713500e3799e3df2a
2018-08-21 02:32:50 +02:00
Johan Klokkhammer Helsing
b9923b30f0 tst_QWidget: Explain why some tests fail on Wayland
Task-number: QTBUG-66849
Change-Id: Ie6295bd402f6bc960c16f1e4b3b5a786017453e1
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2018-08-20 10:04:22 +00:00
Eike Ziller
67984b265a QMimeDatabase: Fix MIME detection issues with magics in MIME hierarchies
Assume two MIME types A and B are registered, both with the same glob
pattern, A being parent of B, A with some magic rule, and B with another
magic rule. Given a file that matches the glob pattern and the magic rule
of A, the resulting MIME type depended on the order of registration of A
and B, because it would just check if some glob matching MIME type was
also a subclass of the magic matching MIME type.

The patch prefers the the MIME type that matches by magic if that
matches by glob pattern as well (i.e. A in our example).

The "recommended checking order" of the spec does handle that case.

Task-number: QTBUG-44846
Change-Id: I2af43f6199faf9a42cd9c35d3a045441afbd6217
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: David Faure <david.faure@kdab.com>
2018-08-20 07:32:58 +00:00
Samuel Gaist
346c15102b Add support for QRegularExpression to QSortFilterProxyModel
This patch implements the support for QRegularExpression in
QSortFilterProxyModel.

[ChangeLog][QtCore][QSFPM] QSortFilterProxyModel now supports
QRegularExpression.

Task-number: QTBUG-46810
Change-Id: If932d55f98f9b8bcf3a72c03ffd51da52cb50ad1
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
Reviewed-by: Luca Beldi <v.ronin@yahoo.it>
Reviewed-by: David Faure <david.faure@kdab.com>
2018-08-19 11:38:42 +00:00
Samuel Gaist
a2c85bffbe Migrate QDir to use QRegularExpression
The match method still uses QRegExp. This patch updates the code to use
QRegularExpression and translates the wildcard patterns to a suitable
form for QRegularExpression.

[ChangeLog][Core][QDir] QDir now uses QRegularExpression internally for
wildcard matching. Note that QRegularExpression might not give the
exact same result as QRegExp as its implementation follows strictly the
glob patterns definition for wildcard expressions. Nevertheless, the
tests for QDir return the same results as before.

Change-Id: I095959443ac7362f7534e35454eff038061fca82
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2018-08-19 04:03:29 +00:00
Samuel Gaist
3746eb8412 QRegularExpression: refactor wildcard translation
This patch refactors the wildcardToRegularExpression method to generate
a simpler regular expression. It also fixes some shortcomings of the
previous implementation.

Tests have been updated to ensure all cases are properly supported.

Change-Id: I454e3fe8fe0bb663b2f319d6fa2fa8aec626c50d
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2018-08-18 21:59:38 +00:00
Erik Verbruggen
ba9585bd02 [macOS] Skip test that triggers a buffer overflow in CoreFoundation
Deep down in CoreFoundation, ICU is used, and this test triggers a
heap-buffer-overflow with AddressSanitizer. Disable this test for macOS
until Apple fixes it.

Task-number: QTBUG-69875
Change-Id: I43e4a69708be8cde3bde87c57db21f5b717f96b8
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2018-08-17 15:04:16 +00:00
Liang Qi
ae5476eadc Merge "Merge remote-tracking branch 'origin/5.11' into dev" into refs/staging/dev 2018-08-17 12:22:55 +00:00
Andre de la Rocha
981b16d9ba Windows QPA: Fix mapping of static text accessibility role
QAccessible::StaticText should be mapped to UIA_TextControlTypeId instead
of UIA_EditControlTypeId.

Task-number: QTBUG-69894
Change-Id: If2f8f55d2be492c02a3af5b1813ca12cf774a33a
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2018-08-17 08:53:20 +00:00
Luca Beldi
70ba75519d QSortFilterProxyModel inserting at bottom of source model
Before this change, if you try to insert a row at the bottom of QSortFilterProxyModel
the row will be inserted in the source model at position proxy->rowCount rather
than at the bottom. This causes insert at apparently random positions in the source.

[ChangeLog][QtCore][QSortFilterProxyModel]
QSortFilterProxyModel::insertRows(row,count,parent) with
row == QSortFilterProxyModel::rowCount will insert at the bottom of the source model
rather than at the row QSortFilterProxyModel::rowCount of the source model

Task-number: QTBUG-58499
Task-number: QTBUG-69158
Change-Id: Ie78416c8fbc429303b8c9c98375630e3e4d85f6d
Reviewed-by: David Faure <david.faure@kdab.com>
2018-08-17 08:10:11 +00:00
Luca Beldi
d0069ff8c9 Add a method to clear the data to QStandardItemModel
After the behavior of setItemData has been changed following QTBUG-45114,
QStandardItemModel was lacking an interface to clear all the data from a single index.

Task-number: QTBUG-69616
Change-Id: Ide0b5bb6358439fc42c474df8b044fbace6def8d
Reviewed-by: André Hartmann <aha_1980@gmx.de>
Reviewed-by: David Faure <david.faure@kdab.com>
2018-08-17 07:17:12 +00:00
Qt Forward Merge Bot
8842d9d1e6 Merge remote-tracking branch 'origin/5.11' into dev
Change-Id: I8bb8227f9da982e7d5ebe5324fc27abd9ac0d4fc
2018-08-17 09:08:06 +02:00
Ulf Hermann
0a06e1baf9 Modernize the "thread" feature
Add it to configure.json and replace all occurrences of QT_NO_THREAD
with QT_CONFIG(thread). Add conditions for other features that depend
on thread support. Remove conditions where we can use the QMutex and
QThreadStorage stubs.

Change-Id: I284e5d794fda9a4c6f4a1ab29e55aa686272a0eb
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2018-08-17 00:34:36 +00:00
Thiago Macieira
b0479aab29 QUrl: Make sure we do reject URLs for which IDNA nameprep failed
qt_nameprep() already reset the string to its original length to
indicate failure, but we didn't handle that in qt_ACE_do(). So make it
have a return value whcih makes it easier to handle that case and do
handle it.

[ChangeLog][QtCore][QUrl] Fixed a bug that caused URLs whose hostnames
contained unassigned or prohibited Unicode codepoints to report
isValid() = true, despite clearing the hostname.

Change-Id: I41e7b3bced5944239f41fffd1545b7274c4b419d
Reviewed-by: David Faure <david.faure@kdab.com>
2018-08-16 19:34:52 +00:00
Liang Qi
d98106d1d5 Merge "Merge remote-tracking branch 'origin/5.11' into dev" into refs/staging/dev 2018-08-16 18:59:13 +00:00
Liang Qi
8559bf934d Merge remote-tracking branch 'origin/5.11' into dev
Conflicts:
	src/corelib/global/qconfig-bootstrapped.h
	src/plugins/platforms/xcb/qxcbbackingstore.cpp

Done-with: Gatis Paeglis <gatis.paeglis@qt.io>
Change-Id: I4af138ffb2f5306373244523768209e8873b2798
2018-08-16 18:48:59 +02:00
Samuel Gaist
30b0701c9b Refactor wildcard support in QRegularExpression
The API originally proposed was flawed in the sense that the setter
function would use a modified version of the parameter given which would
have make it a black box for the user. This patch fixes that by removing
that setter and providing a static method that will return the pattern
suitably modified to be used by QRegularExpression the same way the
escape method does.

[ChangeLog][Core][QRegularExpression] Implemented support for wildcard
patterns through a static method.

Change-Id: I0054bcaffd7525dac569f54fa81f73b7e4544b2e
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-08-16 16:30:14 +00:00
Mitch Curtis
37bb907a92 Add debugging output to help diagnose cause of tst_qspinbox failure
I've tried to reproduce the failures in the CI a couple of times now,
but it keeps passing. Let's leave some debug output in the test so
that if/when it does fail, we might know a bit more about why it does
so.

Task-number: QTBUG-69492
Change-Id: I5b39ac692e9026ce4b25cd13d342b11e061b777b
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Nathan Collins <nathan.collins@kdab.com>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2018-08-16 10:17:04 +00:00
Edward Welbourne
bcf0be9b8f Avoid signed/unsigned warning in template
tst_QtEndian's transformRegion_template() was getting a
signed/unsigned comparison warning when T was unsigned in a
QCOMPARE(T-value, 0); so use T(0) instead.

Change-Id: I78cb2ab96f79393def65ed2c020aa3039017ab92
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-08-16 10:10:22 +00:00
Edward Welbourne
30c973c93c Rework tst_QLocale::emptyCtor() as a data-driven test
That way, we'll get told all the cases that fail, rather than only the
first.  Provoked by investigation of failures that turned out to be
caused by QTBUG-69875.

Change-Id: I8fa2902cbbcb307cbe1fdec2e7d8d6b0c3eb998a
Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
2018-08-16 10:09:43 +00:00
Andy Shaw
cdccd0222b Add support for big resources with CMake
Task-number: QTBUG-55680
Change-Id: I09570a4e959ffd0e6d378bc315b13d57baaa82e8
Reviewed-by: Kevin Funk <kevin.funk@kdab.com>
2018-08-16 08:56:27 +00:00
Ryan Chu
0160b5a6cb Revert "Disable Docker-based test servers on QEMU devices temporarily"
This reverts commit 0eb1574b28.

Required toolchain update was integrated as:
23560769c1293f7cd7754ed916db2eea42efbd32

Change-Id: I5015a780e31dce5475c8485940ca9de62230e550
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io>
2018-08-15 11:20:00 +00:00
Kevin Funk
48eb08d255 tests: Fix top-level CMakeLists.txt
Problem:
 CMake Error in CMakeLists.txt:
  A logical block opening on the line

    .../qtbase/tests/auto/cmake/CMakeLists.txt:149 (if)

  is not closed.

Broken by change 02ed1b36da

Change-Id: I6c04721edbccaa9fcdb53af92d33dfa87eeaebb8
Reviewed-by: Rolf Eike Beer <eb@emlix.com>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
2018-08-15 11:08:34 +00:00
Alexander Volkov
43f5377fad Make QMessageBox window with the detailed text closable
QMessageBox window ignores QCloseEvent if it was created
with Ok button and the detailed text was set. But it can
be closed if it contains only one button.

Make it closable if there are two buttons and one of them
is the "Show Details..." button.

[ChangeLog][QtWidgets][QMessageBox] A message box with two
buttons, one of which is the "Show Details..." button,
can be closed by clicking the X button on the window's
title bar.

Task-number: QTBUG-69526
Change-Id: Iba09e38561eb3898dc2aecfd38d8519d512a71c1
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2018-08-14 04:39:05 +00:00
Johan Klokkhammer Helsing
edbac71691 Skip all qfocusevent test on platforms that don't support window activation
Task-number: QTBUG-66846
Change-Id: Ia8b69ede9154822f78ca28e0a2470b8bfb2abef0
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2018-08-14 04:38:35 +00:00
Edward Welbourne
44b6757fe5 Add support for numbered territories in CLDR
The CLDR data contains eight locales with numeric territory codes, 001
for World, 150 for Europe and 419 for Latin America.  The last was
already known in our enumdata.py, but as "Latin America and The
Caribbean", which is not supported by the CLDR, so I've amended it
while adding the other two.  This gives us support for Esperanto and
Yiddish (among others).

[ChangeLog][QtCore][QLocale] Added support for World and Europe as
(numeric) "country" codes ("territory" in CLDR terms), thereby
enabling support for Yiddish and Esperanto, among other locales using
such codes.

Task-number: QTBUG-57802
Change-Id: Ibb1180fb720743a3a0589527649d10f3c9cd123d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-08-13 16:17:53 +00:00
Edward Welbourne
fd38c97a6c Fix time-zone tests on macOS >= 10.13, which now knows what CET is
These tests kludge round Apple's use of GMT+1 and GMT+2 as names for
CET and CEST on Darwin; but 10.13 actually gets the names right, so
side-step out of the kludge when on this version or later.

Change-Id: Icb8a2f3ac30f0f621a19042dc03e0d281782dd41
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
2018-08-13 16:17:09 +00:00
Allan Sandfeld Jensen
10a88b8149 Add debug output for single enum flags
They have a separate type that we can't recognize directly, but we
can check if we can recognize the QFlags<T> form, though we have to
add a lot of template-conditions to avoid triggering QFlags static
asserts.

Change-Id: I00853682c5376dd3cc411ff151f47bce2389e277
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2018-08-11 20:09:55 +00:00
Allan Sandfeld Jensen
9c9f98f2ff Implement support for 16bpc image formats
Adds support for 16bit per color image formats in QImage. This makes it
possible to read and write 16bpc PNGs, and take full advantage of the
16bpc paint engine.

[ChangeLog][QtGui][QImage] QImage now supports 64bit image formats with
16 bits per color channel, compatible with 16bpc PNG or RGBA16 OpenGL
formats.

Task-number: QTBUG-45858
Change-Id: Icd28bd5868a6efcf65cb5bd56031d42941e04099
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2018-08-11 14:12:48 +00:00
Allan Sandfeld Jensen
1c623bc6d1 Fix QMetaObject naming of class enum flag
Adds an enumName to QMetaEnum to carry the name of the enum since for
flags that doesn't match the name of the Qt type, but is needed if the
flag is scoped.

Change-Id: I1c0f77eb9e40e6fd1eb6a59bea77caf0f33fcf43
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2018-08-11 07:59:15 +00:00
Timur Pocheptsov
8f58e1319c tst_qdtls: add 'invalidConfiguration' test
Test that we don't silently replace an invalid TLS configuration with
the default one (for now, the only thing that is considered to be
non-valid - is having non-DTLS protocol set).

Change-Id: I6f714b009cf1345a085a3f26d638fc31330f1a94
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2018-08-10 12:18:41 +00:00
Joni Jantti
468c3717eb Blacklist tst_Gestures::explicitGraphicsObjectTarget
This autotest fails on Ubuntu 18.04.

Task-number: QTBUG-69892
Change-Id: I3673d06f06fcd8db307fc53c27724b227978f20d
Reviewed-by: Tony Sarajärvi <tony.sarajarvi@qt.io>
2018-08-10 12:18:34 +00:00
Timur Pocheptsov
ab731692e2 QDtls: delay protocol version verification
A weird behavior of the DTLS server example, when linked with 1.0.2,
exposed that client code, requesting an invalid protocol (for example, SSLv3)
can end-up with connection encrypted with DTLS 1.2 (which is not that bad,
but totally surprising). When we check the protocol version early in
setDtlsConfiguration() and find a wrong version, we leave our previous
configuration intact and we will use it later during the handshake.
This is wrong. So now we let our user set whatever wrong configuration they
have and later fail in TLS initialization, saying -
'Unsupported protocol, DTLS was expected'.

Auto-test was reduced - the follow-up patch will introduce a new
'invalidConfiguration' auto-test.

Change-Id: I9be054c6112eea11b7801a1595aaf1d34329e1d2
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2018-08-10 03:55:28 +00:00
Tor Arne Vestbø
6b8e03456b tst_qmenu: Fix funky use of QTRY_VERIFY with qWaitFor
The QTRY_VERIFY was needed because the window doesn't initially have a handle,
and QTest::qWaitForWindowActive(QWidget *) only checks the active state of the
widget if it does, returning false if not.

This broken logic should be fixed, but for now let's make it clear what's
actually going on by using an explicit wait for the window handle.

Change-Id: I6dd89e0894efed14f4b9a2562dfe8ca76b5ef89c
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2018-08-09 22:36:11 +00:00
Eskil Abrahamsen Blomfeldt
65a1d41a09 Fix potential crash when showing line/paragraph separators
When showing line and paragraph separators at an offset from the start
of the string, the end of string pointer would be incorrectly set, and
we would read past the end of the string. If any part of this memory
happened to match the line or paragraph separator, then we would
overwrite it and have a crash.

I couldn't find any reliable way to test this, since the crash depends on
the contents of the memory after the string allocated by the algorithm.
But with an overflow of 100 000 characters, I found that it crashed every
time I ran the test.

[ChangeLog][QtGui][Text] Fixed potential crash when using
QTextOption::ShowLineAndParagraphSeparators.

Task-number: QTBUG-69661
Change-Id: I17d1996b883560bacdc7ce114c8aeb2b0108faea
Reviewed-by: JiDe Zhang <zccrs@live.com>
Reviewed-by: Michal Lazo <xlazom00@gmail.com>
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
2018-08-09 12:46:22 +00:00
Tony Sarajärvi
1a0b54b825 Extend blacklisting of tst_QSequentialAnimationGroup to macOS 10.13
Task-number: QTBUG-59806
Change-Id: Ic9df44ed4fb7aae4291447c5982f68e51de2abe0
Reviewed-by: Liang Qi <liang.qi@qt.io>
2018-08-08 18:41:04 +00:00
Gatis Paeglis
b4977a332b tests: blacklist tst_qwidget::saveRestoreGeometry on xcb
This test was un-blacklisted in 4050ee6ac7
but apparently it is still not stable.

Task-number: QTBUG-69666
Change-Id: Iaf933ee27d54ebbfa52d0a8d7b1def0ca91808e7
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io>
2018-08-08 10:36:21 +00:00
Liang Qi
ee2e38490d Merge "Merge remote-tracking branch 'origin/5.11' into dev" into refs/staging/dev 2018-08-07 18:12:02 +00:00
Qt Forward Merge Bot
053e7cce79 Merge remote-tracking branch 'origin/5.11' into dev
Conflicts:
	.qmake.conf
	src/corelib/doc/src/objectmodel/signalsandslots.qdoc
	src/plugins/platforms/cocoa/qcocoamenuloader.mm
	src/plugins/platforms/xcb/qxcbconnection.cpp
	src/plugins/platforms/xcb/qxcbconnection.h
	src/plugins/platforms/xcb/qxcbconnection_xi2.cpp
	src/plugins/platforms/xcb/qxcbwindow.cpp
	tests/auto/gui/image/qimage/tst_qimage.cpp

Done-with: Gatis Paeglis <gatis.paeglis@qt.io>
Change-Id: I9bd24ee9b00d4f26c8f344ce3970aa6e93935ff5
2018-08-07 17:44:51 +02:00
Mitch Curtis
ca14151a0c tst_qspinbox: include actual emission count in failure message
It's useful to know how many times the signal was emitted, because it
gives us insight into why the test may have failed, especially when
it's difficult to reproduce.

Task-number: QTBUG-69492
Change-Id: I94796ed880512b060e0a724c87edde8c3b91bb7c
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2018-08-07 10:12:29 +00:00
Mitch Curtis
2bb454ee67 tst_qdatetimeedit: call setCalendarPopup(false) when cleaning up
Tests could change this property, and since the majority of the tests
share testWidget instead of creating local instances, we should be
thorough when cleaning up.

Change-Id: I6039fb6857f4f788f809b1d1fd491b4ef34923ca
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2018-08-07 10:12:12 +00:00
Mitch Curtis
58e3e32adf tst_qdatetimeedit: hide testWidget when creating widgets on the stack
The majority of the test reuses testWidget. While this may be faster
than creating a QDateTimeEdit instance on the stack for each test,
it introduces issues when certain properties aren't unset when cleaning
up. This happens easily when new tests are introduced which rely on
certain properties, for example.

Rather than making the newly introduced step-modifier-related tests
use testWidget, this patch goes with the simpler option of hiding
testWidget, just like other tests currently do.

Eventually we should probably switch to using local instances
everywhere.

Task-number: QTBUG-69492
Change-Id: I4d5625be0b7c72db793346f43fe3a7e7c1241f13
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2018-08-07 10:12:05 +00:00
Joni Jantti
377bc2b2ae Blacklist tst_Gestures::graphicsItemTreeGesture
This autotest fails on the new Ubuntu 18.04 platform.

Task-number: QTBUG-69648
Change-Id: I08bd892e2b6a733f3cda32091463745e8b8feed7
Reviewed-by: Simo Fält <simo.falt@qt.io>
2018-08-06 10:59:06 +00:00
Oliver Wolff
f51fc53844 winrt: Fix tst_QGraphicsItem::cursor
By making the test independent of fixed top level widget sizes, it can
also be run on platforms, that do not support this feature.

Task-number: QTBUG-68297
Change-Id: I6945d259801360a9819b9b631d0a7497d3d27a9a
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2018-08-06 05:24:38 +00:00
Oliver Wolff
e05dc08ba0 winrt: Implement QPlatformCursor::setPos
Additionally to setting the cursor position we have to make sure that
enter and leave events are triggered. As WinRT at the moment only supports
maximized/fullscreen native top level widgets, an enter or leave event has
to be triggered, every time the cursor enters or leaves the core window.
Same as is done on Windows desktop an enter event is immediately followed
by a move event even for emulated mouse events.

Change-Id: I4b9a7b07f8e24b7887619f96979a064d933788aa
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
2018-08-06 05:24:35 +00:00
Thiago Macieira
f8dba7ac01 tst_QSharedPointer: raise the timeout for running qmake and makespec
We had 30s and 60s only, which isn'tenough for the Qt CI.

Task-number: QTBUG-69741
Change-Id: I00e04a465fcf4fc1a462fffd154782999e84ef8b
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2018-08-04 23:26:24 +00:00
Christian Ehrlicher
faff43348b QHeaderView: respect min/maxSectionSize in setDefaultSectionSize()
The min/max section size was not checked when setting the default
section size. This was an oversight when the check for min/max section
size was added to resizeSection().

[ChangeLog][QtWidgets][QHeaderView] setDefaultSectionSize() now
checks if the given value is inside min/max section size

Task-number: QTBUG-69431
Change-Id: I1b5704282927ce5a8520f52174ebf91d9840bc8a
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
2018-08-04 19:31:15 +00:00
Thiago Macieira
64a560d977 QObject: do allow setProperty() to change the type of the property
[ChangeLog][QtCore][QObject] Fixed a bug in setProperty() that caused a
property change not to take effect if the old value compared equal using
QVariant's equality operator, but the values were not strictly equal.

Task-number: QTBUG-69744
Change-Id: I00e04a465fcf4fc1a462fffd1547885861a07a64
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2018-08-04 15:46:02 +00:00
Tor Arne Vestbø
f29c955483 Blacklist flaky tst_QSpinBox::stepModifierPressAndHold on OpenSUSE
Task-number: QTBUG-69492
Change-Id: Ic24bad5a6b0c085e82f95e0b418d4d57405de4ea
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2018-08-04 13:45:42 +00:00
Simon Hausmann
22eb4bacae Enable QPluginLoader test for static builds
The majority of tests use QPluginLoader::setFileName implicitly, which
refuses to do any work in static builds. Therefore the majority of tests
are skipped. But in the future we'll get tests here that for example use
QPluginLoader::staticPlugins() and for that we want to include the
sub-directory in the build and test run.

Change-Id: Ib8ec274e22ac8050feaca8967eb8626b53876b92
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2018-08-03 20:26:58 +00:00
Thiago Macieira
6c8160b0dc QCborValue diagnostics: Properly escape strings
I'm intentionally not testing improperly-paired surrogates, since those
can't be encoded in CBOR.

Change-Id: I0d3cc366baaa49f3ad28fffd154240287ce34c22
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2018-08-03 20:26:42 +00:00
Ryan Chu
0eb1574b28 Disable Docker-based test servers on QEMU devices temporarily
Before libnss-mdns package is added to boot2qt dependency, the QEMU
devices should keep using the remote test server. There are two Linux
QEMU devices using 'linux-generic-g++' and 'linux-lmx7-g++' target
mkspec.

Relates to yocto/meta-boot2qt (Change-Id: I480f45)

Change-Id: I7870d3a184109e0abf712b4513148cf9a4520189
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io>
2018-08-03 19:25:29 +00:00
Allan Sandfeld Jensen
65cd6f2e82 Fix conversion from transparent indexed8 to RGB32
A typo meant the color-table was not fixed. For safety fallback colors
are also made opaque.

Change-Id: I3e609882177604910c4343c86f00221a89af9078
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2018-08-03 10:42:38 +00:00
Joerg Bornemann
f0ff73f631 QProcess::startDetached: Fix behavior change on Windows
Do not overwrite stdout/stderr by default, but only if requested.
This restores the behavior of QProcess::startDetached of Qt 5.9.

Task-number: QTBUG-67905
Change-Id: Idccf7b0da7bd80f88a0624286ddf2851bc974fb1
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2018-08-03 08:09:30 +00:00
Timur Pocheptsov
9f2a671560 Extend 'ignoreExpectedErrors' test
with a case when we fail to ignore/pre-set one of possible
verification errors.

Change-Id: I23b06243b61acef1ef3576c51529f3ef6601ba7d
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2018-08-02 04:05:27 +00:00
Mårten Nordheim
2dfa41e0ea Return to eventloop after emitting encrypted
When the connection has been encrypted we will,
in QHttpNetworkConnectionChannel::_q_encrypted, emit 'reply->encrypted'
in which user slots can be called.

In the event that the user calls abort it will, however, not abort until
the next time it goes back to the event loop (which might not happen
until after the request has already been sent).

Task-number: QTBUG-65960
Change-Id: I96865f83c47f89deb9f644c86a71948dbb0ec0d0
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2018-07-31 14:57:02 +00:00
Edward Welbourne
cf2d59bfe8 Merge "Merge branch '5.11' into dev" into refs/staging/dev 2018-07-31 11:34:23 +00:00
Edward Welbourne
23c9d4c98f Merge branch '5.11' into dev
Conflicts:
	qmake/library/qmakebuiltins.cpp
	src/plugins/platforms/windows/qwindowstabletsupport.h
	src/plugins/platforms/xcb/qxcbconnection.cpp
	src/plugins/platforms/xcb/qxcbconnection.h
	src/plugins/platforms/xcb/qxcbconnection_xi2.cpp
	src/plugins/platforms/xcb/qxcbwindow.cpp
	src/widgets/styles/qstylesheetstyle.cpp
	tests/auto/widgets/styles/qstylesheetstyle/tst_qstylesheetstyle.cpp

Done-With: Gatis Paeglis <gatis.paeglis@qt.io>
Change-Id: I000b0eb3cea2a5c7a99b95732bfdd41507cf916e
2018-07-31 13:33:14 +02:00
Timur Pocheptsov
5c7d2033e0 QDtls: respect pre-set verification errors
That's actually how ignoreVerificationErrors (and QSslSocket::ignoreSslErrors)
are used to set the expected/known verification errors before handshake.
Auto-test updated too.

Change-Id: I9c700302d81ddb383a4a750fafd594373fb38ace
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2018-07-31 11:20:53 +00:00
Jüri Valdmann
f43e947dc4 QJsonDocument: Make emptyObject an object
A default-constructed QJsonObject has no data payload, it is only a pair of null
pointers. So, when it becomes necessary to 'materialize' such an object, a
special global emptyObject constant is used as the substitute payload. There is
a small problem with this global constant though, namely that it's is_object
flag is unset. In other words, the emptyObject is not an object, but an array.

Fix by setting the is_object flag on emptyObject.

The example code in the bug report

    QJsonObject parent;
    QJsonObject child;
    parent["child"] = child;              // 1
    child = parent["child"].toObject();   // 2
    child["test"] = "test";               // 3

runs into this problem on line 1. Inserting the default-constructed child means
inserting a copy of emptyObject. On line 2 a pointer to this copy of emptyObject
is retrieved and cast to an object. But it's not an object, it's an array, so
things go wrong hereafter.

Specifically, on line 3, two inserts are performed, one from operator[] and one
from operator=. Each insert increments a compaction counter. The second insert
triggers compaction (QJsonObject::insert calls Value::requiredStorage calls
Data::compact) and compaction branches based on the is_object flag. Replacing
line 3 with

    child.insert("test", "test");

causes the example to appear to work since compaction is not triggered and the
JSON serializer does not look at the is_object flag. Still, any further insert()
calls would trigger compaction and memory corruption.

Task-number: QTBUG-69626
Change-Id: I8bd5174dce95998bac479c4b4ffea70bca1a4d04
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2018-07-31 09:33:42 +00:00
Oliver Wolff
3ed22c5efe tst_qsystemsemaphore: Use qt_test_helper functionality
Change-Id: I18a5d2d496e1442470423e0f05062cc2ae76a4e4
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2018-07-31 05:27:08 +00:00
Oliver Wolff
8860c26260 tst_qobject: Use qt_test_helper functionality
Change-Id: I79949ffa82a98e0d3a71e2bf416a0bee321bf113
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2018-07-31 05:27:01 +00:00
Oliver Wolff
6be553a2c8 tst_qsharedmemory: Use qt_test_helper functionality
Change-Id: I70b92b8350822f6d627e5f267188bb7d1d2946d9
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2018-07-31 05:26:59 +00:00
Tony Sarajärvi
27005d3352 Extend blacklistin of tst_QTimeLine tests to macOS 10.13
Task-number: QTBUG-61037
Change-Id: I709f15ccb1fb8bbfad8989923991f752fa22ae0a
Reviewed-by: Liang Qi <liang.qi@qt.io>
2018-07-31 05:02:32 +00:00
Tony Sarajärvi
4563dac19a Extend blacklisting of tst_QElapsedTimer::elapsed to cover macOS 10.13
Task-number: QTBUG-58713
Change-Id: I4465aeb245faf0d2e937c04b737c9a4768e662ee
Reviewed-by: Liang Qi <liang.qi@qt.io>
2018-07-31 05:02:30 +00:00
Tony Sarajärvi
1f605b62ad Extend blacklisting of showMinimizedKeepFocus to macOS 10.13
Task-number: QTQAINFRA-1359
Change-Id: I5d291dcbb41ce71ec85e238b29bb98d292538f9f
Reviewed-by: Liang Qi <liang.qi@qt.io>
2018-07-31 05:02:27 +00:00
Thiago Macieira
7cb5b324f0 QCborValue: move the toDiagnosticNotation() function to its own file
If we ever need to add QCborValue to the bootstrap library, it's
unlikely that we'll need this part. And by splitting it, I can make the
code handle more cases, that hadn't been properly handled before.

Change-Id: I2f630efbbce54f14bfa9fffd154160c0ad893695
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2018-07-30 16:21:12 +00:00
Edward Welbourne
f69a5857d1 canonicalFilePath: treat ENOTDIR as a case of file not existing
There is no such file, if one of the "directory" components of its
path is not, in fact, a directory.  Added a test for non-existent file
(specified to give empty canonical file path) as well as a test for a
file in a sub-directory of a known file.  The former incidentally
tests for QTBUG-29402, fixed long ago.

Change-Id: I60b80acc0f99f0a88cdb1c4d191af7384f3a31c5
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-07-30 15:05:29 +00:00
Edward Welbourne
a76a0afc1a Reduce redundancy and duplication in tst_QFile::appendAndRead
Use one QStringLiteral instead of repeating a QLatin1String(), that
was passed to a function that has to convert it to unicode; do the
conversion at compile-time.

Reducing i % 256 is fatuous when i ranges from 1 to 100.

A QFile will close() itself on destruction, no need to do it explicitly.
Especially when *not* close()ing the *other* QFile that was left open.

Change-Id: Idb39312d9c9beaf082b7cead574bc6bb9bb3a775
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-07-30 15:04:40 +00:00
Edward Welbourne
cb505bedde Actually truncate when asked to
On Unix, we wouldn't even *try* to truncate if the file was open for
appending.  The combination may be an eccentric choice but - at least
when it's combined with reading - I can imagine use-cases for it; and
we should (at least try to) deliver what we're asked for, even if we
can't think why anyone would want it.  So actually enable truncation
when asked to.

Amended some tests to check this works and corrected the QIODevice
documentation of mode flags (which misdescribed the special case that
implies Truncate).  Removed special-case code, to apply truncate when
writing but not reading, since it's been made redundant by the
pre-processing of mode done in QFSFileEngine::processOpenModeFlags().

[ChangeLog][QtCore][QFile] When opening a file, if Truncate is asked
for, or implied by other flags, it shall be attempted, regardless of
what other options are selected.  We previously did this on Windows;
now we do so also on Unix (even when appending).

Task-number: QTBUG-13470
Change-Id: I1e08d02cfbae102725fccbbc3aab5c7bf8830687
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-07-30 15:04:31 +00:00
Thiago Macieira
b0085dbeea QRandomGenerator: remove unnecessary cast to float in RandomValueFP
I don't know why I did that.

Change-Id: I20fd00e600264ff98c6afffd15410722b6d95a61
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2018-07-29 19:09:16 +00:00
Kai Koehne
bd0279c417 Logging: Accept .ini files written by QSettings
For keys, QSettings escapes all characters outside of [-a-zA-Z0-9_.]
by using percent encoding, and changes '/' to '\'. That is,

  settings.setValue("qt.*", true)

will be written to an .ini file as

  qt.%2A=true

This means that QSettings can not be used to write general-purpose
qtlogging.ini files. Fix this by applying the reverse transformation
method from QSettings when reading in the .ini file.

[ChangeLog][Logging] Qt will now accept qtlogging.ini files
written by QSettings.

Task-number: QTBUG-69548
Change-Id: I55b7a8b433291268dc6855901f72b1c04f8ee6d3
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-07-28 14:43:40 +00:00
David Faure
ce4407c327 QSFPM unittest: check dataChanged and layoutChanged signals
I'm not sure why QSFPM purposefully emits dataChanged for a source
dataChanged that triggers a layoutChanged (i.e. due to sorting, multiple
rows are moving around). (This predates the git import in Qt 4.5.)
Surely whoever is listening will not gain much from the "small" dataChanged
after the "big" layoutChanged... anyhow, this documents the current behavior,
at least.
It also proves that the bug I saw long ago (changing a filtered-out
value used to emit dataChanged(invalid, invalid), IIRC) is no longer present.

Change-Id: I8975c549db88226b2b3393de9f8dca4f4109df15
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
2018-07-28 12:26:41 +00:00
Robbert Proost
8a450f570b QUrl: Support IPv6 addresses with zone id
Task-number: QTBUG-25550
Change-Id: I37ec02b655abe2779aa11945e20550ce00e43723
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-07-27 21:20:29 +00:00
Ryan Chu
3f80783b11 Rework QNetworkReply tests to use docker-based test servers
This change frees the tests of their dependence on the Qt internal test
server (qt-test-server.qt-test-net). It makes the developers run the
tests out of Qt testing infrastructure.

If the user has installed Docker engine on their host, the test servers
will be built up inside separate Docker containers, and then, the test
case goes with the Docker-based test servers. Otherwise, the test case
will keep using the Qt internal test server.

Task-number: QTQAINFRA-1686
Change-Id: I518bc3675bfd658938509744b0e7e0610bc8bf66
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io>
2018-07-27 17:40:27 +00:00
Timur Pocheptsov
8948491eda QDtls - use conventional names
More Qt-style and more natural, also, shorter names.

Change-Id: I97bd68a8614126d518a3853027661435dc4e080d
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2018-07-27 11:53:28 +00:00
Oliver Wolff
2e88340ad2 tst_qpluginloader: Fix preprocessor condition
Change-Id: Icb7767cb6b0e091a21196518d3908a810970592a
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2018-07-27 04:48:30 +00:00
Allan Sandfeld Jensen
9ce4006565 Fix moc'ing of enum class flags
Keep the original class name around for a little longer so we can
generate the correct scoped enum in the moc output.

Task-number: QTBUG-47652
Change-Id: Ib5934316fa786cc475335b03c86b8ec2dc239055
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2018-07-26 22:14:56 +00:00
Allan Sandfeld Jensen
89f784757e Improve output of Q_ENUM
When we have the named keys and not just integer values, we can output
something unambiously that closer match how the enums should be used.

Output of enums without proper metadata is left unchanged

Before:
QSurfaceFormat::ColorSpace(DefaultColorSpace)
QPainter::CompositionMode(3)

After:
QSurfaceFormat::DefaultColorSpace
QPainter::CompositionMode(3)

Change-Id: I537e879ba8b5c555b2aae9ba831facc88d430443
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2018-07-26 22:14:42 +00:00
Edward Welbourne
0b688e2955 Check against copying the husk left by a move
The copy-assign operator tests against other.d being NULL but the
copy-constructor didn't.  This can only matter if the value being
copied has been moved from, so we could probably replace with an
assertion in practice, but we should at least be consistent.

Amended test to check this case too; and verified new test crashes
without this fix.

Change-Id: I46872a677775944bbdf6a9112e719873e574ae60
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-07-26 16:35:59 +00:00
Timur Pocheptsov
056fbf03a5 QDtls - refactor
This patch renames rather awkward 'remote' into more conventional
'peer' (similar to what we have in QAbstractSocket).

Change-Id: Ifc45e538b8adf9cc076bd7aee693277829fd94dc
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2018-07-26 15:13:57 +00:00
Oliver Wolff
a5d8f00b3b tst_qplugin: Re-enable loadReleasePlugin test case
Change-Id: I678a8748ac757ae2918dd80e4a6d802d7de7b0b0
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2018-07-26 14:26:42 +00:00
Oliver Wolff
b6597c8b7b Skip qplugin auto test for static configurations
All test cases use QPluginLoader which will not work for static builds of
Qt.

Change-Id: I7dcddcd5213681bd3ae4cd85e49ee0bb5748f687
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2018-07-26 14:26:36 +00:00
Oliver Wolff
eed8141a7c Fix compilation of tst_QGraphicsItem in Visual Studio
Visual Studio complained about the usage of a potentially uninitialized
variable which made compilation fail.

Change-Id: I0bc9d1e47d3b00b047912164c3bc4197a2058f85
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
2018-07-26 06:45:49 +00:00
Thiago Macieira
9a04453b50 Fix the fix for mmap() overflow check
The code I introduced in 4ee7425794 only
dealt with systems that reasonably used a 64-bit off_t parameter. Turns
out that we don't turn on largefile support on 32-bit Android, which
meant that the fix caused a regression.

[ChangeLog][QtCore][QFile] Fixed a regression that caused QFile::map()
to succeed or produce incorrect results when trying to map a file at an
offset beyond 4 GB on 32-bit Android systems and on some special Linux
configurations.

Task-number: QTBUG-69148
Change-Id: I2c133120577fa12a32d444488bac3e341966f8d7
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2018-07-25 12:40:04 +00:00
Oliver Wolff
41ed77e59b tst_qtextcodec: Use qt_test_helper functionality
The helper application is only needed for Unix platforms, so there is no
need to build it for other configurations.

Change-Id: I4ebb896c66d3ded016f72fdbe631ec2f1276db22
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2018-07-25 10:27:42 +00:00
Edward Welbourne
dcd35d13e0 Rework the start-of-time fileTimes() test to add another test-case
Turned it into a data-driven test, with the old start-of-time as one
row, in order to add a regression test for an alleged MS API bug in
Windows XP.

Task-number: QTBUG-12006
Change-Id: I632ecc854f50f4183a990c8a27826ede9bd20e55
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-07-25 09:21:42 +00:00
Edward Welbourne
09f254fcc0 Fix two "unused variable" warnings
Change-Id: Iafced3ffcc24303a1034805b46eb49bd076d1e79
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-07-25 09:09:29 +00:00
Jędrzej Nowacki
6970d4048f tst_QCommandLineParser: Add missing QVERIFY
QCommandLineParser::addOption returns false in case of an error.
Tests should check it.

Change-Id: I3507e1c236a15a7c0a77c0c80f8dba65b664a535
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2018-07-25 07:26:45 +00:00
Mikhail Svetkin
d1dcc4d8cd corelib/tools: add qMakeArray() API
This function can be used to create std::array without the need
to explicitly provide the size of array. It also has a specialization
that allow to generate sorted array at compile time. Sorted array can
be beneficial for example in binary search.

Change-Id: Ifc7e06e451812fce2ab94293959db5e9cc038793
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
2018-07-25 06:57:44 +00:00
Oliver Wolff
92c5f3fb7b Add qt_test_helper feature
To avoid (even more) duplicated code, "qt_test_helper" ensures the
policy of putting a test's helper application next to the test's
own executable.
The helper executable is suffixed with "_helper" to avoid name
clashes with its folder.

Change-Id: Ic50cb1daa257e7ffc75440c10a3b90fd39424683
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2018-07-25 05:17:47 +00:00
Eirik Aavitsland
731538fdd4 Add API for reading and decoding graphical texture files
Add a framework for reading and decoding stored graphical texture file
formats. Includes decoders for the PKM and KTX formats.

This is basically the same texture file reading that was added to
qtdeclarative for 5.11, but has been refactored to be independent of
the scenegraph and opengl.

Task-number: QTBUG-67026
Change-Id: I87d8117550d8a2112f4f58c03e9ac6b3249cbc5a
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2018-07-24 16:46:05 +00:00
Eirik Aavitsland
1ed0b2170d Give the QGradient presets ObjectMode coordinate mode by default
ObjectBoundingMode has inconsistent behavior and is deprecated in
favor of ObjectMode.

Change-Id: I748f6283f3db5869bb9a67c08bf5f16abc6f95b0
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2018-07-24 16:45:53 +00:00
Joni Jantti
549abf9e6a Blacklist tst_Gestures::graphicsView on Ubuntu 18.04
This autotest fails on the new Ubuntu 18.04 platform.

Task-number: QTBUG-69599
Change-Id: I575e6f52a539e03ab37ca62e580889854ddb9781
Reviewed-by: Simo Fält <simo.falt@qt.io>
2018-07-24 15:32:20 +00:00
Joni Jantti
05ddbacf6c Blacklist tst_QWidget_window::setWindowState
This autotest fails on the new Ubuntu 18.04 platform.

Task-number: QTBUG-68864
Change-Id: I799defcec3a41d86a604bfcd4c2e1081ae4e0e53
Reviewed-by: Simo Fält <simo.falt@qt.io>
2018-07-24 15:32:13 +00:00
Joni Jantti
d2015b4d06 Blacklist tst_QWidget_window::tst_resize_count
This autotest fails on the new Ubuntu 18.04 platform.

Change-Id: I815e36f7a099ca4c83767c7a1adb0f87f5bff7b5
Reviewed-by: Simo Fält <simo.falt@qt.io>
2018-07-24 15:32:07 +00:00
Joni Jäntti
28cdd1b497 Revert "Blacklist tst_QWidget_window::setWindowState"
Wrong test was blacklisted for this commit.

This reverts commit 85607bd70d.

Change-Id: Ica5272799afec88c05e2cd137835bcdcb587836e
Reviewed-by: Simo Fält <simo.falt@qt.io>
2018-07-24 15:32:00 +00:00
Richard Weickelt
f8c15fe63c Fix wrong relative path to qdbus_symbols.cpp
Commit d743df975d broke tst_qdbusinterface
when not using dbus-linked config option.

Change-Id: Iae5725ac781151e3a3d70032d6530bf4363daafa
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-07-24 04:24:31 +00:00
Edward Welbourne
27f1f84c1c Let QDir::absoluteFilePath() use isAbsolutePath() for resource paths
Using QFileSystemEntry::isAbsolute() broke handling of resource paths.
Extended QDir::absoluteFilePath() tests to cover absolute resource path
and some UNC variants also resolved in the same fix.
Amend existing filePath tests to use drives where needed.

Task-number: QTBUG-68337
Change-Id: I4f02cf67828ad93e562857118f8442037f18bab7
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-07-23 14:28:38 +00:00
Sérgio Martins
9229452e57 Introduce QScopeGuard
A RAII style class which calls a function at end of scope.

Example usage:
    auto cleanup = qScopeGuard([] { <my cleanup code> ; });

[ChangeLog][QtCore] Introduced QScopeGuard.

Task-number: QTBUG-62894
Change-Id: Ife67f5c76255a1fafbae03367263da0bac9a0070
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2018-07-21 17:47:35 +00:00
Friedemann Kleint
189e40e11e Add QTextStream operators for QStringView
Change-Id: I72d597fa21521a04b7f7c0e41bd45ee9dabb6222
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-07-20 20:51:08 +00:00
Joni Jäntti
588fcde580 Revert "Blacklist tst_QThread::create"
The "boot2qt" platform needs to be blacklisted,
not "ubuntu-18.04".

This reverts commit 0d49ac0ffc.

Change-Id: I768a66c56f5fc7e0771473152579ed1c01bbbdb9
Reviewed-by: Sami Nurmenniemi <sami.nurmenniemi@qt.io>
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2018-07-20 07:00:29 +00:00
Oswald Buddenhagen
99c3ef0789 prune cargo-culted and obsolete winsock deps from autotests
Change-Id: I9666598d34e965d7058aeb2b2e7fb3f59600675c
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2018-07-19 13:31:08 +00:00
Jarek Kobus
ff18b02f21 uic: Revert the microoptimization patch introducing QStringLiteral
This reverts the following commits:
d12d2949d1
26c3bec09b
49b08f96e8

We can't easily predict all code paths for QDesigner
with such a microoptimization. We also don't want
to generate three different string constructions
depending on some sophisticated heuristics.

[ChangeLog][uic] The -no-stringliteral option is now deprecated and
UIC will not generate QStringLiteral anymore.

Task-number: QTBUG-65251
Task-number: QTBUG-51602
Change-Id: I34a5a1934a8df19c5c84ac2ba8e5168ce5665037
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-07-19 12:38:45 +00:00
Thiago Macieira
8a5267e4d9 Plugins: fix crash if the binary JSON data contains invalid size
Eight bytes into the Binary JSON header there's a 32-bit little-endian
size, which qJsonFromRawLibraryMetaData uses to determine the size of
the stored metadata. That value is passed as a size to QByteArray, which
means certain values could cause crashes due to being too big or via
sign-extension in 64-bit.

[ChangeLog][QtCore][QPluginLoader] Fixed an issue that could cause a
crash when certain damaged or corrupt plugin files were scanned.

Change-Id: I117816bf0f5e469b8d34fffd153dc5425cec39a7
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2018-07-19 07:27:02 +00:00
Oswald Buddenhagen
4f066d1071 include QTcpSocket to make the header self-contained again
amends 9e24b43cb.

Change-Id: I000261dcbfb50999c68b590afd91177362645562
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2018-07-18 09:49:48 +00:00
Edward Welbourne
a040369622 Restore qlistview testing on Linux
It might have been fixed in the three years since it was marked
insignificant, and we can't investigate the crash while it's not
tested.

Task-number: QTBUG-50747
Change-Id: I99cdeb55e207d10fe524cd5f4868f042c64eb7d3
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2018-07-18 09:25:30 +00:00
Thiago Macieira
cc5d816800 Merge "Merge remote-tracking branch 'origin/5.11' into dev" into refs/staging/dev 2018-07-17 18:20:12 +00:00
Edward Welbourne
a9dfe71cca Fix typo: s/Numering/Numbering/
Kept the intended word (rather than "number system" or "numeral
system" as might seem more natural) since CLDR's
common/supplemental/numberingSystems.xml uses numbering in its name
and in the XML tag-names in its contents.  Thanks to Kari Oikarinen
for noticing, in review.

Change-Id: I85077611f9de8c4e812e1b5324fa2e99868b7b95
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-07-17 14:40:05 +00:00
Edward Welbourne
9d52eb9ed0 Made more tst_QLocale tests data-driven
This should improve reporting and ensure we know about each failing
case, not just the first, when one fails.

Change-Id: Ic00272201f69a2fd8508df23b1d746ea605aa539
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Kari Oikarinen <kari.oikarinen@qt.io>
2018-07-17 14:39:55 +00:00
Edward Welbourne
3c0f33e4a0 Assume Win >= Win7 in code that used to test it
Cleaned up some related #if-ery in the process.

Change-Id: I70f3152f2096ec34f36782fa1c3329f51c9b34f0
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2018-07-17 14:39:44 +00:00
Sergio Martins
856284d525 Reset geometry constraints when removing stylesheet
CSS geometry constraints such as "min-height" or "min-width"
will set size constraints on the widget.

Removing the stylesheet should remove these constraints.

Task-Id: QTBUG-69418
Change-Id: I1008e4390281c90112303d72dd7d59a8acddfcd9
Reviewed-by: David Faure <david.faure@kdab.com>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2018-07-17 11:24:29 +00:00
Qt Forward Merge Bot
1783fca897 Merge remote-tracking branch 'origin/5.11' into dev
Conflicts:
	src/plugins/platforms/cocoa/qcocoawindow.mm
	src/plugins/platforms/xcb/qxcbintegration.cpp

 Conflicts git missed:
	src/plugins/platforms/qnx/qqnxglcontext.cpp

Change-Id: I0582cdc9e66e43efe79038b9c43d4f9572ac88fc
2018-07-17 10:19:22 +02:00
Edward Welbourne
b82648bd59 Update CLDR to version 33.1 (2018/June/20)
Routine update in preparation for 5.12
* omitting Chakma because QLocale can't represent the zero digit,
* de_DE no longer uses vorm./nachm. but AM/PM

[ChangeLog][Third-party code] Updated CLDR to version 33.1

Task-number: QTBUG-67654
Change-Id: If20c47bb030abc3700b4f5a592152e617e2767c2
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
2018-07-16 15:47:28 +00:00
Edward Welbourne
9a58ba4793 Split up many long lines in tst_QLocale
Rewrote some of them away, in the process, using string arithmetic.

Change-Id: Ie1a29abefab001889a22a8bc66c7eee608496786
Reviewed-by: Albert Astals Cid <albert.astals.cid@kdab.com>
2018-07-16 15:23:11 +00:00
Edward Welbourne
cbd6a864e4 Adjust some indentation and spacing in tst_QLocale
This is preparation (the WS-only parts) for splitting up some
over-long lines, in the course of which I also fix some indentation.

Change-Id: I800490e328b5e16d40685dff04c09cd145d5eacf
Reviewed-by: Albert Astals Cid <albert.astals.cid@kdab.com>
2018-07-16 15:23:04 +00:00
Thiago Macieira
1f27c1161b QPluginLoader: limit the amount of memory used when scanning plugins
When using actual memory allocation, limit to 64 MB, not the full file
size. On most systems, the memory map technique will work, so this won't
even be tried. In any case, we don't need the fix for the OOM situation
that was applied in commit e211ab76d7.

As for the memory mapping technique, this commit limits the allocation
to reasonable values given the virtual memory addressing space. Half a
gigabyte is probably acceptable on 32-bit systems, where there should be
a contiguous space for the OS to allocate the file in. This commit also
fixes an overflow when converting from qint64 of the file size to ulong
(32-bit on 32-bit platforms and on Windows).

For 64-bit systems, we currently limit to 1 TB.

Change-Id: I117816bf0f5e469b8d34fffd153dc1705a8eedc4
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2018-07-14 04:37:46 +00:00
Friedemann Kleint
019dd88d2c QStringView: Add compare() member function
There was no public API for doing case-insensitive comparisons
of QStringView.

Task-number: QTBUG-69389
Change-Id: I1b021eefec35e135b97fb87704c8dc137232d83d
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-07-13 13:32:34 +00:00
Andre de la Rocha
dffbf4a7f6 Fix use of QTest::mouseMove() in widgets tests
Fixing some issues that could cause intermittent or environment-dependent
failures. One kind regards the use of multiple QTest::mouseMove()
calls in sequence internally using the QCursor API, causing timing
dependent failures. Switching to the override that does not require the
QCursor API, where possible. Other test could fail depending on the size
of the screen.

Change-Id: I4a368955ddbb48f729dcdf74c20eb163329936b2
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2018-07-12 09:51:56 +00:00
Timur Pocheptsov
86632bd377 QSslSocketBackendPrivate - avoid recursion while handing errors
The logic seems to be simple - if client code on error signal
tries to close TLS socket and this socket has buffered data,
it calls 'flush' and 'transmit' or even 'startHandshake' as
a result, which in turn will set and emit error again. To auto-
test this, we initiate a handshake with pre-shared key hint
on a server side and both client/server sockets incorrectly
configured (missing PSK signals). We also do early write
into the client socket to make sure it has some data
buffered by the moment we call 'close'.

Task-number: QTBUG-68089
Task-number: QTBUG-56476
Change-Id: I6ba6435bd572ad85d9209c4c81774a397081b34f
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2018-07-12 09:16:25 +00:00
Nathan Collins
e40f23f098 Add QStyle::SH_SpinBox_StepModifier style hint
This patch allows the developer to pick which keyboard modifier
increases the number of steps a QAbstractSpinBox takes when the user
interacts with it.

The modifier can be either Qt::ControlModifier (default),
Qt::ShiftModifier or Qt::NoModifier. Qt::NoModifier disables the step
modifier. Note that on macOS, Control corresponds to the Command key.

Holding the modifier increases the step rate when:
- scrolling;
- pressing the up/down keys;
- pressing the spin box up/down buttons.

[ChangeLog][QtWidgets][QStyle] QStyle::SH_SpinBox_StepModifier allows
the developer to pick which keyboard modifier increases the number of
steps a QAbstractSpinBox takes for the following interactions:
scrolling, up/down keyboard keys and the spin box buttons. The
Qt::ShiftModifier can now be used, or the feature can be disabled
using Qt::NoModifier. Previously, only Qt::ControlModifier could be
used as the modifier.

Change-Id: Ib5518127e86a8f67798a9a1d6e860c6e35896e6f
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2018-07-12 09:07:32 +00:00
Kai Koehne
9146432dc6 Allow loading of empty translation files
Do not return false for loading an empty .qm file - that is, a valid
file without any translations. We're already shipping empty .qm
files for English translations of Qt since a while, mainly as a
stop for the QTranslator::load(const QLocale &, ...) logic.

Note that QCoreApplication::installTranslator() will still return
false for an empty translation file - which is ok, because it
arguably does not make much sense to install it.

[ChangeLog][QtCore][QTranslator] It is now possible to load qm files
without any translations. This is particularly useful for the
language the untranslated strings are written in; logic to
load translations can now handle the source language like all
other languages.

Task-number: QTBUG-31031
Change-Id: Ibcb84aa755538cb2fa21b14f8635295a58440bbb
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2018-07-12 08:54:33 +00:00
Kai Uwe Broulik
d743df975d Support interactive authorization flag in DBusMessage
This flag was introduced to serve as a replacement for a dedicated "interactive" boolean
argument in method calls guarded by Polkit.

Change-Id: Ida91c9872e70f8ca6672563d0ca6642f38c498ab
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-07-10 19:46:40 +00:00