Add UI controls to change settings and apply them
together with warnings and command line options.
Current settings are not very flexible but should be
easy to test and use without reading tidy/clazy help.
Change-Id: I1ca6b49a42a1169b34a703dd50de0bbc105df28f
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
class Foo {
void funcInside() {}
void funcOutside();
};
void Foo::funcOutside() {}
Search for Foo::func in the locator. func was not highlighted.
Change-Id: I923bd3ef2df47c5fa030b8899d1b4df7437b1820
Reviewed-by: André Hartmann <aha_1980@gmx.de>
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
Useful when there are several overloads for the same function.
Change-Id: I325bda7d2fdf4108f71a61d5473cd55310c51c28
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
...for the code model parts and declare 5.0 as the supported version for
the clang static analyzer.
Adapt versions and tests, remove code assuming clang <= 5.0.
LLVM/Clang 5 was released on 07 Sep 2017.
Task-number: QTCREATORBUG-18931
Task-number: QTCREATORBUG-18657
Task-number: QTCREATORBUG-17187
Task-number: QTCREATORBUG-14881
Change-Id: I53b00258ca06a1d2e57f9379dacc54b310687295
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Functionality is limited to the abilities of
current index which is not updated and is
generated only at project open.
Search box temporarily doesn't allow to "Search again".
Change-Id: Id1047f27ad0aafc901f06aa51ad38ceab95eaebb
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
Usages class is used in findUsages and globalRename in further changes.
Change-Id: I2f314e4ebe7828e59fcc3cae824893c96eb21cab
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
Make model manager able to select the most functional
refactoring engine from the available ones.
Change-Id: I74031c910706fd694a0a7def022531501f1ea005
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
If there are tests defined or registered inside libraries
we ended up trying to execute the library or nothing at all.
If possible try to find correct build targets for such cases.
Change-Id: I58e9edb7f858e3e5407ece6fcb8782f5a129acd0
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
Remove code duplication for openEditor function that
gets search result as a parameter.
Change-Id: I3eb1c41b8a0fda3b2e8a4929cef1d5924295f1f5
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Make build command the same for all builders.
Minimize differences.
Change-Id: I1cfe5071b3afb4944ed178fff1e57d3aee45d8a9
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
Allows to use this header without texteditor dependency.
Change-Id: I706f42799c3ea42473a716fa9ef9f3cfbef6fdd4
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
Move CppRefactoringEngine to CppTools and builtin member
ownership to model manager.
Change-Id: I3e72308559fd2928229f9f25d4dd09beb3f56c34
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
Move FollowSymbolUnderCursor to CppTools and
builtin member ownership to internal model manager.
Change-Id: I97a4f744ec1709ccc0b34fb67b58680973ef566f
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
Make this highlighting work without builtin code model
but based on the HighlightingMarks that we already have
from ClangCodeModel.
Redundant parameters are removed by this change.
Change-Id: I73b5dab46ba59d2f813236831818f0a9bc94c5bc
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
Existing built-in functionality is moved there.
Clang part is to be implemented later
Change-Id: I7595898495213c087243cd534b4ba1617b4c27e9
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
* Use the CamelHumpMatcher in the C++, QML, and files filters
* Supports matching against UpperCamelCase, lowerCamelCase
and snake_case strings
* Supports highlighting of matched characters
Task-number: QTCREATORBUG-3111
Started-by: David Kaspar <dkaspar@blackberry.com>
Change-Id: If6220191432ef965bde3c8dbe4a10d89e222ba6f
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
...to avoid confusion.
Use a customized QPlainTextEdit instead of a QLineEdit because the
latter does not allow wrapping of long lines. Horizontal scrolling in a
QLineEdit for long/many options is inconvenient.
Change-Id: I15b5f034e04920d0ca955c4f822d882b05e9c235
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
...in "Menu: Tools > C++ > Tab: Code Model > Clang Code Model Warnings"
to avoid (re)parse issues due an invalid command line for libclang.
If an invalid option is detected, then indicate it by providing an error
message. As long as there is an invalid option, the options are not
accepted.
We do not want to maintain a white list of valid options, so mostly
check whether the option starts with "-W". An unknown or misspelled
option like "-WnotYetKnown" will be ignored by libclang.
To keep passing in some options for testing/debugging convenient, skip
validation if QTC_CLANG_NO_DIAGNOSTIC_CHECK is set.
Task-number: QTCREATORBUG-18864
Change-Id: I196d0474c7521969c54133f52dfc7be0394bfc3e
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Let project managers store information whether a project part
belongs to an executable or a library and use this information
inside the AutoTest plugin.
This information will help to determine which targets are
relevant for the execution of tests.
Change-Id: I93b42797bf55225425398dc83aecea3c99eea290
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
Create an interface to get the ability to use
another FollowSymbol implementation
Change-Id: I5802f62523ff3ee47b8a14e487adf43edcb6c9b1
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
..and use it when we don't have refactoring plug-in
Change-Id: Ibe317a9728d439b9c5e05271d92a330d22eaacb9
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
The old code model expected the macros as C++ formatted text
("#define Foo 42) but newer targets like the Clang codemodel expect key
value arguments like "-DFoo=42". So instead of parsing the text again and
again we use an abstract data description.
Task-number: QTCREATORBUG-17915
Change-Id: I0179fd13c48a581e91ee79bba9d42d501c26f19f
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Also, add context to connect() expressions where we are or were
capturing "this".
Change-Id: I6e006ba6f83d532478018550d148ee93eca59605
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Reviewed-by: hjk <hjk@qt.io>
qmake from Qt4 does not provide C++ standard and
clang can't properly compile Qt4.8.6 and earlier
with c++1z. Behavior in this commit mimics qmake
from Qt5 which also provides c++11 as a default
standard.
Task-number: QTCREATORBUG-16441
Change-Id: I3d29891d6e47f2367f2b3b2bf4be4d86661924e9
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
We already share same classes there which has nothing to do with IPC and
I want to more for sharing. So we should use a name which fits better.
Change-Id: Idfb12b6de714206117b92634ad719c6a0e290e78
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
By using the new QTCREATOR_COPYRIGHT_YEAR variable
Task-number: QTCREATORBUG-18612
Change-Id: I3bcf0319660d210436d3130c00f43325c460a66c
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
Since
Clang: Provide highlighting for identifier under cursor
commit ca72c29462
the LocalUseMap, used for some refactoring actions, was not updated
anymore. Fall back to the built-in implementation for the LocalUseMap
because it contains pointers to built-in AST that clang obviously can't
provide.
Task-number: QTCREATORBUG-18607
Change-Id: I08762fe457835d4d83aca719febcb3497ee9696b
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
Reviewed-by: Robert Loehning <robert.loehning@qt.io>
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
Invoke follow symbol in clang backend
if env variable QTC_CLANG_FOLLOW_SYMBOL is 1.
Does not include backend implementation.
Change-Id: Ia20a677830ebdd7f24800af5c5d6e8b1bf579205
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
Utils::matchCaseReplacement searches for common prefix and suffix
between old and new file name und leaves them unchanged. This leads
to unexpected new file names.
E.g. when renaming MainWindow to MyMainWindow, this function computes
the prefix "m", the suffix "ainwindow.h" and only considers "yM" as
the middle part that is actually renamed.
Use a better algorithm to determine the new base name, and for
unclear cases fall back to the "Lower case file names" option
from Tools -> Options -> C++ -> File Naming.
Task-number: QTCREATORBUG-18592
Change-Id: I818f7d372102eb6e266123b2b4b6355f6fa28d64
Reviewed-by: Eike Ziller <eike.ziller@qt.io>