Commit Graph

7878 Commits

Author SHA1 Message Date
Sami Nurmenniemi
eba652a99f Blacklist tst_QNetworkReply::ioHttpRedirectPolicy
Has been failing a lot lately

Task-number: QTBUG-66247
Change-Id: Id940a573eb299379cacceb836890cbe0b3c896b7
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2018-02-28 06:51:08 +00:00
Ville Voutilainen
00f89d61b9 Widen the blacklists for flaky udp tests
Task-number: QTBUG-66216
Change-Id: I52688bf41ef12b2ec67887b1a5d26f89d4556d5b
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Kari Oikarinen <kari.oikarinen@qt.io>
2018-02-27 11:44:17 +00:00
Samuli Piippo
bcd5532fcb Fix thread_local test
If _Thread_local is used on a block-scope declaration, it must be
combined with either static or extern to decide linkage.

Change-Id: I228b3520767197c6cdf5134ff5a666ab2aca33ea
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-02-23 13:23:01 +00:00
Sami Nurmenniemi
d266ac3a6b Blacklist tst_QNetworkReply::ioHttpRedirectMultipartPost
Task-number: QTBUG-66216
Change-Id: I5eaa2122ebeb8f003c961a156834a0c6360581b0
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2018-02-22 19:08:30 +00:00
Thiago Macieira
bf87e1cfbd tst_QMimeDatabase: detect executables as shared libraries too
They can be, if compiled with -Wl,-pie. Example:

 $ file /usr/bin/ping
 /usr/bin/ping: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 3.2.0

And you can't detect via the interpreter, since libraries can have
them too:

 $ file /lib64/libc-2.26.so libQt5Core.so.5.11.0
 /lib64/libc-2.26.so: ELF 64-bit LSB shared object, x86-64, version 1 (GNU/Linux), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2
 libQt5Core.so.5.11.0: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 3.17.0

Change-Id: I940917d6763842499b18fffd15143bb80ce0e531
Reviewed-by: David Faure <david.faure@kdab.com>
2018-02-21 18:51:34 +00:00
Christian Ehrlicher
9395f35cb1 QHeaderView: Preserve settings on layoutChange with empty model
Do not clear the settings of QHeaderView during layoutChange when the
model is empty and the section count did not change. This will not work
when a section is moved or a section is replaced with a new one during
layoutChange. But since layoutChanged is also called on sorting, this
patch ensures that the settings are not cleared in this case.
This restores the behavior to the same as before 5.9.4.

Task-number: QTBUG-66444
Task-number: QTBUG-65478
Change-Id: I39989cfd45b42e58f49d18ec014d3a941cadb6c9
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
2018-02-21 16:23:25 +00:00
Christian Ehrlicher
c0e45ae851 QHeaderView: properly restore hidden section size on layoutChanged()
During (re)storing the sections within layoutChanged handling, the
hidden section size was not properly stored which lead to a section
size of 0 when the section was unhided afterwards.

Task-number: QTBUG-66413
Task-number: QTBUG-65478
Change-Id: I0b714c7e0530a1eae82b3bb0e0dc80ed576522d0
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
2018-02-21 16:23:15 +00:00
Andy Shaw
8635ad1b59 psql: Add expected failures where the table name is case sensitive
Currently there is a bug in Qt regarding the PostgreSQL driver as it
does not correctly escape the table names when constructing queries
internally. Therefore, these tests are marked as expected failures until
the bug itself is fixed in Qt.

Change-Id: I74dadc187f8a08509128dfea27be99787e57ea51
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2018-02-21 07:07:26 +00:00
Andy Shaw
a245c312b8 psql: Fix SQL tests
This also accounts for some quirks on the PostgreSQL side:
 - Null values for a related table are placed in a different
   order when sorted.
 - Functions (sum, count) return a different type than other databases
 - Using quotes to account for case sensitivity with tables

Task-number: QTBUG-63861
Change-Id: Ib1894fa8d0c77d7045941f7c57be0d0acd8d117e
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2018-02-20 15:20:54 +00:00
Friedemann Kleint
ed3ed0b9db Fix touch point positions of non-transformable QGraphicsItems
TouchEvent::TouchPoint::pos was not updated in
QGraphicsScenePrivate::updateTouchPointsForItem().

