Commit Graph

45323 Commits

Author SHA1 Message Date
Nikolai Kosjar
6ed1a2b3c8 CppTools: Rewrite cppdoxygen.cpp with cplusplus-keywordgen
Braces all over the place since the tool does not respect the coding
style and cppdoxygen.cpp was changed with regard to the braces coding
style in the meantime:

  commit 29a93998df
  Remove braces for single lines of conditions

Next step is to use the tool for updating the qdoc/doxygen keywords.

Change-Id: Ib95b5991ebd794d144848ae052fa7f28a6d10850
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2016-03-31 11:45:39 +00:00
Nikolai Kosjar
be32cdc670 C++: Import roberto's kwgen utility
...as src/tools/cplusplus-keywordgen so it will not get lost. Taken from
[1] in its current revision (e7831d6).

The utility generates code that classifies identifers/keywords. Most
probably the following files from Qt Creator were generated by it or are
at least based on its output:

 src/libs/3rdparty/cplusplus/Keywords.cpp
 src/libs/3rdparty/cplusplus/ObjectiveCTypeQualifiers.cpp
 src/libs/glsl/glslkeywords.cpp
 src/plugins/cpptools/cppdoxygen.cpp

We will use the utility to update the known qdoc/doxygen keywords. The
clang code model will also profits from this.

[1] https://github.com/robertoraggi/cplusplus/blob/master/tools/kwgen.cpp

Change-Id: I604f2028d32fd9a48bd6f84bef7264b6d2beed7d
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
2016-03-31 11:45:31 +00:00
Alessandro Portale
2710168446 ManhattanStyle: Themable arrows
This change makes arrows in e.g. ComboBoxes themable. This also improves
the clear distinction between enabled and disabled state.

Change-Id: If40dcd3e162ad71d1bc6507c047203aa60e09ee6
Reviewed-by: Alessandro Portale <alessandro.portale@theqtcompany.com>
2016-03-31 10:40:32 +00:00
Alessandro Portale
0187dc493c Help: New "Bookmark" icon
Change-Id: I43af280196912b1b4fd09f2e7823f54b4b37ee45
Reviewed-by: Diana de Sousa <diana.desousa@theqtcompany.com>
Reviewed-by: Alessandro Portale <alessandro.portale@theqtcompany.com>
2016-03-31 10:39:45 +00:00
Robert Loehning
180c0a2883 Squish: Expect more fails with clang code model
Task-number: QTCREATORBUG-15710
Change-Id: I9a074921d6521fa11a281c0e2d296666ca86ef51
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2016-03-31 10:26:02 +00:00
Robert Loehning
93da73ffce Squish: Update objects for tst_qml_locals
Change-Id: Iddc266417f9e1d5ba1ecdddb46f62f820c921b20
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2016-03-31 10:25:52 +00:00
Robert Loehning
39e8698290 Squish: Update suite_WELP
Change-Id: Iba47a015eb87ad759933dc51bacceaf29d3da57c
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2016-03-31 10:25:43 +00:00
Robert Loehning
db2ab92801 Squish: Remove outdated code
Creator can't be built with Qt 5.4 anymore.

Change-Id: Ic3c014e8384c72c10a48c65117c53daecaa683ab
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
2016-03-31 10:25:32 +00:00
Nikolai Kosjar
334e3edd18 C++: Extract base startOfOperator()
...in order to remove some duplication.

Change-Id: Ie974b6ed9418967ad80b4604088b0e1c293b59d0
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
2016-03-31 09:30:37 +00:00
Alessandro Portale
4df4864b9b Help: New "Home" icon
Change-Id: I5d6e0ee20ecb76cb90106041f78b504a695ad94a
Reviewed-by: Alessandro Portale <alessandro.portale@theqtcompany.com>
2016-03-31 09:26:45 +00:00
Ulf Hermann
fdfd5f2351 Debugger: Avoid setParent(0) on QDockWidgets
This spells trouble as dock widgets which have a native window will
assume they should be positioned relative to the outermost native
window then.

Change-Id: I5a8ce5870afacaabe26d4a2d7ac53ffee09328ed
Task-number: QTCREATORBUG-15844
Reviewed-by: hjk <hjk@theqtcompany.com>
2016-03-31 08:33:30 +00:00
Nikolai Kosjar
4b3a987c39 C++: Equalize startOfOperator()
There are two versions of startOfOperator:
    * InternalCppCompletionAssistProcessor::startOfOperator
    * ClangCompletionAssistProcessor::startOfOperator

The latter started as a copy of the former, but the former got some bug
fixes in the meantime.  Adjust both versions to each other, so it's easy
to diff them and to extract the duplication in a follow-up change.

