Commit Graph

653 Commits

Author SHA1 Message Date
Volker Hilsheimer
89984a8a61 Fix the systray example to only show an icon when requested
The "None" and "Custom icon" cases where using the same value for icon
type, which resulted in both options showing the application icon.

Use -1 to indicate the custom option, and treat all other options
the same.

Task-number: QTBUG-76916
Change-Id: Ib715f5d328175bd6e221b3f507087954fa542838
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2019-07-09 18:32:48 +02:00
Tor Arne Vestbø
244ff33119 styles example: Use QImage instead of QPixmap in NorwegianWoodStyle
Using QImage allows creating the style before the application has
been created, and is the more modern API.

No changes to the documentation needed.

Change-Id: Ifa0e5fa1113802fca18fbd45bb3c0a5ba1dbfeab
Reviewed-by: Andreas Aardal Hanssen <andreas@hanssen.name>
2019-06-25 20:08:26 +02:00
Paul Wicking
6398588338 Doc: Fix typo in brief
Fixes: QTBUG-76512
Change-Id: I8db4288b22416c6af9aaaa72c5005b81d79bf620
Reviewed-by: Martin Smith <martin.smith@qt.io>
2019-06-19 15:18:50 +02:00
Friedemann Kleint
50f3f8f6bb Use High DPI pixmaps in prominent examples and tests
Set AA_UseHighDpiPixmaps.

Task-number: QTBUG-52622
Change-Id: Ic4373a9c94952f50bc1ad36bcc0dec850efc124a
Reviewed-by: Robert Loehning <robert.loehning@qt.io>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2019-03-15 18:26:56 +00:00
Joerg Bornemann
8fe3680193 Add cmdline feature to qmake
[ChangeLog][qmake] A new feature "cmdline" was added that implies
"CONFIG += console" and "CONFIG -= app_bundle".

Task-number: QTBUG-27079
Change-Id: I6e52b07c9341c904bb1424fc717057432f9360e1
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
2019-02-18 07:12:14 +00:00
Friedemann Kleint
7aaf54f572 Codecs example: Add a dialog for showing common C++ encodings
Add a dialog where the user can enter a line of text, which is then
displayed in several encodings with special characters converted
suitable for C++/Python string literals.

Task-number: QTBUG-60635
Change-Id: Ibd436f9f76e128c93cbb581235c730d636641d8a
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2018-11-30 10:00:04 +00:00
Christian Ehrlicher
8c685b765b Itemviews: Cleanup examples
Cleanup some minor issues in the chart example:
 - remove unused members
 - use initializer list for members
 - pass a proper role to dataChanged()
 - honor roles parameter in PieView::dataChanged()
 - use nullptr instead 0
 - use new-style connect
 - fix indentation and other whitespaces

Change-Id: Idb212b07c006fe3ae31bee9cd9b1ba4d03043b5e
Reviewed-by: André Hartmann <aha_1980@gmx.de>
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2018-11-12 13:01:30 +00:00
Liang Qi
bc07958f92 Merge remote-tracking branch 'origin/5.11' into 5.12
Conflicts:
	.qmake.conf
	qmake/Makefile.unix
	src/gui/text/qtextdocument.cpp
	src/gui/text/qtextdocument.h

Change-Id: Iba26da0ecbf2aa4ff4b956391cfb373f977f88c9
2018-11-09 10:34:33 +01:00
Allan Sandfeld Jensen
6d255b467b Fix composition example during OpenGL resizes
Previous images were sometimes not cleared correctly.

Change-Id: I62949b756bf797aa79c5160774f2f258e5c353dd
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2018-11-07 12:26:03 +00:00
Thiago Macieira
b5d249f953 Update the floppy disk icon (save) to be physically correct
[ChangeLog][Documentation] Fixed the icons for the "file save" action
that were inaccurate representations of a 3.5-inch floppy disk (the cut
edge was on the wrong side). Now all floppy representations are
physically accurate.

