Commit Graph

365 Commits

Author SHA1 Message Date
David Schulz
7fce924674 QtBase: Remove Meamo part and fix link in documentation
... for Application Icon Example

Change-Id: I2efa0b49a13889db8b706523d06bf317d35cad4f
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
2012-11-30 23:57:17 +01:00
Oliver Wolff
fa181fc824 Docs: Moved layout example's image do correct location
Change-Id: I85c6812d8d172c92fc4322d4300721e0f45f34e7
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
2012-11-30 23:57:09 +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
Paul Olav Tvete
e62198967c Fix links for threading examples
Change-Id: I498936e91e3bbf5658ea9f3f0eb33cff271a1d62
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
2012-11-30 23:56:53 +01:00
David Schulz
4cbe999921 QtBase: Docs: remove deprecated Q_EXPORT_PLUGIN2
... and add description for Q_PLUGIN_METADATA

Change-Id: Ie389787df53d3cdfa27ba8fb0e77f32df1597c4f
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
2012-11-30 23:56:49 +01:00
Gunnar Sletta
be7ebe2d57 Fix example documentation for OpenGL module and (widget) Tools.
Change-Id: Id9dc39752bcae915f618e1a5696115a5e6923251
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
2012-11-30 23:56:33 +01:00
Oliver Wolff
af385b3bc6 Docs: Moved mainwindow example's image do correct location
Change-Id: Idc22e18aa73fed293f629bdccc438567298f1274
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
2012-11-30 23:56:27 +01:00
Montel Laurent
c565ef6d72 Fix memory leak. PrinterDialog is not deleted when close it
Change-Id: I9f0a300cdaf9803bc2ad723946ac4d0f825cc28b
Reviewed-by: David Faure <david.faure@kdab.com>
2012-11-30 23:56:02 +01:00
Gunnar Sletta
06678fd0b5 Fix broken links in the QtWidgets examples.
I remove the widgets examples from the gui docs as they will
introduce broken duplicates (under doc/qtgui/...).

Change-Id: I54255ceaf4187477da3e82f6809be41fb98378a2
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
2012-11-30 19:40:47 +01:00
Gunnar Sletta
9ea48de5f0 Fix linking in painting, richtext and desktop examples
Change-Id: If08b2c3366610f74201ab6736f216f1a7d29b3c7
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
2012-11-30 19:40:19 +01:00
Paul Olav Tvete
d25bd0c37e Fix docs for Drag and Drop examples
Change-Id: Ic1622b64603f7634b697bd7d8412dcc9f1a8c3fa
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
2012-11-30 18:37:35 +01:00
David Schulz
c3b4f27603 QtBase: Fix painting example arthur background color
The arthur style set the background color to a bright color
and leave the foregroud color, for example for text, untouched.

If you are using a color theme with bright foregroundcolors on your
system this will result in unreadable text on push- and
radio-buttons.

The function drawControl is now reimplemented and the labels
with text are drawn with an appropriate color.

Change-Id: Ifd7f3a2b1c0305130255009c7733e0966830171a
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
2012-11-30 00:53:07 +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
Jing Bai
12dcab77a7 remove the dependency to QT_BUILD_TREE
To fix a build problem when plugandpaint is not built with qt src.
QT_BUILD_TREE is not set in this case. We use a relative path instead.

Task-number: QTBUG-28261
Change-Id: I2456614070f0849ba9400fbe4b76172189e3925f
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2012-11-29 20:20:14 +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
a2d2b44446 re-enable coloreditorfactory and stardelegate examples
Change-Id: I99b1a1967973ea28acd9e37c922f96e9dca8875d
Reviewed-by: hjk <qthjk@ovi.com>
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
2012-11-28 16:21:57 +01:00
Oswald Buddenhagen
297bc47ad4 dbus-chat => chat
to make the source and install locations consistent

Change-Id: Ifde8748eeab843b06bf79f941fa4789b5b68cca9
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
2012-11-28 16:21:57 +01:00
Oswald Buddenhagen
b19145125e remove rather useless text file
somebody who cares can find the information in the git log

