Commit Graph

9695 Commits

Author SHA1 Message Date
Samuel Gaist
cc843c36ea test: add missing QRegularExpression specific QDataStream tests
This patch adds the missing tests for the QRegularExpression class to
the QDataStream tests. Only QRegExp was tested until now.

Task-number: QTBUG-72587
Change-Id: I68ad1500ecbb041bbc6fbdff04b99171530cc0fd
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2019-06-10 19:22:20 +00:00
Samuel Gaist
20c6242c52 test: migrate highdpi manual test to QRegularExpression
This is part of the migration of qtbase from QRexExp to
QRegularExpression.

Task-number: QTBUG-72587
Change-Id: I0bb1d1409cb0c8f38b7582bb5ce6bbc2b047b6fc
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2019-06-10 10:16:52 +02:00
Simone Gaiarin
c826e67765 QAction: add exclusionPolicy property
When set to ExclusiveOptional, the new exclusionPolicy property let the
user uncheck the active checkable action in an exclusive group.

[ChangeLog][QtWidgets][QActionGroup] Added new exclusionPolicy
property. Set it to ExclusiveOptional to allow unchecking the active
checkable action in an exclusive group.

Change-Id: I61a9885cfd076d631cddf8c08313e4b488e5dc38
Fixes: QTBUG-71160
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2019-03-19 13:46:43 +01:00
Anton Kudryavtsev
55240bcdf3 QStringView, QLatin1String: add lastIndexOf methods
While touching the code, factor out internal methods
to avoid needlees latin1->utf16 conversion.

[ChangeLog][QtCore][QLatin1String] Added lastIndexOf().

[ChangeLog][QtCore][QStringView] Added lastIndexOf().

Change-Id: I1c624f00e4ed10111e0d00b86daff7904eeed176
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2019-06-18 14:48:50 +03:00
BogDan Vatra
a5e03f59f4 Say hello to androidtestrunner
androidtestrunner is a tool needed to run qt tests on Android.
Now you can run tests as simple as you run them on Linux, macOS,
Windows.
"$ make check" it's all you need to run tests on the default android
device.

ANDROID_DEVICE_SERIAL env variable can be used to use a specific android
serial.

Use cases:
$ make -j1 check
-j1 is needed to make sure we don't run multiple tests in parallel.

$ ANDROID_DEVICE_SERIAL="emulator-5554" make check
Run the test on "emulator-5554"

$ make TESTARGS="-- -xml" check
Switch to xml output. All params after -- are passed to test
application.

$ make TESTARGS="-- -o out.xml,xml -o out.txt,txt -o -,tap -vs" check
Create two files out.xml and out.txt in the current folder and print
"tap" format to stdout and enable logging of every signal emission.

[ChangeLog][Android] Make it easy to run Qt tests on Android.
"$ make check" is all it's needed to run a test on an Android device.

Change-Id: I1a7f64b62608f7367b5a6aabf5d6c6e7e50242e6
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io>
2019-06-06 15:25:07 +03:00
Morten Johan Sørvig
6faa4d4a87 QFuture: Wait for result on iterator advance
Wait for the result at the target index if the future
is running and the iterator index is past the current
result count.

Determine if there is a result at the target index
after waitForResult() returns, and return -1/end if
not.

Also support decrementing the end iterator. In this
case wait for the future to finish in order to get
the final result count.

Task-number: QTBUG-59811
Change-Id: I8fcc711bab2e72c3c5196a55b794d25e18bb324d
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2019-05-13 10:41:25 +02:00
Liang Qi
b1a216649e Merge remote-tracking branch 'origin/5.13' into dev
Conflicts:
	qmake/generators/makefile.cpp
	qmake/generators/unix/unixmake2.cpp
	src/corelib/thread/qthread_unix.cpp
	tests/auto/corelib/tools/qsharedpointer/tst_qsharedpointer.cpp

Change-Id: I1df0d4ba20685de7f9300bf07458c13376493408
2019-06-14 13:45:18 +02:00
Laszlo Agocs
53599592e0 Introduce the Qt graphics abstraction as private QtGui helpers
Comes with backends for Vulkan, Metal, Direct3D 11.1, and OpenGL (ES).

