Qt 5

From LeechCraft
Jump to: navigation, search


Make sure you have Qt 5 installed, and the libraries required by the plugins you want to build are built in Qt5 mode (there are either libraries suffixed -qt5 or the unsuffixed versions are built with Qt5). For now, the more or less complete list of such libs is:

  • Qwt (for core and a bunch of other plugins).
  • QXmpp (for Azoth Xoox).
  • Poppler (for Monocle PDF).
  • KQOauth (for Azoth WoodPecker and some Blasq subplugins).
  • QTermWidget (for Eleeminator).
  • liblastfm (for LastFMScrobble).
  • Qross (for Qrosp and scripting support).

Please note that if there are no -qt5 suffixed libraries unsuffixed versions are used, and no check is done if they are built with Qt5 or Qt4. Such builds will likely crash on startup or soon after that.

A good way to check if everything is built with Qt5 is to search for non-Qt5 libraries in the link list by issuing ldd /usr/local/lib/leechcraft/plugins/*.so | grep Qt | grep -v Qt5. If everything is built with Qt5, no library names should be returned.


Run the following commands:

cd path/to/leechcraft
mkdir -p build/qt5
cd build/qt5
cmake -DUSE_QT5=True ../../src

This will build a more or less standard set of LeechCraft plugins. Altenatively, all of them can be configured to be disabled by default by using the following cmake invocation instead of the above:

cmake -DWITH_PLUGINS=False -DUSE_QT5=True ../../src

Then, individual plugins can be enabled via ccmake or by editing CMakeLists.txt manually.

On Gentoo, the cmake command may look like this:



make install

Running sudo ldconfig can be required first time after installing LeechCraft.

Porting notes

The following is broken



Window snapshotting in desktop switcher quark is broken. There is no easy way to convert X11 pixmap to QPixmap, like there was a QPixmap::fromX11Pixmap in Qt4.


Icons embeddeding and/or updating may be broken. XDamage events need to be checked to be handled correctly.


Won't be ported to Qt5 until a working ebuild for qscintilla will be available supporting Qt5. I'm too lazy to port it.