Commit Graph

797 Commits

Author SHA1 Message Date
Liang Qi
e918605f42 Merge remote-tracking branch 'origin/5.6' into 5.7
Conflicts:
	src/corelib/json/qjsonparser.cpp
	src/gui/opengl/qopengl.cpp

Change-Id: Ib4d3208398399691839e6c6eaeb9006f99e3a62b
2016-11-04 11:39:15 +01:00
Friedemann Kleint
99cebe717c Update bookmarks in the XML bookmarks examples
Update URLs in jennifer.xbel and remove frank.xbel, which
has too many outdated URLs

Change-Id: I8cbc1e3988f45230f849e68202780c76cf4353d9
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2016-11-01 08:37:50 +00:00
Liang Qi
8e20daae9f Merge remote-tracking branch 'origin/5.6' into 5.7
Conflicts:
	src/plugins/platforms/minimalegl/qminimaleglintegration.cpp

Change-Id: Ia6ab42a6daadbf8abc085c971545904d49ea4b56
2016-10-31 09:26:35 +01:00
Topi Reinio
401172a198 Doc: Fix typos: handing > handling
Change-Id: Iecc64cba620ec639d06684e30264171052f21e10
Reviewed-by: Nico Vertriest <nico.vertriest@theqtcompany.com>
2016-10-28 19:40:47 +00:00
Liang Qi
3e71810cf3 Merge remote-tracking branch 'origin/5.6' into 5.7
Conflicts:
	src/network/access/qhttpnetworkconnection.cpp
	src/network/access/qhttpnetworkconnection_p.h

Change-Id: I11f8641ef482efa8cee1b79977d19cc3182814b4
2016-10-08 17:15:55 +02:00
Sérgio Martins
dd00f6dd91 Handle short reads in the local sockets example
Protection against short reads was already half implemented,
blockSize was being sent by the server but never used by the client.

Also, blockSize was bumped to quint32: If you're in a position where
short reads can happen then quint16 is probably not enough to hold the
size of your data. On Linux I could only reproduce short reads for
messages > 500K.

Change-Id: I191a3d781da1d8a119debbdafae641c8340a1da2
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2016-10-06 21:20:33 +00:00
Liang Qi
d148019f16 Merge remote-tracking branch 'origin/5.6' into 5.7
Conflicts:
	src/plugins/platforms/qnx/qqnxscreeneventhandler.cpp

Change-Id: I0af32ee55936d523cbd259b6fe82eb9c409f9074
2016-09-16 23:16:25 +02:00
Friedemann Kleint
75ef5859b6 Fix compilation of findfiles examples with QT_NO_CLIPBOARD
Amends change d1a30be5ab.

Task-number: QTBUG-55661
Change-Id: Ib7b1b4afd71b3c35493c15c8bf3e2570e321c986
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2016-09-05 04:55:02 +00:00
Liang Qi
6b8f422c5e Merge remote-tracking branch 'origin/5.6' into 5.7
Conflicts:
	src/corelib/global/qglobal.cpp
	src/corelib/io/qsettings.cpp
	src/corelib/itemmodels/qstringlistmodel.cpp
	tests/auto/gui/image/qimagewriter/tst_qimagewriter.cpp

Change-Id: I1c6c306ef42c3c0234b19907914b19da706b4a03
2016-08-13 01:05:02 +02:00
Simon Hausmann
98c7997274 Add missing \l to create link to QString in the docs
Change-Id: I980da5cd47ebc62d0b2f028b79b331b87d07e070
Task-number: QTBUG-55258
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2016-08-12 09:16:50 +00:00
Topi Reinio
a2ae631c04 Doc: Change instances of '(Mac) OS X' to 'macOS'
As of version 10.12 (Sierra), the name of Apple's desktop operating
system will be macOS. Change the occurrences where the Mac platform
is discussed to use a macro \macos, which expands to 'macOS'. This
helps with adapting to future renaming.

Update the instructions on mac-specific Q_OS_* macro usage.

Add a \target for the old 'Qt for OS X' topic to keep links working
for other documentation modules that try to link with the old name.