All APIs are private for now.

Shader conditioning (i.e. generating a QRhiShader in memory or on disk
from some shader source code) is done via the tools and APIs provided
by qt-labs/qtshadertools.

The OpenGL support follows the cross-platform tradition of requiring
ES 2.0 only, while optionally using some (ES) 3.x features. It can
operate in core profile contexts as well.

Task-number: QTBUG-70287
Change-Id: I246f2e36d562e404012c05db2aa72487108aa7cc
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2019-06-13 10:13:45 +02:00
Marc Mutz
d2ed1074d0 tests: remove the last uses of Java-style iterators
... except where they are actually the component under test.

Java-style iterators are scheduled for deprecation.

Change-Id: If4399f7f74c5ffc0f7e65205e422edfa1d908ee8
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2019-06-13 09:40:26 +02:00
Liang Qi
3c662bf13c Merge remote-tracking branch 'origin/5.13.0' into 5.13
Conflicts:
	src/plugins/platforms/wasm/qwasmintegration.cpp
	src/plugins/platforms/wasm/qwasmintegration.h

Change-Id: Idf4c7936513fb1f21daa8f6105b8545f13447bb8
2019-06-11 10:30:48 +02:00
Qt Forward Merge Bot
93f7a24df0 Merge remote-tracking branch 'origin/5.12' into 5.13
Change-Id: Ic7c790602e4ac3f4a0d3d4630441b28cf76f75fc
2019-06-11 01:00:06 +02:00
Timur Pocheptsov
c6763ec149 tst_qnetworkreply - QSKIP/disable tests that deadlock on Windows
We use global object to store errors found by q_X509Callback.
Thus, we also use a lock/mutex. It would appear all tests
involving in-process server and QNAM are prone to intermittent
failures on our Windows VMs - it's always about timeouts due
to the client socket (QNAM) locking and the server socket blocking
main thread while trying to acquire the same lock.

The real fix is to re-write our verification callback so that
it does not need locking/does not block the main and 'http'
threads as a result. But such change is too dangerous for
5.13.0 so we instead have a somewhat handicapped/reduced
test on Windows.

The fixed QSSlSocket will go into 5.13.

Task-number: QTBUG-76157
Change-Id: Ia54701bcb3f6f079a69e52c8904ac3efcee4a787
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2019-06-04 14:36:58 +02:00
Eirik Aavitsland
a4f79313f0 Fix: QTextDocument::find backward search crossing paragraphs
If the start position of a backward string search was the at the start
of a paragraph, the code would start searching at an illegal position
(at the eol character) in the preceding paragraph. That caused
that whole paragraph to be skipped, so any matches there
would not be found. Fix by making sure the search starts at legal
position.

Fixes: QTBUG-48035
Change-Id: Id6c0159b6613ec75ec617a0a57096ceef2b4cbd0
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
2019-06-04 07:14:03 +00:00
Friedemann Kleint
464b5278fa Brush up tst_QCompleter
- Use nullptr
- Fix warning about inconsistent parameter naming in CsvCompleter::pathFromIndex()
- Fix C-style casts
- Use range-based for
- Use correct static invocation
- Set a title on shown windows to make it possible to identify
  slow tests
- Use initializer lists
- Fix the class declarations, use override, member initializations
- Remove goto, streamline code
- Use auto to avoid repeating the type
- Introduce std::unique_ptr

Task-number: QTBUG-38014
Change-Id: Ia8ecd799064d630648b385b606848d7474c51363
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2019-06-07 12:34:47 +02:00
Friedemann Kleint
761f88f8ba Diaglib: Improve formatting of DebugProxyStyle
The class used the default debug operator for QObject, which outputs
the object's address. This makes it hard to compare the log output.

Make the existing QObject formatting helper from the EventFilter
publicly usable by providing a helper with a stream operator.

