Commit Graph

72 Commits

Author SHA1 Message Date
Paul Wicking
f415f50619 Doc: Add menu bar to Books example
Add menu bar with Help->About that contains a short description of the
example application.
Remove redundant title string between menu and application content.

Task-number: QTBUG-68652
Change-Id: I31fb386ab9c01eff86b8ed3ef274ba8cfdb0148b
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2018-06-21 14:23:27 +00:00
Paul Wicking
dbad7bd234 Doc: Sql example Books lock rating column width
Lock the width of the rating column to prohibit the contents to escape
the bounds of the column upon resize.

Task-number: QTBUG-68652
Change-Id: I5c744833b19a8e5bcf88ef1b9ab657ac81f5aa50
Reviewed-by: Nico Vertriest <nico.vertriest@qt.io>
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2018-06-08 13:03:10 +00:00
Paul Wicking
afdb675ada Doc: Clean up SQL Example: Books - whitespace edition
Remove whitespace for consistency.

Task-number: QTBUG-68652
Change-Id: I1ca1f449db2352cb96c88535936f2c44392693cf
Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
2018-06-06 09:47:21 +00:00
Paul Wicking
fcbfa534fa Doc: Clean up SQL example: Books (part 2)
Improve readability, enforce consistent code formatting.

Task-number: QTBUG-68652
Change-Id: I7bbe0b2baa6273e0133df84d7c3cc2aa6a0b6ff2
Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
2018-06-06 09:47:11 +00:00
Paul Wicking
ce7cbcc3b6 Doc: Clean up and modernize SQL example: Books
* Replace Qt4-style connects.
* Reformat code to adhere to 80 column width.
* Touch comments to make location and style consistent.
* Rename a label in the UI form.

Task-number: QTBUG-68652
Change-Id: Icc592f7b5a013d1806bc36c45057b35472b6efbb
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2018-06-06 09:46:49 +00:00
Paul Wicking
0e666d1875 Doc: Update image, icon and screenshot for SQL example application
Replace image and icon in the SQL Master Detail example application,
as well as the screenshot of the application on the landing page.

Task-number: QTBUG-60633
Change-Id: Ic739908b569ea7f974b9dac48f673e14f6557550
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2018-05-22 12:06:22 +00:00
Rainer Keller
f13b0b2cf2 qtlite: Skip building examples when configured with no-feature-itemviews
Compiling the default examples should be possible without compile errors.

Task-number: QTBUG-53141
Change-Id: I73d8787241291ae6230861a89b38e91d900fede0
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2018-01-12 07:58:20 +00:00
Liang Qi
01bc69f99f Merge remote-tracking branch 'origin/5.9' into 5.10
Conflicts:
	src/plugins/styles/mac/qmacstyle_mac.mm
	src/widgets/util/qcompleter.cpp
	src/widgets/widgets/qmainwindowlayout.cpp
	src/widgets/widgets/qmdisubwindow.cpp

Change-Id: If0e96981af07ce36ac68f2e69211bc2120f93973
2017-09-20 11:58:32 +02:00
Michael Winkelmann
3d67793a9e Revamp SQL examples to C++11
Changed signals and slots to new syntax, used nullptr and replaced
foreach with new C++11 range based for loops.
Also fixed a few minor flaws.

Task-number: QTBUG-60633
Change-Id: Ice4030133971912f96752d9d84c638c70fd73e35
Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io>
Reviewed-by: André Hartmann <aha_1980@gmx.de>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2017-09-14 10:48:48 +00:00
Simon Hausmann
407302fb1b Merge remote-tracking branch 'origin/5.9' into dev
Conflicts:
	src/corelib/io/qwindowspipewriter.cpp
	src/widgets/styles/qcommonstyle.cpp

Change-Id: I0d33efdc4dc256e234abc490a18ccda72cd1d9e6
2017-07-19 09:47:29 +02:00
Friedemann Kleint
dc81a99dec Examples: Remove remains of wince
Task-number: QTBUG-52590
Task-number: QTBUG-60628
Task-number: QTBUG-60633
Task-number: QTBUG-60635
Task-number: QTBUG-60641
Task-number: QTBUG-60659
Change-Id: I9ffc3e25893d2281b19cc12b70e1a92fb2a8b708
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2017-07-14 17:30:51 +00:00
Edward Welbourne
3e0bf04d7b Typo-fix: s/looses/loses/g
When an archer lets go of the bow-string, she looses an arrow; when
the hounds are straining at their leashes and the handler lets go, he
looses the dogs.  It's archaic usage now; we'd normally say "lets
loose", "lets go" or "releases".  In any case what was meant here was
that something got lost; a widget loses focus or a network loses its
connection.