Change-Id: Id33fb0cd985df702a4ae4efb4c5fd428e77d9b85
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2016-08-12 08:30:29 +00:00
Topi Reinio
fbc9edb5e7 Doc: Fix typo in the Semaphores Example
Change-Id: I140915014836a3bbc449c953aa54452483b0b886
Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
2016-08-11 08:27:36 +00:00
Liang Qi
8ba384a564 Merge remote-tracking branch 'origin/5.6' into 5.7
Change-Id: I1a63523de158757964b6fb5ea026cf69a6c5ddcf
2016-08-10 17:43:13 +02:00
Friedemann Kleint
885720aa1b Update logo icons in icons example
Task-number: QTBUG-55137
Change-Id: I51a16a40112f5f5bbea00540178999382752a6f2
Reviewed-by: Topi Reiniö <topi.reinio@theqtcompany.com>
2016-08-10 10:43:05 +00:00
Gabriel de Dietrich
8ebe8ae35e HiDPI Drag and Drop: Properly render the default image on Mac
This is only when the attached MIME data contains text, and we
fall back to rendering that text into a pixmap. It requires
getting the device pixel ratio from the source which, for now,
may be a QWidget or a QWindow. Other cases may exist, but that
would bring more dependencies than desired.

Similarly, it fixes the draggabletext example. Other examples
would require either to get updated pixmaps or change substantially
in order to support HiDPI (e.g., the fridgemagnets example).

Change-Id: I66198214233e3e06c87505744e2aaa9691fe1bb6
Reviewed-by: Filipe Azevedo <filipe.azevedo@kdab.com>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
2016-08-09 18:22:03 +00:00
Liang Qi
69ef0481fc Merge remote-tracking branch 'origin/5.6' into 5.7
Conflicts:
	tests/auto/widgets/itemviews/qtreeview/tst_qtreeview.cpp

Change-Id: I6f3878b204464313aa2f9d988d3b35121d4d9867
2016-08-05 08:58:48 +02:00
Jake Petroules
47511046a4 Fix rasterwindow example
At least with the eglfs platform plugin, the QBackingStore constructor
results in a null pointer access if done before creation.

Change-Id: I2e78e70700fa48499a35c55797e1b962b6e6285a
Reviewed-by: Rebecca Worledge <rebecca.worledge@theqtcompany.com>
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
2016-08-04 19:55:14 +00:00
Friedemann Kleint
d1a30be5ab Polish the findfiles example to be actually useful
- Simplify the code, remove unused members
- Fix the translations of plurals to use %n
- Add tooltip displaying full paths in list
- Add context menu allowing to copy the name and  open
- Display the correct slashes on Windows
- Connect the returnPressed() signals of the line edits
- Make the search recursive
- Do not search binary files by checking the mime type

Change-Id: I3663799c88931db1f58c03ea35211e7ab03737ec
Reviewed-by: Topi Reiniö <topi.reinio@theqtcompany.com>
2016-08-03 11:53:55 +00:00
Friedemann Kleint
d5be0d3058 Polish the codecs example
- Port to Qt 5 connection syntax.
- Remove unneeded member variables.
- Adapt to screen size.
- Add a tab widget with a hex dump view to the preview dialog.
- Handle conversion errors in preview dialog,
  add status label displaying errors and warnings about failures
  and invalid characters encountered.
- Fix translated messages.

Change-Id: I916100c903e73d0d2326523753ed7398b1c34df0
Reviewed-by: Topi Reiniö <topi.reinio@theqtcompany.com>
2016-08-03 11:53:47 +00:00
Friedemann Kleint
9b1db44c2a Polish charactermap example
- Use Qt 5 connection syntax.
- Introduce helper function to calculate the square size, remove
  the existing 24 pixel limitation since that makes it impossible
  to render 20pt fonts.
- Add filter chooser for font filters.
- Add menu and info dialog showing DPI and default fonts.
- Streamline code

