Commit Graph

57165 Commits

Author SHA1 Message Date
Leena Miettinen
35cc6789d2 Doc: Describe running and debugging tests from code editor
Change-Id: Ieb19c1ca62a7fa785c5ba6b90c4aebe40b124dee
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-06-08 08:56:48 +00:00
Leena Miettinen
11e92fe789 Doc: Describe grouping Google tests by using GTest filters
Change-Id: I5f128de80ee8dc6ed0a2b42fd53834d041639113
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-06-08 08:31:37 +00:00
Nikolai Kosjar
7ff3846482 Clang: Remove unused class FollowSymbolData
Change-Id: If29f69f969127abcd9fdce5ff7647665c2717041
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-06-08 08:24:56 +00:00
Leena Miettinen
3b8f0842a0 Doc: Update information about compiling Qt Quick Applications
This is an open source feature since Qt 5.11.

Change-Id: I9f1554dc880c0f69c6488e3281f6ae9e7f533c65
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2018-06-08 07:10:09 +00:00
Eike Ziller
af59639826 App: centralize conversion from local8Bit
Change-Id: I8def56fa3b613ba32dad69a2997b190fa76cab3c
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-06-08 06:49:14 +00:00
Eike Ziller
93d35399b5 App: Pull special command line parsing into separate function
Change-Id: I143aa3f49b3e9fb5a1aa30cf9c9364c61b95ced4
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-06-08 06:48:22 +00:00
Nikolai Kosjar
cbd4d05423 Clang: Fix processing documents if multiple are opened at once
Reproducable with
 1. $ ./qtcreator a.cpp b.cpp
 2. Switch to a.cpp => no highlighting

Because ClangEditorDocumentProcessor does asynchronous processing, the
backend might receive a DocumentsOpenedMessage where the document is not
the current editor (happens for a.cpp in the example). When switching to
that document, the initial jobs were not processed as the document was
not dirty.

Address this case by also checking for documents that have a revision of
1 and are not dirty. Unify adding the annotations jobs to ensure that
not more than needed are run.

Change-Id: I14030260842f97d58280235e763c8d7490705f8d
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-06-08 06:32:40 +00:00
Nikolai Kosjar
b30926cea4 Clang: Minor renaming
This completes

    commit f01fbcb789
    Clang: Clean up some IPC names

Change-Id: Ic747ca4a01e5c693bd59626eef516ae4a42bf9fc
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-06-08 06:32:33 +00:00
Robert Loehning
c91dde79d5 Squish: Update object for tst_HELP05
Change-Id: I0a38ed35061000591b8078ef534c2996809aeb58
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-06-08 05:29:20 +00:00
Nikolai Kosjar
e1e11ae15d Clang: Fix testCompleteFunctions()
With recent clang versions we can show default arguments properly.

Change-Id: I6028db183b0413650a32928d0051afb9402c5e32
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-06-07 13:46:08 +00:00
Leena Miettinen
59b3737065 Doc: Edit information about Clang Code Model and Tools
Change-Id: I8482e34ce056dd9b6a5a20a0a7a2c7603ea9a4b0
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2018-06-07 10:52:53 +00:00
Jarek Kobus
d892eaadae DiffEditor: detect binary files
Task-number: QTCREATORBUG-15767
Change-Id: Ic9f513ecaeb15b56c90933b1d5e4cf70e045b481
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-06-07 06:57:31 +00:00
Leena Miettinen
b816992a39 Doc: Describe "Add linker library search paths to run environment"
A general option for disabling library linking generally for all
projects.

Task-number: QTCREATORBUG-20240
Change-Id: I9f7f53e6deae7079613be32dadcd1325e5579720
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2018-06-06 15:30:09 +00:00
Ivan Donchevskii
4f51b89d65 Clang: Do not duplicate operator entries
Do not show the same operator twice in symbol outline and
current document filter.

Extract common checks to TokenInfoContainer class.

Change-Id: I3b48aa949d678564c952a71f650b7ba601570fa2
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2018-06-06 13:16:05 +00:00
Ivan Donchevskii
bb0c681ff8 Clang: Do not show any function internals in symbol outline
Treat everything inside function scope the same way
as local variables.