Change-Id: Ic1fbe9e1f76185bcb7caf034d6be97ebfeb2e270
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Martin Smith <martin.smith@qt.io>
2017-06-08 13:36:18 +00:00
Ulf Hermann
329385a5d5 Build examples and tests only if their requirements are met
If the respective modules aren't available we cannot build the tests
and examples. We drop the qtConfig(opengl) requirement for the opengl
examples as
a, we would need to make the QtGui configuration available for that to
   work, and
b, we should not add too much detail to the tests and examples build
   configurations. Checking each test and example for every feature it
   uses would be too much.

Task-number: QTBUG-57255
Change-Id: Ifb043c81ec9e5c487765297bd65704812cd281fc
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-03-22 15:55:55 +00:00
Samuel Gaist
9e933de7f2 Example: fix memory leak in relationnaltablemodel example
The example creates a view on the heap but doesn't delete it on
application end. This patch uses a QScopedPointer to fix that.

Change-Id: I3b0c8589999d243c193bd02e1470c03eabfabe40
Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com>
2017-03-07 23:11:20 +00:00
Oswald Buddenhagen
fe2f8146d4 prune vestiges of DEPLOYMENT_PLUGIN
the code was broken since 5.0, as it still hardcoded the version number
4 for the plugin basenames.
wince is not supported any more, so there is no point in trying to
restore the code to function.

at a later point, we'll make QTPLUGIN universal enough to cover both
static and dynamic deployment.

Change-Id: I0911ce4aff7a799dd471d6218e046f13dca6d49e
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2016-12-23 13:25:41 +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
hjk
40a54bf565 Examples: Replace 'Q_DECL_OVERRIDE' by 'override'
Examples should demonstrate best practice, and we can use the keyword
directly nowadays.

Change-Id: I1f122e5caceca17290757ffbaf3d660e7daa9ae4
Reviewed-by: Topi Reiniö <topi.reinio@theqtcompany.com>
2016-06-15 09:32:30 +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
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
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
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
Liang Qi
0aa2d318b1 Merge remote-tracking branch 'origin/5.5' into dev
Conflicts:
	src/corelib/global/qglobal.cpp
	src/corelib/global/qglobal.h
	src/corelib/global/qsysinfo.h
	src/corelib/global/qsystemdetection.h
	src/corelib/kernel/qobjectdefs.h
	src/plugins/plugins.pro
	tests/auto/widgets/itemviews/qlistview/qlistview.pro

Change-Id: Ib55aa79d707c4c1453fb9d697f6cf92211ed665c
2015-07-01 11:05:26 +02:00
Oswald Buddenhagen
d32f47b703 fix usage of wince scope
Fix style issues along the way.

Change-Id: Ic6a6de28e198eb0b14c198b802e78845703909b9
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2015-06-05 10:29:10 +00:00
Joerg Bornemann
3ce99adfa4 use INSTALLS instead of DEPLOYMENT
The DEPLOYMENT variable has been deprecated.

Change-Id: I1c7c07b36a2e665ae302e4f43f7f2dc752f3c1f4
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2015-06-03 11:26:46 +00:00
Jani Heikkinen
2b75c156b6 Updated BSD licensed file headers
Change-Id: I6441ff931dbd33b698d762e6f6784898f3f60fe7
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2015-02-15 07:41:17 +00:00
Jani Heikkinen
83a5694dc2 Update copyright headers
Qt copyrights are now in The Qt Company, so we could update the source
code headers accordingly. In the same go we should also fix the links to
point to qt.io.

Outdated header.LGPL removed (use header.LGPL21 instead)

Old header.LGPL3 renamed to header.LGPL3-COMM to match actual licensing
combination. New header.LGPL-COMM taken in the use file which were
using old header.LGPL3 (src/plugins/platforms/android/extract.cpp)

Added new header.LGPL3 containing Commercial + LGPLv3 + GPLv2 license
combination

Change-Id: I6f49b819a8a20cc4f88b794a8f6726d975e8ffbe
Reviewed-by: Matti Paaso <matti.paaso@theqtcompany.com>
2015-02-11 06:49:51 +00:00
Alessandro Portale
82e266a83b New Qt logo
This patch replaces the old Qt logo with the new, flatter one.

The PNGs were optimized via: optipng  -o7 -strip "all"

Task-number: QTBUG-41685
Change-Id: I51983a45144373bf7aee31a32990ecbb2582f488
Reviewed-by: Robert Loehning <robert.loehning@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2014-11-05 08:10:42 +01:00
Matti Paaso
974c210835 Update license headers and add new license files
- Renamed LICENSE.LGPL to LICENSE.LGPLv21
- Added LICENSE.LGPLv3
- Removed LICENSE.GPL

