[Interest] Notes on porting exercise to Qt 5

Jaco Naude naude.jaco at gmail.com
Fri Jan 11 07:31:08 CET 2013


Hi

Some notes of my experience porting to the final release of Qt 5. I already
ported to the beta a while back, but the following are new issues
experienced with the final release. Maybe someone else also finds it useful.

1) QString::toAscii() depreciated.

The Qt5 documentation says that QString::toAscii() is depreciated, and
indeed calls to this functions against Qt 5 gives errors. However this is
not listed on http://qt-project.org/doc/qt-5.0/qtdoc/sourcebreaks.html.

2) The documentation for
QDesktopServices<http://qt-project.org/doc/qt-5.0/qtgui/qdesktopservices.html>
still
contains documentation for the StandardLocation enum which was moved to
QStandardPaths in Qt5.

3) QAbstractItemModel::setSupportedDragActions() depreciated.

Also, this is not mentioned on the
http://qt-project.org/doc/qt-5.0/qtdoc/sourcebreaks.html page.

Where it was previously possible to do the following,
QFileSystemModel model
model.setSupportedDragActions(Qt::CopyAction)

It seems like you now need to reimplement
roleNames<http://qt-project.org/doc/qt-5.0/qtcore/qabstractitemmodel.html#roleNames>()
instead.

4) Webkit Widgets:

Qt += webkit in .pro files should be replaced by
Qt += webkitwidgets

Also,
#include <QtWebKit> must be replaced by #include <QtWebKitWidgets>

This is still wrong in the documentation here:
http://qt-project.org/doc/qt-5.0/qtwebkit/qtwebkitwidgets-index.html

Regards,
Jaco Naude'

Qtilities: Building blocks for Qt applications.
http://www.qtilities.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20130111/8fe4b558/attachment.html>


More information about the Interest mailing list