Qt 4.8 is becoming antiquated. Porting to Qt 5 will ease some issues regarding compilation, by having more current tools and packages to work with. There are of course many other benefits but it is pointless listing them.
I have already begun, but there currently a few issues. I disabled a few non-essential elements temporarily. These are due to some methods and classes going obsolete.
Issues
See:
Breaking Changes
QFSFileEngine, QAbstractFileEngine, QAbstractFileEngineIterator, and QAbstractFileEngineHandler are no longer public.
This is the basis of the FSEngine code, and the way of opening resources (BSAs). Some alternative needs to be found.
Update: I believe we are going to decide to take this out for the time being. It didn't appear fully implemented to begin with, and as far as I could tell only allowed you to treat uncompressed BSAs as if they were a directory, therefore accessing textures for the models without needing the loose files.
Trivial
QSystemLocale is not public anymore. RESOLVED
This is a non-issue. NifSystemLocale
extends this class, but as far as I can tell it's never actually used. If it were to be used QLocale
is an option.
toAscii() and fromAscii() Methods are deprecated RESOLVED
Simple enough. Just replace with toLatin1()
/ fromLatin1()
.
QIcon() constructor changes RESOLVED
You can no longer give QIcon() a raw string. You must wrap it with a QPixMap() constructor.
Affected Methods/Files:
- spells/headerstring.cpp@L73
- spells/light.cpp@L61
- spells/material.cpp@L101
- spells/stringpalette.cpp@L78
- spells/texture.cpp@L157
- spells/transform.cpp@L277
- widgets/colorwheel.cpp@L118
QWidget::setShown() is no longer forwarded to ::setVisible() RESOLVED
QWidget::setShown() is part of an ancient Qt3Support API which no longer exists as of Qt5.
Affected Files:
QObject::trUtf8 and QCoreApplication::Encoding enums are deprecated. RESOLVED
There is one location in the code where this applies, and the solution is simply removing that parameter as it's now that way be default. So a non-issue. I can't even find where I made this change in the code... ๐ญ I know that it was an issue during compile, but I've scoured through every change in my commits and I can't seem to find it.
These above issues are all forward-compatible changes. They could be fixed in the Qt 4 branch.
Miscellaneous
There are a few other odd errors I need to look into. I will comment on these below.
Tracking
Refactor Progress #32