Commit Graph

44349 Commits

Author SHA1 Message Date
hjk
c136e81422 QmakeProject: Use base project node in two more cases
Change-Id: If7648d0ef549ac7f2fdd6c2d13a82b06d0328232
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2018-01-03 07:39:34 +00:00
hjk
0e687d6a4f CppEditor: Normalize WrapStringLiteral and RewriteLogicalAnd interface
Slims down publicly visible interface and could be one step towards
replacing the CppQuickFixFactory derived classes by plain
stand-alone functions.

Change-Id: I9c6a8bcbd8481e14fb21dd41b11a1e6153a35e4b
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2018-01-03 07:36:11 +00:00
hjk
915d5cf259 QmlProject: Inline QmlProjectRunConfiguration::qtVersion into caller
Change-Id: I0af467d60ac4eaf55d825dbe0df83108c0f5db36
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-01-03 07:33:42 +00:00
Andre Hartmann
fbf1a19628 BaseFileFilter: Fix typo in comment
Change-Id: Ica91b131b8e93a0a591b75863b14940ab4251a5c
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-01-02 17:33:09 +00:00
Thomas Hartmann
5dd2b6d44a QmlDesigner: Fix StatesEditorModel::removeState()
We cannot simply assume that stateIndex + 1 is a valid index.
The removed state might be the last state.

This triggers an assert in Qt 5.11.

Unfortunately there seems to be an issue that forces us
to reset the model. Without reset model the ListView delivers
the wrong data to delegates, after the item was deleted.

Some minor code clean up.

Change-Id: I935e3358382371d31f0ff44c0ded229d35950648
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2018-01-02 16:24:17 +00:00
Alessandro Portale
a19005fc38 Core: Avoid a color->name->color conversion in locatorwidget
Change-Id: Ib81b2500845d7da65f944f24324dd4aa0a71a822
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-01-02 15:45:33 +00:00
Ivan Donchevskii
4bdcb8064c Clang: fix experimantal follow symbol
...when the cursor points to the next token but
the current one is selected.

Change-Id: I73fe1b0c82ccda0489b878f3909b8767c54b5ec2
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2018-01-02 13:27:00 +00:00
Jochen Becher
cd194d1710 Utils: Either drop files or values
Dropping something on QtCreator will now signal either file drop or
other value drops. With the old implementation drop receiver might
not be able to differ between the two.

Also dropping files signals the drop position (which may be ignored
by the receiver).

This change is needed for a future change to fix issue
QTCREATORBUG-19117.

Change-Id: I56a72ba3d925de19979f3f90d161adc4f4986e20
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-01-02 13:09:08 +00:00
Orgad Shaneh
fc5b1795eb GenericHighlighter: Update from KSyntaxHighlighting
Change-Id: Iaabf7ca4b29c44b4c4c4defd476629c91e14ffcc
Reviewed-by: David Schulz <david.schulz@qt.io>
2018-01-02 06:04:35 +00:00
Andre Hartmann
b2aa1b9845 Locator: Cleanup and modernize Locator and filters
* Omit QLatin1{Char|String}
* Use member initialization
* Use range-based-for
  (and fixed the cases with non-const Qt container)
* Sort includes to common style

Change-Id: Ibc33a732bb153862efd6d5febfac758229cb61d4
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: André Hartmann <aha_1980@gmx.de>
2017-12-30 18:58:25 +00:00
Nikita Baryshnikov
ccc0bebcf4 PluginView: do not allow to edit Load column
Change-Id: I23d653700ad22e3c277352dc4025351d1e58f687
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2017-12-26 11:55:15 +00:00
Christian Kandeler
30bd05b792 Update qbs submodule
To HEAD of 1.10 branch.

Change-Id: I352a93492a4f8e67f81c47b221abfa0881f647d9
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2017-12-22 16:39:55 +00:00
Oswald Buddenhagen
777ca8e655 Merge remote-tracking branch 'origin/4.5'
Conflicts:
	src/plugins/qmakeprojectmanager/desktopqmakerunconfiguration.cpp
	src/plugins/qmlprofiler/qmlprofilertraceclient.cpp

Change-Id: I94647f59d7a9df48168ac066555afe80f5f9b91f
2017-12-21 13:20:24 +01:00
Alessandro Portale
6e0b65a11c Timeline: Fix anchoring of toolbuttons
Qt Quick Controls from latest Qt dev (upcoming 5.11) now complains:

QML ImageToolButton: Detected anchors on an item that is part of a
layout. This is undefined behavior.

Instead of anchoring we can use the fillHeight attached property for the
same effect.

Change-Id: I7fa49400bace04e78c2db8cc53e5bab2a0dfbabe
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2017-12-21 11:55:41 +00:00
Ulf Hermann
544ac85191 QmlProject: Avoid error messages about missing build configurations
Override the target setup, so that we don't try to initialize build
configurations.

Change-Id: I8f8022c705ea54dd66df828fdb4837d4a41bc96e
Reviewed-by: hjk <hjk@qt.io>
2017-12-21 08:44:23 +00:00
Eike Ziller
f9177d4b6c Add implementation of std::variant
Type-safe unions for C++.

Change-Id: I3c1eb89a240a11d27b07acae588a924a0618173e
Reviewed-by: hjk <hjk@qt.io>
2017-12-21 06:37:07 +00:00
Orgad Shaneh
c14684ffc9 QmakePM: Fix "Run in terminal" on clone
Task-number: QTCREATORBUG-19476
Change-Id: I62c8d38238f4e6f77ad6226dd70f7a719ed2d878
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2017-12-20 14:12:25 +00:00
hjk
b2a16190e8 Use project id uniformly as project context
The possibly intented flexibility e.g. to have different project types
share the same idea of a common context was never used, in all cases
we had a 1:1 relation ship between project ids and ids that were used
as context. This led to oversights like the one fixed in 60fb35a2.

This patch here uses the project id unconditionally as context and
drops all context ids. If we'll ever have the situation where the
original flexibility was needed, Project::projectContext() could be
made virtual and overridden were needed.

Also, the context was never modified for any given project, so the
updating machinery is not needed.

Change-Id: I3f7fac0ed5e4704e126558987c48577f26082dfd
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2017-12-20 12:35:14 +00:00
Ivan Donchevskii
bc4efa662c Utils: fix savefile in case we save new file (Windows)
Previous fix accidently broke saving files that do not
exist yet. They need to call rename instead of ReplaceFile.

Change-Id: Ida47845a59c1f2fe26a39dc593ab0f83fae9d18b
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-12-20 11:52:20 +00:00
Christian Kandeler
265d093c36 QbsProjectManager: Fix compiler name setup for GCC-like toolchains
The mapping was not quite right. In particular, cpp.cCompilerName needs
to be set if the compiler name is not the default.

Task-number: QTCREATORBUG-19467
Change-Id: I6c190fdda98ff15dce6066bfb082d24853538a78
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2017-12-20 10:22:52 +00:00
Eike Ziller
8944ba0391 Utils::transform: Add support for various map types as result
Add support for output as std::map/unordered_map/set and QMap and QHash,
when giving the full result type as template argument. For std::
(unordered_)map, the function must return a std::pair<Key,Value>, for
QMap and QHash it can also be QPair<Key,Value>.

Change-Id: If3dff17ab6aa5d1b11abc244813fd885d10c75a4
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-12-20 09:58:50 +00:00
Eike Ziller
f62b24c475 Utils::transform: Support containers without reserve()
Support containers without reserve() as result container, for example
std::set/deque/list

Change-Id: Ia96b834c67d5ee74bfb9de2cf6b86639f6b3d5d7
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-12-20 09:58:27 +00:00
Marco Bubke
91e40e12db Utils: Converter to raw pointer and references
Sometimes you want to get raw pointer container from smart pointer
container and reference container from value container.

Change-Id: Ia018d572ac0a7bf742f3937dc38ee30670a3ca73
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2017-12-20 09:58:17 +00:00
Christian Stenger
60fb35a23c QMakePM: Fix typo in supported project type
Introduced with 4a66cae854.

Change-Id: I7b10391160132024cac5c3bab8e44693ff4a89b8
Reviewed-by: hjk <hjk@qt.io>
2017-12-20 09:38:28 +00:00
hjk
c06212a255 Debugger: Use more QUrl in channel-ish interfaces
Change-Id: I978b18b4d79ce927ae4801955558b9f24dbcb64e
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-12-20 09:36:14 +00:00
David Schulz
f06d97c67f Debugger: reset thread after failed function call
Change-Id: If390d681ec33aa7c03b7e6cc62c45f2950186998
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-12-20 09:32:27 +00:00
David Schulz
b2052561cc Debugger: improve evaluate expression with cdb
Replace Evaluate with AddSymbol and create a PyValue representing
that expression

