Commit Graph

57165 Commits

Author SHA1 Message Date
Tobias Hunger
56e2fb2a95 CMake: Use std::make_unique
Change-Id: I01904f532976b908956c08b895d35f4d5a573bf8
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-05-24 11:39:58 +00:00
Tobias Hunger
bcbb6e61ef ProjectExplorer: Use unique_ptr to hold targets in projects
Change-Id: I8f793f5e552b65939d6c7c5e0eb42b89f9f45c3d
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-05-24 11:39:49 +00:00
Joerg Bornemann
db64a04433 Update qbs submodule
To HEAD of 1.12 branch.

Change-Id: Icb9f4ce0c385a1f89f2a4ea4f1db0716b4326551
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2018-05-24 11:08:13 +00:00
hjk
d4ea80ef7c Debugger: Conceptually fix temporary stop of mixed gdb+qml engine
There's no actual change, the code could only be triggered when
the gdb side was active, but it triggered a stop of the combo
which then redirected to the active one.

It's always and only the gdb side that needs stopping, so do
it directly.

Change-Id: I1a6273b826be8f38993c9968d874b7b3daf0d0c7
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-05-24 10:15:35 +00:00
Tim Jenssen
1412dde3a5 FileInProjectFinder: performance improvement
cdUp does check for an existing file which is slow
especially at Windows.
Benchmarking this with a project with around 100
files improved time usage inside that method from
6 seconds to 300 ms.
There is still room for improvement because of parentDir
calls cleanPath which is also not that fast.

Change-Id: I57adae1f1f0a82ac702b461758e9d1b89760087b
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2018-05-24 10:10:24 +00:00
Tim Jenssen
b5a4e88485 FileInProjectFinder: Use FileNameList for file names
This simplifies code and reduces the number of conversions between
QString and Utils::FileName.

Change-Id: I47bd86b9ae09b1da37b4e5e604761367ac1ab26b
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2018-05-24 10:09:26 +00:00
Robert Loehning
3fa66ca6e0 Squish: Remove outdated code
Creator requires Qt >= 5.9

Change-Id: If63c12b354d8b89de3f70e8be924428812d3b2bd
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-05-24 10:04:48 +00:00
Robert Loehning
e8586c8d12 Squish: Configure Qt Creator projects on Qt 5.10
Task-number: QTCREATORBUG-20056
Change-Id: I0d12747ac9510fbab2cbe1e751d3613608a07053
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-05-24 10:01:56 +00:00
Ivan Donchevskii
75afda1798 ProjectExplorer: Fix switching build console to Utf8 for MSVC
Wrap make command into the script to switch console code page
to Utf8 before make (when the Kit check is on).

Task-number: QTCREATORBUG-20327
Change-Id: Ie3e372e52a09b93a41c5ac7ad63b7b14384655fb
Reviewed-by: André Hartmann <aha_1980@gmx.de>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-05-24 09:45:12 +00:00
Ivan Donchevskii
8ea31bb1e1 Utils: Fix unit-test failure caused by SmallString issue
Failing test:
SymbolsCollector.CollectUsedMacrosWithoutExternalDefine

std::stable_partition can move-assigne object to itself
which was not properly handled in SmallString.

Change-Id: I719f3cb78cdace5fdbd9fcac3f5f099baa58a8c2
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2018-05-24 09:44:39 +00:00
Ivan Donchevskii
e92b46073e Clang: Fix unit-test failures caused by Clang update
Failing tests:
TokenProcessor.TemplateFunctionCall
TokenProcessor.TemplateClassDeclaration

Do not introduce fatal error in test source file.
Otherwise template function is not recognized anymore.

Such template calls were also broken before but could
provide a valid Cursor kind. So it's a minor regression
in Clang but does not change anything for Qt Creator user.
Bug is reported: https://bugs.llvm.org/show_bug.cgi?id=37550

Change-Id: I788e8d9f88141cfefc6bbde77f36c459d91aff0b
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2018-05-24 09:44:30 +00:00
Leena Miettinen
3d9025bfe3 Doc: Move the location of settings files from FAQ to Platform Notes
Change-Id: I70d8617aaad89b27bee4c38a702e62d325c7e7d1
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-05-24 07:18:42 +00:00
Eike Ziller
aac2e2e41a MakeSteps: Unify environment code
Cleaning up a mess with different environments being used at different
places.