Change-Id: I97dff4ab33a773247e1320ba6491e6377a2b94e7
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
2012-11-28 16:21:57 +01:00
Oswald Buddenhagen
6fbd9ad059 remove apparently unused file
Change-Id: Ie8b60b9e63c5783674cbac3bbe277f58d3059ea3
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
2012-11-28 16:21:57 +01:00
Oswald Buddenhagen
91f640b189 remove meaningless OTHER_FILES assignments
Change-Id: Id3d5690d5b174e5374332158709365ab431f660b
Reviewed-by: hjk <qthjk@ovi.com>
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
2012-11-28 16:21:57 +01:00
Oswald Buddenhagen
8e041af122 README.txt => README
use the same naming everywhere

Change-Id: Ic9106a17eb0979278f12f2ea2b7c1a04bc448745
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
2012-11-28 16:21:57 +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
Stephen Kelly
5a9de4c676 Always use QAIM to get the default flags.
Change-Id: I801f5c8023e3e3672fde28139a7f34f640e650f5
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2012-11-28 08:43:31 +01:00
J-P Nurmi
cb961007c5 Examples: move widgets specific "tools" examples to the correct place
examples/tools -> examples/widgets/tools

Change-Id: I8b9e23c45e07ce5cd9da8f24a9a9f7ae10b2b107
Reviewed-by: hjk <qthjk@ovi.com>
2012-11-28 00:56:34 +01:00
Sergio Ahumada
f397901970 Change copyright information from Nokia to Digia
Task-number: QTBUG-28156
Change-Id: Id6b1cd83155c61b0d3ead2d185b8968511d4a23f
Reviewed-by: Robert Loehning <robert.loehning@digia.com>
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
2012-11-27 19:31:21 +01:00
J-P Nurmi
114f247773 Update the StylePlugin example
QWindowsStyle will soon become an internal class, inherit
SimpleStyle from QProxyStyle. The documentation has been
updated accordingly.

Change-Id: Ib55f59729e980b93276e9c2903f13b5e46612ac8
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
2012-11-27 19:31:21 +01:00
hjk
c0bf2884f9 Remove remaning TARGET.EPOCHEAPSIZE settings from examples.
Not needed anymore.

Change-Id: I28b6566e1498afb68295c16e8786fe8bc0256361
Reviewed-by: Alessandro Portale <alessandro.portale@digia.com>
2012-11-27 15:34:07 +01:00
Samuel Rødal
7a7102ad07 Fixed abbreviations in QWindow::framePos() and QWindow::setFramePos().
As 672e7c875e did changing pos() to
position() and setPos() to setPosition().

Luckily there's not much code that uses these.

Change-Id: I1e1982f00412a22bd376e667a5e8c30b6149f9b5
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2012-11-27 15:24:31 +01:00
J-P Nurmi
5a0fd7fb04 Examples: inherit NorwegianWoodStyle from QProxyStyle
The QStyle specializations are being made internal. The recommended way
to customize styles is now to use QProxyStyle (& QStyleFactory), or to
implement a full custom style one can alternatively subclass
QCommonStyle. The proxy style approach was chosen for this case, since
the example assumes some drawing functionality provided by the windows
style and it is not a "complete" custom style implementation but more
like a customization anyway.

Change-Id: Ib2477339cfef258cfc944a76a2eea728066e1f45
Reviewed-by: Geir Vattekar <geir.vattekar@digia.com>
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
2012-11-26 17:33:37 +01:00
J-P Nurmi
c00d4373c5 Widgets/Painting examples: inherit ArthurStyle from QCommonStyle
The QStyle specializations are being made internal. The ArthurStyle
does not seem to require anything from QWindowsStyle, but QCommonStyle
as a base class gives just as nice looks.

Change-Id: I5ad8dd881e03f166ae5d3aedccb2688952dc0a28
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
2012-11-26 17:33:37 +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
Konstantin Ritt
9706adb0e7 LocaleSelector: Replace hard-coded impl with an algorithmic one
The old implementation is just not acceptable!
The new one is able to distinguigh locales by script.