Change-Id: Icf48386bf1ad0fa473bec476c5412be9b1890139
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
2016-03-31 08:01:58 +00:00
Nikolai Kosjar
da5309cbc6 C++: Fix completion for doxygen tags II
For assist processors that run in a worker thread, the QTextDocument is
recreated with AssistInterface::prepareForAsyncUse and
AssistInterface::recreateTextDocument.

Since some assist processors (C++, QmlJS) rely on the user states of the
QTextBlocks, these must be recreated, too.

In the referenced bug report the lexer state (user state) of the
previous QTextBlock was invalid and thus the "Doxygen tag completion"
failed.

Task-number: QTCREATORBUG-9373
Change-Id: If668e98aa6f9fe9fc107c7476fc831e92a0d7572
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
2016-03-31 07:12:49 +00:00
Nikolai Kosjar
4de62a7349 C++: Fix completion for doxygen tags I
There are three cases that must be handled:

 1. Completion in C++ style comment
 2. Completion in first line of a C style comment
 3. Completion in non-first line of a C style comment

This change fixes case 1 + 2. Case 3 will be addressed in a follow-up
change, same goes for the duplication.

Task-number: QTCREATORBUG-15143
Change-Id: I449711f965ddcbbe6158870a8a5ae33218e0d238
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
2016-03-31 06:51:34 +00:00
Christian Stenger
9905eb6f75 Dumper: Fix fileName offset for Qt5.5 on 32bit
Change-Id: Iffd6d70c7d283b932f8946447b27f3e7ba1f5e98
Reviewed-by: hjk <hjk@theqtcompany.com>
2016-03-31 05:29:47 +00:00
Christian Kandeler
26be0a5763 Update qbs submodule.
To HEAD of 1.5 branch.

Change-Id: I82829fcfced9aab6787bc16b14dfeb50afe500a5
Reviewed-by: Jake Petroules <jake.petroules@theqtcompany.com>
2016-03-30 17:04:37 +00:00
Sergey Belyashov
a44f86ed04 Update Russian translation
Change-Id: Idc6cca38846741086f378bcb0df605727fffe8a4
Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2016-03-30 16:28:47 +00:00
Alessandro Portale
d2b32d135d QtQuickDesigner: Flat item selection in navigator tree
...for "flat" themes.
Also, a small HighDPI fix for the non-flat variant.

Change-Id: I5ae401bd59627a957f621e1111b2ab277127b2b5
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
2016-03-30 15:07:38 +00:00
Orgad Shaneh
01c91fc8f9 ProjectExplorer: Provide run configuration name for macro expander
Change-Id: If04b824f4de18532d7561b86244464f8718fb8d7
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2016-03-30 14:39:55 +00:00
Tobias Hunger
6059527951 CMake: Trigger reparse when target changed
Change-Id: I47959361a345e372265a19982c1b1e6ea778dd89
Task-number: QTCREATORBUG-15927
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
2016-03-30 13:05:15 +00:00
Tobias Hunger
8799188be5 CMake: Force a cmake run if no data is available yet
It makes no sense to not parse if we never parsed before. This got
broken when I tried to reduce the number of cmake runs.

Change-Id: Id70a6550faf248cc983b61f6d2456a93d8454a50
Task-number: QTCREATORBUG-15927
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
2016-03-30 13:05:11 +00:00
Tobias Hunger
82b9e9ed37 CMake: Do not crash when cloning cmake buildconfigurations
Change-Id: I832981cdea16ab058f92758c9bae9b64b904d573
Task-number: QTCREATORBUG-15926
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
2016-03-30 13:05:06 +00:00
Tobias Hunger
2c822ae3c1 CMake: Only allow one target in cmake build step
CMake will silently ignore all but the last target (or fail to build
anything). This allows to simplify our code.

Change-Id: Ieee3931aca0788307107e2021d507073ef42a21f
Task-number: QTCREATORBUG-15928
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
2016-03-30 12:20:58 +00:00
Tobias Hunger
414d41ab3c ProjectExplorer: Do not needlessly try to rename files
Task-number: QTCREATORBUG-15963
Change-Id: I925f7a69b0ae6a3e2eb5b8a7ceae1faccdfc5759
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
2016-03-30 12:02:00 +00:00
Tobias Hunger
04842be814 ProjectExplorer: Rename local variable and add some consts
Change-Id: If9cadcbb196a8b6350a654aca01b4a7ee59612b3
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
2016-03-30 12:01:52 +00:00
Nikolai Kosjar
afa8351d9e C++: Accept BUILD_CPLUSPLUS_TOOLS as qmake variable
Change-Id: I3266261d14aef12d3db73a635f0b1c471f6a52b7
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2016-03-30 11:51:51 +00:00
Orgad Shaneh
c176771696 TextEditor: Correctly restore empty pattern
Only default to first entry when the pattern was never set.

