Commit Graph

44349 Commits

Author SHA1 Message Date
Tobias Hunger
41df91ece8 TargetSetupWidget: Replace a range of lists with a list of struct
Simpler to make sure all the data is in place at all times that way.

Change-Id: I73d88f4c31d8447547ccf6de808ea00066db4f37
Reviewed-by: hjk <hjk@qt.io>
2018-03-16 10:13:54 +00:00
Orgad Shaneh
a23615e41c Callgrind: Use nullptr
Change-Id: I07c23d8bc48815e44ad340a6e37ee3b229866dbf
Reviewed-by: hjk <hjk@qt.io>
2018-03-16 10:11:24 +00:00
hjk
60ac5f3103 Qmake: Remove hidden dysfunctional option to run on QVFb
Change-Id: I31c2895135f4ebd0a7cb0de898309676a8f98f37
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-03-16 10:02:40 +00:00
hjk
55961a367d QMake: Adapt DesktopQMakeRunConfiguration to applicationTargets() use
Change-Id: I2844e2e97ca78c12c4abdb1538c37e77b841918e
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-03-16 09:58:02 +00:00
hjk
e20d620043 ProjectExplorer: Let RunConfiguration declare what nodes it belongs to
This feature in question is the availability of the "Run" button in the
context menu of certain project nodes in the project tree to run
something presumably related to/build from that (sub)project.

Previously, the decision was made for certain qmake based projects
(those targeting Desktop, iOS and VxWorks) by some indirection
through the corresponding RunConfigurationFactories.

The patch lets the RunConfigurations decide themselves directly
and removes the indirection, potentially opening the feature for
other qmake based RCs, as well as other combinations (e.g.
PythonRunConfiguration could be associated with its .py file,
without the need to have a dummy project)

Change-Id: Ic489bd1dfa25fcd9102ffa4fa30125565dd2e40e
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-03-16 09:55:03 +00:00
Nikita Baryshnikov
e3918b563f Git: show commit given as command line parameter in diff editor
ex: qtcreator -client -git-show d3eb585db9 from qt-creator source dir.

Change-Id: Ice62f062d431d2ab74e3d6832dfc8b0b555dfa19
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: André Hartmann <aha_1980@gmx.de>
2018-03-16 09:45:45 +00:00
Tobias Hunger
f044e69f67 ProjectExplorer: Remove obsolete functionality
Change-Id: Iea9b50c0bf9d855fb039a30062e26f8d6f3bc321
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-03-15 14:04:16 +00:00
Tobias Hunger
3ef6f35cf6 PointerAlgorithm: Fix take and takeDefault
Fix take unit tests to actually test the correct template instance,
add more unit tests for takeDefault.

Change-Id: I51f5b17b6478a8c1388a91840edfb9c702697b28
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-03-15 14:04:10 +00:00
hjk
805b28b8b7 ProjectExplorer: Simplify DeployConfigurationFactory interface
Following the RunConfigurationFactory lead this replaces
f = Foo::find(); f->do() by static Foo::do() stanzas.

Also protect DeployConfigurationFactory::canCreate()

Change-Id: I80fa491f836c3b9186f6ce6dccac4d52d4b80fc8
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-03-15 13:09:27 +00:00
hjk
02dacc27eb RunConfiguration: Remove some unused prototype and functions
Change-Id: Iebe9a46e5c1effd56a561dda381403b0e2123cb4
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-03-15 09:23:13 +00:00
Tasuku Suzuki
ff155a2e42 Improve "Import Existing Build..." in project pane
The action is for active project. The button should be under active
project.

Change-Id: Ie0029bff02f58dbd5cb4c2a17bc086c168a522dc
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-03-15 02:06:24 +00:00
Christian Stenger
e42ff6399e Fix build with namespaced Qt
Change-Id: If5675920a5e4020a8a21e103eed6613475f709b5
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2018-03-14 12:49:03 +00:00
hjk
9f81129417 CMake: Restrict CMakeRunConfigurationFactory to local setups
Anything remote is being taken care of by the target specific factories,
having CMakeRunConfigurationFactory accept everything too leads to
unhelpful duplicated entries.

Change-Id: I7e509593f6eaed8ee75ef0acef1703a877b1f011
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-03-14 09:38:14 +00:00
hjk
89371d9c17 Debugger: Add a "Leave Debug Mode" button to the toolbar
Arguably wrong as a concept, but the issue keeps coming back.