Change-Id: Ifab83e23cc792a5efe231fd9ae84e0439ab0d609
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2019-06-04 08:02:12 +02:00
Jan Arve Sæther
8c7589d992 Do not strip off the fragment and query in the qfileselector
This is needed for cases where we use e.g. "file:///test.html?query#Fragment".
The fragment and query were already preserved for the qrc scheme. This
fixes it for the file scheme.

Change-Id: I5713e4a25372fdd55ac255b1c6228b4dea419244
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2019-06-03 12:29:49 +00:00
Friedemann Kleint
15d73a9f47 Qt Widgets: Make tests pass on High DPI screens and scaling
Use the comparison helpers to do fuzzy checking of geometries.

Change-Id: I00f4403f3bca2e8a3996e938a85ba799e083058c
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2019-05-29 12:52:51 +02:00
Liang Qi
da23302e4d Merge "Merge remote-tracking branch 'origin/5.12' into 5.13" 2019-06-07 13:19:27 +02:00
Liang Qi
9967a011ea Merge remote-tracking branch 'origin/5.12' into 5.13
Conflicts:
	qmake/generators/makefile.cpp
	src/plugins/platforms/cocoa/qcocoaintegration.h
	src/plugins/platforms/cocoa/qcocoaintegration.mm

Done-With: Jörg Bornemann <joerg.bornemann@qt.io>
Change-Id: I5a61e161784cc6f947abe370aab8f2971a9cbe78
2019-06-07 13:19:27 +02:00
Timur Pocheptsov
91ab70d17f tst_qnetworkreply - QSKIP/disable tests that deadlock on Windows
We use global object to store errors found by q_X509Callback.
Thus, we also use a lock/mutex. It would appear all tests
involving in-process server and QNAM are prone to intermittent
failures on our Windows VMs - it's always about timeouts due
to the client socket (QNAM) locking and the server socket blocking
main thread while trying to acquire the same lock.

The real fix is to get rid of global variable/locking, we'll
have it later (quite a change and requires a lot of accuracy).

Task-number: QTBUG-76247
Change-Id: Iffc90d9e16783f17f62e836e01c35f22681bdd39
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2019-06-07 06:39:16 +02:00
Friedemann Kleint
87ca7c9688 tst_QGraphicsView::cursor2(): Prospective fix for flakyness on Windows
Use QTRY_COMPARE to fix recent fails like

FAIL!  : tst_QGraphicsView::cursor2() Compared values are not the same
   Actual   (view.viewport()->cursor().shape()): IBeamCursor
   Expected (Qt::SizeAllCursor)                : SizeAllCursor

Task-number: QTBUG-76259
Change-Id: Ie9d4bbe45a3be6064ec88ee237360beb92a61481
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2019-06-07 11:07:39 +02:00
Shawn Rutledge
a978c48284 Blacklist tst_QGraphicsView::cursor2 on Windows
It's really failing only on Windows 10 it seems.

Task-number: QTBUG-76259
Change-Id: Ieb541dc994a17e82478a5cc2643e0a89fd5aa97d
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
 
Reviewed-by: Liang Qi <liang.qi@qt.io>
2019-06-07 08:28:12 +02:00
Friedemann Kleint
761b71bd20 Merge remote-tracking branch 'origin/5.12' into 5.13
Change-Id: Iaf6bd52972b562b9c91d9e93a988d26b0eb9d3b4
2019-05-27 09:17:14 +02:00
Allan Sandfeld Jensen
cf7d990a48 Fix reference to a dead temporary
NoDefaultConstructorRef1 was taking a reference of the input, which
meant in the first test it would get a reference to the temporary
created by the 1 literal. A temporary that would be out of scope by
the time we check its value.

Instead add a test with unique_ptr to test we can pass movable
temporaries.

Change-Id: I6b02377dfe30c82b6e71bfb3353a81ad81558ed3
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2019-05-22 11:22:40 +02:00
Liang Qi
7029ecade9 cmake: correct version dependency for qt5_add_big_resources
qt5_add_big_resources is only available if using CMake 3.9 and later.

This amends cdccd0222b.

