aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/compiler/qqmlpropertyvalidator_p.h
Commit message (Collapse)AuthorAgeFilesLines
* Avoid unnecessary re-generation qml cache files in some circumstancesUlf Hermann2019-02-181-1/+4
| | | | | | | | | | | | The map of name IDs to resolved types so far is copied several times during compilation and different compile passes see different copies of it. Compile passes may add things to the map, and if they do that on copies that are inaccessible to other code, we get nondeterministic results. Furthermore all the copies and pointers are confusing and inefficient. Fixes: QTBUG-69340 Change-Id: I43ad3cbeeec34f90e05570eddc901fe8aa64c709 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Clean up compilation unit string resolutionSimon Hausmann2018-07-311-1/+1
| | | | | | | | | Replace use of CompiledData::Unit::stringAt with CompilationUnit::stringAt as central place, in preparation for allowing derived compilation units to retrieve strings from base units. Change-Id: Ifafe6c18a9fd8d1e2259a60c17200124869b4c2d Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Clean up manual reference of QQmlTypeData and QQmlPropertyCacheSimon Hausmann2018-04-261-1/+2
| | | | | | | | | | | | | | | | | | | | | | | We have a few places in the type loader where we do adventurous manual reference counting, where getType() returns a raw pointer that has been addref()'ed and then sometimes somehow we call release() later. Commit 0b394e30bba4f6bb7e6f7dbe5585a2e15aa0f21d is an example of where this can easily go wrong. As a consequence and also in preparation for future work on the type loader, this patch starts replacing the manual reference counting there. Changing the return type from QQmlTypeData *getType() to a QQmlRefPointer<> itself is not sufficient though, as the implicit operator T*() will still allow the caller to store the result as a raw pointer. Therefore this patch removes the "unsafe" implicit extraction operator. As a result of that change, other types that are sometimes stored in QQmlRefPointer are also affected and their usage needs to be adapted to QQmlRefPointer usage or manual raw pointer extraction with .data(). Change-Id: I18fd40634047f13196a237f4e6766cbef3bfbea2 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Move Q_REQUIRED_RESULT to the beginning of the declarationThiago Macieira2017-06-031-2/+2
| | | | | | | That's the correct place and works with C++11 attributes. Change-Id: I7814054a102a407d876ffffd14b6a2f74423c222 Reviewed-by: Sérgio Martins <sergio.martins@kdab.com>
* Cleanup: Move ResolvedTypeReference(Map) one scope upSimon Hausmann2016-08-011-1/+1
| | | | | | | | The class is a candidate for further functionality, it doesn't have to be nested in CompilationUnit. Change-Id: I100553160f5ae34f66b9f8ff5df9f636da2ffb67 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Separate QQmlPropertyValidator into a standalone fileSimon Hausmann2016-06-171-0/+87
The type compiler file is getting crowded and this class is destined to be used outside of the scope of the type compiler. Change-Id: I21aff8ee64dbfeb039523518e912ef206637fb41 Reviewed-by: Lars Knoll <lars.knoll@qt.io>