aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/designer
Commit message (Collapse)AuthorAgeFilesLines
* Core: Make IEditorFactory::createEditor use a function objecthjk2020-02-052-10/+2
| | | | | | | | Also, replace or remove unneeded Q_OBJECTs, and make base setters and adders protected. Change-Id: I212257ef53984d8852dc8c478537199fc9483486 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* Designer: Compile fix for non-MSVCAlessandro Portale2020-01-231-1/+1
| | | | | | | | Change inclusion of include path for custom widget to global. Change-Id: I0318baea9dd838ad485f1631a2a89c5a5a00d50a Reviewed-by: Christian Stenger <christian.stenger@qt.io> Reviewed-by: David Schulz <david.schulz@qt.io>
* Designer: Restore and move NewClassWizard from Utils to DesignerAlessandro Portale2020-01-238-12/+662
| | | | | | | | | | | Commit a8af381 prematurely deleted newclasswizard.cpp/h/ui although they are still used by the Designer plugin. That caused a build breakage. This change partially amends a8af381 and moves the code into the Designer plugin. Unneeded code got removed. Change-Id: I56858a6b44a8964620397dd2c8cf95cdcd1bb9fe Reviewed-by: David Schulz <david.schulz@qt.io>
* Merge remote-tracking branch 'origin/4.11'Eike Ziller2019-11-2810-41/+33
|\ | | | | | | | | | | | | Conflicts: src/plugins/designer/codemodelhelpers.cpp Change-Id: I78906f2fbbfd27d254589a272ebca423b0b80699
| * Qt Designer: Fix some clang warningsFriedemann Kleint2019-11-2510-41/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Use using instead of typedef - User member initialization - Use nullptr - Do not use else after return - Delete pointers unconditionally - Fix some integer conversion warnings - Use auto for new/casts to avoid type name repetition - Use = default for trivial destructors Task-number: QTCREATORBUG-23248 Change-Id: I0a7465d3aa200b5c862bec82636d2d22ddf8297b Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
| * Revert "Revert "Designer: Fix look-up of resources for UI files""Eike Ziller2019-10-041-11/+22
| | | | | | | | | | | | | | | | | | | | | | | | This reverts commit d907df03496551907259d95fe417b9910d7f7963. The original change was pushed to 4.10 and reverted there for binary compatibility reasons. Revert the revert here. Conflicts: src/plugins/projectexplorer/projectnodes.h Change-Id: Ibfd84a30a6cfdd78e1fa1b1c61785d391a5a18be Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
| * Merge remote-tracking branch 'origin/4.10' into 4.11Eike Ziller2019-10-041-22/+11
| |\ | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/projectexplorer/projectnodes.h Change-Id: Ibd255105a01c53a1f81a1ec7b30495dfef1877a9
| | * Revert "Designer: Fix look-up of resources for UI files"Christian Kandeler2019-10-021-22/+11
| | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 736eef24ca9263339f4c576cba5d4b20fe188045, which breaks binary compatibility. Change-Id: I696ad3e6efc6f02f595356c9864d69629eeef8bf Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* | | ProjectExplorer: Move BuildSystem owership to BuildConfigurationhjk2019-11-191-5/+13
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ... or Target. This patch moves build system from conceptually "one per project" to "one per target (i.e. per project-and-kit)" or "per BuildConfigurations" for targets where the builds differ significantly. Building requires usually items from the kit (Qt version, compiler, ...) so a target-agnostic build is practically almost always wrong. Moving the build system to the target also has the potential to solve issues caused by switching targets while parsing, that used Project::activeTarget() regularly, with potentially different results before and after the switch. This patch might create performance/size regressions when several targets are set up per project as the build system implementation's internal data are duplicated in this case. The idea is to fix that by sharing per-project pieces again in the project implementation once these problems occur. Change-Id: I87f640ce418b93175b5029124eaa55f3b8721dca Reviewed-by: Christian Stenger <christian.stenger@qt.io> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | Merge remote-tracking branch 'origin/4.10' into 4.11Eike Ziller2019-10-021-11/+22
|\| | | | | | | | | | | | | Conflicts: src/plugins/projectexplorer/projectnodes.h Change-Id: I10a749cca38c2d0929cf4d2b74ab089e14b6157b
| * Designer: Fix look-up of resources for UI filesChristian Kandeler2019-10-011-11/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit 81a643ec99, fixing QTCREATORBUG-22412, was too restrictive: UI files in applications have access to resources of library dependencies, so we must consider those. We now only exclude resources from other applications. Note that this will potentially list non-applicable resources, e.g. those from libraries to which our product does not have access. This cannot be reasonably prevented, because not all build systems provide this information. It's also not as bad as missing resources. Fixes: QTCREATORBUG-22909 Fixes: QTCREATORBUG-22962 Change-Id: I51a87402b43c156618982813c408060f300e4e58 Reviewed-by: hjk <hjk@qt.io>
* | Remove unused QObject parent arguments on options pageshjk2019-09-112-3/+2
| | | | | | | | | | | | | | | | In the new plugin setup scheme they are data members of the plugin pimpl and never use the parent. Change-Id: I28fe150393e8159064dcfbd113ce0320af50fd58 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* | Remove usages of deprecated APIs of QLayoutSona Kurazyan2019-09-021-1/+1
| | | | | | | | | | | | | | | | | | | | Replaced: QLayout::setMargin() -> QLayout::setContentsMargins() QLayout::margin() -> QLayout::getContentsMargins() Task-number: QTBUG-76491 Change-Id: If28ef6910b3afe5d04e4746b74f9362a3e3b3c8e Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* | Designer: Fix implicit cast warningsTobias Hunger2019-08-091-2/+2
| | | | | | | | | | Change-Id: I33b2c214de9fc517076ef12f9aec32a18adec36a Reviewed-by: hjk <hjk@qt.io>
* | Some clang-tidy -use-modernize-nullptrhjk2019-08-018-27/+27
| | | | | | | | | | Change-Id: I1bed5e85a5b7948d08502a72a10f80baa075c204 Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
* | Designer: Fix crash when executing plugin unit testsChristian Stenger2019-08-011-1/+1
| | | | | | | | | | | | | | Broke with e3b1106afae5. Change-Id: Ifc35bfa1a4e0985427ea60f49609ff0fc3528a4d Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
* | Compile fix with recent Qt devhjk2019-07-291-5/+3
| | | | | | | | | | | | | | | | | | The reasoning in 1b4766e26c6b did not take into account that the scope of QT_NO_JAVA_STYLE_ITERATORS may change over time, as done with f70905448f6 in Qt base. Change-Id: Ib1966ff26c4d36d5f62e149d6b45baa4aecf825d Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* | Standardize on int for line and column valueshjk2019-07-262-10/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Recently tons of warnings show up for presumably "problematic" singned <-> unsigned and size conversions. The Qt side uses 'int', and that's the biggest 'integration surface' for us, so instead of establishing some internal boundary between signed and unsigned areas, push that boundary out of creator core code, and use 'int' everywhere. Because it reduces friction further, also do it in libcplusplus. Change-Id: I84f3b79852c8029713e7ea6f133ffb9ef7030a70 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
* | Avoid warning on empty expressionshjk2019-07-231-2/+2
| | | | | | | | | | | | | | | | For some reason, Q_UNUSED includes already a semicolon, adding one on the user side creates an additional empty statement. Change-Id: I9c5e8fac381345a60792cb75e2938fd53958d3b0 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* | Merge remote-tracking branch 'origin/4.10'Eike Ziller2019-07-181-3/+3
|\| | | | | | | Change-Id: I1193e94353c14492a9e7f093fbcd3fa53f83e390
| * Designer: Fix possible endless loopChristian Stenger2019-07-151-3/+3
| | | | | | | | | | | | | | | | Opening a ui file listed in a pri file may trigger this endless loop by returning always the same project node. Change-Id: Id1697ea77c39c4693d36fbc3fcd9600b05022e58 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | Merge remote-tracking branch 'origin/4.10'Tim Jenssen2019-07-121-2/+3
|\| | | | | | | Change-Id: Iaf27911e4e9fb762c1a24c84c458462bafe95728
| * Remove more deprecation warningshjk2019-07-051-2/+3
| | | | | | | | | | Change-Id: Ie50e41737a4bf7bea41f550df7cc765267e8a144 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* | Project: Delay acting on fileListChanged signalTobias Hunger2019-06-201-1/+5
|/ | | | | | | | This gives the UI a bit more opportunity to render after the project was parsed. Change-Id: Ie316f1c69cb0ebb856943a094b81b55f1aa2317a Reviewed-by: hjk <hjk@qt.io>
* Utils: Rename FileName to FilePathhjk2019-05-285-11/+11
| | | | | | | | More in line with QFileInfo terminonlogy which appears to be best-of-breed within Qt. Change-Id: I1d051ff1c8363ebd4ee56376451df45216c4c9ab Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* ProjectExplorer: Add a "product" tag to the ProjectNode classChristian Kandeler2019-05-271-8/+5
| | | | | | | | A product is a project node from which a target binary is produced, such as a Product item in qbs or a .pro file in qmake. Change-Id: I6a0e6bed6c02684cb03b2b18fed6a1b493fa78b2 Reviewed-by: hjk <hjk@qt.io>
* CMake build: Add ability to disable building of individual pluginsEike Ziller2019-05-231-3/+4
| | | | | | | | | | | | | | Adds a cache entry "BUILD_PLUGIN_${NAME}", defaulting to ON which can be set to OFF to disable building of a plugin. Adds a extend_qtc_plugin function that should be used to add properties to a plugin after add_qtc_plugin, instead of the standard CMake functions target_... . The new function results in a no-op if the plugin was disabled. Change-Id: I57f6799620aea0aaa8b56acead4815ccced95911 Reviewed-by: Cristian Adam <cristian.adam@qt.io> Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
* Qt Creator CMake portCristian Adam2019-05-171-0/+41
| | | | | | | | | | | | | | Based on Tobias Hunger's work from a few months ago. The CMake configuration needs libclang and Qt paths specified as CMAKE_PREFIX_PATH. Auto tests are run with "ctest". At the moment the pass rate is 87%. Change-Id: Iba98e39bf22077d52706dce6c85986be67a6eab0 Reviewed-by: Alessandro Portale <alessandro.portale@qt.io> Reviewed-by: Tobias Hunger <tobias.hunger@qt.io> Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* Designer: Find only resources from the same productChristian Kandeler2019-05-091-3/+22
| | | | | | | | | | | E.g. in a qmake SUBDIRS project with two applications, the form editor should only know about resources in the app that the current ui file belongs to. Fixes: QTCREATORBUG-22412 Change-Id: Iaa310e8cbd24d1bf519c66a949a52f9c636f3c1c Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: hjk <hjk@qt.io>
* Export Wizard values to JavaScript macroEike Ziller2019-05-091-1/+1
| | | | | | | | | | | | | | | | | | Registers a new function "value('name')", available to the wizard json files, which returns the value of the variable "name" as a JavaScript object. So, variables with a string value are actual JavaScript strings, booleans are booleans, lists are lists, and dictionaries are dictionaries. The patch also makes it actually possible to assign JSON lists and dictionaries to values. This removes some hacks involving creating complex JavaScript objects through string substitution. Change-Id: I4ac6da22bc5bccc9fadee97694c2fa14d44c9307 Reviewed-by: Christian Stenger <christian.stenger@qt.io> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Replace static_casts by QOverload where possiblehjk2019-02-261-2/+1
| | | | | | | | | Mainly to get rid of the QProcess::finished deprecation warning. Also adjust coding style in the surrounding connects when needed. Change-Id: I12f9b248c7974b892c4a069356e578e80f8c59e9 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* Rename IContext::HelpIdCallback -> IContext::HelpCallbackEike Ziller2019-01-292-2/+2
| | | | | | | | It no longer takes an ID but a HelpItem. Change-Id: I0aa738549fea4fcfd0151adc2dfd642c63f0f60d Reviewed-by: Tim Jenssen <tim.jenssen@qt.io> Reviewed-by: David Schulz <david.schulz@qt.io>
* Help: Avoid multiple lookups of help id for context helpEike Ziller2019-01-292-2/+2
| | | | | | | | | | | Context help would first query the database with potential IDs, and afterwards the help plugin would look up the links for the resulting ID again. Pass the HelpItem (which potentially contains the cached links) directly to context help. Change-Id: I73bddcd3cd4eacaea412b98d53c5e5354a31f3d5 Reviewed-by: David Schulz <david.schulz@qt.io>
* Help: Rename handleHelpRequest to showHelpUrlEike Ziller2019-01-251-1/+1
| | | | | | | Since that is what it does. Change-Id: I13ffe21cdb625a0df1313f2ff09bf84196f08768 Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
* Wizards: Support using #pragma once instead of include guardsFilip Bucek2019-01-233-3/+12
| | | | | | | | | | | Allow users to choose #pragma once instead of #ifndef include guards in generated header files. Fixes: QTCREATORBUG-12166 Change-Id: I3ba41c7570beb9c5958e174b5581fcc25855050f Reviewed-by: Christian Kandeler <christian.kandeler@qt.io> Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Filip Bucek <fbucek@atlas.cz>
* use initializer listsTim Jenssen2019-01-211-1/+1
| | | | | Change-Id: I82b04601f1db52197b3dc625b6b7e0f143c1c8b6 Reviewed-by: Orgad Shaneh <orgads@gmail.com>
* Designer: Fix crash on closeChristian Stenger2018-11-142-0/+11
| | | | | | | | ...when executing plugin unit tests for Designer. Change-Id: Ic3252bfef4559de4e54f5c3c3fd1984ab6a00f9d Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
* Utils: Adjust column numbers affected by convertPosition changeIvan Donchevskii2018-11-091-1/+2
| | | | | | | | | | | | | | convertPosition change was introduced in 931ec39f64a. It changed 0-based column to 1-based which is how it naturally is in Qt Creator. This fixed some usages but broke many more. This is an attempt to fix the remaining use cases. Fixes CppEditor auto-tests. Change-Id: Ia8d14da0ebb035cd2fdd6da4ff6ec89c1c5121a8 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
* Make Core independent from QtHelpEike Ziller2018-09-041-2/+2
| | | | | | | | | | | | | | | | | | | We don't want various plugins to depend on the Help plugin, but we also do not want Core to depend on QtHelp. For example when turning the Help plugin off, documentation should actually no longer be registered through QtHelp. So we need parts of the interface in Core, which must then be delegated to the actual implementation in Help. As positive side-effects the interface in Core will be slimmer, and the code in the Help plugin can later be simplified, too, because then we don't have the "Core" and the "Gui" help engines separated in different plugins anymore, which should remove the need for some setup indirections. Task-number: QTCREATORBUG-20381 Change-Id: I634c5811c45d6a3dfd6ddc682cae270e38384cbf Reviewed-by: hjk <hjk@qt.io>
* Prefer using 'override' instead of 'virtual'Alessandro Portale2018-07-111-1/+1
| | | | | | | | warning: prefer using 'override' or (rarely) 'final' instead of 'virtual' [modernize-use-override] Change-Id: I6dac7a62b627fa1353b4455e1af92f869c2571cc Reviewed-by: Marco Benelli <marco.benelli@qt.io>
* Remove unneeded checks for validity of mime typesEike Ziller2018-06-251-2/+0
| | | | | | | | | | | | mimeTypeForFile(...) is documented to never return an invalid mime type (it will fall back to binary if everything else fails), so remove unneeded checks. This also removes fallback code that used text/plain in case of invalid mime type, which is probably a relict from the old mime implementation. Change-Id: I88ed41fa3b81704f110f9f481b0f01424a487cbb Reviewed-by: David Schulz <david.schulz@qt.io>
* Fix that bookmarks couldn't be added to .pro files with mouseEike Ziller2018-06-191-0/+1
| | | | | | | | | | | The area with the marks was not showing up. This patch reverses the logic for showing the marks area to opt-out. Almost all editors were opting in for it already. The AndroidManifest editor, VCS base editor, and widget designer text editor opt out now. Task-number: QTCREATORBUG-20339 Change-Id: Iccb6d0256618f7ef70e8921847ce2fd46fd660c0 Reviewed-by: David Schulz <david.schulz@qt.io>
* Designer: Use override consistentlyTobias Hunger2018-05-072-4/+4
| | | | | | | clang-tidy fixes from modernize-use-override check. Change-Id: Ied022e91ddcba80a6411ca70e4ea2cedfe0bbf6d Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Form wizard: generate nullptr instead of 0 for parentJarek Kobus2018-05-031-1/+1
| | | | | Change-Id: Icb6ebbc057608e022a034f217bbcb35c77e99a42 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Update Options dialog iconsAlessandro Portale2018-04-241-1/+2
| | | | | | | | | A new set of scalable and themable icons with unified look as provided by Diana. Task-number: QTCREATORBUG-20325 Change-Id: I68498b034e9e43fbb61511a38d9c7fc0003ab076 Reviewed-by: hjk <hjk@qt.io>
* Core: Make IOptionsPageProvider::categoryIcon a Utils::IconAlessandro Portale2018-04-242-2/+1
| | | | | | | ...just like it is with IOptionsPage Change-Id: I033891f1a908be24b05103cb13a4ef628994d2a7 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* Clean up options page category display name and icon set upEike Ziller2018-04-231-3/+0
| | | | | | | | | | | | | | In cases where plugins extend an existing settings category of a plugin that they depend on anyhow, they do not need to specify the translated display name and icon for that category. Some options pages were already not setting the icon, but still the translated name, which makes even less sense. Clean up this mess, only setting display name and icon if that is necessary. Change-Id: I8bc9d0c51b11d48f1d847337838704d663e70b45 Reviewed-by: Christian Stenger <christian.stenger@qt.io> Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
* Merge remote-tracking branch 'origin/4.6'Eike Ziller2018-04-131-0/+1
|\ | | | | | | | | | | | | | | | | | | | | Conflicts: src/libs/utils/settingsaccessor.cpp src/plugins/autotest/autotestplugin.cpp src/plugins/git/gitclient.cpp src/plugins/qbsprojectmanager/qbsrunconfiguration.cpp src/plugins/qbsprojectmanager/qbsrunconfiguration.h Change-Id: I65f143cad18af509a2621d6c5925abbd038ea70f
| * Core: Avoid duplicating options pageChristian Stenger2018-04-111-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | Creating an IOptionPage registers it automatically. In case an IOptionsProvider is used this duplicates the the option pages and although duplicated still adds them to the respective category again. If one clicks on the respective tab this results in a crash. Slipped in with cc883023090030eb341a11c4d6634ca027f02c65. Change-Id: Ie881f532c3f0e397147d99ce368066cdce01a612 Reviewed-by: hjk <hjk@qt.io>
* | Utils: Purge asConstOrgad Shaneh2018-04-096-13/+7
| | | | | | | | | | | | | | | | Replace by qAsConst. Change-Id: I3301366f73c066c86f08df7188d70dc3b613c55c Reviewed-by: Christian Stenger <christian.stenger@qt.io> Reviewed-by: hjk <hjk@qt.io>