Am Freitag, den 12.01.2018, 11:49 +0100 schrieb Jean-Marc Lasgouttes: > This breaks compilation here with Qt4 (Qt5 is OK). I am not sure what > we > are supposed to do, but the original code was supposed to be portable > to > Qt5.
I see. We need to do something, however, the old code does not work anymore. An easy solution is to re-insert the old code for QT4 and condition the new one for Qt5. > Also, I would appreciate an explanation for the following line, > which > feels strange to me: > > +++ b/src/frontends/qt4/GuiWorkArea.cpp > @@ -276,6 +276,7 @@ GuiWorkArea::GuiWorkArea(QWidget * /* w */) > GuiWorkArea::GuiWorkArea(Buffer & buffer, GuiView & gv) > : d(new Private(this)) > { > + new CompressorProxy(this); // not a leak I hope Guillaume will jump in. Jürgen > > > JMarc > > In file included from > ../../../../master/src/frontends/qt4/GuiWorkArea.cpp:14:0: > ../../../../master/src/frontends/qt4/GuiWorkArea.h: In constructor > ‘lyx::frontend::CompressorProxy::CompressorProxy(lyx::frontend::GuiWo > rkArea*)’: > ../../../../master/src/frontends/qt4/GuiWorkArea.h:102:7: error: > ‘void > lyx::frontend::GuiWorkArea::compressKeySym(lyx::KeySymbol, > lyx::KeyModifier, bool)’ is protected > void compressKeySym(KeySymbol sym, KeyModifier mod, bool > isAutoRepeat); > ^ > ../../../../master/src/frontends/qt4/GuiWorkArea.cpp:1042:28: error: > within this context > connect(wa, &GuiWorkArea::compressKeySym, this, > &CompressorProxy::slot, > ^ > ../../../../master/src/frontends/qt4/GuiWorkArea.cpp:1043:30: error: > no > matching function for call to > ‘lyx::frontend::CompressorProxy::connect(lyx::frontend::GuiWorkArea*& > , > void (lyx::frontend::GuiWorkArea::*)(lyx::KeySymbol, > lyx::KeyModifier, > bool), lyx::frontend::CompressorProxy*, void > (lyx::frontend::CompressorProxy::*)(lyx::KeySymbol, > lyx::KeyModifier, > bool), Qt::ConnectionType)’ > Qt::QueuedConnection); > ^ > In file included from /usr/include/qt4/QtCore/qiodevice.h:46:0, > from /usr/include/qt4/QtCore/qdatastream.h:46, > from /usr/include/qt4/QtCore/qmetatype.h:49, > from /usr/include/qt4/QtCore/qvariant.h:48, > from /usr/include/qt4/QtCore/QVariant:1, > from ./ui_WorkAreaUi.h:12, > from > ../../../../master/src/frontends/qt4/GuiWorkArea.h:16, > from > ../../../../master/src/frontends/qt4/GuiWorkArea.cpp:14: > /usr/include/qt4/QtCore/qobject.h:204:17: note: candidate: static > bool > QObject::connect(const QObject*, const char*, const QObject*, const > char*, Qt::ConnectionType) > static bool connect(const QObject *sender, const char *signal, > ^ > /usr/include/qt4/QtCore/qobject.h:204:17: note: no known > conversion > for argument 2 from ‘void > (lyx::frontend::GuiWorkArea::*)(lyx::KeySymbol, lyx::KeyModifier, > bool)’ > to ‘const char*’ > /usr/include/qt4/QtCore/qobject.h:217:17: note: candidate: static > bool > QObject::connect(const QObject*, const QMetaMethod&, const QObject*, > const QMetaMethod&, Qt::ConnectionType) > static bool connect(const QObject *sender, const QMetaMethod > &signal, > ^ > /usr/include/qt4/QtCore/qobject.h:217:17: note: no known > conversion > for argument 2 from ‘void > (lyx::frontend::GuiWorkArea::*)(lyx::KeySymbol, lyx::KeyModifier, > bool)’ > to ‘const QMetaMethod&’ > /usr/include/qt4/QtCore/qobject.h:337:13: note: candidate: bool > QObject::connect(const QObject*, const char*, const char*, > Qt::ConnectionType) const > inline bool QObject::connect(const QObject *asender, const char > *asignal, > ^ > /usr/include/qt4/QtCore/qobject.h:337:13: note: candidate expects > 4 > arguments, 5 provided > ../../../../master/src/frontends/qt4/GuiWorkArea.cpp:1044:73: error: > no > matching function for call to > ‘lyx::frontend::CompressorProxy::connect(lyx::frontend::CompressorPro > xy*, > void (lyx::frontend::CompressorProxy::*)(lyx::KeySymbol, > lyx::KeyModifier), lyx::frontend::GuiWorkArea*&, void > (lyx::frontend::GuiWorkArea::*)(const lyx::KeySymbol&, > lyx::KeyModifier))’ > connect(this, &CompressorProxy::signal, wa, > &GuiWorkArea::processKeySym); > > ^ > In file included from /usr/include/qt4/QtCore/qiodevice.h:46:0, > from /usr/include/qt4/QtCore/qdatastream.h:46, > from /usr/include/qt4/QtCore/qmetatype.h:49, > from /usr/include/qt4/QtCore/qvariant.h:48, > from /usr/include/qt4/QtCore/QVariant:1, > from ./ui_WorkAreaUi.h:12, > from > ../../../../master/src/frontends/qt4/GuiWorkArea.h:16, > from > ../../../../master/src/frontends/qt4/GuiWorkArea.cpp:14: > /usr/include/qt4/QtCore/qobject.h:204:17: note: candidate: static > bool > QObject::connect(const QObject*, const char*, const QObject*, const > char*, Qt::ConnectionType) > static bool connect(const QObject *sender, const char *signal, > ^ > /usr/include/qt4/QtCore/qobject.h:204:17: note: no known > conversion > for argument 2 from ‘void > (lyx::frontend::CompressorProxy::*)(lyx::KeySymbol, > lyx::KeyModifier)’ > to ‘const char*’ > /usr/include/qt4/QtCore/qobject.h:217:17: note: candidate: static > bool > QObject::connect(const QObject*, const QMetaMethod&, const QObject*, > const QMetaMethod&, Qt::ConnectionType) > static bool connect(const QObject *sender, const QMetaMethod > &signal, > ^ > /usr/include/qt4/QtCore/qobject.h:217:17: note: no known > conversion > for argument 2 from ‘void > (lyx::frontend::CompressorProxy::*)(lyx::KeySymbol, > lyx::KeyModifier)’ > to ‘const QMetaMethod&’ > /usr/include/qt4/QtCore/qobject.h:337:13: note: candidate: bool > QObject::connect(const QObject*, const char*, const char*, > Qt::ConnectionType) const > inline bool QObject::connect(const QObject *asender, const char > *asignal, > ^ > /usr/include/qt4/QtCore/qobject.h:337:13: note: no known > conversion > for argument 2 from ‘void > (lyx::frontend::CompressorProxy::*)(lyx::KeySymbol, > lyx::KeyModifier)’ > to ‘const char*’ >
signature.asc
Description: This is a digitally signed message part