Change-Id: Ia3b27ae12a1a4fefa3b7fffd155bb86fee5271c3
Fixes: QTBUG-71012
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-11-06 20:43:36 +00:00
Friedemann Kleint
ae0843eca0 Tablet example: Fix warning about switch/fallthrough
Add Q_FALLTHROUGH(), fixing:
tabletcanvas.cpp:222:55: warning: this statement may fall through [-Wimplicit-fallthrough=]

Change-Id: I573f4add56774218e28a7c5f1dac09c5402333c0
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2018-11-01 12:46:59 +00:00
Alexander Volkov
7aad542629 Notepad example: Get rid of auto-connection slots
Their correctness is not checked at compile time and even object
renames can break code.

Change-Id: I99273a28743a79a76c00e6db0ed4cd6d7eba8bf2
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2018-11-01 11:46:00 +00:00
Allan Sandfeld Jensen
0ead3b7142 Move arthurwidget based examples to new QOpenGL classes
Several of the examples were not even working besides using deprecated
classes.

Change-Id: I352e0629d490593edcc5868d2ec5a8ff222eaeab
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2018-10-17 09:16:01 +00:00
Liang Qi
ccf26f6a88 Merge remote-tracking branch 'origin/5.11' into 5.12
Conflicts:
	src/plugins/platformthemes/platformthemes.pro
	src/printsupport/kernel/qplatformprintdevice.cpp

Change-Id: Iac01729ad954bb1c7af5867d982eb243b2139ee6
2018-10-17 10:35:28 +02:00
Liang Qi
c593492d16 Modernize the "animation" feature
Change-Id: Ibc164b3df3cf87db569ef4813de458a9067b7f7d
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2018-10-12 14:26:15 +00:00
Morten Johan Sørvig
213cfc3fae Make the textedit example use dark text on light background on macOS
Many text documents will be designed for a white-paper
look, and in these cases it is desirable that the editor
colors matches.

Change-Id: I66d721f8c2e27b78a2b885c6cfd74f897fe42389
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2018-09-25 12:15:36 +00:00
Paul Wicking
a62bab95d3 Doc: Move touch examples around so they get included in docs
Task-number: QTBUG-59249
Change-Id: I71f1d2e28f0cadbad1d6bcf117198018eaf8e012
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2018-09-14 03:56:22 +00:00
Paul Wicking
b13e3b0eb6 Example: Close popup on mouse click without assigning new lens position
Clicking in the main renderer window passes a new position to the lens,
disregarding the "What's This" (documentation) overlay window.
This change checks if the documentation window is open on click, and if
it is, closes the documentation window and returns without further
handling of the mouse event.

Fixes: QTBUG-7205
Change-Id: I821245ec6c78be00d80af461baf8e4d59e0f351f
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2018-09-10 10:04:08 +00:00
Qt Forward Merge Bot
295cd87c6d Merge remote-tracking branch 'origin/5.11' into 5.12
Change-Id: I66c7f18a2abd13601da0947919436f7da3549ae9
2018-09-07 01:00:21 +02:00
Paul Wicking
7f0cc35d9c Examples: Fix minor bug in Tree Model Completer Example
Minor bug that caused highlighter to not work properly.

Task-number: QTBUG-66084
Change-Id: I7860d7a13c402e3236f4c844020e35e11f6e53e5
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2018-08-30 13:14:01 +00:00
Shawn Rutledge
d2c05b0c85 Tablet example: paint only the changed areas of the canvas
This improves performance significantly.

Change-Id: I9a8782148ce03a2bc85759c4e8c1eecb37467cf6
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2018-08-30 04:12:01 +00:00
Shawn Rutledge
e498a1d09d Tablet example: add a menu item to clear the canvas
It's annoying to have to kill the app and start over when it gets too
cluttered.

