aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/qqmlinfo.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Fix documentation for qmlInfo, qmlDebug, qmlWarningUlf Hermann2023-01-171-3/+16
| | | | | | | | | | They don't actually relate to QQmlEngine, and QQmlInfo itself needs a minimal piece of documentation. Pick-to: 6.5 Fixes: QTBUG-109760 Change-Id: I59b7f8ab75ca038591f5bec17079f0f597455d6c Reviewed-by: Sami Shalayel <sami.shalayel@qt.io>
* QtQml: Remove unused includes in qml, final partSemih Yavuz2022-09-141-2/+0
| | | | | | | | | | | | | | Drop unnecessary includes detected by clangd-iwyu. Add new includes due to the transitive includes. Also, some of the includes were detected as unused even if they were actually in use. In those cases, use angular brackets instead of "" which deceives the tool not to complain. Affected subfolders: JsRuntime, Qml Fixes: QTBUG-106473 Change-Id: I483da15d42a8e3ce6cd3b654909665fff3075d6b Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Use SPDX license identifiersLucie GĂ©rard2022-06-111-38/+2
| | | | | | | | | | | | Replace the current license disclaimer in files by a SPDX-License-Identifier. Files that have to be modified by hand are modified. License files are organized under LICENSES directory. Pick-to: 6.4 Task-number: QTBUG-67283 Change-Id: I63563bbeb6f60f89d2c99660400dca7fab78a294 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Fix documentation for qmlInfo, qmlDebug and qmlWarningAndreas Buhr2020-12-021-18/+15
| | | | | | | | | | | qmlInfo, qmlDebug, and qmlWarning are not in the QtQml namespace any more. This patch adapts the documentation. Task-number: QTBUG-88533 Pick-to: 6.0 Change-Id: I7fafd3fc2769c5ffad515cacaacdc7ccbe07db46 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Remove compatibility shim from qmlinfo.{cpp|h}Ulf Hermann2020-11-191-26/+0
| | | | | | | | | | | | We don't need to handle symbol clashes with QtQuick1 anymore. [ChangeLog][QtQml] The functions qmlDebug, qmlInfo, and qmlWarning are no longer available in the QtQml namespace. Use their counterparts in the global namespace. Fixes: QTBUG-88637 Change-Id: Ia74510bd711790cebf55de4cd668891712f6835e Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* QQmlInfo: print ancestor of object if it has no QML engineMitch Curtis2020-07-271-3/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | This results in the following message for objects without a QML engine: QML AttachedObject (parent or ancestor of Attached): Binding loop detected for property "a" for this QML file, named AttachedObject.qml: import QtQuick 2.0 import org.qtproject.Test 1.0 Item { Attached.a: Attached.a } This, in turn, allows the warning to be emitted via the QQmlEngine::warnings signal, since QQmlEnginePrivate::warning() is now passed a valid engine. This solves the awkward situation where a binding loop warning can not be detected at all by auto tests involving attached C++ objects (as message handlers do not receive these messages either). Pick-to: 5.15 Change-Id: I07589974207bd5448d22a6086a52b9230d23e298 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Restore offset/length in QQmlJS::DiagnosticMessageSimon Hausmann2020-03-021-2/+3
| | | | | | | | | | | | This is needed in a few places outside of declarative, so this change restores the loc member in DiagnosticMessage and moves QQmlJS::AST::SourceLocation into common's QQmlJS namespace/directory. QQmlError is unaffected and retains only line/column. Amends d4d197d06279f9257647628f7e1ccc9ec763a6bb Change-Id: Ifb9d344228e3c6e9e26fc4fe112686f9336ea2b2 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Doc: Fix documentation warningsTopi Reinio2019-11-111-3/+0
| | | | | | | | | | | | | | | | | | There were a lot of documentation warnings introduced by the separation of QtQml.Models and QtQml.WorkerScript modules from the QtQml documentation project into their own sub-projects. Fix the above, and also ensure that the experimental Qt.labs.qmlmodels QML types are listed in the documentation, and add them also on the QML module page for QtQml.Models. A few warnings remain, they may be indicative of issues not in the scope of this commit. Fixes: QTBUG-79812 Change-Id: Idc25c976e4c96feab4aae893519d6c9245f57a64 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* doc: Fix several qdoc warningsMartin Smith2019-09-231-3/+3
| | | | | | | | This update repares several "Can't link to...," "No such parameter...," and "Undocumented parameter..." warnings. Change-Id: I3649cf35f766e5a87ca5df48301e8063a31d7904 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Doc: Qt QML: Fix documentation warningsTopi Reinio2018-11-021-20/+43
| | | | | | | | | | | | Add \namespace for for namespace QtQml, as it has logging functions that previously saw no generated documentation. Fix \qmltype name of DelegateChooser, as well as a number of related typos and linking problems. Task-number: QTBUG-71502 Change-Id: I5a9c635853ef73c99a1b1f55cd1c0a1a87fdf6ec Reviewed-by: Martin Smith <martin.smith@qt.io>
* use nullptr consistently (clang-tidy)Shawn Rutledge2018-02-261-1/+1
| | | | | | | | | | | | | From now on we prefer nullptr instead of 0 to clarify cases where we are assigning or testing a pointer rather than a numeric zero. Also, replaced cases where 0 was passed as Qt::KeyboardModifiers with Qt::NoModifier (clang-tidy replaced them with nullptr, which waas wrong, so it was just as well to make the tests more readable rather than to revert those lines). Change-Id: I4735d35e4d9f42db5216862ce091429eadc6e65d Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* qmlInfo: Switch message level to QtInfoMsg, matching the function nameRobin Burchell2017-01-171-1/+1
| | | | | | | | | | | | | | | | | | | qmlInfo predated info-level messages in QtCore, and as such previously sent warning-level messages despite the unfortunate naming. Now that we have an actual qmlWarning function, and we have switched our code to use it, we can change qmlInfo's behavior to better match the function naming. This does have the impact that existing qmlInfo callers will basically need a s/qmlInfo/qmlWarning/g to retain the same QDebug level in user code, but I feel that this behavior change makes sense given the better consistency with C++-side QDebug we attain. [ChangeLog][QtQml][Important Behavior Changes] qmlInfo now reports messages with a QtMsgType of QtInfoMsg instead of QtWarningMsg. To continue to send warnings, callers should migrate to the newly-introduced qmlWarning function. Change-Id: I16c88d94377b5956eb6921b64af7c84d1ca024f6 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* QQmlInfo: Add qmlDebug & qmlWarning functions alongside qmlInfoRobin Burchell2017-01-111-23/+104
| | | | | | | | | | | | | This way, we can correctly write to multiple levels of QDebug with QML context information. A followup change will port all existing callers, and subsequently change qmlInfo's message level to QtInfoMsg. [ChangeLog][QtQml] Introduced qmlDebug & qmlWarning functions to qqmlinfo.h, in addition to the pre-existing qmlInfo function. As a side effect, QQmlError has also gained messageType() and setMessageType(). Change-Id: I04ced5952c5c3c58293a89a6767c7b545c03cc0a Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Updated license headersJani Heikkinen2016-01-191-14/+20
| | | | | | | | | | | From Qt 5.7 -> LGPL v2.1 isn't an option anymore, see http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/ Updated license headers to use new LGPL header instead of LGPL21 one (in those files which will be under LGPL v3) Change-Id: Ic36f1a0a1436fe6ac6eeca8c2375a79857e9cb12 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* Factor out method to get pretty QML type nameTobias Koenig2015-09-241-27/+1
| | | | | | | | | Factor out the code to get the pretty QML type name for an QObject from ~QQmlInfo and put it into QQmlMetaType::prettyTypeName() method. Change-Id: I54ab0c49ba4a52074877447ef67708104f954f2d Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* Speed up object creationSimon Hausmann2015-04-161-1/+1
| | | | | | | | Avoid copying url and file name twice into the context every time we instantiate an object. Change-Id: I1c76b80b9c44f95512af5899d760151f6dcd7bb5 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Fix some qdoc warnings.Friedemann Kleint2015-03-311-1/+1
| | | | | | | | | | | qtdeclarative/src/qml/qml/qqmlinfo.cpp:46: warning: Cannot find 'qmlInfo(...)' in '\fn' QQmlInfo qmlInfo(const QObject *object) qtdeclarative/src/qml/qml/qqmlexpression.cpp:366: warning: Undocumented parameter 'column' in QQmlExpression::setSourceLocation() qtdeclarative/src/qml/doc/src/qmlfunctions.qdoc:176: warning: Undocumented parameter 'reason' in qmlRegisterExtendedUncreatableType() qtdeclarative/src/qml/doc/src/qmlfunctions.qdoc:176: warning: No such parameter 'message' in qmlRegisterExtendedUncreatableType() Change-Id: Iec801b33b11bd57abadd968a90c49f8eba1280d5 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@theqtcompany.com> Reviewed-by: Alan Alpert (Personal) <416365416c@gmail.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>
* 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>
* QQmlError::toString: improve handling of empty urls.David Faure2014-07-241-1/+1
| | | | | | | | | | | | "file::2:23: ..." is strange to read. Show "<Unknown File>:2:23: ..." instead, by treating empty urls (including "file:") as unknown, and by still showing line and column numbers in such a case. This change makes it possible for QUrl::fromLocalFile("") to return an empty url rather than "file:", which this module was relying upon in the tests. Change-Id: I91918090fd4e0aa9a25dbbb18893a0ce94140e21 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* fix whitespaceOswald Buddenhagen2014-01-221-2/+2
| | | | | | | remove trailing spaces and expand tabs Change-Id: Ieacb9d096b612c45d1a64700044c114d1f7522bc Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Move exports conflicting with QtDeclarative into namespaceKai Koehne2013-05-151-0/+24
| | | | | | | | | | | | | | Move exported qml* symbols that conflict with QtDeclarative into an - automatically imported - namespace. This ensures apps can link against both QtDeclarative and QtQml. To keep the BC promise the old symbols are still exported. Task-number: QTBUG-29584 Change-Id: I3d31c36ca4e2faaf6f5d67a77c5c5a304c0338a4 Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Alan Alpert <aalpert@blackberry.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>
* 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>
* Rename QDeclarative symbols to QQuick and QQmlMatthew Vogt2012-02-241-0/+192
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>