[KJots] Port deprecated code
ClosedPublic

Authored by poboiko on Apr 21 2020, 10:37 AM.

Details

Summary
  1. Ported deprecated QPersistentModelIndex::child to QAbstractItemModel::index;
  2. Ported deprecated KActionCollection::pasteText to paste;
  3. Ported QStatusBar::addItem/changeItem to QStatusBar::showMessage/clearMessage (for links)
  4. Removed ancient akonadi_next/note.cpp, which only held mimetype (Akonadi/Notes/NoteUtils has it);
Test Plan
  1. Just select a book or even a resource -> preview is shown for the whole book
  2. Both Ctrl+V and menu action works fine
  3. Hovering the text cursor over links shows destination again
  4. make

Diff Detail

Repository
R573 KJots
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
poboiko created this revision.Apr 21 2020, 10:37 AM
Restricted Application added a project: KDE PIM. · View Herald TranscriptApr 21 2020, 10:37 AM
poboiko requested review of this revision.Apr 21 2020, 10:37 AM
poboiko updated this revision to Diff 80745.Apr 21 2020, 10:39 AM

Unify the statusbar code for KParts, use clearMessage

dvratil accepted this revision.Apr 21 2020, 11:26 AM
This revision is now accepted and ready to land.Apr 21 2020, 11:26 AM
pino added a subscriber: pino.Apr 21 2020, 11:32 AM

Hey @poboiko,

a couple of notes for a followup patch -- no need to change this patch, as the code lacked the i18n handling also before (so this patch is not a regression).

src/KJotsMain.cpp
74

As this is shown as visible string to the user, can you please use i18n() for this UI text? Ideally with a context (see i18nc()) explaining what %1 and %2 are, so translators can understand what the string will show.

src/kjotspart.cpp
102

Ditto.

This revision was automatically updated to reflect the committed changes.