Fix some compile warnings
ClosedPublic

Authored by rominf on Mar 3 2018, 5:40 PM.

Diff Detail

Repository
R318 Dolphin
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
rominf requested review of this revision.Mar 3 2018, 5:40 PM
rominf created this revision.
markg accepted this revision.Mar 3 2018, 9:41 PM
This revision is now accepted and ready to land.Mar 3 2018, 9:41 PM
elvisangelaccio added inline comments.
src/dolphinmainwindow.cpp
413

Don't we need a break here?

src/kitemviews/kitemlistcontroller.cpp
436–437

Why this change?

rominf updated this revision to Diff 28544.Mar 4 2018, 6:57 AM
  • Fix some other compile warnings
rominf updated this revision to Diff 28545.Mar 4 2018, 7:03 AM
rominf marked an inline comment as done.
  • Add fall through clarification
rominf marked an inline comment as done.Mar 4 2018, 7:05 AM
rominf added inline comments.
src/dolphinmainwindow.cpp
413

Because:

  • Do you want to close all tabs?
  • Nope. Close please only the active one.
  • OK. Closing it. Canceling quit. Ignoring the quit event.
src/kitemviews/kitemlistcontroller.cpp
436–437

GCC doesn't not produce warning about fall through if it captures a comment about "fall through". By some reason GCC didn't like previous comment. I just made him happy.

rominf updated this revision to Diff 28550.Mar 4 2018, 7:27 AM
rominf marked an inline comment as done.

Rebase on master

This revision was automatically updated to reflect the committed changes.
rkflx reopened this revision.Mar 4 2018, 7:35 AM
rkflx added a subscriber: rkflx.

If you request review from Dolphin and @elvisangelaccio comments, please wait for his "ship it".

src/dolphintabwidget.cpp
94–97 ↗(On Diff #28544)

Was this part of the original Diff people reviewed?

src/panels/information/phononwidget.cpp
28–31

Was this part of the original Diff people reviewed?

This revision is now accepted and ready to land.Mar 4 2018, 7:35 AM
rkflx added a comment.Mar 4 2018, 7:37 AM

This revision is now accepted and ready to land.

Huh, I did not set that…

rominf added inline comments.Mar 4 2018, 7:50 AM
src/dolphintabwidget.cpp
94–97 ↗(On Diff #28544)

No. I think that I have to think twice before landing even if phabricator permits it.

src/panels/information/phononwidget.cpp
28–31

No.

markg requested changes to this revision.Mar 4 2018, 12:40 PM

Could you not do this please?
The revision i reviewed was a lot different then the one that's up now. You even fix different things compared to what i first saw.
This should have been a new review i think, not an update.

src/panels/information/phononwidget.cpp
28–31

Nope...

28–31

-1

Those are GCC specific (what about clang and MSVC?).
Phonon is the place to fix that. If that isn't ready yet then we just have those compile warnings.

At least, that's my opinion, not sure about others.

This revision now requires changes to proceed.Mar 4 2018, 12:40 PM
rominf added inline comments.Mar 5 2018, 8:01 AM
src/panels/information/phononwidget.cpp
28–31

I don't think that there is a cross-compiler way of ignoring warnings. In my opinion is better to make the code more ugly but to get rid of all warnings, because it's easier to spot a warning when it's only the one.

markg added inline comments.Mar 5 2018, 9:14 AM
src/panels/information/phononwidget.cpp
28–31

I usually tend to agree to changes that reduce compile warnings as i hate warnings too.
But in this case i see no real benefit for a mere 2 warnings less on one compiler.

In fact, adding override in phonon (to Phonon::VideoWidget::mouseMoveEvent and Phonon::VideoWidget::event would solve it, but it's probably not that easy).

elvisangelaccio requested changes to this revision.Mar 5 2018, 9:28 PM

Commit reverted, please be careful before using arc land.

src/dolphintabwidget.cpp
94–97 ↗(On Diff #28552)

Please remove. Warnings should be either fixed or hidden by a custom compiler config (you may want to try some cmake magic to override the gcc flags). Not in the code.

rominf updated this revision to Diff 28995.Mar 8 2018, 9:22 AM

Remove GCC specific warning ignore code

rominf marked 10 inline comments as done.Mar 8 2018, 9:23 AM
rominf marked an inline comment as done.
chehrlic added inline comments.
src/kitemviews/kitemlistcontroller.cpp
436–437

You're looking for Q_FALLTHROUGH() here I guess: http://doc.qt.io/qt-5/qtglobal.html#Q_FALLTHROUGH

rominf marked an inline comment as done.Mar 8 2018, 4:46 PM
rominf updated this revision to Diff 29022.Mar 8 2018, 4:47 PM

Use Q_FALLTHROUGH

src/panels/information/phononwidget.cpp
170

This requires Qt 5.8, please bump QT_MIN_VERSION defined in the top-level CMakeLists.txt.

rominf updated this revision to Diff 29149.Mar 10 2018, 12:52 PM
  • Bump Qt version to 5.8

@markg Does it look good to you now?

markg accepted this revision.Mar 10 2018, 3:03 PM

As Plasma itself depends on Qt 5.9, having Qt 5.8 in here as minimum is perfectly fine :)
It looks OK to me. Push it.

But please, no more changes on this change in phab afterwards. This review already changed way to wildly what should have been a new review request imho.

This revision is now accepted and ready to land.Mar 10 2018, 3:03 PM
This revision was automatically updated to reflect the committed changes.