To prevent the transformation being calculated repeatedly for each touch
point member, extract a function genericMapFromSceneTransform()
from genericMapFromScene() returning the transformation and use
that whereever multiple points are transformed.

Add a test, extracting helper functionality from
tst_QGraphicsItem::touchEventPropagation().
In addition, fold tst_QGraphicsScene::checkTouchPointsEllipseDiameters() from
c48f4bde00 into this test, so that
it is testing all transformations.

Task-number: QTBUG-66192
Change-Id: If71886d2c14c4e216f7781ea2f22f1adc444e6cf
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2018-02-20 13:54:34 +00:00
Tony Sarajärvi
3190edb077 Merge "Merge remote-tracking branch 'origin/5.10.1' into 5.11" into refs/staging/5.11 2018-02-20 04:18:00 +00:00
Liang Qi
48577b2e7f Merge remote-tracking branch 'origin/5.10.1' into 5.11
Conflicts:
	src/plugins/sqldrivers/psql/qsql_psql.cpp

Change-Id: I070b455078b41e75c46562fcea5676d6218cd00c
2018-02-19 16:02:52 +01:00
Kari Oikarinen
13e51ea487 QLineEdit: Clear input context commit string after test functions
Since the PlatformInputContext is shared between test cases, the set commit
string from inputMethod() was otherwise saved and could pollute other tests.

For example on Windows PlatformInputContext::commit() was called when the
QLineEdit was first clicked onto in tst_QLineEdit::testQuickSelectionWithMouse()
and inserted "text" in the middle of the text, rather than starting selection as
intended.

This led to tst_QLineEdit::testQuickSelectionWithMouse() failing on Windows at
first in CI, but then always passing the repeats when it was tested alone.

Task-number: QTBUG-66499
Task-number: QTBUG-66216
Change-Id: Id6bdd263d57fd6d08fb48f013542b55b132907ea
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
Reviewed-by: Sami Nurmenniemi <sami.nurmenniemi@qt.io>
2018-02-19 14:24:09 +00:00
Alexander Shevchenko
c7c20ce5e2 qmetatype: add '-bigobj' flag to Windows ICC builds
Fix 'Too many segments for object format' errors for (Debug) builds
using Windows ICC.

Change-Id: Ie48f43199948477c426d0a4e557f039eda129b22
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-02-15 22:02:27 +00:00
Alexander Shevchenko
e8531501a7 qsettings: add Advapi32 lib to Windows ICC builds
Fix 'unresolved external symbol __imp_Reg*' errors for builds
using Windows ICC.

Change-Id: I99cb6d53c45cadb31b5675182753f168a7bf4ea3
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-02-15 22:02:24 +00:00
Liang Qi
1ef03f69e8 Merge "Merge remote-tracking branch 'origin/5.10' into 5.11" into refs/staging/5.11 2018-02-15 21:19:50 +00:00
Allan Sandfeld Jensen
5e98873cd3 Fix of flaky qFutureAssignmentLeak test
Switch to QTRY_COMPARE since thread-local references might be held shortly
after finished is signalled.

Change-Id: Ia32f1f45f6cc461352558e0f2acf9612f8a4639e
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-02-15 16:24:38 +00:00
Kari Oikarinen
b59181c42d Blacklist tst_QMdiSubWindow::setOpaqueResizeAndMove on macOS 10.12
Several recent failures.

Task-number: QTBUG-66433
Task-number: QTBUG-66216
Change-Id: I69e535579c886cc725f66d584af7f8821bee70da
Reviewed-by: Sami Nurmenniemi <sami.nurmenniemi@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2018-02-15 13:17:48 +00:00
Liang Qi
bb0fec8057 Merge remote-tracking branch 'origin/5.10' into 5.11
Conflicts:
	src/corelib/corelib.pro
	src/corelib/global/qrandom.cpp
	src/network/access/qhttpnetworkrequest_p.h
	src/plugins/platforms/cocoa/qcocoamenu.mm
	src/plugins/platforms/cocoa/qcocoansmenu.mm
	src/plugins/platforms/cocoa/qcocoawindow.mm
	src/plugins/platforms/cocoa/qnsview.mm
	src/plugins/platforms/offscreen/qoffscreenintegration.h
	src/widgets/kernel/qaction.cpp
	src/widgets/widgets.pro