Change-Id: Id0b084999884c1f018e3de60bb04c5288f7031ad
Task-number: QTCREATORBUG-1214
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
2018-03-14 08:04:36 +00:00
Tobias Hunger
37b86c89d1 Utils: Introduce case friendly comparison function to stringutils
Use this operator in the miniprojecttargetselector as well as the
projectconfigurationmodel. This should unify the sorting of
build-/deploy- and runconfigurations in various places in Creator.

Task-number: QTCREATORBUG-20023
Change-Id: I7aed2ebcb9d65244395d68b7dc5da599d6503962
Reviewed-by: hjk <hjk@qt.io>
2018-03-13 15:22:20 +00:00
hjk
a5d6fe33cb Partially decouple local CMakeRunConfiguration from CMakeProject
Funnel all relevant data through target.applicationTargets() as
done for the non-local CMake-supporting setups and QBS already.

There is cleanup potential left for later changes.

Change-Id: I49ed6abd98c058a7fd1545e41b3bcd6ecb758a8b
Task-number: QTCREATORBUG-19985
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-03-13 15:02:54 +00:00
hjk
3f86d55587 BareMetalRunConfigurationFactory: remove availableCreators reimp
The base version adds "(on $devicename)" which is even more information
than the generic "(on GDB server or hardware debugger)" here.

If the  bti.projectFilePath extra path bits are needed, the feature
could be made generally available in the base implementation.

Also fix a typo in the BareMetalCustomRunConfiguration title

Change-Id: I293e36c7edd2a9459e29a7025ca5bb19fb39b4b0
Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-03-13 12:49:46 +00:00
Eike Ziller
0b10ecc718 Merge remote-tracking branch 'origin/4.6'
Conflicts:
	src/plugins/cmakeprojectmanager/cmakeproject.h
	src/plugins/debugger/debuggerplugin.cpp
	src/plugins/ios/iosrunfactories.cpp
	src/plugins/nim/project/nimproject.h
	src/plugins/qbsprojectmanager/qbsrunconfiguration.cpp
	src/plugins/qmakeandroidsupport/qmakeandroidrunfactories.cpp
	src/plugins/qmakeprojectmanager/desktopqmakerunconfiguration.cpp
	src/plugins/qmlprojectmanager/qmlproject.h
	src/plugins/qnx/qnxrunconfigurationfactory.cpp
	src/plugins/qtsupport/exampleslistmodel.cpp
	src/plugins/winrt/winrtrunfactories.cpp

Change-Id: Ib029fdbaa65270426332f5edd6e90264be5fb539
2018-03-13 11:25:38 +01:00
Eike Ziller
0bcc983cdb BinEditor: Fix that posAt could be larger than available bytes
Task-number: QTCREATORBUG-17573
Change-Id: Ia34bb9b6765850937793d6481bb1e6404319d510
Reviewed-by: David Schulz <david.schulz@qt.io>
2018-03-13 08:54:07 +00:00
Eike Ziller
7ac1b852b7 Fix binary editor tool tip
It should show up also over the last column, it should also show up if
the selection spans multiple lines, and if the mouse is not over the
selection it show up with information about the single byte under
cursor. If the mouse is over a selection that is longer than 8 bytes,
the tool tip is restricted to the first 8 bytes of the selection.

Task-number: QTCREATORBUG-17573
Change-Id: Ie7aaf1e52ceadd6be815d4ce3386a60df1418297
Reviewed-by: David Schulz <david.schulz@qt.io>
2018-03-13 08:53:57 +00:00
hjk
f99944b617 QbsRunConfiguration: Consistently use 'final'
Two missing after 9541aa777, some inconsistent before.

Change-Id: I2ee330fb099cf8b8060fbbe3f375e77d4d9ff420
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-03-13 07:16:37 +00:00
hjk
ae560fcc49 FakeVim: Implement :<range>sor[t][!]
None of the other options yet.

Change-Id: Iabf18c1be4d228c97d2de9cb17e71c307e9ec5a2
Task-number: QTCREATORBUG-20022
Reviewed-by: Lukas Holecek <hluk@email.cz>
Reviewed-by: André Hartmann <aha_1980@gmx.de>
2018-03-13 06:48:42 +00:00
David Schulz
84e0573cad ProjectExplorer: fix gcc toolchain abi detection
This updates the selected abi in the toolchain widget
when editing the binary path to the compiler.