Change-Id: Ic72e372e5742de4e7c6bb818a3150283498a517b
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2018-08-23 12:57:01 +00:00
Qt Forward Merge Bot
8842d9d1e6 Merge remote-tracking branch 'origin/5.11' into dev
Change-Id: I8bb8227f9da982e7d5ebe5324fc27abd9ac0d4fc
2018-08-17 09:08:06 +02:00
Paul Wicking
9b59a2ef97 Doc: Update out-of-date screenshots in example docs
Task-number: QTBUG-63248
Change-Id: I4cd47977ae020b43ca92b1781ac8b038e6ef851c
Reviewed-by: Martin Smith <martin.smith@qt.io>
2018-08-16 10:12:21 +00:00
Qt Forward Merge Bot
053e7cce79 Merge remote-tracking branch 'origin/5.11' into dev
Conflicts:
	.qmake.conf
	src/corelib/doc/src/objectmodel/signalsandslots.qdoc
	src/plugins/platforms/cocoa/qcocoamenuloader.mm
	src/plugins/platforms/xcb/qxcbconnection.cpp
	src/plugins/platforms/xcb/qxcbconnection.h
	src/plugins/platforms/xcb/qxcbconnection_xi2.cpp
	src/plugins/platforms/xcb/qxcbwindow.cpp
	tests/auto/gui/image/qimage/tst_qimage.cpp

Done-with: Gatis Paeglis <gatis.paeglis@qt.io>
Change-Id: I9bd24ee9b00d4f26c8f344ce3970aa6e93935ff5
2018-08-07 17:44:51 +02:00
Paul Wicking
0dfdf23d05 Doc: Synchronize documentation with code snippet
* The plugin IID with version number was removed in transition to new
  plugin system, see efde205586.
* This change re-adds the version number, so that we deliver on the best
  practices as mentioned in the documentation for the example.

Task-number: QTBUG-59487
Change-Id: I88596e71cf18be88d0b1d28d56b6d3bb72fe756b
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2018-08-01 14:48:38 +00:00
Edward Welbourne
23c9d4c98f Merge branch '5.11' into dev
Conflicts:
	qmake/library/qmakebuiltins.cpp
	src/plugins/platforms/windows/qwindowstabletsupport.h
	src/plugins/platforms/xcb/qxcbconnection.cpp
	src/plugins/platforms/xcb/qxcbconnection.h
	src/plugins/platforms/xcb/qxcbconnection_xi2.cpp
	src/plugins/platforms/xcb/qxcbwindow.cpp
	src/widgets/styles/qstylesheetstyle.cpp
	tests/auto/widgets/styles/qstylesheetstyle/tst_qstylesheetstyle.cpp

Done-With: Gatis Paeglis <gatis.paeglis@qt.io>
Change-Id: I000b0eb3cea2a5c7a99b95732bfdd41507cf916e
2018-07-31 13:33:14 +02:00
Eirik Aavitsland
bafa5a14dd Add demo of the new QGradient presets to the gradients example
In the gradients example, allow the user to select and show
QGradient's named presets.

Change-Id: I40bc6cbe3a0316ce49d67d63511881b6f6112574
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2018-07-24 16:45:41 +00:00
Paul Wicking
f17d33bebb Doc: Update Tetrix example
Use new connect syntax throughout the example.

Task-number: QTBUG-69503
Change-Id: I5ab1453318e60586a9655ecb58263778c02aba4f
Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io>
2018-07-19 18:22:12 +00:00
Liang Qi
e3ed2281c0 Merge remote-tracking branch 'origin/5.11' into dev
Conflicts:
	src/plugins/platforms/cocoa/qnsview.mm
	src/plugins/platforms/cocoa/qnsview_dragging.mm
	src/plugins/platforms/ios/qiosinputcontext.mm
	src/plugins/platforms/xcb/qxcbconnection.cpp
	src/plugins/platforms/xcb/qxcbconnection_xi2.cpp
	src/plugins/platforms/xcb/qxcbwindow.cpp
	src/tools/androiddeployqt/main.cpp
		Was moved from qttools into qtbase in 5.11.
		So re-apply 32398e4d here.
	tests/auto/corelib/global/qlogging/test/test.pro
	tests/auto/corelib/global/qlogging/tst_qlogging.cpp
	tests/auto/corelib/io/qfile/tst_qfile.cpp
	tests/auto/corelib/kernel/qtimer/tst_qtimer.cpp
	tests/auto/corelib/thread/qthreadstorage/test/test.pro
	tests/auto/widgets/itemviews/qheaderview/tst_qheaderview.cpp
	tests/auto/widgets/kernel/qapplication/test/test.pro

