Commit Graph

750 Commits

Author SHA1 Message Date
Liang Qi
f34e73a16a Merge remote-tracking branch 'origin/5.7' into dev
Conflicts:
	src/corelib/kernel/qobject.cpp
	src/gui/painting/qpaintengine_raster.cpp

Change-Id: I74e1779832f43d033708dcfd6b666c7b4f0111fb
2016-04-11 09:12:36 +02:00
Shawn Rutledge
f931e5e72d add cross-platform tablet->mouse event synth; enable on Android
It's urgent to fix the issue that on Android, it became impossible
to interact with any widget or MouseArea which handles only mouse
events but not tablet events, using the stylus, because stylus events
are sent only as QTabletEvents.  Before 5.6 (change
01d78ba86a) they were sent as
touch events, and mouse events were synthesized from those.  Whereas
on other platforms, every QTabletEvent is followed by a synthesized
QMouseEvent.

This fix proceeds in the direction that event synthesis should be done
in cross-platform code so that platform plugins don't have to repeat it,
following the same pattern as for touch->mouse synthesis.  Just as
in that case, the application can disable it, and the platform plugin
can also report that it's unnecessary for Qt to do the synthesis
because the platform already does.

So QTBUG-51618 is fixed, but QTBUG-47007 requires us to remove the
tablet->mouse synthesis from all platform plugins, because the plugin
does not know whether the tablet event was accepted or not, so it does
not have enough information to decide whether to synthesize a mouse
event.  Synthesis has been unconditional until now, which contradicts
what the documentation says: the mouse event should be sent only if
the tablet event is NOT accepted.  We can now gradually make this
promise come true.

[ChangeLog][QtCore][Tablet support] A synthetic mouse event will
no longer be sent after every QTabletEvent, only after those which are
not accepted (as documented).

Task-number: QTBUG-47007
Task-number: QTBUG-51618
Change-Id: I99404e0c2b39bbca4377be6fd48e0c6b20338466
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
2016-04-08 19:33:28 +00:00
Friedemann Kleint
115d4fc8cc QtWidgets: Remove Windows CE.
Remove  Windows CE-specific files, #ifdef sections for Q_OS_WINCE and wince
.pro file clauses in library, examples and tests.

Task-number: QTBUG-51673
Change-Id: I102745aaca9d9737f2108fe7618111743d5ae980
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2016-04-07 10:24:45 +00:00
Liang Qi
ee0951d69b Merge remote-tracking branch 'origin/5.6' into 5.7
Conflicts:
	src/network/access/qftp.cpp
	src/widgets/itemviews/qheaderview.cpp
	src/widgets/itemviews/qlistview.cpp
	tests/auto/network/access/qftp/tst_qftp.cpp

Change-Id: I9f928f25d45d8944dd60bb583f649fc1615bc5d9
2016-04-07 10:47:20 +02:00
Friedemann Kleint
2a282551ac Remove empty first lines of files.
They might upset licensing related tools.

Change-Id: I858d21fc418ba16959c88847b559b11bea29ed6b
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-04-06 18:26:26 +00:00
Friedemann Kleint
dd9cf15005 QtXml/htmlnfo example: Remove Nokia-related HTML demo file.
Change-Id: I0b0ebcf20747a607ad9eed130d7b4fe810a1f2e1
Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
2016-04-06 18:25:29 +00:00
Oswald Buddenhagen
a057d42305 fix namespaced build
Change-Id: I4df9e4874da2e86b61db7e5984503c0856492d87
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2016-04-05 14:08:30 +00:00
Liang Qi
f285687584 Merge remote-tracking branch 'origin/5.7' into dev
Conflicts:
	examples/corelib/ipc/ipc.pro
	src/plugins/platforms/xcb/qxcbbackingstore.cpp
	tests/auto/corelib/tools/qcommandlineparser/tst_qcommandlineparser.cpp

