Commit Graph

44349 Commits

Author SHA1 Message Date
Tobias Hunger
58fd29e0ed ProjectExplorer: Do not add too many newlines
Do not add newlines when output gets flushed.

Task-number: QTCREATORBUG-17403
Change-Id: I0dea3a15611fcde8aa8cbc5fbc6b7f22c9c40dd7
Reviewed-by: hjk <hjk@qt.io>
2017-11-24 10:23:51 +00:00
Eike Ziller
4c8db5e9b7 Merge remote-tracking branch 'origin/4.5'
Change-Id: I32715e2fdbb14e4fccc4c58d3fd6052d7c1127f3
2017-11-24 10:03:38 +01:00
Orgad Shaneh
b43e22b8f4 CppTools: Disable Qt keywords for C files
Task-number: QTCREATORBUG-1478
Change-Id: I29afc0f38e5f86ca2c30d5b6551974df68ee7512
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2017-11-24 08:43:27 +00:00
Orgad Shaneh
ec86bf8ca6 CppTools: Fix initial macro parsing for generic project
The extra macros in the config files are being read in
CppModelManager::internalDefinedMacros(), but they also affect the language
features in ProjectPart::updateLanguageFeatures().

Task-number: QTCREATORBUG-1478
Change-Id: Ic197b0b7d4cc6e6a74637da0c710b0630daae25c
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2017-11-24 08:40:56 +00:00
Tobias Hunger
3b86d90266 CMake: Add QT_INSTALL_BINS to PATH on windows
Add QT_INSTALL_BINS to PATH on windows in the CMake RunConfiguration.

This should fix cmake applications using Qt not being able to get
started after they were built.

Unfortunately this patch is not a great solution: This should be configurable,
similar to the "Add libraries to LD_LIBRARY_PATH" checkbox we have for other
OSes and build systems. Such a change is unfortunately not acceptable at this
stage of the 4.5 branch though.

Task-number: QTCREATORBUG-19354
Change-Id: Ic2d568d965e41e3eb875fed8c2e5dd2ba15d2db1
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2017-11-23 15:00:58 +00:00
Thomas Hartmann
76c1041dc9 QmlDesigner: Add support for requesting types of frames
Change-Id: I3262887682520f521e84eacc26a6708d3d09b233
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2017-11-23 11:56:51 +00:00
Marco Bubke
a15250051d Clang: Handle native file in the file cache
Different types are introduced for normalized and native file path. So the
compiler is warning you if you try the wrong format.

Change-Id: I1da0686b142cbf9bb7578468c2b50f90a94cebf9
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-11-23 11:55:15 +00:00
Marco Bubke
bb2f9574b4 Utils: Add simple LineColumn class
There are many places where line and column are returned by writable
parameters which is not so readable. This simple class makes it easier
to return line and column as one value.

Change-Id: I4836088e76d0ee5decd713ab616fde2f8a97c74b
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2017-11-23 11:33:56 +00:00
Ulf Hermann
b2c2c7d642 QmlProjectManager: Detect file types correctly
Just calling everything "Source" is not very helpful.

Change-Id: I74a19e46782aa301c5726130200aeb16ef916d78
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2017-11-23 11:15:27 +00:00
Thomas Hartmann
f6068c9fd4 QmlDesigner: Add constants for live preview
Change-Id: I9b0987508ada8f973fbcb52403a3fb38c92ec2ef
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-11-23 09:40:27 +00:00
Ulf Hermann
3446c0dbd8 Remove accidentally committed fuzzing artifact
Change-Id: I1b9369f68613ab36c57890692e636a15c33ce035
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-11-23 08:16:35 +00:00
Ivan Donchevskii
7fb80595b9 ClangRefactoring: use sourceUsagesAt instead of locationsAt
Change-Id: I085b243b6e0ea4b786ce5c5f5a6894345f9d87eb
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2017-11-23 07:17:57 +00:00
Christian Stenger
327b368ab6 QmlProfiler: Fix compile on Windows
Change-Id: I4910a1f8cb36e1cfee6feeef20def6dbc967b66c
Reviewed-by: David Schulz <david.schulz@qt.io>
2017-11-23 06:17:22 +00:00
Tobias Hunger
440f65b115 SettingsAccessor: Factor out basic load/save behavior
Change-Id: I654321167c623b507a9f109e42f77f41df3eccd2
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2017-11-22 19:12:32 +00:00
hjk
8e8890abc8 QbsProject: Compute uniqueProductName on the fly
To simplify and fix cloning.

