Commit Graph

1343 Commits

Author SHA1 Message Date
Qt Forward Merge Bot
0dc5562fa4 Merge remote-tracking branch 'origin/5.15' into dev
Change-Id: I784e23d7913294225686879c9bd77dafe3580bac
2020-01-10 01:01:15 +01:00
Sona Kurazyan
89c4bb5f24 Deprecate QJsonDocument methods for converting to/from JSON binary
Also remove the example code for deprecated methods and use CBOR instead
where it makes sense.

Task-number: QTBUG-81068
Change-Id: Iffb7a4b3d7b16a1e485fc05b3ab2e2468e9e0718
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2020-01-09 13:52:25 +01:00
Friedemann Kleint
7b0f341872 Add a widget gallery example
Since 072ca960f5 changed the default
of the styles example back to Norwegian Wood, it is no longer
suited as gallery example.

Extract the dialog from it and re-add it as a gallery example Add a
tooltip displaying the class name and a help shortcut opening the
documentation.

Restructure the group boxes to add more widgets.

Remove the gallery meta-tag from the styles example.

Task-number: PYSIDE-1112
Change-Id: Ie6f13084012771bd8f5bf9cad23b58d0720fdd92
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
2020-01-09 13:52:25 +01:00
Friedemann Kleint
75391511ff Merge remote-tracking branch 'origin/5.15' into dev
Change-Id: Ia2ce994c42adc010c453edaeea57f672556958f6
2020-01-07 08:34:53 +01:00
Qt Forward Merge Bot
68c30e372b Merge "Merge remote-tracking branch 'origin/5.14' into 5.15" 2020-01-06 20:13:31 +00:00
Sona Kurazyan
82d02b7b95 Deprecate SAX classes in Qt XML
Deprecated the SAX classes and disabled or replaced their uses in
tests if applicable.

Removed the saxbookmarks example, no point in keeping examples for
the deprecated code.

[ChangeLog][QtXml] SAX classes are now deprecated. Use QXmlStreamReader,
QXmlStreamWriter in QtCore instead.

Task-number: QTBUG-76177
Change-Id: Ic171d62fa0527b0f36f94cf09a69586092269957
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
2020-01-06 18:13:01 +01:00
Qt Forward Merge Bot
3a010f72b8 Merge remote-tracking branch 'origin/5.14' into 5.15
Conflicts:
	src/corelib/kernel/qvariant.h

Change-Id: I8f3873e74b9795ac889e7c7ec5de2619bca92160
2020-01-06 07:20:18 +00:00
Liang Qi
a503bf5470 Merge remote-tracking branch 'origin/5.15' into dev
Conflicts:
	src/corelib/tools/qvector.h
		Make QVector(DataPointer dd) public to be able to properly merge
		5b4b437b30 from 5.15 into dev.
	src/widgets/kernel/qapplication.cpp
	tests/auto/tools/moc/allmocs_baseline_in.json

Done-With: Christian Ehrlicher <ch.ehrlicher@gmx.de>
Change-Id: I929ba7c036d570382d0454c2c75f6f0d96ddbc01
2020-01-04 15:32:34 +01:00
Friedemann Kleint
71477104eb Fix some qdoc warnings
src/corelib/serialization/qjsonvalue.cpp:174: (qdoc) warning: No such parameter 'n' in QJsonValue::QJsonValue()
...
examples/widgets/doc/src/icons.qdoc:584: (qdoc) warning: Command '\snippet (//! [24])' failed at end of file 'widgets/icons/mainwindow.cpp'
src/corelib/text/qbytearray.cpp:5177: (qdoc) warning: clang found diagnostics parsing \fn QByteArray::FromBase64Result::operator QByteArray() const
    error: out-of-line definition of 'operator QByteArray' does not match any declaration in 'QByteArray::FromBase64Result'
src/corelib/serialization/qjsonarray.cpp:178: (qdoc) warning: Overrides a previous doc
src/corelib/serialization/qjsonarray.cpp:140: (qdoc) warning: (The previous doc is here)
src/corelib/serialization/qjsonobject.cpp:1016: (qdoc) warning: clang found diagnostics parsing \fn QJsonValueRef QJsonObject::iterator::operator[](int j) const
    error: out-of-line definition of 'operator[]' does not match any declaration in 'QJsonObject::iterator'
