Address some compiler warnings
ClosedPublic

Authored by iasensio on Apr 27 2020, 10:04 PM.

Details

Summary
  • Port from deprecated dark() and light()
  • Port from deprecated DesktopIcon
  • Use KIconLoader::StdSizes instead of harcoded sizes
  • Use QString() for empty strings
  • Minimal style changes around those
Test Plan

Basket still compiles and works
Less compiler warnings

Diff Detail

Repository
R1050 BasKet
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
iasensio requested review of this revision.Apr 27 2020, 10:04 PM
iasensio created this revision.
ognarb accepted this revision.Apr 27 2020, 10:45 PM

LGTM :)

src/note.cpp
1218–1219

while you are at it, make it const :)

This revision is now accepted and ready to land.Apr 27 2020, 10:45 PM
alex added a subscriber: alex.Apr 28 2020, 12:06 PM
alex added inline comments.
src/htmlexporter.cpp
471–473

While at it you could replace "" with QString(), to create an empty string.
There are also some other occurrences in the files.

iasensio updated this revision to Diff 81450.Apr 28 2020, 5:43 PM
iasensio marked 2 inline comments as done.
  • Use QString() for empty strings
  • Minimal style changes around those
ognarb accepted this revision.Apr 28 2020, 6:36 PM
iasensio updated this revision to Diff 81458.Apr 28 2020, 6:53 PM
  • Do not add deprecated stuff (QLatin1Literal) while trying to modernize
iasensio edited the summary of this revision. (Show Details)Apr 28 2020, 6:56 PM
iasensio updated this revision to Diff 81463.Apr 28 2020, 7:21 PM
iasensio edited the summary of this revision. (Show Details)
  • Rebase
This revision was automatically updated to reflect the committed changes.
alex added a comment.Apr 28 2020, 7:23 PM

You can also the signals to use the Qt5 syntax.

connect(m_action, SIGNAL(triggered()), this, SLOT(activatedShortcut())); // old
connect(m_action, &QAction::triggered, this, &BasketScene::activatedShortcut); // new

And the docs about this: https://wiki.qt.io/New_Signal_Slot_Syntax