aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/ftw/qhashedstring_p.h
Commit message (Collapse)AuthorAgeFilesLines
* init variables where they are declared when possible (clang-tidy)Shawn Rutledge2018-02-261-31/+24
| | | | | | | | clang-tidy -p compile_commands.json $file -checks='-*,modernize-use-default-member-init,readability-redundant-member-init' -config='{CheckOptions: [{key: modernize-use-default-member-init.UseAssignment, value: "1"}]}' -header-filter='qtdeclarative' -fix Change-Id: I705f3235ff129ba68b0d8dad54a083e29fcead5f Reviewed-by: Johan Helsing <johan.helsing@qt.io>
* use nullptr consistently (clang-tidy)Shawn Rutledge2018-02-261-25/+25
| | | | | | | | | | | | | 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>
* Replace Q_NULLPTR with nullptrKevin Funk2017-09-271-2/+2
| | | | | Change-Id: I0c01862dbb475494c84e39c695cb563df8cbcfa8 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* V4: allow for String::createHashValue to be inlinedErik Verbruggen2016-07-131-3/+32
| | | | | | | Notably into QHashedString(Ref)::computeHash. Change-Id: Icf8487ed3da0f117cb0911f20c9b88498f61510a Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* QtQuick: clean up shader effect property connectionsErik Verbruggen2016-07-051-2/+2
| | | | | | | | | | | | | | | - Don't use a signal mapper, but handle the mapping using a custom slot object and a lambda to do the dispatching ourselves. - Don't do meta-calls by property name, but by index. - Cache the meta-object. - Resolve the property indices by using the QML property cache. For a shader with 6 property connections, the time spent goes from 320k instructions to 80k instructions (valgrind on x86_64). Task-number: QTBUG-53901 Change-Id: I2809198cf62f9716b3683798222203fc3e97fbb3 Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
* V4: Allow some more functions to be inlined.Erik Verbruggen2016-03-311-1/+0
| | | | | Change-Id: If9d1f87fd7cf0b12d2827c4574109234be7e8ab8 Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
* 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>
* QtQml: Fix const correctness in old style castsThiago Macieira2015-07-091-2/+2
| | | | | | | Found with GCC's -Wcast-qual. Change-Id: Ia0aac2f09e9245339951ffff13c958364a2e9859 Reviewed-by: Simon Hausmann <simon.hausmann@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>
* Get rid of most uses of ValueRefLars Knoll2015-01-231-2/+2
| | | | | | | | | | | | Instead pass a const Value & into the functions With our new inheritance structure, we can get rid of ValueRef and instead simply pass a pointer to a Value again. Pointers to Values are safe to use again now, as they are now guaranteed to be in a place where the GC knows about them. Change-Id: I44c606fde764db3993b8128fd6fb781d3a298e53 Reviewed-by: Simon Hausmann <simon.hausmann@digia.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>
* Convert String to new constructor syntaxLars Knoll2014-07-221-1/+1
| | | | | Change-Id: I07f7667d3d72a7d72e6717d194de8d7b15435777 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* fix whitespaceOswald Buddenhagen2014-01-221-34/+34
| | | | | | | remove trailing spaces and expand tabs Change-Id: Ieacb9d096b612c45d1a64700044c114d1f7522bc Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Remove some more QV4::Value usagesLars Knoll2013-09-301-3/+3
| | | | | Change-Id: Ic146a964f2ff6b90eeceda90bf1834d7212386a5 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Use a ReturnedValue when converting to String or ObjectLars Knoll2013-09-121-1/+1
| | | | | | | | Also rename Value::toQString() to Value::toQStringNoThrow(), and add a throwing toQString() method for JS use. Change-Id: I821b33fc61abb7d08839df965fd337685f61a545 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Fix compilation with MSVC 2008 (and prospective Windows CE build fix)Simon Hausmann2013-08-221-6/+4
| | | | | | | | | | | | | | | | | * Only 2010 and newer ship stdint.h, so for 2008 we have to provide a little stdint.h compat header, for some of the third-party code we import. Our own Qt code this patch changes to use quint* types instead. * Include math.h and float.h for some math functions. * disable the JIT on Windows CE for now. * Change use of intptr_t to qintptr in Qt code. intptr_t is in inttypes.h, except that with VS 2008 it is indirectly available through stdio.h. Let's avoid the mess and just use the qt type, that's always available. Change-Id: I19055edd89e0a6b147d9edbb3b711798ed3c05a5 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Get rid of QHashedV4StringLars Knoll2013-06-281-76/+20
| | | | | | | | This was required while we were using V8, but now we can simply pass QV4::String pointers. Change-Id: If6338e4a455d6132fe14e5e603e4fe9e477d1ffb Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Remove the symbol optimisation from hashed stringLars Knoll2013-06-281-30/+1
| | | | | | | Simplify the code, so we can move over to identifiers later. Change-Id: I42cb164840ecfd3f765049ab9fa46746a0d4a85b Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Remove an overoptimisation that was only used (wrongly) in one placeLars Knoll2013-06-281-21/+7
| | | | | | | | Let's simplify this code. The goal is to replace most of the code in qhashedstring with an identifier based hash table. Change-Id: I2f9a38ad0bb2f43a2b2b87914823c23ed231f48c Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* More correct assertion in QHasheV4StringLars Knoll2013-06-281-1/+1
| | | | | Change-Id: Id34dcae9c7e52fe0262b4d9480a7307a393226ee Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Don't use a PersistentValue in QHashedV4StringLars Knoll2013-06-281-7/+7
| | | | | | | | | The class is only used on the stack and critical to performance in a couple of places. This speeds up some QML benchmarks quite a bit. Change-Id: Id36682487396d42ddacdc71f7a32792a09318cf9 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Fix memory corruptionLars Knoll2013-05-221-0/+1
| | | | | | | | The QString constructor taking a QStringDataRef doesn't refcount, so we need to do it manually. Change-Id: I076df18cfdb94ef796a42281b7bb1027798b609c Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Build fix for testsSimon Hausmann2013-05-221-0/+2
| | | | | | | | This file uses uint16_t and therefore needs to include stdint.h for the declarations. Change-Id: Ifd95a4ade6ecb8560deca4d0118b985d939cfba2 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Remove v8 dependencies in qhashedstringLars Knoll2013-05-221-57/+48
| | | | | | | Also remove now unused API in v8::String Change-Id: I2570aedf407c89ad85da01cf0e2153a52b4e562d Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Get rid of v8::String::(Ascii)ValueLars Knoll2013-05-221-10/+1
| | | | | Change-Id: I792a94590efbec852620d101b620b263a90e1d54 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Get rid of v8::LocalLars Knoll2013-05-061-1/+1
| | | | | | | | | The class was doing exactly the same thing as v8::Handle in our implementation. Removing it cleans up quite a bit of code. Change-Id: I37a3dcdef062fc388751e9ef0a158b5926ba2efb Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Fix compilation with built-in v4vm JS engineSimon Hausmann2013-04-151-1/+1
| | | | | Change-Id: Ieda9267e296acf6392a5461f4cfb9233a7a409a0 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Fix compilation with v4vm's v8 compatibility headersSimon Hausmann2013-04-151-0/+1
| | | | | | | | Some code is also commented out - it will disappear during the removal of the v8 code later. Change-Id: I46e07be47ed7d4bc12423a6348d674d2fca489f7 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Use official V8 string manipulation methods in QMLPeter Varga2013-03-121-3/+7
| | | | | | | | | | | The QtJSBackend's String::GetCharacter and String::Equals methods are Qt specific and they are not supported by official V8. These methods can be replaced by more "V8-friendly" implementations in QtDeclarative. Thus the mentioned methods can be removed from QtJSBackend to reduce the difference between QtJSBackend and the official V8 source. Change-Id: I5590ca62dc667e64a7f54a7e47a02d350ba0c077 Reviewed-by: Lars Knoll <lars.knoll@digia.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>
* Restrict v8 property lookup to the execution contextMatthew Vogt2012-08-271-282/+264
| | | | | | | | | | | | | When resolving property names, only properties known to the current context of execution should be available. If a property name has been overriden by a component extension, code executing in the context of the base component should resolve the property name to the property available inside the base component or its bases. Task-number: QTBUG-24891 Change-Id: I9687cc28e108226d5a939627a901c8254344b598 Reviewed-by: Michael Brasser <michael.brasser@nokia.com> Reviewed-by: Martin Jones <martin.jones@nokia.com>
* Lazily create QMetaObjectsAaron Kennedy2012-05-241-0/+9
| | | | | | | | | | For internal QML built types, creating a metaobject each time is just wasteful. Additionally, as the property caches were always created from the intermediate QMetaObject, it was difficult to pass information directly from the compiler to the property cache. Change-Id: I769526b0edaaf16a86883f3065b75618b94e4077 Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
* Optimize type resolutionMartin Jones2012-05-171-0/+1
| | | | | | | Faster qmlType() and resolveType() lookup. Change-Id: I096439f23bf6071e8bfdf0cda366cc71e00293ba Reviewed-by: Aaron Kennedy <aaron.kennedy@nokia.com>
* Fix compilation on QNX.Tobias Koenig2012-03-201-0/+4
| | | | | Change-Id: I5e01cad23066a645c1434ce1463d370733f53e4f Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
* Rename QDeclarative symbols to QQuick and QQmlMatthew Vogt2012-02-241-0/+1418
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>