It is the type used by the HeaderPath class, so reflect that in
the name.
I also considered to rename HeaderPath to IncludePath, but
that name is reflected in a lot of users, which would also need
to be adjusted for consistency. That would blow up the patch size
for little value IMHO.
Change-Id: I51421dbd3ab8b2874dc32fc82dc394c9b93ce5e9
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
System include paths are appended after other includes by the compiler. So
we should set them as system includes and not as normal includes. Otherwise
we change the include order. Headers in system include paths are not
cluttering the screen with unwanted warning and by the way improve
performance too.
ProjectPartHeaderPath was a dopperganger of HeaderPath, so we merged them.
Change-Id: I7c394b4098b697de79761499ffcd5913cc02d652
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Also extracting inline HeaderPath class and change projects list in vector
because the size is larger than a pointer.
Change-Id: I885fdff3fe9bccc877634d1615249755f5b674fd
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@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>
Now adding a new include directive by the refactoring action will cover
more cases.
This will also help us to simplity the corresponding tests, since it is
not necessary anymore to create actual files.
Change-Id: Id7612b13c392735d6ae1fb2ce3c36169eff3628e
Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
For the case that the document is based upon another one (see
Snapshot::preprocessedDocument(), the only client of FastPreprocessor)
the FastPreprocessor added extra unresolved includes.
Change-Id: I0a7719fa8806af59f87a48bc6914270efd653e84
Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
Instead, always write into a unique temporary directory in
QDir::tempPath().
Where applicable, read the test source from files instead of first
writing the file.
Some clean ups in test_codegen*.
Change-Id: Id48dc50c6ca16252edfd9fc8a86ba0de9f9be486
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
...when adding an include for an undefined identifier.
Change-Id: Ia338e924901262a847d3bd7ed9733d8e66c631dd
Task-number: QTCREATORBUG-10391
Reviewed-by: Christian Stenger <christian.stenger@digia.com>
Instead of having two lists of paths, now only one list is used where
both include paths and framework paths can be mixed. This reflects the
way the compiler is invoked, and retains the (correct) search order.
Task-number: QTCREATORBUG-11599
Change-Id: I373953e3e305df5b7a0d10920e12d146584adf9f
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
In test_includeGroups_detectIncludeGroupsByIncludeType the test file was
not removed and thus subsequent and isolated executions of this test
failed.
Change-Id: I5eeb4f004f5b146ac794ca913b4092629131fca3
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
They belong there. This will also kill the CppSourceProcessor dependency
from CppEditor.
Change-Id: Ic2ae6b0c6f0913d913636be61df194846985d1ce
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
-1 is not a valid unsigned value.
registerhandler.cpp(354): warning #68: integer conversion resulted in a change of sign
return createIndex(row, col, TopLevelId);
^
Change-Id: I41935255704f19724d6cec16ea470e2f8f8a16a1
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
Reviewed-by: hjk <hjk121@nokiamail.com>
...by detecting include groups (separated by new lines, include types
and same dir prefix).
Task-number: QTCREATORBUG-9317
Change-Id: I73e80fdc715104901cb2d4f5b15b4cab5d04d305
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>