Change-Id: I038c440c78e7c195d0154d1642d2573af56008b2
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-05-24 06:33:18 +00:00
Eike Ziller
f048cfa846 MakeStep: Fix that make command could not be set without tool chain
Both the configuration widget and the build itself were complaining that
a tool chain is needed, even though the build in the end cares only
about the make command, not the tool chain.

Change-Id: I5be0f44376a446bd76053f5365c842384d71be30
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-05-24 06:33:10 +00:00
hjk
8b8237b11b Debugger: Fix combined debugger interrupt state machine
This fixes the case where the mixed engine was used, and called one
of the slave engine's interruptInferior() without setting the
InterruptStopRequested state in the slave.

Change-Id: I45adbdcebc02940d6fcfb4299ef9f4bef1341b32
Reviewed-by: David Schulz <david.schulz@qt.io>
2018-05-23 15:24:16 +00:00
Leena Miettinen
51f5f25f99 Doc: Describe the Enable high DPI scaling option
Task-number: QTCREATORBUG-20232
Change-Id: I3a0ba2fcfd08fe6f3208754f369241553e0d0d83
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
2018-05-23 15:09:19 +00:00
José Tomás Tocino
caf935b60f CMake: Fix cmake version detection
Task-number: QTCREATORBUG-19966
Change-Id: I0834e1c117e96d05912b7bba7362b4d3d4c6c28d
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2018-05-23 14:14:49 +00:00
hjk
3e4ecf9213 Debugger: Adapt the debugger log warning to reality
With the advent of plugins bundled during packaging the debugger
cannot speak for all of Qt Creator anymore.

Change-Id: Ifb8e30c616f71e89a46af178c7b2e3ea6858af53
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-05-23 13:51:34 +00:00
hjk
82fd4fa717 QmakeAndroid: Move RunConfigurationFactory to Android base
The RunConfiguration does not depend on qmake anymore.

This makes the factory trigger in theory for non-qmake, too, but since
we still not support other build systems for android, it has no
practical consequences yet.

Change-Id: I95e4e5a81f5b405a52fa42723b25a0a1473e78c6
Reviewed-by: Vikas Pachdha <vikas.pachdha@qt.io>
2018-05-23 12:15:28 +00:00
Christian Stenger
59f864a758 AutoTest: Silence soft assert
Change-Id: I6aa2490971fcf4fbbbbc0bad570406e349029b32
Reviewed-by: David Schulz <david.schulz@qt.io>
2018-05-23 11:26:18 +00:00
Tobias Hunger
478fda1b76 Project: Show warning icon in project tree
Show warning icon in project tree whenever a project reports an
error/warning and report details in the tooltip.

Change-Id: I8b91161b74d5def97bad919bdda28b4ec4637da9
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-05-23 11:21:22 +00:00
Nikolai Kosjar
90d377bee9 ClangTools: Preselect current diagnostic config
...in ClangDiagnosticConfigsWidget when clicking on the "Manage..."
button. This allows to inspect the current diagnostic configuration
without further interaction steps.

Change-Id: I732445b33f4f194c9b9b60e184d970420ab55ec8
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-05-23 10:48:14 +00:00
Nikolai Kosjar
a809462c91 ClangTools: Avoid warnings from Q_OBJECT, too
Change-Id: I4540c1e2d9123af12e9f96976d6e37fe25aaf728
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-05-23 10:48:06 +00:00
Nikolai Kosjar
72aac9573d ClangTools: Avoid horizontal scrolling in the diagnostics view
Also, show the diagnostic text in the tooltip because the text might be
elided in the view now.

Change-Id: I7f38acacf72d68d7e4b696a01c7a0d1a76b4ed98
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-05-23 10:47:56 +00:00
Nikolai Kosjar
595f6980b7 ClangTools: Reflect state of fixits
...in the fixit column to avoid confusion.

As a side effect, add some error handling.