Change-Id: Ic772f6da8744825080f739e64af00267e5f82434
Reviewed-by: Denis Dzyubenko <denis@ddenis.info>
2012-11-25 04:06:51 +01:00
David Schulz
4ac521354d QtBase: example code style
Change-Id: I0685f7e2c7c698a4bf288b8b1ae909167932a3fb
Reviewed-by: hjk <qthjk@ovi.com>
2012-11-25 01:34:07 +01:00
David Schulz
d5ec06be63 QtBase: examples/widgets/richtext code style
Change-Id: Ie0c27464e0fdb8f26caf0d8f27043da4ec45f41f
Reviewed-by: hjk <qthjk@ovi.com>
2012-11-24 23:07:54 +01:00
Thomas Hartmann
02c110e989 Prevent easing example warnings.
examples/widgets/animation/easing was spitting out a lot of
"QEasingCurve: Invalid tcb curve" warnings.
The reason was that in case of the TCP curve we do not provide
defaults.

The function createEasingCurve() now provides reasonable values
for the custom curves to show what is possible and how to use them.

Change-Id: I880d8d0f0ce2872ce2019f7d2e000f4c4ce136e2
Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
Reviewed-by: Alessandro Portale <alessandro.portale@digia.com>
2012-11-23 17:04:00 +01:00
David Schulz
dae8d2505d QtBase: examples/widgets/graphicsview/ codestyle
Change-Id: I501066b5eb5a1557d510e0ec20b5270e8c12704a
Reviewed-by: hjk <qthjk@ovi.com>
2012-11-23 17:04:00 +01:00
David Schulz
cbf3771e86 QtBase: examples/widgets/painting code style
Change-Id: I3d3c6f3bae20ac8383279437f8f89c92195a704f
Reviewed-by: hjk <qthjk@ovi.com>
2012-11-23 17:04:00 +01:00
David Schulz
ab0a007cb3 QtBase: examples/widgets/itemviews code style
Change-Id: I78a7745f7dc3add3fd7780220118d1b35b50a941
Reviewed-by: hjk <qthjk@ovi.com>
2012-11-22 13:56:25 +01:00
David Schulz
78a239bc6d QtBase: examples/widgets/itemviews/addressbook codestyle
Change-Id: I710d67018351c34ef14ac30edcca81aba7ff5ad3
Reviewed-by: hjk <qthjk@ovi.com>
2012-11-22 08:24:26 +01:00
Mitch Curtis
3249439b20 Remove warnings from qtbase.
geometryengine.cpp: In member function 'void
GeometryEngine::drawCubeGeometry(QGLShaderProgram*)':
geometryengine.cpp:159:93:  warning: cast to pointer from integer of
different sie [-Wint-to-pointer-cast] geometryengine.cpp:167:95:
warning: cast to pointer f rom integer ofdifferent size
[-Wint-to-pointer-cast]
benchmarking.cpp: In member function 'void TestBenchmark::multiple()':
benchmarking.cpp:85:9: warning: variable 'result' set but not used
[-Wunused-but-set-variable]
benchmarking.cpp: In member function 'void TestBenchmark::series()':
benchmarking.cpp:120:9: warning: variable 'result' set but not used
[-Wunused-but-set-variable]
qstandarditemmodel.cpp:2717:45: warning: unused variable 'd'
[-Wunused-variable]
qxcbconnection.cpp: In member function 'xcb_timestamp_t
QXcbConnection::getTimestamp()': qxcbconnection.cpp:930:40: warning:
suggest  parentheses around assignment used as truth value
[-Wparentheses]
tst_qguiapplication.cpp: In constructor
'BlockableWindow::BlockableWindow()':  tst_qguiapplication.cpp:340:9:
warning:'BlockableWindow::enters' will be initialized after [-Wreorder]
tst_qguia pplication.cpp:339:9: warning 'int BlockableWindow::leaves'
[-Wreorder] tst_qguiapplication.cpp:342:12:  waring: when initialized
here [-Wreorder]
tst_qsqltablemodel.cpp:570:10: warning: unused parameter 'value'
[-Wunused-parameter]
tst_qabstractitemview.cpp:1546:8: warning: unused parameter 'index'
[-Wunused-parameter]

Change-Id: I49c88547182e4669cfde2c2536403fc5573ca2da
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-11-21 18:23:59 +01:00
Mitch Curtis
91abfd521a Clean up diagramscene example's toolbutton icons.
Remove artefacts from pointer.png.

Replace several PNGs with images without artefacts (used FreeSerif as
the font).

Stopped scaling images up in MainWindow::createColorToolButtonIcon.

