This also fixes a crash on loading (some?) projects introduced
in 577bf7c08a.
Change-Id: Ie35d466fa3b84b183118fe93f55393a4c59755de
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
This avoids multiple instatiations and reloading of the same image files.
Change-Id: I4d0bb955e23c1cb817671c25bff4e74fb7b3d0f4
Reviewed-by: David Schulz <david.schulz@theqtcompany.com>
Mostly done using the following ruby script:
Dir.glob('**/*.cpp').each { |file|
next if file =~ %r{src/shared/qbs|/qmljs/}
s = File.read(file)
s.scan(/^using namespace (.*);$/) {
ns = $1
t = s.gsub(/^(.*)\b#{ns}::((?!Const)[A-Z])/) { |m|
before = $1
char = $2
if before =~ /"|\/\/|\\|using|SIGNAL|SLOT|Q_/
m
else
before + char
end
}
if t != s
puts file
File.open(file, 'w').write(t)
end
}
}
Change-Id: I6fbe13ddc1485efe95c3156097bf41d90c0febac
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
@classes, @protocols, @properties and -methods (and +methods) will now
show up in the locator.
Change-Id: I33f904c456c321fc80b8aba7ff52d5f1207c58be
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
And move it into its own header and source files.
Change-Id: I37401badd819e028e1d767425759dc0ff27afe31
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
error: C2872: 'Internal' : ambiguous symbol
could be 'CppTools::Internal'
or 'CPlusPlus::Internal'
Change-Id: Iff623400a370b056fb30838e0b97bdc9d6898d00
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
This string table uniques strings, so that multiple identical strings
share their contents. It is used by the locator and the symbol searcher,
and will later be used by the class view.
Change-Id: Ib8b50f69bbf994d0d7a39b66dc8caf1a3d9bfb42
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
This does less calls, and less string concatenations for anonymous
scopes.
Change-Id: Ief07cdcd7daa5710628990abe1486b52a2896d05
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
* Always display qualified ids in the ':' filter
* Show correct qualified ids (for some symbols the namespace was shown
twice)
Task-number: QTCREATORBUG-10136
Change-Id: Id178cb4b8abcc316250fa16e5f3e5a8e72bc0c10
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
...e.g. qt_metacall() etc from the Q_OBJECT macro.
This affects the results of the cpp locator and find filters.
Change-Id: I2f9ff1210f3705baddadd486d700ee8be9a44a20
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
This will make it easier to use a single SearchSymbols instance and a
single run serving all locator filters.
Change-Id: Idb6a3693ad356227d46d0b28fb4c3a5db62b4ac4
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
Instead of showing all function declarations when searching for methods,
only show signal declarations. Otherwise, both function declarations and
their definitions would show up, which is not too useful.
Task-number: QTCREATORBUG-9543
Change-Id: Ia81e422e4c53dbc4199b30b1d362f4829b337a7f
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
When searching for functions/methods in the locator, also show function
and method declarations.
Task-number: QTCREATORBUG-8862
Change-Id: Ie86bfe82403d79a903d769860a472e2a20a2b9d0
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
Ran script to remove inludes on a trial-and-error basis and
manually corrected it.
Change-Id: Ic8464ea084ca1ab401e9f4a7d0183b92b4038902
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
... and adjust INCLUDEPATH accordingly.
while i'm at messing with include statements, also re-order the include
blocks according to policy and sort them within bigger blocks.
Change-Id: I7762abfd7c4ecf59432b99db2f424e4fa25733a5
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
The changed documents get searched for symbols when either a limit of
10 pending documents is reached, or when the filter is asked to return
all matches.
Change-Id: Ic18fc66b0a802165fdd8a028bd13d0ce11524510
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
Reviewed-by: Eike Ziller <eike.ziller@digia.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>
The indexing support for the built-in code model is moved to its own
file. Symbol searching will now call for a searcher through that support
interface, which will create a fully configured and ready-to-go searcher
that can be started in the/a future.
Change-Id: Idc3ee1c7c789a69fa05ee1d42415313dcea94cf8
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
Required refactoring of the search result window to show real trees of
search results.
The backend is the backend from the Locator filter, which is a bit
outdated now.