aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/macros
Commit message (Collapse)AuthorAgeFilesLines
* Add long descriptions to some pluginsLeena Miettinen2024-05-311-1/+4
| | | | | | | | | | | | Edited the short descriptions to answer the question "What can I do with this extension" to help users decide whether they need it. In long descriptions, tell users what else they need to be able to use the plugin. Change-Id: Iefce7505b61fc77cf38cc915f1f7dbd25c9cb570 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* PluginSpecs: Change URLs from http:// to https://Alessandro Portale2024-05-281-1/+1
| | | | | | | | | | Avoid the redirect that is inevitable nowerdays. Also, change necessitas.kde.org to www.qt.io, since the orgininal page is offline. Change-Id: Ib1823f0df97d2df87822fd2bb7552e2f2c7e971e Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
* Core: Rename ActionBuilder::setOn* to addOn*hjk2023-12-131-4/+4
| | | | | | | There could be multiple connections. Change-Id: I7dbca9d24599f776b7d1f1bfa11826e3eeb5640a Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* Core: Rename ActionBuilder::setContainer to addToContainerhjk2023-12-131-4/+4
| | | | | | | An action/command can be used in several places. Change-Id: Ifa26f64f7d200d93ada13f272de0fa833f886997 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* Macro: Fix validation of save dialogChristian Stenger2023-12-041-1/+7
| | | | | Change-Id: I2a19e2954057b816152d6c5a01648f4b6db0a3ed Reviewed-by: hjk <hjk@qt.io>
* TaskTree: Rename TreeStorage<> -> Storage<>Jarek Kobus2023-11-201-1/+1
| | | | | | | | This addresses the 20th point in the master task below. Task-number: QTCREATORBUG-28741 Change-Id: I696beda87430fbe637abba8054012fb77516e220 Reviewed-by: hjk <hjk@qt.io>
* Macros: Use ActionBuilderhjk2023-11-131-31/+34
| | | | | Change-Id: Iea9d79e97b503122830e281c2997289ab5862803 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* Macros: Move plugin class definition to .cpphjk2023-11-134-80/+63
| | | | | Change-Id: I7ac41e64dd4b3b52876aaafd77218c330e220f67 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* Macro: Inline SaveDialoghjk2023-11-136-113/+59
| | | | | | | | | Not worth the file pair. Also modernize MacroManager a bit. Change-Id: I88f6add3147390e3900beebacc4a3f5255eac7ea Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* Macros: Remove Q_OBJECT macro from some classes that don't need ithjk2023-11-107-38/+24
| | | | | | | Plus some code cosmetics. Change-Id: Ifa9c4e7322ae7a2d5c1480f7afc58f020efcbc1c Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* All: Even less #include <QSettings>hjk2023-09-271-1/+0
| | | | | Change-Id: Ifbb2af34169036236e6f2f7b09ef115de5c6a6c7 Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
* All: Remove some unneeded #includeshjk2023-09-271-1/+0
| | | | | Change-Id: If9a8fb5e0b32424e3b37ecf3adefc060f86b3630 Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
* Replace QFile::exists by QFileInfo::existshjk2023-09-011-1/+1
| | | | | | | | QFile::exists only calls QFileInfo::exists, so this saves one function call per invocation. Change-Id: I41cb407345654eeead14455a4955b8b9b015aedc Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* Build: Change plugin json.in files to CMake styleEike Ziller2023-07-251-15/+15
| | | | | | | | | | | | | They were still using variables in qmake style. Directly use CMake variables in the json.in files and remove the no longer needed escaping of quotes. Adds a fatal message if it detects the old style in a .json.in file for easier porting. Change-Id: I8de88d8db2da55781f0e9d72eda03f943723188e Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Cristian Adam <cristian.adam@qt.io>
* Reduce usage of app_version headerEike Ziller2023-06-262-5/+2
| | | | | | | | | | | | Most information is available via Q(Core|Gui)Application. Add an AppInfo structure for the things that are not. This avoids that the information ends up duplicated and hardcoded in the plugins, which is not needed or desired. Change-Id: I4d565e75c42a7b8facafa90c27096ea49359215d Reviewed-by: Alessandro Portale <alessandro.portale@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Fix occurrences of the contains/insert anti-patternChristian Kandeler2023-06-231-2/+3
| | | | | | | | | Introduce and make use of Utils::insert() for QSet with a return value that indicates whether insertion actually happened. Change-Id: I655e4bc3553b74fea5ae8956205e4d8070118d63 Reviewed-by: hjk <hjk@qt.io> Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* Merge remote-tracking branch 'origin/11.0'Eike Ziller2023-06-066-233/+186
|\ | | | | | | | | | | | | Conflicts: tests/manual/subdirfileiterator/tst_subdirfileiterator.cpp Change-Id: I6fa8fbed152efc4033fa69e1ab67ced7e2ad35bc
| * Macros: Merge macrooptionswidget.{h,cpp} into macrooptionspage.cpphjk2023-06-016-233/+186
| | | | | | | | | | Change-Id: I4493d781a503dde252ae6ad4d705e378b5b0ed51 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* | FindFlags: Move it into Utils libJarek Kobus2023-05-264-44/+44
|/ | | | | | | | It's going to be reused in filesearch.h API. Change-Id: I7ef133368536a647e19949ba8623134cf078a87d Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* MacroLocatorFilter: Remove the old matchesFor() implementationJarek Kobus2023-05-122-55/+2
| | | | | | | | Change-Id: I44869742c590125805eab277464ffde3df3a2bc2 Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* Layouting: Drop compile dependency on BoolAspecthjk2023-05-021-2/+0
| | | | | | | Change-Id: I4068048f470db126a2583d6b1b90245205cfd601 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* ILocatorFilter: Simplify Sync's onSetup in matchersJarek Kobus2023-04-271-2/+0
| | | | | | | | | | | | | | Remove no longer necessary bool return value from onSetup functions and from refresh recipe functions, see df5e3c587a045fbd3d50233ecdde0e06dccf35a3. By default, when no return bool is specified inside a function passed to Sync element, it's assumed that the return value is true. Eliminate passing "=" captures in 2 lambdas. Change-Id: I5005821444a386f70c0f05322812f98d3fd49926 Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
* MacroLocatorFilter: Reimplement matchers()Jarek Kobus2023-04-262-2/+52
| | | | | | Change-Id: I90e638e68414e8b6fc38cc98d85720d05a78df50 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* Utils: Make Layouting a top level namespacehjk2023-04-251-1/+1
| | | | | | | | | | The whole machinery is now almost only layoutbuilder.{h,cpp}, mostly independent of the rest of Utils. Idea is to finish the separation to make it stand-alone usable also outside creator. Change-Id: I958aa667d17ae26b21209f22412309c5307a579c Reviewed-by: Eike Ziller <eike.ziller@qt.io> Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
* MacroLocatorFilter: Use Acceptor for LocatorFilterEntryJarek Kobus2023-04-202-28/+18
| | | | | | Change-Id: Ie7aa7d81e1b81190b2966de09dc04b3ffb2691ea Reviewed-by: Eike Ziller <eike.ziller@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
* Merge remote-tracking branch 'origin/10.0'Eike Ziller2023-04-131-0/+1
|\ | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/python/pipsupport.cpp src/plugins/qtsupport/exampleslistmodel.cpp src/plugins/qtsupport/examplesparser.cpp tests/auto/examples/tst_examples.cpp Change-Id: I00273622423fa99d41621969f6ecbbdaa0e18664
| * Fix lots of tr.h files not being mentioned in CMakeLists.txtEike Ziller2023-04-011-0/+1
| | | | | | | | | | | | | | Change-Id: I63d364ac50d9587339b10a5571870cb9a81c54ee Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: hjk <hjk@qt.io>
* | LocatorFilterEntry: Discourage the use of internalDataJarek Kobus2023-04-051-1/+2
|/ | | | | | | | | | | | | | | Drop internalData from c'tor. The internalData is going to be removed, soon. Drop also the icon arg from c'tor since LocatorFilterEntry instances are usually created in non-main thread, while operating on QIcon instances isn't really safe in non-main thread. The use of QIcon inside this struct is a subject to change in the future, in a way like it was done in other parts of code that generated icons from non-main thread. Change-Id: Ic6aa719a64e5fbd65883c54149796057c632780e Reviewed-by: David Schulz <david.schulz@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* LocatorFilterEntry: Add linkForEditorJarek Kobus2023-02-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make it of std::optional<Utils::Link> type. Use it for: 1. Removing duplicates 2. Showing link inside editor Before, QVariant internalData was used in above cases. Rationale: 1. Removing duplicates between results from different ILocatorFilter makes only sense if accept() overload for these filter types are the same (i.e. the implementation is repeated). Otherwise, we are loosing some functionality when some result is removed. Taking into account that original intention was to eliminate duplicates for filters where we do BaseFileFilter::openEditorAt() inside accept(), we store linkForEditor in 3 cases (instead of storing internalData): - BaseFileFilter - FileSystemFilter (only existing file case) - OpenDocumentsFilter We don't save a linkForEditor where we stored QString inside internalData in the following cases: - JavaScriptFilter - FileSystemFilter (non existing file case) Before, in above cases, we could have filtered out some results unintentionally. This patch should fix it. Now, we remove duplicates only for enties that have value for linkForEditor. 2. Use directly linkForEditor, if exists, for opening editor. This patch aims to decrease the number of different responsibilities of internalData by 1. Make 3rd arg of LocatorFilterEntry c'tor default. Change-Id: I144c58661d7456bb5991f8077dc103272dfab194 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: David Schulz <david.schulz@qt.io>
* Some fixes in translated stringsEike Ziller2023-02-151-1/+1
| | | | | | | | | | | | | | - doesn't make sense to translate "%1" - showPreprocessedFile: "reason" contains full stop, put at the end - add missing closing > - remove whitespace at the end of translated string - added missing quotes and full stops - Remove some control text from tr Change-Id: I5537c3d12d038e25e2209af1198129fbf959b43c Reviewed-by: Alessandro Portale <alessandro.portale@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
* Translations: Change translation context prefix from "::" to "QtC::"Alessandro Portale2023-02-101-1/+1
| | | | | | | lupdate would be confused by translation contexts starting with :: Change-Id: Ie95e73436fd3cafc80a8e89f908efadc747e644c Reviewed-by: hjk <hjk@qt.io>
* Qbs: Update some qbs filesChristian Stenger2023-02-081-0/+1
| | | | | | | | List respective tr files and while at it shuffle some of the listed files to match common sort order. Change-Id: I73845ad1dae5e8c86d3741067f40b7b2b37e2a6e Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Macros: Tr::trAlessandro Portale2023-01-236-34/+41
| | | | | Change-Id: I16d875d238ea9ac14758148c867cbac74042c43c Reviewed-by: hjk <hjk@qt.io>
* Use simpler Plugin::initialize() when feasiblehjk2023-01-202-8/+2
| | | | | Change-Id: I567965d266f20526bda9f823e31a04b354d53fb1 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* Prefix Tr::tr contexts with ::hjk2023-01-132-2/+1
| | | | | | | To make outliers better visible in Linguist Change-Id: Ic35ea2a858b7e3576d9a416fb494fddb616eaaa1 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* Remove GPL-3.0+ from license identifiersKai Köhne2023-01-0628-28/+28
| | | | | | | | | | | | | | | Since we also license under GPL-3.0 WITH Qt-GPL-exception-1.0, this applies only to a hypothetical newer version of GPL, that doesn't exist yet. If such a version emerges, we can still decide to relicense... While at it, replace (deprecated) GPL-3.0 with more explicit GPL-3.0-only Change was done by running find . -type f -exec perl -pi -e "s/LicenseRef-Qt-Commercial OR GPL-3.0\+ OR GPL-3.0 WITH Qt-GPL-exception-1.0/LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0/g" {} \; Change-Id: I5097e6ce8d10233993ee30d7e25120e2659eb10b Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* Port from qAsConst() to std::as_const()Marc Mutz2022-10-073-5/+5
| | | | | | | | | | | | | | 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: I88edd91395849574436299b8badda21bb93bea39 Reviewed-by: hjk <hjk@qt.io>
* Use SPDX license identifiersLucie Gérard2022-08-2628-672/+56
| | | | | | | | | Replace the current license disclaimer in files by a SPDX-License-Identifier. Task-number: QTBUG-67283 Change-Id: I708fd1f9f2b73d60f57cc3568646929117825813 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* Utils: Settle on lowerSnakeCase for LayoutBuilder::Setterhjk2022-07-271-1/+1
| | | | | | | Change-Id: Icfe487d8c7712cc8ad28f0f61e8ae4778a356fc3 Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* Utils: Introduce Layouting::{br,st}hjk2022-07-252-3/+3
| | | | | | | | | | | | | ... as "standard" ways to define line breaks and simple stretch. There have already been too many patterns to do it. Break() and Stretch() still work for the patches in flight, but they are planned to be removed. Change-Id: I9b70dcdc11244a904a496b0c55938dfb0b265fc8 Reviewed-by: Alessandro Portale <alessandro.portale@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
* Macros: inline savedialog.uihjk2022-07-255-114/+42
| | | | | | Change-Id: If86a77536a19606af2a810a0bde622e71fd18783 Reviewed-by: Alessandro Portale <alessandro.portale@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
* Macros: Inline macrooptionswidget.uihjk2022-07-255-154/+70
| | | | | | Change-Id: Ib35fd2816b7da5d2720f09ca89903549c7d3e66f Reviewed-by: Alessandro Portale <alessandro.portale@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
* Add plugintr.h files to all pluginshjk2022-06-271-0/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Except FakeVim, which had it before. for i in [a-eg-z]*/*.json ; do upper=${i##*/} upper=${upper/.json/} lower=${i%/*} trfile=$lower/${lower}tr.h cat << EOT > $lower/${lower}tr.h /**************************************************************************** ** ** Copyright (C) 2022 The Qt Company Ltd. ** Contact: https://www.qt.io/licensing/ ** ** This file is part of Qt Creator. ** ** Commercial License Usage ** Licensees holding valid commercial Qt licenses may use this file in ** accordance with the commercial license agreement provided with the ** Software or, alternatively, in accordance with the terms contained in ** a written agreement between you and The Qt Company. For licensing terms ** and conditions see https://www.qt.io/terms-conditions. For further ** information use the contact form at https://www.qt.io/contact-us. ** ** GNU General Public License Usage ** Alternatively, this file may be used under the terms of the GNU ** General Public License version 3 as published by the Free Software ** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT ** included in the packaging of this file. Please review the following ** information to ensure the GNU General Public License requirements will ** be met: https://www.gnu.org/licenses/gpl-3.0.html. ** ****************************************************************************/ namespace $upper { struct Tr { Q_DECLARE_TR_FUNCTIONS($upper) }; } // namespace $upper EOT git add $trfile perl -pi -e "s/(${lower}_global.h)/\1\n ${lower}tr.h/" $lower/CMakeLists.txt perl -pi -e "s/(\"${lower}_global.h\",)/\1 \"${lower}tr.h\",/" $lower/$lower.qbs done Change-Id: I15ebbaaa9443c57b391b9e143f592d8a0c9208a9 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* macros: Remove foreach / Q_FOREACH usageArtem Sokolovskii2022-06-034-12/+13
| | | | | | | Task-number: QTCREATORBUG-27464 Change-Id: Id779aaf869406571288519083883ab57e5c29cec Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: hjk <hjk@qt.io>
* Macro: fix saving macrosDavid Schulz2022-05-191-1/+1
| | | | | | | | | QMap::count returnes a size_type with Qt 6 in contrast to an int with Qt 5. Convert this value always to an int to be backwards compatible. Fixes: QTCREATORBUG-27543 Change-Id: Ibd37ede40e5eb4cd5e5172529455196242a97666 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* Macros: Fix shortcut display on macOSEike Ziller2022-05-172-6/+13
| | | | | | | Some "NativeText" parameters were missing. Change-Id: Id08b8281d1458c05ff302011e32d8babbaf7b2bc Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* Core: Turn LocatorFilterEntry ofn ILocatorFilter::accept to const &Alessandro Portale2022-02-112-2/+2
| | | | | | | | | In ILocatorFilter::accept and all the overrides. Change-Id: I27cd6babb66d91aad57e85572a1cdc77aef4fd79 Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* Remove qmake build filesEike Ziller2022-01-202-46/+0
| | | | | | | | | | Removes qmake as a build system for building Qt Creator itself. Keep them for some tests that are not completely moved to CMake yet. Change-Id: I846c6ef65626b6dfae6375fdc85d00677aa8c2fb Reviewed-by: hjk <hjk@qt.io> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io> Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* Utils: filepathify fileutilsDavid Schulz2021-05-181-1/+1
| | | | | Change-Id: Ic9048369f64d793f5f567cdb0c715488fb5a4ff6 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* Core: Add a default parameter to various ICore::*path functionshjk2021-04-271-1/+1
| | | | | | | | Saves some code on the user side. Change-Id: I32cd220b6e533f5497a1865f9c34ab9db4cfda79 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Eike Ziller <eike.ziller@qt.io>