Change-Id: I7adf2deea73b89c631d39d575804e8d3f58c9fe1
Reviewed-by: Geir Vattekar <geir.vattekar@digia.com>
2012-11-21 16:36:50 +01:00
Friedemann Kleint
626283740f Fix building of examples.
- Correct install path of widget examples to contain widgets
  directory in target tree.
- Add missing resources.

Task-number: QTBUG-27977

Change-Id: If4cb117998892b0b165d7678367553d3a7553b91
Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
2012-11-21 16:36:50 +01:00
David Schulz
78c374865e QtBase: examples/widgets/layouts coding style
Change-Id: I4340c1fcbb467bf3c2ace3b4bd4b042fe9521c35
Reviewed-by: hjk <qthjk@ovi.com>
2012-11-21 16:36:50 +01:00
Eskil Abrahamsen Blomfeldt
0dc61c4216 Merge branch 'newdocs'
Added prepare_docs to qt_build_config.prf (it was added
directly in configure in the source branch)

Conflicts:
	configure
	tools/configure/configureapp.cpp

Change-Id: I1337c69fc62b1c934e3e39b4409e4857440c9db8
2012-11-20 10:12:44 +01:00
Shawn Rutledge
cd34da5426 Rename all QWindow properties that have "window" in them
windowTitle, windowModality, windowIcon and so on are named that way
to be similar to the ones in QWidget.  However QQuickWindow inherits
all of the declared properties, and we would like to have shorter
property names in QML.  If you are working with a Window then it's
obvious the title property is the window title.  Unfortunately,
there must be patches in many other modules which depend on this one.
In order to avoid the need to merge them all at the same time,
there is also patch https://codereview.qt-project.org/#change,39001
which temporarily adds backwards-compatible accessors, which can be
removed after the other modules are able to build without them.

We should not rename windowState to state, because in QML, state
usually drives the state machine for animation transitions etc.
(although QWindow is not an Item, a user might get confused about it).

Related patches are
https://codereview.qt-project.org/#change,39001
https://codereview.qt-project.org/#change,37764
https://codereview.qt-project.org/#change,37765
https://codereview.qt-project.org/#change,37766
https://codereview.qt-project.org/#change,37762

Change-Id: Ie4424ec15fbdef6b29b137f90a2ae33f173edd21
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
2012-11-07 21:26:08 +01:00
Miikka Heikkinen
227accf0a3 Fix hellowindow example generating excess timers
The example was creating a new timer on every expose event, which
quickly leads into massive excess of timeout signals.

Fixed by only creating one timer.

Task-number: QTBUG-27836
Change-Id: Ia6ed1bd9575e296f4c6c5b12509095e4d5c016dd
Reviewed-by: Jonathan Liu <net147@gmail.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2012-11-05 15:16:06 +01:00
Jerome Pasion
c808dd2745 Merge branch 'master' of ssh://codereview.qt-project.org/qt/qtbase into newdocs
Change-Id: I7e6cee190a341901dfbf8effb54ebccb91bf7a17
2012-11-02 14:41:27 +01:00
Jan Arve Saether
c360fbcd6c Do the actual removal of the Soft Keys API and related code
In addition to the actual removal of the softkeys API in QAction,
this commit removes some enums related to the softkeys feature:
  Qt::WA_MergeSoftkeys
  Qt::WA_MergeSoftkeysRecursively

It also removes some "zombie" enums:
  Qt::WindowSoftkeysVisibleHint = 0x40000000,
  Qt::WindowSoftkeysRespondHint = 0x80000000,

  (The only implementation that used these were removed when
  qapplication_s60.cpp and qwidget_s60.cpp were removed.)

Change-Id: Ib6fc6d543def4757383d5f19256199d9d190c614
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Janne Anttila <janne.anttila@digia.com>
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
2012-10-29 20:27:27 +01:00
Tor Arne Vestbø
6e5818f2bb Merge remote-tracking branch 'gerrit/master' into newdocs
Change-Id: I10cf9f915c602c8e5a0e7d7c9e17b7bc5ca00640
2012-10-26 12:28:53 +02:00
Jan Arve Saether
db97d35557 Move validators example from qtdoc repo to qtbase repo
old path in qtdoc repo:
doc/src/examples/widgets-validators.qdoc