Change-Id: I038d84e5e90057d65a08afc742ebcdf2de55ff85
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2018-06-06 13:15:57 +00:00
Ulf Hermann
27907bc417 QmlProfiler: When retrying to connect, double the timeout
If you are retrying, then probably you want it to be more patient this
time. Also, tell the user how long we have waited and how long we are
going to wait when retrying.

In turn, reduce the number of "internal" retries. Retrying 10 times
should be enough to determine if the given timeout is too short. This
will give us an initial waiting time of 2s, and make the second try 4s.

Change-Id: Ibdfe02d041550eb16cadc59cec1b78ce97289b30
Task-number: QTCREATORBUG-20529
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2018-06-06 12:44:47 +00:00
Leena Miettinen
d3204ed5d4 Doc: Describe project type specific warning and error icons
... in the Projects view in the sidebar. Also, there is a big
Manage Kits button in the view now.

Change-Id: I3440fa34b98dba4c71a1c6a6559af31f7d9fd78c
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-06-06 12:23:51 +00:00
Leena Miettinen
e824ef5e0f Doc: Describe zooming into QML Profiler flame graphs
Change-Id: I3662a6998c7defaf05cefaadd62c3d69f0d73083
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2018-06-06 08:28:32 +00:00
Eike Ziller
3f356f31bc Merge remote-tracking branch 'origin/4.7'
Conflicts:
	qbs/modules/qtc/qtc.qbs
	qtcreator.pri

Change-Id: I3d42bd52fb7b977cfdfad83092fb6f6eac974e24
2018-06-06 09:57:01 +02:00
Eike Ziller
5921376573 Bump version to 4.7.0-rc1
Change-Id: I8be1dbdc726ec2b5520dbceb19973337afb71583
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-06-06 07:51:30 +00:00
Orgad Shaneh
97fadb5c7f CDB: Fix compilation
This amends commit f8e88e8ce4.

