aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/items/qquickscreen.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Revert "Avoid calling potentially pure virtual method"David Edmundson2015-09-181-9/+18
| | | | | | | | | | This reverts commit 2d34ed2e655d79bed95859f1d32c2abfacbfb6f1. This change was only needed in Qt 5.4 Change-Id: Ica636da9a3deba68abbfda12e5ea72b296d9ad64 Reviewed-by: Dmitry Shachnev <mitya57@gmail.com> Reviewed-by: Alan Alpert <aalpert@blackberry.com>
* Merge remote-tracking branch 'origin/5.4' into 5.5Simon Hausmann2015-05-041-18/+9
|\ | | | | | | Change-Id: Ie8ea118ed0a1a9a1c3d81e1e34d85c03c695c9a4
| * Avoid calling potentially pure virtual methodDavid Edmundson2015-04-271-18/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In Qt 5.4 screenChanged is called indirectly from the destructor of QPlatformScreen. By comparing new values against the oldScreen we call call virtual methods of QPlatformScreen from it's own destructor which results in a crash. This patch simply emits change signals whenever a screen change regardless of whether the value differs from the previous screen. Arguably less efficient, but better than crashing. This fix is not needed in Qt 5.5 where the QPA architecture has changed. Task-number: QTBUG-45753 Change-Id: Ic155906928855a377add9b21bff9e72b31f4667e Reviewed-by: Alan Alpert <aalpert@blackberry.com>
* | Merge remote-tracking branch 'origin/5.4' into 5.5Frederik Gladhorn2015-02-241-2/+9
|\| | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf LICENSE.GPLv2 examples/qml/networkaccessmanagerfactory/view.qml src/qml/jsruntime/qv4runtime.cpp src/qml/jsruntime/qv4stringobject.cpp Change-Id: I5d12f436d60995e51d5c2f59d364e9cbc24f8e32
| * Fix regression where QQuickScreenAttached overwrites QScreen valuesAlbert Astals Cid2015-02-061-2/+9
| | | | | | | | | | | | | | | | | | | | Up to Qt 5.3 it was fine setting the orientationUpdateMask in QScreen in C++, with 5.4 that value is always discarded and overwrote with 0, this change makes it possible to still set the orientationUpdateMask value in C++ and not have it overwritten unless specifically changed from QML Change-Id: I134290ce91be8b91df4e9e8e71120753813f48d7 Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* | Update copyright headersJani Heikkinen2015-02-121-7/+7
| | | | | | | | | | | | | | | | | | 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. Change-Id: I61120571787870c0ed17066afb31779b1e6e30e9 Reviewed-by: Iikka Eklund <iikka.eklund@theqtcompany.com>
* | Improve startup of bindings using QQuickScreenSimon Hausmann2015-01-121-0/+4
|/ | | | | | | | | | | | | | | We can optimistically initialize the underlying QScreen to the primary screen and this way ensure that in the common case the evaluation of bindings using the screen's attached properties results in correct calculations on startup. This way we can avoid re-evaluating the bindings again later. Previously on startup all the returned values were zero and the bindings got evaluated again once a window was assigned. Change-Id: I98ba5905953f0b5054d924919239d178570250d3 Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com> Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com> Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* Screen attached property: expose devicePixelRatio propertyShawn Rutledge2014-10-231-0/+18
| | | | | | | Change-Id: I08b22766b3e389b7d27ca4c56729f550b0647a08 Reviewed-by: Jens Bache-Wiig <jensbw@gmail.com> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com> Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
* Add orientationUpdateMask to QQuickScreenAlex Blasche2014-09-301-0/+34
| | | | | | Task-number: QTBUG-38699 Change-Id: I173b7e53c27dba336351572859f7c9aeafe07ef9 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
* Merge remote-tracking branch 'origin/5.3' into 5.4Frederik Gladhorn2014-08-281-1/+1
|\ | | | | | | Change-Id: I92b91cce499ed4bec64521a581276f397792e218
| * Use QtQuick.Window 2.2v5.3.2Kai Koehne2014-08-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | Use version 2.2 in the documentation and for the .qmltypes file. The revision for properties got dropped in commit 7ceca6ac0 , and is now dropped from the .qmltypes file, too. The removed signals are also dropped because of that (because they are implicitly declared by the property, anyway). Change-Id: Ia14dd403ce1f098cb378bd7940e8f80f32b770a0 Reviewed-by: Fawzi Mohamed <fawzi.mohamed@digia.com> Reviewed-by: Alan Alpert <aalpert@blackberry.com>
* | Update license headers and add new licensesJani Heikkinen2014-08-251-19/+11
|/ | | | | | | | | - Renamed LICENSE.LGPL to LICENSE.LGPLv21 - Added LICENSE.LGPLv3 & LICENSE.GPLv2 - Removed LICENSE.GPL Change-Id: I84a565e2e0caa3b76bf291a7d188a57a4b00e1b0 Reviewed-by: Jani Heikkinen <jani.heikkinen@digia.com>
* Doc: Fix some code snippet warningsSergio Ahumada2014-04-031-4/+4
| | | | | | | | | | | Seems like \qml \endqml is not able to parse some snippets, so using \code \endcode instead to fix warnings like: Unable to parse QML snippet: "Expected token `{'" at line 1, column 13 Change-Id: Iecf033ff5610405d946390e69c3aa7ec54a21998 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com> Reviewed-by: Sze Howe Koh <szehowe.koh@gmail.com>
* Normalize signal & slot signatures in connectionThiago Macieira2014-02-031-1/+1
| | | | | | | Profiling shows Qt Creator spends 2% of its load time normalizing Change-Id: I58132e11ab5fc942b04925c3bcc919165784a5d1 Reviewed-by: Alan Alpert <aalpert@blackberry.com>
* Doc: Fix broken linksSze Howe Koh2013-12-301-2/+2
| | | | | Change-Id: I4c4577edde96978a986606bf30fbb925f871bd42 Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
* Deprecate logicalPixelDensityAlan Alpert2013-11-151-3/+10
| | | | | | | | | | | It's just not working out in practice, and we don't want to confuse users with having to pick their flavor of pixel density. Task-number: QTBUG-34798 Change-Id: I552e479515a6f5249685844143601cb7449ccccc Reviewed-by: Jerome Pasion <jerome.pasion@digia.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com> Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
* Doc: Fixed QtQuick.Window documentationJerome Pasion2013-11-151-11/+11
| | | | | | | | | | | -fixed import statement in \qmlmodule and \inqmlmodule command. -Removed extra identifier in property documentation. Task-number: QTBUG-33360 Change-Id: I1e7ca5f418c327d42247ab4f4a11733c63d8c273 Reviewed-by: Alan Alpert <aalpert@blackberry.com> Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Screen attached property: expose pixelDensity propertyShawn Rutledge2013-10-261-0/+18
| | | | | | | | | Because logicalPixelDensity is different than physical density on multiple platforms, having the actual density is critical to be able to design resolution-independent controls. Change-Id: I06bbdc6e6869718058a796ca737668ce69802f2b Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
* qdoc: no longer recognizes the version nr in QML refsMartin Smith2013-10-021-9/+9
| | | | | | | | | | All QML references of the form <QML-module-name><QML-module-version>::<QML-type>::<member-name> have had the <QML-module-version> removed i. Task-number: QTBUG-33776 Change-Id: Idde279e0f254cd24ea44f9841662dd81a2c5bbc6 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* Fix license headers of QtQuick sources.Gunnar Sletta2013-09-301-1/+1
| | | | | Change-Id: I3750c47640bf21c3567c5fa1c4667e3e2552942e Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Doc: Made Qt Quick items' \since consistent.Jerome Pasion2013-09-251-4/+4
| | | | | | | | | | | | | | | | Qt 5.2: -"\since QtQuick 2.2" -> "\since 5.2" Qt 5.1: -"\since QtQuick 2.1" -> "\since 5.1" -"\since Qt 5.1" -> "\since 5.1" Qt 5.0: -"\since QtQuick 2.0" -> "\since 5.0" Task-number: QTBUG-32172 Change-Id: I699b00b31373a434ddb8f4caccfef40c588bf8a4 Reviewed-by: Martin Smith <martin.smith@digia.com>
* QQuickScreen.name can change at runtimeShawn Rutledge2013-04-301-0/+2
| | | | | | | | | It's generally a constant but the attached property doesn't always have its QScreen at startup, so in practice every property needs a notifier. (Followup to Id777caf6cef1df5bc01757605e3085151170760b ) Change-Id: Ia3a321f98dc49b7e75f6eceb8f16b153c73a3134 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
* Add more geometry properties to the Screen attached propertyShawn Rutledge2013-04-291-3/+81
| | | | | | | | | desktopAvailableHeight is useful for positioning windows, and logicalPixelDensity is useful for ensuring that touch controls are a reasonable size even on very high-resolution displays. Change-Id: Id777caf6cef1df5bc01757605e3085151170760b Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
* Improved documentation in the Screen attached propertyShawn Rutledge2013-02-251-9/+37
| | | | | | | | | It can attach to the Window now too, so needs some clarification about when to use it that way. The orientation properties also need more description to avoid confusion. Change-Id: Ib537422f6001d8b64de176e60a6433b2e25551b9 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
* QQuickScreen is exposed as an attached property on Window tooShawn Rutledge2013-02-201-0/+4
| | | | | Change-Id: I13ee75247cbe6238de1b58cf0005c39fc4314e96 Reviewed-by: Alan Alpert <aalpert@rim.com>
* Update copyright year in Digia's license headersSergio Ahumada2013-01-101-1/+1
| | | | | | Change-Id: I6c3bd7bebe3d62d1cfd0fa6334544c9db8398c76 Reviewed-by: Akseli Salovaara <akseli.salovaara@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* Fix warnings about nonexistent signals in QQuickScreenOleg Shparber2013-01-091-10/+2
| | | | | | | | | | On application exit QQuickScreen tries to disconnect from an old QScreen which is almost destroyed at this point. Change-Id: I6c595cf68d6faaf3527b8ffcae0a074c23170ea1 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Alan Alpert <aalpert@rim.com>
* QQuickScreen attached obj handles screenChanged and geometryChangedShawn Rutledge2012-10-161-7/+18
| | | | | | | | | | sizeChanged is replaced with geometryChanged. Given a Window, it also needs to connect to the Window's screenChanged signal. The result is that if the screen is changed after the QQuickView is created, the Screen attached object will be updated. Change-Id: I64473dd960376b861eb50e3e5a1a296d0030e766 Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
* Change copyrights from Nokia to DigiaIikka Eklund2012-09-231-24/+24
| | | | | | | Change copyrights and license headers from Nokia to Digia Change-Id: Ie7f5d49ed8235d7a7845ab68f99ad1c220e64d5c Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Doc: Changed \qmlclass to \qmltype and added \instantiates.Jerome Pasion2012-07-301-1/+2
| | | | | | | | | | -To simplify QDoc, \qmlclass is now \qmltype. -'\instantiates <C+++ class>' is for the types that are defined in C++. Change-Id: I29242d33daf7b972d8b86a356b9689638866b950 Reviewed-by: Laszlo Papp <lpapp@kde.org> Reviewed-by: Bea Lam <bea.lam@nokia.com> Reviewed-by: Martin Smith <martin.smith@nokia.com>
* QQuickCanvas renamesAlan Alpert2012-07-171-4/+4
| | | | | | | | | | | | | | | | QQuickCanvas is now called QQuickWindow QQuickCanvas::rootItem is now QQuickWindow::contentItem QQuickItem::canvas is now QQuickItem::window QQuickItem::ItemChangeData::canvas is also renamed window QQuickCanvas::grabFrameBuffer is now QQuickWindow::grabWindow The functions related to the color property have dropped the clear from their names. The first three changes have interim compatibility measures in place to ease the transition. Change-Id: Id34e29546a22a74a7ae2ad90ee3a8def6fc541d2 Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Change Quick docs to refer to "types" rather than "elements"Martin Jones2012-07-161-4/+4
| | | | | | Task-number: QTBUG-24785 Change-Id: I223479b879514abaacb123852323c1cfada7a5e1 Reviewed-by: Bea Lam <bea.lam@nokia.com>
* Fix various QtQuick.* submodule docsBea Lam2012-07-051-5/+5
| | | | | | | | | | | | | | | - Create module index pages for QtQuick.Window, QtQuick.XmlListModel and QtQuick.LocalStorage. - Fix references to module names in docs so that docs for properties and methods are actually generated e.g. use "QtQuick.Window2" instead of "QtQuick2.Window". There's no easy way to document Module APIs at the moment so the QtQuick.LocalStorage documentation has been updated in a hacky way to generate the correct method documentation. Change-Id: I7b34e4b4ac794acffc6d198b98e2115ccf0fa9a6 Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Create new documentation structureChris Adams2012-06-211-1/+1
| | | | | | | | | | | | | | | | | | | | The documentation currently has no clear separation between Qt QML and Qt Quick. With recent commits like: 6c8378eaf1edbbefe6aaa3672b0127816a004fd7 and ab1e510121c8a679fdaca12ccd30e0f7ac12a26b the separation between the language definition and implementation, provided by Qt QML, and the standard library for the QML language, provided by Qt Quick, is clear. This commit creates a new documentation structure that is more navigable and separates concepts into logical categories, with clear separation between QtQML and QtQuick. It also provides a more generic QML Application Developer Resources page which contains links to information for QML application developers. Change-Id: Ia807ccfbfd24ffa0e1c7f0a51ed9d2ed3aa6a733 Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Doc: Grouped Qt Quick types into several groupsJerome Pasion2012-06-061-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -created new groups and converted some overviews into group pages -edited type documentation and added \ingroup -articles still need title fixes and link fixes Groups: qtquick-visual-types qtquick-item-graphics qtquick-shaders qtquick-canvas qtquick-text qtquick-text-validator qtquick-interaction qtquick-positioners qtquick-transformations qtquick-states qtquick-animation-define qtquick-animation-properties qtquick-animation-control qtquick-animation-modifiers qtquick-images-sprites qtquick-images qtquick-models qtquick-containers qtquick-views qtquick-paths qtquick-utility Task: QTBUG-25685 Change-Id: I81d4df3320bf5daad5cabb5e42408013fb24f464 Reviewed-by: Bea Lam <bea.lam@nokia.com> Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
* Update Screen documentationAlan Alpert2012-05-031-2/+5
| | | | | | | Task-Number: QTBUG-25031 Change-Id: Ie27b42417d63d50769eedcf1f760405861f439e5 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Doc FixAlan Alpert2012-04-231-0/+7
| | | | | | | More emphasis on what imports are needed for specialty elements. Change-Id: Ia24ac97bb77ed57c313a5120b0fbd02b6fcaa4a8 Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Rename QDeclarative symbols to QQuick and QQmlMatthew Vogt2012-02-241-1/+1
| | | | | | | | | | | | | Symbols beginning with QDeclarative are already exported by the quick1 module. Users can apply the bin/rename-qtdeclarative-symbols.sh script to modify client code using the previous names of the renamed symbols. Task-number: QTBUG-23737 Change-Id: Ifaa482663767634931e8711a8e9bf6e404859e66 Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Reduce size of QQuickItemPrivateAaron Kennedy2012-02-211-1/+1
| | | | | Change-Id: I02653536f68cfef3dfc06acaf30e2565a97dc194 Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
* Fix Screen::AngleBetweenAlan Alpert2012-02-201-2/+4
| | | | | | | | | | | Enum values in invokables don't worry currently, so use ints. Also AngleBetween is no longer static, so it has to be initialized before the function can be used. Change-Id: I4a6748fef6920bab6f08f22ce68911c3af6ce821 Reviewed-by: Martin Jones <martin.jones@nokia.com> Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* Remove "All rights reserved" line from license headers.Jason McDonald2012-01-301-1/+1
| | | | | | | | | | 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: If39bd256b0fa85eba17ea30f8ab87ea27d758908 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Adapted QQuickScreenAttached to orientation API changes in QScreen.Samuel Rødal2012-01-241-13/+18
| | | | | Change-Id: Ic2cb008b989780e297f03ddd5bdef466bb230c74 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Update obsolete contact address.Jason McDonald2012-01-231-1/+1
| | | | | | | | Replace Nokia contact email address with Qt Project website. Change-Id: I6a730abc0c396fb545a48b2d6938abedac2e3f1c Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com> Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
* Update copyright year in license headers.Jason McDonald2012-01-051-1/+1
| | | | | Change-Id: I0a8d99909cac867dce72da70b1bbcb649989a51b Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Add Screen attached objectAlan Alpert2011-12-091-0/+176
Use this to get details of the screen such as size and current orientation. As well as adding its own example, this commit updates Calculator to use Screen instead of Runtime for orientation. Change-Id: I1b73d2ee22a92b1dee827de1bd893eebec9f5817 Reviewed-by: Michael Brasser <michael.brasser@nokia.com>