src/corelib/serialization/qjsonobject.cpp:1267: (qdoc) warning: clang found diagnostics parsing \fn QJsonValue QJsonObject::const_iterator::operator[](int j) const
    error: out-of-line definition of 'operator[]' does not match any declaration in 'QJsonObject::const_iterator'
src/corelib/tools/qhash.cpp:2641: (qdoc) warning: Overrides a previous doc
src/corelib/tools/qhash.cpp:1492: (qdoc) warning: (The previous doc is here)
src/corelib/tools/qhash.cpp:2659: (qdoc) warning: Can't link to 'unit()'
src/corelib/text/qchar.cpp:274: (qdoc) warning: Undocumented enum item 'Script_Sundanese' in QChar::Script
src/corelib/text/qchar.cpp:274: (qdoc) warning: No such enum item 'Script_Sundaneseo' in QChar::Script
src/network/ssl/qsslsocket.cpp:1514: (qdoc) warning: Can't link to 'QSslConfiguration::addDefaultCaCertificate()'
src/widgets/widgets/qtabwidget.cpp:581: (qdoc) warning: Undocumented parameter 'visible' in QTabWidget::setTabVisible()

Change-Id: I05c2a4884873850b684fa94036cd90db1a6e7726
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2020-01-03 14:59:26 +01:00
Tor Arne Vestbø
05e5306787 styles example: Implement standarPalette()
Instead of polishing the (possible) system palette. Makes the checkbox
for "Use style's standard palette" actually work for the custom style,
and is how styles are supposed to provide their own preferred palette.

Change-Id: I3228ef45c023d0d058e48ff0fc14f094367b2008
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2020-01-02 14:14:38 +01:00
Liang Qi
ee71a9ba81 Merge remote-tracking branch 'origin/5.14' into 5.15
Conflicts:
	src/network/ssl/qsslsocket.cpp
	src/widgets/kernel/qapplication.cpp

Change-Id: Ib7421cc2df59d0969f89b3fbd65a17ea76ffef3b
2019-12-16 07:05:19 +01:00
Olivier Goffart
d6266c757d Replace usages of QVariant::value by qvariant_cast
This is done automatically with a clazy check

Change-Id: I3b59511d3d36d416c8eda74858ead611d327b116
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2019-12-15 12:30:52 +01:00
Tor Arne Vestbø
072ca960f5 styles example: Set default style up front, and react to style changes
Allows running the example with -style foo or QT_STYLE_OVERRIDE.

No changes to documentation needed.

Change-Id: Id7cef450f13faabd118badde51afb7273439c9fc
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2019-12-12 23:24:29 +01:00
Johan Klokkhammer Helsing
d107706ab9 Move QOpenGLWidget from QtWidgets to QtOpenGL
Task-number: QTBUG-74409
Change-Id: I98a4f8a9e1d439bfdc24eb2910385273cedecd29
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2019-12-12 16:06:31 +01:00
Qt Forward Merge Bot
5b193e3dd4 Merge "Merge remote-tracking branch 'origin/5.15' into dev" 2019-12-11 14:52:25 +01:00
Johan Klokkhammer Helsing
f08038fca7 Remove deprecated QGL* classes
Removes QGL paths in sub-attaq and chip examples.

The boxes example depended on QGL and has been removed.

The corresponding module and test directories for the opengl module are now
empty, but has been left there so we can move the QOpenGL* classes there.

[ChangeLog][QtOpenGL] The deprecated QGL* classes have been removed.

Fixes: QTBUG-74408
Change-Id: I52f56409af8f6901359462a7ba162103d051fe3d
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2019-12-11 11:53:15 +01:00
Liang Qi
90210d5d9c Merge remote-tracking branch 'origin/5.14' into 5.15
Conflicts:
	tests/auto/network/kernel/qnetworkinterface/BLACKLIST

Change-Id: I1e8866c63b54bcd95fc2a044276ee15b7f60e79a
2019-12-10 13:51:40 +02:00
Eirik Aavitsland
191ac31598 Modernize shapedclock example
Relying on the hard clipping of QRegion widget masks to create
non-rectangular windows is a solution from a bygone era. The result
looks horrible with today's eyes, particularly on a high-dpi
screen. Update the example to create smooth anti-aliased edges using
translucent window bacground.

