| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
| |
Almost most useful feature ever.
Task-number: QTCREATORBUG-2474
Change-Id: If1ad661fab58ffb4a0b9ddb8ba771f2fde3b54ec
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
|
|
|
|
|
|
|
| |
Task-number: QTCREATORBUG-7679
Change-Id: I794f52b2bcfb6c78ceef86ec53b6ed32b3d53d9f
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
|
|
|
|
|
| |
Change-Id: I42a41608c2f025a196e539b58c1992049f7eca35
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
|
|
|
|
|
|
|
|
| |
warning: C4005: 'va_copy' : macro redefinition
Change-Id: Ib2bfd2229cb3ae00e084dd6df7a4558a5a766d55
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Until now std::vector::at() was used to access the elements. This is
handy for debugging since an exception is thrown for invalid indices,
but it does not stop Qt Creator from crashing because exceptions are not
caught.
This is especially a problem for the parser, which has to look ahead via
LA(n), which accesses TranslationUnit::_tokens.
With this patch, explicit bounds checking is done before accessing the
elements and thus calls to
std::vector::at() // bounds checking, throwing out_of_range
were replaced by calls to
std::vector::operator[]() // no bounds checking, not throwing out_of_range
Measuring the parse time for the Qt Creator project shows that there is
no slowdown. In both cases, with and without the patch, about 15s are
needed on the authors machine.
Task-number: QTCREATORBUG-10453
Change-Id: I32b12a526ff7199bcadfc21a3deb5354063a3e3b
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
|
|
|
|
|
| |
Change-Id: I4e2df6992b446adec662ab07671acd41715e41fd
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
|
|
|
|
|
|
|
|
|
|
|
| |
Only methods as programming functions are affected. Besides renaming
some actions like "Switch Between Function Declaration/Definition" this
mostly touches (api) code comments.
This is a follow-up patch to commit 872bfb7.
Change-Id: Icb65e8d73b59a022f8885b14df497169543a3b92
Reviewed-by: hjk <hjk121@nokiamail.com>
|
|
|
|
|
|
|
|
|
| |
MEMBER was added in Qt5.
Task-number: QTCREATORBUG-10068
Change-Id: Ic6c15a0e5ee8981ab98e4c12fc1521dc281b731f
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
|
|
|
|
|
|
|
|
| |
See 2.5/2.12. Most useful feature ever.
Change-Id: I3f92256733e15078df56205dba9746ffff8ed145
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
|
|
|
|
|
| |
Change-Id: If36658de6f68f552f93830ba4f1cfa9994a2e44c
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
|
|
|
|
|
|
|
| |
Change-Id: I96dbce004d18147fd91485b1117dc65c4bbc08a0
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
|
|
|
|
|
| |
Change-Id: Ibe6f41ac15df1ec685b0d0766ff568abf6f3ae7e
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
|
|
|
|
|
|
|
| |
Be more environment friendly by using less trees.
Change-Id: I54d3b23d697a3b72a6a803688a8da0eddaad3e17
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
A lot of our build system files specify unneeded include
paths. These roughly fall into the following categories:
a) Paths that are already set in more general files
such as qtcreator.pri.
b) Paths that serve no purpose at all, possibly
left over from earlier versions of the project.
c) Paths that act as workarounds for wrong include
statements of the form '#include "xyz.h"', where
xyz.h is not in the same directory as the including
file.
This patch removes such path specifications and fixes the offending
include statements from case c).
Tested on Linux, Windows and OSX with qmake and qbs.
Change-Id: I039a8449f8a65df0d616b4c08081145c18ae4b15
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
|
|
|
|
|
| |
Change-Id: I366733ec821ee264f182f4d4a3cf69cdada20cfc
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
E.g.:
enum E { x = 1 + 2 + 1 };
constantValue for enumeratorDeclaration currently is equal: '1+2+1'
(spaces between are removed).
Fixed version produces "1 + 2 + 1".
Change-Id: I38f7703bd5c856c28aadeecd7f7923aa4a7da422
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
|
|
|
|
|
|
|
|
|
| |
No semantic analysis yet, but this prevents the parser from generating
bogus diagnostics.
Task-number: QTCREATORBUG-9309
Change-Id: I2ec575a8474cd51bfa97b17678d3da71ab8dcd7a
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
...in order to better tell apart the type related functions
isScope()/asScope() and the functions dealing with enclosing scopes:
* scope() --> enclosingScope()
* setScope() --> setEnclosingScope()
* resetScope() --> resetEnclosingScope()
Change-Id: Id743a7d1b6a1a1a0ffcd8568cbd8ebbdfc16eaa1
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@digia.com>
|
|
|
|
|
|
|
|
|
| |
Although it's a C++11 feature, all sane compilers support it as an
extension to C++03/C++98.
Change-Id: I3c7b0db345d0b175554534e879717f4d14f48b0f
Reviewed-by: hjk <hjk121@nokiamail.com>
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
|
|
|
|
|
|
|
|
|
|
|
| |
For the case:
const int x = 12;
enum E { e = x };
constantValue for EnumeratorDeclaration has value=' x'. It should have 'x'.
Change-Id: Iaca77cccd1e0dc5274696b0c96cec6ac2f904979
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
|
|
|
|
|
|
|
|
|
|
|
| |
Done-with: Erik Verbruggen <erik.verbruggen@digia.com>
Task-number: QTCREATORBUG-8747
Change-Id: I7cb694f8180c6aa932b07066d98d095340111324
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
Reviewed-by: xSacha
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
|
|
|
|
|
|
|
| |
Task-number: QTCREATORBUG-9386
Change-Id: Ia68f3866c122ca5261dd73b2c740b47fb15744fc
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
|
|
|
|
|
|
|
| |
Some qmake versions ignore "DEFINES += NDEBUG" on Windows.
Change-Id: Ibdf3b1036c2331dcef61dcd278463c02754044d2
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
When instantiate a template with anonymous class/struct/union
AnonymousNameId has to be cloned.
Task-number: QTCREATORBUG-9227
Change-Id: Iedca5e41589e68a94a35cd4387241052c70c50df
Reviewed-by: Sergey Shambir <sergey.shambir.auto@gmail.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fix:
* highlighting
* find usages
* follow symbol
* code completion
Task-number: QTCREATORBUG-6497
Task-number: QTCREATORBUG-8963
Task-number: QTCREATORBUG-3610
Task-number: QTCREATORBUG-7579
Change-Id: I3dcaf1c515d0199c3e6bee72284fbb40064686ee
Reviewed-by: Petar Perisin <petar.perisin@gmail.com>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
|
|
|
|
|
|
|
| |
As indicated by profiling.
Change-Id: I04d741dcc6200eb351d7aec316572e0e94ef5bec
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
|
|
|
|
|
|
| |
Change-Id: I37ffb657c9e042cc1c186895efd9c58fe6e332fd
Reviewed-by: Przemyslaw Gorszkowski <pgorszkowski@gmail.com>
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
|
|
|
|
|
| |
Change-Id: Ia37ec33fb031fdea4ad1890fcea3a80b7b46e272
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
|
|
|
|
|
|
|
|
|
| |
Fix instantiation of templates(by cloning original symbols). Assigning of scope
for cloned symbol is taken from the symbol which is used to instantiate.
Task-number: QTCREATORBUG-9098
Change-Id: I066cc8b5f69333fabdaf2d4466b205baf08bd3f1
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
|
|
|
|
|
|
|
|
| |
... by assuming we operate on NUL-terminated data, which is
(in theory) guaranteed by (non-raw) QByteArray which we have.
Change-Id: I855d01ea0dee5328ec737fbabee1086d7a28aa5a
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
|
|
|
|
|
| |
Change-Id: Icd72f6358a5e90a292178b1d78f80d42da2ab846
Reviewed-by: hjk <hjk121@nokiamail.com>
|
|
|
|
|
|
|
| |
As indicated by profiling.
Change-Id: I92d79b52d2d56540da39559fe4db3c22ab53a73a
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
|
|
|
|
|
| |
Change-Id: I59527ded34873286072be51c6a141dffcbf93406
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
|
|
|
|
|
|
| |
Task-number: QTCREATORBUG-8316
Change-Id: I8897f75f30d3aeaf049cc792060c582ab1e3343d
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
|
|
|
|
|
|
|
|
|
|
| |
C++ standard defines that 'try' should be before optional ctor
initializer, so wrong order changed. Added documentation to
parseTryBlockStatement and new test.
Task-number: QTCREATORBUG-9064
Change-Id: Id19cdc53c034cb1232ae27e0bfe36d85b7ad0452
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
|
|
|
|
|
|
|
|
| |
argumentCount is a more expensive function, so try to call it only once,
esp. in loops.
Change-Id: I6f0d420352743ec444487ce3f506ef28e5282d1e
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Now everything following '///' or '//!' is a doxygen comment.
This simplification fixes also the bug ('\n' was considered as part of
the doxygen comment and led to strange highlighting).
Task-number: QTCREATORBUG-8921
Change-Id: I6dae3b80ec11400f2f623897257782a80860a7f3
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
|
|
|
|
|
|
|
|
| |
Proper fix will follow.
Task-number: QTCREATORBUG-8316
Change-Id: I7c86f0b0b0802c310bcce619b5c69ad33ffa0d52
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
|
|
|
|
|
|
|
|
| |
Unit test describe this complex typedef. Another step to bring
code completion for stl containers.
Change-Id: I27985c4ea7c26c723d7a88ce42c5ecf164b6c903
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
The color scheme changed for "///\n" lines:
"///\n" - "Doxygen Comment" (was "Comment")
"/// hello\n" - "Doxygen Comment" (as before)
"////...\n" - "Comment" (as before)
Change-Id: I6bdaf471760bb05547385fd4821eded6cefed4d7
Reviewed-by: Knut Petter Svendsen <knutpett@pvv.org>
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
|
|
|
|
|
|
|
|
| |
Task-number: QTCREATORBUG-8698
Change-Id: If3181cb923ef7249945908c0610c16952262e881
Reviewed-by: hjk <hjk121@nokiamail.com>
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
|
|
|
|
|
|
|
|
|
|
|
| |
It works for full specialization. Instantiate of the partial
specialization has to be implemented(finding appropriate partial
specialization-on going)
Added unit test.
Change-Id: I8ef5ea963e7c665e0d67d390b3a833486773dab0
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
|
|
|
|
|
|
|
|
|
|
|
| |
For a given AST, CppRefactoringFile and Overview this will create a
ChangeSet for rewriting the pointer or reference declaration according
to the Overview.
Task-number: QTCREATORBUG-6169
Change-Id: If6f824c1ea5e9f53a11a58ec8b6d696d01f0723e
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
|
|
|
|
|
| |
Change-Id: Id69343ee12690f2393f3d4e03cf2b40ebbaa8613
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When a constructor is defined with a single, unnamed argument of a custom type without
extra type specifiers (const...), then the constructor was not identified as such.
There was an heuristic in case the constructor was in the class definition, but not if the
the constructor was defined later.
Examples:
class Arg;
class Other;
class Foo {
Foo(Arg /*arg*/); // working
Foo(const Arg /*arg*/); // working
Foo(int /*arg*/); // working
Foo(Other /*arg*/) {} // working
};
Foo::Foo(Arg /*arg*/) {} // used not to work, fixed
Foo::Foo(Arg arg){} // working
Foo::Foo(const Arg /*arg*/) {} // working
Foo::Foo(int arg) {} // working
Change-Id: I741e4ba62672ddc99a837fdcdc27996fba5ae6c7
Reviewed-by: hjk <qthjk@ovi.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
#!/usr/bin/env ruby
Dir.glob('**/*.cpp') { |file|
# skip ast (excluding paste, astpath, and canv'ast'imer)
next if file =~ /ast[^eip]|keywords\.|qualifiers|preprocessor|names.cpp/i
s = File.read(file)
next if s.include?('qlalr')
orig = s.dup
s.gsub!(/\n *if [^\n]*{\n[^\n]*\n\s+}(\s+else if [^\n]* {\n[^\n]*\n\s+})*(\s+else {\n[^\n]*\n\s+})?\n/m) { |m|
res = $&
if res =~ /^\s*(\/\/|[A-Z_]{3,})/ # C++ comment or macro (Q_UNUSED, SDEBUG), do not touch braces
res
else
res.gsub!('} else', 'else')
res.gsub!(/\n +} *\n/m, "\n")
res.gsub(/ *{$/, '')
end
}
s.gsub!(/ *$/, '')
File.open(file, 'wb').write(s) if s != orig
}
Change-Id: I3b30ee60df0986f66c02132c65fc38a3fbb6bbdc
Reviewed-by: hjk <qthjk@ovi.com>
|
|
|
|
|
|
|
| |
It's not used otherwise.
Change-Id: I926f5b3d5ea08a5768b61350f2d399eda702aad3
Reviewed-by: hjk <qthjk@ovi.com>
|
|
|
|
|
| |
Change-Id: Ic158cf3b88fb0f8c69c1bc5cf45963e2ae9296e5
Reviewed-by: hjk <qthjk@ovi.com>
|
|
|
|
|
|
|
|
|
|
| |
Fix code completion for nested classes when enclosing is
template class.
Unit tests
Task-number: QTCREATORBUG-8245 (only standalone)
Change-Id: Ib31ad4b799db927b56debd4dc3e7403404c1839d
Reviewed-by: hjk <qthjk@ovi.com>
|
|
|
|
|
|
|
| |
$ ./cplusplus-update-frontend
Change-Id: I9015abb8d3dc053c91b0107c5a0b2e8b6e2f5f30
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
|