Commit Graph

67 Commits

Author SHA1 Message Date
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
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
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
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
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
Gabriel de Dietrich
806dda08d6 Moving .qdoc files under examples/widgets/doc
Updated those .qdoc files to refer to the new relative examples
emplacement. Images and snippets to be moved later.

Also grouped all widgets related examples under widgets.

Change-Id: Ib29696e2d8948524537f53e8dda88f9ee26a597f
Reviewed-by: J-P Nurmi <j-p.nurmi@nokia.com>
2012-08-20 12:20:55 +02:00
Friedemann Kleint
b1909fe118 qtbase: Add missing example installs and files.
Change-Id: I071fd862e001b766c9fb13106242edf23a608663
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-07-10 22:24:40 +02:00
Mitch Curtis
ab536c3c71 Make QCalendarWidget use its locale's firstDayOfWeek.
QCalendarWidget currently uses Qt::Sunday as the default first day
of the week. It has been suggested that a better user experience
would see the calendar's locale be used instead.

Task-number: QTBUG-19811
Change-Id: I4441bf9ffd52213ef622a4a7f498530b7cc9e110
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Denis Dzyubenko <denis.dzyubenko@nokia.com>
2012-06-28 17:15:17 +02:00
Gatis Paeglis
7f139e8844 Update calendarwidget example
Due to API changes introduced by ff55d64f67

Task-number: QTBUG-26130
Change-Id: I4e5bdf3dd81d75308a3e565239b9d7a95452cd43
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
2012-06-20 12:38:32 +02:00
Janne Anttila
9fe5139e73 Fix building of qtbase examples when printsupport module is disabled.
Printsupport module is not that interesting in embedded environments,
and it also does not compile at the moment for WEC7. Fixed qtbase
examples to obey the availability of printsupport module.

Change-Id: I960d1b628b9ca82450aa3b0df8dd101b2544ee12
Reviewed-by: Björn Breitmeyer <bjoern.breitmeyer@kdab.com>
Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-06-18 09:48:55 +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
Gatis Paeglis
deed9c75b4 Change path for 'mousebuttons' widgets example
Task-number: QTBUG-26121
Change-Id: Icaeb6038d166fb0ffadf1657ddef21c18b3d3be6
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
2012-06-14 03:03:38 +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
Olivier Goffart
910b446fb2 Examples: Don't use deprecated methods
Change-Id: Ib6e795f6b5bb6a3ac19882a5fb224460ef1fc8ad
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-04-21 17:29:40 +02:00
Andreas Holzammer
4acb8bfc59 Compile fix if QT_NO_CLIPBOARD defined
Change-Id: I818122f2b2d2119248ad2e84b138aab8ab621a41
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2012-04-19 16:20:02 +02:00
Marc Mutz
a27d5be4dc examples: compile w/QT_NO_CAST_FROM_BYTEARRAY, at least on Unix
This is all pretty straight-forward, adding .constData() or
using QString::fromLatin1() instead of QLatin1String().

Change-Id: I984706452db7d0841620a0f64e179906123f3849
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-03-08 09:58:26 +01:00
Jędrzej Nowacki
b460eca941 Example build fix.
buttontester.pro has to be renamed to mousebuttons.pro because it lives
in mousebuttons subdirectory, to which examples/widgets/widgets.pro is
pointing by SUBDIRS variable.

Change-Id: I04bbd85713321337fbe8cbccfa6284f12b677279
Reviewed-by: Rick Stockton <rickstockton@reno-computerhelp.com>
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
2012-03-07 12:51:54 +01:00
Rick Stockton
4a80a7ced1 add widget mousebuttons example 'mousetester'.
This is an xev-like program. A user clicks a mouse button inside the
Window, and the program displays (a) the "raw" button number; (b)
the corresponding Qt::MouseButton name; and (c) the type of mouse Event.

Task-number: QTBUG-24112
Change-Id: I8a76ff37b5b85639f662706072cc4a2ce490754b
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
2012-03-06 08:24:22 +01:00
Oswald Buddenhagen
d91cf1e53b clean up qmake-generated projects
remove "header" and assignmets which are defaults or bogus,
reorder some assignments.

Change-Id: I67403872168c890ca3b696753ceb01c605d19be7
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2012-02-24 05:18:30 +01:00
Xizhi Zhu
ba9302b8a9 Remove Symbian specific code from qtbase.
Change-Id: I27d37d914b71e1e43c94e2a975ffec49e1ecd456
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-01-31 07:08:31 +01:00
Jason McDonald
5635823e17 Remove "All rights reserved" line from license headers.
As in the past, to avoid rewriting various autotests that contain
line-number information, an extra blank line has been inserted at the
end of the license text to ensure that this commit does not change the
total number of lines in the license header.

Change-Id: I311e001373776812699d6efc045b5f742890c689
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2012-01-30 03:54:59 +01:00
aavit
48f9ba388b Remove support for the MNG file format and the bundled libmng
The MNG file format is generally abandoned, and libmng has been
unmaintained for several years.

The MNG plugin and bundled libmng has been moved to the
qtimageformats project on Gerrit.

Task-number: QTBUG-21869
Change-Id: I946432347014ffde2b72307a5f8b166ca5553602
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-01-25 02:22:18 +01:00
Jason McDonald
629d6eda5c Update contact information in license headers.
Replace Nokia contact email address with Qt Project website.

