Re-instate Emulated Command Bar tests, and refactor Emulated Command Bar
ClosedPublic

Authored by sstjames on Jun 15 2016, 2:20 PM.

Details

Reviewers
michalhumpula
Group Reviewers
KTextEditor
Summary

A bit of a monster, I'm afraid ;)

This patch mainly does two things -

  1. Re-instates the globs of Emulated Command Bar tests that managed to get lost when the Vi Mode tests were split out, way back in 2014 (whoops! :))
  2. Refactors the emulatedcommandbar class to be less huge - it is now split into several files, and moved into its own emulatedcommandbar/ subdirectory.

It uses a small amount of C++11 features which I hope are OK (I'm not sure what the policy is, nowadays) - mainly in-class initialisers and lambdas + std::function.

Test Plan

Requires no special testing, but since the newly-reinstated Emulated Command Bar tests have not been run on any machine but mine since 2014, they might need to be temporarily disabled once Jenkins gets its hands on them :)

Diff Detail

Repository
R39 KTextEditor
Lint
Lint Skipped
Unit
Unit Tests Skipped
sstjames updated this revision to Diff 4510.Jun 15 2016, 2:20 PM
sstjames retitled this revision from to Re-instate Emulated Command Bar tests, and refactor Emulated Command Bar.
sstjames updated this object.
sstjames edited the test plan for this revision. (Show Details)
sstjames added a reviewer: KTextEditor.
sstjames set the repository for this revision to R39 KTextEditor.
Restricted Application added a subscriber: kwrite-devel. · View Herald TranscriptJun 15 2016, 2:20 PM

This is a big one - essentially I think it is ok to commit. While browsing through the code, my only real comment is that instead of QRegExp, we should use QRegularExpression. However, as the patch is already big enough, I wouldn't change it now.

What is more important to note is that KDE Frameworks is released every month, see https://community.kde.org/Schedules/Frameworks.
So next tagging date is 2nd of July (bit more than two weeks). This is good, since it means that we have two weeks to fix regressions :-)

So I would be fine with committing this, and if you target the KDE Frameworks 5.24, please rather commit early than late.

More feedback and / or better reviews are of course welcome :)

This is a big one - essentially I think it is ok to commit. While browsing through the code, my only real comment is that instead of QRegExp, we should use QRegularExpression. However, as the patch is already big enough, I wouldn't change it now.

What is more important to note is that KDE Frameworks is released every month, see https://community.kde.org/Schedules/Frameworks.
So next tagging date is 2nd of July (bit more than two weeks). This is good, since it means that we have two weeks to fix regressions :-)

So I would be fine with committing this, and if you target the KDE Frameworks 5.24, please rather commit early than late.

More feedback and / or better reviews are of course welcome :)

Thanks Dominik - I'll commit tomorrow evening (about 2000 GMT) if there are no objections before then, and sort out the QRegExp stuff later :)

michalhumpula accepted this revision.Jun 16 2016, 3:19 PM
michalhumpula added a reviewer: michalhumpula.
michalhumpula added a subscriber: michalhumpula.

Since you have moved the code to separate folder, don't you want to move the code to separate C++ namespace too?

Few code style issues (old code I guess). Otherwise ok.

src/vimode/history.h
29

I suppose this is needed for tests only. Was there a way to do it only for tests?

This revision is now accepted and ready to land.Jun 16 2016, 3:19 PM

Since you have moved the code to separate folder, don't you want to move the code to separate C++ namespace too?

Probably - I think I'll leave that for the time being, though - this huge patch is burning a hole in my harddrive :)

Crap - didn't realise that *every single commit* would be broadcast to the mailing list. Sorry about that!