Change-Id: Ia006e10ff1732fe78f90138c41f05b59b49486cf
2016-04-05 14:22:45 +02:00
Friedemann Kleint
7fc2864dc5 QtCore: Remove Windows CE.
Remove QSysInfo::WV_CE_5/6 enumeration values, #ifdef sections for Q_OS_WINCE
and wince .pro file clauses in library, examples and tests.

Task-number: QTBUG-51673
Change-Id: Ib63463445f3a26e04d018b193e4655030002f5f9
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
2016-03-30 11:22:47 +00:00
Friedemann Kleint
99490d3e8b mimetypebrowser example: Fix building of the hierarchy.
Replace QMimeType::inherits() by a check using the list of parents
since only the direct children are needed to build the tree.

Change-Id: I041f21c4b94c8a250f7402a6f550f987c64f8fe8
Reviewed-by: David Faure <david.faure@kdab.com>
2016-03-30 09:40:35 +00:00
Friedemann Kleint
04aa760711 QtNetwork: Remove Windows CE.
Remove #ifdef sections for Q_OS_WINCE and wince .pro file clauses in library,
examples and tests.

Task-number: QTBUG-51673
Change-Id: I3706336395620522ceda414d7437295d9ec64f16
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
2016-03-29 20:28:18 +00:00
Jani Heikkinen
cd46a2daf5 Unify license header usage.
Update files using old header.LGPL3 to header.LGPL
Update files using old FDL template to use new one
Update files using old BSD template to use new one

Change-Id: I36a78272516f9953d02956522f285b40adfc8915
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
2016-03-29 10:20:03 +00:00
Friedemann Kleint
9a96eb00c4 Add mime type browser example.
Add an example showing the types in QMimeDatabase in
a QTreeView with detailed information on click.
The example has menu options to detect a file type
and search by name.

Change-Id: If6f1a6661edd100a54460a49562a8a8667245ddb
Reviewed-by: David Faure <david.faure@kdab.com>
2016-03-24 13:03:02 +00:00
Rolland Dudemaine
531e449f93 Disable some examples for INTEGRITY.
They depend on unsupported features.

Change-Id: Ia18c1560fc5cc321efb05cd3165e3e1c4b0e758f
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-03-24 13:02:53 +00:00
Liang Qi
6cb8121a44 Merge remote-tracking branch 'origin/5.6' into 5.7
Conflicts:
	src/widgets/styles/qgtkstyle_p.cpp
	tests/auto/corelib/io/qtextstream/test/test.pro
	tests/auto/corelib/plugin/plugin.pro

Change-Id: I512bc1b36acf3933ed2b96c00f476ee3819c1f4b
2016-03-21 09:02:57 +01:00
Frederik Gladhorn
6380cc710e Merge remote-tracking branch 'origin/5.6.0' into 5.6
Change-Id: Iac8ff05cd76cbacf859138a73e8e2ed0a979c75a
2016-03-17 16:02:45 +01:00
Edward Welbourne
6a2892bdef Skip spurious .toLower() on returns of QUrl::scheme()
QUrl::setScheme() parses and canonicalises the scheme, so that
scheme() always returns a lower-case string anyway; no need to
.toLower() it.

Change-Id: Ied00814b63f159386a42552dcf06346ee56f9f97
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
2016-03-10 15:00:59 +00:00
Oswald Buddenhagen
f93032848e Merge remote-tracking branch 'origin/5.6.0' into 5.7
Change-Id: Idcda6d52266f557ce4a819b6669f6797473a48a2
2016-03-07 17:08:56 +01:00
Andreas Hartmetz
e7bf0edfd4 Add option to disable "session management by closing windows".
That feature is a poor man's session management for applications
that do not implement any specific session management features.
It badly interferes with proper session management support, so
applications must be able to disable it.

This enables fixing applications with
QGuiApplication::quitOnLastWindowClosed() true - the default -
dying too early, before they are enumerated for the list of
applications to restart on session restore, thus preventing them
from being restored. See
https://bugs.kde.org/show_bug.cgi?id=354724