Task-number: QTCREATORBUG-19673
Change-Id: I8df69af207360364fb6f75e94a3aa26f84fd13d9
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-03-12 16:21:12 +00:00
Tobias Hunger
0bc100911d Utils: Add pointeralgorithm.h
Change-Id: I3e81bdbf22808efbe1fb5fab13bef24c8f73f404
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-03-12 14:14:10 +00:00
Tobias Hunger
831b84a6fd Utils: Add take
Add a new algorithmn to take the first match in a container out of the container.

It takes a pointer to something and will try to match against a smart pointer
stored in the container. Besides that it also accepts the usual like a predicate,
member variable or member function.

Change-Id: I4aabd4d43aa076a534da6488d0f9c3695ba79c09
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-03-12 14:14:01 +00:00
hjk
f873ad54e1 RemoteLinux: Use Argument and Working directory aspects in run config
Also some cosmetics in the run config widget setup.

Change-Id: I02503d808b5ee7f81f46520f9e6d1750c2cd5de9
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2018-03-12 13:25:24 +00:00
hjk
7e90aba530 QbsProjectManager: Move QbsRunConfigurationWidget to .cpp
Change-Id: I4fd99a2e0a82911bd849879f50ebff24bb4d8be8
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2018-03-12 13:24:45 +00:00
Leena Miettinen
f37982d859 Doc: Add a link to a new Qt Creator and Qt video
Change-Id: I3ea8c67e5cb967fc5c963b96c30a4de1ff1baa63
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2018-03-12 10:44:44 +00:00
hjk
9541aa7772 QbsRunConfiguration: Re-model based on RemoteLinux precedence
Task-number: QTCREATORBUG-19985
Change-Id: Ifd95187b72fed3565552ecd14f3353b7e7df0069
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2018-03-12 09:38:27 +00:00
Eike Ziller
64fe131c14 Fix ordering of items without file name in open documents popup
An item that has no file name (like Git Commit, Diff etc.) was always
last in the list.

Broke by 324de13b4e.

Change-Id: Ied3add2a372b4b176ee800e8c023c3cef5495488
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2018-03-12 09:09:47 +00:00
Christian Kandeler
102a058c25 QbsProjectManager: Fix "equivalent command line" contents
- We forgot to adapt to the introduction of the "config" key.
- The space character was missing before the QML debugging property.

Task-number: QTCREATORBUG-20024
Change-Id: Ie4a94a04989caa14b1ddc11c8595d679d1871625
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2018-03-12 08:12:17 +00:00
hjk
7bbe5979a1 KitChooser: Change kit pre-selection strategy
In case there is a startup project, it will be listed in
an additional entry at the top of the kit list, followed
by a separator.

Kits are remembered by Id now, not by index anymore
*unless* it's the startup kit entry, i.e. if the startup
entry is selected and the project is changed, it will
again select the startup entry, possibly indicatin another
kit.

In case a non-startup entry is selected, the kit will be
remembered by id, changing projects will try to re-select
*that* kit.

Change-Id: I827d2670d9a8681570d9c67405cd662cf6a01b4c
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2018-03-12 07:34:32 +00:00
Orgad Shaneh
27063168ad QmlDesigner: void static -> static void
That's the order everywhere in the codebase.

Change-Id: I62e57f2ddddd6e4fac0dc26d81b05839cf80a9db
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-03-12 06:35:58 +00:00
Christian Stenger
a998202acf QmlDesigner: Fix compile for Qt5.6
Change-Id: I25cdf8874c03865400a3a1bc451c6c58e9294ab0
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2018-03-12 06:35:36 +00:00
Alessandro Portale
7d83472906 QtSupport/Welcome: Refresh the tutorials/examples/videos thumbnails
And adjust the drawing code to support the HighDPI variants.

Task-number: QTCREATORBUG-19942
Change-Id: I77b07674305b29680de27714fc56f1ad25f5346d
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2018-03-11 10:49:33 +00:00
hjk
afe13e6812 RunConfigurationFactory: Simplify RunConfigFactory::create use
A for (f : X.allFs()) if (f.canHandle(t)) { f.doIt() ... } }
pattern can be replaced by some  static X.doIt(t), and
item.factory->create(target, item) by some item.create(target).

