Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Qt6 ready dev-qt/qt-creator-9999 #252

Closed
wants to merge 27 commits into from

Conversation

Peter-Levine
Copy link

@Peter-Levine Peter-Levine commented Apr 17, 2022

  • dev-qt/qttranslations: SLOT=6 initial commit

  • dev-qt/qt-creator: bump 9999
    Switched from the qmake to cmake buildsystem. Added support for the
    Coco code coverage tool. The 'git' USE flag now also builds the gitlab
    plugin. The 'wayland' flag was added to enforce built-with-use
    dependency. 'imageviewer' flag is added for conditional dependence on
    dev-qt/qtsvg. clangd functionality now depends on >=clang-14.*.

Closes: #252
Signed-off-by: Peter Levine plevine457@gmail.com

@thesamesam thesamesam requested a review from Pesa April 18, 2022 14:47
@Peter-Levine Peter-Levine changed the title Support QtCreator 7 Add dev-qt/qt-creator-7.0.0 et al. Apr 20, 2022
Peter-Levine added a commit to Peter-Levine/qt that referenced this pull request Apr 20, 2022
Refactored using cmake build system and added QT6 support.

Closes: gentoo#252
Package-Manager: Portage-3.0.30, Repoman-3.0.3
Signed-off-by: Peter Levine <plevine457@gmail.com>
Peter-Levine added a commit to Peter-Levine/qt that referenced this pull request Apr 20, 2022
Refactored using cmake build system and added QT6 support.

Closes: gentoo#252
Package-Manager: Portage-3.0.30, Repoman-3.0.3
Signed-off-by: Peter Levine <plevine457@gmail.com>
Peter-Levine added a commit to Peter-Levine/qt that referenced this pull request Apr 20, 2022
Refactored using cmake build system and added QT6 support.

Closes: gentoo#252
Package-Manager: Portage-3.0.30, Repoman-3.0.3
Signed-off-by: Peter Levine <plevine457@gmail.com>
Peter-Levine added a commit to Peter-Levine/qt that referenced this pull request Apr 22, 2022
Refactored using cmake build system and added QT6 support.

Closes: gentoo#252
Package-Manager: Portage-3.0.30, Repoman-3.0.3
Signed-off-by: Peter Levine <plevine457@gmail.com>
Peter-Levine added a commit to Peter-Levine/qt that referenced this pull request Apr 22, 2022
Refactored using cmake build system and added QT6 support.

Closes: gentoo#252
Package-Manager: Portage-3.0.30, Repoman-3.0.3
Signed-off-by: Peter Levine <plevine457@gmail.com>
Peter-Levine added a commit to Peter-Levine/qt that referenced this pull request Apr 23, 2022
Refactored using cmake build system and added QT6 support.

Closes: gentoo#252
Package-Manager: Portage-3.0.30, Repoman-3.0.3
Signed-off-by: Peter Levine <plevine457@gmail.com>
Peter-Levine added a commit to Peter-Levine/qt that referenced this pull request May 2, 2022
Refactored using cmake build system and added QT6 support.

Closes: gentoo#252
Package-Manager: Portage-3.0.30, Repoman-3.0.3
Signed-off-by: Peter Levine <plevine457@gmail.com>
Peter-Levine added a commit to Peter-Levine/qt that referenced this pull request May 2, 2022
Refactored using cmake build system and added QT6 support.

Closes: gentoo#252
Package-Manager: Portage-3.0.30, Repoman-3.0.3
Signed-off-by: Peter Levine <plevine457@gmail.com>
@Peter-Levine Peter-Levine changed the title Add dev-qt/qt-creator-7.0.0 et al. Add dev-qt/qt-creator-7.0.1 et al. May 2, 2022
Peter-Levine added a commit to Peter-Levine/qt that referenced this pull request May 24, 2022
Refactored using cmake build system and added QT6 support.

Closes: gentoo#252
Package-Manager: Portage-3.0.30, Repoman-3.0.3
Signed-off-by: Peter Levine <plevine457@gmail.com>
@Peter-Levine Peter-Levine changed the title Add dev-qt/qt-creator-7.0.1 et al. Add dev-qt/qt-creator-7.0.2 et al. May 24, 2022
@AdelKS
Copy link

AdelKS commented Jun 6, 2022

Hello!

Thanks for this work ! It compiles fine and well. I unmasked the Qt 6 packages so it pulled them off as a dependency, I suppose that's on purpose.

Something that is more important to me, did you find a way to enable static analysis of C++ 20 code ? Including for example string_view through #include <string_view> makes the code analysis complain. Probably because it's limited to C++17. I also got this message, complains about stddef.h not existing when including vector.

Clang Code Model: Error: The clangbackend executable "/usr/libexec/qtcreator/clangbackend" does not exist.

In Qt creator 6.0 it works with a simple CONFIG += console c++2a in the .pro file.

@AdelKS
Copy link

AdelKS commented Jun 6, 2022

Okay the ClangCodeModel doesn't work even without trying to enable C++ 20, it gives errors with this

test-cpp.pro

TEMPLATE = app
CONFIG += console
CONFIG -= app_bundle
CONFIG -= qt

SOURCES += \
        main.cpp

main.cpp

#include <iostream>