Task-number: QTBUG-64229
Change-Id: I8859d61177d2a2dc446632c23f27f42050e0d7c7
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2019-12-10 00:38:40 +01:00
Ulf Hermann
e62d04b933 Merge remote-tracking branch 'origin/5.14' into 5.15
Conflicts:
	src/corelib/serialization/qcborvalue.cpp

Change-Id: I675a3029955c96e81a33ed9d98b72b55b6784b52
2019-12-03 06:57:05 +01:00
Friedemann Kleint
9a82a29000 Styles example: Use system style per Default
The example is useful as a gallery for widgets in
which case the custom Norwegian Wood style is not primarily interesting.

Change-Id: I96e304f97edeb43da6e8f572e01a768b1317722c
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2019-11-25 19:31:56 +01:00
Friedemann Kleint
4ac8505778 Show the styles example under 'gallery' on Qt Creator's example screen
Add meta tag 'gallery'.

Change-Id: I8d670d6eb7641bdc82944a85b7335eee26bcc573
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2019-11-23 11:32:14 +01:00
Allan Sandfeld Jensen
af2daafde7 Deprecate constructing QFlags from a pointer
This was used to support QFlags f = 0 initialization, but with 0 used
as a pointer literal now considered bad form, it had been changed many
places to QFlags f = nullptr, which is meaningless and confusing.

Change-Id: I4bc592151c255dc5cab1a232615caecc520f02e8
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2019-11-20 19:43:38 +01:00
Friedemann Kleint
d17094df60 Sub-Attaq: Fix compilation with -no-opengl
Add missing include removed by 13426aff24.

Fixes: QTBUG-80163
Change-Id: I6b81f399a3abf637a2023700baac09b631d652d5
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
2019-11-18 15:45:41 +01:00
Qt Forward Merge Bot
adc7bbe910 Merge remote-tracking branch 'origin/5.14' into 5.15
Conflicts:
	src/gui/rhi/qshader.cpp
	tests/auto/corelib/time/qtimezone/tst_qtimezone.cpp

Change-Id: I1c4ae718eb3592a0a0a90af9d11553f3ab68cad5
2019-11-15 16:29:40 +01:00
Liang Qi
d140f2f614 Merge remote-tracking branch 'origin/5.13' into 5.14
Conflicts:
	examples/widgets/widgets/scribble/mainwindow.cpp
		This amends cb54c16584.

Change-Id: Iaae60a893330524b2973917e23b31f9d51f8bd38
2019-11-13 07:21:33 +01:00
Qt Forward Merge Bot
78c687f98e Merge remote-tracking branch 'origin/5.14' into 5.15
Change-Id: I963b5f48b5d6f3500ca379fbd7f1a4290b570175
2019-11-08 09:11:02 +01:00
Volker Hilsheimer
33f1eb50e2 Fix build of the sub-attaq example
QMenuBar is only forward declared in QMainWindow. I don't think this is
a recent change or breakage, just noticed then when running a complete
build of the 5.15 branch.

Change-Id: Ia1a072044bd26c5f3f51ec5f5b0f72f065a0576f
Reviewed-by: Johanna Äijälä <johanna.aijala@qt.io>
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2019-11-07 13:35:21 +02:00
Qt Forward Merge Bot
e3cc16e9fb Merge remote-tracking branch 'origin/5.13' into 5.14
Conflicts:
	.qmake.conf
	mkspecs/features/mac/default_post.prf
	src/corelib/tools/qsimd_p.h
	src/platformsupport/fontdatabases/mac/qcoretextfontdatabase.mm
	util/qfloat16-tables/gen_qfloat16_tables.cpp

Change-Id: If48fa8a3bc3c983706b609a6d3822cb67c1352a4
2019-11-06 11:41:19 +01:00
Christian Ehrlicher
e85de7d787 Cleanup network examples
Cleanup network examples:
 - use nullptr
 - use member-init
 - adjust includes
 - use new-style connects

Change-Id: I80aa230168e5aec88a1bc93bbf49a471bfc30e7b
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2019-11-06 10:57:23 +01:00
Qt Forward Merge Bot
92e888f27e Merge remote-tracking branch 'origin/5.14' into 5.15
Change-Id: Icd98de8592828c60cfea3d69f9c7ae2711b9f059
2019-11-05 01:00:54 +01:00
Christian Ehrlicher
c31cdb1b3f Widget examples: replace QItemDelegate with QStyledItemDelegate
The documentation was forgotten in
5d4b5dab7f