Change-Id: I0cd4d0475b5a7ed3c475de7a413abebbe688dfe2
Reviewed-by: Topi Reiniö <topi.reinio@theqtcompany.com>
2016-08-02 18:57:49 +00:00
Friedemann Kleint
0eb77c3011 mimetypebrowser example: Add Generic Icon Name
Show QMimeType::genericIconName() to description pane.

Change-Id: I698d07084b6396469686057ea53e2f497fdbe287
Reviewed-by: David Faure <david.faure@kdab.com>
2016-08-01 09:41:10 +00:00
Liang Qi
3cb7302480 Merge remote-tracking branch 'origin/5.6' into 5.7
Conflicts:
	src/widgets/itemviews/qabstractitemview.cpp
	src/widgets/itemviews/qabstractitemview_p.h

Change-Id: I54589b1365103cb1749186af92aab03a49c94b64
2016-08-01 10:03:21 +02:00
Marc Mutz
10d4969966 examples: use QSignalBlocker
Examples should show idiomatic Qt, and QSignalBlocker is idiomatic
since it's inception in Qt 5.3. Just updating the examples was
forgotten.

This commit makes good for that.

Fix coding-style issues as a drive-by.

Change-Id: If138e87ea2ab7a444599734113f7cc6df11fb42d
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2016-07-28 23:43:32 +00:00
Edward Welbourne
82ea53ad24 Merge remote-tracking branch 'origin/5.6' into 5.7
Conflicts:
	qmake/library/qmakeevaluator.cpp

One side changed the iterator to use ranged-for, the other changed its
body; they only conflicted because the latter had to add braces around
the body, intruding on the for-line.  Trivial resolution.

Change-Id: Ib487bc3bd6e3c5225db15f94b9a8f6caaa33456b
2016-07-15 20:47:57 +02:00
Edward Welbourne
178ab88562 PathStrokeRenderer::initializePoints(): use float division
The (example) code used a real to hold 360 / 7, which is of course 51,
discarding the 3/7 that was most likely meant to be kept.  Noticed by
Coverity (CID 22364).  Use 360.0 instead of 360 to get more accurate
results.

Change-Id: Ifdfbb932589d8ea728710e8b656af651c9f8a7d2
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2016-07-15 11:35:12 +00:00
Edward Welbourne
b5695bd5be Merge remote-tracking branch 'origin/5.6' into 5.7
Change-Id: Ibd81cd1df4a0650d93fcb556a57be90be2e1f569
2016-07-04 15:58:39 +02:00
Thiago Macieira
3b5db8f3a6 Examples: Fix stringification of the Qt version
(QT_VERSION % 0xffff00) is useless for now, as QT_VERSION < 0x1000000
(for now). The author of this code probably meant to use bitwise-AND.
But even that is unnecessary as the right shift discards the lower 8
bits anyway.

Change-Id: Ie585843cfb684bc3b6e3fffd145d533b05288dfc
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2016-07-02 16:38:39 +00:00
Thiago Macieira
840729a931 QDateTime: use the more efficient currentMSecsSinceEpoch()
... instead of creating a QDateTime object.

Change-Id: Ib57b52598e2f452985e9fffd145a36911de4fa9a
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2016-07-02 07:51:11 +00:00
Liang Qi
f27d8b9f57 Merge remote-tracking branch 'origin/5.6' into 5.7
Change-Id: If6ba05867e7c98159e1b94ff71923e8b36bdbccb
2016-06-29 10:10:22 +02:00
Olivier Goffart
ac9899b4cb mainwindow example: fix creating custom QDockWidget
The signal was connected to the wrong slot.
Regressed in 2fe56e37ed.