using namespace std;
int main()
{
    cout << "Hello world!" << endl;
    return 0;
}

it shows these error messages:

main.cpp:1:10: In included file: 'stddef.h' file not found
wchar.h:35:10: error occurred here
main.cpp:6:10: Invalid operands to binary expression ('std::ostream' (aka 'int') and 'const char[13]')

image

@AdelKS
Copy link

AdelKS commented Jun 6, 2022

I checked in vscodium with clangd and it does not issue the same error messages. So the issues is most likely not with clangd, but maybe with how it's getting configured by Qt Creator.

@Peter-Levine
Copy link
Author

@AdelKS It looks like I might have overlooked the necessity of certain tools by placing all of them behind a default-disabled tools USE flag. clandbackend should be governed by the clang USE flag, among other issues. Please rebuild with tools enabled and confirm whether you can still observe the issue.

@AdelKS
Copy link

AdelKS commented Jun 7, 2022

Hello, enabling the tools use flag did not solve the issue. However, putting this in ~/.config/clangd

CompileFlags:
  # Treat code as C++, use C++20 standard, enable more warnings.
  Add: [-xc++, -std=c++20, -Wall, -I/usr/lib/clang/14.0.4/include]

especially the -I/usr/lib/clang/14.0.4/include, solves it. Maybe the build can fix this, because it used to work in Qt Creator 6.0 without user intervention.

@Peter-Levine
Copy link
Author

Peter-Levine commented Jun 8, 2022

Can you confirm in Tools -> Options -> C++ -> Clangd that Path to executable is /usr/lib/llvm/14/bin/clangd and Insert header files on completion is checked?

@Peter-Levine
Copy link
Author

I have run into this: QTCREATORBUG-27623: clangd says it can't find stddef.h.

@AdelKS
Copy link

AdelKS commented Jun 8, 2022

Can you confirm in Tools -> Options -> C++ -> Clangd that Path to executable is /usr/lib/llvm/14/bin/clangd and Insert header files on completion is checked?

Yeah, it does not fix it by doing that alone. It looks like I really need to do the workaround I shown above by setting a file in the .config folder.

Upstream now builds against QT6 only.

Signed-off-by: Peter Levine <plevine457@gmail.com>
Though not officially supported upstream, it's tested and working with
clang-15. Also, make sure a build disabling clang doesn't build
clang-related plugings that try searching for or linking to clang.

Signed-off-by: Peter Levine <plevine457@gmail.com>
Signed-off-by: Peter Levine <plevine457@gmail.com>
Too many extra lines to be unneccesarily explicit.

Signed-off-by: Peter Levine <plevine457@gmail.com>
Add commented WITH_QMLDOM and USE_PROJECTSTORAGE cmake symbols for
future testing.  Both are related to QT Design Studio and can also be
enabled by passing to the build-time environment QDS_WITH_QMLDOM=YES
and QDS_USE_PROJECTSTORAGE=YES, respectively.

Signed-off-by: Peter Levine <plevine457@gmail.com>
Signed-off-by: Peter Levine <plevine457@gmail.com>
Signed-off-by: Peter Levine <plevine457@gmail.com>
Signed-off-by: Peter Levine <plevine457@gmail.com>
The file no longer exists since the logic is no longer needed.

Signed-off-by: Peter Levine <plevine457@gmail.com>
LLVM/Clang-16 is now the default bundled version.

Signed-off-by: Peter Levine <plevine457@gmail.com>
Fixes: 3ffa571
Signed-off-by: Peter Levine <plevine457@gmail.com>
Signed-off-by: Peter Levine <plevine457@gmail.com>
Signed-off-by: Peter Levine <plevine457@gmail.com>
Signed-off-by: Peter Levine <plevine457@gmail.com>
Relies on bundled libptyqt and libvterm. dev-libs/libvterm exists in
portage but doesn't provide some necessary headers.

Signed-off-by: Peter Levine <plevine457@gmail.com>
Adds support for GitHub Copilot AI code-completion engine.

Signed-off-by: Peter Levine <plevine457@gmail.com>
Signed-off-by: Peter Levine <plevine457@gmail.com>
Support for QT's own Qt Safe Renderer to aid building safety-critical
components.

Signed-off-by: Peter Levine <plevine457@gmail.com>
Signed-off-by: Peter Levine <plevine457@gmail.com>
Signed-off-by: Peter Levine <plevine457@gmail.com>
Signed-off-by: Peter Levine <plevine457@gmail.com>
Signed-off-by: Peter Levine <plevine457@gmail.com>
Signed-off-by: Peter Levine <plevine457@gmail.com>
Signed-off-by: Peter Levine <plevine457@gmail.com>
Signed-off-by: Peter Levine <plevine457@gmail.com>
@Peter-Levine
Copy link
Author

Try with 11.0.2.

As per changes from bug# 899546, "egl" is now implied by the "opengl"
USE flag.

Signed-off-by: Peter Levine <plevine457@gmail.com>
@Peter-Levine
Copy link
Author

Given that the latest qt-creator ebuild was pushed without plugin-enabling USE flags, it seems that the previous resistance to such an approach (eg., gentoo/gentoo#26675 (comment)) has been reversed.

Closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants