Commit Graph

1468 Commits

Author SHA1 Message Date
Giuseppe D'Angelo
9121829916 QRegularExpression: rename AnchoredMatchOption to AnchorAtOffsetMatchOption
The name of the option may cause confusion due to the fact
that it's not _fully_ anchoring the match, only anchoring it
at the offset passed to match() -- in other words, it's a
"left" anchoring. Deprecate the old name and introduce
a new one that should explain the situation better.

[ChangeLog][QtCore][QRegularExpression] The AnchoredMatchOption
match option has been deprecated in favor of
AnchorAtOffsetMatchOption, which should better describe
that the match is only anchored at the offset.

Change-Id: Ib751e5e488f2d0309a2da6496378247dfa4648de
Reviewed-by: Samuel Gaist <samuel.gaist@idiap.ch>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
2020-04-03 21:49:57 +02:00
Lars Knoll
2fda4cda22 Remove the regexp example
Change-Id: I113a8f4c8ba401443aab2347211b3782e99c9cf4
Reviewed-by: Samuel Gaist <samuel.gaist@idiap.ch>
2020-03-31 15:28:23 +02:00
Mitch Curtis
3f73995a03 Move undo framework out of Qt Widgets
- Moves QUndo* classes (except QUndoView) from src/widgets/utils to src/gui/utils
- Moves related auto tests from widgets to gui
- Replaces QUndoAction with lambdas that do text prefixing

[ChangeLog][Undo Framework] QUndo* classes (except QUndoView) were moved from Qt
Widgets to Qt GUI.

Done-with: volker.hilsheimer@qt.io
Fixes: QTBUG-40040
Change-Id: I3bd8d4d32c64f8dee548f62159a1df2126da89d8
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2020-03-30 12:36:29 +02:00
Morten Johan Sørvig
c3a4d36082 High-DPI: Remove usages of Qt::AA_UseHighDpiPixmaps
Remove usages of Qt::AA_UseHighDpiPixmaps from examples/.
This flag is now on by default, and can't be disabled.

Task-number: QTBUG-83092
Change-Id: Ie28622f816da2fe28d4ab272d45ea20bd051d5f3
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2020-03-30 08:43:02 +01:00
Volker Hilsheimer
bcaff2b06f Remove QGuiAction again and split QAction implementation up instead
Duplicating the number of classes is a high price to pay to be able to
have some QAction functionality behave differently, or be only available
in widgets applications.

Instead, declare the entire API in QtGui in QAction* classes, and
delegate the implementation of QtWidgets specific functionality to
the private. The creation of the private is then delegated to the
Q(Gui)ApplicationPrivate instance through a virtual factory function.

Change some public APIs that are primarily useful for specialized tools
such as Designer to operate on QObject* rather than QWidget*. APIs that
depend on QtWidgets types have been turned into inline template
functions, so that they are instantiated only at the caller side, where
we can expect the respective types to be fully defined. This way, we
only need to forward declare a few classes in the header, and don't
need to generate any additional code for e.g. language bindings.

Change-Id: Id0b27f9187652ec531a2e8b1b9837e82dc81625c
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2020-03-29 11:18:57 +01:00
Simon Hausmann
bc64ccbf00 Re-generate various CMake projects and configure after merge
Change-Id: I02f5926c6664aab518c5c81e0c33dca0818a1871
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-03-16 20:43:56 +01:00
Simon Hausmann
c2f167b412 Merge "Merge remote-tracking branch 'origin/5.15' into dev" 2020-03-16 20:43:50 +01:00
Simon Hausmann
ff922e7b87 Merge remote-tracking branch 'origin/5.15' into dev
Conflicts:
	src/corelib/kernel/qmetatype.cpp

Change-Id: I88eb0d3e9c9a38abf7241a51e370c655ae74e38a
2020-03-16 18:41:27 +01:00
Tor Arne Vestbø
77885f8402 cmake: Remove APPLE prefix from platform names
None of the other platforms have it.

Change-Id: Ib448c2c03ba03f711b507ef391977c0e6aa7c192
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-03-16 17:57:56 +01:00
Tor Arne Vestbø
db745fdd2d cmake: Fix naming when referring to Apple macOS
Change-Id: Iafb5e448d0d65d42f788464fc600594a5666f9af
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-03-16 17:57:52 +01:00
Friedemann Kleint
a719c630f1 Mandelbrot Example: Use High DPI scaling
Create the pixmap with a device pixel ratio set.

Change-Id: I7f7e90aec4d117304852f050be70e14a0c6bf69d
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2020-03-12 08:24:09 +01:00
Qt Forward Merge Bot
3d315860cd Merge "Merge remote-tracking branch 'origin/5.15' into dev" 2020-03-11 15:39:56 +01:00
Qt Forward Merge Bot
865afac250 Merge remote-tracking branch 'origin/5.15' into dev
Change-Id: Ibee5acec72a1a1769d4bc5f23f56c7dc8d4cf3cb
2020-03-11 15:34:21 +01:00
Vitaly Fanaskov
c977e74afd QtConcurrent::run: accept more then five function's arguments
[ChangeLog][Potentially Source-Incompatible Changes] QtConcurrent::run
has the following signatures: run(Function &&f, Args &&...args) and
run(QThreadPool *pool, Function &&f, Args &&...args). If f is a member
pointer, the first argument of args should be an object for which that
member is defined (or a reference, or a pointer to it). See the
documentation for more details.

Fixes: QTBUG-82383
Change-Id: I18f7fcfb2adbdd9f75b29c346bd3516304e32d31
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
2020-03-11 14:46:25 +01:00
Qt Forward Merge Bot
116d68f105 Merge remote-tracking branch 'origin/5.14' into 5.15
Conflicts:
	src/corelib/plugin/qlibrary.cpp
	src/corelib/plugin/qlibrary_unix.cpp
	src/corelib/plugin/qpluginloader.cpp

Change-Id: I866feaaa2a4936ee5389679724c8471a5b4b583d
2020-03-11 11:27:49 +01:00
Friedemann Kleint
9aa2932701 Polish the Mandelbrot Example
Fix warnings about float constants and comparison.
Use member or constructor initialization.
Introduce some const for clarity.
Use Qt_CONFIG.

Task-number: QTBUG-81254
Change-Id: I71a6ebfba397c0f8e1dd2e61167233c8e5c137af
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2020-03-10 08:15:15 +01:00
Jarek Kobus
50d2acdc93 Add default arguments to QPainterPath methods using transform
Fixes: QTBUG-82602
Change-Id: Id82f145ffb33e6d4ef9b81282ad14657b1c8fbd0
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2020-03-06 21:09:48 +01:00
Paul Wicking
a2446c0eed Doc: Let SQL Drill Down example show correct use of qgraphicsitem_cast
For qgraphicsitem_cast to work correctly with custom items, one must
reimplement the type() function for each custom QGraphicsItem subclass.
Do that in the example code.

Fixes: QTBUG-7357
Change-Id: Ibf221817908355f0347cddfc46747b6955958f5f
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2020-03-06 08:12:52 +01:00
Oliver Wolff
7c7bd44669 examples: Fix build for configurations that do not have printsupport
printsupport features are only available if the module is available for
the configuration. Every printer feature check has to be coupled with a
check for the module itself.

Change-Id: Id2ca84e71d5d74463d0ff35e8b18b252a779a883
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2020-03-05 15:11:36 +01:00
Lars Knoll
2a4b957789 Merge remote-tracking branch 'origin/5.15' into dev
Change-Id: I99ee6f8b4bdc372437ee60d1feab931487fe55c4
2020-03-04 14:39:18 +00:00
Assam Boudjelthia
b711ee2555 Examples: add scrollbar to allow viewing all options on Android
This fix is most relevant for Android for affine and gradients examples.
Currently, if the screen size is small the settings will show cramped
and not usable. Thus, adding a scrollbar to fix that.

Task-number: QTBUG-80717
Change-Id: Ic25460e5ce37a5c53bbcae48e11b6b787c45e999
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
2020-03-03 19:35:46 +02:00
Assam Boudjelthia
e5f4e14059 Examples: enable HighDPI scaling for examples on Android
These examples show very tiny UI elements on Android devices,
thus enabling HighDPI.

Task-number: QTBUG-80717
Change-Id: I813801d5249dc1fcfc6f61a8d146f60dd19901f6
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
2020-03-03 19:35:11 +02:00
Mårten Nordheim
8f8eb99991 QNetworkReply: Deprecate 'error' signal, use 'errorOccurred' instead
[ChangeLog][Deprecation Notice] QNetworkReply::error() (the signal) is deprecated; superseded by errorOccurred()

Change-Id: I4f1ef410fd22d34ddf87e89cc5709cc60703af95
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2020-03-03 18:25:57 +01:00
Qt Forward Merge Bot
63312fe2ec Merge remote-tracking branch 'origin/5.15' into dev
Change-Id: If36d96c0fef3de5ab6503977501c55c62a2ecc97
2020-03-03 14:13:02 +01:00
Assam Boudjelthia
873eba3f8b Examples: use QDialog::showMaximaized() for Android
Examples that use QDialog as main window should be maximized on Android
to avoid a black view on most of the screen.

Task-number: QTBUG-80717
Change-Id: I933c1a01d95d53da009c190c37fa32f27be5af5e
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
2020-03-03 12:39:56 +02:00
Edward Welbourne
c158f881b3 Docs: Use Qt::SplitBehavior in preference to QString::SplitBehavior
The Qt version was added in 5.14 "for use as eventual replacement for
QString::SplitBehavior." Move another step closer to that goal.

Applied suitable wrapping round various char and string literals,
since docs are meant to show best practice.

Change-Id: Ie061905fad26f9b4dda3eedba4612704f0a19126
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2020-02-28 15:37:11 +01:00
Lars Knoll
a450cce6b6 Merge remote-tracking branch 'origin/5.15' into dev
Change-Id: I469b0501cc65fc5ce4d797a69ae89405cc69c7f8
2020-02-28 09:48:30 +01:00
Alexander Akulich
4c86e667d2 Revert "QNetworkReply: deprecate the 'error' getter"
This reverts commit ccb2cb84f5 and
commit 0f568d0a67.

The patches fix ambiguity between a getter and a signal by changing the
getter name, but we still have to rename the signal to follow the signals
naming convention.

Revert the commits to keep the getter as is and change the signal name instead.

Change-Id: Iddbab7c33eea03826ae7c114a01857ed45bde6db
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2020-02-28 07:21:14 +03:00
Alexander Akulich
cb26a4da69 QAbstractSocket: deprecate 'error' signal, use 'errorOccurred' instead
[ChangeLog][Deprecation Notice] QAbstractSocket::error() (the signal) is deprecated; superseded by errorOccurred()

Change-Id: I11e9c774d7c6096d1e9b37c451cf0b99188b6aad
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2020-02-27 13:56:45 +01:00
Assam Boudjelthia
86f7d44089 Examples: request Android storage permissions when using QStandardPaths
http example uses QStandardPaths, on Android permissions might need to
be explicitly requested to write the downloaded file.

Task-number: QTBUG-80717
Change-Id: Icd377254ad77cac661c5ae37e9081e0463493d8b
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2020-02-26 23:07:48 +02:00
Alexander Akulich
6d18e4a2b8 Revert "QAbstractSocket: deprecate 'error' member-function"
This reverts commit 94b3dd77f2.

The patch fixes ambiguity between a getter and a signal by changing the
getter name, but we still have to rename the signal to follow the signals
naming convention.

