Commit Graph

54723 Commits

Author SHA1 Message Date
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
Christian Stenger
3006a13869 Tests: Fix compile
Broke with 21c66ce5.

Change-Id: Iea3447a8226300333eacf8fa0df587d8ef197e8f
Reviewed-by: Nikita Baryshnikov <nib952051@gmail.com>
Reviewed-by: hjk <hjk@qt.io>
2017-12-20 10:12:50 +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
Robert Loehning
b64c1a96b8 Squish: Update WatchTreeView object
Change-Id: If999647727155dccc087d9d22f3b68d2b1661351
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-12-19 14:08:45 +00:00
Christian Stenger
0fcbe60cd6 Tests: Fix qml import check
Change-Id: I7fcf4a3b718c3b2124171187cdb06493c84ff7b8
Reviewed-by: Marco Benelli <marco.benelli@qt.io>
2017-12-19 13:51:35 +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
4ed12d95f8 Debugger: update link to the windows debugging tools
Change-Id: I7f1c60ed59ff41af118aa37b207c2f493df00f0b
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2017-12-18 13:54:08 +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
Samuel Gaist
9b182e28ab doc: Add missing space escaping to command line call example
This change reflects what the macOS users will see when they use the
command line to call Qt Creator.

Change-Id: If6b644390ad06d5ddbe349507713eb2d2e27cef6
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2017-12-15 22:51:44 +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
Ivan Donchevskii
29b7914429 Utils: workaround for saving file opened by another application
...fixes file saving on Windows in specific circumstances.

File deletion on Windows is quite tricky. If you simply
remove the file opened by another app that shares it for
deletion the file might become semi-removed. It looks
like it still exists but it is in fact inaccessible for
any operations until the other app frees the handle.

To solve that case there is a ReplaceFile API call
which carefully deals with that case.

[Backstory] Oswald Buddenhagen insists that this fix is
rather a workaround and we should solve file access
problem in llvm.
For that purpose we have QTCREATORBUG-19404 and upstream
https://bugs.llvm.org/show_bug.cgi?id=35558

Task-number: QTCREATORBUG-15449
Change-Id: If37d484231b79d8e33822c795232dc31243c88c0
Reviewed-by: David Schulz <david.schulz@qt.io>
2017-12-15 13:55:41 +00:00
Ivan Donchevskii
010fb41700 Utils: take control over QTemporaryFile file lock
When we derive from QTemporaryFile we can't unlock file
to be used by outer functions.
With this change lock is managed by m_tempFile variable and
can be released by reseting m_tempFile.

Change-Id: I41339410471c69d1e73df49f04bc2d5c2036a064
Reviewed-by: David Schulz <david.schulz@qt.io>
2017-12-15 13:55:30 +00:00
Ivan Donchevskii
0dafe5cb8c Utils: improve savefile error messages
Change-Id: I505c33e1e56a67a3682de2e2cbfe2ab967d04242
Reviewed-by: David Schulz <david.schulz@qt.io>
2017-12-15 13:55:23 +00:00
Christian Stenger
8187c6a146 Squish: Assign custom name to distinguish main tabbar from others
If the settings dialog contains more than one visible tabbar when
trying to access its tabs Squish fails to distinguish them.
Assign a unique name for the main tabbar of a category inside
the settings dialog.

Change-Id: I349b480871306784b5adc9858984933dc26d7958
Reviewed-by: Robert Loehning <robert.loehning@qt.io>
2017-12-15 13:53:45 +00:00
hjk
6c537b35d5 TextEditor: Dissolve QuickFixAssistProcessor
... into QuickFixAssistProcessor and QmlJSQuickFixAssistProcessor,
by essentially duplicating the class, but moving the actual work to
a new a GenericProposal::createProposal(...QuickFixOperations...)

Less indirection, and less code in total.

Change-Id: I2f8cba970bf587c9cbf04321269a60ed51bfae2a
Reviewed-by: David Schulz <david.schulz@qt.io>
2017-12-15 11:59:33 +00:00
hjk
d47fdb934d Debugger: Change semantics of DebuggerEngine::masterEngine()
Make it return 'this' if 'this' is the master engine itself.
Adapt users.

Also do not let the QmlEngine try to beginConnection() when
the combined engine was isDying() already.

Change-Id: I308deae14a3c4966be381f321c0d9dfaf82c40d6
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2017-12-15 11:50:01 +00:00
hjk
ff04632b92 TextEditor: Remove QuickFixAssistProvider
It did not contain any functionality beyond the base IAssistProvider
anymore.

Change-Id: I0198b3d629f81be8c994ffed3904b5f12ee7f9b9
Reviewed-by: David Schulz <david.schulz@qt.io>
2017-12-15 11:42:40 +00:00
hjk
4f3ac0382a TextEditor: Use more direct access to quick fix factories
Change-Id: I65fc5c0ca6c7806e09b4bd626fd1679686df7d7f
Reviewed-by: David Schulz <david.schulz@qt.io>
2017-12-15 11:33:23 +00:00
hjk
e5009787a3 Core: Remove OutputPaneManager::m_panes
It's a copy of the locally direct accessible g_outputPanes.

Change-Id: I22d34946d777ef63b1888382c2d2bd49a0da8f8c
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2017-12-15 11:07:56 +00:00
Alessandro Portale
6e802988e7 QmlDesigner: Add manual test for pixel perfect formeditor overlays
We have a few off-by-ones in the visualization of selection, boundary,
etc. Also, there are differences between low and high DPI, aswell as
different platforms.

This manual test is supposed to enable proper analysis whether the
visualizations are correct or not.

Change-Id: Iee407d37a2c6f2f272e11a4d9774532343463bc1
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2017-12-15 09:35:13 +00:00
hjk
cc88302309 De-emphasize PluginManager::getObjects<Type>()
... by additionally keeping local (currently non-owning) pools per
"interesting" type.

Current situation:
  - The global object pool does not scale well for looking up
    objects, as iteration plus qobject_cast typically iterates
    over all pooled objects.
  - User code that can use typed results from the object
    pool need to have access to the full type definition anyway,
    i.e.  depend on the plugin of the target class anyway.

The patch here solves the scaling problem is to have local
type-specific pools to which objects register in their
constructors and deregister in their destructors.

This patch here does *not* change the ownership model of the
pooled objects, however, it opens the possibility to change
the ownership model per type (e.g. by not putting things into
the global pool at all anymore and make the local pool 'owning')
and the intent is to handle that in later patchs.

Even without the follow-up patches this here is a performance
improvement for the cases that access the local pools instead
the global one, i.e. "practically all".

Change-Id: Ib11a42df2c4ecf5e1155534730083a520dd1995b
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2017-12-15 07:08:05 +00:00
Nikolai Kosjar
32762e27e2 Clang: Use more distinct ipc logging prefix
The previous "<<<" and ">>>" are visually hard to catch in the output.

Change-Id: I7313645454d92ca3534b19070173129676d49e18
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2017-12-14 16:17:50 +00:00
Nikolai Kosjar
593d395593 Clang: Remove duplicated logging category
Q_LOGGING_CATEGORY(log, "qtc.clangcodemodel.ipc") is already in
clangbackendlogging.cpp.

Change-Id: If1afa6f266505e696ea00c6ca6bdf0751640784d
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2017-12-14 16:17:43 +00:00