Task-number: QTBUG-55680
Task-number: QTBUG-75806
Change-Id: Ibba7af6ee7edfb226368937d543b7ec5cc93eb16
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
2019-05-20 12:49:37 +02:00
Friedemann Kleint
67c569add0 Make tst_qwidget pass on High-DPI screens (Windows)
- Move the fuzz check introduced by
  6309062722 to a shared header for
  reuse. Use it in in more places to account for rounding errors
  introduced by odd window frame sizes when scaling is active.

- Use the test widget size to ensure windows do not violate the
  minimum decorated window size on Windows when scaling is inactive
  on large monitors.

Task-number: QTBUG-46615
Change-Id: Icf803a4bc2c275eadb8f98e60b08e39b2ebebedd
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2019-06-03 10:41:08 +02:00
Edward Welbourne
c3571d2922 Correct qfloat16's 1/inf == 0 test
It should have been qfloat16(1)/qfloat16(infinity) in any case.
Sadly, that behaves no better than qfloat16(1.f/qfloat16(infinity)),
which was promoting the infinity back to float.  So retain the check
for over-optimization (but make the comment more accurate).

This is a follow-up to d441f6bba7.

Change-Id: Iec4afe4b04081b0ebfbf98058da606dc3ade07f4
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2019-05-27 11:52:22 +02:00
Giuseppe D'Angelo
b9f96cacc9 QRegExp: remove an out of bounds access into QString
... spotted with the brand-new checks for that in QCharRef.

The rx[i] == ~~~ check is clearly wrong, as rx is the regexp
we're building and `i` was not supposed to index into it.

The intended meaning was wc[i] == ~~~, testing if we were seeing
the closing bracket of a character set. We need to check for
that immediately for dealing with the special syntax of []...] where
the ] belongs to the character set (it can't be the closing one
as character sets cannot be empty).

Fix and add a regression test. Bonus: this code was almost
unchanged since 2009.

Change-Id: I958cd87fc25558e9d202d18b3dd4a35d0db16d8d
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: hjk <hjk@qt.io>
2019-05-27 17:33:30 +00:00
Ryan Chu
cc4c0b43a5 QDataStream: Fix inconsistent results of iostream with QPalette objects
The value of NColorRoles got changed since 5.11. It introduced one more
role called "PlaceholderText" in the ColorRole enumeration.

When using QDataStream (5.12) to read QPalette objects from a file
written by 5.9 (<5.11), the processing results are inconsistent.

Fixes: QTBUG-74885
Change-Id: I14d57f9603a26e5890b4fd57c7e464c5b38eb3f2
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2019-05-20 22:33:33 +02:00
Christian Ehrlicher
aa8d3f90a4 QAbstractSpinBox: fix some ui glitches
Fix some ui glitches for QAbstractSpinBox:
 - update geometry when buttons are toggled on/off
 - calc button size with subControlRect instead hardcoded 20px
 - when buttons are not shown, don't add the button size in
   sizeFromContents for common and macOS style

Fixes: QTBUG-39713
Fixes: QTBUG-75303
Task-number: QTBUG-67126
Change-Id: Ibf330c76deb16358a481bba6bd429fff6a5d57ae
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2019-05-10 19:52:11 +02:00
Allan Sandfeld Jensen
12ebdf0281 Fix new[] delete mismatch in test
QScopedPointer uses normal delete, but we need delete[].

Change-Id: Id62a2c55f75ef4aa60580f5e04c4bf306a6dd3c9
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2019-05-15 11:17:57 +02:00
Volker Hilsheimer
bd55a9d912 Fix canonicalFilePath() for files with trailing slashes
Such files do not exist (as per QFileInfo::exists), but on some
platforms that rely on realpath(), QFileInfo::canonicalFilePath did
not return the empty string.

Use the same logic on macOS as we already did on Android, and include
a test case. Remove the unnecessary dynamic memory allocation and
use a stack-allocated array instead, unless we use modern POSIX in
which case realpath() will alloc the memory for the result for us.