Change-Id: Iec2e553c1e63fa6e25301d04eba0c7ad42f14d66
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-06-06 05:00:47 +00:00
hjk
0fbb2839f9 Remove ApplicationLauncher::Mode
The actual remaining use was to pop up a terminal in some
setups where Mode == Console, with a default of Gui meaning
"no console". In some downstream uses it was used set to
Console (probably to mean "this helper process does not need
a gui") but then luckily ignored when actually starting the
helper processes.

All cases where the console is useful and requested are
nowadays RunWorkers belonging to RunConfigurations with
a TerminalAspect, so they can directly get the relevant bit
from their RunConfiguration without having it part of
all StandardRunnables.

Change-Id: I1368d5968da5cf672656aebf200ccac8d45335d0
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-06-05 15:08:29 +00:00
Andre Hartmann
85ffe78e96 Utils: Properly name withNtfsPermissions()
Change-Id: I759e702b63f8bed9384ccbfae6345f858e50830b
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-06-05 12:59:56 +00:00
Eike Ziller
f8e88e8ce4 Fix compilation issues with C++17
Testable on Linux/macOS by changing c++14 to c++1z in qtcreator.pri.
Testable with latest MSVC2017 by setting _CL_=/std:c++17.

unary_function, binary_function, and a few other things that were
deprecated are removed in C++17.
std::string got a non-const overload for its "data" member function,
so we cannot create a function pointer on it without specifying its
type. Use std::declval instead (though it requires a default constructor
for the type).

MSVC seems to have an issue with Utils::transform for std::vector
(used in Nim plugin), but that looks like a compiler issue.

Change-Id: I94f9a93d591d55b610f86fabfc618158927d6221
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-06-05 12:04:59 +00:00
Daniel Trevitz
d384e2398a Create Path
When the path listed in a PathChooser does not exist,
instead of showing actions on non-existent paths show
"Create Folder".

Task-number: QTCREATORBUG-20532
Change-Id: I98d149129ad33d7be36bfe13b2c1ab57ee193cf0
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-06-05 11:57:19 +00:00
Ulf Hermann
8798990fb1 Doc: Add troubleshooting entry for globally disabled perf events
Change-Id: Ia37b26cc83566b1ae802471c17ef8d309a5d2fa1
Task-number: QTCREATORBUG-20154
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2018-06-05 11:41:53 +00:00
Nikolai Kosjar
5585d97522 ClangTools: Fix checking log file path
Change-Id: I3598ab0b0b512798417b8885f562ee7978b9cf3b
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-06-05 10:36:43 +00:00
Nikolai Kosjar
c93515dde1 ClangTools: Remove outdated suffix for temporary file
Change-Id: I05b523f1c33462913a2f1fec986e74eab8120eda
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-06-05 10:36:32 +00:00
Nikolai Kosjar
bb6c02a443 ClangTools: Remove dead code
Change-Id: I5db111402902e81099489dc5ab4b0b929c574969
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-06-05 10:36:21 +00:00
Nikolai Kosjar
f19e28d95c ClangTools: Fix minor coding style issue
Change-Id: I18e36b82060923fb2271eb46298170c540fd943f
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-06-05 10:36:10 +00:00
Nikolai Kosjar
b81e5cb3b2 ClangTools: Remove temporary dirs
...when a new run is triggered instead of on Qt Creator shutdown.

There is no reason to keep them around for longer than needed.

Change-Id: Ida7698843cc2f8822ffd662679cf5da2c4ece05c
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-06-05 10:36:03 +00:00
Leena Miettinen
71f02417e7 Doc: Describe new file synchronization options
... in the Projects and File System views in the sidebar.

Change-Id: I38c77d8e5c19a1adb934c5b8d4777889467392c6
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-06-05 10:35:54 +00:00
Christian Stenger
e9a7ae21fa QuickDesigner: Avoid triggering Qt internal message
Passing an empty string to File::exists() results in a
warning coming from inside Qt.

Change-Id: Ia115c53cc748c3ad446544a8ac85f9951182f50c
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2018-06-05 09:08:53 +00:00
Robert Loehning
9cb1700993 Squish: Use built-in code model in tst_APTW01
The warnings from ClangCodeModel confuse our build check.

Change-Id: Ic6b82bb304387f447bdf8eb0b2fd02dd2f250fb2
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-06-05 09:08:47 +00:00
Christian Stenger
43fa0dfe6f Debugger: Avoid triggering Qt internal warning
Passing an empty string to QFile::exists() results in
'Empty filename passed to function' to be printed on the
commandline.

Change-Id: I028f0ec18447642b30be1a51f4c70b6ae18d45b1
Reviewed-by: hjk <hjk@qt.io>
2018-06-05 09:08:47 +00:00
Robert Loehning
35eabd7d40 Squish: Explicitly disable ClangCodeModel for testing built-in
The ClangCodeModel is the default now.

Change-Id: Id432cc9d27dcf7327c0b7efeba7004521d25fee5
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-06-05 09:08:20 +00:00
Ivan Donchevskii
87678e9a07 ClangTools: Remove huge "log files" after we've read them
Serialized diagnostics consume quite a lot of space.
Remove these files after they are read by QtC.

Change-Id: I4b257e44ee182484726ebd808069198443992016
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2018-06-05 09:00:08 +00:00
Nikolai Kosjar
fdd695c35c Clang: Disable crash recovery in libclang
...because

 1. We already run in a separate process.
 2. It's not entirely clear in which state we end up after a crash,
    except for:
 3. A "crashed" translation unit won't be freed, even when calling
    clang_disposeTranslationUnit().

This avoids undefined behavior within clangbackend and accumulated
leaking memory in the long run. On the other side, crashes within
libclang will crash clangbackend now, too.

Change-Id: I0789c52db08ace2f7e181e3b7bdfc9f595f75e8d
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-06-05 08:17:47 +00:00
Nikolai Kosjar
89d6a36bc6 Clang: Disable internal threads in libclang
We already run all operations in threads to avoid blocking, there is no
need to start more threads within libclang. Before this change, a
reparse would trigger 3 threads to start:
  1. clangbackend: Utils::runAsync() for the job
  2. libclang-internal: thread for reparse
  3. libclang-internal: thread for annotating tokens (highlighting)

Ensure that we use the same stack size for our threads as libclang was
doing internally. C++ parsers usually have higher stack size
requirements.

Change-Id: I2f67602ddfbf77ea2c69144b56acf64ba08041f6
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-06-05 08:17:40 +00:00
Tobias Hunger
14a9133abb Core: Make preview work when FOO is both a variable and a prefix
Make the preview of variable "FOO" work in the variable chooser when the
macroexpander also has a prefix "FOO:" defined.

The MacroExpander::isPrefixVariable method is broken in this case: It will
append ':' to the variable name if it is not there already and will thus
return true for both "FOO" and "FOO:". So avoid calling it.

In this case this does not even lead to more look-ups: As the variable chooser
uses the description of the variable as a key, it contains "FOO:<value>" for
the variable name and uses that checks whether "FOO:<value>:" is a prefix variable
or not. That is always false.

Task-number: QTCREATORBUG-20504
Change-Id: I3ea83a4df6d72aac157fa6777106966cc9e9976d
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-06-05 08:09:35 +00:00
Tobias Hunger
46f0fa8b27 ProjectExplorer: Use sessionmanager to set active target
Change-Id: I1e3abe473dc5eb68589de5b0b5d6ec8ea361febf
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2018-06-05 08:09:13 +00:00
Eike Ziller
c585e7091b Merge remote-tracking branch 'origin/4.7'
Change-Id: Ib288796892faf5345d2a150a5ce0dadf91552924
2018-06-04 16:33:03 +02:00
hjk
07079a1613 Valgrind: Use the majority way to register run workers
Change-Id: I6423620a9a1917ab09b93038b020c36e9208b728
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-06-04 11:51:43 +00:00
Robert Loehning
2fb270c77f Squish: Update tst_simple_analyze
Change-Id: I2cbe39a225760f53d70487e105e2b45fd4e16d33
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-06-04 11:24:10 +00:00
Robert Loehning
149a77a01d Squish: Handle third kit state
Change-Id: I3442cf7676b7f316a60344b9c7dfc2d777529785
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-06-04 11:23:51 +00:00
Christian Stenger
a926909010 Tests: Fix compile on macOS
Change-Id: Ic987e41c79cae531aa94ded8fa9fa87bce55c936
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-06-04 10:07:22 +00:00
Nikolai Kosjar
c9a3d2bea1 RunExtensions: Support specifying thread stack size
...with runAsync().

The stack size cannot be changed after starting a thread, so specifying
the stack size with a pool does not make sense. However, starting
with Qt 5.10 a stack size can be specified for the whole thread pool, if
needed.

Change-Id: I09eded606321388c779f762b77de6223081609fe
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2018-06-04 09:56:50 +00:00
Nikolai Kosjar
f01fbcb789 Clang: Clean up some IPC names
This is long overdue since some names were simply wrong and/or
misleading. Also, some of the old names were long enough to almost get
crazy.

The renaming starts from ClangCodeModelServerInterface and
ClangCodeModelClientInterface and affects usages and related functions.

For the ClangCodeModelServerInterface, categorize the messages in
 - messages that require a response (request*)
 - notification messages (the remaining ones)

Change-Id: I5342ed8e0d87404ee72f3c3766fd8ef7505defb1
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-06-04 09:54:01 +00:00
Tobias Hunger
9763851dc5 CMake: Fix SOFT-ASSERT on cmake tool removal
Change-Id: I721e71547976ecad57ed85080c67fb28fda4f8c4
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2018-06-04 09:41:12 +00:00
Ivan Donchevskii
4e4bd4909a Clang: Use follow symbol result from clang when global fails
When built-in code model fails to follow symbol under cursor
fall back to the clang result even if it only follows
to the decalration.

Change-Id: I22d8c5fee6ab7594b1d1b7ce8104414db28383c7
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2018-06-04 08:48:33 +00:00