Change-Id: I380834710243f104635628b8d455219f0f73e67b
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2017-11-22 15:46:15 +00:00
Ulf Hermann
7b4b56c336 QmlProfiler: Tests for QmlProfilerTraceClient
We run a number of test traces through the trace client and make sure
that it doesn't crash and that the events reappear in the right order.

Change-Id: I45bbeeb978f2ab147551aaafa74631f927c710e8
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2017-11-22 15:10:53 +00:00
Nikolai Kosjar
defe77c7ac Clang: Remove warning about unused parameter
Change-Id: I75481c1f256dbb70de088a7d2289bde9579d3ff4
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-11-22 14:03:23 +00:00
Nikolai Kosjar
807ef044bf Clang: Remove unused function
Change-Id: Ia76e8cf523b301865d902a3768439a648c23da01
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2017-11-22 14:02:40 +00:00
Christian Stenger
2ab27c0842 CppTools: Fix compile with Qt5.6 and gcc4.9
Change-Id: I47668b784106c78444869595143ec8aff6928e8f
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2017-11-22 13:55:59 +00:00
Ivan Donchevskii
63ea3ac004 Clang: Improve code model plugins settings UI
Describe clazy levels, improve layouts.

Change-Id: I4895682ea7d10ea910c2d53725073c9c870bb306
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2017-11-22 13:33:54 +00:00
Tobias Hunger
e037fe7e0c CMake: Hide nodes from project list
Hide nodes from project list so that they will not end up cluttering
the locator with directory locations (which creator can not open anyway).

Task-number: QTCREATORBUG-19346
Change-Id: I78d7d16b7cdacf5536e81c5001a292af0bd0c2df
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2017-11-22 13:16:34 +00:00
Tobias Hunger
9a56ac25cb SettingsAccessor: More const, more warnings on misuse
Change-Id: I667944f041792c72b0cecbd6b2ec252db9a2701d
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2017-11-22 12:28:25 +00:00
Tobias Hunger
2e62690dcd SettingsAccessor: Do not hard-code document type
Change-Id: Ied886eac9fcb4a9c58f088c32ee5ba0646b94fbc
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2017-11-22 12:28:19 +00:00
Christian Stenger
c738198185 Android: Fix compile with Qt5.6 and gcc4.9
Change-Id: Id353723112bb3086e695f483c3ce4ec53ba425d8
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2017-11-22 12:04:48 +00:00
Tobias Hunger
0a202e4c29 SettingsAccessor: Use optional as return value of findIssues
Change-Id: Ib7ef8ec408f812a71735939514d98cf8755d292b
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2017-11-22 11:59:08 +00:00
Tobias Hunger
6044b84e14 SettingsAccessor: Add tests for findIssues
Change-Id: Ib78c2c93dc9404087efe485fdaaad69595aa0125
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2017-11-22 11:59:02 +00:00
Tobias Hunger
b8f2d746d0 SettingsAccessor: Add methods to upgrade to a specific version
Change-Id: If368f4a35d3702dbf680b1306ca6311070aa9bb5
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2017-11-22 11:58:56 +00:00
Tobias Hunger
5d6c2ca159 SettingsAccessor: Do not change data on invalid upgrade attempts
Make sure that the input data is returned unchanged if an invalid update
attempt is attempted.

Update tests accordingly.