Change-Id: I431bbbf76d7c27d8b502f87947675c116994c415
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2012-01-23 04:04:33 +01:00
Jason McDonald
1fdfc2abfe Update copyright year in license headers.
Change-Id: I02f2c620296fcd91d4967d58767ea33fc4e1e7dc
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2012-01-05 06:36:56 +01:00
Friedemann Kleint
87274e272d QtBase examples: Remove Maemo/Symbian-specific code.
- Maemo/Symbian are no longer supported and QWidget-based examples
  are no longer supposed to run on mobile platforms, so, remove any
  Maemo/Symbian or mobile-specific code from source files and
  profiles.
- Remove Maemo/Symbian vibration examples.
- Change Q_WS_MAC/WIN to Q_OS_MAC/WIN where appropriate.

Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>

Change-Id: I488a0adadb98934567aa6416206a80465c9c3a81
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
2011-10-18 15:47:49 +02:00
Gunnar Sletta
df0ff8fd4e Merge branch 'master' into refactor 2011-08-31 08:14:48 +02:00
Bradley T. Hughes
22ea360fb9 Compile fix on Mac OS X
The file is called shapeitem.cpp (lowercase i), not shapeItem.cpp (with
uppercase I)

Change-Id: I0dd230158cf8c8323bfa779901475535e7c7d694
Reviewed-on: http://codereview.qt.nokia.com/3883
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2011-08-30 15:27:19 +02:00
Friedemann Kleint
5e6605f7b0 Fix building of examples.
Change-Id: Iebb56c81fd13deaa82d8883e3f1529f1a78ebea8
Reviewed-on: http://codereview.qt.nokia.com/3603
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2011-08-25 15:54:16 +02:00
Gunnar Sletta
04d0a9626c Merge branch 'master' into refactor
Conflicts:
	src/gui/kernel/qapplication_qpa.cpp
	src/gui/kernel/qcursor_qpa.cpp
	src/gui/kernel/qwindowsysteminterface_qpa.cpp
	src/gui/kernel/qwindowsysteminterface_qpa.h
	src/gui/kernel/qwindowsysteminterface_qpa_p.h
	src/gui/text/qtextcontrol.cpp
	src/plugins/platforms/wayland/wayland.pro
	src/widgets/accessible/qaccessible2.h
	src/widgets/widgets/qwidgetlinecontrol_p.h

Change-Id: I5e6f4eb184159dccc67e8f13673edb884d179c74
2011-08-25 12:48:52 +02:00
Liang Qi
92d88e4755 Support -qtnamespace and -qtlibinfix in qtbase examples
Task-number: QTBUG-19971
Change-Id: Ie20eb2fc133658dd34e1ec25a3b80c36f0f01aa3
Reviewed-on: http://codereview.qt.nokia.com/2754
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Liang Qi <liang.qi@nokia.com>
2011-08-08 16:41:27 +02:00
Samuel Rødal
7b3b6b5afa Merge remote branch 'gerrit/master' into refactor
Conflicts:
	examples/opengl/cube/main.cpp
	examples/widgets/applicationicon/main.cpp
	examples/widgets/orientation/main.cpp
	src/gui/image/qicon.cpp
	src/gui/image/qimage.h
	src/gui/image/qpixmap.h
	src/gui/image/qpixmap_mac.cpp
	src/gui/kernel/qapplication.cpp
	src/gui/kernel/qpalette.cpp
	src/gui/kernel/qwidget.cpp
	src/gui/styles/qmacstyle_mac.mm
	src/gui/widgets/qmenubar.cpp
	src/gui/widgets/qslider.cpp
	src/opengl/qwindowsurface_gl.cpp
	tests/auto/qvariant/qvariant.pro
	tests/benchmarks/corelib/kernel/qobject/qobject.pro
	tests/benchmarks/gui/animation/qanimation/qanimation.pro
	tests/benchmarks/gui/graphicsview/qgraphicsanchorlayout/qgraphicsanchorlayout.pro
	tests/benchmarks/gui/graphicsview/qgraphicsitem/qgraphicsitem.pro
	tests/benchmarks/gui/graphicsview/qgraphicsscene/qgraphicsscene.pro
	tests/benchmarks/gui/graphicsview/qgraphicsview/qgraphicsview.pro
	tests/benchmarks/gui/graphicsview/qgraphicswidget/qgraphicswidget.pro
	tests/benchmarks/gui/image/qimagereader/qimagereader.pro
	tests/benchmarks/gui/itemviews/qtableview/qtableview.pro
	tests/benchmarks/gui/kernel/qapplication/qapplication.pro
	tests/benchmarks/gui/kernel/qwidget/qwidget.pro
	tests/benchmarks/gui/painting/qpainter/qpainter.pro
	tests/benchmarks/gui/painting/qtbench/qtbench.pro
	tests/benchmarks/gui/painting/qtracebench/qtracebench.pro
	tests/benchmarks/gui/text/qtext/qtext.pro

Change-Id: I4b911c795ecb29d73b6a7fd18819711b49478a30
2011-07-21 14:42:46 +02:00
David Boddie
f5c4cbb6d4 Doc: Speculative attempt to fix build breakage.
Case sensitivity problems strike again.
(cherry picked from commit 9aa5f949f092032589917a0bfe16e78828d0dabe)

Change-Id: I5c9472c385fb045db8ab8ea54ec69bebb934ec6c
Reviewed-on: http://codereview.qt.nokia.com/407
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: David Boddie
2011-07-21 08:54:05 +02:00
David Boddie
9c2de0d8c0 Doc: Fixed file name of a header file to use lower case characters.
(cherry picked from commit c68d24b7bafa3058d44c0a30ade329972403b6c6)

Change-Id: If733804fbab8baf5c4a5331005834ddeecec3ff4
Reviewed-on: http://codereview.qt.nokia.com/406
Reviewed-by: David Boddie
2011-07-21 08:54:02 +02:00