Commit Graph

2206 Commits

Author SHA1 Message Date
Liang Qi
ef37ab9970 Merge remote-tracking branch 'origin/5.12' into dev
Conflicts:
	.qmake.conf
	src/gui/painting/qdrawhelper.cpp
	src/gui/text/qdistancefield.cpp
	src/gui/text/qdistancefield_p.h
	src/network/ssl/qsslsocket_openssl.cpp
	src/plugins/platforms/android/qandroidinputcontext.cpp
	src/widgets/styles/qstylesheetstyle.cpp

Done-With: Timur Pocheptsov <timur.pocheptsov@qt.io>
Change-Id: Ia7daad21f077ea889898f17734ec46303e71fe6b
2019-06-25 13:04:27 +02:00
Christian Ehrlicher
a7cbb8c639 QWidget: fix setTabOrder for compound widgets
81e298a51d fixed a case where the focus
chain was screwed up when the order was already correct. This worked
correctly in most cases but not when the next focus widget of the first
one had Qt::NoFocus.
The optimization check if lastFocusChildOfFirst is the same as second is
thrown away since it now does not longer screw up the focus chain and
the save would only be four pointer assignments.

Fixes: QTBUG-75388
Task-number: QTBUG-10907
Task-number: QTBUG-68393
Task-number: QTBUG-69619
Change-Id: I581ed532156c34ea970123afd063194aab016304
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2019-06-10 13:44:42 +02:00
Frederik Gladhorn
73a19a3a10 Stabilize tst_qsplitter
This is the worst fix ever, adding one more qWait. The test has been
updated in the 5.13 branch, so there a different fix will be needed. For
now this is in line with the rest of the code.
This test is currently one of the worst offenders when it comes to flaky
tests.

Task-number: QTBUG-64639
Change-Id: Ia1e71cc948997408b9658839013c9ad098111033
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2019-06-19 18:32:19 +02:00
Shawn Rutledge
b149f5d77a Overload QTextBrowser::setSource() to add optional type argument
Now that it's trying to guess whether the type is markdown based on
the file extension, there needs to be a way to override it. For example
it might be arranged that directory listings will be generated in
markdown format instead of HTML; then when loading a source URL that
is a directory, the application may override the type. The type for
the single-argument setSource(url) is UnknownResource to preserve
the existing behavior, but the user can override the guessing by
setting a specific type.

Change-Id: Id111efd24de7d8fd18c47b16a2d58f5b09d77891
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
2019-06-20 20:29:15 +02:00
Eskil Abrahamsen Blomfeldt
6492541df3 Support copy-pasting foreground images within same document
When using a texture for foreground color in text and copy-pasting
the text inside the same QTextEdit, the formatting would disappear.

Fixing this in a general way would require implementing some
other carrier format in the mime data than HTML, such as e.g ODF,
but it can quite easily be fixed for the case where the data
is pasted in the same document, or even different documents
as long as they have a reference to the image in the formats.

[ChangeLog][QtWidgets][QTextEdit] Added support for copy-pasting
foreground brushes with textures within same document.

Task-number: QTBUG-75931
Change-Id: I8b39dce289c64eea39e25cb8eb207e2534bcd2eb
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2019-06-21 11:48:10 +02:00
Edward Welbourne
84e89c1e9e Convert uses of QTime as a timer to QElapsedTimer
Change-Id: I2297f61efa5adf9ea5194c7f3ff68574cbcf452c
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2019-06-14 10:42:33 +02:00
Samuel Gaist
6ff2e0e718 test: migrate QFontComboBox test to QRegularExpression
This is part of the migration of qtbase from QRexExp to
QRegularExpression.

Task-number: QTBUG-72587
Change-Id: I2e1b42c09db88da64ec62aee7906f4c368e5bcbb
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2019-06-10 09:35:45 +02: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
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
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
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
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
Alexander Volkov
ef3daddae1 Use QPlatformTheme::TouchDoubleTapDistance for touch events
... and update the cached values on theme change.

Modify tst_QWidget::touchEventSynthesizedMouseEvent()
to avoid unexpected double click detection.

