summaryrefslogtreecommitdiffstats
path: root/src/tools/uic/cpp/cppwriteincludes.cpp
Commit message (Collapse)AuthorAgeFilesLines
* uic: Fix some clang-tidy warningsFriedemann Kleint2024-07-061-4/+4
| | | | | | | | | | | | | | | - Repeated return types - Make member functions static - narrowing int conversions - Use auto * - Use list.isEmpty() - Use modern includes - Remove redundant access specifiers - minor fixes Pick-to: 6.8 Change-Id: I14ddf1add667536739fbb5fabb357dbaa7ef35c3 Reviewed-by: Jarek Kobus <[email protected]>
* uic: Change some QLatin1String literals to QString literalsMate Barany2022-09-141-1/+1
| | | | | | | | | | | | | | | | | While working on QTBUG-98434 some potential improvements were found in the pre-existing code. Some of the QLatin1String literals are used to initialize QStrings or are converted to QStrings and so it makes sense to replace them with QString literals. As a related change, change the type of namespaceDelimitier from QString to QL1SV, since it is used only for a function call and that function has an overload to take QL1SV. Task-number: QTBUG-103100 Change-Id: I56db6ddd84ad2a7133a765bb49ecd8f962ac5c13 Reviewed-by: Marc Mutz <[email protected]>
* uic: Fix mismatches between QString/QLatin1StringViewMate Barany2022-09-121-1/+1
| | | | | | | | | | | While working on QTBUG-98434 some potential improvements were found for pre-existing issues, for example some variables were wrongly initialized. Fix the mismatches between QString/QLatin1StringView. Task-number: QTBUG-103100 Change-Id: Ib120452fe8012cda3f9becea8f9837efc38cf199 Reviewed-by: Marc Mutz <[email protected]>
* Use SPDX license identifiersLucie Gérard2022-05-161-27/+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. Task-number: QTBUG-67283 Change-Id: Id880c92784c40f3bbde861c0d93f58151c18b9f1 Reviewed-by: Qt CI Bot <[email protected]> Reviewed-by: Lars Knoll <[email protected]> Reviewed-by: Jörg Bornemann <[email protected]>
* uic: replace remaining uses of QLatin1String with QLatin1StringViewSona Kurazyan2022-04-261-3/+3
| | | | | | | | Task-number: QTBUG-98434 Change-Id: Ied042c0a61e48844694f6a94f0423735e92fb6d3 Reviewed-by: Qt CI Bot <[email protected]> Reviewed-by: Marc Mutz <[email protected]> Reviewed-by: Friedemann Kleint <[email protected]>
* uic: replace QLatin1String uses with _L1 or _sSona Kurazyan2022-04-261-5/+7
| | | | | | | Task-number: QTBUG-98434 Change-Id: I5a9b01d1dd2a2a727cfb71e829dbf631bf25e2db Reviewed-by: Friedemann Kleint <[email protected]> Reviewed-by: Marc Mutz <[email protected]>
* uic: stop using QLatin1Char constructor for creating char literalsSona Kurazyan2022-04-231-3/+3
| | | | | | | | | | | Required for porting away from QLatin1Char/QLatin1String in scope of QTBUG-98434. As a drive-by, fix qsizetype -> int narrowing conversion warnings for the touched lines. Change-Id: I0d3c232a9fa95aea854445922f100b89c6d6f5a1 Reviewed-by: Friedemann Kleint <[email protected]>
* uic: Extract a base class for WriteIncludesFriedemann Kleint2021-05-251-141/+22
| | | | | | | | | | | Extract base class WriteIncludesBase from WriteIncludes which basically adds the dependent classes. Move the classlibmap there as well. Task-number: PYSIDE-1404 Change-Id: I899c7818cb96dd3b1af5f328cd20d64fbaf7755b Reviewed-by: Jarek Kobus <[email protected]> Reviewed-by: Christian Tismer <[email protected]>
* Port androiddeployqt and uic from QStringRef to QStringViewLars Knoll2020-06-151-1/+1
| | | | | | Task-number: QTBUG-84319 Change-Id: I7f30a4d73dd98ee1977645d7274816cd71307506 Reviewed-by: Thiago Macieira <[email protected]>
* uic: Generate Qt 5 connection syntaxFriedemann Kleint2020-05-041-0/+3
| | | | | | | | | | | | | | | Add a enum and formatting for member function pointer based connections. Now preferably use member function pointer for Qt classes or parameterless connections. This should not require qOverload() within Qt classes after the Signal/Slot disambiguation. Add command line option to force either syntax for all connections. Task-number: QTBUG-76375 Change-Id: Icdb4051e1173172a71cd536bdbc7d1ab1edf267d Reviewed-by: Volker Hilsheimer <[email protected]>
* uic: Generate include statement for QActionGroupFriedemann Kleint2020-03-311-1/+1
| | | | | | | | | Legacy forms from Qt 3 may still contain QActionGroup, generate an include statement for them. Change-Id: I292967f23f798a132ec7e360e437b20a529c3a26 Complements: bcaff2b06fc46fce8a3ae6d613c025c8d097229 Reviewed-by: Volker Hilsheimer <[email protected]>
* uic: Fix remaining clang warningsFriedemann Kleint2019-06-281-1/+1
| | | | | | | | Fix remaining nullptr and member initialization issues which Qt Creator did not catch. Change-Id: If5492259aea9849c790f00809a27f4c78b446b9b Reviewed-by: Jarek Kobus <[email protected]>
* uic: Refactor CustomWidgetsInfo::extends()Friedemann Kleint2019-01-101-6/+6
| | | | | | | | | | | | Add a extendsOneOf() helper that takes a QStringList to be searched and simplify the code accordingly. In WriteInitialization::acceptWidget(), move the variable CustomWidgetsInfo *cwi up and reuse everywhere to shorten code. Task-number: PYSIDE-797 Change-Id: I331e135b6aa58dbbd413ca151eb67b3eb92f09c6 Reviewed-by: Jarek Kobus <[email protected]>
* uic: Small refactoringsFriedemann Kleint2018-12-121-2/+2
| | | | | | | | | | | | | | | | | - Do not use QString::number() to stream numbers. - Do not use QLatin1String/Char to stream strings or characters. - Add a convenience methods to determine the container page add method for simple containers. - Similarly, extract a method to determine the layout method and simplify the code accordingly. - Fix Clang warnings about else if after return/continue. - Use QString::isEmpty() instead of size() to check emptiness. - Fix QHash-contains()/value() Antipattern Task-number: PYSIDE-797 Change-Id: I9c61d20f46c8d142b947126a27faaf54b41f9e0c Reviewed-by: Cristian Maureira-Fredes <[email protected]> Reviewed-by: Jarek Kobus <[email protected]>
* uic: Add the include for QIcon conditionallyJarek Kobus2018-03-061-0/+2
| | | | | | Task-number: QTBUG-66753 Change-Id: I31bd821396b59c8e83e19e02634cf1440a271215 Reviewed-by: Friedemann Kleint <[email protected]>
* Don't generate QAction include unconditionallyJarek Kobus2018-01-151-1/+18
| | | | | | | | Generate it only when the form contains some actions. Change-Id: Ic1d64003ccff6102174771c04999cf7c90ac2ae8 Reviewed-by: Oswald Buddenhagen <[email protected]> Reviewed-by: Friedemann Kleint <[email protected]>
* Don't generate QButtonGroup include unconditionallyJarek Kobus2018-01-151-1/+2
| | | | | | | | Add it only when ui contains button groups. Change-Id: I60a249a36565e6c7c3f7cb51bc146317bc7ddbe5 Reviewed-by: Oswald Buddenhagen <[email protected]> Reviewed-by: Friedemann Kleint <[email protected]>
* Don't generate QHeaderView include unconditionallyJarek Kobus2018-01-151-1/+8
| | | | | | | | Generate it only when needed. Change-Id: I7a89b18ec0f2ee7d55fcad1b3f9701269d7616ec Reviewed-by: Oswald Buddenhagen <[email protected]> Reviewed-by: Friedemann Kleint <[email protected]>
* Remove ancient embedded pixmaps and scripts from uicJarek Kobus2017-06-121-21/+1
| | | | | Change-Id: Iec06e1af91a6d61226ae484325b1ec82810d634d Reviewed-by: Friedemann Kleint <[email protected]>
* uic: use a real ordered setMarc Mutz2016-09-121-12/+12
| | | | | | | | | | | | | | ... instead of QMap<Key, bool>. Since Qt doesn't have such a container, use std::set instead, which also simplifies some code, in particular, because, unlike the Qt containers, it does the right thing on attempted duplicate insertion: nothing. Saves 6.5KiB in text size (1.1% of total) on optimized GCC 5.3 Linux AMD64 builds. Change-Id: I9578a9a58c1c06abe58f22a5b6127d43c2f4be12 Reviewed-by: Friedemann Kleint <[email protected]>
* Tools: replace QString::trimmed() with QStringRef::trimmed()Anton Kudryavtsev2016-07-051-2/+1
| | | | | | | ... where it's possible. Reduce allocations. Change-Id: I9908d9d65177d116a8a54146274a74edb801543e Reviewed-by: Marc Mutz <[email protected]>
* Updated license headersJani Heikkinen2016-01-211-17/+12
| | | | | | | | | | | | | From Qt 5.7 -> tools & applications are lisenced under GPL v3 with some exceptions, see http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/ Updated license headers to use new GPL-EXCEPT header instead of LGPL21 one (in those files which will be under GPL 3 with exceptions) Change-Id: I42a473ddc97101492a60b9287d90979d9eb35ae1 Reviewed-by: Thiago Macieira <[email protected]> Reviewed-by: Lars Knoll <[email protected]>
* 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. Outdated header.LGPL removed (use header.LGPL21 instead) Old header.LGPL3 renamed to header.LGPL3-COMM to match actual licensing combination. New header.LGPL-COMM taken in the use file which were using old header.LGPL3 (src/plugins/platforms/android/extract.cpp) Added new header.LGPL3 containing Commercial + LGPLv3 + GPLv2 license combination Change-Id: I6f49b819a8a20cc4f88b794a8f6726d975e8ffbe Reviewed-by: Matti Paaso <[email protected]>
* Update license headers and add new license filesMatti Paaso2014-09-241-19/+11
| | | | | | | | | - Renamed LICENSE.LGPL to LICENSE.LGPLv21 - Added LICENSE.LGPLv3 - Removed LICENSE.GPL Change-Id: Iec3406e3eb3f133be549092015cefe33d259a3f2 Reviewed-by: Iikka Eklund <[email protected]>
* uic: Accept an -include argument to generate a #include.Stephen Kelly2013-11-111-0/+3
| | | | | Change-Id: I2854619ab995b4ba3c820fec58e998ad04ac9858 Reviewed-by: Friedemann Kleint <[email protected]>
* Whitespace cleanup: remove trailing whitespaceAxel Waggershauser2013-03-161-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | Remove all trailing whitespace from the following list of files: *.cpp *.h *.conf *.qdoc *.pro *.pri *.mm *.rc *.pl *.qps *.xpm *.txt *README excluding 3rdparty, test-data and auto generated code. Note A): the only non 3rdparty c++-files that still have trailing whitespace after this change are: * src/corelib/codecs/cp949codetbl_p.h * src/corelib/codecs/qjpunicode.cpp * src/corelib/codecs/qbig5codec.cpp * src/corelib/xml/qxmlstream_p.h * src/tools/qdoc/qmlparser/qqmljsgrammar.cpp * src/tools/uic/ui4.cpp * tests/auto/other/qtokenautomaton/tokenizers/* * tests/benchmarks/corelib/tools/qstring/data.cpp * util/lexgen/tokenizer.cpp Note B): in about 30 files some overlapping 'leading tab' and 'TAB character in non-leading whitespace' issues have been fixed to make the sanity bot happy. Plus some general ws-fixes here and there as asked for during review. Change-Id: Ia713113c34d82442d6ce4d93d8b1cf545075d11d Reviewed-by: Oswald Buddenhagen <[email protected]>
* Update copyright year in Digia's license headersSergio Ahumada2013-01-181-1/+1
| | | | | Change-Id: Ic804938fc352291d011800d21e549c10acac66fb Reviewed-by: Lars Knoll <[email protected]>
* Change copyrights from Nokia to DigiaIikka Eklund2012-09-221-24/+24
| | | | | | | | Change copyrights and license headers from Nokia to Digia Change-Id: If1cc974286d29fd01ec6c19dd4719a67f4c3f00e Reviewed-by: Lars Knoll <[email protected]> Reviewed-by: Sergio Ahumada <[email protected]>
* make src/tools/ compile without CamelCase headersOswald Buddenhagen2012-09-191-3/+3
| | | | | | | | so the build works with syncqt -minimal Change-Id: Ief5e8eb9a504dd6c84cff76cc3e5257450386a0f Reviewed-by: Joerg Bornemann <[email protected]> Reviewed-by: Thiago Macieira <[email protected]>
* 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: I311e001373776812699d6efc045b5f742890c689 Reviewed-by: Rohan McGovern <[email protected]>
* Update contact information in license headers.Jason McDonald2012-01-231-1/+1
| | | | | | | Replace Nokia contact email address with Qt Project website. Change-Id: I431bbbf76d7c27d8b502f87947675c116994c415 Reviewed-by: Rohan McGovern <[email protected]>
* Update copyright year in license headers.Jason McDonald2012-01-051-1/+1
| | | | | Change-Id: I02f2c620296fcd91d4967d58767ea33fc4e1e7dc Reviewed-by: Rohan McGovern <[email protected]>
* uic: #include <QLayout> for QToolBox on non-laid-out forms.Friedemann Kleint2011-05-271-1/+6
| | | | | | | | | | | | for the fake tab-spacing property, which accesses the internal layout and sets its spacing. Task-number: QTBUG-19339 Reviewed-by: Jarek Kobus <[email protected]> Change-Id: I89f5c035bd3798a0998c3046de643bda0fa8da6b (cherry picked from commit 89f5c035bd3798a0998c3046de643bda0fa8da6b) Reviewed-on: http://codereview.qt.nokia.com/173 Reviewed-by: Friedemann Kleint <[email protected]>
* Update licenseheader text in source files for qtbase 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
* uic: Remove Q3Support.Friedemann Kleint2011-05-061-20/+0
| | | | Remove code and tests.
* Initial import from the monolithic Qt.Qt by Nokia2011-04-271-0/+342
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