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

Apply Q_DISABLE_COPY_MOVE macro in some widgets #2814

Open
wants to merge 4 commits into
base: dev
Choose a base branch
from

Conversation

Petross404
Copy link
Contributor

Your checklist for this pull request

Detailed description

This PR applies the Q_DISABLE_COPY_MOVE macro in order to delete the copy and move constructors of some widgets.

Test plan (required)

No visual or other changes. Just compile and use Cutter normally.

@XVilka
Copy link
Member

XVilka commented Oct 21, 2021

In file included from /home/runner/work/cutter/cutter/src/widgets/ColorThemeComboBox.cpp:1:0:
/home/runner/work/cutter/cutter/src/widgets/ColorThemeComboBox.h:12:43: error: ISO C++ forbids declaration of ‘Q_DISABLE_COPY_MOVE’ with no type [-fpermissive]
     Q_DISABLE_COPY_MOVE(ColorThemeComboBox)
                                           ^
/home/runner/work/cutter/cutter/src/widgets/ColorThemeComboBox.h:12:43: error: expected ‘;’ at end of member declaration
[141/182] Building CXX object src/CMakeFiles/Cutter.dir/common/ColorThemeWorker.cpp.o

@Petross404
Copy link
Contributor Author

I am out of ideas. Ok, abstract classes can't make use of this macro but what about the rest?

Is it because the destructors aren't default?

 In file included from /home/runner/work/cutter/cutter/build/src/Cutter_autogen/include/ui_ColorThemeEditDialog.h:26:0,
                 from /home/runner/work/cutter/cutter/src/dialogs/preferences/ColorThemeEditDialog.cpp:2:
/home/runner/work/cutter/cutter/src/widgets/ColorThemeListView.h:23:43: error: ISO C++ forbids declaration of ‘Q_DISABLE_COPY_MOVE’ with no type [-fpermissive]
     Q_DISABLE_COPY_MOVE(ColorThemeListView)

@xarkes
Copy link
Member

xarkes commented Nov 6, 2021

I guess, but that's not a problem, is it? Simply don't apply the macro there?

@Petross404
Copy link
Contributor Author

I guess, but that's not a problem, is it? Simply don't apply the macro there?

I will look into this in the following days. Thanks

@thestr4ng3r thestr4ng3r changed the base branch from master to dev December 21, 2021 12:42
@XVilka XVilka requested a review from karliss November 2, 2022 05:45
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.

None yet

3 participants