Done-with: Gatis Paeglis <gatis.paeglis@qt.io>
Done-with: Mårten Nordheim <marten.nordheim@qt.io>
Done-with: Oliver Wolff <oliver.wolff@qt.io>
Change-Id: Id970486c5315a1718c540f00deb2633533e8fc7b
2018-07-02 11:23:45 +02:00
Topi Reinio
6601939713 Notepad example: Wrap clipboard functions with QT_CONFIG(clipboard)
And disable menu actions for functionality that's not available.

Task-number: QTBUG-68168
Change-Id: I153487860e8dda8271ae04e9cd2ad8b26a4b130f
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2018-06-22 14:37:48 +00:00
Paul Wicking
8476271eda Doc: Fix typo in Scribble example
Task-number: QTBUG-68549
Change-Id: Ib83d3297e2ebefe6f42799a14dde35411a8ec120
Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io>
2018-06-21 14:35:01 +00:00
Paul Wicking
8bd73ad989 Doc: Add missing full stops in briefs
Task-number: QTBUG-68933
Change-Id: I3f2a9f8c562f9a44bb32bddd31d75abbfe6de04d
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2018-06-21 14:23:30 +00:00
Nico Vertriest
26ff9aac8e Doc: Update Extension example
-language review
-rewrite some paragraphs

Task-number: QTBUG-60635
Change-Id: I96154cd5d78b9517409ac67ec416c53031dcb909
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
2018-06-13 11:41:10 +00:00
Liang Qi
096e37910d Merge remote-tracking branch 'origin/5.11' into dev
Conflicts:
	.qmake.conf
	src/corelib/kernel/qeventdispatcher_cf.mm
	src/gui/kernel/qguiapplication_p.h
	src/gui/kernel/qwindowsysteminterface.cpp
	src/gui/kernel/qwindowsysteminterface.h
	src/plugins/platforms/cocoa/qcocoawindow.mm
	src/plugins/platforms/cocoa/qnswindowdelegate.mm
	src/plugins/platforms/ios/qioseventdispatcher.mm
	src/plugins/platforms/windows/qwindowsdrag.h
	src/plugins/platforms/windows/qwindowsinternalmimedata.h
	src/plugins/platforms/windows/qwindowsmime.cpp
	src/plugins/platforms/winrt/qwinrtscreen.cpp

Change-Id: Ic817f265c2386e83839d2bb9ef7419cb29705246
2018-06-07 19:10:53 +02:00
Nico Vertriest
9551d62d97 Doc: Update Factorial Example
Updated connect syntax

Task-number: QTBUG-60635
Change-Id: Ib5280326c158221129c1817a4853bfd79bbcd895
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
2018-06-07 14:29:50 +00:00
Nico Vertriest
c118f642c3 Doc: Update Elided Label example
Updated connect syntax

Task-number: QTBUG-60635
Change-Id: I8d770f62557d5056375d72d778c4e2079511b848
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
2018-06-07 14:29:41 +00:00
Andre Hartmann
a14a943f9a Examples: Cleanup and modernize Plug&Paint
* Use C++11 member init
* Use auto where appropriate
* Replace foreach with range-for
* Replace last Qt4-style connects
* Sort includes to common style
* Fix some Clang warnings