Change-Id: Ia30e9c9782f3c8021aedd2be7c682853a26d3f39
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-05-23 10:47:47 +00:00
Eike Ziller
84cde047d0 Use base make step for autotools projects
Unify generic and autotools make steps, by moving the better maintained
logic from the generic make step to the base make step.

Add fallback code for restoring settings from previous autotools make
steps, since a key was named slightly different.

The autotools make step was behaving a little bit better when there is
no C++ toolchain set in the kit, but on the other hand would just take
the make command from a random existing toolchain, which can be wrong
too. Anyhow, this must be fixed in a follow-up patch for all make steps.

Change-Id: I47af7d327feb9336790d30c8b9a4968c25b25db3
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-05-23 10:45:45 +00:00
Marco Benelli
5aef87f155 qmljs: cleanup locator's entries when closing a project
Task-number: QTCREATORBUG-13459
Change-Id: Icebe06a8a49389511a12506728f2109dc0b95287
Reviewed-by: Robert Loehning <robert.loehning@qt.io>
2018-05-23 10:40:34 +00:00
hjk
36b835ff0a Finish merging Runnable and StandardRunnable
As all Runnables are known to be StandardRunnables, this here
essentially replaces all .is<StandardRunnable> by 'true'.
.as<StandardRunnable> by no-op, and fixes the fallout.

Change-Id: I1632f8e164fa0a9dff063df47a9e191fdf7bbb2e
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2018-05-23 08:48:36 +00:00
Christian Stenger
8a45da420a iOS: Fix compile with gcc4.9
Change-Id: If53601ce112aeb7d0fd1d7558a1060dc6e7f0562
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-05-23 08:04:58 +00:00
Marco Benelli
abb7d4cb53 QmlJs: fix indentation in object literals
Handle properly ternary operator inside object literals

Task-number: QTCREATORBUG-7103
Change-Id: I482fb77a606f929528147c2b3939fcade77ae40f
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2018-05-23 08:04:29 +00:00
Marco Benelli
d14e89f899 QmlJS: improve support for enum declarations
Add indentation and little highlighting for enums.
It just highlights the 'enum' keyword and the name of the enum, not its
values.

Task-number: QTCREATORBUG-19226
Change-Id: I36e46a27b0e32c4aecc8e91875c3d22df1814d93
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2018-05-23 08:04:26 +00:00
Vikas Pachdha
4d082b9500 iOS: Use stdout of smctl commands
Avoid MessageTracer logs being fed to the device listing json document

Change-Id: Ia35b39d787d2df27e6f743e0b6dc401799c383db
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-05-23 07:03:11 +00:00
Tobias Hunger
fdccc54275 server-mode: Always try to read CMakeCache, even after error
Change-Id: Ib3d4fb5ac14340a7f706e4a1d8a0cbdc420d01d1
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2018-05-22 15:21:54 +00:00
Eike Ziller
981a98f34f Make step is always called "Make"
So provide it through the base class, also for the factories.

Change-Id: Ie4a6113b785ec6c0ddde694ec0bcd11a26331c39
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-05-22 13:45:27 +00:00
Ulf Hermann
dd9c7de89a Tracing: Fix past-end handling in TraceStashFile::Iterator
If we read past the end of the stream in open() or next() we don't want
to process the resulting event. This fixes the QmlProfilerTraceClient
test.

Change-Id: Iaaa60f462aa588096001579efae7ed1a88d6d6a3
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-05-22 13:41:55 +00:00
Eike Ziller
58bd043e27 Centralize retrieving the "parent" build configuration
If a step is part of a build configuration, that is used, but many steps
can be used as part of a deploy configuration.
In that case the active build configuration of the step's target must be
used, and that logic was duplicated many times.
Instead, let BuildStep::buildConfiguration take care of that logic. For
steps that are not offered for deploy configurations there is no
semantic difference, and for the others this removes code duplication.

Change-Id: I02f3bb50226590092cedcec02fce6fde9c7c6e63
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-05-22 12:18:36 +00:00
Orgad Shaneh
c0b8ac7966 QmakePM: Expand qmake arguments for summary, effective call and parser
For example, if you set MAKEFILE=Makefile.%{CurrentBuild:Name}, the
effective qmake call should show Makefile.foo and so should the command-
line summary (with details collapsed).