Change-Id: Ide987c68ebf00cbb7b1a66c2e9245a12c7807128
Fixes: QTBUG-44242
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2019-05-21 13:59:34 +02:00
Qt Forward Merge Bot
264e66afb2 Merge remote-tracking branch 'origin/5.12' into 5.13
Change-Id: I1bdc28a3ae825ea35e83f20fe16d2409515e5a3d
2019-05-16 01:00:11 +02:00
Edward Welbourne
d441f6bba7 Skip flaky qfloat16 1/inf == 0 test on QEMU/Arm64
It's not clear why this test fails - and only does so sometimes - but
fail it does, so we ned to skip it to let development keep going.  As
it happens, the same platform over-optimizes various computations
using qfloat16; which can at least be used to test for this platform,
since it wrongly distinguishes two qfloat16 values that theory and all
other platfomrs agree should coincide.

Fixes: QTBUG-75812
Change-Id: Ie9463d7dc21bca679337b475d13417b9f42bbf9b
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2019-05-15 19:06:52 +00:00
Oliver Wolff
3b380c8481 winrt: Return monospace font for QFontDatabase::systemFont(QFontDatabase::FixedFont)
Fixes: QTBUG-75648
Change-Id: I0e5e5e012d3cd5985d1e9a63e776e73ce2d7bf98
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2019-05-15 18:08:01 +00:00
Michal Klocek
1e5deb0641 Add 'well-formated' JSON string values
Add support for surrogate code points U+D800 through U+DFFF,
represent them with JSON escape sequences.

https://github.com/tc39/proposal-well-formed-stringify

Change-Id: I84fea53a8ef400beebefdba10ea82dc510fe7dda
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2019-05-14 10:06:35 +00:00
Qt Forward Merge Bot
f8212b87d9 Merge remote-tracking branch 'origin/5.12' into 5.13
Change-Id: I0c00ffe0eabebc919f22d6faa4bf958b288e8fd9
2019-05-12 01:00:08 +02:00
Ville Voutilainen
2a1651cc16 Make moc grok binary literals with digit separators
Task-number: QTBUG-75656
Change-Id: I6011ef2fb07497cc2a055d6828a1b6356927c281
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2019-05-10 18:34:02 +00:00
Friedemann Kleint
eea6c920c9 Blacklist tst_qwindow::spuriousMouseMove() on Windows
The test is failing in 5.13 for unknown reasons.

Task-number: QTBUG-72296
Task-number: QTBUG-72344
Change-Id: I24c1ad1b6def3096de99caeeebeee6e204cc75ca
Reviewed-by: André de la Rocha <andre.rocha@qt.io>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2019-05-20 16:43:23 +02:00
Christian Ehrlicher
8bcc6f111b QComboBox: add QT_DEPRECATED_X() for deprecated functions
QT_DEPRECATED_X() was not added with
d6d33f0b80 for the deprecated
QComboBox functions - Add them now.

Change-Id: I8d4ea08766ae6ff052dfccac6c3f35ecf34affb7
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2019-05-09 20:29:26 +02:00
Qt Forward Merge Bot
e56d3b03ed Merge remote-tracking branch 'origin/5.12' into 5.13
Conflicts:
	src/corelib/tools/qlocale_data_p.h
        (Regenerated by running the scripts in util/local_database/)
	src/gui/opengl/qopengltextureuploader.cpp

Done-With: Edward Welbourne <edward.welbourne@qt.io>
Done-With: Allan Sandfeld Jensen <allan.jensen@qt.io>
Change-Id: I12df7f066ed0a25eb109f61c4b8d8dea63b683e2
2019-05-09 13:06:11 +00:00
Konstantin Shegunov
c6bee8e4b2 Fix integer overflows in QDeadlineTimer
If the deadline is far in the future, the conversions to nanoseconds
or internal arithmetic may overflow and give an invalid object, thus
the deadline may end up in the past. Added a test to the testlib
selftest for sleep.

[ChangeLog][QtCore][QDeadlineTimer] Fixed integer overflows
leading to immediate timeouts.

