Discussion:
[Qt-creator] Qt Creator 4.6 & editor messages
Andy
2018-03-28 18:58:40 UTC
Permalink
Great work on getting 4.6 out!

This is cool. Having clang-tidy and clazy built-in is (going to be)
awesome.

When I get a message (warning/error) in the editor, how do I know which it
came from?

I just turned on clang-tidy and clazy (some of the options) and something
is pointing at things like "QApplication::processEvents();" and telling me
that there is no matching function call. I guess something isn't
recognizing default arguments, but... what? Code model? Clang-tidy? Clazy?

Thanks!

---
Andy Maloney // https://asmaloney.com
twitter ~ @asmaloney <https://twitter.com/asmaloney>
Andy
2018-03-29 13:46:12 UTC
Permalink
As a followup - even if I turn off clazy and tidy, I'm getting hundreds of
"Semantic Issue" errors in the editor that are clearly not errors.

A lot of "No member named 'foo' in 'bar'" and "Cannot initialize object
parameter of type 'foo' with an expression of type 'bar'".

It compiles cleanly (and has for many years). Maybe the code model is not
handling includes properly?

It makes the editor very, very noisy to the point of being unusable. (And
then there are the long pauses where I can't do anything & have to guess if
it's going to come back to me or just hang - trying to isolate.)

---
Andy Maloney // https://asmaloney.com
Post by Andy
Great work on getting 4.6 out!
This is cool. Having clang-tidy and clazy built-in is (going to be)
awesome.
When I get a message (warning/error) in the editor, how do I know which it
came from?
I just turned on clang-tidy and clazy (some of the options) and something
is pointing at things like "QApplication::processEvents();" and telling
me that there is no matching function call. I guess something isn't
recognizing default arguments, but... what? Code model? Clang-tidy? Clazy?
Thanks!
---
Andy Maloney // https://asmaloney.com
Andy
2018-03-29 14:55:46 UTC
Permalink
Thanks for the suggestion GÃŒnter.

No pre-compiled headers in the projects. I've also tried explicitly adding
includes for things it's complaining about and it doesn't change anything.

It could very well be something strange in the style of the projects I've
tried (two of my own qmake-based, one open source cmake-based), but I
haven't yet figured out what that might be.

I guess if I'm the only one experiencing it, then... <slowly points finger
at self>

---
Andy Maloney // https://asmaloney.com
Post by Andy
It compiles cleanly (and has for many years). Maybe the code model is not
handling includes properly?
Maybe it's like for one of my projects, and it's the other way round?
So The includes in the code are wrong.
But it compiles because pre compiled headers are used.
Regards
GÃŒnter
--
Guenter Schwann
Nikolai Kosjar
2018-04-04 06:25:58 UTC
Permalink
Post by Andy
It makes the editor very, very noisy to the point of being unusable.
(And then there are the long pauses where I can't do anything & have to
guess if it's going to come back to me or just hang - trying to isolate.)
If all clazy and tidy checks are deactivated and it still feels
sluggish, the clangbackend might be crashing (and restarting again) - do
you see any hints in the "General Messages" pane at the bottom?

Nikolai
Andy
2018-04-09 15:17:49 UTC
Permalink
Thanks Nikolai.

1) I obviously have a disconnect with the code model and includes somehow.
I have no idea how to find that or fix it. I've played with the code model
inspector but can't fix the issue.

2) The smallest example would be this lib that I forked a short while ago:

https://github.com/asmaloney/libE57Format

When I open that, turn off tidy and clazy, and navigate to
src/E57FoundationImpl.cpp for example - the scrollbar is almost solid red
with "errors"

3) I do not get any messages about clangbackend crashing

4) Fairly frequently I have (unrecoverable) hangs when trying to
(right-click) "Follow Symbol Under Cursor"

5) Sometimes when doing "Rename symbol under the cursor" (via keyboard),
the search/replace results show the wrong symbol (often a
previously-searched symbol)

6) I sent another email to the list about the Clang Static Analyzer failing

7) etc...