Change-Id: Iec3406e3eb3f133be549092015cefe33d259a3f2
Reviewed-by: Iikka Eklund <iikka.eklund@digia.com>
2014-09-24 12:26:19 +02:00
Olivier Goffart
3b0c2b7c1b Examples: Add Q_DECL_OVERRIDE to overridden functions
Q_DECL_OVERRIDE (which expands to 'override' for supported compiler)
helps to declare the intent (that it is an overridden function) and
force compilation error when there is no such virtual function in the
base class.
The examples should show the best practice of having it, as it may save
the programmer quite some time in case of change of API or typo in the
function name or arguments.

This change was done automatically with
clang-modernize -add-override -override-macros

And fixed MSVC compilation by removing inline for TorrentViewDelegate::paint

Change-Id: Ice66ae93fae571266f908703d5b8892b2c1ebb1a
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
2014-07-15 08:44:44 +02:00
Nico Vertriest
eaff48d362 Doc: Moved Books SQL Example documentation
Moved qdoc and image file to correct qdoc folder.
Added brief and ingroup statements to books.qdoc.

Task-number: QTBUG-34749

Change-Id: I5806ffd6f116cccf10238e3e1a9fc627ad0e93a9
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
2013-12-05 14:56:29 +01:00
Marc Mutz
831e314fc3 examples: fix if (!foo == 0)
Clang issues a warning for this.

Change-Id: I1b9741d0260d43f864e404c693b5a459c5038b67
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2013-09-14 23:40:31 +02:00
Topi Reinio
e724fd4710 Doc: Updated content for Drill Down example
QtWidgets/Drill Down example uses images and information about Nokia's
old office locations as content. This change updates the example to
use concepts related to Qt instead.

In addition,
    - Documentation, screenshot updated accordingly
    - Corrected aspect ratio when scaling image items in the scene
    - Added a gray background with a slight gradient
    - Removed Symbian-specific code remnant

Task-number: QTBUG-31075
Change-Id: Id8abfbf7f4033f74172477570f8f28390854101c
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
2013-05-22 13:48:53 +02:00
Axel Waggershauser
b11317a643 Whitespace cleanup: remove trailing whitespace
Remove all trailing whitespace from the following list of files:
*.cpp *.h *.conf *.qdoc *.pro *.pri *.mm *.rc *.pl *.qps *.xpm *.txt *README
excluding 3rdparty, test-data and auto generated code.