Task-number: QTBUG-69750
Change-Id: I9814eccdf9f9b3add9ca66ec3e27e10cd5ad54a8
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2019-05-08 17:19:44 +00:00
Friedemann Kleint
299675e665 tst_QMdiSubWindow::setSystemMenu(): Pass in High DPI/multi-screen setups
The window tends to grow to span screens in multi-screen setups; force it to
be on the primary screen by showing it maximized in that case.

Change-Id: I984ba7a4cd4abd1f862c59c8dca0e2275f44c724
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
2019-05-20 10:51:46 +02:00
Friedemann Kleint
18b336990f Brush up tst_QMdiSubWindow
- Use nullptr
- Use range-based for
- Use correct static invocation
- Set a title on shown windows to make it possible to identify
  slow tests
- Fix the class declarations, use override, member initializations
- Use Qt 5 connection syntax where possible
- Ensure top level widget list is empty after each test, delete left-over
  menu bars and disable menu animations

Change-Id: Ieeb943ea669cd139f1835088b816802e777a9676
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2019-05-20 10:51:46 +02:00
Friedemann Kleint
b88be04519 Make tst_qwidget_window pass on High-DPI screens (Windows)
Use a fuzz check (cf 6309062722) and a minimum
size similar to tst_qwidget to make the test pass on large monitors with or
without active scaling.

Change-Id: I5a9e28e38e1d007057894c349c94f0e6fe12009c
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2019-05-16 12:56:33 +00:00
Friedemann Kleint
e72e5aa83a Brush up tst_QWidget
- Use nullptr
- Fix C-style casts
- Fix redundant bool expressions
- Fix else after return
- Remove unnecessary casts to int from registered enums
- Fix most signedness-related warnings
- Use range-based for
- Use correct static invocation
- Set a title on shown windows to make it possible to identify
  slow tests
- Fix the class declarations, use override, member initializations
- Use Qt 5 connection syntax
- Remove unused variables
- Streamline code in some cases

Change-Id: I1350b382b0b7d0f3198039fdc78892cfa1dd498d
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2019-05-16 06:24:27 +00:00
Friedemann Kleint
909f793de1 Brush up tst_QWindow
- Use nullptr
- Fix C-style casts
- Remove unnecessary casts to int from registered enums
- Fix most signedness-related warnings
- Use range-based for
- Use correct static invocation
- Set a title on shown windows to make it possible to identify
  slow tests
- Fix the class declarations, use override, member initializations
- Streamline code in some cases

Change-Id: I4c9b99126cff02136def0e03accdf1129fe6d72b
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
2019-05-15 19:57:06 +00:00
Friedemann Kleint
ef3b585ddf Brush up tst_QApplication
- Use nullptr
- Fix C-style casts
- Use range-based for
- Use correct static invocation
- Set a title on shown windows to make it possible to identify
  slow tests
- Fix the class declarations, use override, member initializations
- Use Qt 5 connection syntax; use lambdas where applicable
  to remove helper slots
- Streamline code in some cases
- Replace helper function to convert touch points by the one in
  QWindowSystemInterfacePrivate
- Use a logging category for the debug outpt, silencing some output

Change-Id: Ia46c7ad7c08f3afc8e5869ea99b66e406de97781
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
2019-05-15 19:56:50 +00:00
Frederik Gladhorn
490ee4c5e6 Fix compilation of tst_qaccessibilitylinux
Note that the test is still disabled, but this is needed in any case.

Change-Id: Ib7523ba800b94c32690c1bd09b23fc2078c71d4e
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
2019-05-07 10:07:59 +00:00
Frederik Gladhorn
eba3b567d6 Accessibility: Improve handling of read-only state
We have been rather sloppy in how read-only versus editable is handled.
According to the definition, editable signifies that in principle a
widget allows the user to change its text. Read-only means that this
ability is (currently) disabled.

Task-number: QTBUG-75002
Change-Id: I5d71843abcdaac52f4a60a1abcac2604341f6c96
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
2019-05-07 10:05:30 +00:00