summaryrefslogtreecommitdiffstats
path: root/src/linguist
Commit message (Collapse)AuthorAgeFilesLines
* Add configure features for remaining qttoolsMitch Curtis2020-03-181-0/+4
| | | | | | | | | | | I only need qdoc from qttools, but building the other tools takes up quite a bit of time. qdoc already has a configure feature, so account for the rest of them. Change-Id: I0fc60393a1841229025c42b83d06f01668eb2680 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Doc: Remove \contentspage commandsTopi Reinio2020-03-151-6/+0
| | | | | | | | | | The command is deprecated and has no effect apart from generating a documentation warning. Drop the command also from the output generated by qtattributionsscanner. Change-Id: Ic286909215d55f4062ea0af790bfb9be91747a98 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Fix deprecation warningsFriedemann Kleint2020-03-041-5/+0
| | | | | | | | | | | | | Use split behavior enumeration from Qt, fixing: qdbusmodel.cpp:308:75: warning: 'SkipEmptyParts' is deprecated [-Wdeprecated-declarations] Remove the dock widget feature settings from Linguist since all features are enabled by default, fixing: mainwindow.cpp:302:45: warning: 'AllDockWidgetFeatures' is deprecated [-Wdeprecated-declarations] Change-Id: I72ada0dcbc81792d8643fc0948d86ea08847a8ec Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Use Qt::SplitBehavior in preference to QString::SplitBehaviorEdward Welbourne2020-03-026-11/+11
| | | | | | | | The Qt version was added in 5.14 "for use as eventual replacement for QString::SplitBehavior." Move another step closer to that goal. Change-Id: I7137cf8339bfe9fdcf4cb7cc695cb146aef410fb Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Prepare for internal QML Parser API changeSimon Hausmann2020-03-021-5/+12
| | | | | | | | | | With the internal API version 8, the SourceLocation will move from QQmlJS::AST to the QQmlJS namespace, and it will get its loc.startLine/loc.startColumn members back. Change-Id: I70ba5a7f7b6eca60298a7b4982bf2cf099110089 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2020-02-182-1/+1
| | | | | Change-Id: I98eaf748fdfb34f32d187718459327b8eef9c54b Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* Fix qmake warning about failure to find /xmlparser.hKai Koehne2020-02-141-1/+1
| | | | | | | This amends 9e694337058 Change-Id: Ice498c525130a895eb1079391d2a5facf923ffc2 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* lrelease: Embed target language in .qm fileKai Koehne2020-02-031-5/+16
| | | | | | | | | | | .ts, XLIFF ... contain the target language as part of the content. By embedding this information in the .qm file we can extend QTranslator so that it exposes the language a translation is actually for. Change-Id: I9a98cdf7366ab05477a0b4c1e5a2538181e06977 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
* CMake: Add Qt6 forward compatible CMake API and targetsAlexandru Croitor2020-01-242-0/+33
| | | | | | | | Task-number: QTBUG-74137 Task-number: QTBUG-80477 Change-Id: Ib33f27e476bad1cdffda1539c8befaea9070a7e6 Reviewed-by: Leander Beernaert <leander.beernaert@qt.io> Reviewed-by: Cristian Adam <cristian.adam@qt.io>
* Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2020-01-141-2/+2
|\ | | | | | | Change-Id: Ie6dc6946f0cf21c2cf57643c393e61b2deefb90d
| * Bump copyright yearJani Heikkinen2020-01-081-2/+2
| | | | | | | | | | Change-Id: I81c229523e0d896f25d6d961c9857b615218ecbb Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
* | Stop using SAX classesSona Kurazyan2020-01-088-164/+323
| | | | | | | | | | | | | | | | | | | | | | | | SAX classes for parsing XML documents will be deprecated soon. Re-implemented SAX-based xml parsing classes using QXmlStreamReader. All the parsers now inherit from XmlParser, which drives the parsing loop and allows overriding the methods for handling different XML tokens in a specific way depending on the use-case. Task-number: QTBUG-76177 Change-Id: I5393cc7218beffb4e48187e435c89d1d179deb37 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | Fix Qt6 buildAlexandru Croitor2019-12-193-3/+3
| | | | | | | | | | | | | | | | | | Change-Id: Ie413ca2e2f81ac0e92628ffd2f3e93047a91bd0c Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> (cherry picked from commit 6b2f32f3dc9de965801927a4bc5d970028a318a6) Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | Avoid initializing QFlags with 0 or nullptrFriedemann Kleint2019-11-222-2/+2
| | | | | | | | | | | | | | It is being deprecated. Change-Id: I5a2216b313c53ff7d42e02c0d91632550f3536ae Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Remove usages of deprecated APIs of QDesktopWidgetSona Kurazyan2019-10-091-1/+0
|/ | | | | | | | | | - Replaced QDesktopWidget::screenNumber(QWidget*) -> QWidget::screen() - Removed unused QDesktopWidget includes. Task-number: QTBUG-76491 Change-Id: I5be0e4aac2faa4cbd389be45ea6c45ae1eab507a Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Revert "Add empty clangcpp parser functionality"Lucie Gérard2019-10-014-124/+2
| | | | | | | | | The functionality got moved to dev. This reverts commit a79eaba195f3b235b4c8db79caa75e42b38664a8. Task-number: QTBUG-78875 Change-Id: Iaccdfb9fe2e6a56eba9baf3d44961382834139eb Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* Merge remote-tracking branch 'origin/5.13' into 5.14Qt Forward Merge Bot2019-09-271-0/+4
|\ | | | | | | Change-Id: I5c06b3e0177fcccd988620ab269f75632689a54c
| * Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-09-081-0/+4
| |\ | | | | | | | | | Change-Id: I0015980f763599ca60f28dd3408531d2a532cd6a
| | * lupdate: Warn about calls with template literalsKai Koehne2019-09-041-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | JS template literals do not really mix well with the Qt Linguist toochain, at least if template arguments are used: This makes the source string dynamic. So far qsTr(``) calls were just ignored. Now lupdate prints a warning. Task-number: QTBUG-76265 Change-Id: I935c382695a86ecd6fd076b31a68fa987be8fd84 Reviewed-by: Lucie Gerard <lucie.gerard@qt.io> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* | | Linguist: Remove splash screenhjk2019-09-111-19/+0
| | | | | | | | | | | | | | | | | | | | | | | | It starts well below 0.5s, and having the splash screen flicker around in that time is more of an irritation than it helps. Change-Id: I30648512714e588fca90f22c175bfcb7dd0f8b40 Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
* | | Add empty clangcpp parser functionalityLucie Gérard2019-08-084-2/+124
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The new parser is advertised in the help An option is added to the command line argument A new loadcpp function is added to parse with clang No code needing clang library is added yet. Change-Id: Iee07fce319e6be13d3689077ab61c1e4e44b5fc2 Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* | | Refactor lupdateLucie Gérard2019-08-089-127/+141
| | | | | | | | | | | | | | | | | | | | | | | | | | | No new code added Moving around some functions to make them available outside main. Preparing for clang cpp parser Change-Id: Iec04cc30629d43aaec870f893df5bc43a0864877 Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* | | Fix deprecation warningsFriedemann Kleint2019-07-311-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ../../../shared/qtgradienteditor/qtgradientstopswidget.cpp:963:31: warning: ‘int QWheelEvent::delta() const’ is deprecated: Use angleDelta() [-Wdeprecated-declarations] helpviewer_qtb.cpp:280:18: warning: ‘int QWheelEvent::delta() const’ is deprecated: Use angleDelta() [-Wdeprecated-declarations] shared/previewmanager.cpp:626:84: warning: 'void QWidget::getContentsMargins(int*, int*, int*, int*) const' is deprecated: use contentsMargins() [-Wdeprecated-declarations] mainwindow.cpp:2812:27: warning: ‘int QWheelEvent::delta() const’ is deprecated: Use angleDelta() [-Wdeprecated-declarations] Change-Id: Ib6e675b08d1c4445a2333676432129b765da8d0e Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | | Merge remote-tracking branch 'origin/5.13' into devQt Forward Merge Bot2019-07-231-1/+1
|\| | | | | | | | | | | Change-Id: I6583a8d818ef437d24384c63683da7669cd62d87
| * | Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-07-161-1/+1
| |\| | | | | | | | | | Change-Id: I0b7c7105d6c6df81a1c955b7edf475b5f173c1d2
| | * CMake: Ensure unique lst file name in qt5_create_translationKai Koehne2019-07-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | get_filename_component(... NAME_WE) will remove all suffixes, so files like myapp.de.ts and myapp.en.ts will return the same base name. To just remove the .ts, we could switch to NAME_WLE, but that was only introduced in CMake 3.14 it seems. But why bother at all? The lst file name doesn't have to be pretty... Fixes: QTBUG-76723 Change-Id: I42e46310fe5e9cfb0a82f303ade700f3f0b1b600 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | | Merge remote-tracking branch 'origin/5.13' into devQt Forward Merge Bot2019-07-162-1/+4
|\| | | | | | | | | | | Change-Id: I51fa8c90923e9730d7787e763fad996db51d350e
| * | lrelease: Fix crash on projects without TRANSLATIONS assignmentJoerg Bornemann2019-07-101-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | Add missing nullptr check. Fixes: QTBUG-76930 Change-Id: I2dc99db43b12cebc6fbe9024057ba963e0ae470f Reviewed-by: Kai Koehne <kai.koehne@qt.io>
| * | Doc: Replace example file lists with links to code.qt.ioTopi Reinio2019-07-091-0/+1
| | | | | | | | | | | | | | | | | | Task-number: QTBUG-74391 Change-Id: Iced8f21af188b249a0ac59f71fa2fb7cb6a52869 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* | | Be less laissez-faire with implicit conversions to QCharMarc Mutz2019-07-123-10/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QChar currently is convertible from nearly every integral type. This is bad code hygiene and should be fixed come Qt 6. The present patch is the result of compile fixes from marking these constructors explicit. As is clear from the distribution of fixes, only low-level string handling code used these implicit conversions, an indication that they're not in widespread use elsewhere. Change-Id: I02483d08d6a3ce85f574a6e0407b19d017c5032f Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* | | Merge remote-tracking branch 'origin/5.13' into devQt Forward Merge Bot2019-07-112-21/+97
|\| | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf Change-Id: If0d8f3f1dc3be742bb2fadb7873eabdd6f46d3d1
| * | Doc: Complete documentation lupdate and lreleaseNico Vertriest2019-07-082-21/+97
| | | | | | | | | | | | | | | | | | Task-number: QTBUG-76289 Change-Id: If51fa339cd65d793e8f83a358561bf3be340a0ce Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* | | Merge remote-tracking branch 'origin/5.13' into devQt Forward Merge Bot2019-06-292-0/+127
|\| | | | | | | | | | | Change-Id: Ibe9557a8639e2717c646b40ad25511e7bea55168
| * | Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-06-272-0/+127
| |\| | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf Change-Id: I3a828f7cf61510f0bb179b760c8a335629d3c852
| | * Qt Linguist: Document CMake macrosKai Koehne2019-06-202-0/+127
| | | | | | | | | | | | | | | | | | Task-number: QTBUG-72159 Change-Id: I817e1d562675c0aa462706a1e90e758030ce7d1e Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
* | | Adapt to new signature for QQmlJS::DiagnosticMessageUlf Hermann2019-06-241-18/+13
| | | | | | | | | | | | | | | Change-Id: I6282b4ba75fbb5f5c763044b29ed2f6cf2eaffd6 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | | Merge remote-tracking branch 'origin/5.13' into devQt Forward Merge Bot2019-06-182-8/+14
|\| | | | | | | | | | | Change-Id: If77476dd8230654b179c7020d84dd240cc3f47b9
| * | Remove extra \n when reading translator comment from .po fileLucie Gérard2019-05-241-6/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Extra \n was added at the end of the translator message (cf slurpComment). This was visible from the ts file in case of convertion. But the round trip .po to .ts to .po was correct because of the way messages are read from the .ts file (cf poEscapedLines) Both functions are modified, no extra \n is added, the roundtrip works, autoTest are all passed. Fixes: QTBUG-67908 Change-Id: Ie55572f9609c71c164b2ab939bf0c0d0ca1afc20 Reviewed-by: André Hartmann <aha_1980@gmx.de> Reviewed-by: Kai Koehne <kai.koehne@qt.io>
| * | Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-06-111-2/+2
| |\| | | | | | | | | | Change-Id: Ib0252441ebf43cbd0857bae7b72a7567473105fa
| | * lupdate: Improve documentation of -recursive, -no-recursiveKai Koehne2019-06-061-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 'the following' directories can be read in the sense that the arguments are positional, and that e.g. lupdate -no-recursive x -recursive y will scan x without subdirectories, but y with subdirectories. However this is not the case; -recursive and -non-recursive are binary options that affect all directories scanned in a run. Task-number: QTBUG-76243 Change-Id: I417a84708b7228890d0644aed582dbb9073de1a8 Reviewed-by: Lucie Gerard <lucie.gerard@qt.io> Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* | | Port from QLatin1Literal to QLatin1StringGiuseppe D'Angelo2019-06-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | QLatin1Literal is an undocumented and deprecated typedef for QLatin1String, just use the original. Change-Id: I8fb7e75deeca45f154a4a9b27e8dd3eea21d8df5 Reviewed-by: hjk <hjk@qt.io>
* | | qmake: replace QLinkedList with std::listMarc Mutz2019-05-232-7/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is in preparation of deprecating QLinkedList. There is but one substantial change: Instead of copying the linked list, we move it now, and instead of copying items between these two lists, we use std::list::splice(), which just relinks nodes. It is a bit surprising that the comment on the ProValueMapStack suggests references into the container must remain stable, and then some code changes addresses by making copies of the elements. This was probably a bug waiting to manifest itself. This applies the relevant portions of qtbase/7cba2acd2cc4b68b5a4de2251ab555adb09bf7e8 Change-Id: Ie3d2ff11a38d82ef22e35402c9755757853c9a7a Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* | | ProFileEvaluator: prepare for a qmake API changeMarc Mutz2019-05-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ProValueMapStack is no longer going to be a QLinkedList, but a std::list. Use std names. Change-Id: Ib7b1a766a654bd3ecc49c1fe2438d3d0b2ced0ff Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* | | Fix deprecation warnings about deprecated container conversionsFriedemann Kleint2019-05-233-6/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | Fix warnings introduced by qtbase/92f984273262531f909ede17a324f546fe502b5c. Change-Id: Iaca85ad36591f7208f63305b885e7ff59c014a72 Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | | qmake: use std names on a linked listMarc Mutz2019-05-233-18/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is preparation of moving from QLinkedList to std::list, which is in preparation of deprecating QLinkedList. This applies the relevant parts of qtbase/0d88721d772fd995a39cc2417a2a0dabee403b7d. Change-Id: Ia5a6d592bbf8401abaedbecf59d886502cc644f4 Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* | | Merge remote-tracking branch 'origin/5.13' into devQt Forward Merge Bot2019-05-042-1/+3
|\| | | | | | | | | | | Change-Id: I7c7547f73956d0856103634a59ae3c606b80345d
| * | Doc: Clear 'moduleheader' for tool manualsTopi Reinio2019-05-032-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | These manuals contain no C++ API documentation, and there is no associated module headers - clearing the moduleheader variable in documentation configuration stops QDoc from warning about them. Change-Id: I71b8ec81800025d9de18b83871a9881c1246f153 Reviewed-by: Martin Smith <martin.smith@qt.io>
* | | Merge remote-tracking branch 'origin/5.13' into devQt Forward Merge Bot2019-04-278-70/+121
|\| | | | | | | | | | | Change-Id: I388e646bec0ef1de734702568f9bd65877bde97a
| * | Merge remote-tracking branch 'origin/5.12' into 5.13Liang Qi2019-04-248-70/+121
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf src/qdoc/qmlmarkupvisitor.h src/qdoc/qmlvisitor.h tests/auto/qtattributionsscanner/testdata/good/expected.json Done-With: Kai Koehne <kai.koehne@qt.io> Change-Id: I180ee214d1e5999fc1279b092bd9214b6bf8f858
| | * CMake: Fix policy warning CMP0058 when using qt_create_translation(...)Kai Koehne2019-04-031-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Properly declare the generated _lst_file that lists all lupdate input files as a BYPRODUCT. This is required by the Ninja backend to properly track the build dependencies, and fixes a CMake warning CMP0058. Task-number: QTBUG-71354 Change-Id: Idb3481ef1f0d6763ce14849ca57cb12647d41703 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>