Done-with: Andy Shaw <andy.shaw@qt.io>
Change-Id: Ib01547cf4184023f19858ccf0ce7fb824fed2a8d
2018-02-15 10:14:11 +01:00
Andy Shaw
d0dffdfc01 Make sure the parent view will have focus when activation is given back
When the focus is lost on an editor due to the application no longer
being the active one then we have to ensure the parent view is going to
get the focus when it is returned. Since the editor does not have focus
when this check is done we need to manually account for this case by
setting it on the parent view as if it would if the editor did have
focus.

Task-number: QTBUG-62253
Change-Id: I14ac347e9e3a2bfaa8715a45811b17c1c7cf15f8
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2018-02-15 07:45:26 +00:00
Liang Qi
7bc1d6effa Merge "Merge remote-tracking branch 'origin/5.9' into 5.11" into refs/staging/5.11 2018-02-14 15:49:08 +00:00
Kari Oikarinen
2aeb2bcef4 Blacklist tst_QGraphicsView::update2 on openSUSE 42.3
Has been failing on it, but not on any other platform.

Task-number: QTBUG-66396
Task-number: QTBUG-66216
Change-Id: I0b208c675a23fb4bc1808dd3aa4dfef9bddf136b
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
2018-02-14 15:48:30 +00:00
Kari Oikarinen
716e4a0414 Blacklist tst_QWidget::moveInResizeEvent on Ubuntu
Previous version of Ubuntu used to be blacklisted and the test is still flaky on
Ubuntu 16.04.

Task-number: QTBUG-66390
Task-number: QTBUG-66216
Change-Id: Iec404879f61164b995f0df7348f4f4baf608ca90
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2018-02-14 15:48:16 +00:00
Liang Qi
305dd1b61f Merge remote-tracking branch 'origin/5.9' into 5.11
Conflicts:
	.qmake.conf
	src/corelib/animation/qvariantanimation.cpp
	src/corelib/global/qglobal.cpp
	src/corelib/global/qlogging.cpp
	src/corelib/io/qprocess_win.cpp
	src/corelib/json/qjsonarray.cpp
	src/corelib/tools/qsimd_p.h
	src/corelib/tools/qtimezoneprivate_p.h
	src/corelib/xml/qxmlstream_p.h
	src/gui/kernel/qsimpledrag.cpp
	src/gui/kernel/qsimpledrag_p.h
	src/plugins/generic/generic.pro
	src/plugins/platforms/cocoa/qcocoamenu.mm
	src/widgets/styles/qmacstyle_mac.mm
	tests/auto/concurrent/qtconcurrentmap/BLACKLIST
	tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp
	tests/auto/corelib/tools/qdatetime/tst_qdatetime.cpp
	tests/auto/gui/kernel/qwindow/BLACKLIST
	tests/auto/widgets/dialogs/qmessagebox/BLACKLIST

Change-Id: I508d686cf20f7f8cc6a7119b9bc7c3bbb505c58e
2018-02-14 12:51:24 +01:00
Kari Oikarinen
a37dd93def Fix crash in tst_QStateMachine::dontProcessSlotsWhenMachineIsNotRunning
The test sometimes ended up with:

  QThread: Destroyed while thread is still running
  Received a fatal error.

This was because as a member variable of the local struct the QThread object was
sometimes destructed before the signal connection quitting it was handled. Fix
that by making sure that the thread is finished before finishing the test.

Also moved connecting to the state machine's signal to be before starting the
machine. Because the counting of QStateMachine::finished signal could hit 1
after the first signal is emitted and the test could pass without the code
working, check that both of the signals have been emitted.

Task-number: QTBUG-66372
Task-number: QTBUG-66216
Change-Id: If14141e39f37541032ddd8c6471daf40a77b0469
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
2018-02-14 08:12:20 +00:00
Ville Voutilainen
dfffb5299b Fix build failure of qftp tests
Without this fix, a fresh clean build of 5.9 will fail.

