Development discussion of WireGuard
 help / color / mirror / Atom feed
From: "Jason A. Donenfeld" <Jason@zx2c4.com>
To: "qt-creator@qt-project.org" <qt-creator@qt-project.org>
Cc: WireGuard mailing list <wireguard@lists.zx2c4.com>
Subject: Re: [Qt-creator] Qt Creator for Linux Kernel Development
Date: Mon, 28 Nov 2016 19:03:39 +0100	[thread overview]
Message-ID: <CAHmME9qbUuRHAMOrd82BOnr3KC9zJqGCpkN9PY1brwkR5gM84w@mail.gmail.com> (raw)
In-Reply-To: <1566601479887120@web23m.yandex.ru>

Hello All,

Responses to each of you are inline below.

Sounds to me like there's a lot of work to be done, still, and I
haven't received any enthusiastic responses from the Qt team of, "yes!
we'd love to work on this and make Qt Creator suitable for kernel
development!" Bummer. Seems like a great opportunity to increase the
tool's user appeal.

On Wed, Nov 23, 2016 at 8:45 AM, Konstantin Tokarev <annulen@yandex.ru> wro=
te:
> BTW, I'm facing similar issue with QtWebKit: config.h is included into al=
l
> source files, but never in headers, so all #if's in headers are disabled
> and code model does not function properly.

Yep, this is pretty much entirely broken. It's not implemented in the
Qt C++ model, and it straight up does not work in the clang mode
model. The lack of good support for this feature -- project wide
-include file -- is pretty limiting.

On Wed, Nov 23, 2016 at 8:58 AM, Orgad Shaneh <orgads@gmail.com> wrote:
> Which version do you use? Designated initializers support was added in 3.=
2
> (c56b999ffff249d4cb7dc7e8026a3297b63ff56d).
>
> I now see that the members are not detected correctly (for e.g. Find
> Usages), but parsing looks ok.

I'm using 4.1. No, it still does not work. Here's a screenshot:
https://data.zx2c4.com/designated-init-broken-qt-creator-49b6f51f.png

> You can set PRECOMPILED_HEADER =3D header.h in your pro file. It should b=
e
> applied to all sources.

Nope, that's certainly not what that field does.

On Wed, Nov 23, 2016 at 10:21 AM, Eike Ziller <Eike.Ziller@qt.io> wrote:
> Are you using the ClangCodeModel plugin? If not, you probably should.
> It does not help for things like find usages and locator, since for this =
we still use the built-in model,
> and fixes for the built-in model will be very limited.
> But for working with the individual _source_ file it should at least help=
.
> I can even open Objective-C++ files and get decent highlighting and even
> get some completion for Objective-C ;)

The clang mode model is even more buggy than the built-in one. Not
only that, but it's an order of magnitude slower too, which makes Qt
Creator impossible to use. The only viable usage of the IDE is through
the built-in code model. Hopefully the Qt engineers will put in the
time to bring it up to par with modern times with -include, and add
explicit C support...

> One other issue are header files - there is no way Qt Creator can automat=
ically tell if a
> .h file is supposed to be C, C++, Objective-C, Objective-C++, ....
> One hack workaround for C might be to remove *.h from the text/x-c++hdr m=
ime type in Options > Environment > Mime Types,
> but that would be a big and global hack (if it worked) ;)
> We could probably provide a project setting for a =E2=80=9Cdefault=E2=80=
=9D language to use though, which would then also be sharable with all in t=
he project sources with a .shared file.

A project-wide setting would indeed be most welcome for this.


On Wed, Nov 23, 2016 at 5:15 PM, Andrzej Telszewski
<atelszewski@gmail.com> wrote:
> I don't remember exactly, but I used some other feature of QtC (Import
> Project was it?).
> It allowed to easily setup QtC for kernel development.
> It worked pretty well, most of the time.
> Just a quick search:
> http://stackoverflow.com/questions/5417732/howto-prepare-qtcreator-for-li=
nux-driver-kernel-development

The solution listed here is basically wrong and doesn't work. The code
model won't actually parse that #include properly.

>
> I too remember seeing false errors when code model parsed struct members
> initializers.
>
> But this code seems to work just fine now:

Try something slightly more complicated and it totally blows up again.
See the linked screenshot above.

> And yes, although I'm not going to be involved in enhancing QtC, I would
> love to see C receiving decent support.
> QtC is my main (well, the only) IDE, and I write both C and C++ code.

If only the Qt developers cared about this too. Missed opportunity IMHO.

Jason

  reply	other threads:[~2016-11-28 17:59 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-23  5:51 Jason A. Donenfeld
2016-11-23  7:45 ` [Qt-creator] " Konstantin Tokarev
2016-11-28 18:03   ` Jason A. Donenfeld [this message]
2016-11-28 19:49     ` Marco Bubke
2016-11-29 19:21       ` Jason A. Donenfeld
2016-11-28 21:34     ` André Pönitz
2016-11-29  8:55     ` Nikolai Kosjar
2016-11-29 19:23       ` Jason A. Donenfeld
2016-11-30  8:41         ` Nikolai Kosjar
2016-11-30  8:43       ` Orgad Shaneh
2016-11-29  8:56   ` Nikolai Kosjar
2016-11-23  7:58 ` Orgad Shaneh
2016-11-23  9:21 ` Eike Ziller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAHmME9qbUuRHAMOrd82BOnr3KC9zJqGCpkN9PY1brwkR5gM84w@mail.gmail.com \
    --to=jason@zx2c4.com \
    --cc=qt-creator@qt-project.org \
    --cc=wireguard@lists.zx2c4.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).