cutter
cutter copied to clipboard
Apply Q_DISABLE_COPY_MOVE macro in some widgets
Your checklist for this pull request
- [x] I've read the guidelines for contributing to this repository
- [x] I made sure to follow the project's coding style
- [ ] I've updated the documentation with the relevant information (if needed)
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.
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
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)
I guess, but that's not a problem, is it? Simply don't apply the macro there?
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