summaryrefslogtreecommitdiff
path: root/src/shared
Commit message (Collapse)AuthorAgeFilesLines
* Fix static analysis/clazy warnings about QString::arg()/multiFriedemann Kleint2023-05-032-17/+14
| | | | | | | | In some cases, remove QString::number() for int. Pick-to: 6.5 Change-Id: I60260afbbb3045448025983e37974667f2eeb51a Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
* Qt Designer: Fix editing horizontal alignment propertiesFriedemann Kleint2023-04-061-1/+1
| | | | | | | | | | Fix slot connection, amending f6c9325f639d882992bb3c6386185defd2090498. Pick-to: 6.5 Fixes: QTBUG-112682 Change-Id: Idb325f31ed8f454433f4b8d28183a571877972ff Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
* Do not add QLocale::system() manually to the list of matching localesMate Barany2023-02-141-2/+0
| | | | | | | | | | | | In the scope of QTBUG-106644 QLocale::system() is now included in the list of matching locales, it is no longer needed to add it to the list manually. Fixes: QTBUG-106644 Change-Id: I1eff7851a26aadc3968c18ec1b1eaf26feabd847 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
* Doc: Remove duplicate wordsAndreas Eliasson2023-02-091-1/+1
| | | | | Change-Id: If596f8677bbebba160e740dfcc24bba064dcb85f Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
* QtTools: Replace string connection leftovers with typed connectionsJarek Kobus2023-01-303-7/+8
| | | | | | Pick-to: 6.5 Change-Id: Ib52412754f1bba53e3cd16c5aa51716e2679c0e7 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* QtToolBarDialog: Remove private slots - part 5Jarek Kobus2023-01-302-51/+35
| | | | | | Pick-to: 6.5 Change-Id: Ic7656edbf68ebd79945d07d0e8f3194b4275d905 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* QtEditorFactory: Remove private slots - part 4Jarek Kobus2023-01-302-233/+186
| | | | | | Pick-to: 6.5 Change-Id: I1624b802393d53eabfe7da35e1077f96cdb78ebc Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* QtVariantProperty: Remove private slots - part 3Jarek Kobus2023-01-302-207/+245
| | | | | Change-Id: Ie88fdbcd70dab09e2aad58daab9e9859eb0a3ff2 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* QtPropertyManager: Remove private slots - part 2Jarek Kobus2023-01-302-103/+72
| | | | | | Pick-to: 6.5 Change-Id: I4e17e8ba3bd5b5f9c1edeb9ad2ec1a5d085f0c3c Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* QtPropertyBrowser: Remove private slots - part 1Jarek Kobus2023-01-308-90/+55
| | | | | | | | | | | | Do it inside QtPropertyBrowser and subclasses. Replace them with lambdas. Remove unneeded includes. Fix return values. Pick-to: 6.5 Change-Id: I8a04fcc411741ebf132955b8d084fa13b65cf65d Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Qt Designer: Remove Q_DECLARE_METATYPE(QtIconMap)Friedemann Kleint2023-01-302-4/+2
| | | | | | | | | | | | | It causes clashes with qmetatype.h's Q_DECLARE_ASSOCIATIVE_CONTAINER_METATYPE(QMap) in CMake Unity (Jumbo) builds and is reportedly unnecessary. See https://lists.qt-project.org/pipermail/development/2022-July/042744.html Pick-to: 6.5 Task-number: QTBUG-109394 Change-Id: Ie8fae63cccb87da9152cfc4d1be5cc4068407a34 Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
* Qt Designer: Remove some old-style connectsFriedemann Kleint2023-01-262-16/+18
| | | | | | Pick-to: 6.5 Change-Id: I844e9f5217b6f14859aac7cba799d56938aa442f Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
* Qt Designer: Disambiguate static variables and functionsFriedemann Kleint2023-01-251-5/+5
| | | | | | | | | They cause conflicts in CMake Unity (Jumbo) builds. Pick-to: 6.5 Task-number: QTBUG-109394 Change-Id: I896678dd4c189c27b59b1338881702dcbe5f7e88 Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
* Qt Designer/Property Browser: Remove duplicate instance of QtCursorDatabaseFriedemann Kleint2023-01-254-28/+29
| | | | | | | | | It causes conflicts in CMake Unity (Jumbo) builds. Pick-to: 6.5 Task-number: QTBUG-109394 Change-Id: Ic9e1740b360381fffaf85fc1fe1da8731852b81b Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
* Nomenclature change: country -> territoryEdward Welbourne2022-11-151-22/+21
| | | | | | | | | | | In line with the recent change in QLocale's nomenclature, do the same in Linguist. In the process, obtain a list of territory enum values sorted by territory name a little more efficiently, bypassing an intermediary unsorted list of territory enum values. Change-Id: I18fed74499312f0b502bc8a93fbb2a69c65bca05 Reviewed-by: hjk <hjk@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Port from qAsConst() to std::as_const()Marc Mutz2022-10-0610-25/+25
| | | | | | | | | | | | | | | We've been requiring C++17 since Qt 6.0, and our qAsConst use finally starts to bother us (QTBUG-99313), so time to port away from it now. Since qAsConst has exactly the same semantics as std::as_const (down to rvalue treatment, constexpr'ness and noexcept'ness), there's really nothing more to it than a global search-and-replace. Task-number: QTBUG-99313 Change-Id: I234704ba429750ddee958a82f6c941d041da0653 Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io> Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
* Port from container::count() and length() to size()Marc Mutz2022-10-067-29/+29
| | | | | | | | | | | | | | | | | | | | | | This is a semantic patch using ClangTidyTransformator as in qtbase/df9d882d41b741fef7c5beeddb0abe9d904443d8: auto QtContainerClass = anyOf( expr(hasType(cxxRecordDecl(isSameOrDerivedFrom(hasAnyName(classes))))).bind(o), expr(hasType(namedDecl(hasAnyName(<classes>)))).bind(o)); makeRule(cxxMemberCallExpr(on(QtContainerClass), callee(cxxMethodDecl(hasAnyName({"count", "length"), parameterCountIs(0))))), changeTo(cat(access(o, cat("size"), "()"))), cat("use 'size()' instead of 'count()/length()'")) a.k.a qt-port-to-std-compatible-api with config Scope: 'Container', with the extended set of container classes recognized. Change-Id: I95f6410e57a6a92b1cf91bbedfbe3d517cab6b44 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Kai Koehne <kai.koehne@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Qt Designer: Fix a crash when reading a device profileFriedemann Kleint2022-06-031-1/+1
| | | | | | | | | QString::operator()[] no longer returns a char ref, so, isEmpty() must be checked first. Pick-to: 6.3 6.2 Change-Id: I22d9787bf3f032104fced0608d32cb27799a4bd7 Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
* Fix warnings after change in qtbaseVolker Hilsheimer2022-05-251-3/+3
| | | | | | | | | | 53ee4c8b1f7ae72e7005166e1c0dbc4659f2ab32 in qtbase deprecated the int- overloads of set(Text)Alignment, so cast explicitly to Qt::Alignment here when we combine enum values from different enum types. Fixes: QTBUG-103797 Change-Id: Ibef91b7df71b1d8d05cad9f1573f1e81d949a3c3 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Use SPDX license identifiersLucie Gérard2022-05-1960-2335/+126
| | | | | | | | | | | 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: I5335388c0472b0ee554234fc7eca60769e504660 Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* Port from QLocale::Country to QLocale::TerritoryVolker Hilsheimer2022-03-211-70/+73
| | | | | | | | | | | | | Mostly a search and replace exercise, including the various internal data structures and variables that used to have "country" or "countries" in the name. No change to the DOM structure, where the territory is still stored in a "country" node. We'd have to keep both anyway to keep compatibility, and introducing support for either has no value. Change-Id: Icc2818615257d529e3401c0e28370560cdb3dc7e Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* Compile without warning after QString::count deprecationVolker Hilsheimer2022-03-212-3/+3
| | | | | | Pick-to: 6.3 Change-Id: Ie3a3f8833bf88716f3b13540e74ea7800c07234c Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
* tools: do not rely on transitive includesFabian Kosmale2022-03-183-0/+3
| | | | | Change-Id: Ib78f984827988a39f56c4423eae40c67797549ea Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* Fix set-but-not-read warning in QtGroupBoxPropertyBrowserPrivateShawn Rutledge2022-02-041-12/+1
| | | | | | | | oldRow was set but not read. Pick-to: 6.3 Change-Id: I6a7616a9f9cd85152fa451b404ea75c1be9099f0 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Remove unused .qrc filesJoerg Bornemann2022-01-1812-105/+0
| | | | | | | Task-number: QTBUG-94446 Change-Id: I4b57f84f7c817989955d2088a6314d4194f4995d Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* designer: Fix MSVC warning about returning address of local variable or ↵Kai Köhne2022-01-051-7/+2
| | | | | | | | | | | | | | | | | | | | | temporary std::reverse_iterator::operator*() returns by reference while QKeyValueIterator::operator*() returns by value, so MSVC is correct when it warns about returning the address of a local variable or temporary in (*itStop).second: C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.30.30705\include\xutility(1582) : error C2220: the following warning is treated as an error C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.30.30705\include\xutility(1582) : warning C4172: returning address of local variable or temporary Avoid this by just iterating backwards. Amends 6ed8a22dd2756557954dc85052870c0894de06ba. Pick-to: 5.15 6.2 6.3 Change-Id: I01ce7cb151efa61e8702686b3a463790869df72c Reviewed-by: Marc Mutz <marc.mutz@qt.io> Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* Remove macdeployqt and windeployqtJoerg Bornemann2021-11-266-2251/+0
| | | | | | | | | | | These tools have been moved to qtbase. Change-Id: Idaf799d44be399040f9058252675c0ee3eecc39b Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Iikka Eklund <iikka.eklund@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* windeployqt: Replace qmake querying with qtpathsKai Köhne2021-11-102-3/+3
| | | | | | | | | | | | | | We want to make qmake optional mid-term. Therefore, qtpaths in Qt 6.2 got the same '-query' functionality. Use that by default in windeployqt. [ChangeLog][Build Tools] windeployqt now uses qtpaths.exe instead of qmake.exe to query paths related to the Qt installation. This is also reflected in a new -qtpaths command line argument, which replaces the -query argument. Change-Id: I36c75c0fd0f3c50ea5dce74eb2cf6d78ab074824 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Gradient editor: replace string-based connections with typed connectionsJarek Kobus2021-11-0516-421/+373
| | | | | | | | | This fixes some already broken connection due to removal of some signals in Qt 6. Pick-to: 6.2 Change-Id: I7dbe44c3d9307539530cd74c1f1658e2a58954c7 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* winutils: Remove unused methodKai Köhne2021-10-212-19/+0
| | | | | Change-Id: Icc6e8988b0a6a2fddfc6f2d8b8a7386d132d2fc0 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Replace 0 with nullptrZhang Hao2021-10-1812-45/+45
| | | | | | | | We know that c++11 uses nullptr to replace 0, so we replace 0 with nullptr in the project. Change-Id: I52e3b70f58c477414ad8187e3d3cdae25408ecc7 Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
* Remove QMake project filesJoerg Bornemann2021-02-1210-91/+0
| | | | | | | | | | This includes removal of the corresponding .prev_CMakeLists.txt files. Pick-to: 6.1 Task-number: QTBUG-88742 Change-Id: I3f360105a8cd43ad37dec6bfc6509ce95c79ee76 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Cristian Adam <cristian.adam@qt.io>
* Stop using QScopedPointer::takeGiuseppe D'Angelo2020-11-271-6/+6
| | | | | | | | | | | Port to unique_ptr instead. CoreConServer could benefit from slightly more intrusive changes (by using a std::vector<std::unique_ptr<CoreConDevice>> instead of a list of raw pointers), but that is not part of this change. Change-Id: Ia139fb23b5e60964fa6775d149b7ab32d93671e0 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Windows utils: Remove runElevatedBackgroundProcess()Friedemann Kleint2020-11-122-40/+0
| | | | | | | It was used by winrtrunner. Change-Id: If24d854c6ba0514c464aa49acbe99c1a0def7fa4 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* Get rid of all instance usage of QFontDatabaseVolker Hilsheimer2020-11-023-12/+9
| | | | | | | | All QFontDatabase APIs are static, use them accordingly. Task-number: QTBUG-88114 Change-Id: Ia31862d18aae1e4f2ad23a10af94fc47d6ec4c82 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Qt Designer: Port away from deprecated QVariant::TypeFriedemann Kleint2020-10-281-155/+155
| | | | | Change-Id: Ie0f7364454047ca7c9715f8d48814d71334a3cde Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Fix compile warnings from deprecated QBitmap conversionVolker Hilsheimer2020-09-251-9/+3
| | | | | | | Simplify code a bit at the same time. Change-Id: If09cf8dcb742e814408ee4145c43636d7f8d6142 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* windeployqt: Add optional qmake parameterOliver Wolff2020-09-162-3/+3
| | | | | | | | | | | In a crosscompilation setup (for example Windows arm64) windeployqt will pick up the wrong Qt libraries. At the moment qmake is the only way to determine information about the Qt build even if cmake was used to build Qt. By passing the path to the proper qmake, windeployqt will deploy the correct libraries for the build. Change-Id: I14992b1c27cce774440fa16abcc2abb30bec641a Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Use OpenType font weightsJonas Karlsson2020-09-031-5/+1
| | | | | | | | | | | | | | | | | | | In Designer, the only way the user can affect the weight of the font is by checking/unchecking "bold", and this is stored as a separate element in the XML. It is undefined which one takes precedence if they do not match (in fact, uic and Designer behaves differently in this case.) To avoid this confusion as well as keep compatibility with old files after we changed the scale of QFont::Weight to match that of OpenType, we just ignore the weight element in the input file. We also stop writing the duplicate information to the file. Task-number: QTBUG-42248 Change-Id: I08682f697a96d764c068e47bdab5d0f45cc2150b Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
* Adapt to latest changes in qtbaseJarek Kobus2020-09-032-3/+3
| | | | | | | | | Adapts to changes in: 1. QPalette / QFont regarding mask resolving. 2. QVariant::canConvert expecting now QMetaType instead of int. Change-Id: Ief7405a1639e4b060a13ee63cfe3ad13d77e66ab Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Fix unqualified calls to sin/cosGiuseppe D'Angelo2020-08-141-4/+4
| | | | | | | | | | The code never included <math.h> but qmath.h, which doesn't bring in ::sin and ::cos but std::sin and std::cos. Even better, it brings in qSin/qCos so just use those. Change-Id: I4778102d1e8d7069885513f7496934490206e621 Reviewed-by: Kai Koehne <kai.koehne@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Property browser: pass QDate and QTime by value, not const referenceEdward Welbourne2020-08-106-56/+53
| | | | | | | They're value types, packaging qint64 and int, respectively. Change-Id: I644afd2c851a027645230a12dfa4cceebd780ac2 Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
* Remove winrt specific codeOliver Wolff2020-08-061-3/+0
| | | | | | | | Task-number: QTBUG-84434 Change-Id: I9c3a661e490f3dccea893e213939953465d8970e Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: André de la Rocha <andre.rocha@qt.io> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Fix build after removal of QStyleOption::init in qtbaseVolker Hilsheimer2020-06-221-1/+1
| | | | | | | Use QStyleOption::initFrom instead. Change-Id: I9d286f09e4761ec90791ba495be4e7e98a5fe200 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Fix some left-over deprecation warnings about QMouseEvent accessorsFriedemann Kleint2020-06-161-1/+1
| | | | | | | | | | | | qtgradienteditor/qtgradientwidget.cpp:399:40: warning: ‘QPointF QMouseEvent::localPos() const’ is deprecated: Use position() [-Wdeprecated-declarations] qpixeltool.cpp:351:18: warning: ‘int QMouseEvent::x() const’ is deprecated: Use position() Amends d0a89adc3ae6abcb639ec6fa66472bbb482c9302. Task-number: QTBUG-20885 Task-number: QTBUG-84775 Change-Id: Ib62fcc0580621a6f625b140d47df02a94c4fd6fc Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* Port QtTools from QStringRef to QStringViewKarsten Heimrich2020-06-152-2/+2
| | | | | | Task-number: QTBUG-84319 Change-Id: Idb5a41172ea38b2f4edf385d67c1cdc2968a8d8c Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Replace calls to deprecated QEvent accessor functionsShawn Rutledge2020-06-114-26/+26
| | | | | | | | | | | | | | | | | | | | Several event accessors were deprecated in qtbase/24e52c10deedbaef833c0e2c3ee7bee03eacc4f5. Replacements were generated by clazy using the new qevent-accessors check: $ export CLAZY_CHECKS=qevent-accessors $ export CLAZY_EXPORT_FIXES=1 $ ../qt6/configure -platform linux-clang -developer-build -debug -no-optimize-debug -opensource -confirm-license -no-pch QMAKE_CXX=clazy $ make $ cd ../../qt6/qttools $ find . -name "*.clazy.yaml" $ clang-apply-replacements . Task-number: QTBUG-20885 Task-number: QTBUG-84775 Change-Id: Ic08d1f0bc4f14c6477a44d911e54700e8ced17a9 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Other tools: Use QList instead of QVectorJarek Kobus2020-06-095-16/+18
| | | | | | Task-number: QTBUG-84469 Change-Id: I3c195691a310226ab0eee76c0f60ffa4751dee62 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Revert "Qt Designer: Migrate from QList to QVector"Friedemann Kleint2020-06-0814-79/+79
| | | | | | | | | | This reverts commit ee87edebe6f934ec915b7cb4a0f5a28f73e9f221. The official class name will be QList. Task-number: QTBUG-84469 Change-Id: Ia6c1f0ed64b3ef3d5b8e0c0435ec76fbe76f867b Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
* Fix MSVC runtime detection for WinRT debug binariesPaweł Wegner2020-06-031-1/+1
| | | | | | | | | | | Prior to the fix if the app depends on any library with 'app' substring in the name the build will always be detected as release. For example WinRT apps which depend on vccorlib_app library will always be detected as release. Change-Id: Ib17376962f3d5120211338b4baa08a431a226dd7 Pick-to: 5.15 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>