Patch review
Pavel Sanda
sanda at lyx.org
Wed Sep 29 07:32:14 UTC 2021
On Tue, Sep 28, 2021 at 09:38:39PM +0300, Yuriy Skalko wrote:
> Hi all,
>
> I've recently compiled LyX with latest version of GCC and used several
> useful diagnostic options. Two simpler patches are already committed, but
> the third one is bigger and worth additional checkup -- it is in attachment.
Older gcc will have problem:
make[6]: Entering directory '/root/lyx/src/frontends/qt'
CXX ColorCache.o
CXX GuiBibtex.o
GuiBibtex.cpp: In member function 'void lyx::frontend::GuiBibtex::setFileEncodings(const std::__debug::vector<std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> > >&)':
GuiBibtex.cpp:529:44: error: conversion from 'int' to 'Qt::MatchFlags {aka QFlags<Qt::MatchFlag>}' is ambiguous
Qt::MatchExactly | Qt::MatchWrap);
^
GuiBibtex.cpp:529:44: note: candidates are:
In file included from /usr/include/qt4/QtCore/qchar.h:45:0,
from /usr/include/qt4/QtCore/qstring.h:45,
from /usr/include/qt4/QtCore/QString:1,
from Dialog.h:21,
from GuiDialog.h:15,
from GuiBibtex.h:16,
from GuiBibtex.cpp:16:
/usr/include/qt4/QtCore/qglobal.h:2436:29: note: constexpr QFlags<Enum>::QFlags(QFlags<Enum>::Zero) [with Enum = Qt::MatchFlag; QFlags<Enum>::Zero = void**] <near match>
Q_DECL_CONSTEXPR inline QFlags(Zero = 0) : i(0) {}
^
/usr/include/qt4/QtCore/qglobal.h:2436:29: note: no known conversion for argument 1 from 'int' to 'QFlags<Qt::MatchFlag>::Zero {aka void**}'
/usr/include/qt4/QtCore/qglobal.h:2435:29: note: constexpr QFlags<Enum>::QFlags(Enum) [with Enum = Qt::MatchFlag] <near match>
Q_DECL_CONSTEXPR inline QFlags(Enum f) : i(f) {}
^
/usr/include/qt4/QtCore/qglobal.h:2435:29: note: no known conversion for argument 1 from 'int' to 'Qt::MatchFlag'
In file included from /usr/include/qt4/QtGui/qstyleoption.h:56:0,
from /usr/include/qt4/QtGui/qabstractitemdelegate.h:46,
from /usr/include/qt4/QtGui/qcombobox.h:46,
from /usr/include/qt4/QtGui/QComboBox:1,
from ui_BibtexUi.h:17,
from GuiBibtex.h:19,
from GuiBibtex.cpp:16:
/usr/include/qt4/QtCore/qabstractitemmodel.h:218:29: note: initializing argument 5 of 'virtual QModelIndexList QAbstractItemModel::match(const QModelIndex&, int, const QVariant&, int, Qt::MatchFlags) const'
virtual QModelIndexList match(const QModelIndex &start, int role,
^
At global scope:
cc1plus: warning: unrecognized command line option "-Wno-deprecated-copy"
Makefile:938: recipe for target 'GuiBibtex.o' failed
make[6]: *** [GuiBibtex.o] Error 1
Pavel
More information about the lyx-devel
mailing list