Commit Graph

727 Commits

Author SHA1 Message Date
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
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
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
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
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
Joni Poikelin
684ae5f7fe Fix compiling examples with -no-sm
There is access to session manager functions which are not present when
building with -no-sm.

Change-Id: I1c92b4a70f7adb56816877930fb9f55b04ff8940
Reviewed-by: Andy Shaw <andy.shaw@theqtcompany.com>
2016-04-07 08:39:37 +00: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
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
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
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
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
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
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
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
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
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
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
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
Rafael Roquetto
c9195ab36d TextEdit example: fix build when clipboard is disabled.
Change-Id: Ib25563e3dc299dc2d23bed8b3071af1ba81150e7
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2015-10-19 14:56:45 +00:00
Friedemann Kleint
6ea67f52da Image viewer example: Fix broken error message formatting.
Task-number: QTBUG-48851
Change-Id: Ie86bcc498c9dc1f9754192a256a28fa467f6dbc9
Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
2015-10-19 14:50:32 +00:00
Alexander Volkov
59b860450f Polish the complexpingpong example
- Use QDBusServiceWatcher to detect that pong service became available
  (QDBusConnectionInterface::serviceOwnerChanged() signal is deprecated).
- Use new connection syntax.

Task-number: QTBUG-28082
Change-Id: I7b93b961ee6d45aaeefab77fa1d1943e38b4a4c0
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2015-10-19 10:29:50 +00:00
Kai Koehne
c890fa4787 Remove webkit-guide from examples
Qt5WebKit is now deprecated and removed from the packages.

Change-Id: I176344cb2a6b43ffc44cc0e7ef1abb4e765a35b4
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
2015-10-19 08:44:45 +00:00
Liang Qi
b7ac036b72 Merge remote-tracking branch 'origin/5.5' into 5.6
Conflicts:
	src/network/socket/qabstractsocket.cpp
	src/plugins/platforms/winrt/qwinrtscreen.cpp
	src/sql/drivers/mysql/qsql_mysql.cpp

Change-Id: Ifb73623d09f53340ee5e10283f1f86b580998902
2015-10-13 23:03:51 +02:00
Friedemann Kleint
f9bf737d74 Examples/Doc snippets: Fix single-character string literals.
Use character literals where applicable.

Change-Id: I79fa5018f05735201ae35ee94ba0d356fcad1056
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
2015-10-13 16:37:07 +00:00
Friedemann Kleint
c8cd9f1b9a Polish DnD Examples.
- Remove class DragLabel in draggabletext and add a static creation
  function instead since it only has a constructor setting some
  properties.
- Use QRegularExpression instead of QRegExp
- Use new connection syntax.
- Ensure compilation with
  DEFINES += QT_NO_CAST_TO_ASCII QT_NO_CAST_FROM_ASCII
  demonstrating use of QLatin1String vs QStringLiteral.
- Streamline code.

Change-Id: I2e2ddeb40837dba379990836c77fb72ad7263e2d
Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
2015-10-09 15:59:21 +00:00
Samuel Gaist
decc546368 Doc: remove unused code from OpenGL Window example
Change-Id: Ifb2c7206dee55102eba91b4c30543f3ac4838259
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
2015-10-07 10:56:04 +00:00
Liang Qi
925d6eff3e Merge "Merge remote-tracking branch 'origin/5.5' into 5.6" into refs/staging/5.6 2015-10-02 17:24:58 +00:00
Liang Qi
d0eaa737e1 Merge remote-tracking branch 'origin/5.5' into 5.6
Conflicts:
	qmake/doc/src/qmake-manual.qdoc
	src/corelib/tools/qstring.h
	src/gui/image/qimagereader.cpp
	src/network/access/qnetworkaccessmanager.cpp
	src/tools/qdoc/doc/examples/examples.qdoc
	src/widgets/accessible/qaccessiblewidgetfactory_p.h
	src/widgets/doc/qtwidgets.qdocconf