Change-Id: Ibb8ab70c41df81e9d7d683b633a070caa03036d3
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-12-20 09:32:18 +00:00
Eike Ziller
90c7170dae InfoBar::enableInfo -> InfoBar::unsuppressInfo
"enableInfo" actually was the reverse of "suppressInfo", so make that
obvious in the naming.

Change-Id: Ie9210533d9169d9bf486eb4034c8264b5bddda8b
Reviewed-by: David Schulz <david.schulz@qt.io>
2017-12-20 08:35:36 +00:00
Hugo Holgersson
b7bdb8e275 TextEditor: Allow direct color styling for function definitions
We can now give FunctionDefintion *any* fore/background color.
FunctionDefinition is now a "color overriding mixin" to
Function and Virtual Function. Previously, FunctionDefinition
could only get a color that was an offset to the color already
given to Function and Virtual Function.

TEST=The FunctionDefinition-option can now set fore/background colors.

Requires Clang.

Task-number: QTCREATORBUG-16625
Change-Id: I0ef5fd30a3762aa2cb4a7684fea2620041f7cf7e
Reviewed-by: David Schulz <david.schulz@qt.io>
2017-12-19 21:04:52 +00:00
Hugo Holgersson
3192366b44 TextEditor: Implement color overriding mixins
This is the first implementation of "color overriding mixins".

Mixins are already initialized with fore/background color =
QColor() = "invalid color" (see Format::createMixinFormat).

This patch uses above contract in FontSettings::addMixinStyle.
Only mixins with a valid fore- or background color can override
other style options' colors. Unset mixins will have no effect.

TEST=No functional change (will be enabled in a follow-up).

Requires Clang.

Task-number: QTCREATORBUG-16625
Change-Id: I983bb876c060963f6d66cc64881bc138e384f5e5
Reviewed-by: David Schulz <david.schulz@qt.io>
2017-12-19 21:04:00 +00:00
Tim Jenssen
83e01b4777 QmlDesigner: fix crash
Change-Id: I402a6701e8339150c908e0e3eca014f3c8ee727a
Task-number: QTCREATORBUG-19468
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2017-12-19 16:14:31 +00:00
Robert Loehning
afbb427ac5 Utils: Don't proceed with temp file which could not be opened
Change-Id: I0e12d63ecaa52e9396216c4f59e12a9ba15d9774
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2017-12-19 14:38:49 +00:00
hjk
21c66ce5fd Combine some SshConnectionParameter members
Combine host, port, username and password into a 'url' member and
add some convenience accessors.

Change-Id: Iddc26ff00dad1285c96aa56f196dbc4febe8e974
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2017-12-19 14:19:31 +00:00
hjk
36f720907c Android: Use device types as restrictions on project configurations
Change-Id: I3f7ff05f27c76dadec9a9ff0ae02848830655472
Reviewed-by: Vikas Pachdha <vikas.pachdha@qt.io>
2017-12-19 10:52:28 +00:00
hjk
4a66cae854 ProjectExplorer: Use ids in RunConfigFactory:: setSupportedProjectType
More similar to what build/deploy uses.

Change-Id: Icf8bd7031d00a6e2831f8c1f3b1bdcaa8bf259b4
Reviewed-by: hjk <hjk@qt.io>
2017-12-19 09:42:01 +00:00
Ulf Hermann
a21a518d38 QmlProfiler: Record debug messages separately
They are not time-ordered like normal messages, so we need to buffer
them and only insert them when the normal event stream arrives at their
timestamp.

The time ordering is important as the "restrict to range" feature uses
it to determine the start of the range.