[ChangeLog][QtGui] Qt asking to close windows on session exit as
a fallback session management mechanism has been made optional.
Disabling it fixes session management for applications that
implement full session management. See
QGuiApplication::isFallbackSessionManagementEnabled().

Task-number: QTBUG-49667
Change-Id: Ib22e58c9c64351dea8b7e2a74db91d26dd7ab7aa
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: David Faure <david.faure@kdab.com>
2016-02-15 16:10:20 +00:00
Liang Qi
d456f87ece Merge remote-tracking branch 'origin/5.6' into dev
Conflicts:
	src/corelib/io/qfilesystemwatcher_win.cpp
	src/corelib/plugin/plugin.pri
	src/plugins/platforms/cocoa/qcocoaaccessibility.mm
	tests/auto/corelib/tools/qlocale/tst_qlocale.cpp

Change-Id: Id6824631252609a75eff8b68792e4d10095c8fc1
2016-02-11 08:25:04 +01:00
Friedemann Kleint
ab3e2f66e9 Standarddialogs example: Remove horizontal spacer from fullscreen layout.
It does not work as expected since the QLineEdits do not expand.
Amends b880b7e1ac.

Change-Id: I0b3b3822cca7fc6442a7155eecd46bd3d134d069
Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
2016-02-09 15:24:54 +00:00
Nico Vertriest
3b0c75316c Doc: Replaced Trolltech logo with Qt logo
Task-number: QTBUG-37505
Change-Id: If59039b2f7e60ffea3e8c7803d38e528acf35383
Reviewed-by: Martin Smith <martin.smith@theqtcompany.com>
2016-02-03 12:37:37 +00:00
Liang Qi
d3e6e732c7 Merge remote-tracking branch 'origin/5.6' into dev
Conflicts:
	config.tests/unix/compile.test
	src/plugins/platforms/cocoa/qcocoahelpers.mm
	src/tools/qlalr/cppgenerator.cpp

Change-Id: I0103ca076a9aca7118b2fd99f0fdaf81055998c3
2016-02-02 15:57:44 +01:00
Shawn Rutledge
e6de387ea0 Polish the Tablet example
- Introduce Qt 5 signal-slot connection syntax.
- Merge MainWindow::createMenus()/createActions()
  into MainWindow::createMenus(), removing the need
  to store the actions as member variables.
  Use QMenu::addAction() for brevity.
- For actions in QActionGroups, carry the Valuator enum
  in QAction::data so that the slot to handle the selection
  does not need to compare the QAction pointer itself.
- Use a non-modal QColorDialog, so that the user
  can change colors more easily while drawing.
- Choose saner shortcut keys: control-Q should not
  override the default usage for quitting the application,
  and using shortcuts for About dialogs is anyway dubious.
- Improve the example documentation.

Change-Id: I57aaf5f5b885c13a953482dbcc41275dd3d6bff4
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Topi Reiniö <topi.reinio@theqtcompany.com>
2016-01-28 19:17:08 +00:00
Liang Qi
a15c3d086d Merge remote-tracking branch 'origin/5.6' into dev
Conflicts:
	src/android/jar/src/org/qtproject/qt5/android/QtActivityDelegate.java
	src/dbus/qdbusconnection_p.h
	src/dbus/qdbusintegrator.cpp
	src/dbus/qdbusintegrator_p.h
	tests/auto/corelib/io/qdir/qdir.pro
	tests/auto/corelib/io/qiodevice/tst_qiodevice.cpp