Change-Id: I151c47e851ebba7550b1b09caca2781c28d7d3d9
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2019-05-01 20:29:16 +00:00
Tony Sarajärvi
3308a81942 Extend blacklisting of setWindowState to cover RHELs
Task-number: QTBUG-68864
Change-Id: I7503877fbbe6109806d9fd087514588d2ac640c7
Reviewed-by: Heikki Halmet <heikki.halmet@qt.io>
2019-04-29 17:11:08 +00:00
Frederik Gladhorn
21dcb96ddc QStyleSheetStyle::repolish: only run on direct children
When re-parenting, some widgets change their children. For example
QLabel, when set to rich text, will not update, until receiving a polish
call, at which time getting a list of all children recursively and then
trying to call functions on them will crash, since the children change
in the middle of this operation.

Fixes: QTBUG-69204
Fixes: QTBUG-74667
Change-Id: I95dd83ebeed14c017e22552ddd47658ae8a09353
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2019-04-12 14:33:32 +00:00
Qt Forward Merge Bot
01a269593d Merge remote-tracking branch 'origin/5.12.3' into 5.12
Change-Id: Id60d508c0f25fd5e67be07daafd2d4c56ae73934
2019-04-08 09:53:39 +02:00
Friedemann Kleint
06d753e87b Brush up and stabilize tst_QSizeGrip
- Remove unused dummyWidget and thus empty slots initTestCase(),
  cleanupTestCase().
- Add slot cleanup() checking for an empty top level widgets list
  and introduce QScopedPointer to ensure it passes.
- Use QTRY_VERIFY in hideAndShowOnWindowStateChange().

Flakyness has been observed on openSUSE:

 FAIL!  : tst_QSizeGrip::hideAndShowOnWindowStateChange(Qt::Window) '!sizeGrip->isVisible()' returned FALSE. ()
           Loc: [tst_qsizegrip.cpp(126)]

Change-Id: I340fc1892dc00bcff1985e5a8a1e535975736484
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
2019-04-03 15:06:06 +00:00
Kari Oikarinen
18e4cf2900 Merge 5.12 into 5.12.3
Change-Id: I76905e3540585c3be221b89453c725828b05940b
2019-04-01 09:16:33 +03:00
Kai Koehne
54efa7e592 Blacklist qgraphicsitem::sorting test on opensuse-42.3
Task-number: QTBUG-74760
Change-Id: I79bd58e6be61c59e0f1fa48dba0dee72e0a7e78c
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2019-03-29 07:36:48 +00:00
Gatis Paeglis
243c840390 Drag'n'Drop: fix dnd regression
DragEnter events always should start with the default state, which
is accepted = false. This was a copy-and-paste error introduced by
f8944a7f07.

Fixes: QTBUG-73977
Change-Id: I34b3ea97c9b4f4fc040a9e6f1befd6124533361d
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2019-03-26 13:49:53 +00:00
Friedemann Kleint
0211774c68 Silence QMainWindow test
Set object names on the widgets in restoreState(), fixing:
QWARN  : tst_QMainWindow::restoreState() QMainWindow::saveState(): 'objectName' not set for QDockWidget 0x7ffcb45e5e00 ';
QWARN  : tst_QMainWindow::restoreState() QMainWindow::saveState(): 'objectName' not set for QToolBar 0x7ffcb45e5dd0 ''
QWARN  : tst_QMainWindow::restoreState() QMainWindow::saveState(): 'objectName' not set for QDockWidget 0x7ffcb45e5e00 ';
QWARN  : tst_QMainWindow::restoreState() QMainWindow::saveState(): 'objectName' not set for QToolBar 0x7ffcb45e5dd0 ''

Task-number: QTBUG-74242
Change-Id: I19f19e93de9df00d001b820a31836ce0b3cd2877
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2019-03-22 07:27:11 +00: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
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
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
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
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
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
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
Liang Qi
166889ddcb Merge remote-tracking branch 'origin/5.12' into 5.13
Conflicts:
	src/corelib/kernel/qobject.cpp

Change-Id: I8ca1163a1fa8072dcd16ea4426c58219149599fd
2019-05-02 09:39:31 +02:00
Tony Sarajärvi
902ae438aa Extend blacklisting of dirsBeforeFiles as it's flaky
Task-number: QTBUG-75452
Change-Id: I4b35dfff6c0a888e62441e51985e0bccb2081be1
Reviewed-by: Heikki Halmet <heikki.halmet@qt.io>
2019-04-26 16:41:51 +00:00
David Faure
ed66c932b1 QListWidgetItem constructors: don't emit dataChanged(invalid, invalid)
This is a regression introduced by 63967313f5 which blocked signals
on the view, but not on the model.

