summaryrefslogtreecommitdiffstats
path: root/util/normalize/main.cpp
Commit message (Collapse)AuthorAgeFilesLines
* util/normalize: parse at the 8-bit levelMarc Mutz2025-06-051-12/+11
| | | | | | | | | | | | | | | | Like so much Qt code overusing UTF-16, the old code converted each line into a QString, and then, to feed into normalizedSignature(), back into 8-bit, and then back into UTF-16 and then, when modifying, back to 8-bit. Just do everything in 8-bit. Yes, this means setFöö() will likely not work anymore when source code is encoded in UTF-8, but MOC can't store that, anyway, AFAIK, so we're not losing anything. If it becomes a problem, it's easy to fix in isValidIdentifier(). Change-Id: Ibf03032ed892c968db3db2f28c188455317d3377 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* util/normalize: remove the line-length limitationMarc Mutz2025-06-051-1/+1
| | | | | | | | There's no reason to limit the readLine() call to 16KiB, so don't. Change-Id: I83f3c7b9ce4c7ef07a8940764153e35608dd9b25 Reviewed-by: Ivan Solovev <ivan.solovev@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* util/normalize: scan more than just .cpp filesMarc Mutz2025-06-041-2/+37
| | | | | | | | | | | There's no reason why SIGNAL()/SLOT() usage should be limited to .cpp files, and, indeed, running normalize on qt5.git with this change applied produces additional hits in headers, Obj-C++ and qdoc files. Also add some other file types that may contain SIGNAL/SLOT macros. Change-Id: I65082bcf54e977e55f8cb1f95d7a84ede087c9d2 Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
* Use SPDX license identifiersLucie Gérard2022-06-071-38/+2
| | | | | | | | | | Replace the current license header in files by a SPDX-License-Identifier. License files are organized under LICENSES directory. Task-number: QTBUG-67283 Change-Id: I385751ca6bdcb72ccf69d5cfefc97acba836135b Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* normalize: Respect keyword bounds for SIGNAL/SLOTJoerg Bornemann2019-01-311-0/+11
| | | | | | | | | | This tool tried to normalize signatures for things like Q_PRIVATE_SLOT and SIGNAL_INDEX. Check for valid keyword characters before and after the search string. Fixes: QTBUG-38172 Change-Id: I9b7e31d5b283da23ecbbe87e9e670a62e4f53ae7 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* Unify license header usageAntti Kokko2016-02-031-14/+20
| | | | | | | | Update old header.LGPL3 to header.LGPL Change-Id: Ic9b7de3ff8ad0e6f1c8477ced3d07f7e90f3dae9 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* Update copyright headersJani Heikkinen2015-02-111-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: If3c8d221bcf8e5010048ed5f1c50cd35c04e7199 Reviewed-by: Jani Heikkinen <jani.heikkinen@theqtcompany.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* Update license headers and add new licensesJani Heikkinen2014-08-241-19/+11
| | | | | | | | - Added LICENSE.LGPLv21, LICENSE.LGPLv3 & LICENSE.GPLv2 Change-Id: If5b04ddf25095ae1eb59e25361c88e570bb2b4df Reviewed-by: Antti Kokko <antti.kokko@digia.com> Reviewed-by: Tony Sarajärvi <tony.sarajarvi@digia.com>
* normalize: remove wrong assert.David Faure2013-12-091-1/+0
| | | | | | | | Many C++ source files don't end with a '\n' Change-Id: I785ee0ac0678f63ae41b2bcaddc77bc4c3e5c16e Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Port `normalize` to QCommandLineParser, to fix its compilation.David Faure2013-12-061-17/+23
| | | | | | | app.argc() doesn't exist anymore. Change-Id: Ia4e871e673f819e85d41d4eabe04987a57313995 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* update copyright yearOswald Buddenhagen2013-02-111-1/+1
| | | | | Change-Id: I670423c6001e2a504df8be80b42ee88566ad3baa Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* Change copyrights from Nokia to DigiaSergio Ahumada2012-09-261-24/+25
| | | | | | | | Change copyrights and license headers from Nokia to Digia Change-Id: I5b63c06bf0e6e45f5b00669f749e5e136ddc2f9d Reviewed-by: Janne Anttila <janne.anttila@digia.com> Reviewed-by: Lars Knoll <lars.knoll@digia.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: I15becdbdde2d4719f1411ba3d8306983cfba0e11 Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Update obsolete contact address.Jason McDonald2012-01-231-1/+1
| | | | | | | | Replace Nokia contact email address with Qt Project website. Change-Id: Ie3419ce67907b27514e493aa123e4e266b0f59aa Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Update copyright year in license headers.Jason McDonald2012-01-051-1/+1
| | | | | Change-Id: I8d2cc9e590c54109fc86093274995f9e9508a768 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Update licenseheader text in source files for qtrepotools Qt moduleJyri Tahtela2011-05-241-17/+17
| | | | | | | Updated version of LGPL and FDL licenseheaders. Apply release phase licenseheaders for all source files. Reviewed-by: Trust Me
* Initial import from the monolithic Qt.Qt by Nokia2011-04-271-0/+193
This is the beginning of revision history for this module. If you want to look at revision history older than this, please refer to the Qt Git wiki for how to use Git history grafting. At the time of writing, this wiki is located here: http://qt.gitorious.org/qt/pages/GitIntroductionWithQt If you have already performed the grafting and you don't see any history beyond this commit, try running "git log" with the "--follow" argument. Branched from the monolithic repo, Qt master branch, at commit 896db169ea224deb96c59ce8af800d019de63f12