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

avoid readability-redundant-access-specifiers warnings with Qt slots #60055

Open
firewave opened this issue Jan 15, 2023 · 1 comment
Open

avoid readability-redundant-access-specifiers warnings with Qt slots #60055

firewave opened this issue Jan 15, 2023 · 1 comment
Labels
clang-tidy enhancement Improving things as opposed to bug fixing, e.g. new or missing feature

Comments

@firewave
Copy link

Qt declares slot methods by using the <access-specifier> slots: syntax in the class declaration. This causes readability-redundant-access-specifiers warnings for code like this (see also https://doc.qt.io/qt-6/signalsandslots.html#a-small-example):

class MainWindow : public QMainWindow {
    Q_OBJECT

public:
    explicit MainWindow(QWidget *parent = nullptr);

public slots:
    void loadFile();
};

I am not sure if this can be handled in the check but given the widespread usage of Qt I felt it was worth reporting.

@firewave firewave changed the title readability-redundant-access-specifiers with Qt slots avoid readability-redundant-access-specifiers warnings with Qt slots Jan 15, 2023
@EugeneZelenko EugeneZelenko added enhancement Improving things as opposed to bug fixing, e.g. new or missing feature clang-tidy and removed new issue labels Jan 16, 2023
@llvmbot
Copy link
Member

llvmbot commented Jan 16, 2023

@llvm/issue-subscribers-clang-tidy

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
clang-tidy enhancement Improving things as opposed to bug fixing, e.g. new or missing feature
Projects
None yet
Development

No branches or pull requests

3 participants