Change-Id: Ibf6cad9e7525fff3360cd0b99ce0911b864dea1d
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
2012-10-24 11:34:40 +02:00
Jan Arve Saether
294dbc7bfd Use \annotatedlist for list of examples instead of "manual links"
Change-Id: Id945fd35f5eb6a6d11156d4a1356f99cc49405e2
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
2012-10-24 09:41:42 +02:00
Jan Arve Saether
2b6edec5c2 Doc: Added landing-, examples- and C++ class list-page to qtwidgets
It seems this is the pattern to follow:
landing page:    qtwidgets-index.html
examples page:   qtwidgets-examples.html
class list page: qtwidgets-module.html

Change-Id: I3e5459fe650178e0398cb43181b594c0f12a170e
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
2012-10-19 17:42:14 +02:00
Gatis Paeglis
4c41cb48d0 Modularize drag and drop documentation
- Move dnd docs and examples out of QtDoc module to gui library in QtBase
- Remove info related to Motif dnd since Qt5 doesn't implement it

Change-Id: Id7eb4eb422f4294a36dd92709ce3007903371f03
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
2012-10-19 17:35:51 +02:00
Oliver Wolff
c5b766638a Fixed cube opengl example
Proper variable initialization should fix crashs and black screens for
that example.

Task-number: QTBUG-27281
Task-number: QTBUG-27021
Change-Id: I538f233ea3c2faf6c1864c46be0d03828e92a110
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
2012-10-17 04:19:15 +02:00
Friedemann Kleint
fbd10a401f Use organization name "QtProject" in examples.
Change-Id: Ibbe9517ccf81d25eccbdff98f7cfe8ff6ec485d2
Reviewed-by: hjk <qthjk@ovi.com>
2012-10-16 15:29:15 +02:00
Sergio Ahumada
e488d0f4da Change copyrights from Nokia to Digia
Change copyrights and license headers from Nokia to Digia

Change-Id: I66d941a5fa7ed8046a3498686432450018a8dfaa
Reviewed-by: Iikka Eklund <iikka.eklund@digia.com>
Reviewed-by: Akseli Salovaara <akseli.salovaara@digia.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2012-10-15 10:18:31 +02:00
Sergio Ahumada
6343a46bc5 Change copyrights from Nokia to Digia
Change copyrights and license headers from Nokia to Digia

Change-Id: Ia683171b30b5bf7cedb56cc3087b4b68644a3da1
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2012-10-15 08:13:55 +02:00
Jerome Pasion
dc0d5bf387 Doc: Removed references to stale links.
The links are from the qt-webpages.qdoc and no longer exist.

Change-Id: I8329032215fa77811117e2767bae745795b209cb
Reviewed-by: Martin Smith <martin.smith@digia.com>
2012-10-13 05:51:19 +02:00
Friedemann Kleint
c4840d55ea Fix missing return in QtOpenGl/paintedwindow example.
Change-Id: I17da0e93bb7c1b0cdbb5b76035ec913cbc616608
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2012-10-13 05:51:19 +02:00
Stephen Kelly
43325a23f3 Delete the QVariant ctors taking global Qt enum values.
They have unexpected results in Qt 5 (the Qt::GlobalColor one works
as expected in Qt 4, but was removed in Qt 5):

 QVariant v = QVariant(Qt::red);
 qDebug() << v; // QVariant(int, 7)
 v = Qt::red;
 qDebug() << v; // QVariant(int, 7)

The correct way is to use:

 QVariant v = QVariant::fromValue(QColor(Qt::red));

The deleted constructors are the ones for which there is a class
with an implicit constructor taking the enum, and that class is
a built-in metatype.

QLocale::Language and QKeySequence::StandardKey would also fit
the description, but I can't include the header for QKeySequence
as it is in QtGui, and I don't want to include the qlocale header
in qvariant.h. Putting a QLocale::Language is probably very
uncommon anyway.

The QTextFormat test is doing the wrong thing, but the result isn't
being tested. Added new tests which fail before the patch.

Change-Id: Ia38a0784990f4d40ff7457a86daf58aabd4964eb
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
2012-10-10 08:45:22 +02:00
Joerg Bornemann
43ea715418 remove superfluous include from echoplugin example
Change-Id: I8a53c5e628e43796d7f4b53c311dd4d200527262
Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
2012-10-08 17:21:15 +02:00
Samuel Rødal
9b201853ad Made cube example not use glActiveTexture.
We're setting the default texture unit anyway, and glActiveTexture would
require resolving through QOpenGLFunctions.