Change-Id: I8fae62283aebefe24e5ca4b4abd97386560c0fcb
2015-10-02 16:59:55 +02:00
Topi Reinio
fbf3daef38 Doc: Update obsolete URLs to external documentation
Change-Id: I199de83971701c14e903e712fcdcd29aaff95c6d
Task-number: QTBUG-48420
Reviewed-by: Venugopal Shivashankar <venugopal.shivashankar@digia.com>
Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
2015-10-02 10:14:47 +00:00
Joni Poikelin
4b785eeaa9 Clean up debug code and unused functions from imagegestures example
Change-Id: I0dbbb5c6f3227e8cfe3e0f6eb27b2bf16b5d222b
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2015-10-01 07:09:53 +00:00
Laszlo Agocs
b46ffbca0c Fix up QOpenGLWidget transparency support
The glColorMask call was troublesome. In addition, the Qt::WA_TranslucentBackground
was misinterpreted and recommended misleadingly in the documentation. The hellogl2
example's --transparent argument was disfunctional in practice.

Replace glColorMask with glBlendFuncSeparate. The hellogl2 example and the docs are
now corrected wrt enabling semi-transparency in a QOpenGLWidget that is not a top-level
(which is the most common case).

Task-number: QTBUG-47276
Change-Id: I6f40e732d455f5efcf158649ac9a52ff9f240e85
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
2015-09-24 12:51:37 +00:00
Friedemann Kleint
47e4ae86a8 Polish the settings editor example.
- Set QtProject as organization.
- Remove unneeded member variables.
- Use member initialization in the constructor.
- Use new connection syntax in createActions()
  to assemble the menu there, removing the createMenus()
  function.
- Introduce a QSharedPointer to ensure settings are deleted.
  Previously, the settings were parented on the tree widget,
  which is a hack of sorts.
- Fix OS X macros.

Change-Id: Ibbc6bfb03eb5c7eda077b1a3aa3f1707667f7f13
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-09-23 13:28:02 +00:00
Dmitry Shachnev
bb6d57479c Remove confusing license information from torrent.qdoc
The torrent example does not have its own code to work with SHA-1,
it uses QCryptographicHash instead.

Change-Id: Ided0e3dcded1096feb3366682c97530c4cec0a14
Reviewed-by: Lisandro Damián Nicanor Pérez Meyer <perezmeyer@gmail.com>
Reviewed-by: Sami Makkonen <sami.makkonen@digia.com>
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
2015-09-21 20:51:39 +00:00
Friedemann Kleint
8132cb655a Polish the Icons example.
- Remove unneeded member variables.
- Use new connection syntax in createActions()
  to assemble the menu there, removing the createMenus()
  function.
- Use a QButtonGroup for the sizes with the style metrics as id.
- Streamline code, rename variables for clarity.
- Introduce static functions returning the list of states/modes and
  their names in display order to IconPreviewArea, removing the
  duplicates.
- Split actions to open sample icons provided from source directory
  or standard pictures location to make sample icons more prominently
  visible.
- Check and display @2x images and add tooltips showing device pixel
  ratio and actual size.
- HighDPI: Add groupbox displaying screen name and device pixel
  ratio, connect to screen changed signal and update icons panel
  accordingly. Add check box for toggling Qt::AA_UseHighDpiPixmaps.
- Adjust documentation

Task-number: QTBUG-18680
Task-number: QTBUG-46615
Change-Id: Ice96e9898f168ef2a30e9f46cb260ed57ae015f0
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
2015-09-14 19:20:06 +00:00
Friedemann Kleint
8ccf523018 Re-add systray.qdoc and images.
The system tray example initially was in QtSvg after the Qt 5
modularization split since it depended on it. In the meantime, it
has been moved back to qtbase.

Fixes qdoc warning:

qtbase/src/widgets/util/qsystemtrayicon.cpp:56: warning: Can't link to 'System Tray Icon Example'

Change-Id: Ie3c13baf4ac91ecf0c814885f71ac44dc05b427c
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@theqtcompany.com>
2015-09-11 07:47:31 +00:00
Nico Vertriest
69e1b1de93 Doc: System Tray Icon example
Moved from qtsvg to qtbase

Task-number: QTBUG-47201
Change-Id: Iab185ea2e270893c0937d1ff87fdb544d226d603
Reviewed-by: Martin Smith <martin.smith@digia.com>
2015-09-04 11:01:48 +00:00