Change-Id: I4d2a76218347adb4aa28ef3e8fd0e81485faf184
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2016-03-30 11:28:22 +00:00
Nikolai Kosjar
d7b648abdb Clang: Make translation unit and code completion options consistent
...otherwise we might run into the following assertion:

Assertion failed: (IncludeBriefComments ==
        this->IncludeBriefCommentsInCodeCompletion), function CodeComplete, file
        ASTUnit.cpp, line 2411.

Change-Id: I4723b600c7ac5aa2b4c1cb1827f51156afb492b8
Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
2016-03-30 10:43:26 +00:00
Nikolai Kosjar
768c900990 ClangStaticAnalyzer: Set target explicitly for gcc toolchains
The default target of clang.exe might be unfavorable since it depends on
e.g. the tool chain used to build clang.exe:

                            default target
     clang build with msvc: i686-pc-windows-msvc
    clang build with mingw: i686-pc-windows-gnu

The correct target is important since it not only has implications on
the built-in macros and include paths, but also on parsing options. For
example, the msvc target silently adds the following parsing options

    -fms-extensions
    -fms-compatibility
    -fms-compatibility-version=17.00
    -fdelayed-template-parsing

...as can be seen by the output of

    $ clang.exe -### empty.cpp

Change-Id: Icd8aaf11016e59f37025cbf1c97da81511ff249b
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
2016-03-30 10:40:37 +00:00
Nikolai Kosjar
5c030a4336 ProjectExplorer: Retain original target triple for gcc toolchains
The target triple will be used by the Clang Static Analyzer.

Change-Id: Ibf33fef286a4d3ad3f40be4d6d5c9f35881d3d46
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2016-03-30 10:40:32 +00:00
Leena Miettinen
110959bef6 Doc: Update CMake information
- Add and remove screen shots
- Remove info about an obsolete wizard
- Add information about using wizards to create CMake projects
- Describe new fields in the Kits tab
- Describe the new build settings

Change-Id: I156e3b1a6cb35a284da5e25eabb134cc52b4d84e
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2016-03-30 09:37:07 +00:00
Oswald Buddenhagen
f9a182a285 Merge remote-tracking branch 'origin/3.6' into 4.0 2016-03-30 10:56:25 +02:00
Ulf Hermann
af0b93196b VariableChooser: Create widgets before assigning models
With Qt 5.7 the currentChanged() callback is called immediately on
QTreeView::setModel(), which leads to the label text being set. That
crashes if the label hasn't been created, yet.

Change-Id: I73763e1ac1c86215090a8f4b0118bc0cd286cf47
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2016-03-30 08:40:49 +00:00
Alessandro Portale
063c8d45c8 Theming: Fix menu item highlight for the themed (flat) menu bar
Since StyleHelper::baseColor now returns a themed color and
QColor::lighter() lightens up dark colors relatively little, we should
to use a themed color for the background instead.

Task-number: QTCREATORBUG-15930
Change-Id: I256ddcf946a14af6937c324a76e3f3a24919ae3b
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2016-03-30 07:19:12 +00:00
David Schulz
610176358b version bump
Change-Id: Ie8f7806fd40af9da5c60f851ef6db5226199bfc0
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
2016-03-30 05:34:53 +00:00
Tobias Hunger
26bc22adc5 QMake: Modernize
Change-Id: I05dd2cb4923ad2c72c0c79d24baa2c12677eff06
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
2016-03-29 14:54:17 +00:00
Tobias Hunger
4115a028ed Qmake: Small cleanup
Change-Id: I94808212d5bde61935c1e21d62cda7ea56c0a1be
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
2016-03-29 14:53:58 +00:00
Tobias Hunger
34b18c699c CMake: Normalize file paths before comparing them
On windows we got false negatives due to one path starting with "C:" and
the other with "c:". Use Utils::FileName which should do the right thing.

Change-Id: I7dcf8ad3f61caca7ac7c183d492ebfd57fe1b669
Reviewed-by: Cristian Adam <cristian.adam@gmail.com>
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2016-03-29 11:46:19 +00:00
Ulf Hermann
35bafd3952 QmlJS: Fix resolution of "alias" directives in qrc files
Previously qrc paths of QML/JS documents were not considered for
implicit imports. Only the path of the document in the file system
was considered. The QML engine, however, doesn't know the original
path at all and only uses the qrc paths for import resolution. This
created a mismatch between what the QML engine could recognize and
what the code model suggested.