Task-number: QTBUG-24555
Change-Id: Id8d660baaa1532e7b8e623673f501703c76fac65
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
2012-10-02 10:43:48 +02:00
Friedemann Kleint
c6271071b4 QPA/Windows example: Set proper window flags, titles, names.
Do not leak windows.

Change-Id: I3af29ce597742cbe6444208aa72443c0507819db
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com>
2012-10-01 10:20:09 +02:00
Samuel Rødal
ccf0669da9 Added QGLPixelBuffer implementation using framebuffer objects.
Instead of having QGLPixelBuffer be a unusable stub implementation we
deprecate it and implement it in terms of QOpenGLFramebufferObject.
Framebuffer objects are anyway the recommended replacement for
pixelbuffers in modern OpenGL, as the context switching overhead is
avoided.

Change-Id: Ia220c358ee92813e87981d297c51d84525010322
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
2012-09-27 18:35:55 +02:00
Joerg Bornemann
9e750d341a fix conflicting Visual Studio project names for Qt examples
Loading examples.sln resulted in a cascade of error messages because
Visual Studio doesn't allow projects of the same name in a solution.
Now using QMAKE_PROJECT_NAME to give the projects distinct names.

Change-Id: Ifd3a00311253e4b234ece936092649ce0f0869d8
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
2012-09-27 15:50:14 +02:00
Jens Bache-Wiig
570ae40f57 Remove CDE and Motif styles from qtbase
It is time to clean up some of our legacy code. These styles have
not been actively maintained for a long time and I think it is safe
to say that they should no longer belong as part of the default
distribution of Qt. We dont support any platforms based on CDE with
our source packages.

Note that even if we are removing these styles from the default
distribution of Qt, applications that depend on them
will still be able to bundle the existing (and unmodified) styles
along with their own source code as we are not breaking compatibility.

Change-Id: I1709630c20ba8e8088cd01628628d86856db57a4
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
2012-09-27 15:16:16 +02:00
aavit
d535c910e4 Fix compilation for Qt5: Avoid deprecated API
Change-Id: Iba11d33dd4d81ed1a460dd3237cd1bb9e1ace106
Reviewed-by: Jason Barron <jason.barron@digia.com>
2012-09-26 18:52:14 +02:00
aavit
9e9495b166 Compile fix: Avoid deprecated functions
Change-Id: Ia7592997640d51ed98fdfa1a5e59d35954a0ef61
Reviewed-by: Jason Barron <jason.barron@digia.com>
2012-09-26 18:51:52 +02:00
Samuel Rødal
1dadede8ed Fixed instances of "to to" in qtbase.
Really it should just be "to".

Change-Id: I7d0fff334bac3f0ac78adb8131e3bf3df1f1b242
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
2012-09-24 21:27:51 +02:00
Marc Mutz
6d65b2cc8c Use QStringList::join(QChar) overload where applicable [examples]
This is an automated change performing the following replacements:
                    join\("(.)"\) -> join('\1')
  join\(QLatin1String\("(.)"\)\)  -> join(QLatin1Char('\1'))
  join\(QStringLiteral\("(.)"\)\) -> join(QLatin1Char('\1'))

Change-Id: I1d0c9782cc1522d937b930531720e32d4c8f7ce8
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2012-09-23 23:30:03 +02: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
d1f74b8ddf Move examples to proper location.
Change-Id: Ib808f5d99cb8217f8786411b531fa5bc7fa5250a
Reviewed-by: Martin Smith <martin.smith@digia.com>
2012-09-21 19:59:16 +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
Jan-Arve Saether
4b664eef64 Doc fix: Fix references to snippets and examples.
Did a recursive search under examples\widgets\doc

search criteria: "\snippet widgets/"
replaced with:   "\snippet "

