Trying to build PythonQt with g++ 4.8.3 using -std=c++11 results in build errors like:
generated_cpp/com_trolltech_qt_gui/com_trolltech_qt_gui1.h:378:7: error: deleted function ‘virtual PythonQtPublicPromoter_QClipboard::~PythonQtPublicPromoter_QClipboard()’
class PythonQtPublicPromoter_QClipboard : public QClipboard
/usr/include/QtGui/qclipboard.h:68:5: error: overriding non-deleted function ‘virtual QClipboard::~QClipboard()’
~QClipboard();
generated_cpp/com_trolltech_qt_gui/com_trolltech_qt_gui1.h:378:7: note: ‘virtual PythonQtPublicPromoter_QClipboard::~PythonQtPublicPromoter_QClipboard()’ is implicitly deleted because the default definition would be ill-formed:
class PythonQtPublicPromoter_QClipboard : public QClipboard
/usr/include/QtGui/qclipboard.h:68:5: error: ‘virtual QClipboard::~QClipboard()’ is private
~QClipboard();
It appears that this can be avoided by declaring the destructor and never implementing it. Can the generator be changed to do this automatically (or at least, change the committed generated code for the classes that trip over this, i.e. QClipboard and QWebFrame)?
Thanks,
--
Matthew
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The Generator should not generate that promoter, since the class has a private destructor. I thought I fixed this in the generator files...
Did you run the generator or did you use the pregenerated files and for which qt version? The problem is not C++11 related.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
(Great, I don't get any notification of replies? Grr... sorry for the delay...)
This is with the committed generated files. I'm just trying to build PythonQt without doing anything special.
It is "specific" to C++11; with the exact same code I don't get the error building with no '-std=' flag.
I'm not sure how suppressing it will work, since the event filter is then inaccessible (which is why it's being promoted in the first place). Anyway, I don't believe there's anything wrong with promoting it per se, its just that in C++11 mode it is required to explicitly declare a private dtor (which is never implemented). A better fix would be for the generator to declare the private dtor if the base class has a private dtor.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
No, I think the reason is that QClipboard should not be instanciated nor derived, because the only instance that makes sense is the one you get from QApplication.
Anyway, it is fixed in both the generated files and the generator now.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Trying to build PythonQt with g++ 4.8.3 using -std=c++11 results in build errors like:
generated_cpp/com_trolltech_qt_gui/com_trolltech_qt_gui1.h:378:7: error: deleted function ‘virtual PythonQtPublicPromoter_QClipboard::~PythonQtPublicPromoter_QClipboard()’
class PythonQtPublicPromoter_QClipboard : public QClipboard
/usr/include/QtGui/qclipboard.h:68:5: error: overriding non-deleted function ‘virtual QClipboard::~QClipboard()’
~QClipboard();
generated_cpp/com_trolltech_qt_gui/com_trolltech_qt_gui1.h:378:7: note: ‘virtual PythonQtPublicPromoter_QClipboard::~PythonQtPublicPromoter_QClipboard()’ is implicitly deleted because the default definition would be ill-formed:
class PythonQtPublicPromoter_QClipboard : public QClipboard
/usr/include/QtGui/qclipboard.h:68:5: error: ‘virtual QClipboard::~QClipboard()’ is private
~QClipboard();
It appears that this can be avoided by declaring the destructor and never implementing it. Can the generator be changed to do this automatically (or at least, change the committed generated code for the classes that trip over this, i.e. QClipboard and QWebFrame)?
Thanks,
--
Matthew
The Generator should not generate that promoter, since the class has a private destructor. I thought I fixed this in the generator files...
Did you run the generator or did you use the pregenerated files and for which qt version? The problem is not C++11 related.
(Great, I don't get any notification of replies? Grr... sorry for the delay...)
This is with the committed generated files. I'm just trying to build PythonQt without doing anything special.
It is "specific" to C++11; with the exact same code I don't get the error building with no '-std=' flag.
I'm not sure how suppressing it will work, since the event filter is then inaccessible (which is why it's being promoted in the first place). Anyway, I don't believe there's anything wrong with promoting it per se, its just that in C++11 mode it is required to explicitly declare a private dtor (which is never implemented). A better fix would be for the generator to declare the private dtor if the base class has a private dtor.
No, I think the reason is that QClipboard should not be instanciated nor derived, because the only instance that makes sense is the one you get from QApplication.
Anyway, it is fixed in both the generated files and the generator now.