Note A): the only non 3rdparty c++-files that still
have trailing whitespace after this change are:
* src/corelib/codecs/cp949codetbl_p.h
* src/corelib/codecs/qjpunicode.cpp
* src/corelib/codecs/qbig5codec.cpp
* src/corelib/xml/qxmlstream_p.h
* src/tools/qdoc/qmlparser/qqmljsgrammar.cpp
* src/tools/uic/ui4.cpp
* tests/auto/other/qtokenautomaton/tokenizers/*
* tests/benchmarks/corelib/tools/qstring/data.cpp
* util/lexgen/tokenizer.cpp

Note B): in about 30 files some overlapping 'leading tab' and
'TAB character in non-leading whitespace' issues have been fixed
to make the sanity bot happy. Plus some general ws-fixes here
and there as asked for during review.

Change-Id: Ia713113c34d82442d6ce4d93d8b1cf545075d11d
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-03-16 20:22:50 +01:00
Sergio Ahumada
6239af6f0f Merge branch 'release' into stable
Change-Id: If3aa1b7ed75082eff6e9761ad82c83691135ed60
2013-01-31 18:55:53 +01:00
Oswald Buddenhagen
6c9e2219ac push feature conditionals down to subdirectories
the top-level project is not installed, and the meta-project which is
used instead does not know anything about conditionals.

Task-number: QTBUG-28414
Change-Id: Id5785ab5f92373ece74699e3c28220fc7f9689ac
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-01-31 15:51:14 +01:00
Sze Howe Koh
63569a68d2 Doc: Fix module name format
Follow the conventions at
http://qt-project.org/wiki/Spelling_Module_Names_in_Qt_Documentation

QtCore         -> Qt Core
QtDBus         -> Qt D-Bus
QtDesigner     -> Qt Designer
QtGui          -> Qt GUI
QtImageFormats -> Qt Image Formats
QtNetwork      -> Qt Network
QtPrintSupport -> Qt Print Support
QtScript       -> Qt Script
QtSql          -> Qt SQL
QtSvg          -> Qt SVG
QtTest         -> Qt Test
QtWebKit       -> Qt WebKit
QtWidgets      -> Qt Widgets
QtXml          -> Qt XML

QtConcurrent   -> Qt Concurrent (partial)
QtQuick        -> Qt Quick      (partial)

Also, distinguish between "module" and "library"

Change-Id: Icb8aa695ae60b0e45920b0c8fce4dc763a12b0cd
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
2013-01-25 17:27:44 +01:00
Sergio Ahumada
48e0c4df23 Update copyright year in Digia's license headers
Change-Id: Ic804938fc352291d011800d21e549c10acac66fb
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2013-01-18 09:07:35 +01:00
Venugopal Shivashankar
23b8b83c6f Doc: Grouped the SQL example pages under sql_examples group
Change-Id: I98b9cb2acafe82e89d9d170e0f66251180011caa
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
2012-11-30 23:57:01 +01:00
Oswald Buddenhagen
aeb036ed87 centralize and fixup example sources install targets
it's confusing for the users if the examples' project files contain code
to install their own sources. also, this constitutes an enormous code
duplication, and lots of mistakes. consequently, automate it.

more or less as a side effect, this also removes the entirely meaningless
target installs in subdirs projects.

Task-number: QTBUG-28184
Change-Id: I9fc1367a06db9e2c46aeb67d68729a4f67163ef9
Reviewed-by: hjk <qthjk@ovi.com>
2012-11-29 20:21:11 +01:00
Eike Ziller
4727bb5991 Add \brief to the examples.
That is used by qdoc to generate brief descriptions for the example
manifests.

Change-Id: I142a6d3259f90d0c9990033b3c36e139062ac343
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
Reviewed-by: hjk <qthjk@ovi.com>
2012-11-29 13:51:54 +01:00
Oswald Buddenhagen
4dedd61d2e delete .desktop files of examples
they were added without an explanation, and they can't be particularly
useful (because they contain hard-coded paths and refer to non-existing
icons).

Change-Id: I27e2c35375e28645b0c03449ddc7ac7017da5943
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
2012-11-28 16:21:57 +01:00
hjk
c527dd44be Examples: Install to $$[QT_INSTALL_EXAMPLES]/$submodule/$example
This makes the structure of the examples after an 'make install'
similar to the one in a 'developer build'.

Change-Id: I9120bd741fab332e64e30adc01cefe87e5633454
Reviewed-by: Martin Smith <martin.smith@digia.com>
2012-11-26 14:35:23 +01:00
Iikka Eklund
be15856f61 Change copyrights from Nokia to Digia
Change copyrights and license headers from Nokia to Digia

Change-Id: If1cc974286d29fd01ec6c19dd4719a67f4c3f00e
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
2012-09-22 19:20:11 +02:00
Frederik Gladhorn
d16c565ca6 Move opengl/wid/net example docs to proper folders.
Change-Id: I846439a9cf7ad965ed27a00f98dbc4ff97abe73b
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
Reviewed-by: Martin Smith <martin.smith@digia.com>
2012-09-21 19:59:06 +02:00
Sergio Ahumada
58e2b9c01b examples: Mark ctor's as explicit
Make C++ class constructors that can be used with only one
required argument 'explicit' to minimize wrong use of the class.

Change-Id: Ida9f9c2f0c8608c35b0137b2512a6747afd69515
Reviewed-by: Mitch Curtis <mitch.curtis@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-09-17 22:14:25 +02:00
Lars Knoll
328550ff00 Remove the obsolete scene argument for constructors of graphics items
The argument has been obsoleted and not documented since 2007. Get rid
of it now before Qt 5.0

Task-number: QTBUG-25089
Change-Id: I91a5508a5e1606f5b5c289501295c67be4abe6a0
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
2012-08-03 00:37:59 +02:00
Thiago Macieira
ce17ca7791 QGraphicsItem::setAcceptsHoverEvents is deprecated, replace it
It is replaced by setAcceptHoverEvents (note the lack of s), even
though the original name made more sense -- "set (if this item)
accepts hover events".

Change-Id: Ia6137c0e37b0a5932836f1d08fb8fa436f736eed
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-06-26 04:18:22 +02:00
Thiago Macieira
62d4840011 Replace the QGraphicsItem deprecated transforming functions
The scale(), rotate() and translate() functions are replaced with
QGraphicsItem::setTransform.

Change-Id: Icb81c71b1513c049e2fd607995ca3a868108ee30
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Andreas Aardal Hanssen <andrhans@cisco.com>
2012-06-26 04:18:14 +02:00
Thiago Macieira
5f5555f4d3 Fix encoding of non-ASCII strings
tr() only takes UTF-8 as input, so we must recode to UTF-8. But we can
use QLatin1String elsewhere.

Task-number: QTBUG-26086
Change-Id: I5932ddc96fb817dbe01106e5f6f2b10f58472d6b
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
2012-06-14 05:26:45 +02:00
Kent Hansen
fa7c9bbe1c Remove useless "QT += widgets"
These .pro files have TEMPLATE=subdirs, so there's no reason to be
adding libraries here.

Change-Id: I0fb0a44107710ee746d354106d0c46006958ee62
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-06-05 16:01:29 +02:00