Change-Id: I795580f8d207088df543edd9ef3b7b76c5e30d69
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org>
2012-09-20 07:01:48 +02:00
Geir Vattekar
8347d4e0bd Doc: Use QStyledItemDelegate and frameless spinboxes in spinbox delegate example
Task-number: QTBUG-18847
Change-Id: I5347a1028b6f45a60e43fb75f6d362efecb6880b
Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org>
Reviewed-by: Marius Bugge Monsen <marius@cutehacks.com>
Reviewed-by: Geir Vattekar <geir.vattekar@digia.com>
2012-09-18 20:59:03 +02:00
Gabriel de Dietrich
ab1f00f6cd Fix tab navigation in windowflags example
Change-Id: Ia0e3087ea60262546cd1a21614591ad3626469d3
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
2012-09-18 17:39:50 +02:00
Gabriel de Dietrich
b1893f7c49 Introducing NoDropShadowWindowHint window flag
Added suppport on QCocoaWindow.

Also we deprecate WA_MacNoShadow since it isn't used anywhere, and updated
the 'windowflags' example app.

Change-Id: Id0b453ba15a23b768b0615838597bca139f507ad
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
2012-09-18 17:39:50 +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
Geir Vattekar
7ec469e900 Doc: Fix snippet bug in Getting Started Qt
Change-Id: I9c8caabee4c6f6131a69851586ef992138beb211
Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org>
Reviewed-by: Jerome Pasion <jerome.pasion@nokia.com>
2012-09-13 19:33:08 +02:00
Frederik Gladhorn
e92c1976a6 Fix example includes for qdoc.
Change-Id: Ifa6a99db27ce51529489bf077a839a3107b524d2
Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org>
Reviewed-by: Paul Olav Tvete <paul.tvete@nokia.com>
2012-09-11 12:09:47 +02:00
Frederik Gladhorn
999ac7da4c Move gui example doc example images.
Change-Id: I01e0c3d51bcb01c66a3f6c7b2ba95f0c9999f4cb
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
2012-09-11 12:09:47 +02:00
Sergio Ahumada
5243999c3c example: minor fix to gettingStarted - part5
Do not compare a QString to "".  Instead use the .isEmpty() method.

Change-Id: Ifda1361b2c288dd590f0294daacdf5e2d9241522
Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org>
Reviewed-by: Geir Vattekar <geir.vattekar@nokia.com>
2012-09-10 10:40:31 +02:00
Frederik Gladhorn
f67d23d4fc Move tutorials to widgets.
All of these are very QWidget centric.
They cannot properly refer to the
sources without being part of the widget module.

This fixes around 300 qdoc errors.

Change-Id: I5a7c2dbc10f7913f7b088d6a0ac81323b3c287ac
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
2012-09-09 01:18:37 +02:00
Sean Harmer
51d40d7e9b Make gui/math3d classes use float rather than qreal
This corrects the mismatch between using floats for internal storage
and qreal in the API of QVector*D which leads to lots of implicit
casts between double and float.

This change also stops users from being surprised by the loss of
precision when using these classes on desktop platforms and removes
the need for the private constructors taking a dummy int as the final
argument.

The QMatrix4x4 and QQuaternion classes have been changed to use float
for their internal storage since these are meant to be used in
conjunction with the QVector*D classes. This is to prevent unexpected
loss of precision and to improve performance.

The on-disk format has also been changed from double to float thereby
reducing the storage required when streaming vectors and matrices. This
is potentially a large saving when working with complex 3D meshes etc.

This also has a significant performance improvement when passing
matrices to QOpenGLShaderProgram (and QGLShaderProgram) as we no
longer have to iterate and convert the data to floats. This is
an operation that could easily be needed many times per frame.

This change also opens the door for further optimisations of these
classes to be implemented by using SIMD intrinsics.

This needs to be applied in conjunction with

https://codereview.qt-project.org/#change,33548

Task-number: QTBUG-21035
Task-number: QTBUG-20661
Change-Id: I9321b06040ffb93ae1cbd72fd2013267ac901b2e
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-09-07 13:27:38 +02:00
Shawn Rutledge
d6d7aebd03 Command-line-only examples should not build as .app bundles on OSX
It's confusing when you double-click it and nothing happens.

Task-number: QTBUG-26976
Change-Id: I50c5625a41881bdbcbf29001197ed15da4ee0a28
Reviewed-by: Gabriel de Dietrich <gabriel.dietrich-de@nokia.com>
2012-09-03 11:05:49 +02:00
Mitch Curtis
ec57b20b65 Properly reflect format changes in calendarwidget example.
This patch ensures that May 1st and the first Friday of each month also
have their formats updated when the corresponding checkboxes are
unchecked instead of just checked.

