D24568: Provide clang-format target with a KDE Frameworks style file

Christoph Cullmann noreply at phabricator.kde.org
Sun Nov 17 12:19:03 GMT 2019


cullmann added a comment.


  Btw., I just tried e.g.
  
  https://code.qt.io/cgit/qt/qt5.git/tree/_clang-format
  
  that one has exactly the same issues as our file and re-flows stuff into single lines (even lambdas).
  
  The only thing that often hinders that is the column limit of 100 there.
  
  That on the other side make as lot of code lot harder to read, too, like:
  
    -    cc()->unregisterCompletionModel(KTextEditor::EditorPrivate::self()->wordCompletionModel()); // would add additional items, we don't want that in tests
    +    cc()->unregisterCompletionModel(KTextEditor::EditorPrivate::self()
    +                                            ->wordCompletionModel()); // would add additional items,
    +                                                                      // we don't want that in tests
    
    -    highlightMatchAttribute->dynamicAttribute(Attribute::ActivateMouseIn)->setBackground(searchColor);
    -    highlightMatchAttribute->dynamicAttribute(Attribute::ActivateMouseIn)->setForeground(foregroundColor);
    -    highlightMatchAttribute->dynamicAttribute(Attribute::ActivateCaretIn)->setBackground(searchColor);
    -    highlightMatchAttribute->dynamicAttribute(Attribute::ActivateCaretIn)->setForeground(foregroundColor);
    +    highlightMatchAttribute->dynamicAttribute(Attribute::ActivateMouseIn)
    +            ->setBackground(searchColor);
    +    highlightMatchAttribute->dynamicAttribute(Attribute::ActivateMouseIn)
    +            ->setForeground(foregroundColor);
    +    highlightMatchAttribute->dynamicAttribute(Attribute::ActivateCaretIn)
    +            ->setBackground(searchColor);
    +    highlightMatchAttribute->dynamicAttribute(Attribute::ActivateCaretIn)
    +            ->setForeground(foregroundColor);
  
  (and that is just one of .... places in KTextEditor that look like that afterwards).

REPOSITORY
  R240 Extra CMake Modules

REVISION DETAIL
  https://phabricator.kde.org/D24568

To: cullmann, #frameworks, dfaure, broulik, davidedmundson
Cc: zzag, sitter, mwolff, ochurlaud, nalvarez, kossebau, aacid, davidedmundson, dhaumann, apol, ognarb, kde-frameworks-devel, kde-buildsystem, LeGast00n, GB_2, bencreasy, michaelh, ngraham, bruns
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20191117/7065e4a5/attachment.html>


More information about the Kde-frameworks-devel mailing list