Change-Id: If27a3f667c4c39e69efa95fcb9cdfd3dbf01e657
Task-number: QTCREATORBUG-19456
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2017-12-19 09:36:41 +00:00
hjk
7f7aa6034d RemoteLinux: Remove unneeded declarations
Change-Id: Idaf2ef617090f6da5298b13f17af2db1ec0a89cb
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2017-12-19 09:17:11 +00:00
hjk
280b7e2109 Ios: Use device types as restrictions on project configurations
Change-Id: I3c31f14eba9d9f68a333a814bea800a3da38d4a2
Reviewed-by: Vikas Pachdha <vikas.pachdha@qt.io>
2017-12-19 09:16:45 +00:00
Alessandro Portale
f8b10bf5b0 QmlProfiler/timeline: Avoid modulo with negative divisor
All of a sudden, using modulo with a negative divisor in qml/js crashes
with the latest Qt dev (upcoming 5.11).

Change-Id: Iabd7fbaf7367ff630065d6863e03c10710bf0cd4
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2017-12-19 09:16:28 +00:00
Eike Ziller
44ee8b9068 Add "Add New..." to file system view
Since we do not have a specific project node where to add the file(s),
the user has to rely on the guess that is already done by the project
management wizard page.

Task-number: QTCREATORBUG-19213
Change-Id: I4ee2f81cd7b8d7ac2391d2c11eb53a695968233c
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-12-19 09:12:47 +00:00
Tobias Hunger
6c02588f39 MSVC: Add support for language version flags in MSVC2017
Change-Id: I0aafd3917bbc53e77a965c3c5a761c7acaf047ff
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
2017-12-19 09:01:08 +00:00
Christian Stenger
81fd3f7a30 AutoTest: Do not duplicate member in derived class
Change-Id: Ia88a484f30b2c5d51fca4a2da8464a01007a0d47
Reviewed-by: David Schulz <david.schulz@qt.io>
2017-12-19 08:57:37 +00:00
Christian Stenger
dc1e6519a6 AutoTest: Consolidate handling of global menu items
Change-Id: I6ad07775d63206864ec330ad87d3b65e5ecaf76c
Reviewed-by: David Schulz <david.schulz@qt.io>
2017-12-19 08:57:31 +00:00
Eike Ziller
e0a23664aa Utils::transform: Allow usage with non-const source containers
Makes it possible to e.g. transform to list of reference_wrappers.

Change-Id: Ib608034fc3f296824c289edd27563bc7a196ac6d
Reviewed-by: hjk <hjk@qt.io>
2017-12-19 07:35:38 +00:00
hjk
479ab4ef22 TextEditor: Split the global QuickFixFactory list
It's only ever used in the filtered Cpp/QmlJs variants. Splitting
the class simplifies the code and avoids re-doing filtering over
and over again.

Also inline QuickFixFactory::matchingOperations() into callers

Change-Id: I730756315f2e0321649259ef229631233b12fbdd
Reviewed-by: David Schulz <david.schulz@qt.io>
2017-12-18 15:39:51 +00:00
David Schulz
a5ceca3a8d Debugger: fix state handling when aborting debugger
Change-Id: Ied4fcf7d39bf8ca96714fc3fbbdb7edd88f1048b
Reviewed-by: hjk <hjk@qt.io>
2017-12-18 12:16:35 +00:00
hjk
a137ece13b Cpp/QmlJSEditor: Add some 'override'
Change-Id: Ic73f1602922fffa6cb8610e45ada292c759669c5
Reviewed-by: David Schulz <david.schulz@qt.io>
2017-12-18 07:32:03 +00:00
hjk
dabfd1d7ac Remove forgotten unused cppQuickFixFactories() prototype
Change-Id: I8e3d62c8ddd1ae9a2702ee8d19964164d00b9f09
Reviewed-by: David Schulz <david.schulz@qt.io>
2017-12-18 07:31:55 +00:00
Christian Kandeler
5efe63ac8c Update qbs submodule
To HEAD of 1.10 branch.

Change-Id: I4df99065f2ef1513eead623cb3f117ce2b65baea
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2017-12-15 20:53:59 +00:00
Alessandro Portale
46a2818ead QmlProfiler: Silence truncation warning
When building Qt Creator with MSVC, this is the only warning I get:
  warning: C4309: 'initializing': truncation of constant value

It would be great to silence it.

MSVC supports the "i8" literal extension, which would be fancier than
the cast, here. But I don't know what other compilers think of it.

Change-Id: I3f1bb4f58f6ab378cbeb44a667aebc5ddee25eec
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2017-12-15 14:58:41 +00:00