Change-Id: I33135fc79c3585dfbe0f6ebc04f819e919ed9ed7
Reviewed-by: Sérgio Martins <sergio.martins@kdab.com>
2016-06-24 10:57:56 +00:00
Louai Al-Khanji
cd21da3922 examples/corelib/mimetypebrowser: Fix no-widgets build
Change-Id: Iea8cbc791bc2bb990c4d550c890ccd5f5ca17bd6
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2016-06-07 17:55:28 +00:00
Liang Qi
57057f76ad Merge remote-tracking branch 'origin/5.6' into 5.7
Conflicts:
	.qmake.conf
	config.tests/unix/nis/nis.cpp
	mkspecs/unsupported/freebsd-g++/qplatformdefs.h
	src/corelib/tools/qdatetime.cpp
	src/corelib/tools/qsimd.cpp
	src/corelib/tools/qsimd_p.h
	src/network/access/access.pri
	src/network/access/qnetworkreplynsurlconnectionimpl.mm
	src/network/access/qnetworkreplynsurlconnectionimpl_p.h
	src/plugins/platforms/cocoa/qnsview.mm
	src/plugins/printsupport/windows/qwindowsprintdevice.cpp
	tests/auto/corelib/kernel/qobject/tst_qobject.cpp
	tests/auto/network/access/qnetworkreply/BLACKLIST
	tests/auto/widgets/widgets/qopenglwidget/BLACKLIST

Change-Id: I4b32055bbf922392ef0264fd403405416fffee57
2016-06-06 09:04:55 +02:00
Andy Nichols
58408ffa1b Add install target to mac widget examples
Change-Id: I524ba3fcc82a6ef015241d90f212059ae7772443
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-06-01 02:30:45 +00:00
Friedemann Kleint
965b5b7ae0 OpenGL legacy example: Fix compilation in namespaced builds.
Change-Id: I6b2f3e8c240e105c73008fa61f9ed50cc9d982ac
Reviewed-by: Alexandru Croitor <alexandru.croitor@theqtcompany.com>
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
Reviewed-by: Topi Reiniö <topi.reinio@theqtcompany.com>
2016-05-27 20:28:30 +00:00
Jake Petroules
2ceacd5372 Fix httpwindow example.
DownloadLocation is not writable on some platforms (iOS) in Qt 5.6,
and qt-project.org HTTPS does not work anymore.

Change-Id: I78bfbee1472cd39cd05ec7f846d1195d4fbb1b2c
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
2016-05-26 01:55:49 +00:00
Liang Qi
1f8bc502c8 Merge "Merge remote-tracking branch 'origin/5.6' into 5.7" into refs/staging/5.7 2016-05-19 17:50:46 +00:00
Oswald Buddenhagen
b98f599948 add missing install target
Change-Id: I4bf0224fb58297ab6e3b8f966f3b180f91d16279
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
2016-05-19 17:49:19 +00:00
Liang Qi
818014b449 Merge remote-tracking branch 'origin/5.6' into 5.7
Conflicts:
	configure
	src/3rdparty/angle/src/libANGLE/renderer/d3d/d3d11/Renderer11.cpp
	src/network/access/qnetworkaccessmanager.cpp
	src/plugins/platforms/cocoa/qcocoacolordialoghelper.mm
	src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmcursor.cpp
	src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmcursor.h
	src/widgets/widgets/qlineedit_p.cpp
	src/widgets/widgets/qlineedit_p.h
	src/winmain/winmain.pro
	tests/auto/corelib/io/qstorageinfo/tst_qstorageinfo.cpp
	tests/auto/dbus/qdbusconnection/tst_qdbusconnection.cpp
	tests/auto/dbus/qdbusconnection/tst_qdbusconnection.h
	tests/auto/testlib/selftests/expected_cmptest.teamcity
	tests/auto/testlib/selftests/expected_cmptest.txt
	tests/auto/widgets/itemviews/qtableview/tst_qtableview.cpp
	tools/configure/configureapp.cpp

Change-Id: Ib9997b0d0f91946e4081d36c0c6b696c5c983b2a
2016-05-19 12:55:27 +02:00
Friedemann Kleint
37a983cd98 Dirview example: Add option for DontUseCustomDirectoryIcons.
This enables people to toy around with the option and check
what impact it has.