Change-Id: I69e4da382b07cc6e5e280e99478cbc3d44aa3f27
Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2018-02-14 05:44:04 +00:00
Ville Voutilainen
3024fd60ae Blacklist the positioning test on all linuxes, it fails on opensuse too
Task-Id: QTQAINFRA-1332
Change-Id: I38a36c42f88671430452cdde8098961b67854ae7
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2018-02-13 23:35:23 +00:00
Ville Voutilainen
c7913f3a1f Blacklist a flaky messagebox test
Task-number: QTBUG-66371
Change-Id: I95fff726167d9fad2e2fb47891ce357d7025d254
Reviewed-by: Sami Nurmenniemi <sami.nurmenniemi@qt.io>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2018-02-13 23:35:11 +00:00
Christian Ehrlicher
92fc338de0 qtbase: cleanup BLACKLIST files
Cleanup BLACKLIST files which contain entries for CI-systems
which are no longer active:
 - opensuse-13.1
 - opensuse-42.1
 - osx-10.8
 - osx-10.9
 - osx-10.10
 - rhel-7.1
 - rhel-7.2
 - rhel-7.3
 - ubuntu-14.04
 - windows msvc-2010

Change-Id: I25590b0807a4454f9dc92aa4ea61300f7c9af56b
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
2018-02-13 15:20:33 +00:00
Kari Oikarinen
93a1d7ce27 Blacklist tst_qwidget_window::tst_resize_count
It is flaky on Ubuntu 16.04 and openSUSE 42.3.

Task-number: QTBUG-66345
Task-number: QTBUG-66216
Change-Id: I06fb88ee65113136309a0faa0336dd11672bfe59
Reviewed-by: Sami Nurmenniemi <sami.nurmenniemi@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2018-02-13 15:08:26 +00:00
Christian Ehrlicher
b2b32682a9 qtbase: Remove BLACKLIST files which are no longer active
Remove BLACKLIST files which are no longer valid because the mentioned
CI systems are no longer active:
 - opensuse-13.1
 - opensuse-42.1
 - rhel-7.1
 - rhel-7.2
 - rhel-7.3
 - ubuntu-14.04
or the testcases are no longer available:
 - QTBUG_14292_filesystem in qactiongroup

Change-Id: I80a4397059fafba169096440fdc07d45c76a1ed8
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
2018-02-12 17:40:12 +00:00
Christian Ehrlicher
383d2eaab4 Fix autotest tst_QAction::setStandardKeys()
The possible key sequences for QKeySequence::Copy on X11 is Ctrl+C, then
Ctrl+Insert and at last F16. The order is defined in
QPlatformThemePrivate::keyBindings.

Task-number: QTBUG-46053
Change-Id: I86a0767e268088edfce98cfb07f9fb78f00d0713
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
2018-02-12 17:39:57 +00:00
Ville Voutilainen
a211d5379b Blacklist a flaky scrollbar test on macos
Task-number: QTBUG-66321
Change-Id: Ib632ffad993e178305884170fdfe17809ea1e1e6
Reviewed-by: Sami Nurmenniemi <sami.nurmenniemi@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2018-02-12 17:00:53 +00:00
Kari Oikarinen
38b6ac6544 Skip tst_QFile::largeUncFileSupport
If more than one VM tries to run the test at the same time, it times out. These
sharing violations were attempted to be worked around in 1c3dc8cfb, but the
workaround just leads to timeout, not success.

Task-number: QTQAINFRA-1727
Task-number: QTBUG-66216
Change-Id: If8bfd60dbb6575843680971d45b1c82e5beff534
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Sami Nurmenniemi <sami.nurmenniemi@qt.io>
2018-02-12 10:26:00 +00:00
Tor Arne Vestbø
c94ef51f0c macOS: Blacklist tst_QStyleSheetStyle::task232085_spinBoxLineEditBg
Likely fail is 3d29a0dd74. Is preventing
merge from dev, so blacklisted for now.