Without alias directives, any files imported from a qrc file would
have to reside in the same directory as the one implicitly importing
them, so this arrangement happened to work, most of the time.

In order to support aliases we have to search the files in the same
qrc path to figure out the imports. To do that, we keep a reverse
map of qrc paths to files in the QrcParser and iterate that when
resolving imports.

Change-Id: I84baae6cbfbe96ddd5322c81494c1e4a3f473f3f
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2016-03-29 11:20:57 +00:00
Alessandro Portale
9af85186e6 Icons: More visible "puched edge"
Overlayed icons are not clearly enough visible. This was mentioned by
Diana and by several users. This change fixes that.

Change-Id: If3e767b5248c9802a1e3d255f6d314660a4efff6
Reviewed-by: Alessandro Portale <alessandro.portale@theqtcompany.com>
2016-03-28 18:47:08 +00:00
Orgad Shaneh
0a89b89065 Valgrind: Fix memory leaks
Detected by memcheck.

Change-Id: I7eaf4cf7ee2b4c03b03bfc1bbc2d49c68612b6ad
Reviewed-by: hjk <hjk@theqtcompany.com>
2016-03-26 17:25:43 +00:00
Orgad Shaneh
e13f1a5047 Debugger: Fix memory leaks
Detected by memcheck.

Change-Id: I56c0c39f3aa2251d6425ddc9388fdebc511d7f47
Reviewed-by: hjk <hjk@theqtcompany.com>
2016-03-26 17:25:04 +00:00
Alessandro Portale
93ef19b232 iOS: Set the proper runcontrol icon
This is the only RunControl which set another icon than
ProjectExplorer::Icons::RUN_SMALL. I assume that was a mistake.

Change-Id: I1c31909827c03b2c9b7acb0488eb269ef30c2a34
Reviewed-by: hjk <hjk@theqtcompany.com>
2016-03-25 21:10:19 +00:00
Orgad Shaneh
f9a49118dd Valgrind: Remove unused and unimplemented function
Change-Id: I5f7571f5f275881b67556ed1d53589bd5a7d0110
Reviewed-by: hjk <hjk@theqtcompany.com>
2016-03-25 17:20:12 +00:00
Giuseppe D'Angelo
fb137ade7d Fix crash in VariableChooser
fce83bd9f84883f93829e6ca9eacf098b018a02d in qtbase causes a crash:
setModel creates a new selection model, which calls currentChanged,
which accesses an uninitialized member. Hence, protect the access to it.

Change-Id: I144f40aa4286f1a9edba24519a30c08ff5091f57
Reviewed-by: hjk <hjk@theqtcompany.com>
2016-03-24 16:05:26 +00:00
Orgad Shaneh
658d29335b Debugger: Re-enable item selection in watches for core dump
In 7de7eb6bca the behavior on Unrunnable
state was changed, probably by mistake.

AddWatcherWhileRunningCapability should allow adding watchers while
running, but it should not prevent selection when not supported and
the inferior is not running.

Another missing part was that Unrunnable was considered running,
although it shouldn't.

Change-Id: I7d27b81977a6921919327b3122a865b7ffa2d0bd
Reviewed-by: hjk <hjk@theqtcompany.com>
2016-03-24 15:36:49 +00:00
Ulf Hermann
9ddf44cb9a QmlProfiler: remove dead code
Change-Id: I9f55fa23056b33fe55d0621058978aa45b0fa622
Reviewed-by: hjk <hjk@theqtcompany.com>
2016-03-24 15:22:24 +00:00
hjk
259c3cb4d4 Debugger: Fix object leakage on shutdown and heap-use-after-free.
Task-number: QTCREATORBUG-15938
Change-Id: I437756705c33730398a129651fabe34c92334656
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
2016-03-24 15:02:56 +00:00
hjk
af55f36eaf Debugger: Also copy fallback data on Copy View Contents to Editor
Getting e.g. an object's address is better than an empty value.

Change-Id: Ia78335da8b9eadeadc2e6f1757399ae604eb6610
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
2016-03-24 12:55:18 +00:00
Alessandro Portale
4ef953a83a Icon exporter: Add filtering option
Generation and optimization of all icons becomes slower with each added
icon. Regex based filtering by element will save me time.

Change-Id: I0d621e6ce78968d5a04d3f595f7c5ef60c129432
Reviewed-by: Alessandro Portale <alessandro.portale@theqtcompany.com>
2016-03-24 11:27:10 +00:00