Make "Switch Declaration/Definition" language agnostic

Review Request #119648 - Created Aug. 7, 2014 and submitted

Information
Kevin Funk
kdevplatform
Reviewers
kdevelop
Make "Switch Declaration/Definition" language agnostic

Most of the code originated from oldcpp. It is completely language
agnostic and hence can be easily reused.

  

Issues

  • 7
  • 0
  • 0
  • 7
Description From Last Updated
if (!decl) { continue; } if (auto definition = FunctionDefinition::definition(decl)) { return definition; } I'd prefer this. And it makes ... Milian Wolff Milian Wolff
put the below into a helper function so that you can do const QString switchCandidate = ...(); Milian Wolff Milian Wolff
this is probably from the old code, but it makes no sense, imo: we parse it with VisibleDeclarationsAndContexts (maybe a ... Milian Wolff Milian Wolff
remove the DUChain::lock Milian Wolff Milian Wolff
const auto url = def->url().toUrl(); Milian Wolff Milian Wolff
he document check here at the beginning is obsolete (after all, you just checked !document || before. Milian Wolff Milian Wolff
I'd prefer const auto pos = normalizeCursor(targetRange.start()); Milian Wolff Milian Wolff
Milian Wolff
Kevin Funk
Review request changed

Status: Closed (submitted)

Loading...