Task-number: QTBUG-66324
Change-Id: Ieb522897e93d4a1b4c0e423fadd4138dfb089093
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-02-10 20:39:11 +00:00
Liang Qi
32b506d1db Merge remote-tracking branch 'origin/dev' into 5.11
Conflicts:
	src/corelib/tools/qvarlengtharray.qdoc
	src/corelib/tools/qvector.qdoc

Resolved documentation changes in favor of 017569f702,
which keeps the move overloads along with its const-ref sibling.

Change-Id: I0835b0b3211a418e5e50defc4cf315f0964fab79
2018-02-10 15:55:52 +01:00
Ville Voutilainen
a0da6df87b Blacklist a flaky menubar test
Task-number: QTBUG-66255
Change-Id: Ia7c493496c3fbd551e724853e4f70e3500a1bb74
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2018-02-09 20:37:02 +00:00
Frederik Gladhorn
a72b6fe676 Blacklist tst_QtConcurrentMap::qFutureAssignmentLeak
This test was blacklisted in 5.10 on opensuse, but it fails a lot on
ubuntu as well. While we are discussing a real fix for this, temporarily get this out of
the way.

Task-number: QTBUG-63152
Change-Id: I4f1d3b261013052636ee13eda30f94b647a43a38
Reviewed-by: Sami Nurmenniemi <sami.nurmenniemi@qt.io>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2018-02-09 18:45:28 +00:00
Sami Nurmenniemi
c19d532393 Fix tst_QTcpServer::maxPendingConnections flakiness
Task-number: QTBUG-63152
Change-Id: I5ccd07f31d47048d81e85f69e1327f4f7c760257
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2018-02-09 18:45:25 +00:00
Sami Nurmenniemi
9ac09dcc68 Blacklist flaky cases
Task-number: QTBUG-66216
Change-Id: Iae973c1224c940752e2c3162d8c64539966ff7ac
Reviewed-by: Tony Sarajärvi <tony.sarajarvi@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2018-02-09 18:45:23 +00:00
Sami Nurmenniemi
44402f5075 Skip tst_QDBusAbstractAdaptor peer tests
The peer Tests for QDBusAbstractAdaptor are so flaky that it's
very difficult to get any commits through to qtbase.

Task-number: QTBUG-66216
Change-Id: I8da80f71aa832e683f72129cb2d4785425d39c00
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
Reviewed-by: Sami Nurmenniemi <sami.nurmenniemi@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2018-02-09 18:45:15 +00:00
Andy Shaw
c48f4bde00 Set the ellipseDiameters back to the original size in QGraphicsView
When calling setSceneRect() on a QTouchPoint it will cause the
ellipseDiameters to be changed, whereas this should not be affected by
the scene rectangle as it should be in logical pixels.

Also add a manual test for visually checking the ellipse diameters on
various devices.

Change-Id: I1ee9207cb1a63cfef33fe904594c73aba221af5c
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2018-02-08 21:25:01 +00:00
Friedemann Kleint
b624cdac21 tst_QSharedPointer: Fix termination of external processes on Windows
Timeouts with subsequent failures to delete the temporary
directories have been observed in COIN.

Previously, QProcess:terminate() was used to end the processes,
which does not have any effect on console processes on Windows.
Add a helper function which resorts to kill() on failure
to terminate().

Change-Id: I05539d1703280d34b392f2e8ff8565b9a04d703c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-02-08 19:56:03 +00:00
Andy Shaw
6c6ace9d23 psql: Improve performance of record()
In order to save having to always run a query to get the tablename for
a known oid then we cache the result on the driver side. The oid stays
the same while the table exists, so only on dropping it would it change.
Recreating the table causes it to get a new oid, so there is no risk of
the old one being associated with the wrong table when this happens, if
the driver is still open at that point.

The benchmark added shows the improvement from the previous code, before
the results for PostgreSQL was:

RESULT : tst_QSqlRecord::benchmarkRecord():"0_QPSQL@localhost":
     259 msecs per iteration (total: 259, iterations: 1)

whereas now it is:

RESULT : tst_QSqlRecord::benchmarkRecord():"0_QPSQL@localhost":
     0.000014 msecs per iteration (total: 59, iterations: 4194304)