Revert the commit to keep the getter as is and change the signal name instead.

Change-Id: I0dd60cf1ae9d1bd95beeb8ad58661ca4b1fb63b9
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-02-26 23:07:52 +03:00
Qt Forward Merge Bot
75c0ffaf6d Merge remote-tracking branch 'origin/5.15' into dev
Conflicts:
	examples/network/bearermonitor/CMakeLists.txt
	examples/network/CMakeLists.txt
	src/corelib/tools/qlinkedlist.h
	src/sql/kernel/qsqldriver_p.h
	src/sql/kernel/qsqlresult_p.h
	src/widgets/kernel/qwidget.cpp
	src/widgets/kernel/qwidget_p.h
	tests/auto/network/socket/platformsocketengine/tst_platformsocketengine.cpp
	tests/auto/network/socket/qtcpsocket/tst_qtcpsocket.cpp
	tests/auto/tools/moc/allmocs_baseline_in.json

Change-Id: I21a3c34570ae79ea9d30107fae71759d7eac17d9
2020-02-26 18:39:21 +01:00
Johan Klokkhammer Helsing
e3f2e7afbb Remove legacy OpenGL examples
They all used QGL (which has been removed).

Task-number: QTBUG-74408
Change-Id: Ied003625f14228b4951002a604fce91eaccec102
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2020-02-21 09:01:08 +00:00
Johan Klokkhammer Helsing
4b611d649e Move QOpenGLShaderProgram from QtGui to QtOpenGL
Task-number: QTBUG-74409
Change-Id: I20dfafc0c9bf8e2b68b03e171d70c2cb4ad2bfaf
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2020-02-20 16:11:02 +01:00
Johan Klokkhammer Helsing
012bb039e3 Docs: Remove traces of QGL
The QGL* classes have been removed and the examples ported to QOpenGL, update
the documentation to reflect that.

Task-number: QTBUG-74408
Change-Id: Ibb4787cdeedc05a807d673943b61838f19092234
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2020-02-20 16:11:02 +01:00
Mårten Nordheim
3742c67041 Remove bearer management from remaining network examples
Because bearer management is going away

Change-Id: I60439c1714e0350b0f2bbef6afc8d2015886135f
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2020-02-19 13:28:00 +01:00
Mårten Nordheim
22c585f0f9 Remove the bearermonitor example
Because bearer management is going away

Change-Id: I64311895c347b3e63df75d10db1673bcfe54f52d
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2020-02-19 13:28:00 +01:00
Mårten Nordheim
57a6c60fb9 Remove usage of bearer management from lightmaps example
Because bearer management is going away

Change-Id: I82f2e67a052fdcdf0dde337f9f69b414681511c4
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2020-02-19 13:28:00 +01:00
Vitaly Fanaskov
3703a28511 QComboBox: remove currentIndexChanged(const QString&)
Fixes: QTBUG-81913
Task-number: QTBUG-81845
Change-Id: I8f24b858ce4e35b495440001d7734cc8f169cd5f
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2020-02-19 11:32:40 +00:00
Liang Qi
b9585277e7 Merge remote-tracking branch 'origin/5.14' into 5.15
Conflicts:
	src/corelib/tools/qlinkedlist.h
	src/plugins/platforms/wasm/qwasmintegration.cpp
	src/plugins/platforms/wasm/qwasmscreen.cpp

Change-Id: Iefca7f9f4966bdc20e7052aca736874861055738
2020-02-18 09:26:53 +01:00
Johan Klokkhammer Helsing
00eeed234f Move QOpenGLWidget from QtOpenGL to its own module
Same pattern as QtQuickWidgets. Gets rid of QtOpenGL's dependency on QtWidgets.

