Commit Graph

837 Commits

Author SHA1 Message Date
Alexander Volkov
c050a1bdea Examples: Remove more redundant virtual specifiers for overriders
Change-Id: I3e378c656a2651fb7031b6cf6a6939dfc5576519
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2016-11-29 10:06:02 +00:00
Alexander Volkov
011aeb131e Examples: Remove a redundant virtual specifier for overriders
It's a good practice to use override without virtual:
https://github.com/isocpp/CppCoreGuidelines/blob/master/CppCoreGuidelines.md#Rh-override

Change-Id: I5c2d73600e6c706424589c0487133c03a4ef3629
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2016-11-25 22:36:21 +00:00
Maurice Kalinowski
2c8c6dd9a4 Fix compilation without QPrinter support
Task-number: QTBUG-56321
Change-Id: Ic77d01431ee58d609eca895d1f2d216042406bc9
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2016-11-23 09:27:56 +00:00
Friedemann Kleint
7920cfe46a Fix SCTP API according to Qt conventions
inDatagramMode() -> isInDatagramMode()
maxChannelCount -> maximumChannelCount

Change-Id: Ib64bf52cc3b40354927ee11e3f41d47e84c6d9c4
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-11-22 07:13:01 +00:00
Lars Knoll
03c1a6ac71 Remove last traces of opengl es 1 support
Change-Id: I3f86d4892ec3235003d34fdcf3f093f1513c821f
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2016-11-16 22:00:46 +00:00
Lars Knoll
94f9ee79a6 Clean up some conditions in our pro files
Change qtConfig(opengl(es2)?) to qtConfig(opengl) as that covers
the case without any regular expression.

Change-Id: I935e3150f87e195e8bd3d0e55b4ed43572b131cf
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2016-11-14 19:22:17 +00:00
Nico Vertriest
eedf8f28e0 Doc: update SQL examples
- screenshot: remove OS-dependent part of window
- \image --> \borderedimage

Change-Id: I3eb98595e5c2eb254d3857e4c81dfedac8b7939e
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2016-11-09 13:05:53 +00:00
Liang Qi
9d50df5511 Merge remote-tracking branch 'origin/5.7' into 5.8
Conflicts:
	src/corelib/tools/qalgorithms.h

Change-Id: Ib8ce4d5d9ecd5b9c166d5b8b44e58f3e4e7283ff
2016-11-08 10:01:50 +01:00
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
a732576a66 Merge remote-tracking branch 'origin/5.7' into 5.8
Conflicts:
	config.tests/win/msvc_version.cpp
	configure.pri
	mkspecs/macx-ios-clang/features/default_post.prf
	mkspecs/macx-ios-clang/features/resolve_config.prf
	mkspecs/features/uikit/default_post.prf
	mkspecs/features/uikit/resolve_config.prf
	src/corelib/io/qsettings_mac.cpp
	src/corelib/json/qjsondocument.cpp
	src/plugins/platforms/cocoa/qcocoawindow.h
	src/plugins/platforms/cocoa/qcocoawindow.mm
	src/plugins/platforms/cocoa/qnswindowdelegate.h
	src/plugins/platforms/cocoa/qnswindowdelegate.mm
	src/plugins/platforms/ios/ios.pro
	src/plugins/platforms/ios/kernel.pro
	src/plugins/platforms/ios/qiosintegration.h
	src/plugins/platforms/minimalegl/qminimaleglintegration.cpp
	tests/auto/gui/painting/qpainter/tst_qpainter.cpp
	tools/configure/environment.cpp

Change-Id: I654845e54e40f5951fb78aab349ca667e9f27843
2016-11-01 06:02:55 +01: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
Oswald Buddenhagen
0cc2a75ad8 remove bogus qtConfig(simulator_and_device) condition
xcode variable expansion should be done exactly when xcode is used.

Change-Id: Icea8cb7bf9a51811052789bd66354b1b165127d6
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2016-10-16 00:12:33 +00:00
Oswald Buddenhagen
4133e76cf4 remove bogus xcode variable reference
this is a vestige from an earlier version of the watchos introduction.

amends 57378a108.

Change-Id: I7d15149b94d12d84e041079b563175bd4e385d50
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2016-10-16 00:12:24 +00:00
Oswald Buddenhagen
4e945ea2f8 Get rid of simulator_and_device CONFIG option (mostly)
A separate flag is no longer needed now that simulator and device builds
are not exclusive any more (*) - both 'simulator' and 'device' being set
at the same time is a sufficient indication (uikit/default_pre.prf sets
this up according to the simulator_and_device feature and the
QMAKE_MAC_SDK variable).

(*) xcodebuild mode actually still uses exclusive builds, but this is
activated locally in uikit/default_post.prf, and uikit/xcodebuild.prf
implements the actual build passes manually anyway, so this change does
not affect it.

Change-Id: Idf173a7bfeb984498d3a49ed6b8d1a16da6c2089
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2016-10-16 00:11:59 +00:00
Tor Arne Vestbø
6a35e77ef3 Change confusing Q_DEAD_CODE_FROM_QT4_FOO define
Commit c5db8fc74 changed all instances of Q_WS_FOO to have the prefix
Q_DEAD_CODE_FROM_QT4 instead, to make it clearer when reading the code
that the code in question was a left-over from Qt4, when we used
Q_WS_ defines instead of Q_OS_ defines.

This worked well for cases of #ifdef Q_DEAD_CODE_FROM_QT4, but less so
for cases of #ifndef Q_DEAD_CODE_FROM_QT4, where the code was actually
unconditionally included.

To make this even clearer, the defines have been replaced by checks for
1 or 0, with a comment describing how the code used to look in Qt4. The
use of constants in the check also makes it easier for editors to parse
the condition and show visually that the code is defined out.