Task-number: QTBUG-65226
Change-Id: Ic290cff719102743da84e2044cd23e540f20c96c
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
Reviewed-by: Robert Szefner <robertsz27@interia.pl>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2018-02-08 18:24:48 +00:00
Tor Arne Vestbø
efd5d7a837 CoreText: Make sure to keep reference to data when cloning raw font engine
QFontEngine::cloneWithSize() is used by QRawFont internally when switching
a raw-font from one size to another using setPixelSize. For CoreText, we
use a subclass of QCoreTextFontEngine to keep track of the QByteArray data
of a raw-font, but failed to overload cloneWithSize, so we would lose the
data whenever setPixelSize was called, resulting in missing text rendering
in QtWebKit. We now retain the data as we should.

Task-number: QTBUG-65923
Change-Id: I7d4186a3c32a61d48d1e9388e43f2792e8e46081
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2018-02-07 10:41:12 +00:00
Thiago Macieira
64a3bba7b8 QVariant: convert QDateTime and QTime to string with milliseconds
This way, it's lossless.

This commit is a cherry-pick of ab1e507574,
which was reverted.

[ChangeLog][QtCore][QVariant] Conversions of QDateTime to strings now
contain the millisecond components.

Change-Id: I5e421e32396d44e4b39efffd150b744e40fff3a1
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io>
2018-02-05 18:48:59 +00:00
Thiago Macieira
ea6675374f QString: fix comparisons to null strings in ucstricmp
Commit 8f52ad9fe0 ("ucstricmp: compare
null and empty strings equal") made sure empties and nulls would compare
equally, but may have broken the null vs non-empty comparison (which was
not tested). The commit message also said that it expected all callers
to handle null before calling into those functions, but that's not the
case for QStringView created from a null QString: the incoming "a"
pointer was null.

So just remove the checks for null pointers and rely on the size checks
doing the right thing.

[ChangeLog][QtCore][QString] Fixed a regression from 5.9 that caused
comparing default-constructed QStrings to be sorted after non-empty
strings.

Task-number: QTBUG-65939
Change-Id: I56b444f9d6274221a3b7fffd150c83ad46c599b6
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2018-02-04 17:24:59 +00:00
Thiago Macieira
687dc7fac7 QUuid: add a way to get the string form without the braces
While we're at it, add a way to get it without the dashes too. I'm
calling it "id128", as in "128-bit ID", as seen in journald's sd_id128_t
type and the sd_id128_xxx() API.

[ChangeLog][QtCore][QUuid] Added a parameter to both toString() and
toByteArray() to allow controlling the use or not of the braces and
dashes in the string form.

Change-Id: I56b444f9d6274221a3b7fffd150cde706cfc5098
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2018-02-03 21:30:37 +00:00
Friedemann Kleint
bdd2697ce8 tests: cleanup tst_QMenu::click_while_dismissing_submenu()
- Use Qt 5 connection syntax
- Use QTest::mouseMove(QWindow *)

Change-Id: Ia2ea8595355801db3f4569a96dead60a7af51109
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
2018-02-03 18:55:02 +00:00
Elvis Angelaccio
4772ac90fa QLineEdit: implement quick text selection by mouse
This is a standard feature in GtkEntry widgets or HTML
<input type="text"> elements. During a normal text selection by mouse
(LeftButton press + mouse move event), it's now possible to quickly
select all the text from the start of the selection to the end
of the line edit by moving the mouse cursor down.
By moving it up instead, all the text up to the start of the line edit
gets selected. If the layout direction is right-to-left, the semantic of
the mouse movement is inverted.

This feature is only enabled if the y() of the mouse move event is
bigger than a fixed threshold, to avoid unexpected selections in the
normal case. This threshold is set by the QPlatformTheme and a value
smaller than zero disables this feature.

The threshold is updated whenever the style or the screen changes.

[ChangeLog][QtWidgets][QLineEdit] Implemented quick text selection by
mouse in QLineEdit.

Change-Id: I4de33c2d11c033ec295de2b2ea81adf786324f4b
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2018-02-03 16:34:05 +00:00