Review Request 126770: Fix most Clazy warnings in KXmlGui.

Andrey Cygankov craftplace.ms at gmail.com
Thu Oct 20 12:14:29 UTC 2016


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/126770/
-----------------------------------------------------------

(Updated Oct. 20, 2016, 12:14 p.m.)


Status
------

This change has been marked as submitted.


Review request for KDE Frameworks and Aleix Pol Gonzalez.


Changes
-------

Submitted with commit d4d4796620eb850ee6d305d9bd3478e6b7cb216d by Albert Astals Cid on behalf of Andrey Cygankov to branch master.


Repository: kxmlgui


Description
-------

Fix all Clazy warnings, except:
/src/kaboutapplicationpersonlistdelegate_p.cpp:156:16: warning: Missing reference in foreach with sizeof(T) = 24 bytes (class KDEPrivate::KAboutApplicationPersonProfileOcsLink) [-Wclazy-foreach]
    Q_FOREACH (KAboutApplicationPersonProfileOcsLink link, profile.ocsLinks()) {
in kmainwindow_unittest.cpp - Many warnings related to Qt macros, example:
/autotests/kmainwindow_unittest.cpp:162:9: warning: QString::fromUtf8() being passed a literal [-Wclazy-qstring-uneeded-heap-allocations]
        QTRY_COMPARE(mw.size(), QSize(800, 600));
        ^
/usr/include/x86_64-linux-gnu/qt5/QtTest/qtestcase.h:167:42: note: expanded from macro 'QTRY_COMPARE'
#define QTRY_COMPARE(__expr, __expected) QTRY_COMPARE_WITH_TIMEOUT((__expr), __expected, 5000)
                                         ^
/usr/include/x86_64-linux-gnu/qt5/QtTest/qtestcase.h:163:5: note: expanded from macro 'QTRY_COMPARE_WITH_TIMEOUT'
    QTRY_IMPL(((__expr) == (__expected)), __timeout);\
    ^
/usr/include/x86_64-linux-gnu/qt5/QtTest/qtestcase.h:149:5: note: expanded from macro 'QTRY_IMPL'
    QTRY_TIMEOUT_DEBUG_IMPL((__expr), __timeoutValue, __step)\
    ^
/usr/include/x86_64-linux-gnu/qt5/QtTest/qtestcase.h:139:27: note: expanded from macro 'QTRY_TIMEOUT_DEBUG_IMPL'
            QString msg = QString::fromUtf8("QTestLib: This test case check (\"%1\") failed because the requested timeout (%2 ms) was too short, %3 ms would have been sufficient this time."); \
                          ^


Diffs
-----

  autotests/kactioncategorytest.cpp ab561d2 
  autotests/kactioncollectiontest.cpp b4aa244 
  autotests/kmainwindow_unittest.cpp 00282ef 
  autotests/ktoolbar_unittest.cpp d6c1e05 
  autotests/kxmlgui_unittest.cpp 37fd9c3 
  src/kaboutapplicationdialog.cpp 87af640 
  src/kbugreport.cpp f418dde 
  src/kcheckaccelerators.cpp 85a7d17 
  src/kedittoolbar.cpp ba4ba0f 
  src/kmainwindow.cpp cae655d 
  src/kmenumenuhandler_p.cpp 91297a8 
  src/ksendbugmail/main.cpp 71b8e0e 
  src/kshortcutseditordelegate.cpp 7b41089 
  src/ktoolbar.cpp 8fcb9cb 
  src/kxmlguifactory_p.cpp 5e1a0d6 
  tests/kwindowtest.cpp 0555a56 

Diff: https://git.reviewboard.kde.org/r/126770/diff/


Testing
-------

Build without errors.
Tests passed.


Thanks,

Andrey Cygankov

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20161020/5a478b33/attachment.html>


More information about the Kde-frameworks-devel mailing list