Change-Id: I3d3fd07aed015c74b1f545f1327aa73d5f365fcc
2016-01-26 16:27:28 +01:00
Liang Qi
0a1af55a9b Merge "Merge remote-tracking branch 'origin/5.6' into dev" into refs/staging/dev 2016-01-26 11:27:37 +00:00
Nico Vertriest
397061a6a9 Doc: Added brief statement to XML examples
Task-number: QTBUG-50261
Change-Id: I0ba4bd630746612d0f1f1632e87c6fdd6aef160f
Reviewed-by: Topi Reiniö <topi.reinio@theqtcompany.com>
2016-01-26 09:39:33 +00:00
Nico Vertriest
149c659dc1 Doc: removed double occurrence of systray.qdoc
Task-number: QTBUG-50287
Change-Id: Iaf8602fc338dadcc0998f33d41ad9fbc827589e2
Reviewed-by: Topi Reiniö <topi.reinio@theqtcompany.com>
2016-01-26 09:39:21 +00:00
Nico Vertriest
d9bbf610a4 Doc: Added brief statement for examples overview page
Task-number: QTBUG-50261
Change-Id: Ia0daf0c5c7fc0b2e54904f0b7fe6ebe1220e5c4d
Reviewed-by: Martin Smith <martin.smith@theqtcompany.com>
2016-01-26 09:32:49 +00:00
Jani Heikkinen
ad38ece3c8 Updated license headers
From Qt 5.7 -> examples are lisenced under BSD license, see
http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/

Updated license headers to use new BSD header instead of LGPL21 one
(in those files which will be under BSD)

Change-Id: I3ad61caaf07802eb9da7d29eca3fe49d8a51b6a8
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
2016-01-21 18:55:32 +00:00
Liang Qi
158a3a4159 Merge remote-tracking branch 'origin/5.6' into dev
Conflicts:
	src/corelib/io/qiodevice_p.h
	src/corelib/kernel/qvariant_p.h
	src/corelib/tools/qsimd.cpp
	src/gui/kernel/qguiapplication.cpp
	tests/auto/network/socket/qtcpsocket/tst_qtcpsocket.cpp

Change-Id: I742a093cbb231b282b43e463ec67173e0d29f57a
2016-01-21 08:17:21 +01:00
Liang Qi
8f569c740a Merge remote-tracking branch 'origin/5.5' into 5.6
Conflicts:
	config.tests/common/atomic64/atomic64.cpp
	configure
	src/3rdparty/forkfd/forkfd.c
	src/corelib/io/forkfd_qt.cpp
	src/widgets/kernel/qwidgetwindow.cpp
	tests/auto/corelib/statemachine/qstatemachine/tst_qstatemachine.cpp
	tests/auto/network/socket/qtcpsocket/tst_qtcpsocket.cpp
	tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp
	tools/configure/configureapp.cpp

Change-Id: Ic6168d82e51a0ef1862c3a63bee6722e8f138414
2016-01-19 10:03:01 +01:00
Alex Trotsenko
184d66caa5 QDataStream: handle incomplete reads from QIODevice
This adds a way to resume reading from a stream after a ReadPastEnd error.
This is done by introducing a stream read transaction mechanism that keeps
read data in an internal buffer and rolls it back on failure.

[ChangeLog][QtCore] Added QDataStream startTransaction(),
commitTransaction(), rollbackTransaction(), abortTransaction()
functions to support read transactions.

Task-number: QTBUG-44418
Change-Id: Ibf946e1939a5573c4182fea7e26608947218c2d9
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-01-13 16:31:33 +00:00
Liang Qi
beb65dcd79 Merge remote-tracking branch 'origin/5.6' into dev
Conflicts:
	src/gui/painting/painting.pri
	src/plugins/platforms/xcb/qxcbconnection.cpp
	tests/auto/corelib/thread/qthreadstorage/qthreadstorage.pro
	tests/auto/corelib/tools/qlocale/test/test.pro
	tests/auto/gui/kernel/qwindow/tst_qwindow.cpp
	tools/configure/environment.cpp