I looked for any old compilers (via homebrew) in my paths) - none.

So basically nothing seems to be working for me and I can't figure out why
:-)

Any suggestions on where to look to determine the cause(s) of the
problem(s)?

(macOS 10.12.6, Apple LLVM version 9.0.0 (clang-900.0.39.2), Qt Creator
installed via maintenance tool)

Thank you!


---
Andy Maloney // https://asmaloney.com
Post by Andy
It makes the editor very, very noisy to the point of being unusable. (And
then there are the long pauses where I can't do anything & have to guess if
it's going to come back to me or just hang - trying to isolate.)
If all clazy and tidy checks are deactivated and it still feels sluggish,
the clangbackend might be crashing (and restarting again) - do you see any
hints in the "General Messages" pane at the bottom?
Nikolai
_______________________________________________
Qt-creator mailing list
http://lists.qt-project.org/mailman/listinfo/qt-creator
Nikolai Kosjar
2018-04-10 06:24:18 UTC
Permalink
Please file bug reports with these problems and your answers below.
Post by Andy
Thanks Nikolai.
1) I obviously have a disconnect with the code model and includes
somehow. I have no idea how to find that or fix it. I've played with the
code model inspector but can't fix the issue.
https://github.com/asmaloney/libE57Format
<https://github.com/asmaloney/libE57Format>
When I open that, turn off tidy and clazy, and navigate to
src/E57FoundationImpl.cpp for example - the scrollbar is almost solid
red with "errors"
Does the project build fine for you?
Are the include paths correct in the code model inspector? (tab "Project
Parts", sub tab "Header Paths")
Post by Andy
3) I do not get any messages about clangbackend crashing
4) Fairly frequently I have (unrecoverable) hangs when trying to
(right-click) "Follow Symbol Under Cursor"
Does the hang happen if you open the menu, or if you click on the
"Follow Symbol Under Cursor"?
Post by Andy
5) Sometimes when doing "Rename symbol under the cursor" (via keyboard),
the search/replace results show the wrong symbol (often a
previously-searched symbol)
6) I sent another email to the list about the Clang Static Analyzer failing
7) etc...
I looked for any old compilers (via homebrew) in my paths) - none.
So basically nothing seems to be working for me and I can't figure out
why :-)
Any suggestions on where to look to determine the cause(s) of the
problem(s)?
(macOS 10.12.6, Apple LLVM version 9.0.0 (clang-900.0.39.2), Qt Creator
installed via maintenance tool)
Thank you!
---
Andy Maloney  // https://asmaloney.com
It makes the editor very, very noisy to the point of being
unusable. (And then there are the long pauses where I can't do
anything & have to guess if it's going to come back to me or
just hang - trying to isolate.)
If all clazy and tidy checks are deactivated and it still feels
sluggish, the clangbackend might be crashing (and restarting again)
- do you see any hints in the "General Messages" pane at the bottom?
Nikolai
_______________________________________________
Qt-creator mailing list
http://lists.qt-project.org/mailman/listinfo/qt-creator
<http://lists.qt-project.org/mailman/listinfo/qt-creator>
Nikolai Kosjar
2018-04-04 06:23:39 UTC
Permalink
Post by Andy
When I get a message (warning/error) in the editor, how do I know which
it came from?
Usually by looking at the diagnostic name / command line option that is
also provided:

For clazy, the diagnostics typically include "clazy" in the diagnostic
command line switch that comes with the diagnostic text, e.g.:

...diagnostic text.... [-Wclazy-copyable-polymorpic]

For tidy, if you have "modernize-*" enabled, then related diagnostics
start with that prefix.

The rest will come from clang itself.
Post by Andy
I just turned on clang-tidy and clazy (some of the options) and
something is pointing at things like "QApplication::processEvents();"
and telling me that there is no matching function call. I guess
something isn't recognizing default arguments, but... what? Code model?
Clang-tidy? Clazy?
That sounds as if the code model does not get the correct macros and
include paths from the project manager.

Please report a preferably minimal example project to reproduce.

Nikolai
Loading...