Removed unncessary switch and replaced it with simple if, more efficient
Details
Diff Detail
- Repository
- R39 KTextEditor
- Branch
- arcpatch-D18788
- Lint
No Linters Available - Unit
No Unit Test Coverage - Build Status
Buildable 7983 Build 8001: arc lint + arc unit
I am with Kåre here: this change does not fix any issue nor does it improve the current state significantly. In fact, there is a risk of introducing a regression by removing the accept/reject calls.
I don't think this should go in as is.
Shubham, on bugs.kde.org we have more than 300 open bugs. Maybe you can find something there? Would be really nice :)
@dhaumann I don't think using switch when there is only a single case a good thought. That's what if is for.
src/view/kateviewinternal.cpp | ||
---|---|---|
2702 ↗ | (On Diff #51039) | I can't tell, I don't have one. Btw Q_OS_OSX is deprecated. |
2718 | By mistake i removed those after seeing their presence in switch, I will add those. |
src/view/kateviewinternal.cpp | ||
---|---|---|
2718 | Btw no need to explicitly accept() the event, because isAccepted() function returns true by default. But surely, event should be explicitly ignored. |
I think it's ok, although it is arguably whether this improves anything. Still, let's move on.