Change-Id: If5c410bf1a757f984593bda871763af64d8dd972
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2017-11-22 11:58:50 +00:00
Ivan Donchevskii
1c0bdb693e ClangRefactoring: enable "search again" for find/rename usages
Make its behavior closer to the builtin find/rename

Change-Id: I3730e87ca3e41677b004b98bb2e62dada5d32f22
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2017-11-22 11:56:12 +00:00
Ulf Hermann
bffbae47f1 QmlProfiler: Don't write past end in QmlEvent
If the external data is quint16_max long, we need to stop writing at
quint16_max - 1. So we cannot rely on unsigned integer overflow to
enforce the boundary.

Also, use for (...) rather than foreach (...). This should easily offset
the extra overhead introduced by the bounds check.

Change-Id: I51d1aef1040fbaa8396ca80ec7e30b2fe7b7dd0b
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2017-11-22 11:46:29 +00:00
Ulf Hermann
64288955f0 FlameGraph: Silence some warnings
Apparently those anchors get evaluated before the parent-child
relationship is established.

Change-Id: I182a7760f3f638bd416af707dff092025d40a9b6
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2017-11-22 11:13:45 +00:00
Ulf Hermann
1e49ac3041 QmlProfiler: Properly clear the trace client
Rename the method to clear() and make sure all the event types and
pending events are actually cleared.

Change-Id: Ie6c916d374a00025f7d77d21345d039fe8cead80
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2017-11-22 11:13:10 +00:00
Ivan Donchevskii
08e3d8f011 Clang: Android: fix clang code model errors
Add missing gcc include directories in Android toolchain.
This introduces the similar "magic" that we have in qmake
(*qtsource*/qtbase/mkspecs/common/android-base-head.conf)
but allows us to have those paths wherever we use android
toolchain.

Change-Id: I5740f1f2339fd30670567f24db2be2454f665f41
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-11-22 10:56:10 +00:00
Ivan Donchevskii
1601f53542 Clang: StaticAnalyzer: use the default compiler options builder
Analyzer has clang path and can generate necessary header paths
to be able to use default options builder.

Change-Id: I9bb1fc158f045f6e099817c5557ee7d9e38416fb
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2017-11-22 10:55:44 +00:00
Tobias Hunger
0269503dd8 SettingsAccessor: Improve SettingsAccessor::isBetterMatch
Improve the behavior of isBetterMatch, so that it now handles
invalid versions as well as invalid ids. Simplify code where possible.

Change-Id: I2e65c0cc01d32fa77df8b5ec0d62b765e6c458f7
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2017-11-22 10:16:25 +00:00
David Schulz
c815d456ed TextEditor: Add option to display annotation between lines
Task-number: QTCREATORBUG-19181
Change-Id: I9b3957c678c08ca2f3ddf9cfa5ff272241547471
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2017-11-22 10:08:01 +00:00
hjk
c751e6afa7 Nim: Remove some unused functions, inline others
That's adapting to the introduction and use of extra runconfig aspects
a while ago.

Change-Id: I216aa409679b6b81bf3b6fa7c4473147616962a6
Reviewed-by: David Schulz <david.schulz@qt.io>
2017-11-22 09:45:00 +00:00
Ulf Hermann
903fe559c2 Clang: Fix spelling of "disabled" messages
Change-Id: Iac9729ffc75171c70822cd8f207af63b060b5b78
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2017-11-22 08:47:12 +00:00
Ulf Hermann
5e0639542f Add some sanity to the clang detection code for qmake build
llvm-config can usually be found in PATH on systems which have standard
paths at all. There is no need to specify LLVM_INSTALL_DIR then.
Furthermore, llvm-config has an option --bindir which will tell us the
directory where clang can be found (if installed). No need to apply
strange heuristics based on LLVM_INSTALL_DIR. Finally, we can check
within each .pro file for the conditions to be met using qmake's
require() function. This way we don't need to fiddle with
LLVM_INSTALL_DIR in unrelated places.