Change-Id: I4e0f8f507199601910a174a080936b9a619048a4
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2019-11-02 13:29:17 +01:00
Kavindra Palaraja
312ff6f83b Docs: Fix a typo in the documentation
Change-Id: Ice4d0842883e32f62abd27be826b1caf1c78d3b6
Fixes: QTBUG-55503
Reviewed-by: Frederik Schwarzer <schwarzer@kde.org>
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2019-11-01 08:00:57 +01:00
Qt Forward Merge Bot
7a13a09116 Merge remote-tracking branch 'origin/5.14' into 5.15
Change-Id: Ic13ef00d76c81295076bb2432576db70ec84fe29
2019-11-01 01:00:45 +01:00
Albert Astals Cid
f121f319b9 examples: Fix -Wdeprecated-copy warnings
examples/corelib/tools/customtypesending/window.cpp: In member function ‘void Window::sendMessage()’:
examples/corelib/tools/customtypesending/window.cpp:79:71: warning: implicitly-declared ‘Message& Message::operator=(const Message&)’ is deprecated [-Wdeprecated-copy]
   79 |     thisMessage = Message(editor->toPlainText(), thisMessage.headers());
      |                                                                       ^
In file included from examples/corelib/tools/customtypesending/window.h:55,
                 from examples/corelib/tools/customtypesending/window.cpp:52:
examples/corelib/tools/customtypesending/message.h:62:5: note: because ‘Message’ has user-provided ‘Message::Message(const Message&)’
   62 |     Message(const Message &other);
      |     ^~~~~~~
examples/corelib/tools/customtypesending/window.cpp: In member function ‘void Window::setMessage(const Message&)’:
examples/corelib/tools/customtypesending/window.cpp:87:19: warning: implicitly-declared ‘Message& Message::operator=(const Message&)’ is deprecated [-Wdeprecated-copy]
   87 |     thisMessage = message;
      |                   ^~~~~~~
In file included from examples/corelib/tools/customtypesending/window.h:55,
                 from examples/corelib/tools/customtypesending/window.cpp:52:
examples/corelib/tools/customtypesending/message.h:62:5: note: because ‘Message’ has user-provided ‘Message::Message(const Message&)’
   62 |     Message(const Message &other);
      |     ^~~~~~~

Change-Id: I563d53f7dd1e0e0dc5fd4db06299b2d0a70c62ff
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2019-10-30 07:46:35 +02:00
Paolo Angelelli
ba2ee2875a Fix computegles31 example crashing on Pi4
Due to work group size configured for desktop GL.

Change-Id: Id62cf297e280e04aecba748cf41b62c64ed9a0b2
Done-with: Andrey Yaromenok <ayaromenok@gmail.com>
Fixes: QTBUG-79374
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2019-10-29 10:48:35 +00:00
Christian Ehrlicher
5d4b5dab7f Widget examples: replace QItemDelegate with QStyledItemDelegate
Replace QItemDelegate with QStyledItemDelegate in the examples since
QItemDelegate is deprecated.
Also fix up some unused documentation snippet references.

Change-Id: I42b8780ad0c317b9a253cc722d0b471695ed253f
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2019-10-28 19:36:32 +02:00
Qt Forward Merge Bot
dce8849037 Merge remote-tracking branch 'origin/5.14' into 5.15
Change-Id: I4fbbf100b673ab100997dbf2f42bf195dc3c050f
2019-10-18 01:00:35 +02:00
Christian Ehrlicher
d5c4cd7a25 Examples: fix compiling tablet example on qnx
std::abs(int) is defined in cstdlib which is not included on QNX.

Fixes: QTBUG-78763
Change-Id: I14d087069369db7ab4e5db9d4f816a3fbffe95f6
Reviewed-by: Johanna Äijälä <johanna.aijala@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2019-10-16 09:18:04 +02:00
Qt Forward Merge Bot
faab18c65a Merge remote-tracking branch 'origin/5.14' into 5.15
Change-Id: Ifd83db69416230175ddc3161f640b612755018fc
2019-10-16 01:00:49 +02:00
Sona Kurazyan
9cc040a806 Prepare for deprecating the QDesktopWidget
QDesktopWidget is marked as obsolete in docs, but it is not yet
completely deprecated, some of its methods are still in use.

