Bug 313504 - Fix EBN Krazy errors where appropriate
Summary: Fix EBN Krazy errors where appropriate
Status: RESOLVED FIXED
Alias: None
Product: amarok
Classification: Applications
Component: general (show other bugs)
Version: 2.8-git
Platform: unspecified Linux
: NOR task
Target Milestone: 2.8
Assignee: Amarok Developers
URL: http://www.englishbreakfastnetwork.or...
Keywords:
Depends on:
Blocks:
 
Reported: 2013-01-19 13:20 UTC by Myriam Schweingruber
Modified: 2014-05-21 10:45 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Myriam Schweingruber 2013-01-19 13:20:32 UTC
Currently the KDE Code Checker gives a lot of errors in http://www.englishbreakfastnetwork.org/krazy/reports/extragear/multimedia/amarok/index.html

While some might be false positives, there certainly are several areas where those should be fixed, in particular: 

* missing license headers and copyright notices
* wrong i18n calls
* signal - slot normalization (can be fixed with a script)
* missing tooltips where it makes sense
etc.
Comment 1 Mark Kretschmann 2013-08-18 07:48:15 UTC
Git commit 72ad2baae9dbe8f687e866a2b005d2ec1c929c5d by Mark Kretschmann, on behalf of Frank Meerkoetter.
Committed on 18/08/2013 at 07:38.
Pushed by markey into branch 'master'.

Bug 313504: style: prefer QString.clear over a null-assign

style: prefer QString.clear over a null-assign

    See:
    http://www.englishbreakfastnetwork.org/krazy/reports/extragear/multimedia/amarok/index.html
    [...]
    Check for assignments to QString::null [nullstrassign]...OOPS! 6 issues found!

        src/services/amazon/AmazonStore.cpp: line# 116 (1)
        src/dialogs/TagDialog.cpp: line# 835 (1)
        src/browsers/playlistbrowser/PlaylistBrowserCategory.cpp: line# 261 (1)
        src/core-impl/collections/db/sql/SqlMeta.cpp: line# 904,1737,1886 (3)
    [...]

REVIEW: 112139

M  +1    -1    src/browsers/playlistbrowser/PlaylistBrowserCategory.cpp
M  +3    -3    src/core-impl/collections/db/sql/SqlMeta.cpp
M  +1    -1    src/dialogs/TagDialog.cpp
M  +1    -1    src/services/amazon/AmazonStore.cpp

http://commits.kde.org/amarok/72ad2baae9dbe8f687e866a2b005d2ec1c929c5d
Comment 2 Mark Kretschmann 2013-08-18 07:48:16 UTC
Git commit 9f5d7ba32572b094c7dcdc77585b30db2b135a8a by Mark Kretschmann, on behalf of Frank Meerkoetter.
Committed on 18/08/2013 at 07:39.
Pushed by markey into branch 'master'.

Bug 313504: style: prefer QString::isEmpty() over a "null compare"

style: prefer QString::isEmpty() over a "null compare"

See:
http://www.englishbreakfastnetwork.org/krazy/reports/extragear/multimedia/amarok/index.html
[...]
21. Check for compares to QString::null or QString() [nullstrcompare]...OOPS! 2 issues found!

src/dialogs/TrackOrganizer.cpp: line# 83 (1)
src/playlistgenerator/PresetModel.cpp: line# 161 (1)
[...]

REVIEW: 112140

M  +1    -1    src/dialogs/TrackOrganizer.cpp
M  +1    -1    src/playlistgenerator/PresetModel.cpp

http://commits.kde.org/amarok/9f5d7ba32572b094c7dcdc77585b30db2b135a8a
Comment 3 Mark Kretschmann 2013-08-18 07:48:16 UTC
Git commit 272c6b1d7f9e01de761ce055cb93fedef10c35cb by Mark Kretschmann, on behalf of Frank Meerkoetter.
Committed on 18/08/2013 at 07:40.
Pushed by markey into branch 'master'.

Bug 313504: Check validity of i18n calls