Task-number: QTBUG-26936
Change-Id: Ib5f77daf8d9000eeb18663b2e07e4842a70d22b6
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
2012-09-03 02:40:54 +02:00
Frederik Gladhorn
3ef3c662fe Don't reference widgets/widgets in example doc.
Change-Id: Ie1fe516f75ca8c1b2233dc6bb2b887b55593e730
Reviewed-by: Martin Smith <martin.smith@nokia.com>
2012-09-01 11:24:50 +02:00
Samuel Rødal
65f5909df2 Moved gui example documentation to the proper location.
Gui example documentation should be in examples/gui/doc/

Change-Id: I3cd196a2bb5d76b6e275f336b29a2ad1811159dd
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
2012-09-01 11:21:46 +02:00
Samuel Rødal
f3b45ffa61 Added OpenGL example and documentation.
Change-Id: I2d9d4e52caf0a39fef9648d8a9e83a0c1328f650
Reviewed-by: Paul Olav Tvete <paul.tvete@nokia.com>
2012-08-29 16:53:00 +02:00
Frederik Gladhorn
9a13bffa29 Move address book example images to proper location.
Change-Id: Ib106445c7a68fb1a1fd2d2c6d568681d83b712c9
Reviewed-by: Martin Smith <martin.smith@nokia.com>
2012-08-28 23:34:25 +02:00
Frederik Gladhorn
58e4239bb2 Add missing examples from doc repo.
Change-Id: I145ae05a5e7348740f858bd2bdcb8d21d7a90d22
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
2012-08-28 23:34:25 +02:00
Frederik Gladhorn
64dd7a6bfe doc: fix links
Change-Id: Ifb6363e35c5317b6b1d9fd5e53079b30753f0666
Reviewed-by: Geir Vattekar <geir.vattekar@nokia.com>
2012-08-28 23:34:25 +02:00
Frederik Gladhorn
3be101bee0 doc: key -> uicontrol
Change-Id: I42e5e2dc2d7cf7030ee9bc7dfa97ddaa66958370
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
2012-08-27 10:59:50 +02:00
Frederik Gladhorn
757709f0d5 Remove mentioning of Phonon.
Change-Id: I78ce6d42ee043a35b520bf8567a1874cf8e2e43e
Reviewed-by: Gabriel de Dietrich <gabriel.dietrich-de@nokia.com>
2012-08-27 10:37:01 +02:00
Andy Nichols
94b7832e31 Doc: replace occurrence of \starslash in widget docs
Change-Id: I93c370e3d53b955057741bc3bf503e781fbb6244
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
2012-08-23 13:22:23 +02:00
Jeremy Katz
adc5626f4f change http example default URL to http[s]://qt-project.org
This example used to refer by default to qt.nokia.com.

Change-Id: Iecb682d0deb6270da91baf26897d44b16b39d09e
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
2012-08-23 11:20:37 +02:00
Andy Nichols
fc924ae47e Doc: Fix snippet and example referencing widget examples
Widget examples were moved into a widgets subfolder, but
qdoc references were not updated.

Change-Id: Id2a4573e723745b9827c664c852807d6116f8f6d
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
2012-08-23 11:20:37 +02:00
Andy Nichols
1ed8251667 Doc: change \menu to \uicontrol in application example docs
\menu command has been replaced by \uicontrol in qdoc

Change-Id: Ib105df58c565c96b34579720acb62fe64e7806c4
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
2012-08-22 09:08:02 +02:00
Gabriel de Dietrich
4410e66f45 Making trivial snippets inline
Change-Id: I8d8b5586579d3ee460b234b5a09462586ac1cfd0
Reviewed-by: J-P Nurmi <j-p.nurmi@nokia.com>
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@nokia.com>
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
2012-08-21 13:41:01 +02:00
J-P Nurmi
291938aea6 Moved a bunch of widgets example images from qtdoc to qtwidgets
Change-Id: I46363e19051cca6f088f0ed6df1c9fd113b95fe7
Reviewed-by: Gabriel de Dietrich <gabriel.dietrich-de@nokia.com>
2012-08-20 21:11:42 +02:00