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>
* Cuts direct dependency to CPlusPlus from cppeditor.h, but
cppfunctiondecldeflink.h still pulls it in.
* Cuts direct dependency to
cppeditor.h from cppvirtualfunctionassistprovider.cpp, but it still
depends on cppeditorconstants.h.
* Cuts direct dependency to cppeditor.h from cppelementevaluator.cpp.
The long-term goal is to make the CppEditor independent from concrete
code model backends.
Change-Id: I291ee0d0da5fc5ed1a839a763fe7be11dcf7a6fb
Reviewed-by: Marco Bubke <marco.bubke@theqtcompany.com>
Remove plural to align with the other VirtualFunctionAssist* classes.
Change-Id: I986e564ab9080e6fbc75f524f89d98907792a48e
Reviewed-by: Christian Stenger <christian.stenger@digia.com>
Reviewed-by: David Schulz <david.schulz@digia.com>
Remove GenericProposalModel convenience constructor,
add GenericProposal instead. Less user side code.
Change-Id: I833f9943df27b50579485c93efb96943ec403f65
Reviewed-by: Christian Stenger <christian.stenger@digia.com>
Simplifies the code base by removing one level of unused
and unneeded abstraction.
- Merge {I,Default}AssistInterface to AssistInterface
- Merge {IAssist,Basic}ProposalItem to AssistProposalItem
- Merge {IGenericProposal,BasicProposalItemList}Model to GenericProposalModel
Change-Id: I54ee7b095427383d67a00fc1d87c3808c21d812d
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
The base pattern is FooEditor for BaseTextEditor derived classes
and FooEditorWidget for BaseTextEditorWidget derived classes. So:
CPPEditorWidget -> CppEditorWidget
CPPEditorWidgetPrivate -> CppEditorWidgetPrivate
...::EditorWidget -> PythonEditorWidget
GLSLTextEditorWidget -> GlslEditorWidget
GLSLEditorEditable -> GlslEditor
Change-Id: I76d34a3694c2fb35491982d86e83f7e4774c0be6
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
Reviewed-by: Christian Stenger <christian.stenger@digia.com>
Currently we pass in some places by value, elsewhere by const ref and
for some weird reason also by const value in a lot of places. The latter
is particularly annoying, as it is also used in interfaces and therefore
forces all implementors to do the same, since leaving the "const" off is
causing compiler warnings with MSVC.
Change-Id: I65b87dc3cce0986b8a55ff6119cb752361027803
Reviewed-by: hjk <hjk121@nokiamail.com>
Assumption: model never has 1 entry for immediate result
(there is always the natural result + "Searching for overrides"
Change-Id: I5de7e7933b1309f995a6111a2ab1c7aed31c086e
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
...instead going the way over CppClass. This makes
FunctionHelper::overrides independent of the cppeditor plugin.
Change-Id: Ifaedb94da1f67b3876e06cce9e745aaf3c1050a7
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
Required for correct resolving of first virtual appearance
Change-Id: I2307027f769fb2f4c0942f4aa4e0d2b5327562b5
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
Instead of building the hierarchy from the most basic class that
implements the virtual function, start from the looked up class.
Change-Id: Ia674fbb4a92dd45d4ca7bc621c54b411264cbe3d
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
...when searching the overrides for virtual functions.
In case there is no override for the static type of a function call
expression, make sure to:
1) include the last provided override (look up bases)
2) and all overrides whose classes are derived from that static type
Task-number: QTCREATORBUG-10470
Change-Id: I2c01bfdc6cb35c5a01a000ebd81a2b322ce2b795
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
- Moves the findMatchingClassDeclaration() call from
FollowSymbolUnderCursor::findLink into VirtualFunctionsAssistProcessor
since we already have a SymbolFinder there
- Make canLookupVirtualFunctionOverrides a class member because we plan
to add some methods
- Better parameter names/order for FunctionHelper::overrides()
Change-Id: I0a93ff5445352d47e808adad45485e520f06946e
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
...when using the mouse (Ctrl + Left click).
Task-number: QTCREATORBUG-10479
Change-Id: I54a21c449d8bb8e608d383752beb3b31c9c81783
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
...by extracting parameters to a dedicated struct.
Change-Id: I2f3b83cbc62a8b4a91b44b3a729d0f0c578b53f2
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
...instead declaration (F2 on a virtual function call).
Task-number: QTCREATORBUG-10287
Change-Id: Ib913bd4e777c7253659458ae17584354c7416d23
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
And before the first use outside the class. This will make sure the
template specialization is generated in the right place. If not, a
static assert is triggered when C++11 is enabled.
Change-Id: I8de7fa52a9986a1f99f3ad32696121ef565ee3b6
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
* Function is pure only by its own declaration
* Support "final"
* Add unit tests
Change-Id: I8b9ded7c7336e2e42ddc551132fac974547fd634
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
1) Virtual template functions make no sense.
2) It does not help us to find out if a function is virtual or not
Change-Id: Icb15f46b3aba5571e16fa55613a4806ad5de5940
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
F2 on a virtual function call presents a list of overrides in derived
classes. The function declaration of the static type is shown
immediately at the top.
Task-number: QTCREATORBUG-9611
Change-Id: I80ce906fa06272dc9fbd1662cd17500b8c77067f
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>