Task-number: QTBUG-74409
Change-Id: I4f9b55c23e25a1e0519734037b768a16e870c7d2
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2020-02-18 09:22:51 +01:00
Shawn Rutledge
882f340f62 Deprecate QTabletEvent::device() in favor of deviceType()
The idea is to reserve device() to return a pointer to a QInputDevice
in the future, which is in sync with QQuickPointerEvent::device()
and with QTouchEvent::device().

Change-Id: Ifda6e8aea72d5121955b31bdcbd91bf1bfa4cec4
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2020-02-17 21:39:59 +01:00
Johan Klokkhammer Helsing
f2bbc9c69f Move QOpenGLFrameBufferObject from QtGui to QtOpenGL
Task-number: QTBUG-74409
Change-Id: I817ea6f052fc61a6465d443450c8017ac5d0c0e9
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2020-02-17 08:01:27 +01:00
Alexandru Croitor
d4c8ad79c4 Merge "Merge remote-tracking branch 'origin/wip/cmake' into dev" 2020-02-14 14:55:04 +01:00
Paul Wicking
b26b40f7e1 Doc: remove link to Qt Quarterly in example
Qt Quarterly 31 was the last edition of Qt Quarterly to be
published exclusively as a PDF. We cannot fix the typo in the
PDF. As the content is >10 years old an in an unmaintained
archive section, remove the reference to it from this example.

Fixes: QTBUG-81972
Change-Id: I41a82487ff89dbe8ea5701c02c51e7f7c79bf73d
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2020-02-14 13:59:17 +01:00
Alexandru Croitor
c53ee1f054 Merge remote-tracking branch 'origin/wip/cmake' into dev
Conflicts:
	tests/manual/rhi/hellominimalcrossgfxtriangle/CMakeLists.txt

Hopefully final merge from wip/cmake, and then all cmake changes
should target dev directly.

Change-Id: I29b04c9b0284e97334877c77a32ffdf887dbf95b
2020-02-13 23:29:51 +01:00
Christian Ehrlicher
8471d267f1 QtSql: remove compat SQL plugin names
Remove the compat SQL plugin names (QMYSQL3, QOCI8, QODBC3, QPSQL7)
since they are not needed and just confuse the user

[ChangeLog][QtSql] The compat plugin names QMYSQL3, QOCI8, QODBC3 and
QPSQL7 are no longer available.

Change-Id: I6d88f449ef3e18881a6970fb374ba0ab074ef302
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2020-02-13 22:42:26 +01:00
Liang Qi
6b2535ea15 Merge remote-tracking branch 'origin/5.15' into dev
Conflicts:
	examples/widgets/graphicsview/boxes/scene.h
	src/corelib/Qt5CoreMacros.cmake
	src/corelib/Qt6CoreMacros.cmake
	src/network/ssl/qsslsocket.cpp
	src/network/ssl/qsslsocket.h
	src/platformsupport/fontdatabases/windows/qwindowsfontenginedirectwrite.cpp
	src/testlib/CMakeLists.txt
	src/testlib/.prev_CMakeLists.txt
	tests/auto/corelib/tools/qscopeguard/tst_qscopeguard.cpp

Disabled building manual tests with CMake for now, because qmake
doesn't do it, and it confuses people.

Done-With: Alexandru Croitor <alexandru.croitor@qt.io>
Done-With: Volker Hilsheimer <volker.hilsheimer@qt.io>
Change-Id: I865ae347bd01f4e59f16d007b66d175a52f1f152
2020-02-13 18:31:40 +01:00
Alexandru Croitor
0d177053b9 Regenerate projects one last time before merge
Change-Id: Ia24cf56b79ca6dacd370a7e397024e9b663e0167
Reviewed-by: Liang Qi <liang.qi@qt.io>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2020-02-12 17:30:49 +00:00
Jan Arve Sæther
5e83a2eed2 Deprecate one overload of QInputDialog::getDouble() for 5.15
...and merge the two overloads of getDouble() in Qt6

Change-Id: I55faa2ff222b41e48889a0ef14dd00a6da691c36
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2020-02-12 16:10:24 +01:00