Change-Id: Ib2f93fe6ef842264aaba200c98ee4a19065ca220
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Reviewed-by: Konstantin Shegunov <kshegunov@gmail.com>
Reviewed-by: Laurent Montel <laurent.montel@kdab.com>
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
2019-04-23 16:17:20 +00:00
Shawn Rutledge
7718b70898 Blacklist tst_QWidget::windowState on WinRT
Task-number: QTBUG-75270
Change-Id: Icf1089b4d3681bc6a42be9c095acb5315dd67781
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
2019-04-23 11:32:28 +00:00
David Faure
ba6e0e4aac QHeaderView: fix assert when restoring section sizes over less columns
If columns are removed and we get notified via layoutChanged, the code
tries to restore old section sizes, and went out of bounds, leading to
an assert in QVector. Simply add an if() to skip restoring out-of-bounds columns.

This comes from https://bugs.kde.org/show_bug.cgi?id=395181,
which translates into the unittest that is part of this commit.

Change-Id: Ide42176a758f87b21957c40508127d67f1d5a2d9
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
2019-04-23 09:42:54 +00:00
Liang Qi
9d67bf6e96 Merge remote-tracking branch 'origin/5.12' into 5.13
Conflicts:
	src/corelib/tools/qlocale.qdoc
	tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp

Done-with: Edward Welbourne <edward.welbourne@qt.io>
Done-with: Volker Hilsheimer <volker.hilsheimer@qt.io>
Change-Id: I88e0757b2d020f0a244714c87844631df4b3fd13
2019-04-16 09:34:50 +02:00
Qt Forward Merge Bot
93acb76222 Merge remote-tracking branch 'origin/5.12' into 5.13
Change-Id: I05d14a40e17554691bad369d0363e88413afd9b3
2019-04-09 01:00:06 +02:00
Qt Forward Merge Bot
f80b7995f3 Merge remote-tracking branch 'origin/5.12' into 5.13
Change-Id: Ia7328524f2cd9d5995ac8705f0fe0bf570b2e831
2019-04-04 01:00:07 +02:00
Qt Forward Merge Bot
0a7302abbc Merge remote-tracking branch 'origin/5.12' into 5.13
Change-Id: I9935bacae0d6ba532418fc3d28adbc7ca1463604
2019-03-30 01:00:07 +01:00
Tony Sarajärvi
8d154810f5 Extend blacklistnig of tst_qwidgets to cover RHEL 7.6
Task-number: QTBUG-46116
Change-Id: I7d74dca7030a9c21b3654e3b5cde94015497208e
Reviewed-by: Heikki Halmet <heikki.halmet@qt.io>
2019-03-29 19:26:25 +00:00
Christian Ehrlicher
998740c619 QDoubleSpinBox: reset size hint when prefix is set
QDoubleSpinBox did not resize when setPrefix() was called because the
cached size hint was not reset.
Fix it by resetting the cached size hints and update the geometry the
same way it's done for QSpinBox::setPrefix().

Fixes: QTBUG-74520
Change-Id: I6f42a24ab0a4ce987ecbe1505a634d929474436b
Reviewed-by: André Hartmann <aha_1980@gmx.de>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2019-03-26 13:35:37 +00:00
Friedemann Kleint
8f1acd29e4 Merge remote-tracking branch 'origin/5.12' into 5.13
Change-Id: I71cc71881fb638e207d83a8733bad8f267701c0f
2019-03-26 08:27:02 +01:00
Qt Forward Merge Bot
6893919b0c Merge remote-tracking branch 'origin/5.12' into 5.13
Conflicts:
	src/gui/kernel/qplatformintegration.cpp
	src/gui/kernel/qplatformintegration.h
	src/plugins/platforms/wasm/qwasmintegration.cpp
	src/plugins/platforms/xcb/qxcbconnection_screens.cpp

Change-Id: I15063d42e9a1e226d9d2d2d372f75141b84c5c1b
2019-03-20 14:09:30 +01:00
Jesus Fernandez
adaa3acc74 Use Q_UNUSED(updateRect) when building without QT_BUILD_INTERNAL
Change-Id: I3e5292bc09ae53bee5f8bb8c7c1922d1a20b2e10
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2019-03-18 10:38:50 +00:00
Qt Forward Merge Bot
043f99954f Merge remote-tracking branch 'origin/5.12' into 5.13
Change-Id: Icc9b061c56e969756f0351c936cdeb8063c86079
2019-02-28 01:00:15 +01:00