bitsed / qosmic

A flam3 fractal image editor
GNU General Public License v3.0
64 stars 13 forks source link

Fix class QButtonGroup include errors with Qt 5.11 #35

Closed T-X closed 5 years ago

T-X commented 5 years ago

This patch fixes the following error:


src/paletteeditor.cpp: In constructor ‘PaletteEditor::PaletteEditor(QWidget*)’:
src/paletteeditor.cpp:44:47: error: invalid use of incomplete type ‘class QButtonGroup’
  m_gradientSpreadGroup = new QButtonGroup(this);
                                               ^
In file included from /usr/include/x86_64-linux-gnu/qt5/QtWidgets/qradiobutton.h:44,
                 from /usr/include/x86_64-linux-gnu/qt5/QtWidgets/QRadioButton:1,
                 from .ui/ui_paletteeditor.h:22,
                 from src/paletteeditor.h:29,
                 from src/paletteeditor.cpp:24:
/usr/include/x86_64-linux-gnu/qt5/QtWidgets/qabstractbutton.h:53:7: note: forward declaration of ‘class QButtonGroup’
 class QButtonGroup;
       ^~~~~~~~~~~~
[...]

It seems that with Qt5 in version 5.11 does not implicitly pull the QButtonGroup definition through some other include. Therefore we need to explicitly include it.

bitsed commented 5 years ago

Thank you for the patch. I've merged it to the master branch.