Change-Id: I9c40f458b89b2c206de2d2c24e90b5f679c93495
2015-12-18 08:37:31 +01:00
Andy Shaw
faf4865b80 Use unique shortcuts for the different actions
Change-Id: Ibc143ffac83dfb30facc9e93651e5f18550ab612
Reviewed-by: Topi Reiniö <topi.reinio@theqtcompany.com>
2015-12-11 09:40:55 +00:00
Friedemann Kleint
b880b7e1ac Standarddialogs example: Adapt layout for fullscreen platforms.
Insert a group box depending on style hints.

Change-Id: I1b49dc31d5bd32c92d88f95be0683d5223329c11
Reviewed-by: Topi Reiniö <topi.reinio@theqtcompany.com>
Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
2015-12-09 10:22:55 +00:00
Friedemann Kleint
fcedf8998e fortuneserver/fortuneclient: Fix layout for WinRT.
Use the new API QStyleHints::showIsMaximized().

Change-Id: I1342b3c29ef4ccfcf635a32d403f9aa7ce0cb4e4
Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
2015-12-09 10:19:48 +00:00
Simon Hausmann
3ec31ef9c5 Merge remote-tracking branch 'origin/5.6' into dev
Change-Id: I2532c7f7db5e6cc3ef09753d886279816dd662b2
2015-12-08 07:09:47 +01:00
Friedemann Kleint
de7d2eb2ad Polish the fortune server/client examples.
- Remove Qt::WindowContextHelpButtonHint.
- Make the server label interactive (enable copy).
- Introduce new connection syntax.
- Remove unneeded member variables.
- Use constructor initialization where appropriate.
- Adapt the layout to fullscreen platforms by wrapping it
  into a QGroupBox.

Change-Id: I6e397ad082f22ba1e99fc5a17440b2be1f9584f6
Reviewed-by: Topi Reiniö <topi.reinio@theqtcompany.com>
2015-12-03 15:03:26 +00:00
Liang Qi
72f5867f14 Merge remote-tracking branch 'origin/5.6' into dev
Conflicts:
	src/corelib/kernel/qcoreapplication.cpp
	src/corelib/kernel/qeventdispatcher_blackberry.cpp
	src/network/bearer/qnetworkconfiguration.cpp
	src/plugins/bearer/blackberry/qbbengine.cpp
	src/plugins/platforms/android/androidjnimain.cpp
	src/plugins/platforms/android/qandroidplatformtheme.cpp
	src/plugins/platforms/qnx/qqnxbpseventfilter.cpp
	src/plugins/platforms/qnx/qqnxfiledialoghelper_bb10.cpp
	src/plugins/platforms/qnx/qqnxinputcontext_imf.cpp
	src/plugins/platforms/qnx/qqnxintegration.cpp
	src/plugins/platforms/qnx/qqnxnavigatorbps.cpp
	src/plugins/platforms/qnx/qqnxvirtualkeyboardbps.cpp
	src/plugins/platforms/qnx/qqnxwindow.cpp
	src/widgets/kernel/qwidgetwindow.cpp
	src/widgets/styles/qwindowsvistastyle.cpp
	src/widgets/styles/qwindowsxpstyle.cpp
	src/widgets/widgets/qtoolbararealayout.cpp
	tests/auto/corelib/global/qflags/qflags.pro
	tests/auto/corelib/itemmodels/qitemmodel/modelstotest.cpp
	tests/auto/corelib/tools/qversionnumber/qversionnumber.pro
	tests/auto/widgets/dialogs/qfilesystemmodel/tst_qfilesystemmodel.cpp

Change-Id: I37be88c6c185bb85404823353e027a0a6acdbce4
2015-12-02 23:33:06 +01:00
Topi Reinio
87d6b0514b Doc: Fortune Server Example: fix typo in function name
Change-Id: Ib0a5030cc2f88cf90ba7d25c75871c439486abe3
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2015-11-30 12:24:17 +00:00
Andrey Bienkowski
a7db6e3467 Fixed memory leaks in the "40000 chips" example.
Two QObjects had no parent. This caused memory leaks on app close.
Confirmed with the valgrind memory analyzer tool from Qt Creator.

Change-Id: I9294099ca819be1a9c5b74b3cec5bf197be06433
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2015-11-19 11:30:50 +00:00
Liang Qi
c7934f2489 Merge remote-tracking branch 'origin/5.6' into dev
Conflicts:
	src/corelib/io/qprocess.cpp
	src/corelib/io/qprocess_unix.cpp
	src/network/kernel/qnetworkinterface_winrt.cpp
	tools/configure/configureapp.cpp

Change-Id: I47df00a01597d2e63b334b492b3b4221b29f58ea
2015-11-18 09:01:51 +01:00
Nico Vertriest
037b05ac76 Doc: corrected error in doc static plugins
Task-number: QTBUG-43160
Change-Id: I94f92318cec095391050b2af90980010bd1066b9
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
Reviewed-by: Martin Smith <martin.smith@digia.com>
2015-11-13 20:33:44 +00:00
Friedemann Kleint
d482a92858 Polish the HTTP example.
- Remove unneeded member variables.
- Use new connection syntax.
- Streamline code.
- Add a QCheckBox for launching the file after download
  and make the default file name and download directory configureable.
- Make status messages more verbose.
- Set Password echo mode on authentication dialog.
- Extract the progress dialog to a separate class
  that is directly connected to the QNetworkReply, which
  is created on demand. Set set minimum  and duration on it.
  This fixes a crash that currently occurs when clicking "Abort"
  on the SSL error dialog and "Cancel" on the progress dialog that is
  then re-shown due to its internal force timer/minimum duration handling.
- Resize according to screen size.

Task-number: QTBUG-48332
Change-Id: Ia2611e63fe96d6f49e4cdd06049a206ddb2c2864
Reviewed-by: David Faure <david.faure@kdab.com>
2015-11-05 13:54:13 +00:00
Liang Qi
4159ee8405 Merge remote-tracking branch 'origin/5.6' into dev
Conflicts:
	config.tests/unix/ptrsize.test
	configure
	src/corelib/global/qnamespace.h
	src/network/socket/qabstractsocket.cpp
	tests/auto/other/networkselftest/networkselftest.pro

Change-Id: Ic78abb4a34f9068567cea876861d4220f5a07672
2015-11-04 20:18:14 +01:00
Alejandro Exojo
115f303352 Fix the closeEvent of the systray example on OS X
The implementation of the close event handler requires handling the two
close events that are received on OS X when the user quits through the
application menu bar or the Command+Q shortcut. The first is an
spontaneous event, and the second a non-spontaneous one with the window
already closed.

Change-Id: I24e3d3f0de4d631bd2d5616c85ce747f085691e0
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
2015-11-03 09:01:36 +00:00
Marc Mutz
1c9f53c4e5 examples: remove use of obsolete QStyleOption*V<N> typedefs
These are obsolete since Qt 5.0.

Change-Id: I297477eff129558553f52a04bb7828d95db27969
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
2015-11-02 18:43:26 +00:00
Ulf Hermann
6c72a4a95b Fix building with QT_NO_BEARERMANAGEMENT
Some of the examples make no sense without bearer management and
QNetworkSession is not defined if QT_NO_BEARERMANAGEMENT, so
tst_qnetworkreply.cpp has to be adjusted.

Change-Id: Ic2f73746cba74f670ae5b5e99b0be1461ff6d182
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
2015-10-28 21:25:36 +00:00
Liang Qi
790aef362f Merge remote-tracking branch 'origin/5.6' into dev
Conflicts:
	.qmake.conf
	configure
	src/corelib/global/qglobal.h
	src/tools/qdoc/node.cpp
	src/tools/qdoc/qdocdatabase.cpp
	tests/auto/corelib/io/qsettings/tst_qsettings.cpp
	tools/configure/configureapp.cpp

Change-Id: I66028ae5e441a06b73ee85ba72a03a3af3e8593f
2015-10-23 14:45:03 +02:00