Change-Id: I1a6ab092b06de40dfbfa4a9e7053451360fd24c8
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2017-11-22 08:47:05 +00:00
Tobias Hunger
7c96f0027e NavigationTreeView: Improve horizontal scrolling in treeview
Do not move horizontally so often when scrolling to an index in the
TreeView. This is done by getting more accurate sizes for the items
being drawn.

Change-Id: I9cbc7912ede6a4bec3126c3ce9a0a4eb65805910
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2017-11-22 08:41:45 +00:00
Marco Bubke
b0137c3a01 Clang: Move path watcher to clang support
Change-Id: I3b54304bcbba750ef826e6244b8f6c7000c9cf9b
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-11-21 17:38:07 +00:00
Ulf Hermann
7d550cd7c4 QmlProfiler: Eliminate some clang warnings
Explicitly check the user-given port for the right range, drop an
unnecessary switch/default clause, and reorder members for better
memory alignment.

Change-Id: I82e9f4353debd6b211d251ecd83fc642a04bdd87
Reviewed-by: hjk <hjk@qt.io>
2017-11-21 14:55:29 +00:00
Eike Ziller
1b74172019 Merge "Merge remote-tracking branch 'origin/4.5'" 2017-11-21 13:11:05 +00:00
David Schulz
99309389f6 Editor: Remove dead code from EditorManager
Change-Id: I1f913177b964440592bf5954c1cd3a46cba2b139
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2017-11-21 13:03:32 +00:00
Eike Ziller
89f9f22035 Merge remote-tracking branch 'origin/4.5'
Conflicts:
	src/plugins/clangcodemodel/clangutils.cpp
	src/plugins/cpptools/clangcompileroptionsbuilder.cpp
	src/plugins/cpptools/compileroptionsbuilder.cpp

Change-Id: I0728f08171103259407bbbb35f93b70c2f2e18d0
2017-11-21 13:28:55 +01:00
Ivan Donchevskii
194bde265c Clang: Define __FUNCSIG__ and others for msvc toolchain
Affects __FUNCSIG__, __FUNCTION__ and __FUNCDNAME__.
By default Clang can't concatenate strings under those
macros with other strings.
Because of that we need to define them with empty strings
to make clang compile such cases without errors.

Task-number: QTCREATORBUG-19295
Change-Id: I9a3770ebe56b4b8a49ba9982c5a1ba90c8f0b304
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2017-11-21 11:31:22 +00:00
Vikas Pachdha
59e3d9af1e Android: Enable emulator tool installation
Let Android sdk manager UI install the emulator tool. AVD needs this
tool to manage AVD's.

Task-number: QTCREATORBUG-19332
Change-Id: If836c511ca4a5673470d42c14115afa21b1b96fd
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2017-11-21 10:53:20 +00:00
Tobias Hunger
216e40b3f0 CMake: Fix tree scanner not getting run automatically
This lead to <Headers> entry being missing from the project tree.

Task-number: QTCREATORBUG-19333
Change-Id: Ice3bab6d92aaa3799e66800cbae0bacd57537322
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2017-11-21 10:19:53 +00:00
Nikolai Kosjar
2abf1f29cc Clang: Add identifying macro Q_CREATOR_RUN
Use the same we use for the built-in code model.

This is useful for conditions of pragmas.

Task-number: QTCREATORBUG-16847
Change-Id: I4c83be46bb2b8a23e4c8f70d98e2b4c9572121ee
Reviewed-by: David Schulz <david.schulz@qt.io>
2017-11-21 10:05:31 +00:00
Nikolai Kosjar
cd74eff1ba Clang: Fix coverty scan diagnostics in constructor
CID 1462055:  Uninitialized members  (UNINIT_CTOR) Non-static class
member "m_tidyChecksWidget" is not initialized in this constructor nor
  in any functions that it calls.

Change-Id: Ie6ba9f2714238feb03a9fc4006c0475b658cdf07
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
2017-11-21 10:05:24 +00:00