Check validity of i18n calls

    See:
    [...]
    Check validity of i18n calls [i18ncheckarg]...OOPS! 4 issues found!

        src/widgets/FilenameLayoutWidget.cpp: wrong argument count, have 1 need 0 line# 93 (1)
    [...]

The other issues reported in that section are false positives.
        src/playlistgenerator/constraints/Checkpoint.cpp: wrong argument count, have 0 need 1 line# 170 (1)
        src/playlistgenerator/constraints/TagMatch.cpp: wrong argument count, have 0 need 1 line# 184 (1)
        src/playlistgenerator/constraints/TagMatch.cpp: wrong argument count, have 0 need 4 line# 170 (1)
    [...]

REVIEW: 112141

M  +1    -1    src/widgets/FilenameLayoutWidget.cpp

http://commits.kde.org/amarok/272c6b1d7f9e01de761ce055cb93fedef10c35cb
Comment 4 Pino Toscano 2013-08-18 08:04:11 UTC
(In reply to comment #3)
> The other issues reported in that section are false positives.
>         src/playlistgenerator/constraints/Checkpoint.cpp: wrong argument
> count, have 0 need 1 line# 170 (1)
>         src/playlistgenerator/constraints/TagMatch.cpp: wrong argument
> count, have 0 need 1 line# 184 (1)
>         src/playlistgenerator/constraints/TagMatch.cpp: wrong argument
> count, have 0 need 4 line# 170 (1)

No, they not false positives, but real string puzzles issues.
Comment 5 Myriam Schweingruber 2013-08-18 09:07:31 UTC
closed by error
Comment 6 Mark Kretschmann 2013-08-25 08:39:43 UTC
Git commit 61350cc9e95ba228f7ec78625c38411cfb636ce3 by Mark Kretschmann, on behalf of Frank Meerkoetter.
Committed on 25/08/2013 at 08:26.
Pushed by markey into branch 'master'.

EBN: Prefer QChar overloads over the QString ones.
REVIEW: 112221

M  +5    -5    src/core-impl/collections/umscollection/UmsCollection.cpp
M  +1    -1    src/dialogs/DiagnosticDialog.cpp
M  +1    -1    tests/synchronization/TestOneWaySynchronizationJob.cpp

http://commits.kde.org/amarok/61350cc9e95ba228f7ec78625c38411cfb636ce3
Comment 7 Mark Kretschmann 2013-08-25 08:39:44 UTC
Git commit 01a4ce741420f76c7945063e58a2ccd5acdd5209 by Mark Kretschmann, on behalf of Frank Meerkoetter.
Committed on 25/08/2013 at 08:28.
Pushed by markey into branch 'master'.

EBN: Check for foreach loop issues.

Fixing a number of issues from
http://www.englishbreakfastnetwork.org/krazy/reports/extragear/multimedia/amarok/index.html
[...]
13. Check for foreach loop issues [foreach]...
[...]

Prefer a const reference over a copy. This patch is only a first
batch - fixing the simple cases.
REVIEW: 112199

M  +1    -1    shared/TagsFromFileNameGuesser.cpp
M  +1    -1    src/EngineController.cpp
M  +1    -1    src/OpmlParser.cpp
M  +1    -1    src/configdialog/dialogs/MetadataConfig.cpp
M  +1    -1    src/context/applets/labels/LabelsApplet.cpp
M  +1    -1    src/core-impl/collections/daap/DaapCollection.cpp
M  +1    -1    src/core-impl/collections/daap/daapreader/Reader.cpp
M  +1    -1    src/core-impl/collections/db/MountPointManager.cpp
M  +1    -1    src/core-impl/collections/db/sql/SqlCollectionLocation.cpp
M  +1    -1    src/core-impl/collections/ipodcollection/IpodCollectionFactory.cpp
M  +2    -2    src/core-impl/collections/ipodcollection/IpodPlaylistProvider.cpp
M  +2    -2    src/core-impl/collections/ipodcollection/jobs/IpodParseTracksJob.cpp
M  +2    -2    src/core-impl/collections/ipodcollection/support/IphoneMountPoint.cpp
M  +1    -1    src/core-impl/collections/playdarcollection/support/Query.cpp
M  +1    -1    src/core-impl/collections/support/CollectionManager.cpp
M  +1    -1    src/core-impl/collections/umscollection/podcasts/UmsPodcastProvider.cpp
M  +2    -2    src/core-impl/collections/upnpcollection/UpnpBrowseCollection.cpp
M  +3    -3    src/core-impl/collections/upnpcollection/UpnpCollectionFactory.cpp
M  +2    -2    src/core-impl/collections/upnpcollection/UpnpQuery.cpp
M  +1    -1    src/core-impl/collections/upnpcollection/UpnpQueryMaker.cpp
M  +4    -4    src/core-impl/collections/upnpcollection/UpnpQueryMakerInternal.cpp
M  +1    -1    src/core-impl/meta/cue/CueFileSupport.cpp
M  +1    -1    src/core/transcoding/TranscodingConfiguration.cpp
M  +1    -1    src/core/transcoding/formats/TranscodingAacFormat.cpp
M  +1    -1    src/core/transcoding/formats/TranscodingFlacFormat.cpp
M  +1    -1    src/core/transcoding/formats/TranscodingMp3Format.cpp
M  +1    -1    src/core/transcoding/formats/TranscodingOpusFormat.cpp
M  +1    -1    src/core/transcoding/formats/TranscodingVorbisFormat.cpp
M  +1    -1    src/core/transcoding/formats/TranscodingWmaFormat.cpp
M  +1    -1    src/covermanager/CoverCache.cpp
M  +2    -2    src/databaseimporter/amarok14/FastForwardWorker.cpp
M  +1    -1    src/dialogs/CollectionSetup.cpp
M  +1    -1    src/dialogs/OrganizeCollectionDialog.cpp
M  +1    -1    src/dialogs/TagDialog.cpp
M  +1    -2    src/network/NetworkAccessViewer.cpp
M  +2    -2    src/playlist/layouts/PlaylistLayoutEditDialog.cpp
M  +2    -2    src/playlistmanager/file/KConfigSyncRelStore.cpp
M  +1    -1    src/services/lastfm/ScrobblerAdapter.cpp
M  +3    -3    src/services/lastfm/SynchronizationAdapter.cpp
M  +1    -1    src/services/opmldirectory/OpmlDirectoryView.cpp
M  +1    -1    src/statsyncing/Config.cpp
M  +1    -1    src/transcoding/TranscodingOptionsStackedWidget.cpp
M  +1    -1    src/widgets/FilenameLayoutWidget.cpp
M  +1    -1    utilities/collectionscanner/CollectionScanner.cpp

http://commits.kde.org/amarok/01a4ce741420f76c7945063e58a2ccd5acdd5209
Comment 8 Myriam Schweingruber 2013-08-25 15:13:23 UTC
Closed by error again, please use the CCBUG: flag, not the BUG: one, else this will get closed again.

There re still several issues found by Krazy
Comment 9 vedant agarwala 2014-05-21 10:41:27 UTC
Git commit dee7c2465cb744a13ff6cf183ce71510f66bff5b by Vedant Agarwala, on behalf of Frank Meerkoetter.
Committed on 25/08/2013 at 08:26.
Pushed by vedanta into branch 'tagguessing'.

EBN: Prefer QChar overloads over the QString ones.
REVIEW: 112221

M  +5    -5    src/core-impl/collections/umscollection/UmsCollection.cpp
M  +1    -1    src/dialogs/DiagnosticDialog.cpp
M  +1    -1    tests/synchronization/TestOneWaySynchronizationJob.cpp

http://commits.kde.org/amarok/dee7c2465cb744a13ff6cf183ce71510f66bff5b
Comment 10 vedant agarwala 2014-05-21 10:45:38 UTC
Git commit 4e254c6107166ddf0838990e908dc885dad8f1ba by Vedant Agarwala, on behalf of Frank Meerkoetter.
Committed on 25/08/2013 at 08:28.
Pushed by vedanta into branch 'tagguessing'.

EBN: Check for foreach loop issues.

Fixing a number of issues from
http://www.englishbreakfastnetwork.org/krazy/reports/extragear/multimedia/amarok/index.html
[...]
13. Check for foreach loop issues [foreach]...
[...]

Prefer a const reference over a copy. This patch is only a first
batch - fixing the simple cases.
REVIEW: 112199

M  +1    -1    shared/TagsFromFileNameGuesser.cpp
M  +1    -1    src/EngineController.cpp
M  +1    -1    src/OpmlParser.cpp
M  +1    -1    src/configdialog/dialogs/MetadataConfig.cpp
M  +1    -1    src/context/applets/labels/LabelsApplet.cpp
M  +1    -1    src/core-impl/collections/daap/DaapCollection.cpp
M  +1    -1    src/core-impl/collections/daap/daapreader/Reader.cpp
M  +1    -1    src/core-impl/collections/db/MountPointManager.cpp
M  +1    -1    src/core-impl/collections/db/sql/SqlCollectionLocation.cpp
M  +1    -1    src/core-impl/collections/ipodcollection/IpodCollectionFactory.cpp
M  +2    -2    src/core-impl/collections/ipodcollection/IpodPlaylistProvider.cpp
M  +2    -2    src/core-impl/collections/ipodcollection/jobs/IpodParseTracksJob.cpp
M  +2    -2    src/core-impl/collections/ipodcollection/support/IphoneMountPoint.cpp
M  +1    -1    src/core-impl/collections/playdarcollection/support/Query.cpp
M  +1    -1    src/core-impl/collections/support/CollectionManager.cpp
M  +1    -1    src/core-impl/collections/umscollection/podcasts/UmsPodcastProvider.cpp
M  +2    -2    src/core-impl/collections/upnpcollection/UpnpBrowseCollection.cpp
M  +3    -3    src/core-impl/collections/upnpcollection/UpnpCollectionFactory.cpp
M  +2    -2    src/core-impl/collections/upnpcollection/UpnpQuery.cpp
M  +1    -1    src/core-impl/collections/upnpcollection/UpnpQueryMaker.cpp
M  +4    -4    src/core-impl/collections/upnpcollection/UpnpQueryMakerInternal.cpp
M  +1    -1    src/core-impl/meta/cue/CueFileSupport.cpp
M  +1    -1    src/core/transcoding/TranscodingConfiguration.cpp
M  +1    -1    src/core/transcoding/formats/TranscodingAacFormat.cpp
M  +1    -1    src/core/transcoding/formats/TranscodingFlacFormat.cpp
M  +1    -1    src/core/transcoding/formats/TranscodingMp3Format.cpp
M  +1    -1    src/core/transcoding/formats/TranscodingOpusFormat.cpp
M  +1    -1    src/core/transcoding/formats/TranscodingVorbisFormat.cpp
M  +1    -1    src/core/transcoding/formats/TranscodingWmaFormat.cpp
M  +1    -1    src/covermanager/CoverCache.cpp
M  +2    -2    src/databaseimporter/amarok14/FastForwardWorker.cpp
M  +1    -1    src/dialogs/CollectionSetup.cpp
M  +1    -1    src/dialogs/OrganizeCollectionDialog.cpp
M  +1    -1    src/dialogs/TagDialog.cpp
M  +1    -2    src/network/NetworkAccessViewer.cpp
M  +2    -2    src/playlist/layouts/PlaylistLayoutEditDialog.cpp
M  +2    -2    src/playlistmanager/file/KConfigSyncRelStore.cpp
M  +1    -1    src/services/lastfm/ScrobblerAdapter.cpp
M  +3    -3    src/services/lastfm/SynchronizationAdapter.cpp
M  +1    -1    src/services/opmldirectory/OpmlDirectoryView.cpp
M  +1    -1    src/statsyncing/Config.cpp
M  +1    -1    src/transcoding/TranscodingOptionsStackedWidget.cpp
M  +1    -1    src/widgets/FilenameLayoutWidget.cpp
M  +1    -1    utilities/collectionscanner/CollectionScanner.cpp

http://commits.kde.org/amarok/4e254c6107166ddf0838990e908dc885dad8f1ba