Replace uses of the following methods marked as obsolete:
- QDesktopWidget::screenNumber(QWidget*) -> QWidget::screen()
- QDesktopWidget::screenGeometry(QWidget*) -> QWidget::screen()->geometry()
- QDesktopWidget::availableGeometry(QWidget*) -> QWidget::screen()->availableGeometry()

Task-number: QTBUG-76491
Change-Id: I2cca30f2b4caa6e6848e8190e09f959d2c272f33
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2019-10-15 20:09:29 +02:00
Qt Forward Merge Bot
8d8140dffa Merge remote-tracking branch 'origin/5.14' into 5.15
Change-Id: I9953c1ca16862184c2373027e946c482ce8e6f0e
2019-10-13 01:00:43 +02:00
Christian Ehrlicher
4af00753fa Cleanup QtWidgets examples
Cleanup QtWidgets examples:
 - use nullptr (clang-tidy)
 - use member-initialization
 - adjust the style
 - fix includes

Change-Id: Ic5448606aacc525ea60b615a69227017aa2b821a
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2019-10-11 06:32:30 +02:00
Shawn Rutledge
f1dd6addda Make QTextBlockFormat::MarkerType an enum class
This came up during API review.

Change-Id: I9198e1eb96db0c21e46a226a032919bb62d3ca66
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2019-10-10 21:08:08 +02:00
Qt Forward Merge Bot
3a1613c227 Merge remote-tracking branch 'origin/5.14' into 5.15
Change-Id: I43393cf47675fd6c14972df1221986335c6f493c
2019-10-04 01:01:48 +02:00
Christian Ehrlicher
26d626436b Widgets flowlayout example: Fix crash on startup
The flowlayout example crashes on startup because the last change
removed a c-style cast which converted -1 to ~0U ...

Fixes: QTBUG-78861
Change-Id: I0dbed4472b4f68a92b3f92763d00d28baa186f9a
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2019-10-03 13:15:47 +02:00
Christian Ehrlicher
5d3e6ef909 Examples/OpenGLWindow: do not use hardcoded indices
Don't use the hardcoded indices 0 and 1 but the ones returned from
QOpenGLShaderProgram::attributeLocation(). Also change them from GLuint
to GLint.

Fixes: QTBUG-43566
Change-Id: I582bcf899f20d90f4ec1cd61326a177aabb69992
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2019-10-02 08:36:36 +02:00
Qt Forward Merge Bot
8791a8398a Merge "Merge remote-tracking branch 'origin/5.14' into 5.15" 2019-10-01 11:47:42 +02:00
Qt Forward Merge Bot
4e40c54a3c Merge remote-tracking branch 'origin/5.14' into 5.15
Change-Id: I77ba01f09b3dbcaf13cb265a70d9da661c32a61f
2019-10-01 01:01:20 +02:00
Christian Ehrlicher
b0042601ed Cleanup QtOpenGL examples
Cleanup the OpenGL examples
 - use nullptr (clang-tidy)
 - use member-initialization
 - avoid redundant checks for != nullptr when deleting a pointer

Change-Id: I3e4702690ed79e71c3e952d51ceef83b907b45b7
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2019-09-30 22:16:27 +02:00
Liang Qi
99cdd5fc67 Merge remote-tracking branch 'origin/5.13' into 5.14
Conflicts:
	src/corelib/global/qrandom.cpp
	src/corelib/io/qfileinfo.cpp
	src/corelib/kernel/qeventdispatcher_win.cpp
	src/corelib/kernel/qeventdispatcher_win_p.h
	src/gui/text/qfontdatabase.cpp
	src/platformsupport/fontdatabases/mac/qcoretextfontdatabase.mm
	src/plugins/platforms/windows/qwindowsglcontext.cpp
	src/testlib/qtestcase.cpp

Done-With: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Done-With: Edward Welbourne <edward.welbourne@qt.io>
Change-Id: I4893212471aa24be804c989a581810e2f714545c
2019-09-30 14:43:02 +02:00