Task-number: QTBUG-60635
Change-Id: I61c98b34b954e416dd175b56ca589125217083de
Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
2018-06-06 11:55:44 +00:00
Nico Vertriest
7b74b4fbec Doc: Update connect syntax Plugandpaint Example
Task-number: QTBUG-60635
Change-Id: I354a0886b22c63be57bd927308163abd3246be77
Reviewed-by: André Hartmann <aha_1980@gmx.de>
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
2018-06-05 15:02:05 +00:00
Nico Vertriest
28738d2d8d Doc: Add formatting features to Notepad example
- bold, italic, underline
- About button

Change-Id: I8ece7d2bfca0b148b681a2fccb4a439ce179848a
Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
2018-06-01 09:54:56 +00:00
Edward Welbourne
2d3bbd7f17 glextensions.h: simplify #if-ery to avoid conflict
The prior #if-ery was needlessly confusing; and most of it was
redundant anyway.

Change-Id: I82da1b38c08b93b9dc2220dd7b15ecb7dcc002af
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2018-05-31 15:51:55 +00:00
Joerg Bornemann
9f27bfb31a Make sure we can build with -no-feature-draganddrop
We move QInternalMimeData to a separate file, because this class is
used, even if draganddrop is disabled. From now on, include
qinternalmimedata_p.h instead of qdnd_p.h for QInternalMimeData.

Change-Id: I594e08e2e90d574dc445119091686b4b69e4731b
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
2018-05-29 18:31:35 +00:00
Qt Forward Merge Bot
875731368a Merge remote-tracking branch 'origin/5.11' into dev
Change-Id: I8d8b03ea46c537b091b72dc7b68aa6aa3a627ba6
2018-05-29 01:00:09 +02:00
Nico Vertriest
42e4a6531d Doc: Update Echoplugin Example
- screenshot
- connect syntax

Task-number: QTBUG-60635
Change-Id: I18c3e1fef5c623565bbf6cf33bf88e9d8135d8be
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
2018-05-28 12:38:07 +00:00
Nico Vertriest
35e31149c2 Doc: Update Fetchmore example
- minor edit
- updated screenshot

Task-number: QTBUG-60635
Change-Id: I988ad28723131127eee0a93671b0562d8f446139
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
2018-05-28 10:19:06 +00:00
Liang Qi
f82e508516 Merge remote-tracking branch 'origin/5.11' into dev
Conflicts:
	mkspecs/features/qt_common.prf
	src/corelib/tools/qstring.cpp
	src/plugins/platforms/windows/qwindowsmousehandler.cpp
	src/widgets/widgets/qmainwindowlayout_p.h

Change-Id: I5df613008f6336f69b257d08e49a133d033a9d65
2018-05-24 16:29:14 +02:00
Nico Vertriest
d9c430cfd9 Doc: Update connect syntax Order Form Example
Task-number: QTBUG-60635
Change-Id: Ia474a23db7c32e68cb23ffa6ec14b9c6376cadec
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
2018-05-16 12:00:00 +00:00
Nico Vertriest
57fae860fd Doc: Modify connect statements Echoplugin Example
Task-number: QTBUG-60635
Change-Id: I4313ff65875d20b768d7ad6e9c8322bd5cf7f1ab
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2018-05-16 11:59:27 +00:00
Nico Vertriest
3b28e3d871 Doc: update connect syntax digitalclock example
Task-number: QTBUG-60635
Change-Id: I9d8411b639e5cf74c9cb03de4b5f6081bb549151
Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
2018-05-16 11:57:51 +00:00
Liang Qi
7e1b504f31 Merge remote-tracking branch 'origin/5.11' into dev
Conflicts:
	mkspecs/features/qt_module_headers.prf
	tests/auto/widgets/itemviews/qheaderview/tst_qheaderview.cpp
	tests/auto/widgets/kernel/qwidget/BLACKLIST

Change-Id: I2a08952d28d1d0e3d73f521a3d44700ce79ff16c
2018-05-14 14:51:46 +02:00