Change-Id: I8b49c31211cc48721b3326eea48b4e74967b1a92
Reviewed-by: Sérgio Martins <iamsergio@gmail.com>
2016-05-11 17:29:17 +00:00
Liang Qi
dbef41f43e Merge remote-tracking branch 'origin/5.6' into 5.7
Conflicts:
	examples/qtestlib/tutorial5/containers.cpp
	examples/widgets/tools/tools.pro
	src/corelib/io/qprocess.cpp
	src/corelib/io/qprocess_unix.cpp
	src/corelib/io/qprocess_win.cpp
	src/network/kernel/qdnslookup_unix.cpp
	src/plugins/platforms/xcb/qxcbconnection_xi2.cpp
	src/testlib/qtestcase.cpp
	tools/configure/configureapp.cpp

Change-Id: I838ae7f082535a67a4a53aa13a21ba5580758be8
2016-05-06 15:36:44 +02:00
Oswald Buddenhagen
780d21e129 fix example installs
Change-Id: Ib34795f10b1d7120b28958127ced049af3b4f72b
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2016-05-03 10:25:33 +00:00
Oswald Buddenhagen
1ae1f0da0d delete unreferenced file
Change-Id: Ibc70cafdc098ff4f6036182d6f41a2debb15a996
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2016-05-03 10:25:30 +00:00
Oswald Buddenhagen
2c7b3726bf install the opengl legacy examples
while they are not built, their sources should be installed as long we
don't delete them completely.

Change-Id: I5e628e96cc9715520cb6e5aadb2cae61d1d03a4f
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
2016-05-03 10:25:25 +00:00
Oswald Buddenhagen
619ab8080d fix build and installation of queuedcustomtype example
it was not built at all (and didn't build with qt in a namespace), and
consequently was not installed as well.

Change-Id: I24d8ac4dd5d70927c262ad6336e5ee32a0fd003a
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2016-05-03 10:25:22 +00:00
Oswald Buddenhagen
5bbbea4c83 normalize structure of plugandpaint example
as in other examples which come with plugins, use an additional
hierarchy level which contains the app and plugin subdirs.

Change-Id: I2487755967aa3474c337c8c8af10be49627b63d0
Reviewed-by: Topi Reiniö <topi.reinio@theqtcompany.com>
2016-05-03 10:25:18 +00:00
Liang Qi
b894a8def5 Merge remote-tracking branch 'origin/5.6' into 5.7
Conflicts:
	mkspecs/features/qml_module.prf
	mkspecs/features/qt_common.prf
	src/gui/text/qzip.cpp
	src/plugins/platforms/cocoa/qnsview.mm
	src/plugins/platforms/windows/array.h
	src/testlib/qtestcase.cpp
	src/widgets/dialogs/qfilesystemmodel.h

Change-Id: Ie41c5868415b81f7693c80e045497035504bb210
2016-04-29 17:55:20 +02:00
Allan Sandfeld Jensen
1b21170faa Add missing indentation
Discovered with gcc 6.

Change-Id: Ib5ba49df6a1f4d9574842ffe5f3e9856da0e60d0
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2016-04-28 22:39:46 +00:00
Liang Qi
23a36fd2bf Merge remote-tracking branch 'origin/5.6' into 5.7
Conflicts:
	src/corelib/io/qprocess_win.cpp
	src/widgets/itemviews/qheaderview.cpp

Change-Id: I0a59ade9cd6e91f770fdf298a7d72a41e79fd761
2016-04-27 09:18:05 +02:00
Friedemann Kleint
759b3f49c5 OpenGL/contextinfo-Example: Add command line options and status label.
Add command line options to be able to set the QCoreApplication attributes
that influence Open GL context creation and add a status label at the
bottom that displays it besides the QT_OPENGL environment variable.

Task-number: QTBUG-52693
Change-Id: Id9793292596e0feb3da5220fde2e5b2e495f87ff
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
2016-04-23 06:10:45 +00:00
Oswald Buddenhagen
efb829d44b Mime type browser example: Add documentation.
Change-Id: Ic5f2103b0771799bc9e5e5efceeadf153f8a2159
Reviewed-by: Topi Reiniö <topi.reinio@theqtcompany.com>
2016-04-19 11:34:35 +00:00