Change-Id: Ide0c0b0758b92f77f7cc97dd538db818575c91dd
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-05-22 11:16:06 +00:00
Ulf Hermann
88b223ed40 Tracing: Add an Iterator class to TraceStashFile
This way you can interrupt the replaying of events and continue later.

Change-Id: I3f23e0d53ecc7910389f7151b4e3fe704e8b9dac
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-05-22 11:01:59 +00:00
Ulf Hermann
60cb254329 Tracing: Allow swapping out the event storage
Change-Id: I9752b2b71f3589aea7ccb29bf32174231a788f68
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-05-22 10:11:39 +00:00
Ivan Donchevskii
da2e6b982b Unit tests: Fix undefined behavior in NativeFilePathView tests
Do not counstruct NativeFilePathView from temporary object.

Change-Id: Ifcd6bc4878f6949e98de44089a2c2b3feca4795a
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2018-05-22 09:23:31 +00:00
Christian Kandeler
1944b94575 Update qbs submodule
To HEAD of 1.12 branch.

Change-Id: I632c2f804ab333ba88211219d2fe3e8c246b3ebe
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2018-05-22 09:10:26 +00:00
Eike Ziller
6a586555f6 More changelog
Change-Id: I3bded4f8467d48ef62c68a1580a5515b0c8ea646
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2018-05-22 08:37:24 +00:00
hjk
68867a8a62 ProjectExplorer: Start merging Runnable and StandardRunnable
With AndroidRunnable gone, there is only one incarnation of
a Runnable left - the StandardRunnable.

It is not expected to ever need a different runnable again,
as platform differences are now handled in the platform specific
RunConfigurations and RunWorkers created there locally, and
global information is typically communicated via
RunConfigurationAspects, so there is no point in keeping the
Runnable::{Concept,Model} machinery.

This patch here essentially makes StandardRunnable a type alias
for Runnable, to allow downstream changing all

  if (r.is<StandardRunnable>()) { ... r.as<StandardRunnable>(); }

one by one.

When all downstream is adjusted, the alias can go completely.

Change-Id: I86aa92c7fae8d54ca603484b7e1746c126b0bddb
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2018-05-22 08:24:46 +00:00
Christian Stenger
8b4dbfb8e1 Debugger: Fix member offsets in QFile
Change-Id: I8d806aabcf2c744165553f087831ce899db24d80
Reviewed-by: hjk <hjk@qt.io>
2018-05-22 08:16:07 +00:00
Eike Ziller
d2a9e1b892 Merge remote-tracking branch 'origin/4.7'
Change-Id: I00dd929a4ed32af8f1b76cea57a7c49239dafc7c
2018-05-22 09:55:58 +02:00
Ulf Hermann
dab2045099 Android: Make sure we can queue AndroidDeviceInfo in connections
Change-Id: I7f59cba50e180ea4584442f8c2a409abb9e49a33
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
2018-05-22 07:33:15 +00:00
Ulf Hermann
0f7abe3737 Android: Don't start avd if AndroidDeviceInfo doesn't want it
If the avdname is empty, we have a physical device, rather than an
emulater, and no avd is necessary.

Change-Id: I5eeaa02ae505cce80da5f27ad9a5e1dddcabb4e2
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
2018-05-22 07:32:58 +00:00
Ulf Hermann
ab152497a0 Android: Merge output channels of AVD process
Otherwise, if the process produces a non-0 exit code, we get an error
message with only the stdout, which likely is empty.

Change-Id: I3b84f928cf786015aab499cdc2277d530d243841
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
2018-05-22 07:32:47 +00:00
Orgad Shaneh
0dccf8803b Clang: Use https protocol instead of git
Some firewalls block access to git, while they allow http[s]

Change-Id: Ia363550a7d1d09960c5569bc3a6df104be28d0c7
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2018-05-22 06:47:36 +00:00
Nikolai Kosjar
f452896308 Debugger: Remove DetailedErrorDelegate
Change-Id: I08cd9af5e11e705378a53075c7fade44fc3246ce
Reviewed-by: hjk <hjk@qt.io>
2018-05-22 06:26:23 +00:00