D15532: kdev-astyle : improved ObjC support

Friedrich W. H. Kossebau noreply at phabricator.kde.org
Wed Sep 19 22:32:38 BST 2018


kossebau accepted this revision.
kossebau added a comment.
This revision is now accepted and ready to land.


  In D15532#328547 <https://phabricator.kde.org/D15532#328547>, @rjvbb wrote:
  
  > >   Code looks fine to me, modulo all the comments made, and works where I tested it. Please also update the summary text and title of the patch.
  >
  > What title do you propose?
  
  
  Perhaps
  [Astyle] Add Objective C to list of languages with formatters
  
  >>   For some reason the preview uses the "C" highlighting mode for me when ObjC is selected, so the preview has some highlighting issues. That seems a bug with KTextEditor I have to explore more.
  > 
  > I didn't notice that, it doesn't do that for me (KF5 Frameworks 5.47.0).
  
  Possibly because Qt on macOS uses the macOS mimettype database (or the adaption to that specific format definition which there is on macOS IIRC), so things do not fail as here with the XDG shared-mime-info database. Where someone once decided that Objective-C is a subtype of C...
  https://bugs.freedesktop.org/show_bug.cgi?id=6743
  https://cgit.freedesktop.org/xdg/shared-mime-info/commit/freedesktop.org.xml.in?id=e1851ad681f64b5f5dde429e1a79801ef08311b5
  
  No real clue about Objective-C, but the claim that Objective-C is a supertype to C seems wrong, no? That would need a fix in shared-mime-info then.
  
  > What I do notice is that no preview is shown for profiles I defined myself, but that also happens for me without my patch.
  
  Yes, known (to me) bug, I have a patch somewhere I need to finish one day.
  
  Concern about preview repulled, not due to this patch :) (possibly we could do some workaround, but I would first wait for someone complaining).

INLINE COMMENTS

> astyle_plugin.cpp:284
>          {QStringLiteral("text/x-csharp"), QStringLiteral("C#")},
> +        {QStringLiteral("text/x-objcsrc"), QStringLiteral("ObjC")},
> +        {QStringLiteral("text/x-objc++src"), QStringLiteral("ObjC++")},

What about "ObjC" -> "Objective-C"? That is the id also used for X-KDevelop-Languages, would be good to be consistent.
Also is this the string currently used for display, so not using an abbreviation might be better.

REPOSITORY
  R32 KDevelop

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

To: rjvbb, #kdevelop, kossebau
Cc: kfunk, pino, kossebau, kdevelop-devel, glebaccon, antismap, iodelay, vbspam, geetamc, Pilzschaf, akshaydeo, surgenight, arrowd
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20180919/b8f42aa7/attachment-0001.html>


More information about the KDevelop-devel mailing list