4 ms·
Best C++ IDE ever. Clang code model does provide (about) the same level of tooling in C++ with Java.
by 0xFFC 9y ago
Best C++ IDE ever. Clang code model does provide (about) the same level of tooling in C++ with Java.
- mateuszf 9y agoHave you tried https://www.jetbrains.com/clion/ https://www.jetbrains.com/clion/ ?
- jcelerier 9y agoOn the project I work on, QtCreator's indexing takes 15 seconds and I have access immediately to all my types, even stuff using fairly modern C++17 with the latest beta, while CLion takes a good 20 minutes to parse it, and most of my code is a red underlined mess. QtCreator also feels much snappier when typing in general. The one good thing of CLion in my eyes is its detection of unused includes. But QtC is overall superior for C++ dev experience, especially when you factor in all the static analysis (clang-analyzer is integrated), profiling support (how nice is it to see small percentages next to your lines of code ! ), pretty debugging, etc. Both support CMake but QtCreator supports CMake's server mode API which is the recommended way onwards: https://cmake.org/cmake/help/v3.10/manual/cmake-server.7.html https://cmake.org/cmake/help/v3.10/manual/cmake-server.7.htm...
- DerDangDerDang 9y agoIs that because your code must be precompiled with moc before it's legal C++? It seems a little unfair to say QtCreator is faster and more accurate if you're working with Qt code. Qt chose to extend the language and make many of their vocabulary types opaque pimpl'd bags of void*, which makes it very hard for any other IDE to support Qt to the same extent. FWIW CLion also has built-in static analysis.
- deleted 9y ago[deleted]
- jcelerier 9y ago> Is that because your code must be precompiled with moc before it's legal C++? That's... not how moc works at all. Moc parse your header files and generates additional cpp files from it which contain boilerplate for reflection and signals. So no static analyzer has any problem parsing Qt code... (I use cppcheck, coverity, clang-analyzer, clang-tidy) The "special" Qt keywords like signal, slot, etc... are just trivial macros: https://github.com/qt/qtbase/blob/5.10/src/corelib/kernel/qobjectdefs.h#L86 https://github.com/qt/qtbase/blob/5.10/src/corelib/kernel/qo... "signals" is just defined as "public", "slots" and "emit" as nothing. Your compiler compiles your source as-is. If you really don't like moc, there's a way to get its features natively with C++14 compilers (and uglier macros) : https://github.com/woboq/verdigris https://github.com/woboq/verdigris
- DerDangDerDang 9y agoOK, 'legal c++' was a stretch - I take that back. I absolutely stand by the point that it's not reasonable to expect non-Qt tools to work as well as QtCreator on Qt-heavy projects. You don't explicitly say so, but your answer suggests that your project uses Qt heavily. QtCreator is great for Qt projects - fine. That doesn't say much about it in general though. Other IDEs handling a Qt-heavy project less well than QtCreator says nothing about them other than that they can afford to ignore Qt. Thanks for the link to verdigris. It's certainly less offensive than Moc, but if you're forced to use Qt you may as well use Moc.
- jcelerier 9y agoyou seem to think that QtCreator has special cases for Qt code. AFAIK the only specificity is that some icons change on signals during autocompletion, but it works just fine for non-qt projects - it's used quite a bit for development on embedded platforms. the c++ code model is simply its of clang.
- antnisp 9y agoClion will choke on anything that touches boost.
- hoistbypetard 9y agoAnything is overstating it. I use boost pervasively, and Clion has no issue with most of how I use it. But it certainly does choke on some of it, especially the function and variant stuff. What are you seeing it choke on? I haven't played with QtCreator lately. Clion has, over the past couple years, become my favorite C++ IDE on Linux because it can consume my hand-written cross-platform CMakeLists.txt and give me a nice experience, and because the debugger is really good IMO.
- jhasse 9y agoVisual Studio Code + cquery is also very good! https://github.com/cquery-project/cquery https://github.com/cquery-project/cquery
- 0xFFC 9y agoI have to admit. I love QtCreator combination with Clang. Nothing even comes close. Visual Studio (despite the factor it is only available for Windows) has serious flow. It parses a big project with small change. That results of huge time waste. But VSCode and CQuery is the (only?) serious competitor. Particularly if you like more lightweight, terminal stuff. Last time I checked CQuery it was not robust. But I am so glad seeing it is becoming more mature.
- DerDangDerDang 9y agoPeople keep saying this about Qt Creator. I've used it as my main working IDE for about 3 years now and I strongly disagree. I find it's not even a very good piece of software, let alone the best IDE. - Find References on a function doesn't differentiate between overloads - no way to sort or filter warnings by type - Find results window doesn't horizontally scroll or wrap, it just truncates (on mac) - mouse hover over a column separator preparing to drag, and the separator pops away as a titlebar takes it's place - this is UX 101 - you don't move the thing you know the user is trying to click! - can't restrict Find to a sub-project, top level project or nothing.
- DerDangDerDang 9y agoTo balance my above comment a little: QtCreator is great for free, and it’s existence is a huge boon to the community.
- geezerjay 9y agoI would also add the following pet peeves: - Qt Creator doesn't do a good job detecting when a build scripts should be refreshed even when a project is built, which causes compilation/linking problems. - Qt creator doesn't support setting a centralized widget stylesheet to define and update the stylesheet properties of any widget. - it only supports profiling in linux (valgrind) - its refactoring features are relaticely limited - support for static analysis via clang feels like a rush job
- pjmlp 9y agoI still think C++ Builder and VC++ are quite up to it, specially in the debugging area, edit-and-continue, incremental building and linking.