Change-Id: I65df8b71e03272d60f41a16795ea43a0fdb262ef
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2018-03-09 16:16:38 +00:00
Thomas Hartmann
8a8b8c4602 QmlDesigner: Add meta hint if item renders children directly
In some cases items render their children directly using an effect.
In this case we do not want to hide the children when calling
refFromEffectItem().
If the hint takesOverRenderingOfChildren is set in the .metainfo hints
for a parent item we forward a flag to the puppet and refFromEffectItem()
is not hiding this item,

Change-Id: I37a8c0ad8a15bc914c220e03b1b744779431d655
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2018-03-09 15:05:22 +00:00
Thomas Hartmann
98889e1a38 QmlDesigner: Define new possible enum scopes
Change-Id: Ifb96706615be8cd5d7f588a83bdfe1cf31886bb5
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2018-03-09 14:10:37 +00:00
Tobias Hunger
f028a74f32 Python: Fix warning about inconsistent use of override
Change-Id: I13d601e1a67078ba2caedb3bb48296021859af1a
Reviewed-by: hjk <hjk@qt.io>
2018-03-09 13:50:21 +00:00
Tobias Hunger
7c4265726b Clang-cl: Suggest win32-clang-msvc mkspec
Task-number: QTCREATORBUG-20021
Change-Id: Ie74f4f3c13cdef5767e52037251dbbc3e7d9e05a
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-03-09 13:43:24 +00:00
Eike Ziller
7112ca1c56 Add "New Search" tool button to search results pane
Task-number: QTCREATORBUG-17870
Change-Id: If939e71cb74b5a0b6811e435b02e86c5053bd067
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2018-03-09 13:03:38 +00:00
Tobias Hunger
835d4e92f3 Project: Improve default implementation of Project::needsConfiguration
Change-Id: Ic4d227334d818658f179c0589462551509274c17
Reviewed-by: hjk <hjk@qt.io>
2018-03-09 12:57:59 +00:00
Christian Stenger
964476983e ProjectExplorer: Avoid soft assert when creating new project
Remove soft assert and do a pre-check before calling the function.

Change-Id: I9882e841a47a5b7bc566f1b3a4b156df4229f051
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-03-09 12:57:48 +00:00
Alexander Akulich
48a68851fc ProjectTree: Select only (complete) file basename on rename
Change-Id: I29effc5f61fbaa214d7a1a01d92de5d5a726cec4
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-03-09 11:52:05 +00:00
Alexander Akulich
783b310ee6 ProjectTree: Refactor editCurrentItem()
Change-Id: Id848b608e256b95e9704d61d1926d05625106ecc
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-03-09 11:51:58 +00:00
Mitch Curtis
a40ea3f1d6 Remove duplicated "Qt Unit Test" wizard
There are currently two types of wizards for creating auto tests:

- Qt Unit Test
- Auto Test Project

Both produce almost identical code in the case of a Qt GUI-based test,
and the descriptions are very similar. This is really confusing.

The Auto Test Project wizard has support for Qt Test, Google Test and
Qt Quick Test. In addition, the documentation only mentions Auto Test
Projects when it discusses the creation of auto tests:

http://doc.qt.io/qtcreator/creator-autotest.html#creating-tests

So let's just use that and make everything simpler.

Change-Id: Ia16c88c462744baa8df3f9e8082cbcad6ad9eb15
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-03-09 11:33:35 +00:00
Tobias Hunger
97ede133a9 QmlProject: Fix selection of supported kits
This now fixes the auto-selection of kits for me.

Task-number: QTCREATORBUG-19717
Change-Id: I39581ab2471211e9553c345164bb3ce788242dad
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-03-09 10:56:24 +00:00
Tobias Hunger
8ae505f30e QmlProject: Unify selection of supported kits
Change-Id: Ic33e9688d823bd09664e5dc74fe5253cb5fcbc58
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-03-09 10:56:17 +00:00
Nikita Baryshnikov
3eb71d95f8 ProjectExplorer: return back actions text
for Add New, Rename and Remove File actions.

FolderNavigationWidgetFactory::registerActions with empty action text is
called before ProjectExplorerPlugin::initialize with proper action
registration

Change-Id: I719f58735d672ad0831162a5f0cccebf73354976
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-03-09 10:16:12 +00:00
Christian Kandeler
7f226bc48f Update qbs submodule
To HEAD of 1.11 branch.

Change-Id: Ibc9b4ca2d9ae889b3991d97b8ffcede8460e28ee
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2018-03-09 10:01:41 +00:00