yegord / snowman

Snowman decompiler

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Qt Wdeprecated-declarations warnings

Jeinzi opened this issue · comments

There are currently 161 deprecation warnings related to Qt when building snowman:

Warning Introduced in
'QTextStream& QTextStreamFunctions::endl(QTextStream&)' is deprecated: Use Qt::endl 5.14
'QTextStream& QTextStreamFunctions::hex(QTextStream&)' is deprecated: Use Qt::hex 5.14
'QTextStream& QTextStreamFunctions::dec(QTextStream&)' is deprecated: Use Qt::dec 5.14
'Qt::Orientation QWheelEvent::orientation() const' is deprecated: Use angleDelta() 5.0
'int QWheelEvent::delta() const' is deprecated: Use angleDelta() 5.0
'void qSort(RandomAccessIterator, RandomAccessIterator, LessThan) [with RandomAccessIterator = QList::iterator; LessThan = nc::gui::TreeView::copy()::<lambda(const QModelIndex&, const QModelIndex&)>]' is deprecated: Use std::sort 5.2

I'd be happy to fix them, but I'd like to have some feedback beforehand.

  • Is it possible to bump the required Qt version and if so, to what version - or is it important to preserve backwards compatibility?
  • Regarding Qt::endl: As this is the source of most of the warnings, I think it would be best to define a macro (in nc/config.h.in?) that switches to Qt::endl if the used version of Qt is at least 5.14

Sorry for the late reply. I was (and still am) fighting with something covid-like here (but not covid).

qSort is easy... Gone.

endl — should be replaced by printing '\n'. Flush is not needed. Do you want to make a commit that does that, and I'll cherry pick?

hex, dec — Ideally just find a synonym that works on all Qt versions. Again, a separate commit that I could cherry-pick would be great.

QWheelEvent — one probably needs an ifdef here. I am a bit reluctant to drop Qt4 due to IDA plugin.

Not a problem, hope you are well, regardless of what's up :)
I'll give it a try and create separate commits for the different deprecation warnings.

Fixed in #220