Change-Id: I152070d87334df7259b417cd5e17d7b7950379b7
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-10-14 08:19:29 +00:00
Liang Qi
905329200f Merge remote-tracking branch 'origin/5.7' into 5.8
Conflicts:
	src/gui/image/qpixmap.cpp
	src/widgets/kernel/qformlayout.cpp

Change-Id: I8a8391a202adf7f18464a22ddf0a6c4974eab692
2016-10-11 07:40:32 +02:00
Oswald Buddenhagen
573fbd84a4 fix build of examples subdir with -no-gui
the opengl feature is defined in the gui module.

Change-Id: Ibf63395729540092ca82ee4ffc4e2ff4971c2a29
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2016-10-10 16:59:19 +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
Tor Arne Vestbø
0deb0796a4 Modernize rasterwindow/openglwindow examples to use requestUpdate()
Change-Id: Ib8d0c42db7343247d0431ea008eb17da9ee98f4d
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2016-09-22 16:45:15 +00:00
Liang Qi
7555a92581 Merge remote-tracking branch 'origin/5.7' into 5.8
5971b88e is not needed in new configure.

This merge also reverts "fix QMAKE_DEFAULT_*DIRS resolution with
apple SDK", 2c9d15d7, because it breaks iOS build with new
configure system.

Conflicts:
	mkspecs/features/default_pre.prf
	mkspecs/features/mac/toolchain.prf
	mkspecs/features/toolchain.prf
	src/dbus/qdbusconnection.cpp
	src/plugins/sqldrivers/mysql/qsql_mysql.cpp
	src/sql/drivers/mysql/qsql_mysql.cpp
	src/widgets/widgets/qmenubar.cpp
	src/widgets/widgets/qmenubar_p.h
	tools/configure/configureapp.cpp
	tools/configure/environment.cpp
	tools/configure/environment.h

Change-Id: I995533dd334211ebd25912db05b639d6f908aaec
2016-09-21 11:57:52 +02: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
Lars Knoll
a668c6a6b6 Convert the old feature system
... to the new qmake based configuration system.

This removes the old qfeatures.txt (distributed over configure.json
files) and qfeatures.h (distributed over qconfig-<module>.h files).

qfeatures.prf is gone without replacement, as attempts to use it would
lead to followup errors anyway.

Change-Id: I1598de19db937082283a905b9592d3849d2199d0
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-09-15 08:24:10 +00:00
Lars Knoll
2d3c73fcfe Modularize configure.json/.pri
Move the different parts of configure.json/.pri into the libraries where
they belong.

Gui is not yet fully modularized, and contains many things related to
the different QPA plugins.

Done-with: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Change-Id: I6659bb29354ed1f36b95b8c69e7fce58f642053f
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-09-15 08:23:53 +00: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
Jake Petroules
57378a108c Add support for Apple watchOS
Change-Id: I3f9e00569458a463af2eaa5a3a16a6afd1e9c1ea
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
2016-08-19 21:05:55 +00:00
Lars Knoll
60985aa42b Use qtConfig throughout in qtbase
Use the new qtConfig macro in all pro/pri files.

This required adding some feature entries, and adding
{private,public}Feature to every referenced already existing entry.

Change-Id: I164214dad1154df6ad84e86d99ed14994ef97cf4
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-08-19 04:28:05 +00:00
Jake Petroules
e708d63e18 Don't build the complexpingpong example on UIKit platforms
This example uses QProcess which is not available on UIKit platforms.

Change-Id: I126d20369ccf307579a60956de7769e92e17548a
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-08-16 21:22:10 +00:00
Liang Qi
17198e03ab Merge remote-tracking branch 'origin/5.7' into dev
Conflicts:
	qmake/doc/src/qmake-manual.qdoc
	src/corelib/global/qglobal.cpp
	src/corelib/tools/qstring.cpp
	src/network/socket/qabstractsocket.cpp
	src/network/socket/qnativesocketengine_unix.cpp
	src/plugins/platforms/eglfs/api/qeglfsglobal.h

Change-Id: Id5dfdbd30fa996f9b4b66a0b030b7d3b8c0ef288
2016-08-16 07:58:32 +02: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
22e96c4d34 Merge remote-tracking branch 'origin/5.7' into dev
Change-Id: I36e6b890b65d12bf6931757540bcc9c553b5eb8f
2016-08-09 17:59:51 +02: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
Alex Trotsenko
5a133a404e Polish SCTP examples
- Introduce a common header file for client and server;
- Update license headers;
- Fix minor issues.

Change-Id: I3fc42fd5ba32141c702fc6679a27bf0b6a16fd26
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2016-08-03 11:46:21 +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
Edward Welbourne
f6fc34294f Merge remote-tracking branch 'origin/5.7' into dev
Conflicts:
	configure
5.7 now supports clang on android; but dev re-worked configure

	src/gui/kernel/qevent.h
One side renamed a parameter of a constructor; the other added an
alternate constructor on the next line.  Applied the rename to both
for consistency.

	tests/auto/tools/moc/tst_moc.cpp
Each side added a new test at the end.

	.qmake.conf
Ignored 5.7's change to MODULE_VERSION.

	configure.json
No conflict noticed by git; but changes in 5.7 were needed for the
re-worked configure to accommodate 5.7's stricter handling of C++11.

Change-Id: I9cda53836a32d7bf83828212c7ea00b1de3e09d2
2016-08-01 18:20:00 +02: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
Alex Trotsenko
75a9bd2a4f Introduce SCTP sockets support
Add protocol-specific code and the QSctpServer, QSctpSocket classes.

Change-Id: Ie9a1d87bd1fda866a2405043d1c15c12ded5a96e
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2016-07-27 06:37:24 +00:00