summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
author Eric Hameleers <alien@slackware.com>2018-06-13 14:50:49 +0200
committer Eric Hameleers <alien@slackware.com>2018-06-13 14:50:49 +0200
commitc779e019ac53019baa07eb843aba59bc55ffec20 (patch)
treef4dd959f71cea6ac6a8741a1a8f9933a389f5bc7
parente0d005c66dbed44be15070995d9d9e9200c989fa (diff)
downloadktown-c779e019ac53019baa07eb843aba59bc55ffec20.tar.gz
ktown-c779e019ac53019baa07eb843aba59bc55ffec20.tar.xz
Updated 'testing' in preparation for June '18 release of Plasma 5.13
-rw-r--r--PKGLIST878
-rw-r--r--README.5_16.07235
-rw-r--r--deps/.qt5_updates3
-rwxr-xr-xdeps/ConsoleKit2/ConsoleKit2.SlackBuild152
-rw-r--r--deps/ConsoleKit2/doinst.sh27
-rw-r--r--deps/ConsoleKit2/rc.consolekit34
-rw-r--r--deps/ConsoleKit2/slack-desc (renamed from kde/slack-desc/polkit-qt-1)22
-rw-r--r--deps/OpenAL/.url3
-rwxr-xr-xdeps/OpenAL/OpenAL.SlackBuild75
-rw-r--r--deps/PyQt/.url1
-rwxr-xr-xdeps/PyQt/PyQt.SlackBuild119
-rw-r--r--deps/PyQt/PyQt.phonon.diff11
-rw-r--r--deps/PyQt/slack-desc19
-rw-r--r--deps/PyQt5/.url2
-rwxr-xr-xdeps/PyQt5/PyQt5.SlackBuild58
-rw-r--r--deps/QScintilla/.url1
-rwxr-xr-xdeps/QScintilla/QScintilla.SlackBuild203
-rw-r--r--deps/QScintilla/slack-desc19
-rw-r--r--deps/accountsservice/.url1
-rwxr-xr-xdeps/accountsservice/accountsservice.SlackBuild128
-rw-r--r--deps/accountsservice/slack-desc20
-rwxr-xr-xdeps/alldeps.SlackBuild23
-rw-r--r--deps/cfitsio/.url2
-rwxr-xr-xdeps/cfitsio/cfitsio.SlackBuild16
-rw-r--r--deps/cracklib/.url1
-rwxr-xr-xdeps/cracklib/cracklib.SlackBuild142
-rw-r--r--deps/cracklib/patches/cracklib-2.9.6-cve-2016-6318.patch108
-rw-r--r--deps/cracklib/slack-desc20
-rw-r--r--deps/cryfs/.url1
-rwxr-xr-xdeps/cryfs/cryfs.SlackBuild131
-rw-r--r--deps/cryfs/slack-desc19
-rw-r--r--deps/cryptopp/.url1
-rwxr-xr-xdeps/cryptopp/cryptopp.SlackBuild130
-rw-r--r--deps/cryptopp/cryptopp.pc15
-rw-r--r--deps/cryptopp/patches/cryptopp_slkcflags.patch11
-rw-r--r--deps/cryptopp/slack-desc19
-rw-r--r--deps/ddcutil/.url2
-rwxr-xr-xdeps/ddcutil/ddcutil.SlackBuild124
-rw-r--r--deps/ddcutil/slack-desc20
-rw-r--r--deps/dvdauthor/.url1
-rwxr-xr-xdeps/dvdauthor/dvdauthor.SlackBuild126
-rw-r--r--deps/dvdauthor/slack-desc19
-rwxr-xr-xdeps/elogind/elogind.SlackBuild5
-rw-r--r--deps/elogind/patches/elogind-219.12-runtime.patch46
-rwxr-xr-xdeps/extra-cmake-modules/extra-cmake-modules.SlackBuild4
-rw-r--r--deps/frei0r-plugins/.url1
-rwxr-xr-xdeps/frei0r-plugins/frei0r-plugins.SlackBuild121
-rw-r--r--deps/frei0r-plugins/slack-desc19
-rw-r--r--deps/gpgme/.url1
-rwxr-xr-xdeps/gpgme/gpgme.SlackBuild139
-rw-r--r--deps/gpgme/patches/gpgme-1.8.0_libsuffix.patch30
-rw-r--r--deps/gpgme/slack-desc19
-rwxr-xr-xdeps/grantlee/grantlee.SlackBuild9
-rw-r--r--deps/id3lib/.url2
-rwxr-xr-xdeps/id3lib/id3lib.SlackBuild143
-rw-r--r--deps/id3lib/patches/id3lib.c_wrapper.patch58
-rw-r--r--deps/id3lib/patches/id3lib.cppheaders.patch22
-rw-r--r--deps/id3lib/patches/id3lib.manpages.patch198
-rw-r--r--deps/id3lib/patches/id3lib.mkstemp.patch54
-rw-r--r--deps/id3lib/patches/id3lib.nullpointer_check.patch12
-rw-r--r--deps/id3lib/patches/id3lib.utf8_writing.patch38
-rw-r--r--deps/id3lib/patches/id3lib.vbr_stack_smash.patch19
-rw-r--r--deps/id3lib/slack-desc20
-rw-r--r--deps/json-glib/.url1
-rwxr-xr-xdeps/json-glib/json-glib.SlackBuild63
-rw-r--r--deps/lensfun/.url1
-rwxr-xr-xdeps/lensfun/lensfun.SlackBuild121
-rw-r--r--deps/lensfun/slack-desc19
-rwxr-xr-xdeps/libappindicator/libappindicator.SlackBuild2
-rw-r--r--deps/libburn/.url2
-rwxr-xr-xdeps/libburn/libburn.SlackBuild120
-rw-r--r--deps/libburn/slack-desc20
-rwxr-xr-xdeps/libdbusmenu-gtk/libdbusmenu-gtk.SlackBuild2
-rw-r--r--deps/libdbusmenu-qt5/.url1
-rwxr-xr-xdeps/libdbusmenu-qt5/libdbusmenu-qt5.SlackBuild22
-rw-r--r--deps/libdbusmenu-qt5/slack-desc2
-rw-r--r--deps/libdmtx/.url1
-rwxr-xr-xdeps/libdmtx/libdmtx.SlackBuild138
-rw-r--r--deps/libdmtx/slack-desc19
-rwxr-xr-xdeps/libindicator/libindicator.SlackBuild2
-rw-r--r--deps/libinput/.url2
-rwxr-xr-xdeps/libinput/libinput.SlackBuild8
-rw-r--r--deps/libpwquality/.url1
-rwxr-xr-xdeps/libpwquality/libpwquality.SlackBuild129
-rw-r--r--deps/libpwquality/slack-desc20
-rw-r--r--deps/libwacom/.url2
-rwxr-xr-xdeps/libwacom/libwacom.SlackBuild139
-rw-r--r--deps/libwacom/slack-desc19
-rw-r--r--deps/libxkbcommon/.url2
-rwxr-xr-xdeps/libxkbcommon/libxkbcommon.SlackBuild61
-rw-r--r--deps/lmdb/.url2
-rwxr-xr-xdeps/lmdb/lmdb.SlackBuild13
-rw-r--r--deps/mesa/doinst.sh13
-rwxr-xr-xdeps/mesa/mesa.SlackBuild74
-rw-r--r--deps/mesa/mesa.no.mako.diff.gzbin425 -> 0 bytes
-rw-r--r--deps/mlt/.url2
-rw-r--r--deps/mlt/doinst.sh8
-rwxr-xr-xdeps/mlt/mlt.SlackBuild138
-rw-r--r--deps/mlt/patches/mlt_glibc226.patch28
-rw-r--r--deps/mlt/patches/mlt_qt5.patch27
-rw-r--r--deps/mlt/patches/mlt_repository_close.patch25
-rw-r--r--deps/mlt/slack-desc20
-rw-r--r--deps/ninja/.url2
-rwxr-xr-xdeps/ninja/ninja.SlackBuild10
-rw-r--r--deps/opencv/.url2
-rwxr-xr-xdeps/opencv/opencv.SlackBuild123
-rw-r--r--deps/opencv/slack-desc19
-rwxr-xr-xdeps/phonon-gstreamer/phonon-gstreamer.SlackBuild2
-rw-r--r--deps/phonon-vlc/.url2
-rwxr-xr-xdeps/phonon-vlc/phonon-vlc.SlackBuild8
-rw-r--r--deps/phonon/.url2
-rwxr-xr-xdeps/phonon/phonon.SlackBuild17
-rw-r--r--deps/phonon/slack-desc6
-rwxr-xr-xdeps/polkit-qt5-1/polkit-qt5-1.SlackBuild9
-rw-r--r--deps/poppler/.url2
-rwxr-xr-xdeps/poppler/poppler.SlackBuild75
-rw-r--r--deps/poppler/poppler.remove.qt4.frontend.diff26533
-rw-r--r--deps/poppler/poppler.splashpath.h.revert.diff42
-rw-r--r--deps/qca-qt5/.url2
-rwxr-xr-xdeps/qca-qt5/qca-qt5.SlackBuild15
-rw-r--r--deps/qrencode/.url1
-rwxr-xr-xdeps/qrencode/qrencode.SlackBuild127
-rw-r--r--deps/qrencode/slack-desc19
-rwxr-xr-xdeps/qt-gstreamer/qt-gstreamer.SlackBuild9
-rw-r--r--deps/qt5-webkit/.url2
-rw-r--r--deps/qt5-webkit/patches/qt5-webkit.gcc7.patch34
-rw-r--r--deps/qt5-webkit/patches/qt5-webkit.icu59.patch80
-rwxr-xr-xdeps/qt5-webkit/qt5-webkit.SlackBuild31
-rw-r--r--deps/qt5/.url2
-rw-r--r--deps/qt5/patches/qt5.cr206850.patch43
-rw-r--r--deps/qt5/patches/qt5.glibc224.patch33
-rw-r--r--deps/qt5/patches/qt5.mysql.h.diff7
-rw-r--r--deps/qt5/patches/qt5.qtbug-49061.patch80
-rw-r--r--deps/qt5/patches/qt5.qtbug-51927.patch185
-rw-r--r--deps/qt5/patches/qt5.qtbug-55583.patch41
-rw-r--r--deps/qt5/patches/qt5.qtbug-60558.patch32
-rw-r--r--deps/qt5/patches/qt5.qtbug-61140.patch101
-rw-r--r--deps/qt5/patches/qt5.qtbug-66103.patch172
-rwxr-xr-xdeps/qt5/qt5.SlackBuild94
-rw-r--r--deps/qtav/.url1
-rw-r--r--deps/qtav/doinst.sh8
-rwxr-xr-xdeps/qtav/qtav.SlackBuild120
-rw-r--r--deps/qtav/slack-desc19
-rw-r--r--deps/sip/.url2
-rwxr-xr-xdeps/sip/sip.SlackBuild124
-rw-r--r--deps/sip/slack-desc19
-rwxr-xr-xdeps/sni-qt/sni-qt.SlackBuild10
-rw-r--r--deps/telepathy/farstream/.url (renamed from deps/telepathy/farstream/farstream.url)0
-rw-r--r--deps/telepathy/libaccounts-glib/.url1
-rwxr-xr-xdeps/telepathy/libaccounts-glib/libaccounts-glib.SlackBuild12
-rw-r--r--deps/telepathy/libaccounts-glib/libaccounts-glib.url1
-rw-r--r--deps/telepathy/libaccounts-qt5/.url2
-rwxr-xr-xdeps/telepathy/libaccounts-qt5/libaccounts-qt5.SlackBuild14
-rw-r--r--deps/telepathy/libaccounts-qt5/libaccounts-qt5.url2
-rw-r--r--deps/telepathy/libnice/.url1
-rwxr-xr-xdeps/telepathy/libnice/libnice.SlackBuild12
-rw-r--r--deps/telepathy/libnice/libnice.url1
-rw-r--r--deps/telepathy/libotr/.url (renamed from deps/telepathy/libotr/libotr.url)0
-rw-r--r--deps/telepathy/libsignon-glib/.url1
-rwxr-xr-xdeps/telepathy/libsignon-glib/libsignon-glib.SlackBuild10
-rw-r--r--deps/telepathy/libsignon-glib/libsignon-glib.url2
-rw-r--r--deps/telepathy/signon-plugin-oauth2/.url (renamed from deps/telepathy/signon-plugin-oauth2/signon-plugin-oauth2.url)2
-rwxr-xr-xdeps/telepathy/signon-plugin-oauth2/signon-plugin-oauth2.SlackBuild19
-rw-r--r--deps/telepathy/signon-ui/.url1
-rwxr-xr-xdeps/telepathy/signon-ui/signon-ui.SlackBuild19
-rw-r--r--deps/telepathy/signon-ui/signon-ui.url1
-rw-r--r--deps/telepathy/signon/.url1
-rwxr-xr-xdeps/telepathy/signon/signon.SlackBuild20
-rw-r--r--deps/telepathy/signon/signon.url1
-rw-r--r--deps/telepathy/telegram-qt/.url1
-rw-r--r--deps/telepathy/telegram-qt/doinst.sh3
-rw-r--r--deps/telepathy/telegram-qt/slack-desc19
-rwxr-xr-xdeps/telepathy/telegram-qt/telegram-qt.SlackBuild118
-rw-r--r--deps/telepathy/telepathy-accounts-signon/.url (renamed from deps/telepathy/telepathy-accounts-signon/telepathy-accounts-signon.url)0
-rwxr-xr-xdeps/telepathy/telepathy-accounts-signon/telepathy-accounts-signon.SlackBuild19
-rw-r--r--deps/telepathy/telepathy-farstream/.url (renamed from deps/telepathy/telepathy-farstream/telepathy-farstream.url)0
-rw-r--r--deps/telepathy/telepathy-gabble/.url (renamed from deps/telepathy/telepathy-gabble/telepathy-gabble.url)2
-rwxr-xr-xdeps/telepathy/telepathy-gabble/telepathy-gabble.SlackBuild21
-rw-r--r--deps/telepathy/telepathy-glib/.url (renamed from deps/telepathy/telepathy-glib/telepathy-glib.url)0
-rwxr-xr-xdeps/telepathy/telepathy-glib/telepathy-glib.SlackBuild19
-rw-r--r--deps/telepathy/telepathy-haze/.url (renamed from deps/telepathy/telepathy-haze/telepathy-haze.url)0
-rw-r--r--deps/telepathy/telepathy-logger-qt5/.url1
-rwxr-xr-xdeps/telepathy/telepathy-logger-qt5/telepathy-logger-qt5.SlackBuild12
-rw-r--r--deps/telepathy/telepathy-logger-qt5/telepathy-logger-qt5.url1
-rw-r--r--deps/telepathy/telepathy-logger/.url (renamed from deps/telepathy/telepathy-logger/telepathy-logger.url)0
-rwxr-xr-xdeps/telepathy/telepathy-logger/telepathy-logger.SlackBuild10
-rw-r--r--deps/telepathy/telepathy-mission-control/.url (renamed from deps/telepathy/telepathy-mission-control/telepathy-mission-control.url)2
-rwxr-xr-xdeps/telepathy/telepathy-mission-control/telepathy-mission-control.SlackBuild22
-rw-r--r--deps/telepathy/telepathy-morse/.url1
-rw-r--r--deps/telepathy/telepathy-morse/doinst.sh3
-rw-r--r--deps/telepathy/telepathy-morse/slack-desc19
-rwxr-xr-xdeps/telepathy/telepathy-morse/telepathy-morse.SlackBuild118
-rw-r--r--deps/telepathy/telepathy-qt5/.url (renamed from deps/telepathy/telepathy-qt5/telepathy-qt5.url)2
-rwxr-xr-xdeps/telepathy/telepathy-qt5/telepathy-qt5.SlackBuild20
-rwxr-xr-xdeps/telepathy/telepathy.SlackBuild2
-rwxr-xr-xdeps/updates.SlackBuild25
-rw-r--r--deps/vid.stab/.url1
-rw-r--r--deps/vid.stab/slack-desc20
-rwxr-xr-xdeps/vid.stab/vid.stab.SlackBuild118
-rw-r--r--deps/wayland-protocols/.url3
-rw-r--r--deps/wayland-protocols/slack-desc19
-rwxr-xr-xdeps/wayland-protocols/wayland-protocols.SlackBuild137
-rw-r--r--deps/wayland/.url2
-rwxr-xr-xdeps/wayland/wayland.SlackBuild66
-rw-r--r--deps/wayland_updates2
-rwxr-xr-xdeps/xorg-server/xorg-server.SlackBuild98
-rw-r--r--kde/build/baloo1
-rw-r--r--kde/build/calligra2
-rw-r--r--kde/build/digikam (renamed from kde/build/akonadi4)0
-rw-r--r--kde/build/kactivities1
-rw-r--r--kde/build/kdepimlibs41
-rw-r--r--kde/build/kdevelop (renamed from kde/build/k3b)0
-rw-r--r--kde/build/kdevelop-pg-qt1
-rw-r--r--kde/build/kjots (renamed from kde/build/baloo-widgets)0
-rw-r--r--kde/build/konsolepart41
-rw-r--r--kde/build/korundum1
-rw-r--r--kde/build/kross-interpreters1
-rw-r--r--kde/build/nepomuk-core1
-rw-r--r--kde/build/nepomuk-widgets1
-rw-r--r--kde/build/partitionmanager1
-rw-r--r--kde/build/perlkde1
-rw-r--r--kde/build/perlqt1
-rw-r--r--kde/build/phonon-vlc1
-rw-r--r--kde/build/pykde41
-rw-r--r--kde/build/qtruby1
-rw-r--r--kde/build/sddm-kcm (renamed from kde/build/katepart4)0
-rw-r--r--kde/build/sddm-qt51
-rw-r--r--kde/build/smokegen1
-rw-r--r--kde/build/smokekde1
-rw-r--r--kde/build/smokeq1
-rw-r--r--kde/build/smokeqt1
l---------kde/cmake/akonadi1
l---------kde/cmake/akonadi-calendar1
l---------kde/cmake/akonadi-contacts1
l---------kde/cmake/akonadi-mime1
l---------kde/cmake/akonadi-notes1
l---------kde/cmake/akonadi-search1
-rw-r--r--kde/cmake/akonadi416
-rw-r--r--kde/cmake/amarok22
-rw-r--r--kde/cmake/applications38
l---------kde/cmake/ark1
l---------kde/cmake/artikulate1
l---------kde/cmake/attica-framework1
l---------kde/cmake/baloo-widgets1
l---------kde/cmake/blinken1
l---------kde/cmake/bluedevil1
l---------kde/cmake/bomber1
l---------kde/cmake/bovo1
l---------kde/cmake/breeze-gtk1
l---------kde/cmake/breeze-icons1
l---------kde/cmake/calendarsupport1
-rw-r--r--kde/cmake/calligra2
l---------kde/cmake/cantor1
l---------kde/cmake/cervisia1
-rw-r--r--kde/cmake/cmake9
l---------kde/cmake/debugsettings1
-rw-r--r--kde/cmake/digikam34
l---------kde/cmake/discover1
l---------kde/cmake/dolphin1
l---------kde/cmake/dolphin-plugins1
l---------kde/cmake/dragon1
l---------kde/cmake/eventviews1
l---------kde/cmake/extra-cmake-modules1
l---------kde/cmake/filelight1
l---------kde/cmake/gpgmepp1
l---------kde/cmake/granatier1
l---------kde/cmake/grantleetheme1
-rw-r--r--[l---------]kde/cmake/gwenview25
l---------kde/cmake/incidenceeditor1
-rw-r--r--kde/cmake/k3b7
l---------kde/cmake/kaccounts-integration1
l---------kde/cmake/kaccounts-providers1
l---------kde/cmake/kactivities-framework1
l---------kde/cmake/kactivities-stats1
l---------kde/cmake/kactivities-workspace1
l---------kde/cmake/kactivitymanagerd1
-rw-r--r--kde/cmake/kajongg14
l---------kde/cmake/kalarmcal1
l---------kde/cmake/kalgebra1
l---------kde/cmake/kamera1
l---------kde/cmake/kanagram1
l---------kde/cmake/kapidox1
l---------kde/cmake/kapman1
l---------kde/cmake/kapptemplate1
l---------kde/cmake/karchive1
l---------kde/cmake/kate1
l---------kde/cmake/katomic1
l---------kde/cmake/kauth1
l---------kde/cmake/kblackbox1
l---------kde/cmake/kblocks1
l---------kde/cmake/kblog1
l---------kde/cmake/kbookmarks1
l---------kde/cmake/kbounce1
l---------kde/cmake/kbreakout1
l---------kde/cmake/kbruch1
l---------kde/cmake/kcalc1
l---------kde/cmake/kcalcore1
l---------kde/cmake/kcalutils1
l---------kde/cmake/kcharselect1
l---------kde/cmake/kcmutils1
l---------kde/cmake/kcodecs1
l---------kde/cmake/kcolorchooser1
l---------kde/cmake/kcompletion1
l---------kde/cmake/kconfig1
l---------kde/cmake/kconfigwidgets1
l---------kde/cmake/kcontacts1
l---------kde/cmake/kcoreaddons1
l---------kde/cmake/kcrash1
l---------kde/cmake/kcron1
l---------kde/cmake/kdbusaddons1
l---------kde/cmake/kde-cli-tools1
l---------kde/cmake/kde-gtk-config1
-rw-r--r--kde/cmake/kde-runtime27
-rw-r--r--kde/cmake/kde-workspace54
-rw-r--r--kde/cmake/kde4 (renamed from kde/cmake/kdevelop)5
-rw-r--r--kde/cmake/kdeaccessibility17
-rw-r--r--kde/cmake/kdeadmin18
-rw-r--r--kde/cmake/kdeartwork24
-rw-r--r--kde/cmake/kdebase16
-rw-r--r--kde/cmake/kdebindings31
l---------kde/cmake/kdebugsettings1
l---------kde/cmake/kdeclarative1
l---------kde/cmake/kdeconnect-framework1
l---------kde/cmake/kdecoration1
l---------kde/cmake/kded1
l---------kde/cmake/kdegraphics-thumbnailers1
-rw-r--r--kde/cmake/kdelibs1
l---------kde/cmake/kdelibs4support1
-rw-r--r--kde/cmake/kdenetwork16
l---------kde/cmake/kdenetwork-filesharing1
l---------kde/cmake/kdenlive1
l---------kde/cmake/kdepim-addons1
l---------kde/cmake/kdepim-apps-libs1
l---------kde/cmake/kdepim-runtime1
l---------kde/cmake/kdepimlibs1
l---------kde/cmake/kdeplasma-addons1
l---------kde/cmake/kdesdk-thumbnailers1
l---------kde/cmake/kdesignerplugin1
l---------kde/cmake/kdesu1
-rw-r--r--kde/cmake/kdewebdev17
l---------kde/cmake/kdewebkit1
l---------kde/cmake/kdgantt21
l---------kde/cmake/kdiamond1
l---------kde/cmake/kdnssd1
l---------kde/cmake/kdoctools1
l---------kde/cmake/kemoticons1
l---------kde/cmake/kfileaudiopreview1
l---------kde/cmake/kfilemetadata51
l---------kde/cmake/kfloppy1
l---------kde/cmake/kfourinline1
l---------kde/cmake/kgamma51
l---------kde/cmake/kgeography1
-rw-r--r--kde/cmake/kget (renamed from kde/cmake/networkmanagement)8
l---------kde/cmake/kglobalaccel1
l---------kde/cmake/kguiaddons1
l---------kde/cmake/khangman1
l---------kde/cmake/khelpcenter1
l---------kde/cmake/kholidays1
l---------kde/cmake/khotkeys1
l---------kde/cmake/khtml1
l---------kde/cmake/ki18n1
l---------kde/cmake/kiconthemes1
l---------kde/cmake/kidentitymanagement1
l---------kde/cmake/kidletime1
l---------kde/cmake/kig1
l---------kde/cmake/killbots1
l---------kde/cmake/kimageformats1
l---------kde/cmake/kimap1
l---------kde/cmake/kinfocenter1
l---------kde/cmake/kinit1
l---------kde/cmake/kio1
l---------kde/cmake/kio-extras1
l---------kde/cmake/kiriki1
l---------kde/cmake/kitemmodels1
l---------kde/cmake/kitemviews1
l---------kde/cmake/kiten1
l---------kde/cmake/kjobwidgets1
l---------kde/cmake/kjs1
l---------kde/cmake/kjsembed1
l---------kde/cmake/kjumpingcube1
l---------kde/cmake/kldap1
l---------kde/cmake/kleopatra1
l---------kde/cmake/klettres1
l---------kde/cmake/klines1
l---------kde/cmake/kmahjongg1
l---------kde/cmake/kmailtransport1
l---------kde/cmake/kmbox1
l---------kde/cmake/kmediaplayer1
l---------kde/cmake/kmenuedit1
l---------kde/cmake/kmime1
l---------kde/cmake/kmines1
l---------kde/cmake/kmplot1
l---------kde/cmake/knetwalk1
l---------kde/cmake/knewstuff1
l---------kde/cmake/knotifications1
l---------kde/cmake/knotifyconfig1
l---------kde/cmake/kollision1
l---------kde/cmake/kolourpaint1
l---------kde/cmake/kompare1
l---------kde/cmake/konsole1
l---------kde/cmake/kontactinterface1
-rw-r--r--kde/cmake/kopete (renamed from kde/cmake/kde-baseapps)11
l---------kde/cmake/kpackage1
l---------kde/cmake/kparts1
l---------kde/cmake/kpat1
l---------kde/cmake/kpeople1
l---------kde/cmake/kpimtextedit1
l---------kde/cmake/kplotting1
l---------kde/cmake/kpty1
l---------kde/cmake/krfb1
-rw-r--r--kde/cmake/krita (renamed from kde/cmake/applications5)29
l---------kde/cmake/kross1
l---------kde/cmake/kruler1
l---------kde/cmake/krunner1
-rw-r--r--kde/cmake/krusader24
l---------kde/cmake/kscreen21
-rw-r--r--[l---------]kde/cmake/kscreenlocker26
-rw-r--r--kde/cmake/kservice9
l---------kde/cmake/kshisen1
l---------kde/cmake/ksquares1
l---------kde/cmake/ksshaskpass1
l---------kde/cmake/kstars1
l---------kde/cmake/ksysguard1
l---------kde/cmake/kteatime1
l---------kde/cmake/ktexteditor1
l---------kde/cmake/ktextwidgets1
l---------kde/cmake/ktimer1
l---------kde/cmake/ktnef1
l---------kde/cmake/ktorrent1
l---------kde/cmake/ktp-accounts-kcm1
l---------kde/cmake/ktp-approver1
l---------kde/cmake/ktp-auth-handler1
l---------kde/cmake/ktp-call-ui1
l---------kde/cmake/ktp-common-internals1
l---------kde/cmake/ktp-contact-list1
l---------kde/cmake/ktp-contact-runner1
l---------kde/cmake/ktp-desktop-applets1
l---------kde/cmake/ktp-filetransfer-handler1
l---------kde/cmake/ktp-kded-module1
l---------kde/cmake/ktp-send-file1
l---------kde/cmake/ktp-text-ui1
l---------kde/cmake/kturtle1
l---------kde/cmake/kunitconversion1
l---------kde/cmake/kwallet1
l---------kde/cmake/kwallet-pam1
l---------kde/cmake/kwalletmanager1
-rw-r--r--kde/cmake/kwave25
l---------kde/cmake/kwayland1
l---------kde/cmake/kwayland-integration1
-rw-r--r--kde/cmake/kwebkitpart11
l---------kde/cmake/kwidgetsaddons1
l---------kde/cmake/kwin1
l---------kde/cmake/kwindowsystem1
l---------kde/cmake/kwordquiz1
l---------kde/cmake/kwrited1
l---------kde/cmake/kxmlgui1
l---------kde/cmake/kxmlrpcclient1
l---------kde/cmake/libbluedevil1
l---------kde/cmake/libgravatar1
l---------kde/cmake/libkdegames1
l---------kde/cmake/libkdepim1
l---------kde/cmake/libkeduvocdocument1
l---------kde/cmake/libkleo1
l---------kde/cmake/libkmahjongg1
l---------kde/cmake/libkomparediff21
l---------kde/cmake/libksane1
l---------kde/cmake/libkscreen21
l---------kde/cmake/libksieve1
l---------kde/cmake/libksysguard1
l---------kde/cmake/libktorrent1
l---------kde/cmake/libmm-qt51
l---------kde/cmake/libnm-qt51
l---------kde/cmake/lokalize1
l---------kde/cmake/mailcommon1
l---------kde/cmake/mailimporter1
-rw-r--r--kde/cmake/marble42
-rw-r--r--[l---------]kde/cmake/messagelib24
l---------kde/cmake/milou1
l---------kde/cmake/minuet1
l---------kde/cmake/modemmanager-qt1
l---------kde/cmake/muon1
l---------kde/cmake/networkmanager-qt1
l---------kde/cmake/okteta1
-rw-r--r--[l---------]kde/cmake/oxygen36
l---------kde/cmake/parley1
-rw-r--r--kde/cmake/partitionmanager7
-rw-r--r--kde/cmake/perlkde20
-rw-r--r--kde/cmake/perlqt20
l---------kde/cmake/picmi1
l---------kde/cmake/pimcommon1
-rw-r--r--kde/cmake/plasma12
-rw-r--r--kde/cmake/plasma-browser-integration25
l---------kde/cmake/plasma-desktop1
l---------kde/cmake/plasma-framework1
l---------kde/cmake/plasma-integration1
l---------kde/cmake/plasma-mediacenter1
l---------kde/cmake/plasma-pa1
l---------kde/cmake/plasma-sdk1
l---------kde/cmake/plasma-workspace1
l---------kde/cmake/plasma-workspace-wallpapers1
l---------kde/cmake/plasma5-nm1
-rw-r--r--kde/cmake/polkit-kde-agent-115
l---------kde/cmake/polkit-kde-framework1
-rw-r--r--kde/cmake/polkit-kde-kcmodules-115
l---------kde/cmake/powerdevil1
l---------kde/cmake/print-manager1
l---------kde/cmake/rocs1
-rw-r--r--[l---------]kde/cmake/sddm-kcm27
l---------kde/cmake/signon-kwallet-extension1
l---------kde/cmake/skanlite1
l---------kde/cmake/sonnet1
l---------kde/cmake/spectacle1
l---------kde/cmake/step1
l---------kde/cmake/syndication1
l---------kde/cmake/systemsettings1
l---------kde/cmake/threadweaver1
l---------kde/cmake/user-manager1
l---------kde/cmake/xembed-sni-proxy1
-rw-r--r--kde/doinst.sh/amarok5
-rw-r--r--kde/doinst.sh/jovie5
-rw-r--r--kde/doinst.sh/kde-applications5
-rw-r--r--kde/doinst.sh/kde-baseapps4
-rw-r--r--kde/doinst.sh/kde-runtime5
-rw-r--r--kde/doinst.sh/kde-workspace10
-rw-r--r--kde/doinst.sh/kdeartwork5
-rw-r--r--kde/doinst.sh/kgamma5
-rw-r--r--kde/doinst.sh/kinit7
-rw-r--r--kde/doinst.sh/koffice5
-rw-r--r--kde/doinst.sh/kopete-cryptography5
-rw-r--r--kde/doinst.sh/ksaneplugin5
-rw-r--r--kde/doinst.sh/kscreenlocker5
-rw-r--r--kde/doinst.sh/ksnapshot5
-rw-r--r--kde/doinst.sh/sddm-qt53
-rw-r--r--kde/doinst.sh/wicd-kde5
-rwxr-xr-xkde/kde.SlackBuild (renamed from kde/KDE.SlackBuild)242
-rw-r--r--kde/kde.options (renamed from kde/KDE.options)25
-rw-r--r--kde/make/marble42
-rw-r--r--kde/make/oxygen10
-rw-r--r--kde/modularize453
-rw-r--r--kde/modules/applications85
-rw-r--r--kde/modules/applications-extra29
-rw-r--r--kde/modules/frameworks20
-rw-r--r--kde/modules/kde438
-rw-r--r--kde/modules/kde4-extragear16
-rw-r--r--kde/modules/kdepim26
-rw-r--r--kde/modules/plasma20
-rw-r--r--kde/modules/plasma-extra1
-rw-r--r--kde/modules/telepathy2
-rw-r--r--kde/patch/akonadi.patch12
-rw-r--r--kde/patch/akonadi/akonadi_mariadb_qtsql.patch91
-rw-r--r--kde/patch/akonadi/akonadi_rename-header.patch77
-rw-r--r--kde/patch/akonadi/akonadi_revert-abs-path.patch70
-rw-r--r--kde/patch/ark.patch3
-rw-r--r--kde/patch/ark/ark_include_memory.patch15
-rw-r--r--kde/patch/cantor.patch4
-rw-r--r--kde/patch/cantor/cantor_julia.patch193
-rw-r--r--kde/patch/cantor/cantor_python.patch31
-rw-r--r--kde/patch/digikam.patch9
-rw-r--r--kde/patch/digikam/digikam_clang_fix.patch38
-rw-r--r--kde/patch/digikam/digikam_databasemodel.patch13337
-rw-r--r--kde/patch/dolphin.patch3
-rw-r--r--kde/patch/dolphin/dolphin_revert_noroot.patch44
-rw-r--r--kde/patch/gwenview.patch4
-rw-r--r--kde/patch/gwenview/gwenview-17.04.1_dataloss.patch131
-rw-r--r--kde/patch/kalzium.patch3
-rw-r--r--kde/patch/kalzium/kalzium_kf_5.31.patch156
-rw-r--r--kde/patch/kate.patch4
-rw-r--r--kde/patch/kate/kate_runasroot.patch48
-rw-r--r--kde/patch/kcalcore.patch4
-rw-r--r--kde/patch/kcalcore/kcalcore_libical3.patch109
-rw-r--r--kde/patch/kde-gtk-config.patch4
-rw-r--r--kde/patch/kde-gtk-config/kde-gtk-config_loadcurrentsettings.patch622
-rw-r--r--kde/patch/kde-runtime.patch3
-rw-r--r--kde/patch/kde-runtime/kde-runtime_gpgme.patch133
-rw-r--r--kde/patch/kdenlive.patch4
-rw-r--r--kde/patch/kdenlive/kdenlive_gcc7.patch32
-rw-r--r--kde/patch/kdepimlibs4.patch3
-rw-r--r--kde/patch/kdepimlibs4/kdepimlibs.libical3.diff184
-rw-r--r--kde/patch/kdesdk-kioslaves.patch2
-rw-r--r--kde/patch/kholidays.patch4
-rw-r--r--kde/patch/kholidays/kholidays_depfreeze_revert.patch61
-rw-r--r--kde/patch/kio.patch5
-rw-r--r--kde/patch/kio/kio_fix_url_setpath.patch65
-rw-r--r--kde/patch/konsole.patch5
-rw-r--r--kde/patch/konsole/konsole.term.is.konsole.patch24
-rw-r--r--kde/patch/kopete.patch9
-rw-r--r--kde/patch/kopete/kopete_kdebug376348.patch127
-rw-r--r--kde/patch/kopete/kopete_kdebug393372.patch30
-rw-r--r--kde/patch/kpat.patch5
-rw-r--r--kde/patch/kpat/kpat_no_freecell_solver_dep.patch1475
-rw-r--r--kde/patch/krita.patch3
-rw-r--r--kde/patch/krita/krita_qt59.patch26
-rw-r--r--kde/patch/ksudoku.patch4
-rw-r--r--kde/patch/ksudoku/ksudoku_qwindowtitle.patch15
-rw-r--r--kde/patch/ktexteditor.patch3
-rw-r--r--kde/patch/ktexteditor/ktexteditor_fix_indentation.patch32
-rw-r--r--kde/patch/kwin.patch11
-rw-r--r--kde/patch/kwin/kwin_cmake310.patch52
-rw-r--r--kde/patch/kwin/kwin_qt59_rootwindow_events.patch63
-rw-r--r--kde/patch/kwin/kwin_replace_logind_with_ck2.patch85
-rw-r--r--kde/patch/libkface.patch3
-rw-r--r--kde/patch/libkface/libkface_opencv3.patch61
-rw-r--r--kde/patch/libkleo.patch4
-rw-r--r--kde/patch/libkleo/libkleo_gcc7.patch27
-rw-r--r--kde/patch/oxygen-gtk2.patch3
-rw-r--r--kde/patch/oxygen-gtk2/oxygen-gtk2_KDEBUG_341181.patch115
-rw-r--r--kde/patch/perlqt.patch3
-rw-r--r--kde/patch/perlqt/perlqt.gcc6.diff11
-rw-r--r--kde/patch/plasma-workspace.patch11
-rw-r--r--kde/patch/plasma-workspace/plasma-workspace.systray_cpubug.patch152
-rw-r--r--kde/patch/plasma-workspace/plasma-workspace_kdebug389815.patch32
-rw-r--r--kde/patch/powerdevil.patch4
-rw-r--r--kde/patch/powerdevil/powerdevil-5.12.4_firstrun.patch42
-rw-r--r--kde/patch/pykde4.patch5
-rw-r--r--kde/patch/pykde4/0001-use-LIB_PYTHON-realpath.patch31
-rw-r--r--kde/patch/pykde4/0002-Add-some-missing-link-libraries.patch60
-rw-r--r--kde/patch/pykde4/0003-Fix-build-with-sip-4.19.patch599
-rw-r--r--kde/patch/sddm-qt5.patch15
-rw-r--r--kde/patch/sddm-qt5/sddm_avatars.patch33
-rw-r--r--kde/patch/sddm-qt5/sddm_consolekit.diff22
-rw-r--r--kde/patch/sddm-qt5/sddm_userxsession.diff13
-rw-r--r--kde/pkgsrc/akonadi1
-rw-r--r--kde/pkgsrc/akonadi41
-rw-r--r--kde/pkgsrc/baloo1
-rw-r--r--kde/pkgsrc/baloo-widgets1
-rw-r--r--kde/pkgsrc/kate1
-rw-r--r--kde/pkgsrc/katepart42
-rw-r--r--kde/pkgsrc/kdeconnect41
-rw-r--r--kde/pkgsrc/kdepimlibs1
-rw-r--r--kde/pkgsrc/kdepimlibs41
-rw-r--r--kde/pkgsrc/konsole1
-rw-r--r--kde/pkgsrc/konsolepart41
-rw-r--r--kde/pkgsrc/libkdegames1
-rw-r--r--kde/pkgsrc/libkdegames41
-rw-r--r--kde/pkgsrc/libkexiv21
-rw-r--r--kde/pkgsrc/libkexiv2_41
-rw-r--r--kde/pkgsrc/libkmahjongg1
-rw-r--r--kde/pkgsrc/libkmahjongg41
-rw-r--r--kde/pkgsrc/libksane1
-rw-r--r--kde/pkgsrc/libksane41
-rw-r--r--kde/pkgsrc/okteta1
-rw-r--r--kde/pkgsrc/oktetapart42
-rw-r--r--kde/post-install/audiocd-kio4.post-install6
-rw-r--r--kde/post-install/dolphin.post-install14
-rw-r--r--kde/post-install/kde-runtime.post-install2
-rw-r--r--kde/post-install/kdepimlibs4.post-install1
-rw-r--r--kde/post-install/kdesu.post-install4
-rw-r--r--kde/post-install/kservice.post-install (renamed from kde/post-install/kde-baseapps.post-install)4
-rw-r--r--kde/post-install/kservice/profile.d/kde.csh (renamed from kde/post-install/kde-baseapps/profile.d/kde.csh)6
-rw-r--r--kde/post-install/kservice/profile.d/kde.sh (renamed from kde/post-install/kde-baseapps/profile.d/kde.sh)6
-rw-r--r--kde/post-install/plasma-workspace.post-install10
-rw-r--r--kde/post-install/plasma-workspace/scripts/startkwayland4
-rw-r--r--kde/post-install/plasma-workspace/xinit/xinitrc.kwayland32
-rw-r--r--kde/post-install/sddm-qt5.post-install19
-rw-r--r--kde/pre-install/kde-runtime.pre-install4
-rw-r--r--kde/pre-install/kdepimlibs4.pre-install2
-rw-r--r--kde/pre-install/messagelib.pre-install3
-rw-r--r--kde/slack-desc/akonadi-calendar-tools (renamed from kde/slack-desc/polkit-kde-kcmodules-1)23
-rw-r--r--kde/slack-desc/akonadi-import-wizard19
-rw-r--r--kde/slack-desc/akonadi419
-rw-r--r--kde/slack-desc/akonadiconsole19
-rw-r--r--kde/slack-desc/akregator (renamed from kde/slack-desc/libkdeedu)22
-rw-r--r--kde/slack-desc/alkimia19
-rw-r--r--kde/slack-desc/amor19
-rw-r--r--kde/slack-desc/baloo19
-rw-r--r--kde/slack-desc/baloo-widgets19
-rw-r--r--kde/slack-desc/calligraplan (renamed from kde/slack-desc/konsolepart4)24
-rw-r--r--kde/slack-desc/drkonqi19
-rw-r--r--kde/slack-desc/falkon (renamed from kde/slack-desc/amarok)22
-rw-r--r--kde/slack-desc/grantlee-editor19
-rw-r--r--kde/slack-desc/jovie19
-rw-r--r--kde/slack-desc/kaccessible19
-rw-r--r--kde/slack-desc/kactivities-workspace19
-rw-r--r--kde/slack-desc/kaddressbook (renamed from kde/slack-desc/kdevelop-php)22
-rw-r--r--kde/slack-desc/kalarm19
-rw-r--r--kde/slack-desc/kamoso (renamed from kde/slack-desc/quanta)22
-rw-r--r--kde/slack-desc/katepart419
-rw-r--r--kde/slack-desc/kbackup19
-rw-r--r--kde/slack-desc/kdav (renamed from kde/slack-desc/ktux)22
-rw-r--r--kde/slack-desc/kde-base-artwork19
-rw-r--r--kde/slack-desc/kde-baseapps19
-rw-r--r--kde/slack-desc/kde-bindings19
-rw-r--r--kde/slack-desc/kde-runtime18
-rw-r--r--kde/slack-desc/kde-workspace19
-rw-r--r--kde/slack-desc/kdeartwork19
-rw-r--r--kde/slack-desc/kdebase-runtime18
-rw-r--r--kde/slack-desc/kdebase-workspace19
-rw-r--r--kde/slack-desc/kdebindings19
-rw-r--r--kde/slack-desc/kdeconnect-framework4
-rw-r--r--kde/slack-desc/kdeconnect-kde19
-rw-r--r--kde/slack-desc/kdeconnect419
-rw-r--r--kde/slack-desc/kdegraphics-strigi-analyzer19
-rw-r--r--kde/slack-desc/kdenetwork-strigi-analyzers19
-rw-r--r--kde/slack-desc/kdenlive2
-rw-r--r--kde/slack-desc/kdesdk-strigi-analyzers19
-rw-r--r--kde/slack-desc/kdev-php (renamed from kde/slack-desc/kdgantt2)22
-rw-r--r--kde/slack-desc/kdiagram (renamed from kde/slack-desc/libmm-qt)22
-rw-r--r--kde/slack-desc/kdialog19
-rw-r--r--kde/slack-desc/kdnssd-framework21
-rw-r--r--kde/slack-desc/keditbookmarks19
-rw-r--r--kde/slack-desc/kfilemetadata19
-rw-r--r--kde/slack-desc/kfind19
-rw-r--r--kde/slack-desc/kgamma19
-rw-r--r--kde/slack-desc/kile19
-rw-r--r--kde/slack-desc/kimagemapeditor (renamed from kde/slack-desc/kde-educational)22
-rw-r--r--kde/slack-desc/kimono19
-rw-r--r--kde/slack-desc/kio-mtp19
-rw-r--r--kde/slack-desc/kipi-plugins19
-rw-r--r--kde/slack-desc/kirigami219
-rw-r--r--kde/slack-desc/kmail19
-rw-r--r--kde/slack-desc/kmail-account-wizard19
-rw-r--r--kde/slack-desc/kmymoney19
-rw-r--r--kde/slack-desc/knotes19
-rw-r--r--kde/slack-desc/koffice19
-rw-r--r--kde/slack-desc/konqueror19
-rw-r--r--kde/slack-desc/kontact (renamed from kde/slack-desc/gpgmepp)22
-rw-r--r--kde/slack-desc/kopete-cryptography19
-rw-r--r--kde/slack-desc/korganizer (renamed from kde/slack-desc/kdepimlibs)22
-rw-r--r--kde/slack-desc/korundum19
-rw-r--r--kde/slack-desc/kplayer19
-rw-r--r--kde/slack-desc/kpmcore19
-rw-r--r--kde/slack-desc/kppp19
-rw-r--r--kde/slack-desc/kremotecontrol19
-rw-r--r--kde/slack-desc/krename19
-rw-r--r--kde/slack-desc/krita19
-rw-r--r--kde/slack-desc/krusader (renamed from kde/slack-desc/kde-base)22
-rw-r--r--kde/slack-desc/ksaneplugin19
-rw-r--r--kde/slack-desc/kscd19
-rw-r--r--kde/slack-desc/kscreen19
-rw-r--r--kde/slack-desc/ksecrets19
-rw-r--r--kde/slack-desc/ksmtp19
-rw-r--r--kde/slack-desc/ksnapshot19
-rw-r--r--kde/slack-desc/kwave19
-rw-r--r--kde/slack-desc/libkdegames419
-rw-r--r--kde/slack-desc/libkexiv2_419
-rw-r--r--kde/slack-desc/libkface19
-rw-r--r--kde/slack-desc/libkgapi (renamed from kde/slack-desc/perlkde)22
-rw-r--r--kde/slack-desc/libkmahjongg419
-rw-r--r--kde/slack-desc/libksane419
-rw-r--r--kde/slack-desc/libkscreen19
-rw-r--r--kde/slack-desc/libmm-qt519
-rw-r--r--kde/slack-desc/libnm-qt19
-rw-r--r--kde/slack-desc/libnm-qt519
-rw-r--r--kde/slack-desc/mbox-importer19
-rw-r--r--kde/slack-desc/mplayerthumbs19
-rw-r--r--kde/slack-desc/muon19
-rw-r--r--kde/slack-desc/nepomuk-core19
-rw-r--r--kde/slack-desc/nepomuk-widgets19
-rw-r--r--kde/slack-desc/networkmanagement19
-rw-r--r--kde/slack-desc/oktetapart419
-rw-r--r--kde/slack-desc/oxygen-icons19
-rw-r--r--kde/slack-desc/pairs19
-rw-r--r--kde/slack-desc/partitionmanager2
-rw-r--r--kde/slack-desc/perlqt19
-rw-r--r--kde/slack-desc/pim-data-exporter (renamed from kde/slack-desc/kdevelop-php-docs)22
-rw-r--r--kde/slack-desc/pim-sieve-editor (renamed from kde/slack-desc/xembed-sni-proxy)22
-rw-r--r--kde/slack-desc/plasma-browser-integration19
-rw-r--r--kde/slack-desc/plasma-mediacenter19
-rw-r--r--kde/slack-desc/plasma-nm19
-rw-r--r--kde/slack-desc/plasma-vault19
-rw-r--r--kde/slack-desc/polkit-kde-agent-118
-rw-r--r--kde/slack-desc/printer-applet19
-rw-r--r--kde/slack-desc/purpose19
-rw-r--r--kde/slack-desc/pykde419
-rw-r--r--kde/slack-desc/qqc2-desktop-style19
-rw-r--r--kde/slack-desc/qtruby19
-rw-r--r--kde/slack-desc/qyoto19
-rw-r--r--kde/slack-desc/sddm-theme-breeze19
-rw-r--r--kde/slack-desc/smokegen19
-rw-r--r--kde/slack-desc/smokekde19
-rw-r--r--kde/slack-desc/smokeqt19
-rw-r--r--kde/slack-desc/strigi19
-rw-r--r--kde/slack-desc/strigi-multimedia19
-rw-r--r--kde/slack-desc/superkaramba19
-rw-r--r--kde/slack-desc/syntax-highlighting19
-rw-r--r--kde/slack-desc/user-manager (renamed from kde/slack-desc/libbluedevil)22
-rw-r--r--kde/slack-desc/wacomtablet (renamed from kde/slack-desc/kdepimlibs4)22
-rw-r--r--kde/slack-desc/wicd-kde19
-rw-r--r--kde/slack-desc/xdg-desktop-portal-kde19
-rw-r--r--kde/slack-desc/yakuake19
-rwxr-xr-xkdei/kde-l10n/kde-l10n.SlackBuild152
-rw-r--r--kdei/kde-l10n/kdepim-l10n/extract-kdepim-goodness.sh23
-rw-r--r--kdei/kde-l10n/kdepim-l10n/kdepim-l10n-fr-4.4.5.korganizer.docbook.reorganize.diff.defunct34
-rw-r--r--kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-ar11
-rw-r--r--kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-bg11
-rw-r--r--kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-bn_IN11
-rw-r--r--kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-bs11
-rw-r--r--kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-ca11
-rw-r--r--kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-ca@valencia11
-rw-r--r--kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-cs11
-rw-r--r--kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-csb11
-rw-r--r--kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-da11
-rw-r--r--kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-de11
-rw-r--r--kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-el11
-rw-r--r--kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-en_GB11
-rw-r--r--kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-eo11
-rw-r--r--kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-es11
-rw-r--r--kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-et11
-rw-r--r--kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-eu11
-rw-r--r--kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-fa11
-rw-r--r--kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-fi11
-rw-r--r--kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-fr11
-rw-r--r--kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-fy11
-rw-r--r--kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-ga11
-rw-r--r--kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-gl11
-rw-r--r--kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-gu11
-rw-r--r--kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-he11
-rw-r--r--kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-hi11
-rw-r--r--kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-hne11
-rw-r--r--kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-hr11
-rw-r--r--kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-hu11
-rw-r--r--kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-ia11
-rw-r--r--kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-id11
-rw-r--r--kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-is11
-rw-r--r--kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-it11
-rw-r--r--kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-ja11
-rw-r--r--kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-kk11
-rw-r--r--kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-km11
-rw-r--r--kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-kn11
-rw-r--r--kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-ko11
-rw-r--r--kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-ku11
-rw-r--r--kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-lt11
-rw-r--r--kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-lv11
-rw-r--r--kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-mai11
-rw-r--r--kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-mk11
-rw-r--r--kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-ml11
-rw-r--r--kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-mr11
-rw-r--r--kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-nb11
-rw-r--r--kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-nds11
-rw-r--r--kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-nl11
-rw-r--r--kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-nn11
-rw-r--r--kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-pa11
-rw-r--r--kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-pl11
-rw-r--r--kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-pt11
-rw-r--r--kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-pt_BR11
-rw-r--r--kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-ro11
-rw-r--r--kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-ru11
-rw-r--r--kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-si11
-rw-r--r--kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-sk11
-rw-r--r--kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-sl11
-rw-r--r--kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-sr11
-rw-r--r--kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-sv11
-rw-r--r--kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-ta11
-rw-r--r--kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-tg11
-rw-r--r--kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-th11
-rw-r--r--kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-tr11
-rw-r--r--kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-ug11
-rw-r--r--kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-uk11
-rw-r--r--kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-vi11
-rw-r--r--kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-wa11
-rw-r--r--kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-zh_CN11
-rw-r--r--kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-zh_TW11
852 files changed, 52981 insertions, 5803 deletions
diff --git a/PKGLIST b/PKGLIST
deleted file mode 100644
index a074078..0000000
--- a/PKGLIST
+++ /dev/null
@@ -1,878 +0,0 @@
-14.2/5/x86/deps/OpenAL-1.17.1-i486-1alien.txz
-14.2/5/x86/deps/PyQt5-5.6-i486-1alien.txz
-14.2/5/x86/deps/cfitsio-3.370-i486-1alien.txz
-14.2/5/x86/deps/grantlee-5.1.0-i486-1alien.txz
-14.2/5/x86/deps/grantlee-qt4-0.5.1-i486-1alien.txz
-14.2/5/x86/deps/json-glib-1.0.4-i486-1alien.txz
-14.2/5/x86/deps/libappindicator-12.10.0-i486-2alien.txz
-14.2/5/x86/deps/libdbusmenu-gtk-12.10.2-i486-2alien.txz
-14.2/5/x86/deps/libdbusmenu-qt5-r267_20140619-i486-2alien.txz
-14.2/5/x86/deps/libindicator-12.10.1-i486-2alien.txz
-14.2/5/x86/deps/libinput-1.3.3-i486-1alien.txz
-14.2/5/x86/deps/libxkbcommon-0.5.0-i486-1alien.txz
-14.2/5/x86/deps/lmdb-0.9.17-i486-1alien.txz
-14.2/5/x86/deps/ninja-1.6.0-i486-1alien.txz
-14.2/5/x86/deps/noto-cjk-font-ttf-1.004-noarch-1alien.txz
-14.2/5/x86/deps/noto-font-ttf-2015_09_29-noarch-2alien.txz
-14.2/5/x86/deps/phonon-4.9.0-i486-3alien.txz
-14.2/5/x86/deps/phonon-gstreamer-4.9.0-i486-2alien.txz
-14.2/5/x86/deps/phonon-vlc-0.9.0-i486-2alien.txz
-14.2/5/x86/deps/polkit-qt5-1-50624e0_20160719git-i486-1alien.txz
-14.2/5/x86/deps/qca-qt5-2.1.1-i486-4alien.txz
-14.2/5/x86/deps/qt-gstreamer-1.2.0-i486-4alien.txz
-14.2/5/x86/deps/qt5-5.6.1_1-i486-1alien.txz
-14.2/5/x86/deps/qt5-webkit-5.6.1-i486-1alien.txz
-14.2/5/x86/deps/sni-qt-0.2.6-i486-3alien.txz
-14.2/5/x86/deps/telepathy/farstream-0.2.8-i486-1alien.txz
-14.2/5/x86/deps/telepathy/libaccounts-glib-1.21-i486-1alien.txz
-14.2/5/x86/deps/telepathy/libaccounts-qt5-627a089_20151106git-i486-1alien.txz
-14.2/5/x86/deps/telepathy/libnice-0.1.13-i486-2alien.txz
-14.2/5/x86/deps/telepathy/libotr-4.1.1-i486-1alien.txz
-14.2/5/x86/deps/telepathy/libsignon-glib-1.13-i486-1alien.txz
-14.2/5/x86/deps/telepathy/signon-49e13c1_20160414git-i486-1alien.txz
-14.2/5/x86/deps/telepathy/signon-plugin-oauth2-3dec32c_20160414git-i486-1alien.txz
-14.2/5/x86/deps/telepathy/signon-ui-0.17+15.10.20150810-i486-3alien.txz
-14.2/5/x86/deps/telepathy/telepathy-accounts-signon-1.0-i486-3alien.txz
-14.2/5/x86/deps/telepathy/telepathy-farstream-0.6.2-i486-3alien.txz
-14.2/5/x86/deps/telepathy/telepathy-gabble-0.18.3-i486-3alien.txz
-14.2/5/x86/deps/telepathy/telepathy-glib-0.24.1-i486-3alien.txz
-14.2/5/x86/deps/telepathy/telepathy-haze-0.8.0-i486-2alien.txz
-14.2/5/x86/deps/telepathy/telepathy-logger-0.8.2-i486-3alien.txz
-14.2/5/x86/deps/telepathy/telepathy-logger-qt5-15.04.0-i486-3alien.txz
-14.2/5/x86/deps/telepathy/telepathy-mission-control-5.16.3-i486-3alien.txz
-14.2/5/x86/deps/telepathy/telepathy-qt5-0.9.6.1-i486-3alien.txz
-14.2/5/x86/deps/wayland-1.9.0-i486-1alien.txz
-14.2/5/x86/kde/applications-extra/ktorrent-5.0.1-i486-1alien.txz
-14.2/5/x86/kde/applications-extra/libktorrent-2.0.1-i486-1alien.txz
-14.2/5/x86/kde/applications-extra/skanlite-2.0-i486-1alien.txz
-14.2/5/x86/kde/applications/analitza-16.04.3-i486-1alien.txz
-14.2/5/x86/kde/applications/ark-16.04.3-i486-1alien.txz
-14.2/5/x86/kde/applications/artikulate-16.04.3-i486-1alien.txz
-14.2/5/x86/kde/applications/audiocd-kio-16.04.3-i486-1alien.txz
-14.2/5/x86/kde/applications/baloo5-widgets-16.04.3-i486-1alien.txz
-14.2/5/x86/kde/applications/blinken-16.04.3-i486-1alien.txz
-14.2/5/x86/kde/applications/bomber-16.04.3-i486-1alien.txz
-14.2/5/x86/kde/applications/bovo-16.04.3-i486-1alien.txz
-14.2/5/x86/kde/applications/cantor-16.04.3-i486-1alien.txz
-14.2/5/x86/kde/applications/cervisia-16.04.3-i486-1alien.txz
-14.2/5/x86/kde/applications/dolphin-16.04.3-i486-1alien.txz
-14.2/5/x86/kde/applications/dolphin-plugins-16.04.3-i486-1alien.txz
-14.2/5/x86/kde/applications/dragon-16.04.3-i486-1alien.txz
-14.2/5/x86/kde/applications/filelight-16.04.3-i486-1alien.txz
-14.2/5/x86/kde/applications/granatier-16.04.3-i486-1alien.txz
-14.2/5/x86/kde/applications/gwenview-16.04.3-i486-1alien.txz
-14.2/5/x86/kde/applications/juk-16.04.3-i486-1alien.txz
-14.2/5/x86/kde/applications/kaccessible-16.04.3-i486-1alien.txz
-14.2/5/x86/kde/applications/kajongg-16.04.3-i486-1alien.txz
-14.2/5/x86/kde/applications/kalgebra-16.04.3-i486-1alien.txz
-14.2/5/x86/kde/applications/kalzium-16.04.3-i486-1alien.txz
-14.2/5/x86/kde/applications/kamera-16.04.3-i486-1alien.txz
-14.2/5/x86/kde/applications/kanagram-16.04.3-i486-1alien.txz
-14.2/5/x86/kde/applications/kapman-16.04.3-i486-1alien.txz
-14.2/5/x86/kde/applications/kapptemplate-16.04.3-i486-1alien.txz
-14.2/5/x86/kde/applications/kate-16.04.3-i486-1alien.txz
-14.2/5/x86/kde/applications/katomic-16.04.3-i486-1alien.txz
-14.2/5/x86/kde/applications/kblackbox-16.04.3-i486-1alien.txz
-14.2/5/x86/kde/applications/kblocks-16.04.3-i486-1alien.txz
-14.2/5/x86/kde/applications/kbounce-16.04.3-i486-1alien.txz
-14.2/5/x86/kde/applications/kbreakout-16.04.3-i486-1alien.txz
-14.2/5/x86/kde/applications/kbruch-16.04.3-i486-1alien.txz
-14.2/5/x86/kde/applications/kcachegrind-16.04.3-i486-1alien.txz
-14.2/5/x86/kde/applications/kcalc-16.04.3-i486-1alien.txz
-14.2/5/x86/kde/applications/kcharselect-16.04.3-i486-1alien.txz
-14.2/5/x86/kde/applications/kcolorchooser-16.04.3-i486-1alien.txz
-14.2/5/x86/kde/applications/kcron-16.04.3-i486-1alien.txz
-14.2/5/x86/kde/applications/kde-baseapps-16.04.3-i486-1alien.txz
-14.2/5/x86/kde/applications/kde-dev-scripts-16.04.3-i486-1alien.txz
-14.2/5/x86/kde/applications/kde-dev-utils-16.04.3-i486-1alien.txz
-14.2/5/x86/kde/applications/kde-runtime-16.04.3-i486-1alien.txz
-14.2/5/x86/kde/applications/kdebugsettings-16.04.3-i486-1alien.txz
-14.2/5/x86/kde/applications/kdeedu-data-16.04.3-i486-1alien.txz
-14.2/5/x86/kde/applications/kdegraphics-mobipocket-16.04.3-i486-1alien.txz
-14.2/5/x86/kde/applications/kdegraphics-strigi-analyzer-16.04.3-i486-1alien.txz
-14.2/5/x86/kde/applications/kdegraphics-thumbnailers-16.04.3-i486-1alien.txz
-14.2/5/x86/kde/applications/kdenetwork-filesharing-16.04.3-i486-1alien.txz
-14.2/5/x86/kde/applications/kdenetwork-strigi-analyzers-16.04.3-i486-1alien.txz
-14.2/5/x86/kde/applications/kdesdk-kioslaves-16.04.3-i486-1alien.txz
-14.2/5/x86/kde/applications/kdesdk-strigi-analyzers-16.04.3-i486-1alien.txz
-14.2/5/x86/kde/applications/kdesdk-thumbnailers-16.04.3-i486-1alien.txz
-14.2/5/x86/kde/applications/kdewebdev-16.04.3-i486-1alien.txz
-14.2/5/x86/kde/applications/kdf-16.04.3-i486-1alien.txz
-14.2/5/x86/kde/applications/kdiamond-16.04.3-i486-1alien.txz
-14.2/5/x86/kde/applications/kfloppy-16.04.3-i486-1alien.txz
-14.2/5/x86/kde/applications/kfourinline-16.04.3-i486-1alien.txz
-14.2/5/x86/kde/applications/kgeography-16.04.3-i486-1alien.txz
-14.2/5/x86/kde/applications/kget-16.04.3-i486-1alien.txz
-14.2/5/x86/kde/applications/kgoldrunner-16.04.3-i486-1alien.txz
-14.2/5/x86/kde/applications/kgpg-16.04.3-i486-1alien.txz
-14.2/5/x86/kde/applications/khangman-16.04.3-i486-1alien.txz
-14.2/5/x86/kde/applications/khelpcenter-16.04.3-i486-1alien.txz
-14.2/5/x86/kde/applications/kig-16.04.3-i486-1alien.txz
-14.2/5/x86/kde/applications/kigo-16.04.3-i486-1alien.txz
-14.2/5/x86/kde/applications/killbots-16.04.3-i486-1alien.txz
-14.2/5/x86/kde/applications/kio-extras-16.04.3-i486-1alien.txz
-14.2/5/x86/kde/applications/kiriki-16.04.3-i486-1alien.txz
-14.2/5/x86/kde/applications/kiten-16.04.3-i486-1alien.txz
-14.2/5/x86/kde/applications/kjots-5.0.1-i486-1alien.txz
-14.2/5/x86/kde/applications/kjumpingcube-16.04.3-i486-1alien.txz
-14.2/5/x86/kde/applications/klettres-16.04.3-i486-1alien.txz
-14.2/5/x86/kde/applications/klickety-16.04.3-i486-1alien.txz
-14.2/5/x86/kde/applications/klines-16.04.3-i486-1alien.txz
-14.2/5/x86/kde/applications/kmag-16.04.3-i486-1alien.txz
-14.2/5/x86/kde/applications/kmahjongg-16.04.3-i486-1alien.txz
-14.2/5/x86/kde/applications/kmines-16.04.3-i486-1alien.txz
-14.2/5/x86/kde/applications/kmix-16.04.3-i486-1alien.txz
-14.2/5/x86/kde/applications/kmousetool-16.04.3-i486-1alien.txz
-14.2/5/x86/kde/applications/kmouth-16.04.3-i486-1alien.txz
-14.2/5/x86/kde/applications/kmplot-16.04.3-i486-1alien.txz
-14.2/5/x86/kde/applications/knavalbattle-16.04.3-i486-1alien.txz
-14.2/5/x86/kde/applications/knetwalk-16.04.3-i486-1alien.txz
-14.2/5/x86/kde/applications/kolf-16.04.3-i486-1alien.txz
-14.2/5/x86/kde/applications/kollision-16.04.3-i486-1alien.txz
-14.2/5/x86/kde/applications/kolourpaint-16.04.3-i486-1alien.txz
-14.2/5/x86/kde/applications/kompare-16.04.3-i486-1alien.txz
-14.2/5/x86/kde/applications/konquest-16.04.3-i486-1alien.txz
-14.2/5/x86/kde/applications/konsole-16.04.3-i486-1alien.txz
-14.2/5/x86/kde/applications/kopete-16.04.3-i486-1alien.txz
-14.2/5/x86/kde/applications/kpat-16.04.3-i486-1alien.txz
-14.2/5/x86/kde/applications/kppp-16.04.3-i486-1alien.txz
-14.2/5/x86/kde/applications/kqtquickcharts-16.04.3-i486-1alien.txz
-14.2/5/x86/kde/applications/krdc-16.04.3-i486-1alien.txz
-14.2/5/x86/kde/applications/kremotecontrol-16.04.3-i486-1alien.txz
-14.2/5/x86/kde/applications/kreversi-16.04.3-i486-1alien.txz
-14.2/5/x86/kde/applications/krfb-16.04.3-i486-1alien.txz
-14.2/5/x86/kde/applications/kruler-16.04.3-i486-1alien.txz
-14.2/5/x86/kde/applications/ksaneplugin-16.04.3-i486-1alien.txz
-14.2/5/x86/kde/applications/kshisen-16.04.3-i486-1alien.txz
-14.2/5/x86/kde/applications/ksirk-16.04.3-i486-1alien.txz
-14.2/5/x86/kde/applications/ksnakeduel-16.04.3-i486-1alien.txz
-14.2/5/x86/kde/applications/kspaceduel-16.04.3-i486-1alien.txz
-14.2/5/x86/kde/applications/ksquares-16.04.3-i486-1alien.txz
-14.2/5/x86/kde/applications/kstars-16.04.3-i486-1alien.txz
-14.2/5/x86/kde/applications/ksudoku-16.04.3-i486-1alien.txz
-14.2/5/x86/kde/applications/ksystemlog-16.04.3-i486-1alien.txz
-14.2/5/x86/kde/applications/kteatime-16.04.3-i486-1alien.txz
-14.2/5/x86/kde/applications/ktimer-16.04.3-i486-1alien.txz
-14.2/5/x86/kde/applications/ktouch-16.04.3-i486-1alien.txz
-14.2/5/x86/kde/applications/ktuberling-16.04.3-i486-1alien.txz
-14.2/5/x86/kde/applications/kturtle-16.04.3-i486-1alien.txz
-14.2/5/x86/kde/applications/kubrick-16.04.3-i486-1alien.txz
-14.2/5/x86/kde/applications/kuser-16.04.3-i486-1alien.txz
-14.2/5/x86/kde/applications/kwalletmanager-16.04.3-i486-1alien.txz
-14.2/5/x86/kde/applications/kwordquiz-16.04.3-i486-1alien.txz
-14.2/5/x86/kde/applications/libkcddb-16.04.3-i486-1alien.txz
-14.2/5/x86/kde/applications/libkcompactdisc-16.04.3-i486-1alien.txz
-14.2/5/x86/kde/applications/libkdcraw-16.04.3-i486-1alien.txz
-14.2/5/x86/kde/applications/libkdeedu-16.04.3-i486-1alien.txz
-14.2/5/x86/kde/applications/libkdegames-16.04.3-i486-1alien.txz
-14.2/5/x86/kde/applications/libkeduvocdocument-16.04.3-i486-1alien.txz
-14.2/5/x86/kde/applications/libkexiv2-16.04.3-i486-1alien.txz
-14.2/5/x86/kde/applications/libkgeomap-16.04.3-i486-1alien.txz
-14.2/5/x86/kde/applications/libkipi-16.04.3-i486-1alien.txz
-14.2/5/x86/kde/applications/libkmahjongg-16.04.3-i486-1alien.txz
-14.2/5/x86/kde/applications/libkomparediff2-16.04.3-i486-1alien.txz
-14.2/5/x86/kde/applications/libksane-16.04.3-i486-1alien.txz
-14.2/5/x86/kde/applications/lokalize-16.04.3-i486-1alien.txz
-14.2/5/x86/kde/applications/lskat-16.04.3-i486-1alien.txz
-14.2/5/x86/kde/applications/marble-16.04.3-i486-1alien.txz
-14.2/5/x86/kde/applications/mplayerthumbs-16.04.3-i486-1alien.txz
-14.2/5/x86/kde/applications/okteta-16.04.3-i486-1alien.txz
-14.2/5/x86/kde/applications/okular-16.04.3-i486-1alien.txz
-14.2/5/x86/kde/applications/palapeli-16.04.3-i486-1alien.txz
-14.2/5/x86/kde/applications/parley-16.04.3-i486-1alien.txz
-14.2/5/x86/kde/applications/picmi-16.04.3-i486-1alien.txz
-14.2/5/x86/kde/applications/poxml-16.04.3-i486-1alien.txz
-14.2/5/x86/kde/applications/print-manager-16.04.3-i486-1alien.txz
-14.2/5/x86/kde/applications/rocs-16.04.3-i486-1alien.txz
-14.2/5/x86/kde/applications/spectacle-16.04.3-i486-1alien.txz
-14.2/5/x86/kde/applications/step-16.04.3-i486-1alien.txz
-14.2/5/x86/kde/applications/svgpart-16.04.3-i486-1alien.txz
-14.2/5/x86/kde/applications/sweeper-16.04.3-i486-1alien.txz
-14.2/5/x86/kde/applications/umbrello-16.04.3-i486-1alien.txz
-14.2/5/x86/kde/applications/zeroconf-ioslave-16.04.3-i486-1alien.txz
-14.2/5/x86/kde/frameworks/attica-framework-5.24.0-i486-1alien.txz
-14.2/5/x86/kde/frameworks/baloo5-5.24.0-i486-1alien.txz
-14.2/5/x86/kde/frameworks/bluez-qt-5.24.0-i486-1alien.txz
-14.2/5/x86/kde/frameworks/breeze-icons-5.24.0-noarch-1alien.txz
-14.2/5/x86/kde/frameworks/extra-cmake-modules-5.24.0-i486-1alien.txz
-14.2/5/x86/kde/frameworks/frameworkintegration-5.24.0-i486-1alien.txz
-14.2/5/x86/kde/frameworks/kactivities-framework-5.24.0-i486-1alien.txz
-14.2/5/x86/kde/frameworks/kactivities-stats-5.24.0-i486-1alien.txz
-14.2/5/x86/kde/frameworks/kapidox-5.24.0-i486-1alien.txz
-14.2/5/x86/kde/frameworks/karchive-5.24.0-i486-1alien.txz
-14.2/5/x86/kde/frameworks/kauth-5.24.0-i486-1alien.txz
-14.2/5/x86/kde/frameworks/kbookmarks-5.24.0-i486-1alien.txz
-14.2/5/x86/kde/frameworks/kcmutils-5.24.0-i486-1alien.txz
-14.2/5/x86/kde/frameworks/kcodecs-5.24.0-i486-1alien.txz
-14.2/5/x86/kde/frameworks/kcompletion-5.24.0-i486-1alien.txz
-14.2/5/x86/kde/frameworks/kconfig-5.24.0-i486-1alien.txz
-14.2/5/x86/kde/frameworks/kconfigwidgets-5.24.0-i486-1alien.txz
-14.2/5/x86/kde/frameworks/kcoreaddons-5.24.0-i486-1alien.txz
-14.2/5/x86/kde/frameworks/kcrash-5.24.0-i486-1alien.txz
-14.2/5/x86/kde/frameworks/kdbusaddons-5.24.0-i486-1alien.txz
-14.2/5/x86/kde/frameworks/kdeclarative-5.24.0-i486-1alien.txz
-14.2/5/x86/kde/frameworks/kded-5.24.0-i486-1alien.txz
-14.2/5/x86/kde/frameworks/kdelibs4support-5.24.0-i486-1alien.txz
-14.2/5/x86/kde/frameworks/kdesignerplugin-5.24.0-i486-1alien.txz
-14.2/5/x86/kde/frameworks/kdesu-5.24.0-i486-1alien.txz
-14.2/5/x86/kde/frameworks/kdewebkit-5.24.0-i486-1alien.txz
-14.2/5/x86/kde/frameworks/kdnssd-5.24.0-i486-1alien.txz
-14.2/5/x86/kde/frameworks/kdoctools-5.24.0-i486-1alien.txz
-14.2/5/x86/kde/frameworks/kemoticons-5.24.0-i486-1alien.txz
-14.2/5/x86/kde/frameworks/kfilemetadata5-5.24.0-i486-1alien.txz
-14.2/5/x86/kde/frameworks/kglobalaccel-5.24.0-i486-1alien.txz
-14.2/5/x86/kde/frameworks/kguiaddons-5.24.0-i486-1alien.txz
-14.2/5/x86/kde/frameworks/khtml-5.24.0-i486-1alien.txz
-14.2/5/x86/kde/frameworks/ki18n-5.24.0-i486-1alien.txz
-14.2/5/x86/kde/frameworks/kiconthemes-5.24.0-i486-1alien.txz
-14.2/5/x86/kde/frameworks/kidletime-5.24.0-i486-1alien.txz
-14.2/5/x86/kde/frameworks/kimageformats-5.24.0-i486-1alien.txz
-14.2/5/x86/kde/frameworks/kinit-5.24.0-i486-1alien.txz
-14.2/5/x86/kde/frameworks/kio-5.24.0-i486-1alien.txz
-14.2/5/x86/kde/frameworks/kitemmodels-5.24.0-i486-1alien.txz
-14.2/5/x86/kde/frameworks/kitemviews-5.24.0-i486-1alien.txz
-14.2/5/x86/kde/frameworks/kjobwidgets-5.24.0-i486-1alien.txz
-14.2/5/x86/kde/frameworks/kjs-5.24.0-i486-1alien.txz
-14.2/5/x86/kde/frameworks/kjsembed-5.24.0-i486-1alien.txz
-14.2/5/x86/kde/frameworks/kmediaplayer-5.24.0-i486-1alien.txz
-14.2/5/x86/kde/frameworks/knewstuff-5.24.0-i486-1alien.txz
-14.2/5/x86/kde/frameworks/knotifications-5.24.0-i486-1alien.txz
-14.2/5/x86/kde/frameworks/knotifyconfig-5.24.0-i486-1alien.txz
-14.2/5/x86/kde/frameworks/kpackage-5.24.0-i486-1alien.txz
-14.2/5/x86/kde/frameworks/kparts-5.24.0-i486-1alien.txz
-14.2/5/x86/kde/frameworks/kpeople-5.24.0-i486-1alien.txz
-14.2/5/x86/kde/frameworks/kplotting-5.24.0-i486-1alien.txz
-14.2/5/x86/kde/frameworks/kpty-5.24.0-i486-1alien.txz
-14.2/5/x86/kde/frameworks/kross-5.24.0-i486-1alien.txz
-14.2/5/x86/kde/frameworks/krunner-5.24.0-i486-1alien.txz
-14.2/5/x86/kde/frameworks/kservice-5.24.0-i486-1alien.txz
-14.2/5/x86/kde/frameworks/ktexteditor-5.24.0-i486-1alien.txz
-14.2/5/x86/kde/frameworks/ktextwidgets-5.24.0-i486-1alien.txz
-14.2/5/x86/kde/frameworks/kunitconversion-5.24.0-i486-1alien.txz
-14.2/5/x86/kde/frameworks/kwallet-5.24.0-i486-1alien.txz
-14.2/5/x86/kde/frameworks/kwayland-5.24.0-i486-1alien.txz
-14.2/5/x86/kde/frameworks/kwidgetsaddons-5.24.0-i486-1alien.txz
-14.2/5/x86/kde/frameworks/kwindowsystem-5.24.0-i486-1alien.txz
-14.2/5/x86/kde/frameworks/kxmlgui-5.24.0-i486-1alien.txz
-14.2/5/x86/kde/frameworks/kxmlrpcclient-5.24.0-i486-1alien.txz
-14.2/5/x86/kde/frameworks/modemmanager-qt-5.24.0-i486-1alien.txz
-14.2/5/x86/kde/frameworks/networkmanager-qt-5.24.0-i486-1alien.txz
-14.2/5/x86/kde/frameworks/oxygen-icons5-5.24.0-noarch-1alien.txz
-14.2/5/x86/kde/frameworks/plasma-framework-5.24.0-i486-1alien.txz
-14.2/5/x86/kde/frameworks/solid-5.24.0-i486-1alien.txz
-14.2/5/x86/kde/frameworks/sonnet-5.24.0-i486-1alien.txz
-14.2/5/x86/kde/frameworks/threadweaver-5.24.0-i486-1alien.txz
-14.2/5/x86/kde/kde4-extragear/kio-mtp-d91d989_20150403git-i486-1alien.txz
-14.2/5/x86/kde/kde4/akonadi4-1.13.0-i486-2alien.txz
-14.2/5/x86/kde/kde4/baloo-4.14.3-i486-4alien.txz
-14.2/5/x86/kde/kde4/baloo-widgets-4.14.3-i486-3alien.txz
-14.2/5/x86/kde/kde4/kactivities-4.13.3-i486-4alien.txz
-14.2/5/x86/kde/kde4/katepart4-4.14.3-i486-2alien.txz
-14.2/5/x86/kde/kde4/kdelibs-4.14.22-i486-1alien.txz
-14.2/5/x86/kde/kde4/kdepimlibs4-4.14.10-i486-3alien.txz
-14.2/5/x86/kde/kde4/kfilemetadata-4.14.3-i486-4alien.txz
-14.2/5/x86/kde/kde4/konsolepart4-4.14.3-i486-2alien.txz
-14.2/5/x86/kde/kde4/korundum-4.14.3-i486-4alien.txz
-14.2/5/x86/kde/kde4/kross-interpreters-4.14.3-i486-3alien.txz
-14.2/5/x86/kde/kde4/libkdegames4-14.12.3-i486-1alien.txz
-14.2/5/x86/kde/kde4/libkexiv2_4-15.08.3-i486-1alien.txz
-14.2/5/x86/kde/kde4/libkmahjongg4-14.12.3-i486-1alien.txz
-14.2/5/x86/kde/kde4/libksane4-15.08.3-i486-1alien.txz
-14.2/5/x86/kde/kde4/nepomuk-core-4.14.3-i486-4alien.txz
-14.2/5/x86/kde/kde4/nepomuk-widgets-4.14.3-i486-3alien.txz
-14.2/5/x86/kde/kde4/oktetapart4-4.14.3-i486-1alien.txz
-14.2/5/x86/kde/kde4/perlkde-4.14.3-i486-3alien.txz
-14.2/5/x86/kde/kde4/perlqt-4.14.3-i486-5alien.txz
-14.2/5/x86/kde/kde4/pykde4-4.14.3-i486-4alien.txz
-14.2/5/x86/kde/kde4/qtruby-4.14.3-i486-4alien.txz
-14.2/5/x86/kde/kde4/smokegen-4.14.3-i486-3alien.txz
-14.2/5/x86/kde/kde4/smokekde-4.14.3-i486-5alien.txz
-14.2/5/x86/kde/kde4/smokeqt-4.14.3-i486-3alien.txz
-14.2/5/x86/kde/kdepim/akonadi-16.04.3-i486-1alien.txz
-14.2/5/x86/kde/kdepim/akonadi-calendar-16.04.3-i486-1alien.txz
-14.2/5/x86/kde/kdepim/akonadi-search-16.04.3-i486-1alien.txz
-14.2/5/x86/kde/kdepim/calendarsupport-16.04.3-i486-1alien.txz
-14.2/5/x86/kde/kdepim/eventviews-16.04.3-i486-1alien.txz
-14.2/5/x86/kde/kdepim/gpgmepp-16.04.3-i486-1alien.txz
-14.2/5/x86/kde/kdepim/grantleetheme-16.04.3-i486-1alien.txz
-14.2/5/x86/kde/kdepim/incidenceeditor-16.04.3-i486-1alien.txz
-14.2/5/x86/kde/kdepim/kalarmcal-16.04.3-i486-1alien.txz
-14.2/5/x86/kde/kdepim/kblog-16.04.3-i486-1alien.txz
-14.2/5/x86/kde/kdepim/kcalcore-16.04.3-i486-1alien.txz
-14.2/5/x86/kde/kdepim/kcalutils-16.04.3-i486-1alien.txz
-14.2/5/x86/kde/kdepim/kcontacts-16.04.3-i486-1alien.txz
-14.2/5/x86/kde/kdepim/kdepim-16.04.3-i486-1alien.txz
-14.2/5/x86/kde/kdepim/kdepim-addons-16.04.3-i486-1alien.txz
-14.2/5/x86/kde/kdepim/kdepim-apps-libs-16.04.3-i486-1alien.txz
-14.2/5/x86/kde/kdepim/kdepim-runtime-16.04.3-i486-1alien.txz
-14.2/5/x86/kde/kdepim/kdepimlibs-16.04.3-i486-1alien.txz
-14.2/5/x86/kde/kdepim/kdgantt2-16.04.3-i486-1alien.txz
-14.2/5/x86/kde/kdepim/kholidays-16.04.3-i486-1alien.txz
-14.2/5/x86/kde/kdepim/kidentitymanagement-16.04.3-i486-1alien.txz
-14.2/5/x86/kde/kdepim/kimap-16.04.3-i486-1alien.txz
-14.2/5/x86/kde/kdepim/kldap-16.04.3-i486-1alien.txz
-14.2/5/x86/kde/kdepim/kleopatra-16.04.3-i486-1alien.txz
-14.2/5/x86/kde/kdepim/kmailtransport-16.04.3-i486-1alien.txz
-14.2/5/x86/kde/kdepim/kmbox-16.04.3-i486-1alien.txz
-14.2/5/x86/kde/kdepim/kmime-16.04.3-i486-1alien.txz
-14.2/5/x86/kde/kdepim/kontactinterface-16.04.3-i486-1alien.txz
-14.2/5/x86/kde/kdepim/kpimtextedit-16.04.3-i486-1alien.txz
-14.2/5/x86/kde/kdepim/ktnef-16.04.3-i486-1alien.txz
-14.2/5/x86/kde/kdepim/libgravatar-16.04.3-i486-1alien.txz
-14.2/5/x86/kde/kdepim/libkdepim-16.04.3-i486-1alien.txz
-14.2/5/x86/kde/kdepim/libkleo-16.04.3-i486-1alien.txz
-14.2/5/x86/kde/kdepim/libksieve-16.04.3-i486-1alien.txz
-14.2/5/x86/kde/kdepim/mailcommon-16.04.3-i486-1alien.txz
-14.2/5/x86/kde/kdepim/mailimporter-16.04.3-i486-1alien.txz
-14.2/5/x86/kde/kdepim/messagelib-16.04.3-i486-1alien.txz
-14.2/5/x86/kde/kdepim/pimcommon-16.04.3-i486-1alien.txz
-14.2/5/x86/kde/kdepim/syndication-16.04.3-i486-1alien.txz
-14.2/5/x86/kde/plasma-extra/kde-wallpapers-15.08.3-noarch-1alien.txz
-14.2/5/x86/kde/plasma-extra/kdeconnect-framework-0.9g-i486-1alien.txz
-14.2/5/x86/kde/plasma-extra/oxygen-fonts-5.4.3-i486-1alien.txz
-14.2/5/x86/kde/plasma-extra/polkit-kde-kcmodules-framework-c2e67c6_20150121git-i486-3alien.txz
-14.2/5/x86/kde/plasma-extra/sddm-qt5-0.13.0-i486-3alien.txz
-14.2/5/x86/kde/plasma/bluedevil-5.7.2-i486-1alien.txz
-14.2/5/x86/kde/plasma/breeze-5.7.2-i486-1alien.txz
-14.2/5/x86/kde/plasma/breeze-gtk-5.7.2-i486-1alien.txz
-14.2/5/x86/kde/plasma/kactivitymanagerd-5.7.2-i486-1alien.txz
-14.2/5/x86/kde/plasma/kde-cli-tools-5.7.2-i486-1alien.txz
-14.2/5/x86/kde/plasma/kde-gtk-config-5.7.2-i486-1alien.txz
-14.2/5/x86/kde/plasma/kdecoration-5.7.2-i486-1alien.txz
-14.2/5/x86/kde/plasma/kdeplasma-addons-5.7.2-i486-1alien.txz
-14.2/5/x86/kde/plasma/kgamma5-5.7.2-i486-1alien.txz
-14.2/5/x86/kde/plasma/khotkeys-5.7.2-i486-1alien.txz
-14.2/5/x86/kde/plasma/kinfocenter-5.7.2-i486-1alien.txz
-14.2/5/x86/kde/plasma/kmenuedit-5.7.2-i486-1alien.txz
-14.2/5/x86/kde/plasma/kscreen2-5.7.2-i486-1alien.txz
-14.2/5/x86/kde/plasma/kscreenlocker-5.7.2-i486-1alien.txz
-14.2/5/x86/kde/plasma/ksshaskpass-5.7.2-i486-1alien.txz
-14.2/5/x86/kde/plasma/ksysguard-5.7.2-i486-1alien.txz
-14.2/5/x86/kde/plasma/kwayland-integration-5.7.2-i486-1alien.txz
-14.2/5/x86/kde/plasma/kwin-5.7.2-i486-1alien.txz
-14.2/5/x86/kde/plasma/kwrited-5.7.2-i486-1alien.txz
-14.2/5/x86/kde/plasma/libkscreen2-5.7.2-i486-1alien.txz
-14.2/5/x86/kde/plasma/libksysguard-5.7.2-i486-1alien.txz
-14.2/5/x86/kde/plasma/milou-5.7.2-i486-1alien.txz
-14.2/5/x86/kde/plasma/oxygen-5.7.2-i486-1alien.txz
-14.2/5/x86/kde/plasma/plasma-desktop-5.7.2-i486-1alien.txz
-14.2/5/x86/kde/plasma/plasma-integration-5.7.2-i486-1alien.txz
-14.2/5/x86/kde/plasma/plasma-mediacenter-5.7.2-i486-1alien.txz
-14.2/5/x86/kde/plasma/plasma-pa-5.7.2-i486-1alien.txz
-14.2/5/x86/kde/plasma/plasma-sdk-5.7.2-i486-1alien.txz
-14.2/5/x86/kde/plasma/plasma-workspace-5.7.2-i486-1alien.txz
-14.2/5/x86/kde/plasma/plasma-workspace-wallpapers-5.7.2-i486-1alien.txz
-14.2/5/x86/kde/plasma/plasma5-nm-5.7.2-i486-1alien.txz
-14.2/5/x86/kde/plasma/polkit-kde-framework-5.7.2-i486-1alien.txz
-14.2/5/x86/kde/plasma/powerdevil-5.7.2-i486-1alien.txz
-14.2/5/x86/kde/plasma/sddm-kcm-5.7.2-i486-1alien.txz
-14.2/5/x86/kde/plasma/systemsettings-5.7.2-i486-1alien.txz
-14.2/5/x86/kde/telepathy/kaccounts-integration-16.04.3-i486-1alien.txz
-14.2/5/x86/kde/telepathy/kaccounts-providers-16.04.3-i486-1alien.txz
-14.2/5/x86/kde/telepathy/ktp-accounts-kcm-16.04.3-i486-1alien.txz
-14.2/5/x86/kde/telepathy/ktp-approver-16.04.3-i486-1alien.txz
-14.2/5/x86/kde/telepathy/ktp-auth-handler-16.04.3-i486-1alien.txz
-14.2/5/x86/kde/telepathy/ktp-call-ui-16.04.3-i486-1alien.txz
-14.2/5/x86/kde/telepathy/ktp-common-internals-16.04.3-i486-1alien.txz
-14.2/5/x86/kde/telepathy/ktp-contact-list-16.04.3-i486-1alien.txz
-14.2/5/x86/kde/telepathy/ktp-contact-runner-16.04.3-i486-1alien.txz
-14.2/5/x86/kde/telepathy/ktp-desktop-applets-16.04.3-i486-1alien.txz
-14.2/5/x86/kde/telepathy/ktp-filetransfer-handler-16.04.3-i486-1alien.txz
-14.2/5/x86/kde/telepathy/ktp-kded-module-16.04.3-i486-1alien.txz
-14.2/5/x86/kde/telepathy/ktp-send-file-16.04.3-i486-1alien.txz
-14.2/5/x86/kde/telepathy/ktp-text-ui-16.04.3-i486-1alien.txz
-14.2/5/x86/kde/telepathy/signon-kwallet-extension-16.04.3-i486-1alien.txz
-14.2/5/x86/kdei/kde-l10n-ar-16.04.3-noarch-1alien.txz
-14.2/5/x86/kdei/kde-l10n-ast-16.04.3-noarch-1alien.txz
-14.2/5/x86/kdei/kde-l10n-bg-16.04.3-noarch-1alien.txz
-14.2/5/x86/kdei/kde-l10n-bs-16.04.3-noarch-1alien.txz
-14.2/5/x86/kdei/kde-l10n-ca-16.04.3-noarch-1alien.txz
-14.2/5/x86/kdei/kde-l10n-ca@valencia-16.04.3-noarch-1alien.txz
-14.2/5/x86/kdei/kde-l10n-cs-16.04.3-noarch-1alien.txz
-14.2/5/x86/kdei/kde-l10n-da-16.04.3-noarch-1alien.txz
-14.2/5/x86/kdei/kde-l10n-de-16.04.3-noarch-1alien.txz
-14.2/5/x86/kdei/kde-l10n-el-16.04.3-noarch-1alien.txz
-14.2/5/x86/kdei/kde-l10n-en_GB-16.04.3-noarch-1alien.txz
-14.2/5/x86/kdei/kde-l10n-eo-16.04.3-noarch-1alien.txz
-14.2/5/x86/kdei/kde-l10n-es-16.04.3-noarch-1alien.txz
-14.2/5/x86/kdei/kde-l10n-et-16.04.3-noarch-1alien.txz
-14.2/5/x86/kdei/kde-l10n-eu-16.04.3-noarch-1alien.txz
-14.2/5/x86/kdei/kde-l10n-fa-16.04.3-noarch-1alien.txz
-14.2/5/x86/kdei/kde-l10n-fi-16.04.3-noarch-1alien.txz
-14.2/5/x86/kdei/kde-l10n-fr-16.04.3-noarch-1alien.txz
-14.2/5/x86/kdei/kde-l10n-ga-16.04.3-noarch-1alien.txz
-14.2/5/x86/kdei/kde-l10n-gl-16.04.3-noarch-1alien.txz
-14.2/5/x86/kdei/kde-l10n-he-16.04.3-noarch-1alien.txz
-14.2/5/x86/kdei/kde-l10n-hi-16.04.3-noarch-1alien.txz
-14.2/5/x86/kdei/kde-l10n-hr-16.04.3-noarch-1alien.txz
-14.2/5/x86/kdei/kde-l10n-hu-16.04.3-noarch-1alien.txz
-14.2/5/x86/kdei/kde-l10n-ia-16.04.3-noarch-1alien.txz
-14.2/5/x86/kdei/kde-l10n-id-16.04.3-noarch-1alien.txz
-14.2/5/x86/kdei/kde-l10n-is-16.04.3-noarch-1alien.txz
-14.2/5/x86/kdei/kde-l10n-it-16.04.3-noarch-1alien.txz
-14.2/5/x86/kdei/kde-l10n-ja-16.04.3-noarch-1alien.txz
-14.2/5/x86/kdei/kde-l10n-kk-16.04.3-noarch-1alien.txz
-14.2/5/x86/kdei/kde-l10n-km-16.04.3-noarch-1alien.txz
-14.2/5/x86/kdei/kde-l10n-ko-16.04.3-noarch-1alien.txz
-14.2/5/x86/kdei/kde-l10n-lt-16.04.3-noarch-1alien.txz
-14.2/5/x86/kdei/kde-l10n-lv-16.04.3-noarch-1alien.txz
-14.2/5/x86/kdei/kde-l10n-mr-16.04.3-noarch-1alien.txz
-14.2/5/x86/kdei/kde-l10n-nb-16.04.3-noarch-1alien.txz
-14.2/5/x86/kdei/kde-l10n-nds-16.04.3-noarch-1alien.txz
-14.2/5/x86/kdei/kde-l10n-nl-16.04.3-noarch-1alien.txz
-14.2/5/x86/kdei/kde-l10n-nn-16.04.3-noarch-1alien.txz
-14.2/5/x86/kdei/kde-l10n-pa-16.04.3-noarch-1alien.txz
-14.2/5/x86/kdei/kde-l10n-pl-16.04.3-noarch-1alien.txz
-14.2/5/x86/kdei/kde-l10n-pt-16.04.3-noarch-1alien.txz
-14.2/5/x86/kdei/kde-l10n-pt_BR-16.04.3-noarch-1alien.txz
-14.2/5/x86/kdei/kde-l10n-ro-16.04.3-noarch-1alien.txz
-14.2/5/x86/kdei/kde-l10n-ru-16.04.3-noarch-1alien.txz
-14.2/5/x86/kdei/kde-l10n-sk-16.04.3-noarch-1alien.txz
-14.2/5/x86/kdei/kde-l10n-sl-16.04.3-noarch-1alien.txz
-14.2/5/x86/kdei/kde-l10n-sr-16.04.3-noarch-1alien.txz
-14.2/5/x86/kdei/kde-l10n-sv-16.04.3-noarch-1alien.txz
-14.2/5/x86/kdei/kde-l10n-tr-16.04.3-noarch-1alien.txz
-14.2/5/x86/kdei/kde-l10n-ug-16.04.3-noarch-1alien.txz
-14.2/5/x86/kdei/kde-l10n-uk-16.04.3-noarch-1alien.txz
-14.2/5/x86/kdei/kde-l10n-wa-16.04.3-noarch-1alien.txz
-14.2/5/x86/kdei/kde-l10n-zh_CN-16.04.3-noarch-1alien.txz
-14.2/5/x86/kdei/kde-l10n-zh_TW-16.04.3-noarch-1alien.txz
-14.2/5/x86_64/deps/OpenAL-1.17.1-x86_64-2alien.txz
-14.2/5/x86_64/deps/PyQt5-5.6-x86_64-1alien.txz
-14.2/5/x86_64/deps/cfitsio-3.370-x86_64-1alien.txz
-14.2/5/x86_64/deps/grantlee-5.1.0-x86_64-1alien.txz
-14.2/5/x86_64/deps/grantlee-qt4-0.5.1-x86_64-1alien.txz
-14.2/5/x86_64/deps/json-glib-1.0.4-x86_64-1alien.txz
-14.2/5/x86_64/deps/libappindicator-12.10.0-x86_64-2alien.txz
-14.2/5/x86_64/deps/libdbusmenu-gtk-12.10.2-x86_64-2alien.txz
-14.2/5/x86_64/deps/libdbusmenu-qt5-r267_20140619-x86_64-2alien.txz
-14.2/5/x86_64/deps/libindicator-12.10.1-x86_64-2alien.txz
-14.2/5/x86_64/deps/libinput-1.3.3-x86_64-1alien.txz
-14.2/5/x86_64/deps/libxkbcommon-0.5.0-x86_64-1alien.txz
-14.2/5/x86_64/deps/lmdb-0.9.17-x86_64-1alien.txz
-14.2/5/x86_64/deps/ninja-1.6.0-x86_64-1alien.txz
-14.2/5/x86_64/deps/noto-cjk-font-ttf-1.004-noarch-1alien.txz
-14.2/5/x86_64/deps/noto-font-ttf-2015_09_29-noarch-2alien.txz
-14.2/5/x86_64/deps/phonon-4.9.0-x86_64-3alien.txz
-14.2/5/x86_64/deps/phonon-gstreamer-4.9.0-x86_64-1alien.txz
-14.2/5/x86_64/deps/phonon-vlc-0.9.0-x86_64-1alien.txz
-14.2/5/x86_64/deps/polkit-qt5-1-50624e0_20160719git-x86_64-1alien.txz
-14.2/5/x86_64/deps/qca-qt5-2.1.1-x86_64-4alien.txz
-14.2/5/x86_64/deps/qt-gstreamer-1.2.0-x86_64-4alien.txz
-14.2/5/x86_64/deps/qt5-5.6.1_1-x86_64-2alien.txz
-14.2/5/x86_64/deps/qt5-webkit-5.6.1-x86_64-1alien.txz
-14.2/5/x86_64/deps/sni-qt-0.2.6-x86_64-3alien.txz
-14.2/5/x86_64/deps/telepathy/farstream-0.2.8-x86_64-1alien.txz
-14.2/5/x86_64/deps/telepathy/libaccounts-glib-1.21-x86_64-1alien.txz
-14.2/5/x86_64/deps/telepathy/libaccounts-qt5-627a089_20151106git-x86_64-1alien.txz
-14.2/5/x86_64/deps/telepathy/libnice-0.1.13-x86_64-2alien.txz
-14.2/5/x86_64/deps/telepathy/libotr-4.1.1-x86_64-1alien.txz
-14.2/5/x86_64/deps/telepathy/libsignon-glib-1.13-x86_64-1alien.txz
-14.2/5/x86_64/deps/telepathy/signon-49e13c1_20160414git-x86_64-1alien.txz
-14.2/5/x86_64/deps/telepathy/signon-plugin-oauth2-3dec32c_20160414git-x86_64-1alien.txz
-14.2/5/x86_64/deps/telepathy/signon-ui-0.17+15.10.20150810-x86_64-3alien.txz
-14.2/5/x86_64/deps/telepathy/telepathy-accounts-signon-1.0-x86_64-3alien.txz
-14.2/5/x86_64/deps/telepathy/telepathy-farstream-0.6.2-x86_64-3alien.txz
-14.2/5/x86_64/deps/telepathy/telepathy-gabble-0.18.3-x86_64-3alien.txz
-14.2/5/x86_64/deps/telepathy/telepathy-glib-0.24.1-x86_64-3alien.txz
-14.2/5/x86_64/deps/telepathy/telepathy-haze-0.8.0-x86_64-2alien.txz
-14.2/5/x86_64/deps/telepathy/telepathy-logger-0.8.2-x86_64-3alien.txz
-14.2/5/x86_64/deps/telepathy/telepathy-logger-qt5-15.04.0-x86_64-3alien.txz
-14.2/5/x86_64/deps/telepathy/telepathy-mission-control-5.16.3-x86_64-3alien.txz
-14.2/5/x86_64/deps/telepathy/telepathy-qt5-0.9.6.1-x86_64-3alien.txz
-14.2/5/x86_64/deps/wayland-1.9.0-x86_64-1alien.txz
-14.2/5/x86_64/kde/applications-extra/ktorrent-5.0.1-x86_64-1alien.txz
-14.2/5/x86_64/kde/applications-extra/libktorrent-2.0.1-x86_64-1alien.txz
-14.2/5/x86_64/kde/applications-extra/skanlite-2.0-x86_64-1alien.txz
-14.2/5/x86_64/kde/applications/analitza-16.04.3-x86_64-1alien.txz
-14.2/5/x86_64/kde/applications/ark-16.04.3-x86_64-1alien.txz
-14.2/5/x86_64/kde/applications/artikulate-16.04.3-x86_64-1alien.txz
-14.2/5/x86_64/kde/applications/audiocd-kio-16.04.3-x86_64-1alien.txz
-14.2/5/x86_64/kde/applications/baloo5-widgets-16.04.3-x86_64-1alien.txz
-14.2/5/x86_64/kde/applications/blinken-16.04.3-x86_64-1alien.txz
-14.2/5/x86_64/kde/applications/bomber-16.04.3-x86_64-1alien.txz
-14.2/5/x86_64/kde/applications/bovo-16.04.3-x86_64-1alien.txz
-14.2/5/x86_64/kde/applications/cantor-16.04.3-x86_64-1alien.txz
-14.2/5/x86_64/kde/applications/cervisia-16.04.3-x86_64-1alien.txz
-14.2/5/x86_64/kde/applications/dolphin-16.04.3-x86_64-1alien.txz
-14.2/5/x86_64/kde/applications/dolphin-plugins-16.04.3-x86_64-1alien.txz
-14.2/5/x86_64/kde/applications/dragon-16.04.3-x86_64-1alien.txz
-14.2/5/x86_64/kde/applications/filelight-16.04.3-x86_64-1alien.txz
-14.2/5/x86_64/kde/applications/granatier-16.04.3-x86_64-1alien.txz
-14.2/5/x86_64/kde/applications/gwenview-16.04.3-x86_64-1alien.txz
-14.2/5/x86_64/kde/applications/juk-16.04.3-x86_64-1alien.txz
-14.2/5/x86_64/kde/applications/kaccessible-16.04.3-x86_64-1alien.txz
-14.2/5/x86_64/kde/applications/kajongg-16.04.3-x86_64-1alien.txz
-14.2/5/x86_64/kde/applications/kalgebra-16.04.3-x86_64-1alien.txz
-14.2/5/x86_64/kde/applications/kalzium-16.04.3-x86_64-1alien.txz
-14.2/5/x86_64/kde/applications/kamera-16.04.3-x86_64-1alien.txz
-14.2/5/x86_64/kde/applications/kanagram-16.04.3-x86_64-1alien.txz
-14.2/5/x86_64/kde/applications/kapman-16.04.3-x86_64-1alien.txz
-14.2/5/x86_64/kde/applications/kapptemplate-16.04.3-x86_64-1alien.txz
-14.2/5/x86_64/kde/applications/kate-16.04.3-x86_64-1alien.txz
-14.2/5/x86_64/kde/applications/katomic-16.04.3-x86_64-1alien.txz
-14.2/5/x86_64/kde/applications/kblackbox-16.04.3-x86_64-1alien.txz
-14.2/5/x86_64/kde/applications/kblocks-16.04.3-x86_64-1alien.txz
-14.2/5/x86_64/kde/applications/kbounce-16.04.3-x86_64-1alien.txz
-14.2/5/x86_64/kde/applications/kbreakout-16.04.3-x86_64-1alien.txz
-14.2/5/x86_64/kde/applications/kbruch-16.04.3-x86_64-1alien.txz
-14.2/5/x86_64/kde/applications/kcachegrind-16.04.3-x86_64-1alien.txz
-14.2/5/x86_64/kde/applications/kcalc-16.04.3-x86_64-1alien.txz
-14.2/5/x86_64/kde/applications/kcharselect-16.04.3-x86_64-1alien.txz
-14.2/5/x86_64/kde/applications/kcolorchooser-16.04.3-x86_64-1alien.txz
-14.2/5/x86_64/kde/applications/kcron-16.04.3-x86_64-1alien.txz
-14.2/5/x86_64/kde/applications/kde-baseapps-16.04.3-x86_64-1alien.txz
-14.2/5/x86_64/kde/applications/kde-dev-scripts-16.04.3-x86_64-1alien.txz
-14.2/5/x86_64/kde/applications/kde-dev-utils-16.04.3-x86_64-1alien.txz
-14.2/5/x86_64/kde/applications/kde-runtime-16.04.3-x86_64-1alien.txz
-14.2/5/x86_64/kde/applications/kdebugsettings-16.04.3-x86_64-1alien.txz
-14.2/5/x86_64/kde/applications/kdeedu-data-16.04.3-x86_64-1alien.txz
-14.2/5/x86_64/kde/applications/kdegraphics-mobipocket-16.04.3-x86_64-1alien.txz
-14.2/5/x86_64/kde/applications/kdegraphics-strigi-analyzer-16.04.3-x86_64-1alien.txz
-14.2/5/x86_64/kde/applications/kdegraphics-thumbnailers-16.04.3-x86_64-1alien.txz
-14.2/5/x86_64/kde/applications/kdenetwork-filesharing-16.04.3-x86_64-1alien.txz
-14.2/5/x86_64/kde/applications/kdenetwork-strigi-analyzers-16.04.3-x86_64-1alien.txz
-14.2/5/x86_64/kde/applications/kdesdk-kioslaves-16.04.3-x86_64-1alien.txz
-14.2/5/x86_64/kde/applications/kdesdk-strigi-analyzers-16.04.3-x86_64-1alien.txz
-14.2/5/x86_64/kde/applications/kdesdk-thumbnailers-16.04.3-x86_64-1alien.txz
-14.2/5/x86_64/kde/applications/kdewebdev-16.04.3-x86_64-1alien.txz
-14.2/5/x86_64/kde/applications/kdf-16.04.3-x86_64-1alien.txz
-14.2/5/x86_64/kde/applications/kdiamond-16.04.3-x86_64-1alien.txz
-14.2/5/x86_64/kde/applications/kfloppy-16.04.3-x86_64-1alien.txz
-14.2/5/x86_64/kde/applications/kfourinline-16.04.3-x86_64-1alien.txz
-14.2/5/x86_64/kde/applications/kgeography-16.04.3-x86_64-1alien.txz
-14.2/5/x86_64/kde/applications/kget-16.04.3-x86_64-1alien.txz
-14.2/5/x86_64/kde/applications/kgoldrunner-16.04.3-x86_64-1alien.txz
-14.2/5/x86_64/kde/applications/kgpg-16.04.3-x86_64-1alien.txz
-14.2/5/x86_64/kde/applications/khangman-16.04.3-x86_64-1alien.txz
-14.2/5/x86_64/kde/applications/khelpcenter-16.04.3-x86_64-1alien.txz
-14.2/5/x86_64/kde/applications/kig-16.04.3-x86_64-1alien.txz
-14.2/5/x86_64/kde/applications/kigo-16.04.3-x86_64-1alien.txz
-14.2/5/x86_64/kde/applications/killbots-16.04.3-x86_64-1alien.txz
-14.2/5/x86_64/kde/applications/kio-extras-16.04.3-x86_64-1alien.txz
-14.2/5/x86_64/kde/applications/kiriki-16.04.3-x86_64-1alien.txz
-14.2/5/x86_64/kde/applications/kiten-16.04.3-x86_64-1alien.txz
-14.2/5/x86_64/kde/applications/kjots-5.0.1-x86_64-1alien.txz
-14.2/5/x86_64/kde/applications/kjumpingcube-16.04.3-x86_64-1alien.txz
-14.2/5/x86_64/kde/applications/klettres-16.04.3-x86_64-1alien.txz
-14.2/5/x86_64/kde/applications/klickety-16.04.3-x86_64-1alien.txz
-14.2/5/x86_64/kde/applications/klines-16.04.3-x86_64-1alien.txz
-14.2/5/x86_64/kde/applications/kmag-16.04.3-x86_64-1alien.txz
-14.2/5/x86_64/kde/applications/kmahjongg-16.04.3-x86_64-1alien.txz
-14.2/5/x86_64/kde/applications/kmines-16.04.3-x86_64-1alien.txz
-14.2/5/x86_64/kde/applications/kmix-16.04.3-x86_64-1alien.txz
-14.2/5/x86_64/kde/applications/kmousetool-16.04.3-x86_64-1alien.txz
-14.2/5/x86_64/kde/applications/kmouth-16.04.3-x86_64-1alien.txz
-14.2/5/x86_64/kde/applications/kmplot-16.04.3-x86_64-1alien.txz
-14.2/5/x86_64/kde/applications/knavalbattle-16.04.3-x86_64-1alien.txz
-14.2/5/x86_64/kde/applications/knetwalk-16.04.3-x86_64-1alien.txz
-14.2/5/x86_64/kde/applications/kolf-16.04.3-x86_64-1alien.txz
-14.2/5/x86_64/kde/applications/kollision-16.04.3-x86_64-1alien.txz
-14.2/5/x86_64/kde/applications/kolourpaint-16.04.3-x86_64-1alien.txz
-14.2/5/x86_64/kde/applications/kompare-16.04.3-x86_64-1alien.txz
-14.2/5/x86_64/kde/applications/konquest-16.04.3-x86_64-1alien.txz
-14.2/5/x86_64/kde/applications/konsole-16.04.3-x86_64-1alien.txz
-14.2/5/x86_64/kde/applications/kopete-16.04.3-x86_64-1alien.txz
-14.2/5/x86_64/kde/applications/kpat-16.04.3-x86_64-1alien.txz
-14.2/5/x86_64/kde/applications/kppp-16.04.3-x86_64-1alien.txz
-14.2/5/x86_64/kde/applications/kqtquickcharts-16.04.3-x86_64-1alien.txz
-14.2/5/x86_64/kde/applications/krdc-16.04.3-x86_64-1alien.txz
-14.2/5/x86_64/kde/applications/kremotecontrol-16.04.3-x86_64-1alien.txz
-14.2/5/x86_64/kde/applications/kreversi-16.04.3-x86_64-1alien.txz
-14.2/5/x86_64/kde/applications/krfb-16.04.3-x86_64-1alien.txz
-14.2/5/x86_64/kde/applications/kruler-16.04.3-x86_64-1alien.txz
-14.2/5/x86_64/kde/applications/ksaneplugin-16.04.3-x86_64-1alien.txz
-14.2/5/x86_64/kde/applications/kshisen-16.04.3-x86_64-1alien.txz
-14.2/5/x86_64/kde/applications/ksirk-16.04.3-x86_64-1alien.txz
-14.2/5/x86_64/kde/applications/ksnakeduel-16.04.3-x86_64-1alien.txz
-14.2/5/x86_64/kde/applications/kspaceduel-16.04.3-x86_64-1alien.txz
-14.2/5/x86_64/kde/applications/ksquares-16.04.3-x86_64-1alien.txz
-14.2/5/x86_64/kde/applications/kstars-16.04.3-x86_64-1alien.txz
-14.2/5/x86_64/kde/applications/ksudoku-16.04.3-x86_64-1alien.txz
-14.2/5/x86_64/kde/applications/ksystemlog-16.04.3-x86_64-1alien.txz
-14.2/5/x86_64/kde/applications/kteatime-16.04.3-x86_64-1alien.txz
-14.2/5/x86_64/kde/applications/ktimer-16.04.3-x86_64-1alien.txz
-14.2/5/x86_64/kde/applications/ktouch-16.04.3-x86_64-1alien.txz
-14.2/5/x86_64/kde/applications/ktuberling-16.04.3-x86_64-1alien.txz
-14.2/5/x86_64/kde/applications/kturtle-16.04.3-x86_64-1alien.txz
-14.2/5/x86_64/kde/applications/kubrick-16.04.3-x86_64-1alien.txz
-14.2/5/x86_64/kde/applications/kuser-16.04.3-x86_64-1alien.txz
-14.2/5/x86_64/kde/applications/kwalletmanager-16.04.3-x86_64-1alien.txz
-14.2/5/x86_64/kde/applications/kwordquiz-16.04.3-x86_64-1alien.txz
-14.2/5/x86_64/kde/applications/libkcddb-16.04.3-x86_64-1alien.txz
-14.2/5/x86_64/kde/applications/libkcompactdisc-16.04.3-x86_64-1alien.txz
-14.2/5/x86_64/kde/applications/libkdcraw-16.04.3-x86_64-1alien.txz
-14.2/5/x86_64/kde/applications/libkdeedu-16.04.3-x86_64-1alien.txz
-14.2/5/x86_64/kde/applications/libkdegames-16.04.3-x86_64-1alien.txz
-14.2/5/x86_64/kde/applications/libkeduvocdocument-16.04.3-x86_64-1alien.txz
-14.2/5/x86_64/kde/applications/libkexiv2-16.04.3-x86_64-1alien.txz
-14.2/5/x86_64/kde/applications/libkgeomap-16.04.3-x86_64-1alien.txz
-14.2/5/x86_64/kde/applications/libkipi-16.04.3-x86_64-1alien.txz
-14.2/5/x86_64/kde/applications/libkmahjongg-16.04.3-x86_64-1alien.txz
-14.2/5/x86_64/kde/applications/libkomparediff2-16.04.3-x86_64-1alien.txz
-14.2/5/x86_64/kde/applications/libksane-16.04.3-x86_64-1alien.txz
-14.2/5/x86_64/kde/applications/lokalize-16.04.3-x86_64-1alien.txz
-14.2/5/x86_64/kde/applications/lskat-16.04.3-x86_64-1alien.txz
-14.2/5/x86_64/kde/applications/marble-16.04.3-x86_64-1alien.txz
-14.2/5/x86_64/kde/applications/mplayerthumbs-16.04.3-x86_64-1alien.txz
-14.2/5/x86_64/kde/applications/okteta-16.04.3-x86_64-1alien.txz
-14.2/5/x86_64/kde/applications/okular-16.04.3-x86_64-1alien.txz
-14.2/5/x86_64/kde/applications/palapeli-16.04.3-x86_64-1alien.txz
-14.2/5/x86_64/kde/applications/parley-16.04.3-x86_64-1alien.txz
-14.2/5/x86_64/kde/applications/picmi-16.04.3-x86_64-1alien.txz
-14.2/5/x86_64/kde/applications/poxml-16.04.3-x86_64-1alien.txz
-14.2/5/x86_64/kde/applications/print-manager-16.04.3-x86_64-1alien.txz
-14.2/5/x86_64/kde/applications/rocs-16.04.3-x86_64-1alien.txz
-14.2/5/x86_64/kde/applications/spectacle-16.04.3-x86_64-1alien.txz
-14.2/5/x86_64/kde/applications/step-16.04.3-x86_64-1alien.txz
-14.2/5/x86_64/kde/applications/svgpart-16.04.3-x86_64-1alien.txz
-14.2/5/x86_64/kde/applications/sweeper-16.04.3-x86_64-1alien.txz
-14.2/5/x86_64/kde/applications/umbrello-16.04.3-x86_64-1alien.txz
-14.2/5/x86_64/kde/applications/zeroconf-ioslave-16.04.3-x86_64-1alien.txz
-14.2/5/x86_64/kde/frameworks/attica-framework-5.24.0-x86_64-1alien.txz
-14.2/5/x86_64/kde/frameworks/baloo5-5.24.0-x86_64-1alien.txz
-14.2/5/x86_64/kde/frameworks/bluez-qt-5.24.0-x86_64-1alien.txz
-14.2/5/x86_64/kde/frameworks/breeze-icons-5.24.0-noarch-1alien.txz
-14.2/5/x86_64/kde/frameworks/extra-cmake-modules-5.24.0-x86_64-1alien.txz
-14.2/5/x86_64/kde/frameworks/frameworkintegration-5.24.0-x86_64-1alien.txz
-14.2/5/x86_64/kde/frameworks/kactivities-framework-5.24.0-x86_64-1alien.txz
-14.2/5/x86_64/kde/frameworks/kactivities-stats-5.24.0-x86_64-1alien.txz
-14.2/5/x86_64/kde/frameworks/kapidox-5.24.0-x86_64-1alien.txz
-14.2/5/x86_64/kde/frameworks/karchive-5.24.0-x86_64-1alien.txz
-14.2/5/x86_64/kde/frameworks/kauth-5.24.0-x86_64-1alien.txz
-14.2/5/x86_64/kde/frameworks/kbookmarks-5.24.0-x86_64-1alien.txz
-14.2/5/x86_64/kde/frameworks/kcmutils-5.24.0-x86_64-1alien.txz
-14.2/5/x86_64/kde/frameworks/kcodecs-5.24.0-x86_64-1alien.txz
-14.2/5/x86_64/kde/frameworks/kcompletion-5.24.0-x86_64-1alien.txz
-14.2/5/x86_64/kde/frameworks/kconfig-5.24.0-x86_64-1alien.txz
-14.2/5/x86_64/kde/frameworks/kconfigwidgets-5.24.0-x86_64-1alien.txz
-14.2/5/x86_64/kde/frameworks/kcoreaddons-5.24.0-x86_64-1alien.txz
-14.2/5/x86_64/kde/frameworks/kcrash-5.24.0-x86_64-1alien.txz
-14.2/5/x86_64/kde/frameworks/kdbusaddons-5.24.0-x86_64-1alien.txz
-14.2/5/x86_64/kde/frameworks/kdeclarative-5.24.0-x86_64-1alien.txz
-14.2/5/x86_64/kde/frameworks/kded-5.24.0-x86_64-1alien.txz
-14.2/5/x86_64/kde/frameworks/kdelibs4support-5.24.0-x86_64-1alien.txz
-14.2/5/x86_64/kde/frameworks/kdesignerplugin-5.24.0-x86_64-1alien.txz
-14.2/5/x86_64/kde/frameworks/kdesu-5.24.0-x86_64-1alien.txz
-14.2/5/x86_64/kde/frameworks/kdewebkit-5.24.0-x86_64-1alien.txz
-14.2/5/x86_64/kde/frameworks/kdnssd-5.24.0-x86_64-1alien.txz
-14.2/5/x86_64/kde/frameworks/kdoctools-5.24.0-x86_64-1alien.txz
-14.2/5/x86_64/kde/frameworks/kemoticons-5.24.0-x86_64-1alien.txz
-14.2/5/x86_64/kde/frameworks/kfilemetadata5-5.24.0-x86_64-1alien.txz
-14.2/5/x86_64/kde/frameworks/kglobalaccel-5.24.0-x86_64-1alien.txz
-14.2/5/x86_64/kde/frameworks/kguiaddons-5.24.0-x86_64-1alien.txz
-14.2/5/x86_64/kde/frameworks/khtml-5.24.0-x86_64-1alien.txz
-14.2/5/x86_64/kde/frameworks/ki18n-5.24.0-x86_64-1alien.txz
-14.2/5/x86_64/kde/frameworks/kiconthemes-5.24.0-x86_64-1alien.txz
-14.2/5/x86_64/kde/frameworks/kidletime-5.24.0-x86_64-1alien.txz
-14.2/5/x86_64/kde/frameworks/kimageformats-5.24.0-x86_64-1alien.txz
-14.2/5/x86_64/kde/frameworks/kinit-5.24.0-x86_64-1alien.txz
-14.2/5/x86_64/kde/frameworks/kio-5.24.0-x86_64-1alien.txz
-14.2/5/x86_64/kde/frameworks/kitemmodels-5.24.0-x86_64-1alien.txz
-14.2/5/x86_64/kde/frameworks/kitemviews-5.24.0-x86_64-1alien.txz
-14.2/5/x86_64/kde/frameworks/kjobwidgets-5.24.0-x86_64-1alien.txz
-14.2/5/x86_64/kde/frameworks/kjs-5.24.0-x86_64-1alien.txz
-14.2/5/x86_64/kde/frameworks/kjsembed-5.24.0-x86_64-1alien.txz
-14.2/5/x86_64/kde/frameworks/kmediaplayer-5.24.0-x86_64-1alien.txz
-14.2/5/x86_64/kde/frameworks/knewstuff-5.24.0-x86_64-1alien.txz
-14.2/5/x86_64/kde/frameworks/knotifications-5.24.0-x86_64-1alien.txz
-14.2/5/x86_64/kde/frameworks/knotifyconfig-5.24.0-x86_64-1alien.txz
-14.2/5/x86_64/kde/frameworks/kpackage-5.24.0-x86_64-1alien.txz
-14.2/5/x86_64/kde/frameworks/kparts-5.24.0-x86_64-1alien.txz
-14.2/5/x86_64/kde/frameworks/kpeople-5.24.0-x86_64-1alien.txz
-14.2/5/x86_64/kde/frameworks/kplotting-5.24.0-x86_64-1alien.txz
-14.2/5/x86_64/kde/frameworks/kpty-5.24.0-x86_64-1alien.txz
-14.2/5/x86_64/kde/frameworks/kross-5.24.0-x86_64-1alien.txz
-14.2/5/x86_64/kde/frameworks/krunner-5.24.0-x86_64-1alien.txz
-14.2/5/x86_64/kde/frameworks/kservice-5.24.0-x86_64-1alien.txz
-14.2/5/x86_64/kde/frameworks/ktexteditor-5.24.0-x86_64-1alien.txz
-14.2/5/x86_64/kde/frameworks/ktextwidgets-5.24.0-x86_64-1alien.txz
-14.2/5/x86_64/kde/frameworks/kunitconversion-5.24.0-x86_64-1alien.txz
-14.2/5/x86_64/kde/frameworks/kwallet-5.24.0-x86_64-1alien.txz
-14.2/5/x86_64/kde/frameworks/kwayland-5.24.0-x86_64-1alien.txz
-14.2/5/x86_64/kde/frameworks/kwidgetsaddons-5.24.0-x86_64-1alien.txz
-14.2/5/x86_64/kde/frameworks/kwindowsystem-5.24.0-x86_64-1alien.txz
-14.2/5/x86_64/kde/frameworks/kxmlgui-5.24.0-x86_64-1alien.txz
-14.2/5/x86_64/kde/frameworks/kxmlrpcclient-5.24.0-x86_64-1alien.txz
-14.2/5/x86_64/kde/frameworks/modemmanager-qt-5.24.0-x86_64-1alien.txz
-14.2/5/x86_64/kde/frameworks/networkmanager-qt-5.24.0-x86_64-1alien.txz
-14.2/5/x86_64/kde/frameworks/oxygen-icons5-5.24.0-noarch-1alien.txz
-14.2/5/x86_64/kde/frameworks/plasma-framework-5.24.0-x86_64-1alien.txz
-14.2/5/x86_64/kde/frameworks/solid-5.24.0-x86_64-1alien.txz
-14.2/5/x86_64/kde/frameworks/sonnet-5.24.0-x86_64-1alien.txz
-14.2/5/x86_64/kde/frameworks/threadweaver-5.24.0-x86_64-1alien.txz
-14.2/5/x86_64/kde/kde4-extragear/kio-mtp-d91d989_20150403git-x86_64-1alien.txz
-14.2/5/x86_64/kde/kde4/akonadi4-1.13.0-x86_64-2alien.txz
-14.2/5/x86_64/kde/kde4/baloo-4.14.3-x86_64-4alien.txz
-14.2/5/x86_64/kde/kde4/baloo-widgets-4.14.3-x86_64-3alien.txz
-14.2/5/x86_64/kde/kde4/kactivities-4.13.3-x86_64-4alien.txz
-14.2/5/x86_64/kde/kde4/katepart4-4.14.3-x86_64-2alien.txz
-14.2/5/x86_64/kde/kde4/kdelibs-4.14.22-x86_64-1alien.txz
-14.2/5/x86_64/kde/kde4/kdepimlibs4-4.14.10-x86_64-3alien.txz
-14.2/5/x86_64/kde/kde4/kfilemetadata-4.14.3-x86_64-4alien.txz
-14.2/5/x86_64/kde/kde4/konsolepart4-4.14.3-x86_64-2alien.txz
-14.2/5/x86_64/kde/kde4/korundum-4.14.3-x86_64-4alien.txz
-14.2/5/x86_64/kde/kde4/kross-interpreters-4.14.3-x86_64-3alien.txz
-14.2/5/x86_64/kde/kde4/libkdegames4-14.12.3-x86_64-1alien.txz
-14.2/5/x86_64/kde/kde4/libkexiv2_4-15.08.3-x86_64-1alien.txz
-14.2/5/x86_64/kde/kde4/libkmahjongg4-14.12.3-x86_64-1alien.txz
-14.2/5/x86_64/kde/kde4/libksane4-15.08.3-x86_64-1alien.txz
-14.2/5/x86_64/kde/kde4/nepomuk-core-4.14.3-x86_64-4alien.txz
-14.2/5/x86_64/kde/kde4/nepomuk-widgets-4.14.3-x86_64-3alien.txz
-14.2/5/x86_64/kde/kde4/oktetapart4-4.14.3-x86_64-1alien.txz
-14.2/5/x86_64/kde/kde4/perlkde-4.14.3-x86_64-3alien.txz
-14.2/5/x86_64/kde/kde4/perlqt-4.14.3-x86_64-5alien.txz
-14.2/5/x86_64/kde/kde4/pykde4-4.14.3-x86_64-4alien.txz
-14.2/5/x86_64/kde/kde4/qtruby-4.14.3-x86_64-4alien.txz
-14.2/5/x86_64/kde/kde4/smokegen-4.14.3-x86_64-3alien.txz
-14.2/5/x86_64/kde/kde4/smokekde-4.14.3-x86_64-5alien.txz
-14.2/5/x86_64/kde/kde4/smokeqt-4.14.3-x86_64-3alien.txz
-14.2/5/x86_64/kde/kdepim/akonadi-16.04.3-x86_64-1alien.txz
-14.2/5/x86_64/kde/kdepim/akonadi-calendar-16.04.3-x86_64-1alien.txz
-14.2/5/x86_64/kde/kdepim/akonadi-search-16.04.3-x86_64-1alien.txz
-14.2/5/x86_64/kde/kdepim/calendarsupport-16.04.3-x86_64-1alien.txz
-14.2/5/x86_64/kde/kdepim/eventviews-16.04.3-x86_64-1alien.txz
-14.2/5/x86_64/kde/kdepim/gpgmepp-16.04.3-x86_64-1alien.txz
-14.2/5/x86_64/kde/kdepim/grantleetheme-16.04.3-x86_64-1alien.txz
-14.2/5/x86_64/kde/kdepim/incidenceeditor-16.04.3-x86_64-1alien.txz
-14.2/5/x86_64/kde/kdepim/kalarmcal-16.04.3-x86_64-1alien.txz
-14.2/5/x86_64/kde/kdepim/kblog-16.04.3-x86_64-1alien.txz
-14.2/5/x86_64/kde/kdepim/kcalcore-16.04.3-x86_64-1alien.txz
-14.2/5/x86_64/kde/kdepim/kcalutils-16.04.3-x86_64-1alien.txz
-14.2/5/x86_64/kde/kdepim/kcontacts-16.04.3-x86_64-1alien.txz
-14.2/5/x86_64/kde/kdepim/kdepim-16.04.3-x86_64-1alien.txz
-14.2/5/x86_64/kde/kdepim/kdepim-addons-16.04.3-x86_64-1alien.txz
-14.2/5/x86_64/kde/kdepim/kdepim-apps-libs-16.04.3-x86_64-1alien.txz
-14.2/5/x86_64/kde/kdepim/kdepim-runtime-16.04.3-x86_64-1alien.txz
-14.2/5/x86_64/kde/kdepim/kdepimlibs-16.04.3-x86_64-1alien.txz
-14.2/5/x86_64/kde/kdepim/kdgantt2-16.04.3-x86_64-1alien.txz
-14.2/5/x86_64/kde/kdepim/kholidays-16.04.3-x86_64-1alien.txz
-14.2/5/x86_64/kde/kdepim/kidentitymanagement-16.04.3-x86_64-1alien.txz
-14.2/5/x86_64/kde/kdepim/kimap-16.04.3-x86_64-1alien.txz
-14.2/5/x86_64/kde/kdepim/kldap-16.04.3-x86_64-1alien.txz
-14.2/5/x86_64/kde/kdepim/kleopatra-16.04.3-x86_64-1alien.txz
-14.2/5/x86_64/kde/kdepim/kmailtransport-16.04.3-x86_64-1alien.txz
-14.2/5/x86_64/kde/kdepim/kmbox-16.04.3-x86_64-1alien.txz
-14.2/5/x86_64/kde/kdepim/kmime-16.04.3-x86_64-1alien.txz
-14.2/5/x86_64/kde/kdepim/kontactinterface-16.04.3-x86_64-1alien.txz
-14.2/5/x86_64/kde/kdepim/kpimtextedit-16.04.3-x86_64-1alien.txz
-14.2/5/x86_64/kde/kdepim/ktnef-16.04.3-x86_64-1alien.txz
-14.2/5/x86_64/kde/kdepim/libgravatar-16.04.3-x86_64-1alien.txz
-14.2/5/x86_64/kde/kdepim/libkdepim-16.04.3-x86_64-1alien.txz
-14.2/5/x86_64/kde/kdepim/libkleo-16.04.3-x86_64-1alien.txz
-14.2/5/x86_64/kde/kdepim/libksieve-16.04.3-x86_64-1alien.txz
-14.2/5/x86_64/kde/kdepim/mailcommon-16.04.3-x86_64-1alien.txz
-14.2/5/x86_64/kde/kdepim/mailimporter-16.04.3-x86_64-1alien.txz
-14.2/5/x86_64/kde/kdepim/messagelib-16.04.3-x86_64-1alien.txz
-14.2/5/x86_64/kde/kdepim/pimcommon-16.04.3-x86_64-1alien.txz
-14.2/5/x86_64/kde/kdepim/syndication-16.04.3-x86_64-1alien.txz
-14.2/5/x86_64/kde/plasma-extra/kde-wallpapers-15.08.3-noarch-1alien.txz
-14.2/5/x86_64/kde/plasma-extra/kdeconnect-framework-0.9g-x86_64-1alien.txz
-14.2/5/x86_64/kde/plasma-extra/oxygen-fonts-5.4.3-x86_64-1alien.txz
-14.2/5/x86_64/kde/plasma-extra/polkit-kde-kcmodules-framework-c2e67c6_20150121git-x86_64-3alien.txz
-14.2/5/x86_64/kde/plasma-extra/sddm-qt5-0.13.0-x86_64-3alien.txz
-14.2/5/x86_64/kde/plasma/bluedevil-5.7.2-x86_64-1alien.txz
-14.2/5/x86_64/kde/plasma/breeze-5.7.2-x86_64-1alien.txz
-14.2/5/x86_64/kde/plasma/breeze-gtk-5.7.2-x86_64-1alien.txz
-14.2/5/x86_64/kde/plasma/kactivitymanagerd-5.7.2-x86_64-1alien.txz
-14.2/5/x86_64/kde/plasma/kde-cli-tools-5.7.2-x86_64-1alien.txz
-14.2/5/x86_64/kde/plasma/kde-gtk-config-5.7.2-x86_64-1alien.txz
-14.2/5/x86_64/kde/plasma/kdecoration-5.7.2-x86_64-1alien.txz
-14.2/5/x86_64/kde/plasma/kdeplasma-addons-5.7.2-x86_64-1alien.txz
-14.2/5/x86_64/kde/plasma/kgamma5-5.7.2-x86_64-1alien.txz
-14.2/5/x86_64/kde/plasma/khotkeys-5.7.2-x86_64-1alien.txz
-14.2/5/x86_64/kde/plasma/kinfocenter-5.7.2-x86_64-1alien.txz
-14.2/5/x86_64/kde/plasma/kmenuedit-5.7.2-x86_64-1alien.txz
-14.2/5/x86_64/kde/plasma/kscreen2-5.7.2-x86_64-1alien.txz
-14.2/5/x86_64/kde/plasma/kscreenlocker-5.7.2-x86_64-1alien.txz
-14.2/5/x86_64/kde/plasma/ksshaskpass-5.7.2-x86_64-1alien.txz
-14.2/5/x86_64/kde/plasma/ksysguard-5.7.2-x86_64-1alien.txz
-14.2/5/x86_64/kde/plasma/kwayland-integration-5.7.2-x86_64-1alien.txz
-14.2/5/x86_64/kde/plasma/kwin-5.7.2-x86_64-1alien.txz
-14.2/5/x86_64/kde/plasma/kwrited-5.7.2-x86_64-1alien.txz
-14.2/5/x86_64/kde/plasma/libkscreen2-5.7.2-x86_64-1alien.txz
-14.2/5/x86_64/kde/plasma/libksysguard-5.7.2-x86_64-1alien.txz
-14.2/5/x86_64/kde/plasma/milou-5.7.2-x86_64-1alien.txz
-14.2/5/x86_64/kde/plasma/oxygen-5.7.2-x86_64-1alien.txz
-14.2/5/x86_64/kde/plasma/plasma-desktop-5.7.2-x86_64-1alien.txz
-14.2/5/x86_64/kde/plasma/plasma-integration-5.7.2-x86_64-1alien.txz
-14.2/5/x86_64/kde/plasma/plasma-mediacenter-5.7.2-x86_64-1alien.txz
-14.2/5/x86_64/kde/plasma/plasma-pa-5.7.2-x86_64-1alien.txz
-14.2/5/x86_64/kde/plasma/plasma-sdk-5.7.2-x86_64-1alien.txz
-14.2/5/x86_64/kde/plasma/plasma-workspace-5.7.2-x86_64-1alien.txz
-14.2/5/x86_64/kde/plasma/plasma-workspace-wallpapers-5.7.2-x86_64-1alien.txz
-14.2/5/x86_64/kde/plasma/plasma5-nm-5.7.2-x86_64-1alien.txz
-14.2/5/x86_64/kde/plasma/polkit-kde-framework-5.7.2-x86_64-1alien.txz
-14.2/5/x86_64/kde/plasma/powerdevil-5.7.2-x86_64-1alien.txz
-14.2/5/x86_64/kde/plasma/sddm-kcm-5.7.2-x86_64-1alien.txz
-14.2/5/x86_64/kde/plasma/systemsettings-5.7.2-x86_64-1alien.txz
-14.2/5/x86_64/kde/telepathy/kaccounts-integration-16.04.3-x86_64-1alien.txz
-14.2/5/x86_64/kde/telepathy/kaccounts-providers-16.04.3-x86_64-1alien.txz
-14.2/5/x86_64/kde/telepathy/ktp-accounts-kcm-16.04.3-x86_64-1alien.txz
-14.2/5/x86_64/kde/telepathy/ktp-approver-16.04.3-x86_64-1alien.txz
-14.2/5/x86_64/kde/telepathy/ktp-auth-handler-16.04.3-x86_64-1alien.txz
-14.2/5/x86_64/kde/telepathy/ktp-call-ui-16.04.3-x86_64-1alien.txz
-14.2/5/x86_64/kde/telepathy/ktp-common-internals-16.04.3-x86_64-1alien.txz
-14.2/5/x86_64/kde/telepathy/ktp-contact-list-16.04.3-x86_64-1alien.txz
-14.2/5/x86_64/kde/telepathy/ktp-contact-runner-16.04.3-x86_64-1alien.txz
-14.2/5/x86_64/kde/telepathy/ktp-desktop-applets-16.04.3-x86_64-1alien.txz
-14.2/5/x86_64/kde/telepathy/ktp-filetransfer-handler-16.04.3-x86_64-1alien.txz
-14.2/5/x86_64/kde/telepathy/ktp-kded-module-16.04.3-x86_64-1alien.txz
-14.2/5/x86_64/kde/telepathy/ktp-send-file-16.04.3-x86_64-1alien.txz
-14.2/5/x86_64/kde/telepathy/ktp-text-ui-16.04.3-x86_64-1alien.txz
-14.2/5/x86_64/kde/telepathy/signon-kwallet-extension-16.04.3-x86_64-1alien.txz
-14.2/5/x86_64/kdei/kde-l10n-ar-16.04.3-noarch-1alien.txz
-14.2/5/x86_64/kdei/kde-l10n-ast-16.04.3-noarch-1alien.txz
-14.2/5/x86_64/kdei/kde-l10n-bg-16.04.3-noarch-1alien.txz
-14.2/5/x86_64/kdei/kde-l10n-bs-16.04.3-noarch-1alien.txz
-14.2/5/x86_64/kdei/kde-l10n-ca-16.04.3-noarch-1alien.txz
-14.2/5/x86_64/kdei/kde-l10n-ca@valencia-16.04.3-noarch-1alien.txz
-14.2/5/x86_64/kdei/kde-l10n-cs-16.04.3-noarch-1alien.txz
-14.2/5/x86_64/kdei/kde-l10n-da-16.04.3-noarch-1alien.txz
-14.2/5/x86_64/kdei/kde-l10n-de-16.04.3-noarch-1alien.txz
-14.2/5/x86_64/kdei/kde-l10n-el-16.04.3-noarch-1alien.txz
-14.2/5/x86_64/kdei/kde-l10n-en_GB-16.04.3-noarch-1alien.txz
-14.2/5/x86_64/kdei/kde-l10n-eo-16.04.3-noarch-1alien.txz
-14.2/5/x86_64/kdei/kde-l10n-es-16.04.3-noarch-1alien.txz
-14.2/5/x86_64/kdei/kde-l10n-et-16.04.3-noarch-1alien.txz
-14.2/5/x86_64/kdei/kde-l10n-eu-16.04.3-noarch-1alien.txz
-14.2/5/x86_64/kdei/kde-l10n-fa-16.04.3-noarch-1alien.txz
-14.2/5/x86_64/kdei/kde-l10n-fi-16.04.3-noarch-1alien.txz
-14.2/5/x86_64/kdei/kde-l10n-fr-16.04.3-noarch-1alien.txz
-14.2/5/x86_64/kdei/kde-l10n-ga-16.04.3-noarch-1alien.txz
-14.2/5/x86_64/kdei/kde-l10n-gl-16.04.3-noarch-1alien.txz
-14.2/5/x86_64/kdei/kde-l10n-he-16.04.3-noarch-1alien.txz
-14.2/5/x86_64/kdei/kde-l10n-hi-16.04.3-noarch-1alien.txz
-14.2/5/x86_64/kdei/kde-l10n-hr-16.04.3-noarch-1alien.txz
-14.2/5/x86_64/kdei/kde-l10n-hu-16.04.3-noarch-1alien.txz
-14.2/5/x86_64/kdei/kde-l10n-ia-16.04.3-noarch-1alien.txz
-14.2/5/x86_64/kdei/kde-l10n-id-16.04.3-noarch-1alien.txz
-14.2/5/x86_64/kdei/kde-l10n-is-16.04.3-noarch-1alien.txz
-14.2/5/x86_64/kdei/kde-l10n-it-16.04.3-noarch-1alien.txz
-14.2/5/x86_64/kdei/kde-l10n-ja-16.04.3-noarch-1alien.txz
-14.2/5/x86_64/kdei/kde-l10n-kk-16.04.3-noarch-1alien.txz
-14.2/5/x86_64/kdei/kde-l10n-km-16.04.3-noarch-1alien.txz
-14.2/5/x86_64/kdei/kde-l10n-ko-16.04.3-noarch-1alien.txz
-14.2/5/x86_64/kdei/kde-l10n-lt-16.04.3-noarch-1alien.txz
-14.2/5/x86_64/kdei/kde-l10n-lv-16.04.3-noarch-1alien.txz
-14.2/5/x86_64/kdei/kde-l10n-mr-16.04.3-noarch-1alien.txz
-14.2/5/x86_64/kdei/kde-l10n-nb-16.04.3-noarch-1alien.txz
-14.2/5/x86_64/kdei/kde-l10n-nds-16.04.3-noarch-1alien.txz
-14.2/5/x86_64/kdei/kde-l10n-nl-16.04.3-noarch-1alien.txz
-14.2/5/x86_64/kdei/kde-l10n-nn-16.04.3-noarch-1alien.txz
-14.2/5/x86_64/kdei/kde-l10n-pa-16.04.3-noarch-1alien.txz
-14.2/5/x86_64/kdei/kde-l10n-pl-16.04.3-noarch-1alien.txz
-14.2/5/x86_64/kdei/kde-l10n-pt-16.04.3-noarch-1alien.txz
-14.2/5/x86_64/kdei/kde-l10n-pt_BR-16.04.3-noarch-1alien.txz
-14.2/5/x86_64/kdei/kde-l10n-ro-16.04.3-noarch-1alien.txz
-14.2/5/x86_64/kdei/kde-l10n-ru-16.04.3-noarch-1alien.txz
-14.2/5/x86_64/kdei/kde-l10n-sk-16.04.3-noarch-1alien.txz
-14.2/5/x86_64/kdei/kde-l10n-sl-16.04.3-noarch-1alien.txz
-14.2/5/x86_64/kdei/kde-l10n-sr-16.04.3-noarch-1alien.txz
-14.2/5/x86_64/kdei/kde-l10n-sv-16.04.3-noarch-1alien.txz
-14.2/5/x86_64/kdei/kde-l10n-tr-16.04.3-noarch-1alien.txz
-14.2/5/x86_64/kdei/kde-l10n-ug-16.04.3-noarch-1alien.txz
-14.2/5/x86_64/kdei/kde-l10n-uk-16.04.3-noarch-1alien.txz
-14.2/5/x86_64/kdei/kde-l10n-wa-16.04.3-noarch-1alien.txz
-14.2/5/x86_64/kdei/kde-l10n-zh_CN-16.04.3-noarch-1alien.txz
-14.2/5/x86_64/kdei/kde-l10n-zh_TW-16.04.3-noarch-1alien.txz
diff --git a/README.5_16.07 b/README.5_16.07
deleted file mode 100644
index 1986fbc..0000000
--- a/README.5_16.07
+++ /dev/null
@@ -1,235 +0,0 @@
-KDE5
-====
-
-Here is KDE 5_16.07 for Slackware, consisting of the KDE Frameworks 5.24.0,
-Plasma 5.7.2 and Applications 16.04.3 on top of Qt 5.6.1.
-
-Upgrading from the previous 5_16.06 should be straight-forward.
-KDE-5_16.07 is meant to be installed on top of Slackware 14.2 or -current.
-It will *replace* any version of KDE 4 you might have installed!
-
-What is the NEWS in this batch of updates:
-- Frameworks 5.24.0 is an enhancement release.
- See https://www.kde.org/announcements/kde-frameworks-5.24.0.php
-- Plasma 5.7.2 is an incremental bug fix release for the 5.7 series which
- I released as a Slackware Live Edition a few weeks back.
- See https://www.kde.org/announcements/plasma-5.7.2.php
-- Applications 16.04.3 is a stability upgrade for 16.04 with just
- bugs fixed, no new functionality.
- See https://www.kde.org/announcements/announce-applications-16.04.3.php .
-- Several Qt5 related 'deps' have been recompiled or upgraded: sni-qt,
- qca-qt5, PyQt5, polkit-qt5-1, phonon, grantlee and qt-gstreamer. The sip
- package has been removed from 'deps' because Slackware 14.2 now has a
- proper version of that.
-- The 'noto-font-ttf' package was rebuilt because the VERSION number contained
- dashes, which created an illegal package name. You have to remove the old
- package manually.
-- A new 'libinput' package was added as dependency for Qt5. It will be needed
- in future by KWin. FYI: a X.Org driver 'xf86-input-libinput' exists as a
- wrapper around libinput that can replace evdev and synaptics drivers.
-
-Further points of interest:
-- kde/kde4-extragear packages should be taken from slackware-current
- (calligra, k3b, kaudiocreator, kplayer, kwebkitpart, oxygen-gtk2,
- kdevplatform, kdevelop-pg-qt, kdevelop, kdev-python, kdevelop-php,
- kdevelop-php-docs, partitionmanager)
-- Lots of packages in the 'deps' department are completely new to Slackware.
- Since KDE 5 aka Plasma 5 is built on Qt5 (KDE 4 uses Qt4 as its base)
- you'll find many Qt5 related packages. Also, in order for Qt4 and GTK based
- applications to dock into the Plasma 5 system tray, more dependencies were
- needed. So, apart from updates to regular Slackware packages and the
- new telepathy support packages (see below), these are the new ones:
- OpenAL, PyQT5, cfitsio, grantlee-qt4, json-glib, libappindicator,
- libdbusmenu-gtk, libdbusmenu-qt5, libindicator, libxkbcommon, lmdb,
- noto-font-ttf, noto-cjk-font-ttf, polkit-qt5-1, qca-qt5, qt-gstreamer,
- qt5, qt5-webkit, sni-qt and wayland. The phonon package was extended so
- that it now supports both Qt4 and Qt5.
-- A completely new subset of "deps" packages, contained in their own
- "telepathy" subdirectory, needed for KDE Telepathy:
- libotr, libnice, farstream, libaccounts-glib, libaccounts-qt5,
- signon, signon-plugin-oauth2, signon-ui, libsignon-glib,
- telepathy-glib, telepathy-farstream, telepathy-haze, telepathy-gabble,
- telepathy-qt5, telepathy-logger, telepathy-logger-qt5,
- telepathy-mission-control and telepathy-accounts-signon.
-- Telepathy for KDE packages are found in their own subdirectory kde/telepathy .
-- Also worth mentioning: the KF5 ports of ktorrent and skanlite can be found
- in the applications-extra directory. And kjots, previously contained in
- KDE PIM, is separated into its own package in the kde/applications directory.
-
-NOTE:
-Also explained in more detail below, upgrading to this KDE 5 is non-trivial.
-You will have to remove old KDE 4 packages manually. If you do not have KDE
-installed at all, you will have to *install* some of Slackware's own KDE 4
-packages manually.
-
-NOTE:
-If you decide to install these packages on top of a fresh installation of
- Slackware 14.2 or -current and have excluded all packages in the 'KDE'
- package series during installation, you will be missing several add-on
- packages, some of these are essential to the proper functioning of KDE!
- If you excluded the complete Slackware 'KDE' series, then you
- can optionally install these Slackware packages as well:
- * amarok
- * calligra
- * k3b
- * kaudiocreator
- * kplayer
- * kwebkitpart
- * kdevplatform
- * kdevelop-pg-qt
- * kdevelop
- * kdev-python
- * kdevelop-php
- * kdevelop-php-docs
- * oxygen-gtk2
-
-NOTE:
-If you had installed KDE 4 previously as your default desktop, the removal
-of KDE 4 packages will break the symbolic link '/etc/X11/xinit/xinitrc'.
-An attempt to run 'startx' in a console will fail with a black screen.
-After installing Plasma 5 for the first time, you need to run 'xwmconfig'
-and select 'xinitrc.plasma' as your desktop session.
-
--------------------------------------------------------------------------------
-Install pre-compiled packages:
--------------------------------------------------------------------------------
-
-In order to install or upgrade KDE 5, follow these steps:
-
-Make sure you are not running KDE or even X ! If you are running an X session,
-log out first, and if you are in runlevel 4 (graphical login) you first have to
-go back to runlevel 3 (console) by typing "init 3".
-
-If you still have a KDE 4 installed, it must be removed first. No clean
-upgrade path can be provided! Do as follows:
-
-If you have Slackware 14.2 or -current's default KDE 4.14.3 installed:
- # removepkg /var/log/packages/*-4.14.3-*
- # removepkg libkscreen
- # removepkg kscreen
- # removepkg kactivities
- # removepkg kde-workspace
- # removepkg libmm-qt
- # removepkg libnm-qt
- # removepkg plasma-nm
- # removepkg polkit-kde-agent-1
- # removepkg polkit-kde-kcmodules-1
- # removepkg kdeconnect-kde
- ..or instead of the above, simply '# slackpkg remove kde' and de-select
- the packages you want to keep (amarok, calligra, k3b etc).
-
-If you have my 'ktown' set of KDE 5_16.06 installed:
-- Upgrade to KDE 5_16.07
- Remove the packages that no longer exist in KDE 5_16.07:
- * removepkg /var/log/packages/noto-font-ttf-2015-09-29-noarch-1alien
-
-If you have my 'ktown' set of KDE 5_16.05 installed:
-- No further actions are needed.
-
-If you have my 'ktown' set of KDE 5_16.04 installed:
-- No further actions are needed.
-
-If you have my 'ktown' set of KDE 5_16.03 installed:
-- Upgrade to KDE 5_16.04
- Remove the packages that no longer exist in KDE 5_16.04:
- * removepkg kactivities-workspace
-
-If you have my 'ktown' set of KDE 5_16.02 installed:
-- No further actions are needed.
-
-If you have my 'ktown' set of KDE 5_16.01 installed:
-- No further actions are needed.
-
-Then proceed with installing/upgrading KDE 5 as outlined below.
-
-To make it easy for you, here is a one-line command that downloads the whole
-'5' directory (excluding the sources), with 32-bit and 64-bit packages
-(and be careful of the 'dot' at the end of that command, it is part of the
-commandline !!):
-
- # rsync -av rsync://alien.slackbook.org/alien/ktown/current/5 .
-
-Or else, if you want to download packages for just one of the two supported
-architectures, you would run one of the following commands instead (note that
-there is a dot at the end of these commands!).
-
-If you want only the 64-bit packages:
- # rsync -av --exclude=x86 rsync://alien.slackbook.org/alien/ktown/current/5 .
-If you want only the 32-bit packages:
- # rsync -av --exclude=x86_64 rsync://alien.slackbook.org/alien/ktown/current/5 .
-
-Assuming you just downloaded the bits you want from the directory tree
-"5", you must now change your current directory to where you found this
-README (which is the directory called '5'). If you used one of the
-above "rsync" commands then you can simply do:
-
- # cd 5
-
-From within this directory, you run the following commands as root (note that
-some of the old KDE package names are obsoleted now, they have been split up,
-renamed or integrated and that is the reason for the 'removepkg' lines):
-
- On Slackware 32-bit:
- # upgradepkg --reinstall --install-new x86/deps/*.t?z
- # upgradepkg --reinstall --install-new x86/deps/telepathy/*.t?z
- # upgradepkg --reinstall --install-new x86/kde/*/*.t?z
-
- On Slackware 64-bit:
- # upgradepkg --reinstall --install-new x86_64/deps/*.t?z
- # upgradepkg --reinstall --install-new x86_64/deps/telepathy/*.t?z
- # upgradepkg --reinstall --install-new x86_64/kde/*/*.t?z
-
- If you already have one or more non-english language packs installed:
-
- On Slackware 32-bit:
- # upgradepkg x86/kdei/*.t?z
-
- On Slackware 64-bit:
- # upgradepkg x86_64/kdei/*.t?z
-
- If you want to have a non-english language pack installed but none is
- currently installed, substitute your country code instead of the 'XX'
- in the next command:
- # upgradepkg --install-new x86_64/kdei/kde-l10n-XX-*.t?z
-
- Check if any ".new" configuration files have been left behind by
- the upgradepkg commands. Compare them to their originals and decide
- if you need to use them.
- # find /etc/ -name "*.new"
- A graphical (ncurses) tool for processing these "*.new" files is slackpkg:
- # slackpkg new-config
-
-Then reboot your system.
-
-If all you want is to install the packages I created, then you can skip the
-remainder of the README which details how to (re)compile the packages from
-their sources; it is not required reading material.
-
--------------------------------------------------------------------------------
-Building it all from source:
--------------------------------------------------------------------------------
-
-Sources and scripts are separated from the packages in my 'ktown' repository.
-If you want the sources for KDE 5, run the following command to download them:
-
- # rsync -av rsync://alien.slackbook.org/alien/ktown/source/5 .
-
-There are a lot of 'dependencies' for KDE 5 which you'll have to compile and
-install before attempting to compile KDE 5. Compiling and installing these
-dependencies on Slackware-current is as easy as:
- # cd 5/deps
- # ./updates.SlackBuild
- # cd -
-
-Be prepared to wait a *long* time since this will compile a new Qt5 package
-among others. The finished package will be stored in /tmp .
-
-Then if you want to compile the KDE packages on your computer, run:
- # cd 5/kde
- # ./KDE.SlackBuild
-
-Wait a long time, and you will find the new packages in /tmp/kde-build .
-Note that these packages will already have been installed by KDE.SlackBuild !
-
-==============================================================================
- Eric Hameleers / alien at slackware dot com / 22-jul-2016
diff --git a/deps/.qt5_updates b/deps/.qt5_updates
new file mode 100644
index 0000000..f221c63
--- /dev/null
+++ b/deps/.qt5_updates
@@ -0,0 +1,3 @@
+#sni-qt qca-qt5 qt-gstreamer phonon PyQt5 polkit-qt5-1 grantlee poppler libdbusmenu-qt5
+# 20170620 after qt5 & qt5-webkit:
+OpenAL qt-gstreamer phonon PyQt5 polkit-qt5-1 grantlee poppler libdbusmenu-qt5 qca-qt5 qtav wayland
diff --git a/deps/ConsoleKit2/ConsoleKit2.SlackBuild b/deps/ConsoleKit2/ConsoleKit2.SlackBuild
new file mode 100755
index 0000000..c57eea6
--- /dev/null
+++ b/deps/ConsoleKit2/ConsoleKit2.SlackBuild
@@ -0,0 +1,152 @@
+#!/bin/sh
+
+# Slackware build script for ConsoleKit
+
+# Copyright 2009, 2015 Robby Workman, Northport, Alabama, USA
+# Copyright 2010, 2015, 2017 Eric Hameleers, Eindhoven, NL
+# Copyright 2010 Patrick J. Volkerding, Sebeka, MN, USA
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ''AS IS'' AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+PKGNAM=ConsoleKit2
+VERSION=${VERSION:-1.2.1}
+BUILD=${BUILD:-1}
+
+NUMJOBS=${NUMJOBS:--j7}
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+PKG=$TMP/package-$PKGNAM
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$(uname -m)" in
+ i?86) ARCH=i586 ;;
+ arm*) readelf /usr/bin/file -A | egrep -q "Tag_CPU.*[4,5]" && ARCH=arm || ARCH=armv7hl ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) ARCH=$(uname -m) ;;
+ esac
+ export ARCH
+fi
+
+if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+ SLKLDFLAGS=""
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
+ SLKLDFLAGS=""
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ SLKLDFLAGS="-L/usr/lib64"
+ LIBDIRSUFFIX="64"
+elif [ "$ARCH" = "armv7hl" ]; then
+ SLKCFLAGS="-O3 -march=armv7-a -mfpu=vfpv3-d16"
+ SLKLDFLAGS=""
+ LIBDIRSUFFIX=""
+else
+ SLKCFLAGS="-O2"
+ SLKLDFLAGS=""
+ LIBDIRSUFFIX=""
+fi
+
+case "$ARCH" in
+ arm*) TARGET=$ARCH-slackware-linux-gnueabi ;;
+ *) TARGET=$ARCH-slackware-linux ;;
+esac
+
+rm -rf $PKG
+mkdir -p $TMP $PKG
+cd $TMP
+rm -rf $PKGNAM-$VERSION
+tar xvf $CWD/$PKGNAM-$VERSION.tar.?z* || exit 1
+cd $PKGNAM-$VERSION || exit 1
+
+chown -R root:root .
+find . \
+ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \;
+
+[ ! -x configure ] && ./autogen.sh
+
+CFLAGS="$SLKCFLAGS" \
+CXXFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --sysconfdir=/etc \
+ --localstatedir=/var \
+ --mandir=/usr/man \
+ --docdir=/usr/doc/$PKGNAM-$VERSION \
+ --with-rundir=/var/run \
+ --with-pid-file=/var/run/ConsoleKit/pid \
+ --enable-docbook-docs \
+ --enable-pam-module=no \
+ --enable-udev-acl \
+ --disable-static \
+ --build=$TARGET
+
+make $NUMJOBS || make || exit 1
+make install DESTDIR=$PKG
+
+# Let's not clobber config files
+mv $PKG/etc/ConsoleKit/seats.d/00-primary.seat \
+ $PKG/etc/ConsoleKit/seats.d/00-primary.seat.new
+
+# Add an init script
+mkdir -p $PKG/etc/rc.d
+cat $CWD/rc.consolekit > $PKG/etc/rc.d/rc.consolekit.new
+chmod 0755 $PKG/etc/rc.d/rc.consolekit.new
+
+# Remove unused xinitrc.d script:
+rm -r $PKG/etc/X11/xinit/xinitrc.d
+
+find $PKG | xargs file | grep -e "executable" -e "shared object" \
+ | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+
+# Compress manual pages:
+find $PKG/usr/man -type f -exec gzip -9 {} \;
+for i in $( find $PKG/usr/man -type l ) ; do
+ ln -s $( readlink $i ).gz $i.gz
+ rm $i
+done
+
+mkdir -p $PKG/usr/doc/$PKGNAM-$VERSION
+cp -a \
+ AUTHORS COPYING HACKING INSTALL NEWS README TODO \
+ $PKG/usr/doc/$PKGNAM-$VERSION
+
+# If there's a ChangeLog, installing at least part of the recent history
+# is useful, but don't let it get totally out of control:
+if [ -r ChangeLog ]; then
+ DOCSDIR=$(echo $PKG/usr/doc/*-$VERSION)
+ cat ChangeLog | head -n 1000 > $DOCSDIR/ChangeLog
+ touch -r ChangeLog $DOCSDIR/ChangeLog
+fi
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+cat $CWD/doinst.sh > $PKG/install/doinst.sh
+
+cd $PKG
+/sbin/makepkg -l y -c n $TMP/$PKGNAM-$VERSION-$ARCH-$BUILD.txz
+
diff --git a/deps/ConsoleKit2/doinst.sh b/deps/ConsoleKit2/doinst.sh
new file mode 100644
index 0000000..c13a36e
--- /dev/null
+++ b/deps/ConsoleKit2/doinst.sh
@@ -0,0 +1,27 @@
+config() {
+ NEW="$1"
+ OLD="$(dirname $NEW)/$(basename $NEW .new)"
+ # If there's no config file by that name, mv it over:
+ if [ ! -r $OLD ]; then
+ mv $NEW $OLD
+ elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then
+ # toss the redundant copy
+ rm $NEW
+ fi
+ # Otherwise, we leave the .new copy for the admin to consider...
+}
+
+preserve_perms() {
+ NEW="$1"
+ OLD="$(dirname $NEW)/$(basename $NEW .new)"
+ if [ -e $OLD ]; then
+ cp -a $OLD ${NEW}.incoming
+ cat $NEW > ${NEW}.incoming
+ mv ${NEW}.incoming $NEW
+ fi
+ config $NEW
+}
+
+config etc/ConsoleKit/seats.d/00-primary.seat.new
+preserve_perms etc/rc.d/rc.consolekit.new
+
diff --git a/deps/ConsoleKit2/rc.consolekit b/deps/ConsoleKit2/rc.consolekit
new file mode 100644
index 0000000..a193756
--- /dev/null
+++ b/deps/ConsoleKit2/rc.consolekit
@@ -0,0 +1,34 @@
+#!/bin/sh
+#
+# /etc/rc.d/rc.consolekit
+#
+# Start/stop consolekit-kit daemon.
+#
+# This daemon is used by polkit's console auth agent.
+
+# Start consolekit:
+ck_start() {
+ echo "Starting ConsoleKit daemon: /usr/sbin/console-kit-daemon"
+ /usr/sbin/console-kit-daemon
+}
+
+# Stop consolekit:
+ck_stop() {
+ if [ -r /var/run/ConsoleKit/pid ]; then
+ kill -HUP $(cat /var/run/ConsoleKit/pid)
+ rm -f /var/run/ConsoleKit/pid
+ else
+ killall -HUP -q console-kit-daemon
+ fi
+}
+
+case "$1" in
+'start')
+ ck_start
+ ;;
+'stop')
+ ck_stop
+ ;;
+*)
+ echo "Usage: $0 start|stop"
+esac
diff --git a/kde/slack-desc/polkit-qt-1 b/deps/ConsoleKit2/slack-desc
index ed2cf40..508b732 100644
--- a/kde/slack-desc/polkit-qt-1
+++ b/deps/ConsoleKit2/slack-desc
@@ -6,14 +6,14 @@
# customary to leave one space after the ':'.
|-----handy-ruler-----------------------------------------------------|
-polkit-qt-1: polkit-qt-1 (Qt polkit API wrapper)
-polkit-qt-1:
-polkit-qt-1: polkit-qt-1 aims to make it easy for Qt developers to take advantage
-polkit-qt-1: of the polkit API. It is a convenience wrapper around QAction and
-polkit-qt-1: QAbstractButton that lets you integrate those two components
-polkit-qt-1: easily with polkit.
-polkit-qt-1:
-polkit-qt-1: Homepage: http://techbase.kde.org/Polkit-Qt-1
-polkit-qt-1:
-polkit-qt-1:
-polkit-qt-1:
+ConsoleKit2: ConsoleKit2 (user, login, and seat tracking framework)
+ConsoleKit2:
+ConsoleKit2: ConsoleKit2 is a framework for defining and tracking users, login
+ConsoleKit2: sessions, and seats.
+ConsoleKit2:
+ConsoleKit2: Homepage: https://github.com/ConsoleKit2/ConsoleKit2
+ConsoleKit2:
+ConsoleKit2:
+ConsoleKit2:
+ConsoleKit2:
+ConsoleKit2:
diff --git a/deps/OpenAL/.url b/deps/OpenAL/.url
index 24b3189..ddc7105 100644
--- a/deps/OpenAL/.url
+++ b/deps/OpenAL/.url
@@ -1 +1,2 @@
-http://kcat.strangesoft.net/openal-releases/openal-soft-1.17.1.tar.bz2
+http://kcat.strangesoft.net/openal-releases/openal-soft-1.18.2.tar.bz2
+
diff --git a/deps/OpenAL/OpenAL.SlackBuild b/deps/OpenAL/OpenAL.SlackBuild
index 66f98b3..d6c79c5 100755
--- a/deps/OpenAL/OpenAL.SlackBuild
+++ b/deps/OpenAL/OpenAL.SlackBuild
@@ -1,6 +1,6 @@
#!/bin/sh
# Copyright 2014 Patrick J. Volkerding, Sebeka, MN, USA
-# Copyright 2012, 2013, 2014, 2015 Eric Hameleers, Eindhoven, NL
+# Copyright 2012, 2013, 2014, 2015, 2017 Eric Hameleers, Eindhoven, NL
# All rights reserved.
#
# Permission to use, copy, modify, and distribute this software for
@@ -25,46 +25,47 @@
PKGNAM=OpenAL
SRCNAM=openal-soft
-VERSION=${VERSION:-1.17.1}
-BUILD=${BUILD:-2}
-NUMJOBS=${NUMJOBS:" -j4 "}
+VERSION=${VERSION:-1.18.2}
+BUILD=${BUILD:-1}
+NUMJOBS=${NUMJOBS:-" -j4 "}
CWD=$(pwd)
TMP=${TMP:-/tmp}
PKG=$TMP/package-$PKGNAM
-if [ -e $CWD/machine.conf ]; then
- . $CWD/machine.conf ]
-elif [ -e /etc/slackbuild/machine.conf ]; then
- . /etc/slackbuild/machine.conf ]
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$(uname -m)" in
+ i?86) ARCH=i586 ;;
+ arm*) readelf /usr/bin/file -A | egrep -q "Tag_CPU.*[4,5]" && ARCH=arm || ARCH=armv7hl ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) ARCH=$(uname -m) ;;
+ esac
+ export ARCH
+fi
+
+# Set CFLAGS/CXXFLAGS and LIBDIRSUFFIX:
+if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "s390" ]; then
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+elif [ "$ARCH" = "arm" ]; then
+ SLKCFLAGS="-O2 -march=armv5te"
+ LIBDIRSUFFIX=""
else
- # Automatically determine the architecture we're building on:
- MARCH=$( uname -m )
- if [ -z "$ARCH" ]; then
- case "$MARCH" in
- i?86) export ARCH=i486 ;;
- arm*) export ARCH=arm ;;
- # Unless $ARCH is already set, use uname -m for all other archs:
- *) export ARCH=$MARCH ;;
- esac
- fi
- # Set CFLAGS/CXXFLAGS and LIBDIRSUFFIX:
- if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
- LIBDIRSUFFIX=""
- elif [ "$ARCH" = "s390" ]; then
- SLKCFLAGS="-O2"
- LIBDIRSUFFIX=""
- elif [ "$ARCH" = "x86_64" ]; then
- SLKCFLAGS="-O2 -fPIC"
- LIBDIRSUFFIX="64"
- elif [ "$ARCH" = "arm" ]; then
- SLKCFLAGS="-O2 -march=armv5te"
- LIBDIRSUFFIX=""
- else
- SLKCFLAGS="-O2"
- LIBDIRSUFFIX=""
- fi
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
fi
rm -rf $PKG
@@ -100,7 +101,9 @@ install -m0644 alsoftrc.sample $PKG/etc/openal/alsoft.conf.sample
# Add documentation:
mkdir -p $PKG/usr/doc/$PKGNAM-$VERSION
-cp -a COPYING README env-vars.txt hrtf.txt $PKG/usr/doc/$PKGNAM-$VERSION || true
+cp -a \
+ COPYING ChangeLog README XCompile.txt docs/*.txt \
+ $PKG/usr/doc/$PKGNAM-$VERSION || true
chown -R root:root $PKG/usr/doc/$PKGNAM-$VERSION
find $PKG/usr/doc -type f -exec chmod 644 {} \;
diff --git a/deps/PyQt/.url b/deps/PyQt/.url
new file mode 100644
index 0000000..7db5c55
--- /dev/null
+++ b/deps/PyQt/.url
@@ -0,0 +1 @@
+http://sourceforge.net/projects/pyqt/files/PyQt4/PyQt-4.12.1/PyQt4_gpl_x11-4.12.1.tar.gz
diff --git a/deps/PyQt/PyQt.SlackBuild b/deps/PyQt/PyQt.SlackBuild
new file mode 100755
index 0000000..22428c6
--- /dev/null
+++ b/deps/PyQt/PyQt.SlackBuild
@@ -0,0 +1,119 @@
+#!/bin/sh
+
+# Slackware build script for PyQt
+
+# Copyright 2008 Aleksandar Samardzic <asamardzic@gmail.com>
+# Copyright 2008, 2009, 2010, 2011 Patrick J. Volkerding, Sebeka, MN, USA
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ''AS IS'' AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+# Modified by Robby Workman <rworkman@slackware.com>
+# Modified by Eric Hameleers <alien@slackware.com>
+
+PKGNAM=PyQt
+VERSION=${VERSION:-4.12.1}
+BUILD=${BUILD:-1}
+
+NUMJOBS=${NUMJOBS:--j7}
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+PKG=$TMP/package-$PKGNAM
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$(uname -m)" in
+ i?86) ARCH=i586 ;;
+ arm*) readelf /usr/bin/file -A | egrep -q "Tag_CPU.*[4,5]" && ARCH=arm || ARCH=armv7hl ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) ARCH=$(uname -m) ;;
+ esac
+ export ARCH
+fi
+
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+elif [ "$ARCH" = "armv7hl" ]; then
+ SLKCFLAGS="-O2 -march=armv7-a -mfpu=vfpv3-d16"
+else
+ SLKCFLAGS="-O2"
+fi
+
+PYTHONLIB=$( python -c 'from distutils.sysconfig import get_python_lib; print(get_python_lib())' 2>/dev/null )
+PYTHON3LIB=$( python3 -c 'from distutils.sysconfig import get_python_lib; print(get_python_lib())' 2>/dev/null )
+
+rm -rf $PKG
+mkdir -p $TMP $PKG $OUTPUT
+cd $TMP
+
+rm -rf ${PKGNAM}4_gpl_x11-$VERSION
+tar xvf $CWD/${PKGNAM}4_gpl_x11-$VERSION.tar.?z* || exit 1
+cd ${PKGNAM}4_gpl_x11-$VERSION || exit 1
+
+# Fix phonon detection:
+cat $CWD/$PKGNAM.phonon.diff | patch -p1 --verbose || exit 1
+
+chown -R root:root .
+find . \
+ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \;
+
+# This avoids compiling a version number into KDE's .la files:
+export QTDIR=/usr/lib${LIBDIRSUFFIX}/qt
+
+export CFLAGS="$SLKCFLAGS"
+export CXXFLAGS="$SLKCFLAGS"
+
+if [ -n "${PYTHON3LIB}" ]; then
+ python3 configure.py --confirm-license --verbose
+ make $NUMJOBS || make || exit 1
+ make install DESTDIR=$PKG INSTALL_ROOT=$PKG || exit 1
+ make clean
+
+ mv $PKG/usr/bin/pyuic4 $PKG/usr/bin/pyuic4-py3
+ rm -rf $PKG/$PYTHON3LIB/${PKGNAM}4/uic/port_v2/
+fi
+
+python configure.py --confirm-license --verbose
+
+make $NUMJOBS || make || exit 1
+make install DESTDIR=$PKG INSTALL_ROOT=$PKG || exit 1
+
+rm -rf $PKG/$PYTHONLIB/${PKGNAM}4/uic/port_v3/
+
+find $PKG | xargs file | grep -e "executable" -e "shared object" \
+ | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+
+mkdir -p $PKG/usr/doc/$PKGNAM-$VERSION
+cp -a \
+ GPL_EXCEPTION*.TXT LICENSE.* NEWS OPENSOURCE-NOTICE.TXT README THANKS doc/* \
+ $PKG/usr/doc/$PKGNAM-$VERSION
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+cd $PKG
+/sbin/makepkg -l y -c n $TMP/$PKGNAM-$(echo $VERSION |tr - _)-$ARCH-$BUILD.txz
+
diff --git a/deps/PyQt/PyQt.phonon.diff b/deps/PyQt/PyQt.phonon.diff
new file mode 100644
index 0000000..feda650
--- /dev/null
+++ b/deps/PyQt/PyQt.phonon.diff
@@ -0,0 +1,11 @@
+--- PyQt-x11-gpl-4.6.2/configure.py.orig 2010-01-08 23:39:46.000000000 +0100
++++ PyQt-x11-gpl-4.6.2/configure.py 2010-01-08 23:45:18.000000000 +0100
+@@ -451,7 +451,7 @@
+ generate_code("QtXmlPatterns")
+
+ if "phonon" in pyqt_modules:
+- generate_code("phonon")
++ generate_code("phonon", extra_include_dirs=["/usr/include/phonon"])
+
+ if "QtAssistant" in pyqt_modules:
+ generate_code("QtAssistant")
diff --git a/deps/PyQt/slack-desc b/deps/PyQt/slack-desc
new file mode 100644
index 0000000..f713c87
--- /dev/null
+++ b/deps/PyQt/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|'
+# on the right side marks the last column you can put a character in. You must
+# make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+PyQt: PyQt (Python bindings for Qt)
+PyQt:
+PyQt: PyQt is a set of Python bindings for Trolltech's Qt application
+PyQt: framework and runs on all platforms supported by Qt.
+PyQt:
+PyQt: Homepage: http://www.riverbankcomputing.co.uk/software/pyqt/
+PyQt:
+PyQt:
+PyQt:
+PyQt:
+PyQt:
diff --git a/deps/PyQt5/.url b/deps/PyQt5/.url
index a73d338..ebc1ebc 100644
--- a/deps/PyQt5/.url
+++ b/deps/PyQt5/.url
@@ -1,2 +1,2 @@
-https://sourceforge.net/projects/pyqt/files/PyQt5/PyQt-5.7/PyQt5_gpl-5.7.tar.gz
+https://sourceforge.net/projects/pyqt/files/PyQt5/PyQt-5.9.2/PyQt5_gpl-5.9.2.tar.gz
diff --git a/deps/PyQt5/PyQt5.SlackBuild b/deps/PyQt5/PyQt5.SlackBuild
index b0b39b3..66f7b09 100755
--- a/deps/PyQt5/PyQt5.SlackBuild
+++ b/deps/PyQt5/PyQt5.SlackBuild
@@ -3,7 +3,7 @@
# Slackware build script for PyQt
# Copyright 2008 Aleksandar Samardzic <asamardzic@gmail.com>
-# Copyright 2008, 2009, 2010, 2011, 2015, 2016 Patrick J. Volkerding, Sebeka, MN, USA
+# Copyright 2008, 2009, 2010, 2011, 2015, 2016, 2017 Patrick J. Volkerding, Sebeka, MN, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -27,29 +27,30 @@
# Modified by Eric Hameleers <alien@slackware.com>
PKGNAM=PyQt5
-VERSION=${VERSION:-5.7}
-BUILD=${BUILD:-1}
+VERSION=${VERSION:-5.9.2}
+BUILD=${BUILD:-2}
NUMJOBS=${NUMJOBS:--j7}
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+PKG=$TMP/package-$PKGNAM
+
# Automatically determine the architecture we're building on:
-MARCH=$( uname -m )
if [ -z "$ARCH" ]; then
- case "$MARCH" in
- i?86) export ARCH=i486 ;;
- armv7hl) export ARCH=$MARCH ;;
- arm*) export ARCH=arm ;;
+ case "$(uname -m)" in
+ i?86) ARCH=i586 ;;
+ arm*) readelf /usr/bin/file -A | egrep -q "Tag_CPU.*[4,5]" && ARCH=arm || ARCH=armv7hl ;;
# Unless $ARCH is already set, use uname -m for all other archs:
- *) export ARCH=$MARCH ;;
+ *) ARCH=$(uname -m) ;;
esac
+ export ARCH
fi
-CWD=$(pwd)
-TMP=${TMP:-/tmp}
-PKG=$TMP/package-$PKGNAM
-
if [ "$ARCH" = "i486" ]; then
SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+elif [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
elif [ "$ARCH" = "x86_64" ]; then
@@ -60,6 +61,9 @@ else
SLKCFLAGS="-O2"
fi
+PYTHONLIB=$( python -c 'from distutils.sysconfig import get_python_lib; print(get_python_lib())' 2>/dev/null )
+PYTHON3LIB=$( python3 -c 'from distutils.sysconfig import get_python_lib; print(get_python_lib())' 2>/dev/null )
+
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
@@ -67,10 +71,6 @@ rm -rf ${PKGNAM}_gpl-$VERSION
tar xvf $CWD/${PKGNAM}_gpl-$VERSION.tar.?z* || exit 1
cd ${PKGNAM}_gpl-$VERSION || exit 1
-## The additional include path was removed due to this line,
-## resulting in "fatal error: dbus/dbus-arch-deps.h: No such file or directory"
-#sed -i '/target_config.dbus_inc_dirs = \[\]/d' configure.py
-
chown -R root:root .
find . \
\( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
@@ -85,9 +85,29 @@ export QT5DIR=/usr/lib${LIBDIRSUFFIX}/qt5
export CFLAGS="$SLKCFLAGS"
export CXXFLAGS="$SLKCFLAGS"
+if [ -n "${PYTHON3LIB}" ]; then
+ python3 configure.py \
+ --confirm-license \
+ --verbose \
+ --qsci-api \
+ -q /usr/bin/qmake-qt5 \
+ || exit 1
+
+ make $NUMJOBS || make || exit 1
+ # INSTALL_ROOT is needed to install libpyqt4.so properly:
+ make install DESTDIR=$PKG INSTALL_ROOT=$PKG || exit 1
+ make clean
+
+ mv $PKG/usr/bin/pyrcc5 $PKG/usr/bin/pyrcc5-py3
+ mv $PKG/usr/bin/pyuic5 $PKG/usr/bin/pyuic5-py3
+ mv $PKG/usr/bin/pylupdate5 $PKG/usr/bin/pylupdate5-py3
+ rm -rf $PKG/$PYTHON3LIB/${PKGNAM}/uic/port_v2/
+fi
+
python configure.py \
--confirm-license \
--verbose \
+ --qsci-api \
-q /usr/bin/qmake-qt5 \
|| exit 1
@@ -95,12 +115,14 @@ make $NUMJOBS || make || exit 1
# INSTALL_ROOT is needed to install libpyqt4.so properly:
make install DESTDIR=$PKG INSTALL_ROOT=$PKG || exit 1
+rm -rf $PKG/$PYTHONLIB/${PKGNAM}/uic/port_v3/
+
find $PKG | xargs file | grep -e "executable" -e "shared object" \
| grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
mkdir -p $PKG/usr/doc/$PKGNAM-$VERSION
cp -a \
- GPL_EXCEPTION*.TXT LICENSE.* NEWS OPENSOURCE-NOTICE.TXT README THANKS doc/* \
+ ChangeLog LICENSE* NEWS README doc/* \
$PKG/usr/doc/$PKGNAM-$VERSION
mkdir -p $PKG/install
diff --git a/deps/QScintilla/.url b/deps/QScintilla/.url
new file mode 100644
index 0000000..7cf6290
--- /dev/null
+++ b/deps/QScintilla/.url
@@ -0,0 +1 @@
+http://downloads.sourceforge.net/pyqt/QScintilla_gpl-2.10.4.tar.gz
diff --git a/deps/QScintilla/QScintilla.SlackBuild b/deps/QScintilla/QScintilla.SlackBuild
new file mode 100755
index 0000000..cff3954
--- /dev/null
+++ b/deps/QScintilla/QScintilla.SlackBuild
@@ -0,0 +1,203 @@
+#!/bin/sh
+
+# Slackware build script for QScintilla
+
+# Copyright 2008 Robby Workman <rworkman@slackware.com> Northport, AL, USA
+# Copyright 2008, 2009, 2010, 2011, 2012, 2018 Patrick J. Volkerding, Sebeka, MN, USA
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ''AS IS'' AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+# Modified 2018 by Eric Hameleers <alien@slackware.com> (add Qt5 support)
+
+cd $(dirname $0) ; CWD=$(pwd)
+
+PKGNAM=QScintilla
+VERSION=${VERSION:-2.10.4}
+BUILD=${BUILD:-1}
+
+NUMJOBS=${NUMJOBS:--j7}
+
+TMP=${TMP:-/tmp}
+PKG=$TMP/package-$PKGNAM
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$(uname -m)" in
+ i?86) ARCH=i586 ;;
+ arm*) readelf /usr/bin/file -A | egrep -q "Tag_CPU.*[4,5]" && ARCH=arm || ARCH=armv7hl ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) ARCH=$(uname -m) ;;
+ esac
+ export ARCH
+fi
+
+# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
+# the name of the created package would be, and then exit. This information
+# could be useful to other scripts.
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PKGNAM-$VERSION-$ARCH-$BUILD.txz"
+ exit 0
+fi
+
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+elif [ "$ARCH" = "armv7hl" ]; then
+ SLKCFLAGS="-O2 -march=armv7-a -mfpu=vfpv3-d16"
+ LIBDIRSUFFIX=""
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+fi
+
+rm -rf $PKG
+mkdir -p $TMP $PKG
+cd $TMP
+rm -rf ${PKGNAM}_gpl-$VERSION
+tar xvf $CWD/${PKGNAM}_gpl-$VERSION.tar.?z || exit 1
+cd ${PKGNAM}_gpl-$VERSION || exit 1
+chown -R root:root .
+find . \
+ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \;
+
+# Define QMAKEFEATURES to that we can re-use already built libs
+# without spamming the harddisk:
+export QMAKEFEATURES=${PWD}/Qt4Qt5/features/
+
+# Conditional build of Qt5 support:
+if qtpaths-qt5 --qt-version 1>/dev/null 2>/dev/null ; then
+ # QT5 support first:
+ cd Qt4Qt5
+ qmake-qt5 \
+ -o Makefile \
+ QMAKE_CFLAGS+="$SLKCFLAGS" \
+ QMAKE_CXXFLAGS+="$SLKCFLAGS -std=c++11" \
+ qscintilla.pro || exit 1
+ make $NUMJOBS || exit 1
+ make install INSTALL_ROOT=$PKG || exit 1
+ cd -
+
+ cd designer-Qt4Qt5
+ qmake-qt5 \
+ -o Makefile \
+ INCLUDEPATH+=../Qt4Qt5 QMAKE_LIBDIR+=../Qt4Qt5 \
+ QMAKE_CFLAGS+="$SLKCFLAGS" \
+ QMAKE_CXXFLAGS+="$SLKCFLAGS -std=c++11" \
+ designer.pro || exit 1
+ make $NUMJOBS || exit 1
+ make install INSTALL_ROOT=$PKG || exit 1
+ cd -
+
+ cd Python
+ python3 configure.py \
+ --qmake /usr/bin/qmake-qt5 \
+ --pyqt=PyQt5 \
+ -n ../Qt4Qt5/ -o ../Qt4Qt5/ -c \
+ || exit 1
+ make $NUMJOBS || exit 1
+ make install INSTALL_ROOT=$PKG || exit 1
+
+ make clean || exit 1
+
+ python configure.py \
+ --qmake /usr/bin/qmake-qt5 \
+ --pyqt=PyQt5 \
+ -n ../Qt4Qt5/ -o ../Qt4Qt5/ -c \
+ || exit 1
+ make $NUMJOBS || exit 1
+ make install INSTALL_ROOT=$PKG || exit 1
+ cd -
+
+ # In order to compile Qt4 support next, clean up first:
+ make clean -C Qt4Qt5 || exit 1
+ make clean -C designer-Qt4Qt5 || exit 1
+ make clean -C Python || exit 1
+fi
+
+# QT4 support:
+cd Qt4Qt5
+ qmake \
+ -o Makefile \
+ QMAKE_CFLAGS+="$SLKCFLAGS" \
+ QMAKE_CXXFLAGS+="$SLKCFLAGS -std=c++11" \
+ qscintilla.pro || exit 1
+ make $NUMJOBS || exit 1
+ make install INSTALL_ROOT=$PKG || exit 1
+cd -
+
+cd designer-Qt4Qt5
+ qmake \
+ -o Makefile \
+ INCLUDEPATH+=../Qt4Qt5 QMAKE_LIBDIR+=../Qt4Qt5 \
+ QMAKE_CFLAGS+="$SLKCFLAGS" \
+ QMAKE_CXXFLAGS+="$SLKCFLAGS -std=c++11" \
+ designer.pro || exit 1
+ make $NUMJOBS || exit 1
+ make install INSTALL_ROOT=$PKG || exit 1
+cd -
+
+cd Python
+ python3 configure.py \
+ --qmake /usr/bin/qmake \
+ -n ../Qt4Qt5/ -o ../Qt4Qt5/ -c \
+ || exit 1
+ make $NUMJOBS || exit 1
+ make install INSTALL_ROOT=$PKG || exit 1
+
+ make clean || exit 1
+
+ python configure.py \
+ --qmake /usr/bin/qmake \
+ -n ../Qt4Qt5/ -o ../Qt4Qt5/ -c \
+ || exit 1
+ make $NUMJOBS || exit 1
+ make install INSTALL_ROOT=$PKG || exit 1
+cd -
+
+# Link the shared libraries into /usr/lib${LIBDIRSUFFIX}:
+( cd $PKG/usr/lib${LIBDIRSUFFIX}
+ for file in qt/lib/*.so* ; do
+ ln -sf $file .
+ done
+)
+
+find $PKG | xargs file | grep -e "executable" -e "shared object" \
+ | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+
+mkdir -p $PKG/usr/doc/$PKGNAM-$VERSION
+cp -a \
+ LICENSE NEWS README* \
+ doc/html-Qt4Qt5 doc/Scintilla \
+ $PKG/usr/doc/$PKGNAM-$VERSION
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+cd $PKG
+/sbin/makepkg -l y -c n $TMP/$PKGNAM-$VERSION-$ARCH-$BUILD.txz
+
diff --git a/deps/QScintilla/slack-desc b/deps/QScintilla/slack-desc
new file mode 100644
index 0000000..cb3fdd3
--- /dev/null
+++ b/deps/QScintilla/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|'
+# on the right side marks the last column you can put a character in. You must
+# make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':'.
+
+ |-----handy-ruler--------------------------------------------------|
+QScintilla: QScintilla (Qt port of the Scintilla C++ editor control)
+QScintilla:
+QScintilla: QScintilla includes features especially useful when editing and
+QScintilla: debugging source code. These include support for syntax styling,
+QScintilla: error indicators, code completion, and call tips. The selection
+QScintilla: margin can contain markers like those used in debuggers to
+QScintilla: indicate breakpoints and the current line. Styling choices are
+QScintilla: more open than with many editors, allowing the use of
+QScintilla: proportional fonts, bold and italics, multiple foreground and
+QScintilla: background colours, and multiple fonts.
+QScintilla:
diff --git a/deps/accountsservice/.url b/deps/accountsservice/.url
new file mode 100644
index 0000000..f11ad9a
--- /dev/null
+++ b/deps/accountsservice/.url
@@ -0,0 +1 @@
+https://www.freedesktop.org/software/accountsservice/accountsservice-0.6.45.tar.xz
diff --git a/deps/accountsservice/accountsservice.SlackBuild b/deps/accountsservice/accountsservice.SlackBuild
new file mode 100755
index 0000000..fa52966
--- /dev/null
+++ b/deps/accountsservice/accountsservice.SlackBuild
@@ -0,0 +1,128 @@
+#!/bin/sh
+
+# Copyright 2017 Eric Hameleers, Eindhoven, NL
+# Copyright 2017 Patrick J. Volkerding, Sebeka, MN, USA
+# All rights reserved.
+#
+# Permission to use, copy, modify, and distribute this software for
+# any purpose with or without fee is hereby granted, provided that
+# the above copyright notice and this permission notice appear in all
+# copies.
+#
+# THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+# IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
+# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+# USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+# OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+# SUCH DAMAGE.
+# -----------------------------------------------------------------------------
+
+
+PKGNAM=accountsservice
+VERSION=${VERSION:-0.6.45}
+BUILD=${BUILD:-2}
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+PKG=$TMP/package-$PKGNAM
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$(uname -m)" in
+ i?86) ARCH=i486 ;;
+ arm*) readelf /usr/bin/file -A | egrep -q "Tag_CPU.*[4,5]" && ARCH=arm || ARCH=armv7hl ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) ARCH=$(uname -m) ;;
+ esac
+ export ARCH
+fi
+
+case "$ARCH" in
+ i486) SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+ SLKLDFLAGS=""; LIBDIRSUFFIX=""
+ ;;
+ x86_64) SLKCFLAGS="-O2 -fPIC"
+ SLKLDFLAGS="-L/usr/lib64"; LIBDIRSUFFIX="64"
+ ;;
+ armv7hl) SLKCFLAGS="-O2 -march=armv7-a -mfpu=vfpv3-d16"
+ SLKLDFLAGS=""; LIBDIRSUFFIX=""
+ ;;
+ armv6hl) SLKCFLAGS="-O2 -march=armv6 -mfpu=vfp -mfloat-abi=hard"
+ SLKLDFLAGS=""; LIBDIRSUFFIX=""
+ ;;
+ *) SLKCFLAGS=${SLKCFLAGS:-"O2"}
+ SLKLDFLAGS=${SLKLDFLAGS:-""}; LIBDIRSUFFIX=${LIBDIRSUFFIX:-""}
+ ;;
+esac
+
+case "$ARCH" in
+ arm*) TARGET=$ARCH-slackware-linux-gnueabi ;;
+ *) TARGET=$ARCH-slackware-linux ;;
+esac
+
+rm -rf $PKG
+mkdir -p $TMP $PKG
+cd $TMP
+rm -rf $PKGNAM-$VERSION
+tar xvf $CWD/$PKGNAM-$VERSION.tar.?z || exit 1
+cd $PKGNAM-$VERSION || exit 1
+chown -R root:root .
+find -L . \
+ \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \;
+
+[ ! -x configure ] && autoreconf -vif
+
+LDFLAGS="$SLKLDFLAGS" \
+CXXFLAGS="$SLKCFLAGS" \
+CFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --mandir=/usr/man \
+ --docdir=/usr/doc/$PKGNAM-$VERSION \
+ --localstatedir=/var \
+ --sysconfdir=/etc \
+ --disable-gtk-doc \
+ --disable-systemd \
+ --enable-admin-group=wheel \
+ --program-prefix= \
+ --program-suffix= \
+ --build=$TARGET
+
+# Build and install:
+make || exit 1
+make DESTDIR=$PKG install || exit 1
+
+# Add documentation:
+mkdir -p $PKG/usr/doc/$PKGNAM-$VERSION
+cp -a \
+ AUTHORS COPYING NEWS README TODO \
+ $PKG/usr/doc/$PKGNAM-$VERSION
+
+# Compress the man page(s):
+if [ -d $PKG/usr/man ]; then
+ find $PKG/usr/man -type f -name "*.?" -exec gzip -9f {} \;
+ for i in $(find $PKG/usr/man -type l -name "*.?") ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
+fi
+
+# Strip binaries (if any):
+find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
+ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
+
+# Add a package description:
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+# Build the package:
+cd $PKG
+/sbin/makepkg -l y -c n $TMP/${PKGNAM}-${VERSION}-${ARCH}-${BUILD}.txz
+
diff --git a/deps/accountsservice/slack-desc b/deps/accountsservice/slack-desc
new file mode 100644
index 0000000..274f3c6
--- /dev/null
+++ b/deps/accountsservice/slack-desc
@@ -0,0 +1,20 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description.
+# Line up the first '|' above the ':' following the base package name, and
+# the '|' on the right side marks the last column you can put a character in.
+# You must make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':' except on otherwise blank lines.
+
+ |-----handy-ruler------------------------------------------------------|
+accountsservice: accountsservice (D-Bus interface for user account query)
+accountsservice:
+accountsservice: AccountsService is a D-Bus service for accessing the list of
+accountsservice: user accounts and information attached to those accounts.
+accountsservice:
+accountsservice:
+accountsservice:
+accountsservice:
+accountsservice:
+accountsservice: See https://www.freedesktop.org/wiki/Software/AccountsService/
+accountsservice:
+
diff --git a/deps/alldeps.SlackBuild b/deps/alldeps.SlackBuild
index b86b334..ab36d62 100755
--- a/deps/alldeps.SlackBuild
+++ b/deps/alldeps.SlackBuild
@@ -17,6 +17,7 @@ ALLDEPS=" \
extra-cmake-modules \
ninja \
sni-qt \
+ libwacom \
libinput \
libxkbcommon \
wayland \
@@ -30,6 +31,7 @@ ALLDEPS=" \
sip \
PyQt \
PyQt5 \
+ QScintilla \
qca-qt5 \
libdbusmenu-qt5 \
polkit-qt-1 \
@@ -43,13 +45,32 @@ ALLDEPS=" \
libappindicator \
cfitsio \
lmdb \
+ libdmtx \
+ qrencode \
libproxy \
telepathy \
hack-font-ttf \
noto-font-ttf \
noto-cjk-font-ttf \
- elogind \
+ gpgme \
+ lensfun \
+ opencv \
+ dvdauthor \
+ vid.stab \
+ frei0r-plugins \
+ mlt \
+ cracklib \
+ libpwquality \
+ accountsservice \
+ libburn \
+ qtav \
+ ddcutil \
+ id3lib \
+ cryptopp \
+ cryfs \
"
+ # Only needed when adding support for Wayland:
+ #elogind \
# Not needed, conflicts with qt-gstreamer files
#qt-gstreamer0 \
diff --git a/deps/cfitsio/.url b/deps/cfitsio/.url
new file mode 100644
index 0000000..6a97bc1
--- /dev/null
+++ b/deps/cfitsio/.url
@@ -0,0 +1,2 @@
+http://heasarc.gsfc.nasa.gov/FTP/software/fitsio/c/cfitsio3420.tar.gz
+
diff --git a/deps/cfitsio/cfitsio.SlackBuild b/deps/cfitsio/cfitsio.SlackBuild
index 70377f2..6170ccf 100755
--- a/deps/cfitsio/cfitsio.SlackBuild
+++ b/deps/cfitsio/cfitsio.SlackBuild
@@ -1,6 +1,6 @@
#!/bin/sh
-# Copyright 2015 Eric Hameleers, Eindhoven, NL
+# Copyright 2015, 2017 Eric Hameleers, Eindhoven, NL
# Copyright 2015 Patrick J. Volkerding, Sebeka, MN, USA
# All rights reserved.
#
@@ -22,13 +22,13 @@
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
PKGNAM=cfitsio
-VERSION=${VERSION:-3.370}
+VERSION=${VERSION:-3.420}
BUILD=${BUILD:-1}
# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
case "$(uname -m)" in
- i?86) ARCH=i486 ;;
+ i?86) ARCH=i586 ;;
arm*) readelf /usr/bin/file -A | egrep -q "Tag_CPU.*[4,5]" && ARCH=arm || ARCH=armv7hl ;;
# Unless $ARCH is already set, use uname -m for all other archs:
*) ARCH=$(uname -m) ;;
@@ -40,8 +40,8 @@ CWD=$(pwd)
TMP=${TMP:-/tmp}
PKG=$TMP/package-$PKGNAM
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
SLKLDFLAGS=""
LIBDIRSUFFIX=""
elif [ "$ARCH" = "x86_64" ]; then
@@ -92,9 +92,13 @@ LDFLAGS="$SLKLDFLAGS" \
--build=$TARGET
# Build and install:
-make || exit 1
+make shared || exit 1
+make utils || exit 1
make install DESTDIR=$PKG || exit 1
+# Remove the static library:
+rm -f $PKG/usr/lib${LIBDIRSUFFIX}/libcfitsio.a
+
# Strip binaries (if any):
find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
diff --git a/deps/cracklib/.url b/deps/cracklib/.url
new file mode 100644
index 0000000..ef871d8
--- /dev/null
+++ b/deps/cracklib/.url
@@ -0,0 +1 @@
+https://github.com/cracklib/cracklib/releases/download/cracklib-2.9.6/cracklib-2.9.6.tar.gz
diff --git a/deps/cracklib/cracklib.SlackBuild b/deps/cracklib/cracklib.SlackBuild
new file mode 100755
index 0000000..20fcd55
--- /dev/null
+++ b/deps/cracklib/cracklib.SlackBuild
@@ -0,0 +1,142 @@
+#!/bin/sh
+
+# Copyright 2017 Eric Hameleers, Eindhoven, NL
+# Copyright 2017 Patrick J. Volkerding, Sebeka, MN, USA
+# All rights reserved.
+#
+# Permission to use, copy, modify, and distribute this software for
+# any purpose with or without fee is hereby granted, provided that
+# the above copyright notice and this permission notice appear in all
+# copies.
+#
+# THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+# IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
+# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+# USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+# OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+# SUCH DAMAGE.
+# -----------------------------------------------------------------------------
+
+
+PKGNAM=cracklib
+VERSION=${VERSION:-2.9.6}
+BUILD=${BUILD:-1}
+
+DICTPATH=/usr/share/cracklib/pw_dict
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+PKG=$TMP/package-$PKGNAM
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$(uname -m)" in
+ i?86) ARCH=i486 ;;
+ arm*) readelf /usr/bin/file -A | egrep -q "Tag_CPU.*[4,5]" && ARCH=arm || ARCH=armv7hl ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) ARCH=$(uname -m) ;;
+ esac
+ export ARCH
+fi
+
+case "$ARCH" in
+ i486) SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+ SLKLDFLAGS=""; LIBDIRSUFFIX=""
+ ;;
+ x86_64) SLKCFLAGS="-O2 -fPIC"
+ SLKLDFLAGS="-L/usr/lib64"; LIBDIRSUFFIX="64"
+ ;;
+ armv7hl) SLKCFLAGS="-O2 -march=armv7-a -mfpu=vfpv3-d16"
+ SLKLDFLAGS=""; LIBDIRSUFFIX=""
+ ;;
+ armv6hl) SLKCFLAGS="-O2 -march=armv6 -mfpu=vfp -mfloat-abi=hard"
+ SLKLDFLAGS=""; LIBDIRSUFFIX=""
+ ;;
+ *) SLKCFLAGS=${SLKCFLAGS:-"O2"}
+ SLKLDFLAGS=${SLKLDFLAGS:-""}; LIBDIRSUFFIX=${LIBDIRSUFFIX:-""}
+ ;;
+esac
+
+case "$ARCH" in
+ arm*) TARGET=$ARCH-slackware-linux-gnueabi ;;
+ *) TARGET=$ARCH-slackware-linux ;;
+esac
+
+rm -rf $PKG
+mkdir -p $TMP $PKG
+cd $TMP
+rm -rf $PKGNAM-$VERSION
+tar xvf $CWD/$PKGNAM-$VERSION.tar.gz || exit 1
+cd $PKGNAM-$VERSION || exit 1
+
+# CVE-2016-6318 - avoid overflows in GECOS handling and mangling password:
+cat $CWD/patches/cracklib-2.9.6-cve-2016-6318.patch \
+ | patch -p2 --verbose || exit 1
+
+chown -R root:root .
+find -L . \
+ \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \;
+
+[ ! -x configure ] && ./autogen.sh
+
+LDFLAGS="$SLKLDFLAGS" \
+CXXFLAGS="$SLKCFLAGS" \
+CFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --mandir=/usr/man \
+ --docdir=/usr/doc/$PKGNAM-$VERSION \
+ --localstatedir=/var \
+ --sysconfdir=/etc \
+ --program-prefix= \
+ --program-suffix= \
+ --disable-static \
+ --without-python \
+ --with-default-dict=${DICTPATH} \
+ --build=$TARGET
+
+# Build and install:
+make || exit 1
+make DESTDIR=$PKG install || exit 1
+
+# Generate a dictionary from the included 'cracklib-small';
+# If you want, you can download a larger file from the project web site:
+mkdir -p $PKG/usr/share/dict
+ln -sf /usr/share/cracklib/cracklib-small $PKG/usr/share/dict/cracklib-small
+sh util/cracklib-format dicts/cracklib-small \
+ | ./util/cracklib-packer $PKG/${DICTPATH}
+
+# Add documentation:
+mkdir -p $PKG/usr/doc/$PKGNAM-$VERSION
+cp -a \
+ AUTHORS INSTALL NEWS README* \
+ $PKG/usr/doc/$PKGNAM-$VERSION
+
+# Compress the man page(s):
+if [ -d $PKG/usr/man ]; then
+ find $PKG/usr/man -type f -name "*.?" -exec gzip -9f {} \;
+ for i in $(find $PKG/usr/man -type l -name "*.?") ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
+fi
+
+# Strip binaries (if any):
+find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
+ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
+
+# Add a package description:
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+# Build the package:
+cd $PKG
+/sbin/makepkg -l y -c n $TMP/${PKGNAM}-${VERSION}-${ARCH}-${BUILD}.txz
+
diff --git a/deps/cracklib/patches/cracklib-2.9.6-cve-2016-6318.patch b/deps/cracklib/patches/cracklib-2.9.6-cve-2016-6318.patch
new file mode 100644
index 0000000..bc47734
--- /dev/null
+++ b/deps/cracklib/patches/cracklib-2.9.6-cve-2016-6318.patch
@@ -0,0 +1,108 @@
+From 47e5dec521ab6243c9b249dd65b93d232d90d6b1 Mon Sep 17 00:00:00 2001
+From: Jan Dittberner <jan@dittberner.info>
+Date: Thu, 25 Aug 2016 17:13:49 +0200
+Subject: [PATCH] Apply patch to fix CVE-2016-6318
+
+This patch fixes an issue with a stack-based buffer overflow whne
+parsing large GECOS field. See
+https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2016-6318 and
+https://security-tracker.debian.org/tracker/CVE-2016-6318 for more
+information.
+---
+ src/NEWS | 1 +
+ src/lib/fascist.c | 57 ++++++++++++++++++++++++++++++++-----------------------
+ 2 files changed, 34 insertions(+), 24 deletions(-)
+
+diff --git a/src/NEWS b/src/NEWS
+index 26abeee..361a207 100644
+--- a/src/NEWS
++++ b/src/NEWS
+@@ -1,3 +1,4 @@
++v2.9.x apply patch to fix CVE-2016-6318 Stack-based buffer overflow when parsing large GECOS field
+ v2.9.6 updates to cracklib-words to add a bunch of other dictionary lists
+ migration to github
+ patch to add some particularly bad cases to the cracklib small dictionary (Matthew Miller)
+diff --git a/src/lib/fascist.c b/src/lib/fascist.c
+index a996509..d4deb15 100644
+--- a/src/lib/fascist.c
++++ b/src/lib/fascist.c
+@@ -502,7 +502,7 @@ FascistGecosUser(char *password, const char *user, const char *gecos)
+ char gbuffer[STRINGSIZE];
+ char tbuffer[STRINGSIZE];
+ char *uwords[STRINGSIZE];
+- char longbuffer[STRINGSIZE * 2];
++ char longbuffer[STRINGSIZE];
+
+ if (gecos == NULL)
+ gecos = "";
+@@ -583,38 +583,47 @@ FascistGecosUser(char *password, const char *user, const char *gecos)
+ {
+ for (i = 0; i < j; i++)
+ {
+- strcpy(longbuffer, uwords[i]);
+- strcat(longbuffer, uwords[j]);
+-
+- if (GTry(longbuffer, password))
++ if (strlen(uwords[i]) + strlen(uwords[j]) < STRINGSIZE)
+ {
+- return _("it is derived from your password entry");
+- }
++ strcpy(longbuffer, uwords[i]);
++ strcat(longbuffer, uwords[j]);
+
+- strcpy(longbuffer, uwords[j]);
+- strcat(longbuffer, uwords[i]);
++ if (GTry(longbuffer, password))
++ {
++ return _("it is derived from your password entry");
++ }
+
+- if (GTry(longbuffer, password))
+- {
+- return _("it's derived from your password entry");
+- }
++ strcpy(longbuffer, uwords[j]);
++ strcat(longbuffer, uwords[i]);
+
+- longbuffer[0] = uwords[i][0];
+- longbuffer[1] = '\0';
+- strcat(longbuffer, uwords[j]);
++ if (GTry(longbuffer, password))
++ {
++ return _("it's derived from your password entry");
++ }
++ }
+
+- if (GTry(longbuffer, password))
++ if (strlen(uwords[j]) < STRINGSIZE - 1)
+ {
+- return _("it is derivable from your password entry");
++ longbuffer[0] = uwords[i][0];
++ longbuffer[1] = '\0';
++ strcat(longbuffer, uwords[j]);
++
++ if (GTry(longbuffer, password))
++ {
++ return _("it is derivable from your password entry");
++ }
+ }
+
+- longbuffer[0] = uwords[j][0];
+- longbuffer[1] = '\0';
+- strcat(longbuffer, uwords[i]);
+-
+- if (GTry(longbuffer, password))
++ if (strlen(uwords[i]) < STRINGSIZE - 1)
+ {
+- return _("it's derivable from your password entry");
++ longbuffer[0] = uwords[j][0];
++ longbuffer[1] = '\0';
++ strcat(longbuffer, uwords[i]);
++
++ if (GTry(longbuffer, password))
++ {
++ return _("it's derivable from your password entry");
++ }
+ }
+ }
+ }
diff --git a/deps/cracklib/slack-desc b/deps/cracklib/slack-desc
new file mode 100644
index 0000000..0f475fb
--- /dev/null
+++ b/deps/cracklib/slack-desc
@@ -0,0 +1,20 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description.
+# Line up the first '|' above the ':' following the base package name, and
+# the '|' on the right side marks the last column you can put a character in.
+# You must make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':' except on otherwise blank lines.
+
+ |-----handy-ruler------------------------------------------------------|
+cracklib: cracklib (password crack library)
+cracklib:
+cracklib: CrackLib is a library allowing a "passwd"-like program to filter out
+cracklib: passwords that are considered easy to crack by brute-force.
+cracklib: Cracklib uses dictionary lists of easy to guess passwords.
+cracklib:
+cracklib:
+cracklib:
+cracklib:
+cracklib: See also: https://github.com/cracklib/cracklib
+cracklib:
+
diff --git a/deps/cryfs/.url b/deps/cryfs/.url
new file mode 100644
index 0000000..002fe91
--- /dev/null
+++ b/deps/cryfs/.url
@@ -0,0 +1 @@
+https://github.com/cryfs/cryfs/releases/download/0.9.9/cryfs-0.9.9.tar.xz
diff --git a/deps/cryfs/cryfs.SlackBuild b/deps/cryfs/cryfs.SlackBuild
new file mode 100755
index 0000000..e8a332b
--- /dev/null
+++ b/deps/cryfs/cryfs.SlackBuild
@@ -0,0 +1,131 @@
+#!/bin/sh
+
+# Copyright 2018 Eric Hameleers, Eindhoven, NL
+# Copyright 2018 Patrick J. Volkerding, Sebeka, MN, USA
+# All rights reserved.
+#
+# Permission to use, copy, modify, and distribute this software for
+# any purpose with or without fee is hereby granted, provided that
+# the above copyright notice and this permission notice appear in all
+# copies.
+#
+# THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+# IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
+# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+# USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+# OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+# SUCH DAMAGE.
+# -----------------------------------------------------------------------------
+
+
+cd $(dirname $0) ; CWD=$(pwd)
+
+PKGNAM=cryfs
+VERSION=${VERSION:-0.9.9}
+BUILD=${BUILD:-3}
+
+TMP=${TMP:-/tmp}
+PKG=$TMP/package-$PKGNAM
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$(uname -m)" in
+ i?86) ARCH=i586 ;;
+ arm*) readelf /usr/bin/file -A | egrep -q "Tag_CPU.*[4,5]" && ARCH=arm || ARCH=armv7hl ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) ARCH=$(uname -m) ;;
+ esac
+ export ARCH
+fi
+
+# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
+# the name of the created package would be, and then exit. This information
+# could be useful to other scripts.
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PKGNAM-$VERSION-$ARCH-$BUILD.txz"
+ exit 0
+fi
+
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=${ARCH} -mtune=i686"
+ SLKLDFLAGS=""
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ SLKLDFLAGS="-L/usr/lib64"
+ LIBDIRSUFFIX="64"
+elif [ "$ARCH" = "armv7hl" ]; then
+ SLKCFLAGS="-O3 -march=armv7-a -mfpu=vfpv3-d16"
+ SLKLDFLAGS=""
+ LIBDIRSUFFIX=""
+else
+ SLKCFLAGS="-O2"
+ SLKLDFLAGS=""
+ LIBDIRSUFFIX=""
+fi
+
+case "$ARCH" in
+ arm*) TARGET=$ARCH-slackware-linux-gnueabi ;;
+ *) TARGET=$ARCH-slackware-linux ;;
+esac
+
+rm -rf $PKG
+mkdir -p $TMP $PKG
+cd $TMP
+rm -rf $PKGNAM-$VERSION
+mkdir $PKGNAM-$VERSION
+cd $PKGNAM-$VERSION
+tar xvf $CWD/$PKGNAM-$VERSION.tar.?z* || exit 1
+
+# Fix bogus permissions:
+chown -R root:root .
+find . \
+ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \;
+
+# Configure and compile:
+mkdir -p build
+cd build
+ cmake \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \
+ -DCMAKE_C_FLAGS_RELEASE:STRING="$SLKCFLAGS" \
+ -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
+ -DCMAKE_CXX_FLAGS_RELEASE:STRING="$SLKCFLAGS" \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DCMAKE_INSTALL_MANDIR=/usr/man \
+ -DLIB_SUFFIX=${LIBDIRSUFFIX} \
+ -DBUILD_TESTING=OFF \
+ -DBoost_USE_STATIC_LIBS=off \
+ -DCRYFS_UPDATE_CHECKS=OFF \
+ ..
+ make
+ make install DESTDIR=$PKG
+cd ..
+
+# Add documentation:
+mkdir -p $PKG/usr/doc/$PKGNAM-$VERSION
+cp -a \
+ LICENSE README* \
+ $PKG/usr/doc/$PKGNAM-$VERSION
+
+# Strip binaries:
+find $PKG | xargs file | grep -e "executable" -e "shared object" \
+ | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+
+# Add a package description:
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+# Build the package:
+cd $PKG
+makepkg -l y -c n $TMP/${PKGNAM}-${VERSION}-${ARCH}-${BUILD}.txz
+
diff --git a/deps/cryfs/slack-desc b/deps/cryfs/slack-desc
new file mode 100644
index 0000000..951bb79
--- /dev/null
+++ b/deps/cryfs/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|'
+# on the right side marks the last column you can put a character in. You must
+# make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+cryfs: cryfs (cryptographic filesystem)
+cryfs:
+cryfs: CryFS encrypts your files, so you can safely store them anywhere.
+cryfs: It works well together with cloud services like Dropbox, iCloud,
+cryfs: OneDrive and others.
+cryfs:
+cryfs:
+cryfs:
+cryfs:
+cryfs: cryfs home: https://www.cryfs.org
+cryfs:
diff --git a/deps/cryptopp/.url b/deps/cryptopp/.url
new file mode 100644
index 0000000..d102016
--- /dev/null
+++ b/deps/cryptopp/.url
@@ -0,0 +1 @@
+https://www.cryptopp.com/cryptopp610.zip
diff --git a/deps/cryptopp/cryptopp.SlackBuild b/deps/cryptopp/cryptopp.SlackBuild
new file mode 100755
index 0000000..52e8660
--- /dev/null
+++ b/deps/cryptopp/cryptopp.SlackBuild
@@ -0,0 +1,130 @@
+#!/bin/sh
+
+# Copyright 2014, 2018 Eric Hameleers, Eindhoven, NL
+# Copyright 2018 Patrick J. Volkerding, Sebeka, MN, USA
+# All rights reserved.
+#
+# Permission to use, copy, modify, and distribute this software for
+# any purpose with or without fee is hereby granted, provided that
+# the above copyright notice and this permission notice appear in all
+# copies.
+#
+# THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+# IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
+# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+# USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+# OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+# SUCH DAMAGE.
+# -----------------------------------------------------------------------------
+
+
+cd $(dirname $0) ; CWD=$(pwd)
+
+PKGNAM=cryptopp
+VERSION=${VERSION:-6.1.0}
+SRCVER=$(echo $VERSION | tr -d '.')
+BUILD=${BUILD:-1}
+NUMJOBS=${NUMJOBS:--j7}
+
+TMP=${TMP:-/tmp}
+PKG=$TMP/package-$PKGNAM
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$(uname -m)" in
+ i?86) ARCH=i586 ;;
+ arm*) readelf /usr/bin/file -A | egrep -q "Tag_CPU.*[4,5]" && ARCH=arm || ARCH=armv7hl ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) ARCH=$(uname -m) ;;
+ esac
+ export ARCH
+fi
+
+# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
+# the name of the created package would be, and then exit. This information
+# could be useful to other scripts.
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PKGNAM-$VERSION-$ARCH-$BUILD.txz"
+ exit 0
+fi
+
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
+ SLKLDFLAGS=""
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ SLKLDFLAGS="-L/usr/lib64"
+ LIBDIRSUFFIX="64"
+elif [ "$ARCH" = "armv7hl" ]; then
+ SLKCFLAGS="-O3 -march=armv7-a -mfpu=vfpv3-d16"
+ SLKLDFLAGS=""
+ LIBDIRSUFFIX=""
+else
+ SLKCFLAGS="-O2"
+ SLKLDFLAGS=""
+ LIBDIRSUFFIX=""
+fi
+
+case "$ARCH" in
+ arm*) TARGET=$ARCH-slackware-linux-gnueabi ;;
+ *) TARGET=$ARCH-slackware-linux ;;
+esac
+
+# Extract the sources:
+rm -rf $PKG
+mkdir -p $TMP $PKG
+cd $TMP
+rm -rf ${PKGNAM}-${VERSION}
+mkdir -p ${PKGNAM}-${VERSION}
+unzip -a ${CWD}/${PKGNAM}${SRCVER}.zip -d ${PKGNAM}-${VERSION} || exit 1
+cd ${PKGNAM}-${VERSION} || exit 1
+
+## Do not mess up the CXXFLAGS:
+#cat $CWD/patches/cryptopp_slkcflags.patch | patch -p1 --verbose || exit 1
+
+# Fix bogus permissions:
+chown -R root:root .
+find . \
+ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \;
+
+# Cater to 64-bit Slackware:
+sed -i -e "s,(PREFIX)/lib,(PREFIX)/lib${LIBDIRSUFFIX},g" GNUmakefile
+
+# Compile and install:
+make dynamic $NUMJOBS \
+ CXXFLAGS="${SLKCFLAGS} -DNDEBUG" LDFLAGS="${LDFLAGS}"
+make install PREFIX=$PKG/usr
+
+# Install a pkg-config file:
+mkdir -p $PKG/usr/lib${LIBDIRSUFFIX}/pkgconfig
+cat $CWD/${PKGNAM}.pc | sed \
+ -e "s,@LIBDIRSUFFIX@,${LIBDIRSUFFIX},g" \
+ -e "s,@VERSION@,${VERSION},g" \
+ > $PKG/usr/lib${LIBDIRSUFFIX}/pkgconfig/cryptopp.pc
+
+# Add documentation:
+mkdir -p $PKG/usr/doc/$PKGNAM-$VERSION
+cp -a *.txt $PKG/usr/doc/$PKGNAM-$VERSION
+
+# Strip binaries (if any):
+find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
+ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
+
+# Add a package description:
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+# Build the package:
+cd $PKG
+/sbin/makepkg -l y -c n $TMP/${PKGNAM}-${VERSION}-${ARCH}-${BUILD}.txz
+
diff --git a/deps/cryptopp/cryptopp.pc b/deps/cryptopp/cryptopp.pc
new file mode 100644
index 0000000..14dca21
--- /dev/null
+++ b/deps/cryptopp/cryptopp.pc
@@ -0,0 +1,15 @@
+prefix=/usr
+exec_prefix=${prefix}
+libdir=${prefix}/lib@LIBDIRSUFFIX@
+includedir=${prefix}/include/cryptopp
+
+Name: Crypto++
+Description: A free C++ class library of cryptographic schemes
+Version: @VERSION@
+URL: http://www.cryptopp.com
+Requires:
+Conflicts:
+Libs: -L${libdir} -lcryptopp
+Libs.private:
+Cflags: -I${includedir}
+
diff --git a/deps/cryptopp/patches/cryptopp_slkcflags.patch b/deps/cryptopp/patches/cryptopp_slkcflags.patch
new file mode 100644
index 0000000..3c0c14d
--- /dev/null
+++ b/deps/cryptopp/patches/cryptopp_slkcflags.patch
@@ -0,0 +1,11 @@
+--- cryptopp-5.6.2/GNUmakefile.orig 2014-03-16 23:04:04.185871759 +0100
++++ cryptopp-5.6.2/GNUmakefile 2014-03-16 23:30:49.726841806 +0100
+@@ -38,8 +38,6 @@
+ ifneq ($(GCC42_OR_LATER),0)
+ ifeq ($(UNAME),Darwin)
+ CXXFLAGS += -arch x86_64 -arch i386
+-else
+-CXXFLAGS += -march=native
+ endif
+ endif
+
diff --git a/deps/cryptopp/slack-desc b/deps/cryptopp/slack-desc
new file mode 100644
index 0000000..08599cf
--- /dev/null
+++ b/deps/cryptopp/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|'
+# on the right side marks the last column you can put a character in. You must
+# make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':' except on otherwise blank lines.
+
+ |-----handy-ruler------------------------------------------------------|
+cryptopp: cryptopp (library of cryptographic schemes)
+cryptopp:
+cryptopp: Crypto++ Library is a free C++ class library of cryptographic schemes.
+cryptopp: See http://www.cryptopp.com/ for a list of supported algorithms.
+cryptopp: One purpose of Crypto++ is to act as a repository of public domain
+cryptopp: (not copyrighted) source code. Although the library is copyrighted as
+cryptopp: a compilation, the individual files in it are in the public domain.
+cryptopp:
+cryptopp:
+cryptopp: cryptopp home: http://www.cryptopp.com/
+cryptopp:
diff --git a/deps/ddcutil/.url b/deps/ddcutil/.url
new file mode 100644
index 0000000..7814641
--- /dev/null
+++ b/deps/ddcutil/.url
@@ -0,0 +1,2 @@
+https://github.com/rockowitz/ddcutil/archive/v0.8.5.tar.gz
+
diff --git a/deps/ddcutil/ddcutil.SlackBuild b/deps/ddcutil/ddcutil.SlackBuild
new file mode 100755
index 0000000..88a8e1f
--- /dev/null
+++ b/deps/ddcutil/ddcutil.SlackBuild
@@ -0,0 +1,124 @@
+#!/bin/sh
+
+# Copyright 2017 Eric Hameleers, Eindhoven, NL
+# Copyright 2017 Patrick J. Volkerding, Sebeka, MN, USA
+# All rights reserved.
+#
+# Permission to use, copy, modify, and distribute this software for
+# any purpose with or without fee is hereby granted, provided that
+# the above copyright notice and this permission notice appear in all
+# copies.
+#
+# THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+# IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
+# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+# USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+# OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+# SUCH DAMAGE.
+# -----------------------------------------------------------------------------
+
+
+PKGNAM=ddcutil
+VERSION=${VERSION:-0.8.5}
+BUILD=${BUILD:-2}
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+PKG=$TMP/package-$PKGNAM
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$(uname -m)" in
+ i?86) ARCH=i586 ;;
+ arm*) readelf /usr/bin/file -A | egrep -q "Tag_CPU.*[4,5]" && ARCH=arm || ARCH=armv7hl ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) ARCH=$(uname -m) ;;
+ esac
+ export ARCH
+fi
+
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
+ SLKLDFLAGS=""
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ SLKLDFLAGS="-L/usr/lib64"
+ LIBDIRSUFFIX="64"
+elif [ "$ARCH" = "armv7hl" ]; then
+ SLKCFLAGS="-O3 -march=armv7-a -mfpu=vfpv3-d16"
+ SLKLDFLAGS=""
+ LIBDIRSUFFIX=""
+else
+ SLKCFLAGS="-O2"
+ SLKLDFLAGS=""
+ LIBDIRSUFFIX=""
+fi
+
+case "$ARCH" in
+ arm*) TARGET=$ARCH-slackware-linux-gnueabi ;;
+ *) TARGET=$ARCH-slackware-linux ;;
+esac
+
+rm -rf $PKG
+mkdir -p $TMP $PKG
+cd $TMP
+rm -rf $PKGNAM-$VERSION
+tar xvf $CWD/$PKGNAM-$VERSION.tar.?z* || exit 1
+cd $PKGNAM-$VERSION || exit 1
+
+# Fix bogus permissions:
+chown -R root:root .
+find . \
+ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \;
+
+# Configure:
+[ ! -x configure ] && ./autogen.sh
+
+CFLAGS="$SLKCFLAGS" \
+CXXFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --mandir=/usr/man \
+ --docdir=/usr/doc/$PKGNAM-$VERSION \
+ --disable-static \
+ --build=$TARGET
+
+# Build and install:
+make || exit 1
+make DESTDIR=$PKG install || exit 1
+
+# Add documentation:
+mkdir -p $PKG/usr/doc/$PKGNAM-$VERSION
+cp -a \
+ AUTHORS CONTRIBUTORS COPYING COPYRIGHT ChangeLog NEWS README \
+ $PKG/usr/doc/$PKGNAM-$VERSION
+# Remove phony docdir:
+rm -rf $PKG/usr/share/doc
+
+# Strip binaries:
+find $PKG | xargs file | grep -e "executable" -e "shared object" \
+ | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+
+# Compress man pages:
+find $PKG/usr/man -type f -exec gzip -9 {} \;
+for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
+
+# Add a package description:
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+# Build the package:
+cd $PKG
+makepkg -l y -c n $TMP/${PKGNAM}-${VERSION}-${ARCH}-${BUILD}.txz
+
diff --git a/deps/ddcutil/slack-desc b/deps/ddcutil/slack-desc
new file mode 100644
index 0000000..2f767f8
--- /dev/null
+++ b/deps/ddcutil/slack-desc
@@ -0,0 +1,20 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description.
+# Line up the first '|' above the ':' following the base package name, and
+# the '|' on the right side marks the last column you can put a character in.
+# You must make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':' except on otherwise blank lines.
+
+ |-----handy-ruler------------------------------------------------------|
+ddcutil: ddcutil (query and change monitor settings)
+ddcutil:
+ddcutil: ddcutil is a Linux program for querying and changing monitor settings,
+ddcutil: such as brightness and color levels.
+ddcutil: ddcutil primarily uses DDC/CI (Display Data Channel Command Interface)
+ddcutil: to communicate with monitors implementing MCCS (Monitor Control
+ddcutil: Command Set) over I2C.
+ddcutil: Alternatively, there is support for monitors that implement MCCS
+ddcutil: using a USB connection.
+ddcutil:
+ddcutil: See also: http://ddcutil.com/
+
diff --git a/deps/dvdauthor/.url b/deps/dvdauthor/.url
new file mode 100644
index 0000000..fa6c294
--- /dev/null
+++ b/deps/dvdauthor/.url
@@ -0,0 +1 @@
+https://github.com/ldo/dvdauthor/archive/0.7.2.tar.gz
diff --git a/deps/dvdauthor/dvdauthor.SlackBuild b/deps/dvdauthor/dvdauthor.SlackBuild
new file mode 100755
index 0000000..fc1caaf
--- /dev/null
+++ b/deps/dvdauthor/dvdauthor.SlackBuild
@@ -0,0 +1,126 @@
+#!/bin/sh
+
+# Copyright 2017, 2018 Eric Hameleers, Eindhoven, NL
+# Copyright 2017 Patrick J. Volkerding, Sebeka, MN, USA
+# All rights reserved.
+#
+# Permission to use, copy, modify, and distribute this software for
+# any purpose with or without fee is hereby granted, provided that
+# the above copyright notice and this permission notice appear in all
+# copies.
+#
+# THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+# IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
+# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+# USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+# OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+# SUCH DAMAGE.
+# -----------------------------------------------------------------------------
+
+
+PKGNAM=dvdauthor
+VERSION=${VERSION:-0.7.2}
+BUILD=${BUILD:-4}
+NUMJOBS=${NUMJOBS:-"-j$(nproc)"}
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+PKG=$TMP/package-$PKGNAM
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$(uname -m)" in
+ i?86) ARCH=i586 ;;
+ arm*) readelf /usr/bin/file -A | egrep -q "Tag_CPU.*[4,5]" && ARCH=arm || ARCH=armv7hl ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) ARCH=$(uname -m) ;;
+ esac
+ export ARCH
+fi
+
+case "$ARCH" in
+ i?86) SLKCFLAGS="-O2 -march=${ARCH} -mtune=i686"
+ SLKLDFLAGS=""; LIBDIRSUFFIX=""
+ ;;
+ x86_64) SLKCFLAGS="-O2 -fPIC"
+ SLKLDFLAGS="-L/usr/lib64"; LIBDIRSUFFIX="64"
+ ;;
+ armv7hl) SLKCFLAGS="-O2 -march=armv7-a -mfpu=vfpv3-d16"
+ SLKLDFLAGS=""; LIBDIRSUFFIX=""
+ ;;
+ armv6hl) SLKCFLAGS="-O2 -march=armv6 -mfpu=vfp -mfloat-abi=hard"
+ SLKLDFLAGS=""; LIBDIRSUFFIX=""
+ ;;
+ *) SLKCFLAGS=${SLKCFLAGS:-"O2"}
+ SLKLDFLAGS=${SLKLDFLAGS:-""}; LIBDIRSUFFIX=${LIBDIRSUFFIX:-""}
+ ;;
+esac
+
+case "$ARCH" in
+ arm*) TARGET=$ARCH-slackware-linux-gnueabi ;;
+ *) TARGET=$ARCH-slackware-linux ;;
+esac
+
+rm -rf $PKG
+mkdir -p $TMP $PKG
+cd $TMP
+rm -rf $PKGNAM-$VERSION
+tar xvf $CWD/$PKGNAM-$VERSION.tar.gz || exit 1
+cd $PKGNAM-$VERSION || exit 1
+chown -R root:root .
+find -L . \
+ \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \;
+
+[ ! -x configure ] && ./bootstrap
+
+LDFLAGS="$SLKLDFLAGS" \
+CXXFLAGS="$SLKCFLAGS" \
+CFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --mandir=/usr/man \
+ --docdir=/usr/doc/$PKGNAM-$VERSION \
+ --localstatedir=/var \
+ --sysconfdir=/etc \
+ --program-prefix= \
+ --program-suffix= \
+ --build=$TARGET
+
+# Build and install:
+make $NUMJOBS || make || exit 1
+make DESTDIR=$PKG install || exit 1
+
+# Add documentation:
+mkdir -p $PKG/usr/doc/$PKGNAM-$VERSION
+cp -a \
+ AUTHORS ChangeLog COPYING README TODO \
+ $PKG/usr/doc/$PKGNAM-$VERSION
+
+# Compress the man page(s):
+if [ -d $PKG/usr/man ]; then
+ find $PKG/usr/man -type f -name "*.?" -exec gzip -9f {} \;
+ for i in $(find $PKG/usr/man -type l -name "*.?") ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
+fi
+
+# Strip binaries (if any):
+find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
+ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
+
+# Add a package description:
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+# Build the package:
+cd $PKG
+/sbin/makepkg -l y -c n $TMP/${PKGNAM}-${VERSION}-${ARCH}-${BUILD}.txz
+
diff --git a/deps/dvdauthor/slack-desc b/deps/dvdauthor/slack-desc
new file mode 100644
index 0000000..0473651
--- /dev/null
+++ b/deps/dvdauthor/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description.
+# Line up the first '|' above the ':' following the base package name, and
+# the '|' on the right side marks the last column you can put a character in.
+# You must make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':' except on otherwise blank lines.
+
+ |-----handy-ruler------------------------------------------------------|
+dvdauthor: dvdauthor (tools to author a DVD)
+dvdauthor:
+dvdauthor: dvdauthor is a program that will generate a DVD movie from a valid
+dvdauthor: mpeg2 stream.
+dvdauthor: The resulting movie should play in a standard DVD player.
+dvdauthor:
+dvdauthor:
+dvdauthor:
+dvdauthor:
+dvdauthor: Homepage: http://dvdauthor.sf.net
+dvdauthor:
diff --git a/deps/elogind/elogind.SlackBuild b/deps/elogind/elogind.SlackBuild
index 042ba8f..b9d2d70 100755
--- a/deps/elogind/elogind.SlackBuild
+++ b/deps/elogind/elogind.SlackBuild
@@ -1,6 +1,6 @@
#!/bin/sh
# Copyright 2016 Patrick J. Volkerding, Sebeka, MN, USA
-# Copyright 2016 Eric Hameleers, Eindhoven, NL
+# Copyright 2016, 2017 Eric Hameleers, Eindhoven, NL
# All rights reserved.
#
# Permission to use, copy, modify, and distribute this software for
@@ -25,7 +25,7 @@
PKGNAM=elogind
VERSION=${VERSION:-219.14}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
CWD=$(pwd)
TMP=${TMP:-/tmp}
@@ -91,6 +91,7 @@ sed -i src/login/org.freedesktop.login1.service \
# Apply Gentoo patches:
#cat $CWD/patches/elogind-219.12-session.patch | patch -p1 --verbose || exit 1
+cat $CWD/patches/elogind-219.12-runtime.patch | patch -p1 --verbose || exit 1
cat $CWD/patches/elogind-lrt.patch | patch -p1 --verbose || exit 1
cat $CWD/patches/elogind-docs.patch | patch -p1 --verbose || exit 1
# Merge a pull request for an upstream fix:
diff --git a/deps/elogind/patches/elogind-219.12-runtime.patch b/deps/elogind/patches/elogind-219.12-runtime.patch
new file mode 100644
index 0000000..985dc57
--- /dev/null
+++ b/deps/elogind/patches/elogind-219.12-runtime.patch
@@ -0,0 +1,46 @@
+Taken from Gentoo:
+https://gitweb.gentoo.org/repo/gentoo.git/plain/sys-auth/elogind/files/elogind-219.12-runtime.patch
+
+From 276746896985c438d317fcae414e9c83a6dd3d76 Mon Sep 17 00:00:00 2001
+From: Sven Eden <yamakuzure@gmx.net>
+Date: Fri, 20 Jan 2017 17:14:35 +0100
+Subject: [PATCH] Create /run/systemd as needed
+
+* src/login/logind.c (main): Also create /run/systemd at startup.
+* Create /run/systemd/machines, so that the login monitor works.
+* Fail if any of the needed directories could not be created.
+* But do not fail if any of the needed directories exist.
+---
+ src/login/logind.c | 18 +++++++++++++++---
+ 1 file changed, 15 insertions(+), 3 deletions(-)
+
+diff --git a/src/login/logind.c b/src/login/logind.c
+index 1ab50ec..07a77b1 100644
+--- a/src/login/logind.c
++++ b/src/login/logind.c
+@@ -1131,10 +1131,21 @@ int main(int argc, char *argv[]) {
+ * existence of /run/systemd/seats/ to determine whether
+ * logind is available, so please always make sure this check
+ * stays in. */
+- mkdir_label("/run/systemd/seats", 0755);
+- mkdir_label("/run/systemd/users", 0755);
+- mkdir_label("/run/systemd/sessions", 0755);
+- mkdir_label("/run/systemd/machines", 0755);
++ r = mkdir_label("/run/systemd", 0755);
++ if ( (r < 0) && (-EEXIST != r) )
++ return log_error_errno(r, "Failed to create /run/systemd : %m");
++ r = mkdir_label("/run/systemd/seats", 0755);
++ if ( r < 0 && (-EEXIST != r) )
++ return log_error_errno(r, "Failed to create /run/systemd/seats : %m");
++ r = mkdir_label("/run/systemd/users", 0755);
++ if ( r < 0 && (-EEXIST != r) )
++ return log_error_errno(r, "Failed to create /run/systemd/users : %m");
++ r = mkdir_label("/run/systemd/sessions", 0755);
++ if ( r < 0 && (-EEXIST != r) )
++ return log_error_errno(r, "Failed to create /run/systemd/sessions : %m");
++ r = mkdir_label("/run/systemd/machines", 0755);
++ if ( r < 0 && (-EEXIST != r) )
++ return log_error_errno(r, "Failed to create /run/systemd/machines : %m");
+
+ m = manager_new();
+ if (!m) {
diff --git a/deps/extra-cmake-modules/extra-cmake-modules.SlackBuild b/deps/extra-cmake-modules/extra-cmake-modules.SlackBuild
index a75c626..5a94668 100755
--- a/deps/extra-cmake-modules/extra-cmake-modules.SlackBuild
+++ b/deps/extra-cmake-modules/extra-cmake-modules.SlackBuild
@@ -1,6 +1,6 @@
#!/bin/sh
-# Copyright 2014, 2015 Eric Hameleers, Eindhoven, NL
+# Copyright 2014, 2015, 2016, 2017 Eric Hameleers, Eindhoven, NL
# Copyright 2014 Patrick J. Volkerding, Sebeka, Minnesota, USA
# All rights reserved.
#
@@ -22,7 +22,7 @@
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
PKGNAM=extra-cmake-modules
-VERSION=${VERSION:-5.10.0}
+VERSION=${VERSION:-5.32.0}
BUILD=${BUILD:-1}
NUMJOBS=${NUMJOBS:-" -j7 "}
diff --git a/deps/frei0r-plugins/.url b/deps/frei0r-plugins/.url
new file mode 100644
index 0000000..f4c3742
--- /dev/null
+++ b/deps/frei0r-plugins/.url
@@ -0,0 +1 @@
+https://files.dyne.org/frei0r/frei0r-plugins-1.6.1.tar.gz
diff --git a/deps/frei0r-plugins/frei0r-plugins.SlackBuild b/deps/frei0r-plugins/frei0r-plugins.SlackBuild
new file mode 100755
index 0000000..6e91161
--- /dev/null
+++ b/deps/frei0r-plugins/frei0r-plugins.SlackBuild
@@ -0,0 +1,121 @@
+#!/bin/sh
+
+# Copyright 2017 Eric Hameleers, Eindhoven, NL
+# Copyright 2017 Patrick J. Volkerding, Sebeka, MN, USA
+# All rights reserved.
+#
+# Permission to use, copy, modify, and distribute this software for
+# any purpose with or without fee is hereby granted, provided that
+# the above copyright notice and this permission notice appear in all
+# copies.
+#
+# THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+# IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
+# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+# USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+# OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+# SUCH DAMAGE.
+# -----------------------------------------------------------------------------
+
+
+PKGNAM=frei0r-plugins
+VERSION=${VERSION:-1.6.1}
+BUILD=${BUILD:-1}
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+PKG=$TMP/package-$PKGNAM
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$(uname -m)" in
+ i?86) ARCH=i486 ;;
+ arm*) readelf /usr/bin/file -A | egrep -q "Tag_CPU.*[4,5]" && ARCH=arm || ARCH=armv7hl ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) ARCH=$(uname -m) ;;
+ esac
+ export ARCH
+fi
+
+if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+ SLKLDFLAGS=""
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ SLKLDFLAGS="-L/usr/lib64"
+ LIBDIRSUFFIX="64"
+elif [ "$ARCH" = "armv7hl" ]; then
+ SLKCFLAGS="-O3 -march=armv7-a -mfpu=vfpv3-d16"
+ SLKLDFLAGS=""
+ LIBDIRSUFFIX=""
+else
+ SLKCFLAGS="-O2"
+ SLKLDFLAGS=""
+ LIBDIRSUFFIX=""
+fi
+
+case "$ARCH" in
+ arm*) TARGET=$ARCH-slackware-linux-gnueabi ;;
+ *) TARGET=$ARCH-slackware-linux ;;
+esac
+
+rm -rf $PKG
+mkdir -p $TMP $PKG
+cd $TMP
+rm -rf $PKGNAM-$VERSION
+tar xvf $CWD/$PKGNAM-$VERSION.tar.?z* || exit 1
+cd $PKGNAM-$VERSION || exit 1
+
+# Fix bogus permissions:
+chown -R root:root .
+find . \
+ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \;
+
+# Fix 64bit library path:
+sed -i CMakeLists.txt \
+ -e "s, lib/, lib${LIBDIRSUFFIX}/,g" -e "s,/lib,/lib${LIBDIRSUFFIX},g"
+
+# Configure and compile:
+mkdir -p build
+cd build
+ cmake \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \
+ -DCMAKE_C_FLAGS_RELEASE:STRING="$SLKCFLAGS" \
+ -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
+ -DCMAKE_CXX_FLAGS_RELEASE:STRING="$SLKCFLAGS" \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DLIB_SUFFIX=${LIBDIRSUFFIX} \
+ ..
+ make
+ make install DESTDIR=$PKG
+cd ..
+
+# Add documentation:
+mkdir -p $PKG/usr/doc/$PKGNAM-$VERSION
+cp -a \
+ AUTHORS.txt COPYING* ChangeLog.txt NEWS README.txt TODO.txt \
+ $PKG/usr/doc/$PKGNAM-$VERSION
+
+# Strip binaries:
+find $PKG | xargs file | grep -e "executable" -e "shared object" \
+ | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+
+# Add a package description:
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+# Build the package:
+cd $PKG
+makepkg -l y -c n $TMP/${PKGNAM}-${VERSION}-${ARCH}-${BUILD}.txz
+
diff --git a/deps/frei0r-plugins/slack-desc b/deps/frei0r-plugins/slack-desc
new file mode 100644
index 0000000..8d2df16
--- /dev/null
+++ b/deps/frei0r-plugins/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description.
+# Line up the first '|' above the ':' following the base package name, and
+# the '|' on the right side marks the last column you can put a character in.
+# You must make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':' except on otherwise blank lines.
+
+ |-----handy-ruler------------------------------------------------------|
+frei0r-plugins: frei0r-plugins (minimalistic plugin API for video effects)
+frei0r-plugins:
+frei0r-plugins: Frei0r is a minimalistic plugin API for video effects.
+frei0r-plugins: The main emphasis is on simplicity for an API that will round up
+frei0r-plugins: the most common video effects into simple filters, sources and mixers
+frei0r-plugins: that can be controlled by parameters.
+frei0r-plugins: Its goal is that these simple effects can be shared between many
+frei0r-plugins: applications, avoiding their reimplementation by different projects.
+frei0r-plugins:
+frei0r-plugins: See also: http://frei0r.dyne.org
+frei0r-plugins:
diff --git a/deps/gpgme/.url b/deps/gpgme/.url
new file mode 100644
index 0000000..3461387
--- /dev/null
+++ b/deps/gpgme/.url
@@ -0,0 +1 @@
+https://www.gnupg.org/ftp/gcrypt/gpgme/gpgme-1.11.1.tar.bz2
diff --git a/deps/gpgme/gpgme.SlackBuild b/deps/gpgme/gpgme.SlackBuild
new file mode 100755
index 0000000..c4014d5
--- /dev/null
+++ b/deps/gpgme/gpgme.SlackBuild
@@ -0,0 +1,139 @@
+#!/bin/bash
+
+# Copyright 2006-2009 Robby Workman, Northport, AL, USA
+# Copyright 2007, 2008, 2009, 2010, 2016, 2017, 2018 Patrick J. Volkerding, Sebeka, MN, USA
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+# Modified 2017 by Eric Hameleers <alien@slackware.com>
+
+cd $(dirname $0) ; CWD=$(pwd)
+
+PKGNAM=gpgme
+VERSION=${VERSION:-1.11.1}
+BUILD=${BUILD:-1}
+
+# Find out the default python version:
+if [ $( python -c 'import sys ; print sys.version_info[0]' ) -eq 3 ]; then
+ MYPY="python"
+else
+ MYPY="python2"
+fi
+
+NUMJOBS=${NUMJOBS:-" -j7 "}
+
+TMP=${TMP:-/tmp}
+PKG=$TMP/package-$PKGNAM
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$(uname -m)" in
+ i?86) ARCH=i586 ;;
+ arm*) readelf /usr/bin/file -A | egrep -q "Tag_CPU.*[4,5]" && ARCH=arm || ARCH=armv7hl ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) ARCH=$(uname -m) ;;
+ esac
+ export ARCH
+fi
+
+# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
+# the name of the created package would be, and then exit. This information
+# could be useful to other scripts.
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PKGNAM-$VERSION-$ARCH-$BUILD.txz"
+ exit 0
+fi
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "s390" ]; then
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+fi
+
+case "$ARCH" in
+ arm*) TARGET=$ARCH-slackware-linux-gnueabi ;;
+ *) TARGET=$ARCH-slackware-linux ;;
+esac
+
+rm -rf $PKG
+mkdir -p $TMP $PKG
+cd $TMP
+rm -rf $PKGNAM-$VERSION
+tar xvf $CWD/$PKGNAM-$VERSION.tar.?z* || exit 1
+cd $PKGNAM-$VERSION || exit 1
+
+chown -R root:root .
+find . \
+ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \;
+
+CFLAGS="$SLKCFLAGS" \
+CXXFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --sysconfdir=/etc \
+ --infodir=/usr/info \
+ --docdir=/usr/doc/gpgme-$VERSION \
+ --enable-languages="cl cpp $MYPY qt" \
+ --disable-gpgsm-test \
+ --build=$TARGET \
+ --host=$TARGET \
+ || exit 1
+
+make $NUMJOBS || make || exit 1
+make install DESTDIR=$PKG || exit 1
+
+# Don't ship .la files:
+rm -f $PKG/{,usr/}lib${LIBDIRSUFFIX}/*.la
+
+find $PKG | xargs file | grep -e "executable" -e "shared object" \
+ | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+
+rm $PKG/usr/info/dir
+gzip -9 $PKG/usr/info/*
+
+mkdir -p $PKG/usr/doc/$PKGNAM-$VERSION
+cp -a \
+ AUTHORS COPYING* INSTALL NEWS README* THANKS TODO VERSION \
+ $PKG/usr/doc/$PKGNAM-$VERSION
+
+# If there's a ChangeLog, installing at least part of the recent history
+# is useful, but don't let it get totally out of control:
+if [ -r ChangeLog ]; then
+ DOCSDIR=$(echo $PKG/usr/doc/*-$VERSION)
+ cat ChangeLog | head -n 1000 > $DOCSDIR/ChangeLog
+ touch -r ChangeLog $DOCSDIR/ChangeLog
+fi
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+cd $PKG
+/sbin/makepkg -l y -c n $TMP/$PKGNAM-$VERSION-$ARCH-$BUILD.txz
+
diff --git a/deps/gpgme/patches/gpgme-1.8.0_libsuffix.patch b/deps/gpgme/patches/gpgme-1.8.0_libsuffix.patch
new file mode 100644
index 0000000..a62cc55
--- /dev/null
+++ b/deps/gpgme/patches/gpgme-1.8.0_libsuffix.patch
@@ -0,0 +1,30 @@
+From: Heiko Becker <heirecka@exherbo.org>
+Date: Wed, 16 Nov 2016 22:09:45 +0000 (+0100)
+Subject: Remove a forgotten instance of @libsuffix@
+X-Git-Url: http://git.gnupg.org/cgi-bin/gitweb.cgi?p=gpgme.git;a=commitdiff_plain;h=572c1aac107125ce62230251713349348373db5a
+
+Remove a forgotten instance of @libsuffix@
+
+* lang/cpp/src/GpgmeppConfig.cmake.in.in: Remove a forgotten
+instance of @libsuffix@.
+--
+
+b2c07bd47bd608afa5cc819b60a7b5bb8c9dd96a removed @libsuffix@ from
+cmake config files, but missed one instance.
+
+Signed-off-by: Heiko Becker <heirecka@exherbo.org>
+---
+
+diff --git a/lang/cpp/src/GpgmeppConfig.cmake.in.in b/lang/cpp/src/GpgmeppConfig.cmake.in.in
+index 928d19f..cbe9713 100644
+--- a/lang/cpp/src/GpgmeppConfig.cmake.in.in
++++ b/lang/cpp/src/GpgmeppConfig.cmake.in.in
+@@ -63,7 +63,7 @@ add_library(Gpgmepp SHARED IMPORTED)
+
+ set_target_properties(Gpgmepp PROPERTIES
+ INTERFACE_INCLUDE_DIRECTORIES "@resolved_includedir@/gpgme++;@resolved_includedir@"
+- INTERFACE_LINK_LIBRARIES "pthread;@resolved_libdir@/libgpgme@libsuffix@;@LIBASSUAN_LIBS@"
++ INTERFACE_LINK_LIBRARIES "pthread;@resolved_libdir@/libgpgme.so;@LIBASSUAN_LIBS@"
+ IMPORTED_LOCATION "@resolved_libdir@/libgpgmepp.so"
+ )
+
diff --git a/deps/gpgme/slack-desc b/deps/gpgme/slack-desc
new file mode 100644
index 0000000..3436b08
--- /dev/null
+++ b/deps/gpgme/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|'
+# on the right side marks the last column you can put a character in. You must
+# make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+gpgme: gpgme (GnuPG Made Easy)
+gpgme:
+gpgme: GPGME (GnuPG Made Easy) is a C language library that allows to add
+gpgme: support for cryptography to a program. It is designed to make access
+gpgme: to public key crypto engines like GnuPG or GpgSM easier for
+gpgme: applications. GPGME provides a high-level crypto API for encryption,
+gpgme: decryption, signing, signature verification and key management.
+gpgme:
+gpgme: GPGME uses GnuPG and GpgSM as its backends to support OpenPGP and the
+gpgme: Cryptographic Message Syntax (CMS).
+gpgme:
diff --git a/deps/grantlee/grantlee.SlackBuild b/deps/grantlee/grantlee.SlackBuild
index b9445c8..a9e437e 100755
--- a/deps/grantlee/grantlee.SlackBuild
+++ b/deps/grantlee/grantlee.SlackBuild
@@ -1,6 +1,6 @@
#!/bin/sh
-# Copyright 2015, 2016 Eric Hameleers, Eindhoven, NL
+# Copyright 2015, 2016, 2017 Eric Hameleers, Eindhoven, NL
# Copyright 2015 Patrick J. Volkerding, Sebeka, MN, USA
# All rights reserved.
#
@@ -26,7 +26,7 @@
PKGNAM=grantlee
SRCNAM=grantlee
VERSION=${VERSION:-5.1.0}
-BUILD=${BUILD:-2}
+BUILD=${BUILD:-3}
NUMJOBS=${NUMJOBS:--j7}
@@ -34,7 +34,7 @@ NUMJOBS=${NUMJOBS:--j7}
MARCH=$( uname -m )
if [ -z "$ARCH" ]; then
case "$MARCH" in
- i?86) export ARCH=i486 ;;
+ i?86) export ARCH=i586 ;;
armv7hl) export ARCH=$MARCH ;;
arm*) export ARCH=arm ;;
# Unless $ARCH is already set, use uname -m for all other archs:
@@ -45,6 +45,9 @@ fi
if [ "$ARCH" = "i486" ]; then
SLKCFLAGS="-O2 -march=i486 -mtune=i686"
LIBDIRSUFFIX=""
+elif [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
+ LIBDIRSUFFIX=""
elif [ "$ARCH" = "s390" ]; then
SLKCFLAGS="-O2"
LIBDIRSUFFIX=""
diff --git a/deps/id3lib/.url b/deps/id3lib/.url
new file mode 100644
index 0000000..631ec03
--- /dev/null
+++ b/deps/id3lib/.url
@@ -0,0 +1,2 @@
+http://downloads.sourceforge.net/id3lib/id3lib-3.8.3.tar.gz
+
diff --git a/deps/id3lib/id3lib.SlackBuild b/deps/id3lib/id3lib.SlackBuild
new file mode 100755
index 0000000..e6b3847
--- /dev/null
+++ b/deps/id3lib/id3lib.SlackBuild
@@ -0,0 +1,143 @@
+#!/bin/sh
+
+# Copyright 2017 Eric Hameleers, Eindhoven, NL
+# Copyright 2017 Patrick J. Volkerding, Sebeka, MN, USA
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ''AS IS'' AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+PKGNAM=id3lib
+VERSION=${VERSION:-3.8.3}
+BUILD=${BUILD:-1}
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$(uname -m)" in
+ i?86) ARCH=i486 ;;
+ arm*) readelf /usr/bin/file -A | egrep -q "Tag_CPU.*[4,5]" && ARCH=arm || ARCH=armv7hl ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) ARCH=$(uname -m) ;;
+ esac
+ export ARCH
+fi
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+PKG=$TMP/package-$PKGNAM
+
+if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+ SLKLDFLAGS=""
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ SLKLDFLAGS="-L/usr/lib64"
+ LIBDIRSUFFIX="64"
+elif [ "$ARCH" = "armv7hl" ]; then
+ SLKCFLAGS="-O3 -march=armv7-a -mfpu=vfpv3-d16"
+ SLKLDFLAGS=""
+ LIBDIRSUFFIX="64"
+ LIBDIRSUFFIX=""
+else
+ SLKCFLAGS="-O2"
+ SLKLDFLAGS=""
+ LIBDIRSUFFIX=""
+fi
+
+case "$ARCH" in
+ arm*) TARGET=$ARCH-slackware-linux-gnueabi ;;
+ *) TARGET=$ARCH-slackware-linux ;;
+esac
+
+rm -rf $PKG
+mkdir -p $TMP $PKG
+cd $TMP
+
+rm -rf $PKGNAM-$VERSION
+tar xvf $CWD/$PKGNAM-$VERSION.tar.?z* || exit 1
+cd $PKGNAM-$VERSION || exit 1
+
+# Patches obtained from Arch who obtained them from Debian and elsewhere -
+# Use proper C++ headers:
+cat $CWD/patches/id3lib.cppheaders.patch | patch -p1 --verbose || exit 1
+# Add man pages:
+cat $CWD/patches/id3lib.manpages.patch | patch -p1 --verbose || exit 1
+# Write UTF8/UTF16 characters correctly:
+cat $CWD/patches/id3lib.utf8_writing.patch | patch -p1 --verbose || exit 1
+# Securely use mkstemp:
+cat $CWD/patches/id3lib.mkstemp.patch | patch -p1 --verbose || exit 1
+# Add C wrapper functions for field encoding:
+cat $CWD/patches/id3lib.c_wrapper.patch | patch -p1 --verbose || exit 1
+# Add a null pointer check:
+cat $CWD/patches/id3lib.nullpointer_check.patch | patch -p1 --verbose || exit 1
+# Fix stack smash crashes when reading VBR MP3:
+cat $CWD/patches/id3lib.vbr_stack_smash.patch | patch -p1 --verbose || exit 1
+
+# iomanip.h is obsolete; use the standard C++ header:
+sed -e "s%iomanip.h%iomanip%g" -i configure
+
+# Make sure ownerships and permissions are sane:
+chown -R root:root .
+find . \
+ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \;
+
+# Configure:
+[ ! -x configure ] && ./autogen.sh
+CFLAGS="$SLKCFLAGS" \
+CXXFLAGS="$SLKCFLAGS" \
+LDFLAGS="$SLKLDFLAGS" \
+./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --mandir=/usr/man \
+ --localstatedir=/var \
+ --sysconfdir=/etc \
+ --enable-static=no \
+ --enable-debug=no \
+ --build=$TARGET
+
+# Build and install:
+make || exit 1
+make install DESTDIR=$PKG || exit 1
+
+# Strip binaries (if any):
+find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
+ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
+
+# Add documentation:
+mkdir -p $PKG/usr/doc/$PKGNAM-$VERSION
+cp -a \
+ AUTHORS COPYING ChangeLog HISTORY NEWS README THANKS TODO doc/*.txt \
+ $PKG/usr/doc/$PKGNAM-$VERSION
+
+# Add and compress man pages:
+mkdir -p ${PKG}/usr/man/man1
+install -p -m0644 doc/man/*.1 ${PKG}/usr/man/man1/
+gzip -9 $PKG/usr/man/man?/*.1
+
+# Add a package description:
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+# Build the package:
+cd $PKG
+/sbin/makepkg -l y -c n $TMP/$PKGNAM-$VERSION-$ARCH-$BUILD.txz
+
diff --git a/deps/id3lib/patches/id3lib.c_wrapper.patch b/deps/id3lib/patches/id3lib.c_wrapper.patch
new file mode 100644
index 0000000..d72e81c
--- /dev/null
+++ b/deps/id3lib/patches/id3lib.c_wrapper.patch
@@ -0,0 +1,58 @@
+This patch adds C wrapper functions for field encoding.
+
+It was first introduced in version 3.8.3-8 and fixes
+http://bugs.debian.org/281292
+--- a/include/id3.h
++++ b/include/id3.h
+@@ -104,6 +104,9 @@
+ ID3_C_EXPORT void CCONV ID3Field_GetBINARY (const ID3Field *field, uchar *buffer, size_t buffLength);
+ ID3_C_EXPORT void CCONV ID3Field_FromFile (ID3Field *field, const char *fileName);
+ ID3_C_EXPORT void CCONV ID3Field_ToFile (const ID3Field *field, const char *fileName);
++ ID3_C_EXPORT bool CCONV ID3Field_SetEncoding (ID3Field *field, ID3_TextEnc enc);
++ ID3_C_EXPORT ID3_TextEnc CCONV ID3Field_GetEncoding (const ID3Field *field);
++ ID3_C_EXPORT bool CCONV ID3Field_IsEncodable (const ID3Field *field);
+
+ /* field-info wrappers */
+ ID3_C_EXPORT char* CCONV ID3FrameInfo_ShortName (ID3_FrameID frameid);
+--- a/src/c_wrapper.cpp
++++ b/src/c_wrapper.cpp
+@@ -681,6 +681,39 @@
+ }
+ }
+
++ ID3_C_EXPORT bool CCONV
++ ID3Field_SetEncoding(ID3Field *field, ID3_TextEnc enc)
++ {
++ bool changed = false;
++ if (field)
++ {
++ ID3_CATCH(changed = reinterpret_cast<ID3_Field *>(field)->SetEncoding(enc));
++ }
++ return changed;
++ }
++
++ ID3_C_EXPORT ID3_TextEnc CCONV
++ ID3Field_GetEncoding(const ID3Field *field)
++ {
++ ID3_TextEnc enc = ID3TE_NONE;
++ if (field)
++ {
++ ID3_CATCH(enc = reinterpret_cast<const ID3_Field *>(field)->GetEncoding());
++ }
++ return enc;
++ }
++
++ ID3_C_EXPORT bool CCONV
++ ID3Field_IsEncodable(const ID3Field *field)
++ {
++ bool isEncodable = false;
++ if (field)
++ {
++ ID3_CATCH(isEncodable = reinterpret_cast<const ID3_Field *>(field)->IsEncodable());
++ }
++ return isEncodable;
++ }
++
+ #ifdef __cplusplus
+ }
+ #endif /* __cplusplus */
diff --git a/deps/id3lib/patches/id3lib.cppheaders.patch b/deps/id3lib/patches/id3lib.cppheaders.patch
new file mode 100644
index 0000000..a9b45ab
--- /dev/null
+++ b/deps/id3lib/patches/id3lib.cppheaders.patch
@@ -0,0 +1,22 @@
+This patch imports the proper C++ headers
+--- a/include/id3/id3lib_strings.h
++++ b/include/id3/id3lib_strings.h
+@@ -30,6 +30,7 @@
+ #define _ID3LIB_STRINGS_H_
+
+ #include <string>
++#include <cstring>
+
+ #if (defined(__GNUC__) && (__GNUC__ >= 3) || (defined(_MSC_VER) && _MSC_VER > 1000))
+ namespace std
+--- a/include/id3/writers.h
++++ b/include/id3/writers.h
+@@ -30,7 +30,7 @@
+
+ #include "id3/writer.h"
+ #include "id3/id3lib_streams.h"
+-//#include <string.h>
++#include <cstring>
+
+ class ID3_CPP_EXPORT ID3_OStreamWriter : public ID3_Writer
+ {
diff --git a/deps/id3lib/patches/id3lib.manpages.patch b/deps/id3lib/patches/id3lib.manpages.patch
new file mode 100644
index 0000000..cebf3d4
--- /dev/null
+++ b/deps/id3lib/patches/id3lib.manpages.patch
@@ -0,0 +1,198 @@
+This patch adds debian-made man pages
+--- /dev/null
++++ b/doc/man/id3info.1
+@@ -0,0 +1,31 @@
++.TH ID3INFO 1 "May 2000" local "User Command"
++.SH NAME
++id3info \- Display id3 tag information.
++.SH SYNOPSIS
++.B id3info
++.RB [
++.I OPTION
++.RB ]
++.RB [
++.I FILE
++.RB ]
++.br
++.SH DESCRIPTION
++.B Id3info
++displays both the id3v1 and id3v2 tag information for a file.
++Id3info will not differentiate between the two types of tags.
++.SH OPTIONS
++.TP
++.B \-h, \-\-help
++Display help and exit
++.TP
++.B \-v, \-\-version
++Display version information and exit
++.SH SEE ALSO
++id3convert(1), id3tag(1), id3v2(1)
++.SH AUTHOR
++.B id3lib
++was originally designed and implemented by Dirk Mahoney and is
++maintained by Scott Thomas Haug <sth2@cs.wustl.edu>. Manual page written for
++Debian GNU/Linux by Robert Woodcock <rcw@debian.org>.
++
+--- /dev/null
++++ b/doc/man/id3tag.1
+@@ -0,0 +1,69 @@
++.TH ID3TAG 1 "May 2000" local "User Command"
++.SH NAME
++id3tag \- Tags an mp3 file with id3v1 and/or id3v2 tags.
++.SH SYNOPSIS
++.B id3tag
++.RB [
++.I OPTION
++.RB ] ...
++.RB [
++.I FILE
++.RB ] ...
++.br
++.SH DESCRIPTION
++.B Id3tag
++will render both types of tag by default. Only the last
++tag type indicated in the option list will be used. Non-
++rendered will remain unchanged in the original file. Will
++also parse and convert Lyrics3 v2.0 frames, but will not
++render them.
++
++.SH OPTIONS
++.TP
++.B \-1, \-\-v1tag
++Render only the id3v1 tag
++.TP
++.B \-2, \-\-v2tag
++Render only the id3v2 tag
++.TP
++.B \-h, \-\-help
++Display help and exit
++.TP
++.B \-v, \-\-version
++Display version information and exit
++.TP
++.B \-a, \-\-artist ARTIST
++Set the artist information
++.TP
++.B \-s, \-\-song SONG
++Set the song title information
++.TP
++.B \-A, \-\-album ALBUM
++Set the album title information
++.TP
++.B \-c, \-\-comment COMMENT
++Set the comment information
++.TP
++.B \-C, \-\-desc DESCRIPTION
++Set the comment description
++.TP
++.B \-g, \-\-genre num
++Set the genre number
++.TP
++.B \-y, \-\-year num
++Set the year
++.TP
++.B \-t, \-\-track num
++Set the track number
++.TP
++.B \-T, \-\-total num
++Set the total number of tracks on the album
++
++.SH SEE ALSO
++id3convert(1), id3info(1), id3v2(1)
++.SH AUTHOR
++.B id3lib
++was originally designed and implemented by Dirk Mahoney and is
++maintained by Scott Thomas Haug <sth2@cs.wustl.edu>. Manual page written for
++Debian GNU/Linux by Robert Woodcock <rcw@debian.org>.
++
+--- /dev/null
++++ b/doc/man/id3convert.1
+@@ -0,0 +1,47 @@
++.TH ID3CONVERT 1 "May 2000" local "User Command"
++.SH NAME
++id3convert \- Converts between id3v1 and id3v2 tags of an mp3 file.
++.SH SYNOPSIS
++.B id3convert
++.RB [
++.I OPTION
++.RB ]
++.RB [
++.I FILE
++.RB ]
++.br
++.SH DESCRIPTION
++.B Id3convert
++converts between id3v1 and id3v2 tags of an mp3 file. Id3convert will render
++both types of tag by default. Only the last tag type indicated in the option
++list will be used. Non-rendered tags will remain unchanged in the original
++file. Id3convert will also parse and convert Lyrics3 v2.0 frames, but will
++not render them.
++
++.SH OPTIONS
++.TP
++.B \-1, \-\-v1tag
++Render only the id3v1 tag
++.TP
++.B \-2, \-\-v2tag
++Render only the id3v2 tag
++.TP
++.B \-s, \-\-strip
++Strip, rather than render, the tags
++.TP
++.B \-p, \-\-padding
++Use padding in the tag
++.TP
++.B \-h, \-\-help
++Display help and exit
++.TP
++.B \-v, \-\-version
++Display version information and exit
++
++.SH SEE ALSO
++id3tag(1), id3info(1), id3v2(1)
++.SH AUTHOR
++.B id3lib
++was originally designed and implemented by Dirk Mahoney and is
++maintained by Scott Thomas Haug <sth2@cs.wustl.edu>. Manual page written for
++Debian GNU/Linux by Robert Woodcock <rcw@debian.org>.
+--- /dev/null
++++ b/doc/man/id3cp.1
+@@ -0,0 +1,38 @@
++.TH ID3CP 1 "July 2001" local "User Command"
++.SH NAME
++id3cp \- Copies tags from one file to another.
++.SH SYNOPSIS
++.B id3cp
++.RB [
++.I OPTION
++.RB ] ...
++.RB [
++.I SOURCE
++.RB ]
++.RB [
++.I DEST
++.RB ]
++.br
++.SH DESCRIPTION
++.B Id3cp
++copies tags from SOURCE to DEST.
++.SH OPTIONS
++.TP
++.B \-1, \-\-v1tag
++Render only the id3v1 tag
++.TP
++.B \-2, \-\-v2tag
++Render only the id3v2 tag
++.TP
++.B \-h, \-\-help
++Display help and exit
++.TP
++.B \-v, \-\-version
++Display version information and exit
++.SH SEE ALSO
++id3convert(1), id3info(1), id3v2(1)
++.SH AUTHOR
++.B id3lib
++was originally designed and implemented by Dirk Mahoney and is
++maintained by Scott Thomas Haug <sth2@cs.wustl.edu>. Manual page written for
++Debian GNU/Linux by Robert Woodcock <rcw@debian.org>.
diff --git a/deps/id3lib/patches/id3lib.mkstemp.patch b/deps/id3lib/patches/id3lib.mkstemp.patch
new file mode 100644
index 0000000..36c8417
--- /dev/null
+++ b/deps/id3lib/patches/id3lib.mkstemp.patch
@@ -0,0 +1,54 @@
+This patch fixes an issues where temporary files were created in an insecure
+way.
+
+It was first intruduced in version 3.8.3-7 and fixes
+http://bugs.debian.org/438540
+--- a/src/tag_file.cpp
++++ b/src/tag_file.cpp
+@@ -242,8 +242,8 @@
+ strcpy(sTempFile, filename.c_str());
+ strcat(sTempFile, sTmpSuffix.c_str());
+
+-#if ((defined(__GNUC__) && __GNUC__ >= 3 ) || !defined(HAVE_MKSTEMP))
+- // This section is for Windows folk && gcc 3.x folk
++#if !defined(HAVE_MKSTEMP)
++ // This section is for Windows folk
+ fstream tmpOut;
+ createFile(sTempFile, tmpOut);
+
+@@ -257,7 +257,7 @@
+ tmpOut.write((char *)tmpBuffer, nBytes);
+ }
+
+-#else //((defined(__GNUC__) && __GNUC__ >= 3 ) || !defined(HAVE_MKSTEMP))
++#else //!defined(HAVE_MKSTEMP)
+
+ // else we gotta make a temp file, copy the tag into it, copy the
+ // rest of the old file after the tag, delete the old file, rename
+@@ -270,7 +270,7 @@
+ //ID3_THROW_DESC(ID3E_NoFile, "couldn't open temp file");
+ }
+
+- ofstream tmpOut(fd);
++ ofstream tmpOut(sTempFile);
+ if (!tmpOut)
+ {
+ tmpOut.close();
+@@ -285,14 +285,14 @@
+ uchar tmpBuffer[BUFSIZ];
+ while (file)
+ {
+- file.read(tmpBuffer, BUFSIZ);
++ file.read((char *)tmpBuffer, BUFSIZ);
+ size_t nBytes = file.gcount();
+- tmpOut.write(tmpBuffer, nBytes);
++ tmpOut.write((char *)tmpBuffer, nBytes);
+ }
+
+ close(fd); //closes the file
+
+-#endif ////((defined(__GNUC__) && __GNUC__ >= 3 ) || !defined(HAVE_MKSTEMP))
++#endif ////!defined(HAVE_MKSTEMP)
+
+ tmpOut.close();
+ file.close();
diff --git a/deps/id3lib/patches/id3lib.nullpointer_check.patch b/deps/id3lib/patches/id3lib.nullpointer_check.patch
new file mode 100644
index 0000000..d4ca5d2
--- /dev/null
+++ b/deps/id3lib/patches/id3lib.nullpointer_check.patch
@@ -0,0 +1,12 @@
+This patch adds a check for a null pointer
+--- a/src/header_tag.cpp
++++ b/src/header_tag.cpp
+@@ -54,7 +54,7 @@
+ {
+ size_t bytesUsed = ID3_TagHeader::SIZE;
+
+- if (_info->is_extended)
++ if (_info && _info->is_extended)
+ {
+ bytesUsed += _info->extended_bytes;
+ }
diff --git a/deps/id3lib/patches/id3lib.utf8_writing.patch b/deps/id3lib/patches/id3lib.utf8_writing.patch
new file mode 100644
index 0000000..3d3f50f
--- /dev/null
+++ b/deps/id3lib/patches/id3lib.utf8_writing.patch
@@ -0,0 +1,38 @@
+Patch from 'Spoon' to fix issues with writing certain unicode characters
+--- a/ChangeLog
++++ b/ChangeLog
+@@ -1,3 +1,8 @@
++2006-02-17 Jerome Couderc
++
++ * Patch from Spoon to fix UTF-16 writing bug
++ http://sourceforge.net/tracker/index.php?func=detail&aid=1016290&group_id=979&atid=300979
++
+ 2003-03-02 Sunday 17:38 Thijmen Klok <thijmen@id3lib.org>
+
+ * THANKS (1.20): added more people
+--- a/src/io_helpers.cpp
++++ b/src/io_helpers.cpp
+@@ -363,11 +363,22 @@
+ // Write the BOM: 0xFEFF
+ unicode_t BOM = 0xFEFF;
+ writer.writeChars((const unsigned char*) &BOM, 2);
++ // Patch from Spoon : 2004-08-25 14:17
++ // http://sourceforge.net/tracker/index.php?func=detail&aid=1016290&group_id=979&atid=300979
++ // Wrong code
++ //for (size_t i = 0; i < size; i += 2)
++ //{
++ // unicode_t ch = (data[i] << 8) | data[i+1];
++ // writer.writeChars((const unsigned char*) &ch, 2);
++ //}
++ // Right code
++ unsigned char *pdata = (unsigned char *) data.c_str();
+ for (size_t i = 0; i < size; i += 2)
+ {
+- unicode_t ch = (data[i] << 8) | data[i+1];
++ unicode_t ch = (pdata[i] << 8) | pdata[i+1];
+ writer.writeChars((const unsigned char*) &ch, 2);
+ }
++ // End patch
+ }
+ return writer.getCur() - beg;
+ }
diff --git a/deps/id3lib/patches/id3lib.vbr_stack_smash.patch b/deps/id3lib/patches/id3lib.vbr_stack_smash.patch
new file mode 100644
index 0000000..9bf33e9
--- /dev/null
+++ b/deps/id3lib/patches/id3lib.vbr_stack_smash.patch
@@ -0,0 +1,19 @@
+Description: Fix crashes when reading VBR MP3 file.
+Bug-Ubuntu: https://launchpad.net/bugs/444466
+Origin: upstream, http://sourceforge.net/tracker/?func=detail&aid=937707&group_id=979&atid=300979
+Forwarded: yes
+Author: Urs Fleisch
+
+Index: id3lib3.8.3-3.8.3/src/mp3_parse.cpp
+===================================================================
+--- id3lib3.8.3-3.8.3.orig/src/mp3_parse.cpp 2009-10-06 23:12:10.381250132 +0200
++++ id3lib3.8.3-3.8.3/src/mp3_parse.cpp 2009-10-06 23:14:09.545252591 +0200
+@@ -465,7 +465,7 @@
+ // from http://www.xingtech.com/developer/mp3/
+
+ const size_t VBR_HEADER_MIN_SIZE = 8; // "xing" + flags are fixed
+- const size_t VBR_HEADER_MAX_SIZE = 116; // frames, bytes, toc and scale are optional
++ const size_t VBR_HEADER_MAX_SIZE = 120; // frames, bytes, toc and scale are optional
+
+ if (mp3size >= vbr_header_offest + VBR_HEADER_MIN_SIZE)
+ {
diff --git a/deps/id3lib/slack-desc b/deps/id3lib/slack-desc
new file mode 100644
index 0000000..7e7e50b
--- /dev/null
+++ b/deps/id3lib/slack-desc
@@ -0,0 +1,20 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description.
+# Line up the first '|' above the ':' following the base package name, and
+# the '|' on the right side marks the last column you can put a character in.
+# You must make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':' except on otherwise blank lines.
+
+ |-----handy-ruler------------------------------------------------------|
+id3lib: id3lib (id3 tag manipulation library)
+id3lib:
+id3lib: id3lib is a software library for manipulating ID3v1 and ID3v2 tags.
+id3lib: It provides a convenient interface for software developers to include
+id3lib: standards-compliant ID3v1/2 tagging capabilities in applications.
+id3lib: Features include identification of valid tags, automatic size
+id3lib: conversions, (re)synchronisation of tag frames, seamless tag
+id3lib: (de)compression, and optional padding facilities.
+id3lib:
+id3lib: Homepage: http://id3lib.sourceforge.net/
+id3lib:
+
diff --git a/deps/json-glib/.url b/deps/json-glib/.url
new file mode 100644
index 0000000..f6f66ba
--- /dev/null
+++ b/deps/json-glib/.url
@@ -0,0 +1 @@
+http://ftp.gnome.org/pub/gnome/sources/json-glib/1.4/json-glib-1.4.2.tar.xz
diff --git a/deps/json-glib/json-glib.SlackBuild b/deps/json-glib/json-glib.SlackBuild
index 4975cb1..68344c0 100755
--- a/deps/json-glib/json-glib.SlackBuild
+++ b/deps/json-glib/json-glib.SlackBuild
@@ -1,6 +1,6 @@
#!/bin/sh
# Copyright 2015 Patrick J. Volkerding, Sebeka, MN, USA
-# Copyright 2015 Eric Hameleers, Eindhoven, NL
+# Copyright 2015, 2017 Eric Hameleers, Eindhoven, NL
# All rights reserved.
#
# Permission to use, copy, modify, and distribute this software for
@@ -24,47 +24,42 @@
PKGNAM=json-glib
-VERSION=${VERSION:-1.0.4}
+VERSION=${VERSION:-1.4.2}
BUILD=${BUILD:-1}
-NUMJOBS=${NUMJOBS:" -j4 "}
+NUMJOBS=${NUMJOBS:-" -j4 "}
CWD=$(pwd)
TMP=${TMP:-/tmp}
PKG=$TMP/package-$PKGNAM
-if [ -e $CWD/machine.conf ]; then
- . $CWD/machine.conf ]
-elif [ -e /etc/slackbuild/machine.conf ]; then
- . /etc/slackbuild/machine.conf ]
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$(uname -m)" in
+ i?86) ARCH=i586 ;;
+ arm*) readelf /usr/bin/file -A | egrep -q "Tag_CPU.*[4,5]" && ARCH=arm || ARCH=armv7hl ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) ARCH=$(uname -m) ;;
+ esac
+ export ARCH
+fi
+
+# Set CFLAGS/CXXFLAGS and LIBDIRSUFFIX:
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "s390" ]; then
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+elif [ "$ARCH" = "arm" ]; then
+ SLKCFLAGS="-O2 -march=armv5te"
+ LIBDIRSUFFIX=""
else
- # Automatically determine the architecture we're building on:
- MARCH=$( uname -m )
- if [ -z "$ARCH" ]; then
- case "$MARCH" in
- i?86) export ARCH=i486 ;;
- arm*) export ARCH=arm ;;
- # Unless $ARCH is already set, use uname -m for all other archs:
- *) export ARCH=$MARCH ;;
- esac
- fi
- # Set CFLAGS/CXXFLAGS and LIBDIRSUFFIX:
- if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
- LIBDIRSUFFIX=""
- elif [ "$ARCH" = "s390" ]; then
- SLKCFLAGS="-O2"
- LIBDIRSUFFIX=""
- elif [ "$ARCH" = "x86_64" ]; then
- SLKCFLAGS="-O2 -fPIC"
- LIBDIRSUFFIX="64"
- elif [ "$ARCH" = "arm" ]; then
- SLKCFLAGS="-O2 -march=armv5te"
- LIBDIRSUFFIX=""
- else
- SLKCFLAGS="-O2"
- LIBDIRSUFFIX=""
- fi
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
fi
case "$ARCH" in
diff --git a/deps/lensfun/.url b/deps/lensfun/.url
new file mode 100644
index 0000000..3fc2a84
--- /dev/null
+++ b/deps/lensfun/.url
@@ -0,0 +1 @@
+http://sourceforge.net/projects/lensfun/files/0.3.2/lensfun-0.3.2.tar.gz
diff --git a/deps/lensfun/lensfun.SlackBuild b/deps/lensfun/lensfun.SlackBuild
new file mode 100755
index 0000000..14af1b5
--- /dev/null
+++ b/deps/lensfun/lensfun.SlackBuild
@@ -0,0 +1,121 @@
+#!/bin/sh
+
+# Copyright 2009, 2010, 2012, 2017 Eric Hameleers, Eindhoven, NL
+# Copyright 2017 Patrick J. Volkerding, Sebeka, MN, USA
+# All rights reserved.
+#
+# Permission to use, copy, modify, and distribute this software for
+# any purpose with or without fee is hereby granted, provided that
+# the above copyright notice and this permission notice appear in all
+# copies.
+#
+# THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+# IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
+# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+# USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+# OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+# SUCH DAMAGE.
+# -----------------------------------------------------------------------------
+
+
+PKGNAM=lensfun
+VERSION=${VERSION:-0.3.2}
+BUILD=${BUILD:-1}
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+PKG=$TMP/package-$PKGNAM
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$(uname -m)" in
+ i?86) ARCH=i486 ;;
+ arm*) readelf /usr/bin/file -A | egrep -q "Tag_CPU.*[4,5]" && ARCH=arm || ARCH=armv7hl ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) ARCH=$(uname -m) ;;
+ esac
+ export ARCH
+fi
+
+if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+ SLKLDFLAGS=""
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ SLKLDFLAGS="-L/usr/lib64"
+ LIBDIRSUFFIX="64"
+elif [ "$ARCH" = "armv7hl" ]; then
+ SLKCFLAGS="-O3 -march=armv7-a -mfpu=vfpv3-d16"
+ SLKLDFLAGS=""
+ LIBDIRSUFFIX=""
+else
+ SLKCFLAGS="-O2"
+ SLKLDFLAGS=""
+ LIBDIRSUFFIX=""
+fi
+
+case "$ARCH" in
+ arm*) TARGET=$ARCH-slackware-linux-gnueabi ;;
+ *) TARGET=$ARCH-slackware-linux ;;
+esac
+
+rm -rf $PKG
+mkdir -p $TMP $PKG
+cd $TMP
+rm -rf $PKGNAM-$VERSION
+tar xvf $CWD/$PKGNAM-$VERSION.tar.?z* || exit 1
+cd $PKGNAM-$VERSION || exit 1
+
+# Fix bogus permissions:
+chown -R root:root .
+find . \
+ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \;
+
+# Configure and compile:
+mkdir -p build
+cd build
+ cmake \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \
+ -DCMAKE_C_FLAGS_RELEASE:STRING="$SLKCFLAGS" \
+ -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
+ -DCMAKE_CXX_FLAGS_RELEASE:STRING="$SLKCFLAGS" \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DLIB_SUFFIX=${LIBDIRSUFFIX} \
+ -DBUILD_LENSTOOL=ON \
+ -DBUILD_FOR_SSE=ON \
+ -DBUILD_FOR_SSE2=ON \
+ -DBUILD_TESTS=OFF \
+ ..
+ make
+ make install DESTDIR=$PKG
+cd ..
+
+# Add documentation:
+mkdir -p $PKG/usr/doc/$PKGNAM-$VERSION
+cp -a \
+ ChangeLog README* docs/*.txt \
+ $PKG/usr/doc/$PKGNAM-$VERSION
+
+# Strip binaries:
+find $PKG | xargs file | grep -e "executable" -e "shared object" \
+ | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+
+# Add a package description:
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+# Build the package:
+cd $PKG
+makepkg -l y -c n $TMP/${PKGNAM}-${VERSION}-${ARCH}-${BUILD}.txz
+
diff --git a/deps/lensfun/slack-desc b/deps/lensfun/slack-desc
new file mode 100644
index 0000000..4df74ce
--- /dev/null
+++ b/deps/lensfun/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|'
+# on the right side marks the last column you can put a character in. You must
+# make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+lensfun: lensfun (database of photographic lenses and their characteristics)
+lensfun:
+lensfun: lensfun is a library that provide a open source database of
+lensfun: photographic lenses and their characteristics also provides
+lensfun: a set of algorithms for correcting images based on detailed
+lensfun: knowledge of lens properties and calibration data.
+lensfun:
+lensfun:
+lensfun:
+lensfun: lensfun home: http://lensfun.sourceforge.net/
+lensfun:
diff --git a/deps/libappindicator/libappindicator.SlackBuild b/deps/libappindicator/libappindicator.SlackBuild
index 2c11c95..089728a 100755
--- a/deps/libappindicator/libappindicator.SlackBuild
+++ b/deps/libappindicator/libappindicator.SlackBuild
@@ -27,7 +27,7 @@ PKGNAM=libappindicator
VERSION=${VERSION:-12.10.0}
BUILD=${BUILD:-2}
-NUMJOBS=${NUMJOBS:" -j4 "}
+NUMJOBS=${NUMJOBS:-" -j4 "}
CWD=$(pwd)
TMP=${TMP:-/tmp}
diff --git a/deps/libburn/.url b/deps/libburn/.url
new file mode 100644
index 0000000..75deef6
--- /dev/null
+++ b/deps/libburn/.url
@@ -0,0 +1,2 @@
+http://files.libburnia-project.org/releases/libburn-1.4.8.tar.gz
+
diff --git a/deps/libburn/libburn.SlackBuild b/deps/libburn/libburn.SlackBuild
new file mode 100755
index 0000000..5b82850
--- /dev/null
+++ b/deps/libburn/libburn.SlackBuild
@@ -0,0 +1,120 @@
+#!/bin/sh
+
+# Copyright 2017 Eric Hameleers, Eindhoven, NL
+# Copyright 2017 Patrick J. Volkerding, Sebeka, MN, USA
+# All rights reserved.
+#
+# Permission to use, copy, modify, and distribute this software for
+# any purpose with or without fee is hereby granted, provided that
+# the above copyright notice and this permission notice appear in all
+# copies.
+#
+# THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+# IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
+# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+# USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+# OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+# SUCH DAMAGE.
+# -----------------------------------------------------------------------------
+
+
+PKGNAM=libburn
+VERSION=${VERSION:-1.4.8}
+BUILD=${BUILD:-1}
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+PKG=$TMP/package-$PKGNAM
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$(uname -m)" in
+ i?86) ARCH=i586 ;;
+ arm*) readelf /usr/bin/file -A | egrep -q "Tag_CPU.*[4,5]" && ARCH=arm || ARCH=armv7hl ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) ARCH=$(uname -m) ;;
+ esac
+ export ARCH
+fi
+
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
+ SLKLDFLAGS=""
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ SLKLDFLAGS="-L/usr/lib64"
+ LIBDIRSUFFIX="64"
+elif [ "$ARCH" = "armv7hl" ]; then
+ SLKCFLAGS="-O3 -march=armv7-a -mfpu=vfpv3-d16"
+ SLKLDFLAGS=""
+ LIBDIRSUFFIX=""
+else
+ SLKCFLAGS="-O2"
+ SLKLDFLAGS=""
+ LIBDIRSUFFIX=""
+fi
+
+case "$ARCH" in
+ arm*) TARGET=$ARCH-slackware-linux-gnueabi ;;
+ *) TARGET=$ARCH-slackware-linux ;;
+esac
+
+rm -rf $PKG
+mkdir -p $TMP $PKG
+cd $TMP
+rm -rf $PKGNAM-$VERSION
+tar xvf $CWD/$PKGNAM-$VERSION.tar.?z* || exit 1
+cd $PKGNAM-$VERSION || exit 1
+
+# Fix bogus permissions:
+chown -R root:root .
+find . \
+ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \;
+
+# Configure:
+CFLAGS="$SLKCFLAGS" \
+CXXFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --mandir=/usr/man \
+ --docdir=/usr/doc/$PRGNAM-$VERSION \
+ --disable-static \
+ --build=$TARGET
+
+# Build and install:
+make || exit 1
+make DESTDIR=$PKG install || exit 1
+
+# Add documentation:
+mkdir -p $PKG/usr/doc/$PKGNAM-$VERSION
+cp -a \
+ AUTHORS CONTRIBUTORS COPYING COPYRIGHT ChangeLog NEWS README \
+ $PKG/usr/doc/$PKGNAM-$VERSION
+
+# Strip binaries:
+find $PKG | xargs file | grep -e "executable" -e "shared object" \
+ | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+
+# Compress man pages:
+find $PKG/usr/man -type f -exec gzip -9 {} \;
+for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
+
+# Add a package description:
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+# Build the package:
+cd $PKG
+makepkg -l y -c n $TMP/${PKGNAM}-${VERSION}-${ARCH}-${BUILD}.txz
+
diff --git a/deps/libburn/slack-desc b/deps/libburn/slack-desc
new file mode 100644
index 0000000..0073ffa
--- /dev/null
+++ b/deps/libburn/slack-desc
@@ -0,0 +1,20 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description.
+# Line up the first '|' above the ':' following the base package name, and
+# the '|' on the right side marks the last column you can put a character in.
+# You must make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':' except on otherwise blank lines.
+
+ |-----handy-ruler------------------------------------------------------|
+libburn: libburn (optical media writing library)
+libburn:
+libburn: Libburn is a library by which preformatted data get onto optical
+libburn: media. Libburn also offers a facility for reading data blocks from
+libburn: optical drives without using the normal block device I/O.
+libburn: Audio CD can be written and read.
+libburn: The code of libburn is independent of cdrecord.
+libburn:
+libburn:
+libburn: See also: https://dev.lovelyhq.com/libburnia/web/wikis/home
+libburn:
+
diff --git a/deps/libdbusmenu-gtk/libdbusmenu-gtk.SlackBuild b/deps/libdbusmenu-gtk/libdbusmenu-gtk.SlackBuild
index 19a0b7c..0545da0 100755
--- a/deps/libdbusmenu-gtk/libdbusmenu-gtk.SlackBuild
+++ b/deps/libdbusmenu-gtk/libdbusmenu-gtk.SlackBuild
@@ -28,7 +28,7 @@ SRCNAM=libdbusmenu
VERSION=${VERSION:-12.10.2}
BUILD=${BUILD:-2}
-NUMJOBS=${NUMJOBS:" -j4 "}
+NUMJOBS=${NUMJOBS:-" -j4 "}
CWD=$(pwd)
TMP=${TMP:-/tmp}
diff --git a/deps/libdbusmenu-qt5/.url b/deps/libdbusmenu-qt5/.url
new file mode 100644
index 0000000..a85ab5b
--- /dev/null
+++ b/deps/libdbusmenu-qt5/.url
@@ -0,0 +1 @@
+http://archive.ubuntu.com/ubuntu/pool/main/libd/libdbusmenu-qt/libdbusmenu-qt_0.9.3+16.04.20160218.orig.tar.gz
diff --git a/deps/libdbusmenu-qt5/libdbusmenu-qt5.SlackBuild b/deps/libdbusmenu-qt5/libdbusmenu-qt5.SlackBuild
index efec6bd..103e251 100755
--- a/deps/libdbusmenu-qt5/libdbusmenu-qt5.SlackBuild
+++ b/deps/libdbusmenu-qt5/libdbusmenu-qt5.SlackBuild
@@ -1,6 +1,6 @@
#!/bin/sh
-# Copyright 2010, 2011, 2012, 2014, 2015 Eric Hameleers, Eindhoven, The Netherlands
+# Copyright 2010, 2011, 2012, 2014, 2015, 2017 Eric Hameleers, Eindhoven, The Netherlands
# Copyright 2010, 2011, 2012 Patrick J. Volkerding, Sebeka, MN, USA
# All rights reserved.
@@ -30,8 +30,9 @@
# grep dbusmenu_qt_VERSION dbusmenu-qt/CMakeLists.txt
PKGNAM=libdbusmenu-qt5
-VERSION=${VERSION:-r267_20140619}
-BUILD=${BUILD:-3}
+SRCNAM=libdbusmenu-qt
+VERSION=${VERSION:-0.9.3+16.04.20160218}
+BUILD=${BUILD:-1}
NUMJOBS=${NUMJOBS:--j7}
@@ -39,7 +40,7 @@ NUMJOBS=${NUMJOBS:--j7}
MARCH=$( uname -m )
if [ -z "$ARCH" ]; then
case "$MARCH" in
- i?86) export ARCH=i486 ;;
+ i?86) export ARCH=i586 ;;
armv7hl) export ARCH=$MARCH ;;
arm*) export ARCH=arm ;;
# Unless $ARCH is already set, use uname -m for all other archs:
@@ -50,6 +51,9 @@ fi
if [ "$ARCH" = "i486" ]; then
SLKCFLAGS="-O2 -march=i486 -mtune=i686"
LIBDIRSUFFIX=""
+elif [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
+ LIBDIRSUFFIX=""
elif [ "$ARCH" = "s390" ]; then
SLKCFLAGS="-O2"
LIBDIRSUFFIX=""
@@ -68,9 +72,9 @@ PKG=$TMP/package-$PKGNAM
rm -rf $PKG
mkdir -p $TMP $PKG
cd $TMP
-rm -rf $PKGNAM-$VERSION
-tar xvf $CWD/$PKGNAM-$VERSION.tar.?z* || exit 1
-cd $PKGNAM-$VERSION || exit 1
+rm -rf $SRCNAM-$VERSION
+tar xvf $CWD/${SRCNAM}_${VERSION}.orig.tar.?z* || exit 1
+cd $SRCNAM-$VERSION || exit 1
chown -R root:root .
find . \
@@ -105,10 +109,6 @@ cp -a \
COPYING NEWS README \
$PKG/usr/doc/$PKGNAM-$VERSION
-mkdir -p $PKG/usr/doc/$PKGNAM-$VERSION/doc
-mv $PKG/usr/share/doc/dbusmenu-qt/* $PKG/usr/doc/$PKGNAM-$VERSION/doc
-rm -rf $PKG/usr/share/doc
-
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
diff --git a/deps/libdbusmenu-qt5/slack-desc b/deps/libdbusmenu-qt5/slack-desc
index 7591a5a..22f2f31 100644
--- a/deps/libdbusmenu-qt5/slack-desc
+++ b/deps/libdbusmenu-qt5/slack-desc
@@ -12,7 +12,7 @@ libdbusmenu-qt5: This library provides a Qt5 implementation of the DBusMenu prot
libdbusmenu-qt5: The DBusMenu protocol makes it possible for applications to export
libdbusmenu-qt5: and import their menus over DBus.
libdbusmenu-qt5:
-libdbusmenu-qt5: Homepage: http://people.canonical.com/~agateau/dbusmenu/
+libdbusmenu-qt5: Homepage: https://launchpad.net/libdbusmenu-qt
libdbusmenu-qt5:
libdbusmenu-qt5:
libdbusmenu-qt5:
diff --git a/deps/libdmtx/.url b/deps/libdmtx/.url
new file mode 100644
index 0000000..90b25d8
--- /dev/null
+++ b/deps/libdmtx/.url
@@ -0,0 +1 @@
+https://sourceforge.net/projects/libdmtx/files/libdmtx/0.7.4/libdmtx-0.7.4.tar.gz/download
diff --git a/deps/libdmtx/libdmtx.SlackBuild b/deps/libdmtx/libdmtx.SlackBuild
new file mode 100755
index 0000000..222e167
--- /dev/null
+++ b/deps/libdmtx/libdmtx.SlackBuild
@@ -0,0 +1,138 @@
+#!/bin/sh
+# Copyright 2017 Patrick J. Volkerding, Sebeka, MN, USA
+# Copyright 2017 Eric Hameleers, Eindhoven, NL
+# All rights reserved.
+#
+# Permission to use, copy, modify, and distribute this software for
+# any purpose with or without fee is hereby granted, provided that
+# the above copyright notice and this permission notice appear in all
+# copies.
+#
+# THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+# IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
+# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+# USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+# OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+# SUCH DAMAGE.
+# -----------------------------------------------------------------------------
+
+
+PKGNAM=libdmtx
+VERSION=${VERSION:-0.7.4}
+BUILD=${BUILD:-2}
+
+NUMJOBS=${NUMJOBS:-" -j4 "}
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+PKG=$TMP/package-$PKGNAM
+
+if [ -e $CWD/machine.conf ]; then
+ . $CWD/machine.conf ]
+elif [ -e /etc/slackbuild/machine.conf ]; then
+ . /etc/slackbuild/machine.conf ]
+else
+ # Automatically determine the architecture we're building on:
+ MARCH=$( uname -m )
+ if [ -z "$ARCH" ]; then
+ case "$MARCH" in
+ i?86) export ARCH=i486 ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$MARCH ;;
+ esac
+ fi
+ # Set CFLAGS/CXXFLAGS and LIBDIRSUFFIX:
+ if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+ LIBDIRSUFFIX=""
+ elif [ "$ARCH" = "s390" ]; then
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+ elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+ elif [ "$ARCH" = "arm" ]; then
+ SLKCFLAGS="-O2 -march=armv5te"
+ LIBDIRSUFFIX=""
+ else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+ fi
+fi
+
+case "$ARCH" in
+ arm*) TARGET=$ARCH-slackware-linux-gnueabi ;;
+ *) TARGET=$ARCH-slackware-linux ;;
+esac
+
+rm -rf $PKG
+mkdir -p $TMP $PKG
+cd $TMP
+rm -rf $PKGNAM-$VERSION
+tar xvf $CWD/$PKGNAM-$VERSION.tar.?z || exit 1
+cd $PKGNAM-$VERSION || exit 1
+
+# Make sure ownerships and permissions are sane:
+chown -R root:root .
+find . \
+ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \;
+
+# Configure:
+./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --sysconfdir=/etc \
+ --localstatedir=/var \
+ --mandir=/usr/man \
+ --docdir=/usr/doc/$PKGNAM-$VERSION \
+ --enable-static=no \
+ --build=$TARGET \
+ || exit 1
+
+# Build and install:
+make $NUMJOBS || make || exit 1
+make install DESTDIR=$PKG || exit 1
+
+# Strip binaries:
+find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | \
+ grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
+
+# Compress and link manpages, if any:
+if [ -d $PKG/usr/man ]; then
+ ( cd $PKG/usr/man
+ for manpagedir in $(find . -type d -name "man*") ; do
+ ( cd $manpagedir
+ for eachpage in $( find . -type l -maxdepth 1) ; do
+ ln -s $( readlink $eachpage ).gz $eachpage.gz
+ rm $eachpage
+ done
+ gzip -9 *.?
+ )
+ done
+ )
+fi
+
+# Add documentation:
+mkdir -p $PKG/usr/doc/$PKGNAM-$VERSION
+cp -a \
+ AUTHORS ChangeLog KNOWNBUG LICENSE NEWS README* TODO \
+ $PKG/usr/doc/$PKGNAM-$VERSION
+
+# Add a description:
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+# Create the package:
+cd $PKG
+/sbin/makepkg -l y -c n $TMP/$PKGNAM-$VERSION-$ARCH-$BUILD.txz
+
diff --git a/deps/libdmtx/slack-desc b/deps/libdmtx/slack-desc
new file mode 100644
index 0000000..e9ffd92
--- /dev/null
+++ b/deps/libdmtx/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description.
+# Line up the first '|' above the ':' following the base package name, and
+# the '|' on the right side marks the last column you can put a character in.
+# You must make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':' except on otherwise blank lines.
+
+ |-----handy-ruler------------------------------------------------------|
+libdmtx: libdmtx (library for reading and writing Data Matrix 2D barcodes)
+libdmtx:
+libdmtx: libdmtx is open source software for reading and writing Data Matrix
+libdmtx: barcodes.
+libdmtx: Data Matrix barcodes are two-dimensional symbols that hold a dense
+libdmtx: pattern of data with built-in error correction.
+libdmtx:
+libdmtx:
+libdmtx:
+libdmtx: Homepage: http://libdmtx.sourceforge.net/
+libdmtx:
diff --git a/deps/libindicator/libindicator.SlackBuild b/deps/libindicator/libindicator.SlackBuild
index 0ecc19d..e230431 100755
--- a/deps/libindicator/libindicator.SlackBuild
+++ b/deps/libindicator/libindicator.SlackBuild
@@ -27,7 +27,7 @@ PKGNAM=libindicator
VERSION=${VERSION:-12.10.1}
BUILD=${BUILD:-2}
-NUMJOBS=${NUMJOBS:" -j4 "}
+NUMJOBS=${NUMJOBS:-" -j4 "}
CWD=$(pwd)
TMP=${TMP:-/tmp}
diff --git a/deps/libinput/.url b/deps/libinput/.url
index bed45d5..9460ebe 100644
--- a/deps/libinput/.url
+++ b/deps/libinput/.url
@@ -1,2 +1,2 @@
-https://www.freedesktop.org/software/libinput/libinput-1.3.3.tar.xz
+https://www.freedesktop.org/software/libinput/libinput-1.5.4.tar.xz
diff --git a/deps/libinput/libinput.SlackBuild b/deps/libinput/libinput.SlackBuild
index 03879eb..e6663d3 100755
--- a/deps/libinput/libinput.SlackBuild
+++ b/deps/libinput/libinput.SlackBuild
@@ -1,6 +1,6 @@
#!/bin/sh
# Copyright 2016 Patrick J. Volkerding, Sebeka, MN, USA
-# Copyright 2016 Eric Hameleers, Eindhoven, NL
+# Copyright 2016, 2017 Eric Hameleers, Eindhoven, NL
# All rights reserved.
#
# Permission to use, copy, modify, and distribute this software for
@@ -24,13 +24,13 @@
PKGNAM=libinput
-VERSION=${VERSION:-1.3.3}
+VERSION=${VERSION:-1.5.4}
BUILD=${BUILD:-1}
# Support for (wacom) tablets requires libwacom as additional dependency:
-TABLET_SUPPORT=${TABLET_SUPPORT:-"NO"}
+TABLET_SUPPORT=${TABLET_SUPPORT:-"YES"}
-NUMJOBS=${NUMJOBS:" -j4 "}
+NUMJOBS=${NUMJOBS:-" -j4 "}
CWD=$(pwd)
TMP=${TMP:-/tmp}
diff --git a/deps/libpwquality/.url b/deps/libpwquality/.url
new file mode 100644
index 0000000..24e1977
--- /dev/null
+++ b/deps/libpwquality/.url
@@ -0,0 +1 @@
+https://github.com/libpwquality/libpwquality/releases/download/libpwquality-1.4.0/libpwquality-1.4.0.tar.bz2
diff --git a/deps/libpwquality/libpwquality.SlackBuild b/deps/libpwquality/libpwquality.SlackBuild
new file mode 100755
index 0000000..bbfbd18
--- /dev/null
+++ b/deps/libpwquality/libpwquality.SlackBuild
@@ -0,0 +1,129 @@
+#!/bin/sh
+
+# Copyright 2017 Eric Hameleers, Eindhoven, NL
+# Copyright 2017 Patrick J. Volkerding, Sebeka, MN, USA
+# All rights reserved.
+#
+# Permission to use, copy, modify, and distribute this software for
+# any purpose with or without fee is hereby granted, provided that
+# the above copyright notice and this permission notice appear in all
+# copies.
+#
+# THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+# IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
+# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+# USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+# OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+# SUCH DAMAGE.
+# -----------------------------------------------------------------------------
+
+
+PKGNAM=libpwquality
+VERSION=${VERSION:-1.4.0}
+BUILD=${BUILD:-1}
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+PKG=$TMP/package-$PKGNAM
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$(uname -m)" in
+ i?86) ARCH=i586 ;;
+ arm*) readelf /usr/bin/file -A | egrep -q "Tag_CPU.*[4,5]" && ARCH=arm || ARCH=armv7hl ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) ARCH=$(uname -m) ;;
+ esac
+ export ARCH
+fi
+
+case "$ARCH" in
+ i?86) SLKCFLAGS="-O2 -march=$ARCH -mtune=i686"
+ SLKLDFLAGS=""; LIBDIRSUFFIX=""
+ ;;
+ x86_64) SLKCFLAGS="-O2 -fPIC"
+ SLKLDFLAGS="-L/usr/lib64"; LIBDIRSUFFIX="64"
+ ;;
+ armv7hl) SLKCFLAGS="-O2 -march=armv7-a -mfpu=vfpv3-d16"
+ SLKLDFLAGS=""; LIBDIRSUFFIX=""
+ ;;
+ armv6hl) SLKCFLAGS="-O2 -march=armv6 -mfpu=vfp -mfloat-abi=hard"
+ SLKLDFLAGS=""; LIBDIRSUFFIX=""
+ ;;
+ *) SLKCFLAGS=${SLKCFLAGS:-"O2"}
+ SLKLDFLAGS=${SLKLDFLAGS:-""}; LIBDIRSUFFIX=${LIBDIRSUFFIX:-""}
+ ;;
+esac
+
+case "$ARCH" in
+ arm*) TARGET=$ARCH-slackware-linux-gnueabi ;;
+ *) TARGET=$ARCH-slackware-linux ;;
+esac
+
+rm -rf $PKG
+mkdir -p $TMP $PKG
+cd $TMP
+rm -rf $PKGNAM-$VERSION
+tar xvf $CWD/$PKGNAM-$VERSION.tar.bz2 || exit 1
+cd $PKGNAM-$VERSION || exit 1
+chown -R root:root .
+find -L . \
+ \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \;
+
+[ ! -x configure ] && ./autogen.sh
+
+LDFLAGS="$SLKLDFLAGS" \
+CXXFLAGS="$SLKCFLAGS" \
+CFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --mandir=/usr/man \
+ --docdir=/usr/doc/$PKGNAM-$VERSION \
+ --localstatedir=/var \
+ --sysconfdir=/etc \
+ --enable-static=no \
+ --program-prefix= \
+ --program-suffix= \
+ --build=$TARGET
+
+# Build and install:
+make || exit 1
+make DESTDIR=$PKG install || exit 1
+
+# Directory for additional configuration files:
+mkdir -p $PKG/etc/security/pwquality.conf.d
+
+# Add documentation:
+mkdir -p $PKG/usr/doc/$PKGNAM-$VERSION
+cp -a \
+ AUTHORS ChangeLog COPYING NEWS README \
+ $PKG/usr/doc/$PKGNAM-$VERSION
+
+# Compress the man page(s):
+if [ -d $PKG/usr/man ]; then
+ find $PKG/usr/man -type f -name "*.?" -exec gzip -9f {} \;
+ for i in $(find $PKG/usr/man -type l -name "*.?") ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
+fi
+
+# Strip binaries (if any):
+find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
+ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
+
+# Add a package description:
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+# Build the package:
+cd $PKG
+/sbin/makepkg -l y -c n $TMP/${PKGNAM}-${VERSION}-${ARCH}-${BUILD}.txz
+
diff --git a/deps/libpwquality/slack-desc b/deps/libpwquality/slack-desc
new file mode 100644
index 0000000..740055f
--- /dev/null
+++ b/deps/libpwquality/slack-desc
@@ -0,0 +1,20 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description.
+# Line up the first '|' above the ':' following the base package name, and
+# the '|' on the right side marks the last column you can put a character in.
+# You must make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':' except on otherwise blank lines.
+
+ |-----handy-ruler------------------------------------------------------|
+libpwquality: libpwquality (password quality checking library)
+libpwquality:
+libpwquality: The libpwquality library purpose is to provide common functions
+libpwquality: for password quality checking and also scoring them based on their
+libpwquality: apparent randomness.
+libpwquality: The library also provides a function for generating random
+libpwquality: passwords with good pronounceability.
+libpwquality:
+libpwquality:
+libpwquality: See also: https://github.com/libpwquality/libpwquality
+libpwquality:
+
diff --git a/deps/libwacom/.url b/deps/libwacom/.url
new file mode 100644
index 0000000..b289c17
--- /dev/null
+++ b/deps/libwacom/.url
@@ -0,0 +1,2 @@
+https://sourceforge.net/projects/linuxwacom/files/libwacom/libwacom-0.22.tar.bz2
+
diff --git a/deps/libwacom/libwacom.SlackBuild b/deps/libwacom/libwacom.SlackBuild
new file mode 100755
index 0000000..49cdc7f
--- /dev/null
+++ b/deps/libwacom/libwacom.SlackBuild
@@ -0,0 +1,139 @@
+#!/bin/sh
+# Copyright 2016 Patrick J. Volkerding, Sebeka, MN, USA
+# Copyright 2016 Eric Hameleers, Eindhoven, NL
+# All rights reserved.
+#
+# Permission to use, copy, modify, and distribute this software for
+# any purpose with or without fee is hereby granted, provided that
+# the above copyright notice and this permission notice appear in all
+# copies.
+#
+# THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+# IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
+# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+# USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+# OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+# SUCH DAMAGE.
+# -----------------------------------------------------------------------------
+
+
+PKGNAM=libwacom
+VERSION=${VERSION:-0.22}
+BUILD=${BUILD:-1}
+
+NUMJOBS=${NUMJOBS:-" -j4 "}
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+PKG=$TMP/package-$PKGNAM
+
+if [ -e $CWD/machine.conf ]; then
+ . $CWD/machine.conf ]
+elif [ -e /etc/slackbuild/machine.conf ]; then
+ . /etc/slackbuild/machine.conf ]
+else
+ # Automatically determine the architecture we're building on:
+ MARCH=$( uname -m )
+ if [ -z "$ARCH" ]; then
+ case "$MARCH" in
+ i?86) export ARCH=i486 ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$MARCH ;;
+ esac
+ fi
+ # Set CFLAGS/CXXFLAGS and LIBDIRSUFFIX:
+ if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+ LIBDIRSUFFIX=""
+ elif [ "$ARCH" = "s390" ]; then
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+ elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+ elif [ "$ARCH" = "arm" ]; then
+ SLKCFLAGS="-O2 -march=armv5te"
+ LIBDIRSUFFIX=""
+ else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+ fi
+fi
+
+case "$ARCH" in
+ arm*) TARGET=$ARCH-slackware-linux-gnueabi ;;
+ *) TARGET=$ARCH-slackware-linux ;;
+esac
+
+rm -rf $PKG
+mkdir -p $TMP $PKG
+cd $TMP
+rm -rf $PKGNAM-$VERSION
+tar xvf $CWD/$PKGNAM-$VERSION.tar.bz2 || exit 1
+cd $PKGNAM-$VERSION || exit 1
+
+# Make sure ownerships and permissions are sane:
+chown -R root:root .
+find . \
+ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \;
+
+# Configure:
+CFLAGS="$SLKCFLAGS" \
+CXXFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --sysconfdir=/etc \
+ --localstatedir=/var \
+ --mandir=/usr/man \
+ --docdir=/usr/doc/$PKGNAM-$VERSION \
+ --disable-static \
+ --build=$TARGET
+
+# Build and install:
+make $NUMJOBS || make || exit 1
+make install DESTDIR=$PKG || exit 1
+
+# Strip binaries:
+find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | \
+ grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
+
+# Compress and link manpages, if any:
+if [ -d $PKG/usr/man ]; then
+ ( cd $PKG/usr/man
+ for manpagedir in $(find . -type d -name "man*") ; do
+ ( cd $manpagedir
+ for eachpage in $( find . -type l -maxdepth 1) ; do
+ ln -s $( readlink $eachpage ).gz $eachpage.gz
+ rm $eachpage
+ done
+ gzip -9 *.?
+ )
+ done
+ )
+fi
+
+# Add documentation:
+mkdir -p $PKG/usr/doc/$PKGNAM-$VERSION
+cp -a \
+ COPYING NEWS README \
+ $PKG/usr/doc/$PKGNAM-$VERSION
+
+# Add a description:
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+# Create the package:
+cd $PKG
+/sbin/makepkg -l y -c n $TMP/$PKGNAM-$VERSION-$ARCH-$BUILD.txz
+
diff --git a/deps/libwacom/slack-desc b/deps/libwacom/slack-desc
new file mode 100644
index 0000000..428dd7a
--- /dev/null
+++ b/deps/libwacom/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description.
+# Line up the first '|' above the ':' following the base package name, and
+# the '|' on the right side marks the last column you can put a character in.
+# You must make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':' except on otherwise blank lines.
+
+ |-----handy-ruler------------------------------------------------------|
+libwacom: libwacom (library to identify Wacom tablets and their features)
+libwacom:
+libwacom: The Linux Wacom Project manages the libraries, configuration,
+libwacom: and diagnostic tools for Wacom tablets running under Linux.
+libwacom: It also maintains updated Linux kernel drivers and Xorg/XFree86
+libwacom: XInput drivers.
+libwacom:
+libwacom:
+libwacom:
+libwacom: Home Page: http://linuxwacom.sourceforge.net/
+libwacom:
diff --git a/deps/libxkbcommon/.url b/deps/libxkbcommon/.url
index 9840880..16a002a 100644
--- a/deps/libxkbcommon/.url
+++ b/deps/libxkbcommon/.url
@@ -1,2 +1,2 @@
-http://xkbcommon.org/download/libxkbcommon-0.5.0.tar.xz
+https://xkbcommon.org/download/libxkbcommon-0.8.0.tar.xz
diff --git a/deps/libxkbcommon/libxkbcommon.SlackBuild b/deps/libxkbcommon/libxkbcommon.SlackBuild
index 7e832e7..22af0bb 100755
--- a/deps/libxkbcommon/libxkbcommon.SlackBuild
+++ b/deps/libxkbcommon/libxkbcommon.SlackBuild
@@ -1,7 +1,7 @@
#!/bin/sh
# Copyright 2015 Patrick J. Volkerding, Sebeka, MN, USA
-# Copyright 2015 Eric Hameleers, Eindhoven, NL
+# Copyright 2015, 2017 Eric Hameleers, Eindhoven, NL
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -23,45 +23,40 @@
PKGNAM=libxkbcommon
-VERSION=${VERSION:-0.5.0}
+VERSION=${VERSION:-0.8.0}
BUILD=${BUILD:-1}
CWD=$(pwd)
TMP=${TMP:-/tmp}
PKG=$TMP/package-$PKGNAM
-if [ -e $CWD/machine.conf ]; then
- . $CWD/machine.conf ]
-elif [ -e /etc/slackbuild/machine.conf ]; then
- . /etc/slackbuild/machine.conf ]
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$(uname -m)" in
+ i?86) ARCH=i586 ;;
+ arm*) readelf /usr/bin/file -A | egrep -q "Tag_CPU.*[4,5]" && ARCH=arm || ARCH=armv7hl ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) ARCH=$(uname -m) ;;
+ esac
+ export ARCH
+fi
+
+# Set CFLAGS/CXXFLAGS and LIBDIRSUFFIX:
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "s390" ]; then
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+elif [ "$ARCH" = "arm" ]; then
+ SLKCFLAGS="-O2 -march=armv5te"
+ LIBDIRSUFFIX=""
else
- # Automatically determine the architecture we're building on:
- MARCH=$( uname -m )
- if [ -z "$ARCH" ]; then
- case "$MARCH" in
- i?86) export ARCH=i486 ;;
- arm*) export ARCH=arm ;;
- # Unless $ARCH is already set, use uname -m for all other archs:
- *) export ARCH=$MARCH ;;
- esac
- fi
- # Set CFLAGS/CXXFLAGS and LIBDIRSUFFIX:
- if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
- LIBDIRSUFFIX=""
- elif [ "$ARCH" = "s390" ]; then
- SLKCFLAGS="-O2"
- LIBDIRSUFFIX=""
- elif [ "$ARCH" = "x86_64" ]; then
- SLKCFLAGS="-O2 -fPIC"
- LIBDIRSUFFIX="64"
- elif [ "$ARCH" = "arm" ]; then
- SLKCFLAGS="-O2 -march=armv5te"
- LIBDIRSUFFIX=""
- else
- SLKCFLAGS="-O2"
- LIBDIRSUFFIX=""
- fi
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
fi
case "$ARCH" in
diff --git a/deps/lmdb/.url b/deps/lmdb/.url
index b29e6d0..497028b 100644
--- a/deps/lmdb/.url
+++ b/deps/lmdb/.url
@@ -1 +1 @@
-https://github.com/LMDB/lmdb/archive/LMDB_0.9.17.tar.gz
+https://github.com/LMDB/lmdb/archive/LMDB_0.9.21.tar.gz
diff --git a/deps/lmdb/lmdb.SlackBuild b/deps/lmdb/lmdb.SlackBuild
index 7ae93ae..4691f02 100755
--- a/deps/lmdb/lmdb.SlackBuild
+++ b/deps/lmdb/lmdb.SlackBuild
@@ -1,6 +1,6 @@
#!/bin/sh
-# Copyright 2015 Eric Hameleers, Eindhoven, NL
+# Copyright 2015, 2017 Eric Hameleers, Eindhoven, NL
# Copyright 2015 Patrick J. Volkerding, Sebeka, MN, USA
# All rights reserved.
#
@@ -23,8 +23,8 @@
PKGNAM=lmdb
-VERSION=${VERSION:-0.9.17}
-BUILD=${BUILD:-1}
+VERSION=${VERSION:-0.9.21}
+BUILD=${BUILD:-2}
CWD=$(pwd)
TMP=${TMP:-/tmp}
@@ -68,13 +68,14 @@ rm -rf $PKG
mkdir -p $PKG $TMP
cd $TMP
rm -rf ${PKGNAM}-LMDB_${VERSION}
-tar xvf $CWD/${PKGNAM}-LMDB_${VERSION}.tar.xz || exit 1
+tar xvf $CWD/${PKGNAM}-LMDB_${VERSION}.tar.?z* || exit 1
cd ${PKGNAM}-LMDB_${VERSION} || exit 1
# Fix a x86_64 installation issue:
if [ -n "${LIBDIRSUFFIX}" ]; then
- sed -e "s,\(\$(prefix)/lib\);,\1${LIBDIRSUFFIX};," \
- -i libraries/liblmdb/Makefile
+ sed -i libraries/liblmdb/Makefile \
+ -e "s,\(\$(exec_prefix)/lib\),\1${LIBDIRSUFFIX}," \
+ -e "s,\$(datarootdir)/man,\$(prefix)/man,"
fi
chown -R root:root .
diff --git a/deps/mesa/doinst.sh b/deps/mesa/doinst.sh
new file mode 100644
index 0000000..42c4667
--- /dev/null
+++ b/deps/mesa/doinst.sh
@@ -0,0 +1,13 @@
+#!/bin/sh
+config() {
+ NEW="$1"
+ OLD="`dirname $NEW`/`basename $NEW .new`"
+ # If there's no config file by that name, mv it over:
+ if [ ! -r $OLD ]; then
+ mv $NEW $OLD
+ elif [ "`cat $OLD | md5sum`" = "`cat $NEW | md5sum`" ]; then # toss the redundant copy
+ rm $NEW
+ fi
+ # Otherwise, we leave the .new copy for the admin to consider...
+}
+config etc/drirc.new
diff --git a/deps/mesa/mesa.SlackBuild b/deps/mesa/mesa.SlackBuild
index 24f1b3d..7708915 100755
--- a/deps/mesa/mesa.SlackBuild
+++ b/deps/mesa/mesa.SlackBuild
@@ -1,6 +1,6 @@
#!/bin/sh
-# Copyright 2006, 2007, 2008, 2009, 2010, 2011, 2013, 2014, 2015, 2016 Patrick J. Volkerding, Sebeka, MN, USA
+# Copyright 2006, 2007, 2008, 2009, 2010, 2011, 2013, 2014, 2015, 2016, 2017, 2018 Patrick J. Volkerding, Sebeka, MN, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -20,16 +20,19 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+cd $(dirname $0) ; CWD=$(pwd)
+
PKGNAM=mesa
-VERSION=${VERSION:-12.0.1}
-DEMOVERS=${DEMOVERS:-8.3.0}
+VERSION=${VERSION:-18.0.1}
+DEMOVERS=${DEMOVERS:-8.4.0}
BUILD=${BUILD:-1}
NUMJOBS=${NUMJOBS:--j7}
# Be sure this list is up-to-date:
DRI_DRIVERS="i915,i965,nouveau,r200,radeon,swrast"
-GALLIUM_DRIVERS="nouveau,r300,r600,svga,radeonsi,swrast"
+GALLIUM_DRIVERS="nouveau,r300,r600,svga,radeonsi,swrast,virgl"
EGL_PLATFORMS="drm,x11,wayland"
if [ -z "$ARCH" ]; then
@@ -40,16 +43,27 @@ if [ -z "$ARCH" ]; then
esac
fi
-CWD=$(pwd)
+# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
+# the name of the created package would be, and then exit. This information
+# could be useful to other scripts.
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PKGNAM-$VERSION-$ARCH-$BUILD.txz"
+ exit 0
+fi
+
TMP=${TMP:-/tmp}
PKG=$TMP/package-mesa
if [ "$ARCH" = "i586" ]; then
SLKCFLAGS="-O2 -march=i586 -mtune=i686"
LIBDIRSUFFIX=""
+ # I've heard some reports as of late 2016 that Vulkan has some issues on
+ # 32-bit, but we'll try it anyway and see if anything is reported:
+ VULKAN=" --with-vulkan-drivers=intel,radeon "
elif [ "$ARCH" = "x86_64" ]; then
SLKCFLAGS="-O2 -fPIC"
LIBDIRSUFFIX="64"
+ VULKAN=" --with-vulkan-drivers=intel,radeon "
else
SLKCFLAGS="-O2"
LIBDIRSUFFIX=""
@@ -61,7 +75,7 @@ cd $TMP
rm -rf ${PKGNAM}-${VERSION}
tar xvf $CWD/${PKGNAM}-${VERSION}.tar.xz || exit 1
-cd ${PKGNAM}-$VERSION
+cd ${PKGNAM}-$VERSION || exit 1
# Let's kill the warning about operating on a dangling symlink:
rm -f src/gallium/state_trackers/d3d1x/w32api
@@ -76,18 +90,14 @@ find . \
# Apply patches from git (and maybe elsewhere):
# Patches obtained by:
-# git checkout origin/11.2
-# git format-patch 5de088f7da75cc0209ff1602ed70aff14f733e4b # 11.2.2 release
+# git checkout origin/17.2
+# git format-patch 93c2beafc0a7fa2f210b006d22aba61caa71f773 # 17.2.6 release
if /bin/ls $CWD/patches/*.patch 1> /dev/null 2> /dev/null ; then
for patch in $CWD/patches/*.patch ; do
patch -p1 < $patch || exit 1 ;
done
fi
-# Don't worry if Mako is not present:
-#sed -i "s,AX_CHECK_PYTHON_MAKO_MODULE(\$PYTHON_MAKO_REQUIRED),,g" configure.ac
-zcat $CWD/mesa.no.mako.diff.gz | patch -p1 --verbose || exit 1
-
# This doesn't fully do the trick. See below. ;-)
#./autogen.sh
@@ -108,7 +118,8 @@ CFLAGS="$SLKCFLAGS" \
--with-dri-drivers="$DRI_DRIVERS" \
--with-gallium-drivers="$GALLIUM_DRIVERS" \
--with-egl-platforms="$EGL_PLATFORMS" \
- --enable-gallium-llvm \
+ $VULKAN \
+ --enable-llvm \
--enable-llvm-shared-libs \
--enable-egl \
--enable-texture-float \
@@ -124,7 +135,9 @@ CFLAGS="$SLKCFLAGS" \
--enable-gles1 \
--enable-gles2 \
--enable-vdpau \
- --build=$ARCH-slackware-linux
+ --enable-opencl \
+ --enable-opencl-icd \
+ --build=$ARCH-slackware-linux || exit 1
# This is autodetected anyway:
# --enable-va \
@@ -132,7 +145,14 @@ CFLAGS="$SLKCFLAGS" \
make $NUMJOBS || make || exit 1
make install DESTDIR=$PKG || exit 1
-# Now install the demos
+# Don't ship .la files:
+rm -f $PKG/{,usr/}lib${LIBDIRSUFFIX}/*.la
+
+# Install /etc/drirc as a .new file:
+mv $PKG/etc/drirc $PKG/etc/drirc.new
+
+# Now build/install a small subset of the demos:
+export CWD SLKCFLAGS NUMJOBS PKG
( cd $TMP
rm -rf mesa-demos-$DEMOVERS
tar xvf $CWD/mesa-demos-$DEMOVERS.tar.?z* || exit 1
@@ -146,19 +166,20 @@ make install DESTDIR=$PKG || exit 1
CFLAGS="$SLKCFLAGS" \
./configure \
--prefix=/usr \
- --build=$ARCH-slackware-linux
- # Build and install gears and glinfo, as well as a few other demos
- make -C src/demos gears glinfo
- make -C src/xdemos \
- glthreads glxcontexts glxdemo glxgears glxgears_fbconfig \
- glxheads glxinfo glxpbdemo glxpixmap
+ --build=$ARCH-slackware-linux || exit 1
+ make $NUMJOBS || exit 1
+ # Install all the demos (including the pointless ones) at first, in a
+ # temporary location:
+ make install DESTDIR=$PKG/cruft || exit 1
+ # Install gears and glinfo, as well as a few other demos:
mkdir -p $PKG/usr/bin
- cp -a src/demos/{gears,glinfo} $PKG/usr/bin
- for i in glthreads glxcontexts glxdemo glxgears glxgears_fbconfig \
- glxheads glxinfo glxpbdemo glxpixmap ; do
- cp -a src/xdemos/$i $PKG/usr/bin ;
+ for demo in gears glinfo glthreads glxcontexts glxdemo glxgears \
+ glxgears_fbconfig glxheads glxinfo glxpbdemo glxpixmap ; do
+ mv --verbose $PKG/cruft/usr/bin/$demo $PKG/usr/bin
done
-)
+ # Remove cruft:
+ rm -rf $PKG/cruft
+) || exit 1
# Strip binaries:
find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
@@ -182,6 +203,7 @@ rm -f $PKG/usr/doc/$PKGNAM-$VERSION/html/relnotes*.html
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
+cat $CWD/doinst.sh > $PKG/install/doinst.sh
cd $PKG
/sbin/makepkg -l y -c n $TMP/${PKGNAM}-$VERSION-$ARCH-$BUILD.txz
diff --git a/deps/mesa/mesa.no.mako.diff.gz b/deps/mesa/mesa.no.mako.diff.gz
deleted file mode 100644
index ab6aa29..0000000
--- a/deps/mesa/mesa.no.mako.diff.gz
+++ /dev/null
Binary files differ
diff --git a/deps/mlt/.url b/deps/mlt/.url
new file mode 100644
index 0000000..dea6050
--- /dev/null
+++ b/deps/mlt/.url
@@ -0,0 +1,2 @@
+https://github.com/mltframework/mlt/archive/v6.6.0.tar.gz
+
diff --git a/deps/mlt/doinst.sh b/deps/mlt/doinst.sh
new file mode 100644
index 0000000..e4e6459
--- /dev/null
+++ b/deps/mlt/doinst.sh
@@ -0,0 +1,8 @@
+if [ -x /usr/bin/update-desktop-database ]; then
+ /usr/bin/update-desktop-database -q usr/share/applications >/dev/null 2>&1
+fi
+
+if [ -x /usr/bin/update-mime-database ]; then
+ /usr/bin/update-mime-database usr/share/mime >/dev/null 2>&1
+fi
+
diff --git a/deps/mlt/mlt.SlackBuild b/deps/mlt/mlt.SlackBuild
new file mode 100755
index 0000000..fe52608
--- /dev/null
+++ b/deps/mlt/mlt.SlackBuild
@@ -0,0 +1,138 @@
+#!/bin/sh
+# $Id$
+# Copyright 2017,2018 Eric Hameleers, Eindhoven, NL
+# Copyright 2017 Patrick J. Volkerding, Sebeka, MN, USA
+# All rights reserved.
+#
+# Permission to use, copy, modify, and distribute this software for
+# any purpose with or without fee is hereby granted, provided that
+# the above copyright notice and this permission notice appear in all
+# copies.
+#
+# THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+# IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
+# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+# USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+# OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+# SUCH DAMAGE.
+# -----------------------------------------------------------------------------
+
+
+cd $(dirname $0) ; CWD=$(pwd)
+
+PKGNAM=mlt
+VERSION=${VERSION:-6.6.0}
+BUILD=${BUILD:-1}
+
+PYTHONSITEPKG=$(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")
+
+TMP=${TMP:-/tmp}
+PKG=$TMP/package-$PKGNAM
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$(uname -m)" in
+ i?86) ARCH=i586 ;;
+ arm*) readelf /usr/bin/file -A | egrep -q "Tag_CPU.*[4,5]" && ARCH=arm || ARCH=armv7hl ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) ARCH=$(uname -m) ;;
+ esac
+ export ARCH
+fi
+
+# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
+# the name of the created package would be, and then exit. This information
+# could be useful to other scripts.
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PKGNAM-${VERSION}-${ARCH}-${BUILD}.txz"
+ exit 0
+fi
+
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
+ SLKLDFLAGS=""
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ SLKLDFLAGS="-L/usr/lib64"
+ LIBDIRSUFFIX="64"
+elif [ "$ARCH" = "armv7hl" ]; then
+ SLKCFLAGS="-O3 -march=armv7-a -mfpu=vfpv3-d16"
+ SLKLDFLAGS=""
+ LIBDIRSUFFIX=""
+else
+ SLKCFLAGS="-O2"
+ SLKLDFLAGS=""
+ LIBDIRSUFFIX=""
+fi
+
+case "$ARCH" in
+ arm*) TARGET=$ARCH-slackware-linux-gnueabi ;;
+ *) TARGET=$ARCH-slackware-linux ;;
+esac
+
+rm -rf $PKG
+mkdir -p $TMP $PKG
+cd $TMP
+rm -rf $PKGNAM-$VERSION
+tar xvf $CWD/$PKGNAM-$VERSION.tar.?z* || exit 1
+cd $PKGNAM-$VERSION || exit 1
+
+# Fix bogus permissions:
+chown -R root:root .
+find . \
+ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \;
+
+# Configure and compile:
+CFLAGS="$SLKCFLAGS" \
+CXXFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --avformat-swscale \
+ --disable-debug \
+ --enable-gpl \
+ --enable-gpl3 \
+ --enable-motion-est \
+ --enable-qt \
+ --qt-libdir=$(pkg-config Qt5Core --variable=libdir) \
+ --qt-includedir=$(pkg-config Qt5Core --variable=includedir) \
+ --swig-languages="python" \
+ --build=$TARGET
+
+make || exit 1
+make install DESTDIR=$PKG || exit 1
+
+# Install the extensions we enabled:
+install -D -m0755 src/swig/python/_mlt.so $PKG/$PYTHONSITEPKG/_mlt.so
+install -D -m0755 src/swig/python/mlt_wrap.o $PKG/$PYTHONSITEPKG/mlt_wrap.o
+install -D -m0755 src/swig/python/mlt.py $PKG/$PYTHONSITEPKG/mlt.py
+
+# Add documentation:
+mkdir -p $PKG/usr/doc/$PKGNAM-$VERSION
+cp -a \
+ AUTHORS ChangeLog COPYING GPL NEWS README \
+ $PKG/usr/doc/$PKGNAM-$VERSION
+
+# Strip binaries:
+find $PKG | xargs file | grep -e "executable" -e "shared object" \
+ | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+
+# Add a package description:
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+cat $CWD/doinst.sh > $PKG/install/doinst.sh
+
+# Build the package:
+cd $PKG
+makepkg -l y -c n $TMP/${PKGNAM}-${VERSION}-${ARCH}-${BUILD}.txz
+
diff --git a/deps/mlt/patches/mlt_glibc226.patch b/deps/mlt/patches/mlt_glibc226.patch
new file mode 100644
index 0000000..255a604
--- /dev/null
+++ b/deps/mlt/patches/mlt_glibc226.patch
@@ -0,0 +1,28 @@
+From 2377c8665f93f87aa86fabbfd8e596572aacdf6c Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@googlemail.com>
+Date: Mon, 7 Aug 2017 18:41:07 +0200
+Subject: [PATCH] mlt_property.h: Replace include xlocale.h by locale.h
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+xlocale.h was removed in glibc 2.26
+
+Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com>
+---
+ src/framework/mlt_property.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/framework/mlt_property.h b/src/framework/mlt_property.h
+index 404d513f..156e0734 100644
+--- a/src/framework/mlt_property.h
++++ b/src/framework/mlt_property.h
+@@ -31,7 +31,7 @@
+ #endif
+
+ #if defined(__GLIBC__) || defined(__APPLE__) || (__FreeBSD_version >= 900506)
+-#include <xlocale.h>
++#include <locale.h>
+ #else
+ typedef char* locale_t;
+ #endif
diff --git a/deps/mlt/patches/mlt_qt5.patch b/deps/mlt/patches/mlt_qt5.patch
new file mode 100644
index 0000000..69706cc
--- /dev/null
+++ b/deps/mlt/patches/mlt_qt5.patch
@@ -0,0 +1,27 @@
+From 053204f4a243559644af2c47ae9895810685cb5a Mon Sep 17 00:00:00 2001
+From: Dan Dennedy <dan@dennedy.org>
+Date: Sun, 8 Jan 2017 10:22:33 -0800
+Subject: [PATCH] Only use --std=c++11 CXXFLAG for g++.
+
+The addition of --std=c++11 breaks build on my OS X 10.8 build agent,
+which uses clang version "Apple LLVM version 8.0.0 (clang-800.0.42.1)"
+---
+ src/modules/qt/Makefile | 6 +++++-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+diff --git a/src/modules/qt/Makefile b/src/modules/qt/Makefile
+index e7b55ae..d88e519 100644
+--- a/src/modules/qt/Makefile
++++ b/src/modules/qt/Makefile
+@@ -39,7 +39,11 @@ ifneq ($(targetos), MinGW)
+ endif
+ endif
+
+ CXXFLAGS := $(QTCXXFLAGS) $(CXXFLAGS) $(CFLAGS) $(EXIFCXXFLAGS) $(KDECXXFLAGS) -Wno-deprecated
++
++ifneq (, $(shell $(CXX) --version | grep -is gcc))
++ CXXFLAGS += --std=c++11
++endif
+
+ LDFLAGS += $(QTLIBS) $(EXIFLIBS) $(KDELIBS)
+
diff --git a/deps/mlt/patches/mlt_repository_close.patch b/deps/mlt/patches/mlt_repository_close.patch
new file mode 100644
index 0000000..3711cce
--- /dev/null
+++ b/deps/mlt/patches/mlt_repository_close.patch
@@ -0,0 +1,25 @@
+From a3188e301b5a9a1f25dbb98a510e366363348e64 Mon Sep 17 00:00:00 2001
+From: Dan Dennedy <dan@dennedy.org>
+Date: Sun, 19 Feb 2017 12:50:59 -0800
+Subject: [PATCH] Allow Mlt::Repository to be deleted without bad side effect.
+
+mlt_repository_close() is run by mlt_factory_close() when called either
+directly, which requires all Mlt objects to be destroyed prior, or
+atexit().
+---
+ src/mlt++/MltRepository.cpp | 2 --
+ 1 file changed, 2 deletions(-)
+
+diff --git a/src/mlt++/MltRepository.cpp b/src/mlt++/MltRepository.cpp
+index 47a598bc..45522e40 100644
+--- a/src/mlt++/MltRepository.cpp
++++ b/src/mlt++/MltRepository.cpp
+@@ -35,8 +35,6 @@ Repository::Repository( mlt_repository repository ) :
+
+ Repository::~Repository( )
+ {
+- if ( instance )
+- mlt_repository_close( instance );
+ instance = NULL;
+ }
+
diff --git a/deps/mlt/slack-desc b/deps/mlt/slack-desc
new file mode 100644
index 0000000..cf6abd5
--- /dev/null
+++ b/deps/mlt/slack-desc
@@ -0,0 +1,20 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|'
+# on the right side marks the last column you can put a character in. You must
+# make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+mlt: mlt (Open source multimedia framework)
+mlt:
+mlt: MLT is an open source multimedia framework, designed and developed
+mlt: for television broadcasting. It provides a toolkit for broadcasters,
+mlt: video editors, media players, transcoders, web streamers and many
+mlt: more types of applications. The functionality of the system is
+mlt: provided via an assortment of ready to use tools, XML authoring
+mlt: components, and an extensible plug-in based API.
+mlt:
+mlt: See also: http://www.mltframework.org/
+mlt:
+
diff --git a/deps/ninja/.url b/deps/ninja/.url
index a839548..3bf2926 100644
--- a/deps/ninja/.url
+++ b/deps/ninja/.url
@@ -1 +1 @@
-https://github.com/ninja-build/ninja/archive/v1.6.0.tar.gz
+https://github.com/ninja-build/ninja/archive/v1.8.2.tar.gz
diff --git a/deps/ninja/ninja.SlackBuild b/deps/ninja/ninja.SlackBuild
index 97c33ad..ec75d03 100755
--- a/deps/ninja/ninja.SlackBuild
+++ b/deps/ninja/ninja.SlackBuild
@@ -1,6 +1,6 @@
#!/bin/sh
-# Copyright 2016 Eric Hameleers, Eindhoven, NL
+# Copyright 2016, 2017 Eric Hameleers, Eindhoven, NL
# Copyright 2016 Patrick J. Volkerding, Sebeka, MN, USA
# All rights reserved.
#
@@ -23,7 +23,7 @@
PKGNAM=ninja
-VERSION=${VERSION:-1.6.0}
+VERSION=${VERSION:-1.8.2}
BUILD=${BUILD:-1}
NUMJOBS=${NUMJOBS:--j7}
@@ -31,7 +31,7 @@ NUMJOBS=${NUMJOBS:--j7}
# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
case "$(uname -m)" in
- i?86) ARCH=i486 ;;
+ i?86) ARCH=i586 ;;
arm*) readelf /usr/bin/file -A | egrep -q "Tag_CPU.*[4,5]" && ARCH=arm || ARCH=armv7hl ;;
# Unless $ARCH is already set, use uname -m for all other archs:
*) ARCH=$(uname -m) ;;
@@ -43,8 +43,8 @@ CWD=$(pwd)
TMP=${TMP:-/tmp}
PKG=$TMP/package-$PKGNAM
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
SLKLDFLAGS=""
LIBDIRSUFFIX=""
elif [ "$ARCH" = "x86_64" ]; then
diff --git a/deps/opencv/.url b/deps/opencv/.url
new file mode 100644
index 0000000..e2dc286
--- /dev/null
+++ b/deps/opencv/.url
@@ -0,0 +1,2 @@
+https://github.com/Itseez/opencv/archive/3.2.0/opencv-3.2.0.tar.gz
+https://github.com/Itseez/opencv_contrib/archive/3.2.0/opencv_contrib-3.2.0.zip
diff --git a/deps/opencv/opencv.SlackBuild b/deps/opencv/opencv.SlackBuild
new file mode 100755
index 0000000..e1bce8e
--- /dev/null
+++ b/deps/opencv/opencv.SlackBuild
@@ -0,0 +1,123 @@
+#!/bin/sh
+
+# Copyright 2015, 2017 Eric Hameleers, Eindhoven, NL
+# Copyright 2015, 2017 Patrick J. Volkerding, Sebeka, MN, USA
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ''AS IS'' AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+PKGNAM=opencv
+VERSION=${VERSION:-3.2.0}
+BUILD=${BUILD:-2}
+
+NUMJOBS=${NUMJOBS:--j7}
+
+# Automatically determine the architecture we're building on:
+MARCH=$( uname -m )
+if [ -z "$ARCH" ]; then
+ case "$MARCH" in
+ i?86) export ARCH=i486 ;;
+ armv7hl) export ARCH=$MARCH ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$MARCH ;;
+ esac
+fi
+
+if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "s390" ]; then
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+elif [ "$ARCH" = "armv7hl" ]; then
+ SLKCFLAGS="-O2 -march=armv7-a -mfpu=vfpv3-d16"
+ LIBDIRSUFFIX=""
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+fi
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+PKG=$TMP/package-$PKGNAM
+
+rm -rf $PKG
+mkdir -p $TMP $PKG
+cd $TMP
+rm -rf $PKGNAM-$VERSION
+tar xvf $CWD/$PKGNAM-$VERSION.tar.?z* || exit 1
+cd $PKGNAM-$VERSION || exit 1
+unzip $CWD/${PKGNAM}_contrib-$VERSION.zip || exit 1
+
+chown -R root:root .
+find . \
+ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \;
+
+mkdir -p build
+cd build
+ QTDIR=/usr/lib${LIBDIRSUFFIX}/qt5 \
+ PATH=$QTDIR/bin:$PATH \
+ cmake \
+ -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \
+ -DCMAKE_C_FLAGS_RELEASE:STRING="$SLKCFLAGS" \
+ -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
+ -DCMAKE_CXX_FLAGS_RELEASE:STRING="$SLKCFLAGS" \
+ -DCMAKE_BUILD_TYPE="Release" \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DINSTALL_MAN_DIR=man \
+ -DINSTALL_DOC_DIR=doc/$PRGNAM-$VERSION \
+ -DSYSCONF_INSTALL_DIR=/etc \
+ -DLIB_SUFFIX=${LIBDIRSUFFIX} \
+ -DLIB_INSTALL_DIR=/usr/lib${LIBDIRSUFFIX} \
+ -DBUILD_PACKAGE=OFF \
+ -DBUILD_PERF_TESTS=OFF \
+ -DBUILD_SHARED_LIBS=ON \
+ -DBUILD_TESTS=OFF \
+ -DBUILD_WITH_DEBUG_INFO=OFF \
+ -DENABLE_PRECOMPILED_HEADERS=OFF \
+ -DOPENCV_EXTRA_MODULES_PATH=../${PKGNAM}_contrib-$VERSION/modules \
+ -DWITH_FFMPEG=ON \
+ -DWITH_IPP=OFF \
+ -DWITH_OPENGL=ON \
+ -DWITH_QT=ON \
+ ..
+ make $NUMJOBS VERBOSE=1 || make || exit 1
+ make install DESTDIR=$PKG || exit 1
+cd -
+
+find $PKG | xargs file | grep -e "executable" -e "shared object" \
+ | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+
+mkdir -p $PKG/usr/doc/$PKGNAM-$VERSION
+cp -a COPYING* README* \
+ $PKG/usr/doc/$PKGNAM-$VERSION
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+cd $PKG
+/sbin/makepkg -l y -c n $TMP/$PKGNAM-$VERSION-$ARCH-$BUILD.txz
+
diff --git a/deps/opencv/slack-desc b/deps/opencv/slack-desc
new file mode 100644
index 0000000..e30ed9a
--- /dev/null
+++ b/deps/opencv/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description.
+# Line up the first '|' above the ':' following the base package name, and
+# the '|' on the right side marks the last column you can put a character in.
+# You must make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':' except on otherwise blank lines.
+
+ |-----handy-ruler------------------------------------------------------|
+opencv: OpenCV (Open Source Computer Vision)
+opencv:
+opencv: OpenCV is a collection of algorithms and sample code for various
+opencv: computer vision problems.
+opencv:
+opencv:
+opencv:
+opencv: Homepage: http://opencv.willowgarage.com
+opencv:
+opencv:
+opencv:
diff --git a/deps/phonon-gstreamer/phonon-gstreamer.SlackBuild b/deps/phonon-gstreamer/phonon-gstreamer.SlackBuild
index 617c14e..27f441d 100755
--- a/deps/phonon-gstreamer/phonon-gstreamer.SlackBuild
+++ b/deps/phonon-gstreamer/phonon-gstreamer.SlackBuild
@@ -28,7 +28,7 @@ SRCNAM=phonon-backend-gstreamer
VERSION=${VERSION:-4.9.0}
BUILD=${BUILD:-2}
-NUMJOBS=${NUMJOBS:" -j7 "}
+NUMJOBS=${NUMJOBS:-" -j7 "}
# Automatically determine the architecture we're building on:
MARCH=$( uname -m )
diff --git a/deps/phonon-vlc/.url b/deps/phonon-vlc/.url
index 24587d5..c199845 100644
--- a/deps/phonon-vlc/.url
+++ b/deps/phonon-vlc/.url
@@ -1,2 +1,2 @@
-http://download.kde.org/stable/phonon/phonon-backend-vlc/0.9.0/phonon-backend-vlc-0.9.0.tar.xz
+https://download.kde.org/stable/phonon/phonon-backend-vlc/0.10.0/phonon-backend-vlc-0.10.0.tar.xz
diff --git a/deps/phonon-vlc/phonon-vlc.SlackBuild b/deps/phonon-vlc/phonon-vlc.SlackBuild
index 7116058..e57a066 100755
--- a/deps/phonon-vlc/phonon-vlc.SlackBuild
+++ b/deps/phonon-vlc/phonon-vlc.SlackBuild
@@ -1,5 +1,5 @@
#!/bin/sh
-# Copyright 2011, 2012, 2014, 2015, 2016 Eric Hameleers, Eindhoven, NL
+# Copyright 2011, 2012, 2014, 2015, 2016, 2017, 2018 Eric Hameleers, Eindhoven, NL
# Copyright 2011, 2012 Patrick J. Volkerding, Sebeka, MN, USA
# All rights reserved.
#
@@ -25,10 +25,10 @@
PKGNAM=phonon-vlc
SRCNAM=phonon-backend-vlc
-VERSION=${VERSION:-0.9.0}
-BUILD=${BUILD:-2}
+VERSION=${VERSION:-0.10.0}
+BUILD=${BUILD:-1}
-NUMJOBS=${NUMJOBS:" -j7 "}
+NUMJOBS=${NUMJOBS:-" -j7 "}
# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
diff --git a/deps/phonon/.url b/deps/phonon/.url
index f573a2d..4b93862 100644
--- a/deps/phonon/.url
+++ b/deps/phonon/.url
@@ -1 +1 @@
-http://download.kde.org/stable/phonon/4.9.0/phonon-4.9.0.tar.xz
+http://download.kde.org/stable/phonon/4.10.0/phonon-4.10.0.tar.xz
diff --git a/deps/phonon/phonon.SlackBuild b/deps/phonon/phonon.SlackBuild
index a3850ea..4da680d 100755
--- a/deps/phonon/phonon.SlackBuild
+++ b/deps/phonon/phonon.SlackBuild
@@ -21,19 +21,19 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-# Modified 2010, 2011, 2012, 2014, 2015, 2016 Eric Hameleers, Eindhoven, NL
+# Modified 2010, 2011, 2012, 2014, 2015, 2016, 2017, 2018 Eric Hameleers, Eindhoven, NL
PKGNAM=phonon
-VERSION=${VERSION:-4.9.0}
-BUILD=${BUILD:-4}
+VERSION=${VERSION:-4.10.0}
+BUILD=${BUILD:-1}
NUMJOBS=${NUMJOBS:--j7}
# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
case "$(uname -m)" in
- i?86) ARCH=i486 ;;
+ i?86) ARCH=i586 ;;
arm*) readelf /usr/bin/file -A | egrep -q "Tag_CPU.*[4,5]" && ARCH=arm || ARCH=armv7hl ;;
# Unless $ARCH is already set, use uname -m for all other archs:
*) ARCH=$(uname -m) ;;
@@ -44,6 +44,9 @@ fi
if [ "$ARCH" = "i486" ]; then
SLKCFLAGS="-O2 -march=i486 -mtune=i686"
LIBDIRSUFFIX=""
+elif [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
+ LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
LIBDIRSUFFIX=""
@@ -65,8 +68,8 @@ PKG=$TMP/package-phonon
rm -rf $PKG
mkdir -p $TMP $PKG
cd $TMP
-rm -r phonon-$VERSION
-tar xvf $CWD/phonon-$VERSION.tar.?z* || exit 1
+rm -rf phonon-$VERSION
+tar xvf $CWD/phonon-$VERSION.tar.?z || exit 1
cd phonon-$VERSION || exit 1
chown -R root:root .
@@ -142,7 +145,7 @@ if [ -d $PKG/usr/man ]; then
fi
mkdir -p $PKG/usr/doc/phonon-$VERSION
-cp -a phonon/{BUGS,IDEAS,TODO} $PKG/usr/doc/phonon-$VERSION
+cp -a doc/{BUGS,IDEAS,TODO} $PKG/usr/doc/phonon-$VERSION
find $PKG | xargs file | grep -e "executable" -e "shared object" \
| grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
diff --git a/deps/phonon/slack-desc b/deps/phonon/slack-desc
index 12acecb..76c0eed 100644
--- a/deps/phonon/slack-desc
+++ b/deps/phonon/slack-desc
@@ -6,14 +6,14 @@
# customary to leave one space after the ':'.
|-----handy-ruler------------------------------------------------------|
-phonon: phonon (multimedia framework for KDE4)
+phonon: phonon (multimedia framework for KDE)
phonon:
phonon: Phonon is the multimedia API provided by Qt and is the standard
phonon: abstraction for handling multimedia streams within the KDE Software
phonon: Compilation. Phonon provides an API for multimedia using various
-phonon: backends (gstreamer, mplayer, xine) to handle the lower level I/O.
+phonon: backends (gstreamer, mplayer, vlc) to handle the lower level I/O.
phonon:
-phonon: Homepage: http://phonon.kde.org
phonon:
phonon:
+phonon: Homepage: http://phonon.kde.org
phonon:
diff --git a/deps/polkit-qt5-1/polkit-qt5-1.SlackBuild b/deps/polkit-qt5-1/polkit-qt5-1.SlackBuild
index a9b7303..39c97a6 100755
--- a/deps/polkit-qt5-1/polkit-qt5-1.SlackBuild
+++ b/deps/polkit-qt5-1/polkit-qt5-1.SlackBuild
@@ -20,19 +20,19 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-# Modified 2014, 2015, 2016 by Eric Hameleers <alien@slackware.com>
+# Modified 2014, 2015, 2016, 2017 by Eric Hameleers <alien@slackware.com>
PKGNAM=polkit-qt5-1
VERSION=${VERSION:-50624e0_20160719git}
-BUILD=${BUILD:-2}
+BUILD=${BUILD:-3}
NUMJOBS=${NUMJOBS:--j7}
# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
case "$(uname -m)" in
- i?86) ARCH=i486 ;;
+ i?86) ARCH=i586 ;;
arm*) readelf /usr/bin/file -A | egrep -q "Tag_CPU.*[4,5]" && ARCH=arm || ARCH=armv7hl ;;
# Unless $ARCH is already set, use uname -m for all other archs:
*) ARCH=$(uname -m) ;;
@@ -43,6 +43,9 @@ fi
if [ "$ARCH" = "i486" ]; then
SLKCFLAGS="-O2 -march=i486 -mtune=i686"
LIBDIRSUFFIX=""
+elif [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
+ LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
LIBDIRSUFFIX=""
diff --git a/deps/poppler/.url b/deps/poppler/.url
index ac32d25..43dd57d 100644
--- a/deps/poppler/.url
+++ b/deps/poppler/.url
@@ -1,2 +1,2 @@
-https://poppler.freedesktop.org/poppler-0.46.0.tar.xz
+https://poppler.freedesktop.org/poppler-0.65.0.tar.xz
diff --git a/deps/poppler/poppler.SlackBuild b/deps/poppler/poppler.SlackBuild
index 93891ea..55f1d77 100755
--- a/deps/poppler/poppler.SlackBuild
+++ b/deps/poppler/poppler.SlackBuild
@@ -1,6 +1,6 @@
-#!/bin/sh
+#!/bin/bash
-# Copyright 2006, 2007, 2008, 2009, 2010, 2012 Patrick J. Volkerding, Sebeka, MN, USA
+# Copyright 2006, 2007, 2008, 2009, 2010, 2012, 2017, 2018 Patrick J. Volkerding, Sebeka, MN, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -21,12 +21,13 @@
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-# Modified 2016 by Eric Hameleers <alien@slackware.com>
+# Modified 2016, 2017, 2018 by Eric Hameleers <alien@slackware.com>
+
+cd $(dirname $0) ; CWD=$(pwd)
PKGNAM=poppler
-VERSION=${VERSION:-0.45.0}
-BUILD=${BUILD:-2}
-NUMJOBS=${NUMJOBS:-" -j7 "}
+VERSION=${VERSION:-0.65.0}
+BUILD=${BUILD:-1}
# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
@@ -39,6 +40,14 @@ if [ -z "$ARCH" ]; then
export ARCH
fi
+# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
+# the name of the created package would be, and then exit. This information
+# could be useful to other scripts.
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PKGNAM-$VERSION-$ARCH-$BUILD.txz"
+ exit 0
+fi
+
if [ "$ARCH" = "i586" ]; then
SLKCFLAGS="-O2 -march=i586 -mtune=i686"
LIBDIRSUFFIX=""
@@ -58,7 +67,6 @@ case "$ARCH" in
*) TARGET=$ARCH-slackware-linux ;;
esac
-CWD=$(pwd)
TMP=${TMP:-/tmp}
PKG=$TMP/package-${PKGNAM}
rm -rf $PKG
@@ -69,8 +77,15 @@ rm -rf ${PKGNAM}-${VERSION}
tar xvf $CWD/${PKGNAM}-$VERSION.tar.?z* || exit 1
cd ${PKGNAM}-$VERSION || exit 1
-# This is needed for compilation with c++11 compiler:
-cat $CWD/patches/poppler_cpp11.patch | patch -p1 --verbose || exit 1
+## This is needed for compilation with c++11 compiler:
+#cat $CWD/patches/poppler_cpp11.patch | patch -p1 --verbose || exit 1
+
+# At least for now, we will revert this patch since we have
+# things that depend on it:
+cat $CWD/poppler.remove.qt4.frontend.diff | patch -p1 -R --verbose || exit 1
+
+# Revert a change to SplashPath.h (in 0.63.0) that breaks compiling the qt4 frontend:
+cat $CWD/poppler.splashpath.h.revert.diff | patch -p1 --verbose || exit 1
chown -R root:root .
find . \
@@ -79,25 +94,33 @@ find . \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \;
-# Adding " -std=c++11" to CXXFLAGS is needed for compiling against Qt 5.7:
+mkdir build
+cd build
+
+# Adding " -std=c++11" to CXXFLAGS is needed for compiling against Qt >= 5.7:
CFLAGS="$SLKCFLAGS" \
-CXXFLAGS="$SLKCFLAGS -std=c++11" \
-./configure \
- --prefix=/usr \
- --libdir=/usr/lib${LIBDIRSUFFIX} \
- --sysconfdir=/etc \
- --enable-xpdf-headers \
- --enable-poppler-qt4 \
- --enable-poppler-qt5 \
- --enable-cairo-output \
- --mandir=/usr/man \
- --disable-static \
- --enable-zlib \
- --build=$TARGET
-
-make $NUMJOBS || make || exit 1
+CXXFLAGS="$SLKCFLAGS -std=c++11 -fpermissive" \
+cmake \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DCMAKE_INSTALL_MANDIR=/usr/man \
+ -DBUILD_SHARED_LIBS=ON \
+ -DENABLE_QT4=ON \
+ -DENABLE_QT5=ON \
+ -DENABLE_XPDF_HEADERS=ON \
+ -DENABLE_CMS=lcms2 \
+ -DENABLE_DCTDECODER=libjpeg \
+ -DENABLE_GTK_DOC=ON \
+ -DENABLE_LIBOPENJPEG=openjpeg2 \
+ -DENABLE_XPDF_HEADERS=ON \
+ -DENABLE_ZLIB=ON \
+ .. || exit 1
+
+make $NUMBOBS || make || exit 1
make install DESTDIR=$PKG || exit 1
+# Back to source tarball root directory:
+cd ..
+
# Remove files that overlap with the xpdf package:
rm -f $PKG/usr/bin/pdfdetach $PKG/usr/man/man1/pdfdetach.1
@@ -120,7 +143,7 @@ if [ -d $PKG/usr/man ]; then
fi
mkdir -p $PKG/usr/doc/${PKGNAM}-$VERSION
-cp -a AUTHORS COPYING* INSTALL NEWS README README-XPDF TODO \
+cp -a AUTHORS COPYING* INSTALL NEWS README* TODO \
$PKG/usr/doc/${PKGNAM}-$VERSION
( cd $PKG/usr/doc/${PKGNAM}-$VERSION
ln -s /usr/share/gtk-doc/html/poppler html )
diff --git a/deps/poppler/poppler.remove.qt4.frontend.diff b/deps/poppler/poppler.remove.qt4.frontend.diff
new file mode 100644
index 0000000..2b58eb5
--- /dev/null
+++ b/deps/poppler/poppler.remove.qt4.frontend.diff
@@ -0,0 +1,26533 @@
+From fb4c69d270a618bb23791e52f46ec73c86574294 Mon Sep 17 00:00:00 2001
+From: Albert Astals Cid <aacid@kde.org>
+Date: Fri, 1 Dec 2017 23:44:17 +0100
+Subject: [PATCH] Remove the Qt4 frontend
+
+---
+ .gitignore | 2 -
+ CMakeLists.txt | 17 -
+ cmake/modules/FindQt4.cmake | 1311 -------
+ poppler-qt4.pc.cmake | 12 -
+ qt4/.gitignore | 4 -
+ qt4/CMakeLists.txt | 6 -
+ qt4/demos/.gitignore | 4 -
+ qt4/demos/CMakeLists.txt | 28 -
+ qt4/demos/abstractinfodock.cpp | 57 -
+ qt4/demos/abstractinfodock.h | 48 -
+ qt4/demos/documentobserver.cpp | 50 -
+ qt4/demos/documentobserver.h | 50 -
+ qt4/demos/embeddedfiles.cpp | 82 -
+ qt4/demos/embeddedfiles.h | 44 -
+ qt4/demos/fonts.cpp | 72 -
+ qt4/demos/fonts.h | 43 -
+ qt4/demos/info.cpp | 72 -
+ qt4/demos/info.h | 43 -
+ qt4/demos/main_viewer.cpp | 33 -
+ qt4/demos/metadata.cpp | 50 -
+ qt4/demos/metadata.h | 43 -
+ qt4/demos/navigationtoolbar.cpp | 144 -
+ qt4/demos/navigationtoolbar.h | 65 -
+ qt4/demos/optcontent.cpp | 69 -
+ qt4/demos/optcontent.h | 47 -
+ qt4/demos/pageview.cpp | 101 -
+ qt4/demos/pageview.h | 53 -
+ qt4/demos/permissions.cpp | 66 -
+ qt4/demos/permissions.h | 43 -
+ qt4/demos/thumbnails.cpp | 84 -
+ qt4/demos/thumbnails.h | 48 -
+ qt4/demos/toc.cpp | 88 -
+ qt4/demos/toc.h | 43 -
+ qt4/demos/viewer.cpp | 319 --
+ qt4/demos/viewer.h | 73 -
+ qt4/src/.gitignore | 9 -
+ qt4/src/ArthurOutputDev.cc | 812 ----
+ qt4/src/ArthurOutputDev.h | 170 -
+ qt4/src/CMakeLists.txt | 54 -
+ qt4/src/Doxyfile | 1637 ---------
+ qt4/src/Mainpage.dox | 85 -
+ qt4/src/poppler-annotation-helper.h | 181 -
+ qt4/src/poppler-annotation-private.h | 112 -
+ qt4/src/poppler-annotation.cc | 5089 --------------------------
+ qt4/src/poppler-annotation.h | 1375 -------
+ qt4/src/poppler-base-converter.cc | 105 -
+ qt4/src/poppler-converter-private.h | 49 -
+ qt4/src/poppler-document.cc | 850 -----
+ qt4/src/poppler-embeddedfile-private.h | 42 -
+ qt4/src/poppler-embeddedfile.cc | 135 -
+ qt4/src/poppler-export.h | 20 -
+ qt4/src/poppler-fontinfo.cc | 150 -
+ qt4/src/poppler-form.cc | 416 ---
+ qt4/src/poppler-form.h | 343 --
+ qt4/src/poppler-link-extractor-private.h | 57 -
+ qt4/src/poppler-link-extractor.cc | 84 -
+ qt4/src/poppler-link-private.h | 57 -
+ qt4/src/poppler-link.cc | 710 ----
+ qt4/src/poppler-link.h | 641 ----
+ qt4/src/poppler-media.cc | 168 -
+ qt4/src/poppler-media.h | 100 -
+ qt4/src/poppler-movie.cc | 110 -
+ qt4/src/poppler-optcontent-private.h | 124 -
+ qt4/src/poppler-optcontent.cc | 456 ---
+ qt4/src/poppler-optcontent.h | 84 -
+ qt4/src/poppler-page-private.h | 57 -
+ qt4/src/poppler-page-transition-private.h | 28 -
+ qt4/src/poppler-page-transition.cc | 101 -
+ qt4/src/poppler-page-transition.h | 158 -
+ qt4/src/poppler-page.cc | 810 ----
+ qt4/src/poppler-pdf-converter.cc | 115 -
+ qt4/src/poppler-private.cc | 296 --
+ qt4/src/poppler-private.h | 241 --
+ qt4/src/poppler-ps-converter.cc | 280 --
+ qt4/src/poppler-qiodeviceoutstream-private.h | 47 -
+ qt4/src/poppler-qiodeviceoutstream.cc | 64 -
+ qt4/src/poppler-qt4.h | 1990 ----------
+ qt4/src/poppler-sound.cc | 132 -
+ qt4/src/poppler-textbox.cc | 63 -
+ qt4/tests/.gitignore | 33 -
+ qt4/tests/CMakeLists.txt | 67 -
+ qt4/tests/README.unittest | 23 -
+ qt4/tests/check_actualtext.cpp | 33 -
+ qt4/tests/check_attachments.cpp | 157 -
+ qt4/tests/check_dateConversion.cpp | 142 -
+ qt4/tests/check_fonts.cpp | 248 --
+ qt4/tests/check_goostring.cpp | 127 -
+ qt4/tests/check_lexer.cpp | 107 -
+ qt4/tests/check_links.cpp | 98 -
+ qt4/tests/check_metadata.cpp | 275 --
+ qt4/tests/check_optcontent.cpp | 446 ---
+ qt4/tests/check_pagelabelinfo.cpp | 43 -
+ qt4/tests/check_pagelayout.cpp | 49 -
+ qt4/tests/check_pagemode.cpp | 73 -
+ qt4/tests/check_password.cpp | 88 -
+ qt4/tests/check_permissions.cpp | 44 -
+ qt4/tests/check_search.cpp | 175 -
+ qt4/tests/check_strings.cpp | 250 --
+ qt4/tests/poppler-attachments.cpp | 39 -
+ qt4/tests/poppler-fonts.cpp | 89 -
+ qt4/tests/poppler-forms.cpp | 166 -
+ qt4/tests/poppler-texts.cpp | 40 -
+ qt4/tests/stress-poppler-dir.cpp | 67 -
+ qt4/tests/stress-poppler-qt4.cpp | 74 -
+ qt4/tests/stress-threads-qt4.cpp | 309 --
+ qt4/tests/test-password-qt4.cpp | 136 -
+ qt4/tests/test-poppler-qt4.cpp | 235 --
+ qt4/tests/test-render-to-file.cpp | 69 -
+ 108 files changed, 25623 deletions(-)
+ delete mode 100644 cmake/modules/FindQt4.cmake
+ delete mode 100644 poppler-qt4.pc.cmake
+ delete mode 100644 qt4/.gitignore
+ delete mode 100644 qt4/CMakeLists.txt
+ delete mode 100644 qt4/demos/.gitignore
+ delete mode 100644 qt4/demos/CMakeLists.txt
+ delete mode 100644 qt4/demos/abstractinfodock.cpp
+ delete mode 100644 qt4/demos/abstractinfodock.h
+ delete mode 100644 qt4/demos/documentobserver.cpp
+ delete mode 100644 qt4/demos/documentobserver.h
+ delete mode 100644 qt4/demos/embeddedfiles.cpp
+ delete mode 100644 qt4/demos/embeddedfiles.h
+ delete mode 100644 qt4/demos/fonts.cpp
+ delete mode 100644 qt4/demos/fonts.h
+ delete mode 100644 qt4/demos/info.cpp
+ delete mode 100644 qt4/demos/info.h
+ delete mode 100644 qt4/demos/main_viewer.cpp
+ delete mode 100644 qt4/demos/metadata.cpp
+ delete mode 100644 qt4/demos/metadata.h
+ delete mode 100644 qt4/demos/navigationtoolbar.cpp
+ delete mode 100644 qt4/demos/navigationtoolbar.h
+ delete mode 100644 qt4/demos/optcontent.cpp
+ delete mode 100644 qt4/demos/optcontent.h
+ delete mode 100644 qt4/demos/pageview.cpp
+ delete mode 100644 qt4/demos/pageview.h
+ delete mode 100644 qt4/demos/permissions.cpp
+ delete mode 100644 qt4/demos/permissions.h
+ delete mode 100644 qt4/demos/thumbnails.cpp
+ delete mode 100644 qt4/demos/thumbnails.h
+ delete mode 100644 qt4/demos/toc.cpp
+ delete mode 100644 qt4/demos/toc.h
+ delete mode 100644 qt4/demos/viewer.cpp
+ delete mode 100644 qt4/demos/viewer.h
+ delete mode 100644 qt4/src/.gitignore
+ delete mode 100644 qt4/src/ArthurOutputDev.cc
+ delete mode 100644 qt4/src/ArthurOutputDev.h
+ delete mode 100644 qt4/src/CMakeLists.txt
+ delete mode 100644 qt4/src/Doxyfile
+ delete mode 100644 qt4/src/Mainpage.dox
+ delete mode 100644 qt4/src/poppler-annotation-helper.h
+ delete mode 100644 qt4/src/poppler-annotation-private.h
+ delete mode 100644 qt4/src/poppler-annotation.cc
+ delete mode 100644 qt4/src/poppler-annotation.h
+ delete mode 100644 qt4/src/poppler-base-converter.cc
+ delete mode 100644 qt4/src/poppler-converter-private.h
+ delete mode 100644 qt4/src/poppler-document.cc
+ delete mode 100644 qt4/src/poppler-embeddedfile-private.h
+ delete mode 100644 qt4/src/poppler-embeddedfile.cc
+ delete mode 100644 qt4/src/poppler-export.h
+ delete mode 100644 qt4/src/poppler-fontinfo.cc
+ delete mode 100644 qt4/src/poppler-form.cc
+ delete mode 100644 qt4/src/poppler-form.h
+ delete mode 100644 qt4/src/poppler-link-extractor-private.h
+ delete mode 100644 qt4/src/poppler-link-extractor.cc
+ delete mode 100644 qt4/src/poppler-link-private.h
+ delete mode 100644 qt4/src/poppler-link.cc
+ delete mode 100644 qt4/src/poppler-link.h
+ delete mode 100644 qt4/src/poppler-media.cc
+ delete mode 100644 qt4/src/poppler-media.h
+ delete mode 100644 qt4/src/poppler-movie.cc
+ delete mode 100644 qt4/src/poppler-optcontent-private.h
+ delete mode 100644 qt4/src/poppler-optcontent.cc
+ delete mode 100644 qt4/src/poppler-optcontent.h
+ delete mode 100644 qt4/src/poppler-page-private.h
+ delete mode 100644 qt4/src/poppler-page-transition-private.h
+ delete mode 100644 qt4/src/poppler-page-transition.cc
+ delete mode 100644 qt4/src/poppler-page-transition.h
+ delete mode 100644 qt4/src/poppler-page.cc
+ delete mode 100644 qt4/src/poppler-pdf-converter.cc
+ delete mode 100644 qt4/src/poppler-private.cc
+ delete mode 100644 qt4/src/poppler-private.h
+ delete mode 100644 qt4/src/poppler-ps-converter.cc
+ delete mode 100644 qt4/src/poppler-qiodeviceoutstream-private.h
+ delete mode 100644 qt4/src/poppler-qiodeviceoutstream.cc
+ delete mode 100644 qt4/src/poppler-qt4.h
+ delete mode 100644 qt4/src/poppler-sound.cc
+ delete mode 100644 qt4/src/poppler-textbox.cc
+ delete mode 100644 qt4/tests/.gitignore
+ delete mode 100644 qt4/tests/CMakeLists.txt
+ delete mode 100644 qt4/tests/README.unittest
+ delete mode 100644 qt4/tests/check_actualtext.cpp
+ delete mode 100644 qt4/tests/check_attachments.cpp
+ delete mode 100644 qt4/tests/check_dateConversion.cpp
+ delete mode 100644 qt4/tests/check_fonts.cpp
+ delete mode 100644 qt4/tests/check_goostring.cpp
+ delete mode 100644 qt4/tests/check_lexer.cpp
+ delete mode 100644 qt4/tests/check_links.cpp
+ delete mode 100644 qt4/tests/check_metadata.cpp
+ delete mode 100644 qt4/tests/check_optcontent.cpp
+ delete mode 100644 qt4/tests/check_pagelabelinfo.cpp
+ delete mode 100644 qt4/tests/check_pagelayout.cpp
+ delete mode 100644 qt4/tests/check_pagemode.cpp
+ delete mode 100644 qt4/tests/check_password.cpp
+ delete mode 100644 qt4/tests/check_permissions.cpp
+ delete mode 100644 qt4/tests/check_search.cpp
+ delete mode 100644 qt4/tests/check_strings.cpp
+ delete mode 100644 qt4/tests/poppler-attachments.cpp
+ delete mode 100644 qt4/tests/poppler-fonts.cpp
+ delete mode 100644 qt4/tests/poppler-forms.cpp
+ delete mode 100644 qt4/tests/poppler-texts.cpp
+ delete mode 100644 qt4/tests/stress-poppler-dir.cpp
+ delete mode 100644 qt4/tests/stress-poppler-qt4.cpp
+ delete mode 100644 qt4/tests/stress-threads-qt4.cpp
+ delete mode 100644 qt4/tests/test-password-qt4.cpp
+ delete mode 100644 qt4/tests/test-poppler-qt4.cpp
+ delete mode 100644 qt4/tests/test-render-to-file.cpp
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 0d753efe..2ed1398a 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -40,7 +40,6 @@ set (CMAKE_CXX_EXTENSIONS OFF)
+ # command line switches
+ option(ENABLE_XPDF_HEADERS "Install unsupported xpdf headers." OFF)
+ option(BUILD_GTK_TESTS "Whether compile the GTK+ test programs." ON)
+-option(BUILD_QT4_TESTS "Whether compile the Qt4 test programs." ON)
+ option(BUILD_QT5_TESTS "Whether compile the Qt5 test programs." ON)
+ option(BUILD_CPP_TESTS "Whether compile the CPP test programs." ON)
+ option(ENABLE_SPLASH "Build the Splash graphics backend." ON)
+@@ -48,7 +47,6 @@ option(ENABLE_UTILS "Compile poppler command line utils." ON)
+ option(ENABLE_CPP "Compile poppler cpp wrapper." ON)
+ option(ENABLE_GLIB "Compile poppler glib wrapper." ON)
+ option(ENABLE_GTK_DOC "Whether to generate glib API documentation." OFF)
+-option(ENABLE_QT4 "Compile poppler qt4 wrapper." ON)
+ option(ENABLE_QT5 "Compile poppler qt5 wrapper." ON)
+ set(ENABLE_LIBOPENJPEG "openjpeg2" CACHE STRING "Use libopenjpeg for JPX streams. Possible values: openjpeg2, unmaintained, none. 'unmaintained' gives you the internal unmaintained decoder. Use at your own risk. 'none' compiles no JPX decoder at all. Default: openjpeg2")
+ set(ENABLE_CMS "lcms2" CACHE STRING "Use color management system. Possible values: lcms2, none. 'none' disables color management system.")
+@@ -114,7 +112,6 @@ set(OPI_SUPPORT ON)
+ set(TEXTOUT_WORD_LIST ON)
+
+ # setting the minimum required versions for some components
+-set(QT4_MIN_VERSION "4.7.0")
+ set(CAIRO_VERSION "1.10.0")
+ set(GLIB_REQUIRED "2.41")
+
+@@ -144,13 +141,6 @@ else()
+ message(FATAL_ERROR "Invalid ENABLE_DCTDECODER value.")
+ endif()
+
+-if (ENABLE_QT4)
+- macro_optional_find_package(Qt4)
+- if (NOT QT4_FOUND)
+- set(ENABLE_QT4 OFF)
+- endif()
+-endif()
+-
+ if (ENABLE_QT5)
+ find_package(Qt5Core)
+ find_package(Qt5Gui)
+@@ -670,9 +660,6 @@ if(ENABLE_GLIB)
+ add_subdirectory(glib)
+ endif()
+ add_subdirectory(test)
+-if(ENABLE_QT4)
+- add_subdirectory(qt4)
+-endif()
+ if(ENABLE_QT5)
+ add_subdirectory(qt5)
+ endif()
+@@ -697,9 +684,6 @@ poppler_create_install_pkgconfig(poppler.pc ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
+ if(ENABLE_SPLASH)
+ poppler_create_install_pkgconfig(poppler-splash.pc ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
+ endif()
+-if(ENABLE_QT4)
+- poppler_create_install_pkgconfig(poppler-qt4.pc ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
+-endif()
+ if(ENABLE_QT5)
+ poppler_create_install_pkgconfig(poppler-qt5.pc ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
+ endif()
+@@ -721,7 +705,6 @@ if(SPLASH_CMYK)
+ message(" with CMYK support")
+ endif()
+ show_end_message_yesno("cairo output" CAIRO_FOUND)
+-show_end_message_yesno("qt4 wrapper" ENABLE_QT4)
+ show_end_message_yesno("qt5 wrapper" ENABLE_QT5)
+ show_end_message_yesno("glib wrapper" ENABLE_GLIB)
+ show_end_message_yesno(" introspection" INTROSPECTION_FOUND)
+diff --git a/cmake/modules/FindQt4.cmake b/cmake/modules/FindQt4.cmake
+deleted file mode 100644
+index 79378b0c..00000000
+--- a/cmake/modules/FindQt4.cmake
++++ /dev/null
+@@ -1,1311 +0,0 @@
+-# - Find QT 4
+-# This module can be used to find Qt4.
+-# The most important issue is that the Qt4 qmake is available via the system path.
+-# This qmake is then used to detect basically everything else.
+-# This module defines a number of key variables and macros. First is
+-# QT_USE_FILE which is the path to a CMake file that can be included to compile
+-# Qt 4 applications and libraries. By default, the QtCore and QtGui
+-# libraries are loaded. This behavior can be changed by setting one or more
+-# of the following variables to true:
+-# QT_DONT_USE_QTCORE
+-# QT_DONT_USE_QTGUI
+-# QT_USE_QT3SUPPORT
+-# QT_USE_QTASSISTANT
+-# QT_USE_QTDESIGNER
+-# QT_USE_QTMOTIF
+-# QT_USE_QTMAIN
+-# QT_USE_QTNETWORK
+-# QT_USE_QTNSPLUGIN
+-# QT_USE_QTOPENGL
+-# QT_USE_QTSQL
+-# QT_USE_QTXML
+-# QT_USE_QTSVG
+-# QT_USE_QTTEST
+-# QT_USE_QTUITOOLS
+-# QT_USE_QTDBUS
+-# QT_USE_QTSCRIPT
+-#
+-# All the libraries required are stored in a variable called QT_LIBRARIES.
+-# Add this variable to your TARGET_LINK_LIBRARIES.
+-#
+-# macro QT4_WRAP_CPP(outfiles inputfile ... OPTIONS ...)
+-# create moc code from a list of files containing Qt class with
+-# the Q_OBJECT declaration. Options may be given to moc, such as those found
+-# when executing "moc -help"
+-#
+-# macro QT4_WRAP_UI(outfiles inputfile ... OPTIONS ...)
+-# create code from a list of Qt designer ui files.
+-# Options may be given to uic, such as those found
+-# when executing "uic -help"
+-#
+-# macro QT4_ADD_RESOURCES(outfiles inputfile ... OPTIONS ...)
+-# create code from a list of Qt resource files.
+-# Options may be given to rcc, such as those found
+-# when executing "rcc -help"
+-#
+-# macro QT4_AUTOMOC(inputfile ... )
+-# macro QT4_GENERATE_MOC(inputfile outputfile )
+-#
+-# macro QT4_ADD_DBUS_INTERFACE(outfiles interface basename)
+-# create a the interface header and implementation files with the
+-# given basename from the given interface xml file and add it to
+-# the list of sources.
+-# To disable generating a namespace header, set the source file property
+-# NO_NAMESPACE to TRUE on the interface file.
+-#
+-# macro QT4_ADD_DBUS_INTERFACES(outfiles inputfile ... )
+-# create the interface header and implementation files
+-# for all listed interface xml files
+-# the name will be automatically determined from the name of the xml file
+-# To disable generating namespace headers, set the source file property
+-# NO_NAMESPACE to TRUE for these inputfiles.
+-#
+-# macro QT4_ADD_DBUS_ADAPTOR(outfiles xmlfile parentheader parentclassname [basename] [classname])
+-# create a dbus adaptor (header and implementation file) from the xml file
+-# describing the interface, and add it to the list of sources. The adaptor
+-# forwards the calls to a parent class, defined in parentheader and named
+-# parentclassname. The name of the generated files will be
+-# <basename>adaptor.{cpp,h} where basename defaults to the basename of the xml file.
+-# If <classname> is provided, then it will be used as the classname of the
+-# adaptor itself.
+-#
+-# macro QT4_GENERATE_DBUS_INTERFACE( header [interfacename] OPTIONS ...)
+-# generate the xml interface file from the given header.
+-# If the optional argument interfacename is omitted, the name of the
+-# interface file is constructed from the basename of the header with
+-# the suffix .xml appended.
+-# Options may be given to uic, such as those found when executing "qdbuscpp2xml --help"
+-#
+-# QT_FOUND If false, don't try to use Qt.
+-# QT4_FOUND If false, don't try to use Qt 4.
+-#
+-# QT4_QTCORE_FOUND True if QtCore was found.
+-# QT4_QTGUI_FOUND True if QtGui was found.
+-# QT4_QT3SUPPORT_FOUND True if Qt3Support was found.
+-# QT4_QTASSISTANT_FOUND True if QtAssistant was found.
+-# QT4_QTDBUS_FOUND True if QtDBus was found.
+-# QT4_QTDESIGNER_FOUND True if QtDesigner was found.
+-# QT4_QTDESIGNERCOMPONENTS True if QtDesignerComponents was found.
+-# QT4_QTMOTIF_FOUND True if QtMotif was found.
+-# QT4_QTNETWORK_FOUND True if QtNetwork was found.
+-# QT4_QTNSPLUGIN_FOUND True if QtNsPlugin was found.
+-# QT4_QTOPENGL_FOUND True if QtOpenGL was found.
+-# QT4_QTSQL_FOUND True if QtSql was found.
+-# QT4_QTXML_FOUND True if QtXml was found.
+-# QT4_QTSVG_FOUND True if QtSvg was found.
+-# QT4_QTSCRIPT_FOUND True if QtScript was found.
+-# QT4_QTTEST_FOUND True if QtTest was found.
+-# QT4_QTUITOOLS_FOUND True if QtUiTools was found.
+-#
+-# QT4_DEFINITIONS Definitions to use when compiling code that uses Qt.
+-#
+-# QT4_INCLUDES List of paths to all include directories of
+-# Qt4 QT4_INCLUDE_DIR and QT4_QTCORE_INCLUDE_DIR are
+-# always in this variable even if NOTFOUND,
+-# all other INCLUDE_DIRS are
+-# only added if they are found.
+-#
+-# QT4_INCLUDE_DIR Path to "include" of Qt4
+-# QT4_QT4_INCLUDE_DIR Path to "include/Qt"
+-# QT4_QT3SUPPORT_INCLUDE_DIR Path to "include/Qt3Support"
+-# QT4_QTASSISTANT_INCLUDE_DIR Path to "include/QtAssistant"
+-# QT4_QTCORE_INCLUDE_DIR Path to "include/QtCore"
+-# QT4_QTDESIGNER_INCLUDE_DIR Path to "include/QtDesigner"
+-# QT4_QTDESIGNERCOMPONENTS_INCLUDE_DIR Path to "include/QtDesigner"
+-# QT4_QTDBUS_INCLUDE_DIR Path to "include/QtDBus"
+-# QT4_QTGUI_INCLUDE_DIR Path to "include/QtGui"
+-# QT4_QTMOTIF_INCLUDE_DIR Path to "include/QtMotif"
+-# QT4_QTNETWORK_INCLUDE_DIR Path to "include/QtNetwork"
+-# QT4_QTNSPLUGIN_INCLUDE_DIR Path to "include/QtNsPlugin"
+-# QT4_QTOPENGL_INCLUDE_DIR Path to "include/QtOpenGL"
+-# QT4_QTSQL_INCLUDE_DIR Path to "include/QtSql"
+-# QT4_QTXML_INCLUDE_DIR Path to "include/QtXml"
+-# QT4_QTSVG_INCLUDE_DIR Path to "include/QtSvg"
+-# QT4_QTSCRIPT_INCLUDE_DIR Path to "include/QtScript"
+-# QT4_QTTEST_INCLUDE_DIR Path to "include/QtTest"
+-#
+-# QT4_LIBRARY_DIR Path to "lib" of Qt4
+-#
+-# QT4_PLUGINS_DIR Path to "plugins" for Qt4
+-#
+-# For every library of Qt, a QT4_QTFOO_LIBRARY variable is defined, with the full path to the library.
+-#
+-# So there are the following variables:
+-# The Qt3Support library: QT4_QT3SUPPORT_LIBRARY
+-#
+-# The QtAssistant library: QT4_QTASSISTANT_LIBRARY
+-#
+-# The QtCore library: QT4_QTCORE_LIBRARY
+-#
+-# The QtDBus library: QT4_QTDBUS_LIBRARY
+-#
+-# The QtDesigner library: QT4_QTDESIGNER_LIBRARY
+-#
+-# The QtDesignerComponents library: QT4_QTDESIGNERCOMPONENTS_LIBRARY
+-#
+-# The QtGui library: QT4_QTGUI_LIBRARY
+-#
+-# The QtMotif library: QT4_QTMOTIF_LIBRARY
+-#
+-# The QtNetwork library: QT4_QTNETWORK_LIBRARY
+-#
+-# The QtNsPLugin library: QT4_QTNSPLUGIN_LIBRARY
+-#
+-# The QtOpenGL library: QT4_QTOPENGL_LIBRARY
+-#
+-# The QtSql library: QT4_QTSQL_LIBRARY
+-#
+-# The QtXml library: QT4_QTXML_LIBRARY
+-#
+-# The QtSvg library: QT4_QTSVG_LIBRARY
+-#
+-# The QtScript library: QT4_QTSCRIPT_LIBRARY
+-#
+-# The QtTest library: QT4_QTTEST_LIBRARY
+-#
+-# The qtmain library for Windows QT4_QTMAIN_LIBRARY
+-#
+-# The QtUiTools library: QT4_QTUITOOLS_LIBRARY
+-#
+-# also defined, but NOT for general use are
+-# QT4_MOC_EXECUTABLE Where to find the moc tool.
+-# QT4_UIC_EXECUTABLE Where to find the uic tool.
+-# QT_UIC3_EXECUTABLE Where to find the uic3 tool.
+-# QT_RCC_EXECUTABLE Where to find the rcc tool
+-# QT_DBUSCPP2XML_EXECUTABLE Where to find the qdbuscpp2xml tool.
+-# QT_DBUSXML2CPP_EXECUTABLE Where to find the qdbusxml2cpp tool.
+-#
+-# QT_DOC_DIR Path to "doc" of Qt4
+-# QT_MKSPECS_DIR Path to "mkspecs" of Qt4
+-#
+-#
+-# These are around for backwards compatibility
+-# they will be set
+-# QT_WRAP_CPP Set true if QT4_MOC_EXECUTABLE is found
+-# QT_WRAP_UI Set true if QT4_UIC_EXECUTABLE is found
+-#
+-# These variables do _NOT_ have any effect anymore (compared to FindQt.cmake)
+-# QT_MT_REQUIRED Qt4 is now always multithreaded
+-#
+-# These variables are set to "" Because Qt structure changed
+-# (They make no sense in Qt4)
+-# QT4_QT_LIBRARY Qt-Library is now split
+-
+-# Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved.
+-# See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details.
+-
+-if (QT4_QMAKE_FOUND)
+- # Check already done in this cmake run, nothing more to do
+-
+-else (QT4_QMAKE_FOUND)
+-
+-# check that QT_NO_DEBUG is defined for release configurations
+-MACRO(QT_CHECK_FLAG_EXISTS FLAG VAR DOC)
+- IF(NOT ${VAR} MATCHES "${FLAG}")
+- SET(${VAR} "${${VAR}} ${FLAG}"
+- CACHE STRING "Flags used by the compiler during ${DOC} builds." FORCE)
+- ENDIF(NOT ${VAR} MATCHES "${FLAG}")
+-ENDMACRO(QT_CHECK_FLAG_EXISTS FLAG VAR)
+-QT_CHECK_FLAG_EXISTS(-DQT_NO_DEBUG CMAKE_CXX_FLAGS_RELWITHDEBINFO "Release with Debug Info")
+-QT_CHECK_FLAG_EXISTS(-DQT_NO_DEBUG CMAKE_CXX_FLAGS_RELEASE "release")
+-QT_CHECK_FLAG_EXISTS(-DQT_NO_DEBUG CMAKE_CXX_FLAGS_MINSIZEREL "release minsize")
+-
+-INCLUDE(CheckSymbolExists)
+-INCLUDE(MacroAddFileDependencies)
+-INCLUDE(MacroPushRequiredVars)
+-
+-SET(QT_USE_FILE ${CMAKE_ROOT}/Modules/UseQt4.cmake)
+-
+-SET( QT4_DEFINITIONS "")
+-
+-IF (WIN32)
+- SET(QT4_DEFINITIONS -DQT_DLL)
+-ENDIF(WIN32)
+-
+-SET(QT4_INSTALLED_VERSION_TOO_OLD FALSE)
+-
+-# macro for asking qmake to process pro files
+-MACRO(QT_QUERY_QMAKE outvar invar)
+- FILE(WRITE ${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmpQmake/tmp.pro
+- "message(CMAKE_MESSAGE<$$${invar}>)")
+-
+- # Invoke qmake with the tmp.pro program to get the desired
+- # information. Use the same variable for both stdout and stderr
+- # to make sure we get the output on all platforms.
+- EXECUTE_PROCESS(COMMAND ${QT_QMAKE_EXECUTABLE}
+- WORKING_DIRECTORY
+- ${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmpQmake
+- OUTPUT_VARIABLE _qmake_query_output
+- RESULT_VARIABLE _qmake_result
+- ERROR_VARIABLE _qmake_query_output )
+-
+- FILE(REMOVE_RECURSE
+- "${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmpQmake")
+-
+- IF(_qmake_result)
+- MESSAGE(WARNING " querying qmake for ${invar}. qmake reported:\n${_qmake_query_output}")
+- ELSE(_qmake_result)
+- STRING(REGEX REPLACE ".*CMAKE_MESSAGE<([^>]*).*" "\\1" ${outvar} "${_qmake_query_output}")
+- ENDIF(_qmake_result)
+-
+-ENDMACRO(QT_QUERY_QMAKE)
+-
+-MACRO(VERIFY_QMAKE_QT4)
+- EXEC_PROGRAM(${QT_QMAKE_EXECUTABLE} ARGS "-query QT_VERSION" OUTPUT_VARIABLE QTVERSION)
+-
+- # check for qt3 qmake and then try and find qmake4 or qmake-qt4 in the path
+- IF("${QTVERSION}" MATCHES "Unknown")
+- SET(QT_QMAKE_EXECUTABLE NOTFOUND CACHE FILEPATH "" FORCE)
+- FIND_PROGRAM(QT_QMAKE_EXECUTABLE NAMES qmake4 qmake-qt4 PATHS
+- "[HKEY_CURRENT_USER\\Software\\Trolltech\\Qt3Versions\\4.0.0;InstallDir]/bin"
+- "[HKEY_CURRENT_USER\\Software\\Trolltech\\Versions\\4.0.0;InstallDir]/bin"
+- $ENV{QTDIR}/bin
+- )
+- IF(QT_QMAKE_EXECUTABLE)
+- EXEC_PROGRAM(${QT_QMAKE_EXECUTABLE}
+- ARGS "-query QT_VERSION" OUTPUT_VARIABLE QTVERSION)
+- ENDIF(QT_QMAKE_EXECUTABLE)
+- ENDIF("${QTVERSION}" MATCHES "Unknown")
+-
+- # check that we found the Qt4 qmake, Qt3 qmake output won't match here
+- STRING(REGEX MATCH "^[0-9]+\\.[0-9]+\\.[0-9]+" qt_version_tmp "${QTVERSION}")
+- IF (qt_version_tmp)
+-
+- # we need at least version 4.0.0
+- IF (NOT QT4_MIN_VERSION)
+- SET(QT4_MIN_VERSION "4.0.0")
+- ENDIF (NOT QT4_MIN_VERSION)
+-
+- #now parse the parts of the user given version string into variables
+- STRING(REGEX MATCH "^[0-9]+\\.[0-9]+\\.[0-9]+" req_qt_major_vers "${QT4_MIN_VERSION}")
+- IF (NOT req_qt_major_vers)
+- MESSAGE( FATAL_ERROR "Invalid Qt version string given: \"${QT4_MIN_VERSION}\", expected e.g. \"4.0.1\"")
+- ENDIF (NOT req_qt_major_vers)
+-
+- # now parse the parts of the user given version string into variables
+- STRING(REGEX REPLACE "^([0-9]+)\\.[0-9]+\\.[0-9]+" "\\1" req_qt_major_vers "${QT4_MIN_VERSION}")
+- STRING(REGEX REPLACE "^[0-9]+\\.([0-9])+\\.[0-9]+" "\\1" req_qt_minor_vers "${QT4_MIN_VERSION}")
+- STRING(REGEX REPLACE "^[0-9]+\\.[0-9]+\\.([0-9]+)" "\\1" req_qt_patch_vers "${QT4_MIN_VERSION}")
+-
+- IF (NOT req_qt_major_vers EQUAL 4)
+- MESSAGE( FATAL_ERROR "Invalid Qt version string given: \"${QT4_MIN_VERSION}\", major version 4 is required, e.g. \"4.0.1\"")
+- ENDIF (NOT req_qt_major_vers EQUAL 4)
+-
+- # and now the version string given by qmake
+- STRING(REGEX REPLACE "^([0-9]+)\\.[0-9]+\\.[0-9]+.*" "\\1" found_qt_major_vers "${QTVERSION}")
+- STRING(REGEX REPLACE "^[0-9]+\\.([0-9])+\\.[0-9]+.*" "\\1" found_qt_minor_vers "${QTVERSION}")
+- STRING(REGEX REPLACE "^[0-9]+\\.[0-9]+\\.([0-9]+).*" "\\1" found_qt_patch_vers "${QTVERSION}")
+- IF (${found_qt_major_vers} EQUAL 4)
+- # compute an overall version number which can be compared at once
+- MATH(EXPR req_vers "${req_qt_major_vers}*10000 + ${req_qt_minor_vers}*100 + ${req_qt_patch_vers}")
+- MATH(EXPR found_vers "${found_qt_major_vers}*10000 + ${found_qt_minor_vers}*100 + ${found_qt_patch_vers}")
+-
+-
+- IF (found_vers LESS req_vers)
+- SET(QT4_QMAKE_FOUND FALSE)
+- SET(QT4_INSTALLED_VERSION_TOO_OLD TRUE)
+- ELSE (found_vers LESS req_vers)
+- SET(QT4_QMAKE_FOUND TRUE)
+- ENDIF (found_vers LESS req_vers)
+- ENDIF ()
+- ENDIF (qt_version_tmp)
+-ENDMACRO()
+-
+-GET_FILENAME_COMPONENT(qt_install_version "[HKEY_CURRENT_USER\\Software\\trolltech\\Versions;DefaultQtVersion]" NAME)
+-# check for qmake
+-FIND_PROGRAM(QT_QMAKE_EXECUTABLE NAMES qmake qmake4 qmake-qt4 PATHS
+- "[HKEY_CURRENT_USER\\Software\\Trolltech\\Qt3Versions\\4.0.0;InstallDir]/bin"
+- "[HKEY_CURRENT_USER\\Software\\Trolltech\\Versions\\4.0.0;InstallDir]/bin"
+- "[HKEY_CURRENT_USER\\Software\\Trolltech\\Versions\\${qt_install_version};InstallDir]/bin"
+- $ENV{QTDIR}/bin
+-)
+-
+-IF (QT_QMAKE_EXECUTABLE)
+-
+- SET(QT4_QMAKE_FOUND FALSE)
+- VERIFY_QMAKE_QT4()
+-
+- IF (NOT QT4_QMAKE_FOUND)
+- FIND_PROGRAM(QT_QMAKE_EXECUTABLE2 NAMES qmake4 qmake-qt4 PATHS
+- "[HKEY_CURRENT_USER\\Software\\Trolltech\\Qt3Versions\\4.0.0;InstallDir]/bin"
+- "[HKEY_CURRENT_USER\\Software\\Trolltech\\Versions\\4.0.0;InstallDir]/bin"
+- "[HKEY_CURRENT_USER\\Software\\Trolltech\\Versions\\${qt_install_version};InstallDir]/bin"
+- $ENV{QTDIR}/bin
+- )
+- SET(QT_QMAKE_EXECUTABLE ${QT_QMAKE_EXECUTABLE2})
+- VERIFY_QMAKE_QT4()
+- ENDIF()
+-
+-ENDIF (QT_QMAKE_EXECUTABLE)
+-
+-IF (QT4_QMAKE_FOUND)
+-
+- if (WIN32)
+- # get qt install dir
+- get_filename_component(_DIR ${QT_QMAKE_EXECUTABLE} PATH )
+- get_filename_component(QT_INSTALL_DIR ${_DIR} PATH )
+- endif (WIN32)
+-
+- # ask qmake for the library dir
+- # Set QT4_LIBRARY_DIR
+- IF (NOT QT4_LIBRARY_DIR)
+- EXEC_PROGRAM( ${QT_QMAKE_EXECUTABLE}
+- ARGS "-query QT_INSTALL_LIBS"
+- OUTPUT_VARIABLE QT4_LIBRARY_DIR_TMP )
+- IF(EXISTS "${QT4_LIBRARY_DIR_TMP}")
+- SET(QT4_LIBRARY_DIR ${QT4_LIBRARY_DIR_TMP} CACHE PATH "Qt library dir")
+- ELSE(EXISTS "${QT4_LIBRARY_DIR_TMP}")
+- MESSAGE("Warning: QT_QMAKE_EXECUTABLE reported QT_INSTALL_LIBS as ${QT4_LIBRARY_DIR_TMP}")
+- MESSAGE("Warning: ${QT4_LIBRARY_DIR_TMP} does NOT exist, Qt must NOT be installed correctly.")
+- ENDIF(EXISTS "${QT4_LIBRARY_DIR_TMP}")
+- ENDIF(NOT QT4_LIBRARY_DIR)
+-
+- IF (APPLE)
+- IF (EXISTS ${QT4_LIBRARY_DIR}/QtCore.framework)
+- SET(QT_USE_FRAMEWORKS ON
+- CACHE BOOL "Set to ON if Qt build uses frameworks.")
+- ELSE (EXISTS ${QT4_LIBRARY_DIR}/QtCore.framework)
+- SET(QT_USE_FRAMEWORKS OFF
+- CACHE BOOL "Set to ON if Qt build uses frameworks.")
+- ENDIF (EXISTS ${QT4_LIBRARY_DIR}/QtCore.framework)
+-
+- MARK_AS_ADVANCED(QT_USE_FRAMEWORKS)
+- ENDIF (APPLE)
+-
+- # ask qmake for the binary dir
+- IF (NOT QT_BINARY_DIR)
+- EXEC_PROGRAM(${QT_QMAKE_EXECUTABLE}
+- ARGS "-query QT_INSTALL_BINS"
+- OUTPUT_VARIABLE qt_bins )
+- SET(QT_BINARY_DIR ${qt_bins} CACHE INTERNAL "")
+- ENDIF (NOT QT_BINARY_DIR)
+-
+- # ask qmake for the include dir
+- IF (NOT QT_HEADERS_DIR)
+- EXEC_PROGRAM( ${QT_QMAKE_EXECUTABLE}
+- ARGS "-query QT_INSTALL_HEADERS"
+- OUTPUT_VARIABLE qt_headers )
+- SET(QT_HEADERS_DIR ${qt_headers} CACHE INTERNAL "")
+- ENDIF(NOT QT_HEADERS_DIR)
+-
+-
+- # ask qmake for the documentation directory
+- IF (NOT QT_DOC_DIR)
+- EXEC_PROGRAM( ${QT_QMAKE_EXECUTABLE}
+- ARGS "-query QT_INSTALL_DOCS"
+- OUTPUT_VARIABLE qt_doc_dir )
+- SET(QT_DOC_DIR ${qt_doc_dir} CACHE PATH "The location of the Qt docs")
+- ENDIF (NOT QT_DOC_DIR)
+-
+- # ask qmake for the mkspecs directory
+- IF (NOT QT_MKSPECS_DIR)
+- EXEC_PROGRAM( ${QT_QMAKE_EXECUTABLE}
+- ARGS "-query QMAKE_MKSPECS"
+- OUTPUT_VARIABLE qt_mkspecs_dirs )
+- STRING(REPLACE ":" ";" qt_mkspecs_dirs "${qt_mkspecs_dirs}")
+- FIND_PATH(QT_MKSPECS_DIR qconfig.pri PATHS ${qt_mkspecs_dirs}
+- DOC "The location of the Qt mkspecs containing qconfig.pri"
+- NO_DEFAULT_PATH )
+- ENDIF (NOT QT_MKSPECS_DIR)
+-
+- # ask qmake for the plugins directory
+- IF (NOT QT4_PLUGINS_DIR)
+- EXEC_PROGRAM( ${QT_QMAKE_EXECUTABLE}
+- ARGS "-query QT_INSTALL_PLUGINS"
+- OUTPUT_VARIABLE qt_plugins_dir )
+- SET(QT4_PLUGINS_DIR ${qt_plugins_dir} CACHE PATH "The location of the Qt plugins")
+- ENDIF (NOT QT4_PLUGINS_DIR)
+- ########################################
+- #
+- # Setting the INCLUDE-Variables
+- #
+- ########################################
+-
+- FIND_PATH(QT4_QTCORE_INCLUDE_DIR QtGlobal
+- ${QT_HEADERS_DIR}/QtCore
+- ${QT4_LIBRARY_DIR}/QtCore.framework/Headers
+- NO_DEFAULT_PATH
+- )
+-
+- # Set QT4_INCLUDE_DIR by removine "/QtCore" in the string ${QT4_QTCORE_INCLUDE_DIR}
+- IF( QT4_QTCORE_INCLUDE_DIR AND NOT QT4_INCLUDE_DIR)
+- IF (QT_USE_FRAMEWORKS)
+- SET(QT4_INCLUDE_DIR ${QT_HEADERS_DIR})
+- ELSE (QT_USE_FRAMEWORKS)
+- STRING( REGEX REPLACE "/QtCore$" "" qt4_include_dir ${QT4_QTCORE_INCLUDE_DIR})
+- SET( QT4_INCLUDE_DIR ${qt4_include_dir} CACHE PATH "")
+- ENDIF (QT_USE_FRAMEWORKS)
+- ENDIF( QT4_QTCORE_INCLUDE_DIR AND NOT QT4_INCLUDE_DIR)
+-
+- IF( NOT QT4_INCLUDE_DIR)
+- IF( NOT Qt4_FIND_QUIETLY AND Qt4_FIND_REQUIRED)
+- MESSAGE( FATAL_ERROR "Could NOT find QtGlobal header")
+- ENDIF( NOT Qt4_FIND_QUIETLY AND Qt4_FIND_REQUIRED)
+- ENDIF( NOT QT4_INCLUDE_DIR)
+-
+- #############################################
+- #
+- # Find out what window system we're using
+- #
+- #############################################
+- # Save required includes and required_flags variables
+- macro_push_required_vars()
+- # Add QT4_INCLUDE_DIR to CMAKE_REQUIRED_INCLUDES
+- SET(CMAKE_REQUIRED_INCLUDES "${CMAKE_REQUIRED_INCLUDES};${QT4_INCLUDE_DIR}")
+- # On Mac OS X when Qt has framework support, also add the framework path
+- IF( QT_USE_FRAMEWORKS )
+- SET(CMAKE_REQUIRED_FLAGS "-F${QT4_LIBRARY_DIR} ")
+- ENDIF( QT_USE_FRAMEWORKS )
+- # Check for Window system symbols (note: only one should end up being set)
+- CHECK_SYMBOL_EXISTS(Q_WS_X11 "QtCore/qglobal.h" Q_WS_X11)
+- CHECK_SYMBOL_EXISTS(Q_WS_WIN "QtCore/qglobal.h" Q_WS_WIN)
+- CHECK_SYMBOL_EXISTS(Q_WS_QWS "QtCore/qglobal.h" Q_WS_QWS)
+- CHECK_SYMBOL_EXISTS(Q_WS_MAC "QtCore/qglobal.h" Q_WS_MAC)
+-
+- IF (QT4_QTCOPY_REQUIRED)
+- CHECK_SYMBOL_EXISTS(QT_IS_QTCOPY "QtCore/qglobal.h" QT_KDE_QT_COPY)
+- IF (NOT QT_IS_QTCOPY)
+- MESSAGE(FATAL_ERROR "qt-copy is required, but hasn't been found")
+- ENDIF (NOT QT_IS_QTCOPY)
+- ENDIF (QT4_QTCOPY_REQUIRED)
+-
+- # Restore CMAKE_REQUIRED_INCLUDES+CMAKE_REQUIRED_FLAGS variables
+- macro_pop_required_vars()
+- #
+- #############################################
+-
+- IF (QT_USE_FRAMEWORKS)
+- SET(QT4_DEFINITIONS ${QT4_DEFINITIONS} -F${QT4_LIBRARY_DIR} -L${QT4_LIBRARY_DIR} )
+- ENDIF (QT_USE_FRAMEWORKS)
+-
+- # Set QT4_QT3SUPPORT_INCLUDE_DIR
+- FIND_PATH(QT4_QT3SUPPORT_INCLUDE_DIR Qt3Support
+- PATHS
+- ${QT4_INCLUDE_DIR}/Qt3Support
+- ${QT4_LIBRARY_DIR}/Qt3Support.framework/Headers
+- NO_DEFAULT_PATH
+- )
+-
+- # Set QT4_QT4_INCLUDE_DIR
+- FIND_PATH(QT4_QT4_INCLUDE_DIR qglobal.h
+- PATHS
+- ${QT4_INCLUDE_DIR}/Qt
+- ${QT4_LIBRARY_DIR}/QtCore.framework/Headers
+- NO_DEFAULT_PATH
+- )
+-
+- # Set QT4_QTGUI_INCLUDE_DIR
+- FIND_PATH(QT4_QTGUI_INCLUDE_DIR QtGui
+- PATHS
+- ${QT4_INCLUDE_DIR}/QtGui
+- ${QT4_LIBRARY_DIR}/QtGui.framework/Headers
+- NO_DEFAULT_PATH
+- )
+-
+- # Set QT4_QTSVG_INCLUDE_DIR
+- FIND_PATH(QT4_QTSVG_INCLUDE_DIR QtSvg
+- PATHS
+- ${QT4_INCLUDE_DIR}/QtSvg
+- ${QT4_LIBRARY_DIR}/QtSvg.framework/Headers
+- NO_DEFAULT_PATH
+- )
+-
+- # Set QT4_QTSCRIPT_INCLUDE_DIR
+- FIND_PATH(QT4_QTSCRIPT_INCLUDE_DIR QtScript
+- PATHS
+- ${QT4_INCLUDE_DIR}/QtScript
+- ${QT4_LIBRARY_DIR}/QtScript.framework/Headers
+- NO_DEFAULT_PATH
+- )
+-
+- # Set QT4_QTTEST_INCLUDE_DIR
+- FIND_PATH(QT4_QTTEST_INCLUDE_DIR QtTest
+- PATHS
+- ${QT4_INCLUDE_DIR}/QtTest
+- ${QT4_LIBRARY_DIR}/QtTest.framework/Headers
+- NO_DEFAULT_PATH
+- )
+-
+- # Set QT4_QTUITOOLS_INCLUDE_DIR
+- FIND_PATH(QT4_QTUITOOLS_INCLUDE_DIR QtUiTools
+- PATHS
+- ${QT4_INCLUDE_DIR}/QtUiTools
+- ${QT4_LIBRARY_DIR}/QtUiTools.framework/Headers
+- NO_DEFAULT_PATH
+- )
+-
+-
+-
+- # Set QT4_QTMOTIF_INCLUDE_DIR
+- IF(Q_WS_X11)
+- FIND_PATH(QT4_QTMOTIF_INCLUDE_DIR QtMotif PATHS ${QT4_INCLUDE_DIR}/QtMotif NO_DEFAULT_PATH )
+- ENDIF(Q_WS_X11)
+-
+- # Set QT4_QTNETWORK_INCLUDE_DIR
+- FIND_PATH(QT4_QTNETWORK_INCLUDE_DIR QtNetwork
+- PATHS
+- ${QT4_INCLUDE_DIR}/QtNetwork
+- ${QT4_LIBRARY_DIR}/QtNetwork.framework/Headers
+- NO_DEFAULT_PATH
+- )
+-
+- # Set QT4_QTNSPLUGIN_INCLUDE_DIR
+- FIND_PATH(QT4_QTNSPLUGIN_INCLUDE_DIR QtNsPlugin
+- PATHS
+- ${QT4_INCLUDE_DIR}/QtNsPlugin
+- ${QT4_LIBRARY_DIR}/QtNsPlugin.framework/Headers
+- NO_DEFAULT_PATH
+- )
+-
+- # Set QT4_QTOPENGL_INCLUDE_DIR
+- FIND_PATH(QT4_QTOPENGL_INCLUDE_DIR QtOpenGL
+- PATHS
+- ${QT4_INCLUDE_DIR}/QtOpenGL
+- ${QT4_LIBRARY_DIR}/QtOpenGL.framework/Headers
+- NO_DEFAULT_PATH
+- )
+-
+- # Set QT4_QTSQL_INCLUDE_DIR
+- FIND_PATH(QT4_QTSQL_INCLUDE_DIR QtSql
+- PATHS
+- ${QT4_INCLUDE_DIR}/QtSql
+- ${QT4_LIBRARY_DIR}/QtSql.framework/Headers
+- NO_DEFAULT_PATH
+- )
+-
+- # Set QT4_QTXML_INCLUDE_DIR
+- FIND_PATH(QT4_QTXML_INCLUDE_DIR QtXml
+- PATHS
+- ${QT4_INCLUDE_DIR}/QtXml
+- ${QT4_LIBRARY_DIR}/QtXml.framework/Headers
+- NO_DEFAULT_PATH
+- )
+-
+- # Set QT4_QTASSISTANT_INCLUDE_DIR
+- FIND_PATH(QT4_QTASSISTANT_INCLUDE_DIR QtAssistant
+- PATHS
+- ${QT4_INCLUDE_DIR}/QtAssistant
+- ${QT_HEADERS_DIR}/QtAssistant
+- ${QT4_LIBRARY_DIR}/QtAssistant.framework/Headers
+- NO_DEFAULT_PATH
+- )
+-
+- # Set QT4_QTDESIGNER_INCLUDE_DIR
+- FIND_PATH(QT4_QTDESIGNER_INCLUDE_DIR QDesignerComponents
+- PATHS
+- ${QT4_INCLUDE_DIR}/QtDesigner
+- ${QT_HEADERS_DIR}/QtDesigner
+- ${QT4_LIBRARY_DIR}/QtDesigner.framework/Headers
+- NO_DEFAULT_PATH
+- )
+-
+- # Set QT4_QTDESIGNERCOMPONENTS_INCLUDE_DIR
+- FIND_PATH(QT4_QTDESIGNERCOMPONENTS_INCLUDE_DIR QDesignerComponents
+- PATHS
+- ${QT4_INCLUDE_DIR}/QtDesigner
+- ${QT_HEADERS_DIR}/QtDesigner
+- NO_DEFAULT_PATH
+- )
+-
+-
+- # Set QT4_QTDBUS_INCLUDE_DIR
+- FIND_PATH(QT4_QTDBUS_INCLUDE_DIR QtDBus
+- PATHS
+- ${QT4_INCLUDE_DIR}/QtDBus
+- ${QT_HEADERS_DIR}/QtDBus
+- NO_DEFAULT_PATH
+- )
+-
+- # Make variables changeble to the advanced user
+- MARK_AS_ADVANCED( QT4_LIBRARY_DIR QT4_INCLUDE_DIR QT4_QT4_INCLUDE_DIR QT_DOC_DIR QT_MKSPECS_DIR QT4_PLUGINS_DIR)
+-
+- # Set QT4_INCLUDES
+- SET( QT4_INCLUDES ${QT4_QT4_INCLUDE_DIR} ${QT_MKSPECS_DIR}/default ${QT4_INCLUDE_DIR})
+-
+-
+- ########################################
+- #
+- # Setting the LIBRARY-Variables
+- #
+- ########################################
+-
+- IF (QT_USE_FRAMEWORKS)
+- # If FIND_LIBRARY found libraries in Apple frameworks, we would NOT have
+- # to jump through these hoops.
+- IF(EXISTS ${QT4_LIBRARY_DIR}/QtCore.framework)
+- SET(QT4_QTCORE_FOUND TRUE)
+- SET(QT4_QTCORE_LIBRARY "-F${QT4_LIBRARY_DIR} -framework QtCore" CACHE STRING "The QtCore library.")
+- ELSE(EXISTS ${QT4_LIBRARY_DIR}/QtCore.framework)
+- SET(QT4_QTCORE_FOUND FALSE)
+- ENDIF(EXISTS ${QT4_LIBRARY_DIR}/QtCore.framework)
+-
+- IF(EXISTS ${QT4_LIBRARY_DIR}/QtGui.framework)
+- SET(QT4_QTGUI_FOUND TRUE)
+- SET(QT4_QTGUI_LIBRARY "-F${QT4_LIBRARY_DIR} -framework QtGui" CACHE STRING "The QtGui library.")
+- ELSE(EXISTS ${QT4_LIBRARY_DIR}/QtGui.framework)
+- SET(QT4_QTGUI_FOUND FALSE)
+- ENDIF(EXISTS ${QT4_LIBRARY_DIR}/QtGui.framework)
+-
+- IF(EXISTS ${QT4_LIBRARY_DIR}/Qt3Support.framework)
+- SET(QT4_QT3SUPPORT_FOUND TRUE)
+- SET(QT4_QT3SUPPORT_LIBRARY "-F${QT4_LIBRARY_DIR} -framework Qt3Support" CACHE STRING "The Qt3Support library.")
+- ELSE(EXISTS ${QT4_LIBRARY_DIR}/Qt3Support.framework)
+- SET(QT4_QT3SUPPORT_FOUND FALSE)
+- ENDIF(EXISTS ${QT4_LIBRARY_DIR}/Qt3Support.framework)
+-
+- IF(EXISTS ${QT4_LIBRARY_DIR}/QtNetwork.framework)
+- SET(QT4_QTNETWORK_FOUND TRUE)
+- SET(QT4_QTNETWORK_LIBRARY "-F${QT4_LIBRARY_DIR} -framework QtNetwork" CACHE STRING "The QtNetwork library.")
+- ELSE(EXISTS ${QT4_LIBRARY_DIR}/QtNetwork.framework)
+- SET(QT4_QTNETWORK_FOUND FALSE)
+- ENDIF(EXISTS ${QT4_LIBRARY_DIR}/QtNetwork.framework)
+-
+- IF(EXISTS ${QT4_LIBRARY_DIR}/QtOpenGL.framework)
+- SET(QT4_QTOPENGL_FOUND TRUE)
+- SET(QT4_QTOPENGL_LIBRARY "-F${QT4_LIBRARY_DIR} -framework QtOpenGL" CACHE STRING "The QtOpenGL library.")
+- ELSE(EXISTS ${QT4_LIBRARY_DIR}/QtOpenGL.framework)
+- SET(QT4_QTOPENGL_FOUND FALSE)
+- ENDIF(EXISTS ${QT4_LIBRARY_DIR}/QtOpenGL.framework)
+-
+- IF(EXISTS ${QT4_LIBRARY_DIR}/QtSql.framework)
+- SET(QT4_QTSQL_FOUND TRUE)
+- SET(QT4_QTSQL_LIBRARY "-F${QT4_LIBRARY_DIR} -framework QtSql" CACHE STRING "The QtSql library.")
+- ELSE(EXISTS ${QT4_LIBRARY_DIR}/QtSql.framework)
+- SET(QT4_QTSQL_FOUND FALSE)
+- ENDIF(EXISTS ${QT4_LIBRARY_DIR}/QtSql.framework)
+-
+- IF(EXISTS ${QT4_LIBRARY_DIR}/QtXml.framework)
+- SET(QT4_QTXML_FOUND TRUE)
+- SET(QT4_QTXML_LIBRARY "-F${QT4_LIBRARY_DIR} -framework QtXml" CACHE STRING "The QtXml library.")
+- ELSE(EXISTS ${QT4_LIBRARY_DIR}/QtXml.framework)
+- SET(QT4_QTXML_FOUND FALSE)
+- ENDIF(EXISTS ${QT4_LIBRARY_DIR}/QtXml.framework)
+-
+- IF(EXISTS ${QT4_LIBRARY_DIR}/QtSvg.framework)
+- SET(QT4_QTSVG_FOUND TRUE)
+- SET(QT4_QTSVG_LIBRARY "-F${QT4_LIBRARY_DIR} -framework QtSvg" CACHE STRING "The QtSvg library.")
+- ELSE(EXISTS ${QT4_LIBRARY_DIR}/QtSvg.framework)
+- SET(QT4_QTSVG_FOUND FALSE)
+- ENDIF(EXISTS ${QT4_LIBRARY_DIR}/QtSvg.framework)
+-
+- IF(EXISTS ${QT4_LIBRARY_DIR}/QtDBus.framework)
+- SET(QT4_QTDBUS_FOUND TRUE)
+- SET(QT4_QTDBUS_LIBRARY "-F${QT4_LIBRARY_DIR} -framework QtDBus" CACHE STRING "The QtDBus library.")
+- ELSE(EXISTS ${QT4_LIBRARY_DIR}/QtDBus.framework)
+- SET(QT4_QTDBUS_FOUND FALSE)
+- ENDIF(EXISTS ${QT4_LIBRARY_DIR}/QtDBus.framework)
+-
+- IF(EXISTS ${QT4_LIBRARY_DIR}/QtTest.framework)
+- SET(QT4_QTTEST_FOUND TRUE)
+- SET(QT4_QTTEST_LIBRARY "-F${QT4_LIBRARY_DIR} -framework QtTest" CACHE STRING "The QtTest library.")
+- ELSE(EXISTS ${QT4_LIBRARY_DIR}/QtTest.framework)
+- SET(QT4_QTTEST_FOUND FALSE)
+- ENDIF(EXISTS ${QT4_LIBRARY_DIR}/QtTest.framework)
+-
+- # WTF? why don't we have frameworks? :P
+- # Set QT4_QTUITOOLS_LIBRARY
+- FIND_LIBRARY(QT4_QTUITOOLS_LIBRARY NAMES QtUiTools QtUiTools4 PATHS ${QT4_LIBRARY_DIR} )
+- # Set QT4_QTSCRIPT_LIBRARY
+- FIND_LIBRARY(QT4_QTSCRIPT_LIBRARY NAMES QtScript QtScript4 PATHS ${QT4_LIBRARY_DIR} )
+-
+- ELSE (QT_USE_FRAMEWORKS)
+-
+- # Set QT4_QTCORE_LIBRARY by searching for a lib with "QtCore." as part of the filename
+- FIND_LIBRARY(QT4_QTCORE_LIBRARY NAMES QtCore QtCore4 QtCored4 PATHS ${QT4_LIBRARY_DIR} NO_DEFAULT_PATH )
+-
+- # Set QT4_QT3SUPPORT_LIBRARY
+- FIND_LIBRARY(QT4_QT3SUPPORT_LIBRARY NAMES Qt3Support Qt3Support4 Qt3Supportd4 PATHS ${QT4_LIBRARY_DIR} NO_DEFAULT_PATH)
+-
+- # Set QT4_QTGUI_LIBRARY
+- FIND_LIBRARY(QT4_QTGUI_LIBRARY NAMES QtGui QtGui4 QtGuid4 PATHS ${QT4_LIBRARY_DIR} NO_DEFAULT_PATH)
+-
+- # Set QT4_QTMOTIF_LIBRARY
+- IF(Q_WS_X11)
+- FIND_LIBRARY(QT4_QTMOTIF_LIBRARY NAMES QtMotif PATHS ${QT4_LIBRARY_DIR} NO_DEFAULT_PATH)
+- ENDIF(Q_WS_X11)
+-
+- # Set QT4_QTNETWORK_LIBRARY
+- FIND_LIBRARY(QT4_QTNETWORK_LIBRARY NAMES QtNetwork QtNetwork4 QtNetworkd4 PATHS ${QT4_LIBRARY_DIR} NO_DEFAULT_PATH)
+-
+- # Set QT4_QTNSPLUGIN_LIBRARY
+- FIND_LIBRARY(QT4_QTNSPLUGIN_LIBRARY NAMES QtNsPlugin PATHS ${QT4_LIBRARY_DIR} NO_DEFAULT_PATH)
+-
+- # Set QT4_QTOPENGL_LIBRARY
+- FIND_LIBRARY(QT4_QTOPENGL_LIBRARY NAMES QtOpenGL QtOpenGL4 QtOpenGLd4 PATHS ${QT4_LIBRARY_DIR} NO_DEFAULT_PATH)
+-
+- # Set QT4_QTSQL_LIBRARY
+- FIND_LIBRARY(QT4_QTSQL_LIBRARY NAMES QtSql QtSql4 QtSqld4 PATHS ${QT4_LIBRARY_DIR} NO_DEFAULT_PATH)
+-
+- # Set QT4_QTXML_LIBRARY
+- FIND_LIBRARY(QT4_QTXML_LIBRARY NAMES QtXml QtXml4 QtXmld4 PATHS ${QT4_LIBRARY_DIR} NO_DEFAULT_PATH)
+-
+- # Set QT4_QTSVG_LIBRARY
+- FIND_LIBRARY(QT4_QTSVG_LIBRARY NAMES QtSvg QtSvg4 QtSvgd4 PATHS ${QT4_LIBRARY_DIR} NO_DEFAULT_PATH)
+-
+- # Set QT4_QTSCRIPT_LIBRARY
+- FIND_LIBRARY(QT4_QTSCRIPT_LIBRARY NAMES QtScript QtScript4 QtScriptd4 PATHS ${QT4_LIBRARY_DIR} NO_DEFAULT_PATH)
+-
+- # Set QT4_QTUITOOLS_LIBRARY
+- FIND_LIBRARY(QT4_QTUITOOLS_LIBRARY NAMES QtUiTools QtUiTools4 QtUiToolsd4 PATHS ${QT4_LIBRARY_DIR} NO_DEFAULT_PATH)
+-
+- # Set QT4_QTTEST_LIBRARY
+- FIND_LIBRARY(QT4_QTTEST_LIBRARY NAMES QtTest QtTest4 QtTestd4 PATHS ${QT4_LIBRARY_DIR} NO_DEFAULT_PATH)
+-
+- FIND_LIBRARY(QT4_QTDBUS_LIBRARY NAMES QtDBus QtDBus4 QtDBusd4 PATHS ${QT4_LIBRARY_DIR} NO_DEFAULT_PATH)
+-
+- IF(MSVC)
+- FIND_LIBRARY(QT4_QTCORE_LIBRARY_RELEASE NAMES QtCore4 PATHS ${QT4_LIBRARY_DIR} NO_DEFAULT_PATH)
+- FIND_LIBRARY(QT4_QTCORE_LIBRARY_DEBUG NAMES QtCored4 PATHS ${QT4_LIBRARY_DIR} NO_DEFAULT_PATH)
+- FIND_LIBRARY(QT4_QT3SUPPORT_LIBRARY_RELEASE NAMES Qt3Support4 PATHS ${QT4_LIBRARY_DIR} NO_DEFAULT_PATH)
+- FIND_LIBRARY(QT4_QT3SUPPORT_LIBRARY_DEBUG NAMES Qt3Supportd4 PATHS ${QT4_LIBRARY_DIR} NO_DEFAULT_PATH)
+- FIND_LIBRARY(QT4_QTGUI_LIBRARY_RELEASE NAMES QtGui4 PATHS ${QT4_LIBRARY_DIR} NO_DEFAULT_PATH)
+- FIND_LIBRARY(QT4_QTGUI_LIBRARY_DEBUG NAMES QtGuid4 PATHS ${QT4_LIBRARY_DIR} NO_DEFAULT_PATH)
+- FIND_LIBRARY(QT4_QTNETWORK_LIBRARY_RELEASE NAMES QtNetwork4 PATHS ${QT4_LIBRARY_DIR} NO_DEFAULT_PATH)
+- FIND_LIBRARY(QT4_QTNETWORK_LIBRARY_DEBUG NAMES QtNetworkd4 PATHS ${QT4_LIBRARY_DIR} NO_DEFAULT_PATH)
+- FIND_LIBRARY(QT4_QTOPENGL_LIBRARY_RELEASE NAMES QtOpenGL4 PATHS ${QT4_LIBRARY_DIR} NO_DEFAULT_PATH)
+- FIND_LIBRARY(QT4_QTOPENGL_LIBRARY_DEBUG NAMES QtOpenGLd4 PATHS ${QT4_LIBRARY_DIR} NO_DEFAULT_PATH)
+- FIND_LIBRARY(QT4_QTSQL_LIBRARY_RELEASE NAMES QtSql4 PATHS ${QT4_LIBRARY_DIR} NO_DEFAULT_PATH)
+- FIND_LIBRARY(QT4_QTSQL_LIBRARY_DEBUG NAMES QtSqld4 PATHS ${QT4_LIBRARY_DIR} NO_DEFAULT_PATH)
+- FIND_LIBRARY(QT4_QTXML_LIBRARY_RELEASE NAMES QtXml4 PATHS ${QT4_LIBRARY_DIR} NO_DEFAULT_PATH)
+- FIND_LIBRARY(QT4_QTXML_LIBRARY_DEBUG NAMES QtXmld4 PATHS ${QT4_LIBRARY_DIR} NO_DEFAULT_PATH)
+- FIND_LIBRARY(QT4_QTSVG_LIBRARY_RELEASE NAMES QtSvg4 PATHS ${QT4_LIBRARY_DIR} NO_DEFAULT_PATH)
+- FIND_LIBRARY(QT4_QTSVG_LIBRARY_DEBUG NAMES QtSvgd4 PATHS ${QT4_LIBRARY_DIR} NO_DEFAULT_PATH)
+- FIND_LIBRARY(QT4_QTSCRIPT_LIBRARY_RELEASE NAMES QtScript4 PATHS ${QT4_LIBRARY_DIR} NO_DEFAULT_PATH)
+- FIND_LIBRARY(QT4_QTSCRIPT_LIBRARY_DEBUG NAMES QtScriptd4 PATHS ${QT4_LIBRARY_DIR} NO_DEFAULT_PATH)
+- FIND_LIBRARY(QT4_QTUITOOLS_LIBRARY_RELEASE NAMES QtUiTools QtUiTools4 PATHS ${QT4_LIBRARY_DIR} NO_DEFAULT_PATH)
+- FIND_LIBRARY(QT4_QTUITOOLS_LIBRARY_DEBUG NAMES QtUiToolsd QtUiToolsd4 PATHS ${QT4_LIBRARY_DIR} NO_DEFAULT_PATH)
+- FIND_LIBRARY(QT4_QTTEST_LIBRARY_RELEASE NAMES QtTest4 PATHS ${QT4_LIBRARY_DIR} NO_DEFAULT_PATH)
+- FIND_LIBRARY(QT4_QTTEST_LIBRARY_DEBUG NAMES QtTestd4 PATHS ${QT4_LIBRARY_DIR} NO_DEFAULT_PATH)
+- FIND_LIBRARY(QT4_QTDBUS_LIBRARY_RELEASE NAMES QtDBus4 PATHS ${QT4_LIBRARY_DIR} NO_DEFAULT_PATH)
+- FIND_LIBRARY(QT4_QTDBUS_LIBRARY_DEBUG NAMES QtDBusd4 PATHS ${QT4_LIBRARY_DIR} NO_DEFAULT_PATH)
+- FIND_LIBRARY(QT4_QTASSISTANT_LIBRARY_RELEASE NAMES QtAssistantClient4 PATHS ${QT4_LIBRARY_DIR} NO_DEFAULT_PATH)
+- FIND_LIBRARY(QT4_QTASSISTANT_LIBRARY_DEBUG NAMES QtAssistantClientd4 PATHS ${QT4_LIBRARY_DIR} NO_DEFAULT_PATH)
+- FIND_LIBRARY(QT4_QTDESIGNER_LIBRARY_RELEASE NAMES QtDesigner4 PATHS ${QT4_LIBRARY_DIR} NO_DEFAULT_PATH)
+- FIND_LIBRARY(QT4_QTDESIGNER_LIBRARY_DEBUG NAMES QtDesignerd4 PATHS ${QT4_LIBRARY_DIR} NO_DEFAULT_PATH)
+- FIND_LIBRARY(QT4_QTDESIGNERCOMPONENTS_LIBRARY_RELEASE NAMES QtDesignerComponents4 PATHS ${QT4_LIBRARY_DIR} NO_DEFAULT_PATH)
+- FIND_LIBRARY(QT4_QTDESIGNERCOMPONENTS_LIBRARY_DEBUG NAMES QtDesignerComponentsd4 PATHS ${QT4_LIBRARY_DIR} NO_DEFAULT_PATH)
+- FIND_LIBRARY(QT4_QTMAIN_LIBRARY_RELEASE NAMES qtmain PATHS ${QT4_LIBRARY_DIR} NO_DEFAULT_PATH)
+- FIND_LIBRARY(QT4_QTMAIN_LIBRARY_DEBUG NAMES qtmaind PATHS ${QT4_LIBRARY_DIR} NO_DEFAULT_PATH)
+- ENDIF(MSVC)
+- ENDIF (QT_USE_FRAMEWORKS)
+-
+- IF( NOT QT4_QTCORE_LIBRARY )
+- IF( NOT Qt4_FIND_QUIETLY AND Qt4_FIND_REQUIRED)
+- MESSAGE( FATAL_ERROR "Could NOT find QtCore. Check ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log for more details.")
+- ENDIF( NOT Qt4_FIND_QUIETLY AND Qt4_FIND_REQUIRED)
+- ENDIF( NOT QT4_QTCORE_LIBRARY )
+-
+- # Set QT4_QTASSISTANT_LIBRARY
+- FIND_LIBRARY(QT4_QTASSISTANT_LIBRARY NAMES QtAssistantClient QtAssistantClient4 QtAssistant QtAssistant4 QtAssistantd4 PATHS ${QT4_LIBRARY_DIR} NO_DEFAULT_PATH)
+-
+- # Set QT4_QTDESIGNER_LIBRARY
+- FIND_LIBRARY(QT4_QTDESIGNER_LIBRARY NAMES QtDesigner QtDesigner4 QtDesignerd4 PATHS ${QT4_LIBRARY_DIR} NO_DEFAULT_PATH)
+-
+- # Set QT4_QTDESIGNERCOMPONENTS_LIBRARY
+- FIND_LIBRARY(QT4_QTDESIGNERCOMPONENTS_LIBRARY NAMES QtDesignerComponents QtDesignerComponents4 QtDesignerComponentsd4 PATHS ${QT4_LIBRARY_DIR} NO_DEFAULT_PATH)
+-
+- # Set QT4_QTMAIN_LIBRARY
+- IF(WIN32)
+- FIND_LIBRARY(QT4_QTMAIN_LIBRARY NAMES qtmain qtmaind PATHS ${QT4_LIBRARY_DIR} NO_DEFAULT_PATH)
+- ENDIF(WIN32)
+-
+- ############################################
+- #
+- # Check the existence of the libraries.
+- #
+- ############################################
+-
+- MACRO (_QT4_ADJUST_LIB_VARS basename)
+- IF (QT4_${basename}_LIBRARY OR QT4_${basename}_LIBRARY_DEBUG)
+-
+- IF(MSVC)
+- # Both set
+- IF (QT4_${basename}_LIBRARY_RELEASE AND QT4_${basename}_LIBRARY_DEBUG)
+- SET(QT4_${basename}_LIBRARY optimized ${QT4_${basename}_LIBRARY_RELEASE} debug ${QT4_${basename}_LIBRARY_DEBUG})
+- ENDIF (QT4_${basename}_LIBRARY_RELEASE AND QT4_${basename}_LIBRARY_DEBUG)
+-
+- # Only debug was found
+- IF (NOT QT4_${basename}_LIBRARY_RELEASE AND QT4_${basename}_LIBRARY_DEBUG)
+- SET(QT4_${basename}_LIBRARY ${QT4_${basename}_LIBRARY_DEBUG})
+- ENDIF (NOT QT4_${basename}_LIBRARY_RELEASE AND QT4_${basename}_LIBRARY_DEBUG)
+-
+- # Only release was found
+- IF (QT4_${basename}_LIBRARY_RELEASE AND NOT QT4_${basename}_LIBRARY_DEBUG)
+- SET(QT4_${basename}_LIBRARY ${QT4_${basename}_LIBRARY_RELEASE})
+- ENDIF (QT4_${basename}_LIBRARY_RELEASE AND NOT QT4_${basename}_LIBRARY_DEBUG)
+-
+- # Hmm, is this used anywhere ? Yes, in UseQt4.cmake. We are currently incompatible :-(
+- SET(QT4_${basename}_LIBRARIES optimized ${QT4_${basename}_LIBRARY} debug ${QT4_${basename}_LIBRARY_DEBUG})
+-
+- ENDIF(MSVC)
+-
+- SET(QT4_${basename}_LIBRARY ${QT4_${basename}_LIBRARY} CACHE FILEPATH "The Qt4 ${basename} library")
+-
+- IF (QT4_${basename}_LIBRARY)
+- SET(QT4_${basename}_FOUND 1)
+- ENDIF (QT4_${basename}_LIBRARY)
+-
+- ENDIF (QT4_${basename}_LIBRARY OR QT4_${basename}_LIBRARY_DEBUG)
+-
+- IF (QT4_${basename}_INCLUDE_DIR)
+- #add the include directory to QT4_INCLUDES
+- SET(QT4_INCLUDES "${QT4_${basename}_INCLUDE_DIR}" ${QT4_INCLUDES})
+- ENDIF (QT4_${basename}_INCLUDE_DIR)
+-
+- # Make variables changeble to the advanced user
+- MARK_AS_ADVANCED(QT4_${basename}_LIBRARY QT4_${basename}_INCLUDE_DIR)
+- ENDMACRO (_QT4_ADJUST_LIB_VARS)
+-
+-
+- # Set QT_xyz_LIBRARY variable and add
+- # library include path to QT4_INCLUDES
+- _QT4_ADJUST_LIB_VARS(QTCORE)
+- _QT4_ADJUST_LIB_VARS(QTGUI)
+- _QT4_ADJUST_LIB_VARS(QT3SUPPORT)
+- _QT4_ADJUST_LIB_VARS(QTASSISTANT)
+- _QT4_ADJUST_LIB_VARS(QTDESIGNER)
+- _QT4_ADJUST_LIB_VARS(QTDESIGNERCOMPONENTS)
+- _QT4_ADJUST_LIB_VARS(QTNETWORK)
+- _QT4_ADJUST_LIB_VARS(QTNSPLUGIN)
+- _QT4_ADJUST_LIB_VARS(QTOPENGL)
+- _QT4_ADJUST_LIB_VARS(QTSQL)
+- _QT4_ADJUST_LIB_VARS(QTXML)
+- _QT4_ADJUST_LIB_VARS(QTSVG)
+- _QT4_ADJUST_LIB_VARS(QTSCRIPT)
+- _QT4_ADJUST_LIB_VARS(QTUITOOLS)
+- _QT4_ADJUST_LIB_VARS(QTTEST)
+- _QT4_ADJUST_LIB_VARS(QTDBUS)
+-
+- # platform dependent libraries
+- IF(Q_WS_X11)
+- _QT4_ADJUST_LIB_VARS(QTMOTIF)
+- ENDIF(Q_WS_X11)
+- IF(WIN32)
+- _QT4_ADJUST_LIB_VARS(QTMAIN)
+- ENDIF(WIN32)
+-
+-
+- #######################################
+- #
+- # Check the executables of Qt
+- # ( moc, uic, rcc )
+- #
+- #######################################
+-
+-
+- # find moc and uic using qmake
+- QT_QUERY_QMAKE(QT4_MOC_EXECUTABLE_INTERNAL "QMAKE_MOC")
+- QT_QUERY_QMAKE(QT4_UIC_EXECUTABLE_INTERNAL "QMAKE_UIC")
+-
+- FILE(TO_CMAKE_PATH
+- "${QT4_MOC_EXECUTABLE_INTERNAL}" QT4_MOC_EXECUTABLE_INTERNAL)
+- FILE(TO_CMAKE_PATH
+- "${QT4_UIC_EXECUTABLE_INTERNAL}" QT4_UIC_EXECUTABLE_INTERNAL)
+-
+- SET(QT4_MOC_EXECUTABLE
+- ${QT4_MOC_EXECUTABLE_INTERNAL} CACHE FILEPATH "The moc executable")
+- SET(QT4_UIC_EXECUTABLE
+- ${QT4_UIC_EXECUTABLE_INTERNAL} CACHE FILEPATH "The uic executable")
+-
+- FIND_PROGRAM(QT_UIC3_EXECUTABLE
+- NAMES uic3
+- PATHS ${QT_BINARY_DIR}
+- NO_DEFAULT_PATH
+- )
+-
+- FIND_PROGRAM(QT_RCC_EXECUTABLE
+- NAMES rcc
+- PATHS ${QT_BINARY_DIR}
+- NO_DEFAULT_PATH
+- )
+-
+- FIND_PROGRAM(QT_DBUSCPP2XML_EXECUTABLE
+- NAMES qdbuscpp2xml
+- PATHS ${QT_BINARY_DIR}
+- NO_DEFAULT_PATH
+- )
+-
+- FIND_PROGRAM(QT_DBUSXML2CPP_EXECUTABLE
+- NAMES qdbusxml2cpp
+- PATHS ${QT_BINARY_DIR}
+- NO_DEFAULT_PATH
+- )
+-
+- IF (QT4_MOC_EXECUTABLE)
+- SET(QT_WRAP_CPP "YES")
+- ENDIF (QT4_MOC_EXECUTABLE)
+-
+- IF (QT4_UIC_EXECUTABLE)
+- SET(QT_WRAP_UI "YES")
+- ENDIF (QT4_UIC_EXECUTABLE)
+-
+-
+-
+- MARK_AS_ADVANCED( QT4_UIC_EXECUTABLE QT_UIC3_EXECUTABLE QT4_MOC_EXECUTABLE QT_RCC_EXECUTABLE QT_DBUSXML2CPP_EXECUTABLE QT_DBUSCPP2XML_EXECUTABLE)
+-
+- ######################################
+- #
+- # Macros for building Qt files
+- #
+- ######################################
+- MACRO (QT4_EXTRACT_OPTIONS _qt4_files _qt4_options)
+- SET(${_qt4_files})
+- SET(${_qt4_options})
+- SET(_QT4_DOING_OPTIONS FALSE)
+- FOREACH(_currentArg ${ARGN})
+- IF ("${_currentArg}" STREQUAL "OPTIONS")
+- SET(_QT4_DOING_OPTIONS TRUE)
+- ELSE ("${_currentArg}" STREQUAL "OPTIONS")
+- IF(_QT4_DOING_OPTIONS)
+- LIST(APPEND ${_qt4_options} "${_currentArg}")
+- ELSE(_QT4_DOING_OPTIONS)
+- LIST(APPEND ${_qt4_files} "${_currentArg}")
+- ENDIF(_QT4_DOING_OPTIONS)
+- ENDIF ("${_currentArg}" STREQUAL "OPTIONS")
+- ENDFOREACH(_currentArg)
+- ENDMACRO (QT4_EXTRACT_OPTIONS)
+-
+- MACRO (QT4_GET_MOC_INC_DIRS _moc_INC_DIRS)
+- SET(${_moc_INC_DIRS})
+- GET_DIRECTORY_PROPERTY(_inc_DIRS INCLUDE_DIRECTORIES)
+-
+- FOREACH(_current ${_inc_DIRS})
+- SET(${_moc_INC_DIRS} ${${_moc_INC_DIRS}} "-I" ${_current})
+- ENDFOREACH(_current ${_inc_DIRS})
+-
+- ENDMACRO(QT4_GET_MOC_INC_DIRS)
+-
+-
+- MACRO (QT4_GENERATE_MOC infile outfile )
+- # get include dirs
+- QT4_GET_MOC_INC_DIRS(moc_includes)
+-
+- GET_FILENAME_COMPONENT(abs_infile ${infile} ABSOLUTE)
+-
+- IF (MSVC_IDE)
+- SET (_moc_parameter_file ${outfile}_parameters)
+- SET (_moc_param "${moc_includes} \n-o${outfile} \n${abs_infile}")
+- STRING(REGEX REPLACE ";-I;" "\\n-I" _moc_param "${_moc_param}")
+- FILE (WRITE ${_moc_parameter_file} "${_moc_param}")
+- ADD_CUSTOM_COMMAND(OUTPUT ${outfile}
+- COMMAND ${QT4_MOC_EXECUTABLE}
+- ARGS @"${_moc_parameter_file}"
+- DEPENDS ${abs_infile})
+- ELSE (MSVC_IDE)
+- ADD_CUSTOM_COMMAND(OUTPUT ${outfile}
+- COMMAND ${QT4_MOC_EXECUTABLE}
+- ARGS ${moc_includes} -o ${outfile} ${abs_infile}
+- DEPENDS ${abs_infile})
+- ENDIF (MSVC_IDE)
+-
+- SET_SOURCE_FILES_PROPERTIES(${outfile} PROPERTIES SKIP_AUTOMOC TRUE) # dont run automoc on this file
+-
+- MACRO_ADD_FILE_DEPENDENCIES(${abs_infile} ${outfile})
+- ENDMACRO (QT4_GENERATE_MOC)
+-
+-
+- # QT4_WRAP_CPP(outfiles inputfile ... )
+- # TODO perhaps add support for -D, -U and other minor options
+-
+- MACRO (QT4_WRAP_CPP outfiles )
+- # get include dirs
+- QT4_GET_MOC_INC_DIRS(moc_includes)
+- QT4_EXTRACT_OPTIONS(moc_files moc_options ${ARGN})
+-
+- FOREACH (it ${moc_files})
+- GET_FILENAME_COMPONENT(it ${it} ABSOLUTE)
+- GET_FILENAME_COMPONENT(outfile ${it} NAME_WE)
+-
+- SET(outfile ${CMAKE_CURRENT_BINARY_DIR}/moc_${outfile}.cxx)
+- ADD_CUSTOM_COMMAND(OUTPUT ${outfile}
+- COMMAND ${QT4_MOC_EXECUTABLE}
+- ARGS ${moc_includes} ${moc_options} -o ${outfile} ${it}
+- DEPENDS ${it})
+- SET(${outfiles} ${${outfiles}} ${outfile})
+- ENDFOREACH(it)
+-
+- ENDMACRO (QT4_WRAP_CPP)
+-
+-
+- # QT4_WRAP_UI(outfiles inputfile ... )
+-
+- MACRO (QT4_WRAP_UI outfiles )
+- QT4_EXTRACT_OPTIONS(ui_files ui_options ${ARGN})
+-
+- FOREACH (it ${ui_files})
+- GET_FILENAME_COMPONENT(outfile ${it} NAME_WE)
+- GET_FILENAME_COMPONENT(infile ${it} ABSOLUTE)
+- SET(outfile ${CMAKE_CURRENT_BINARY_DIR}/ui_${outfile}.h)
+- ADD_CUSTOM_COMMAND(OUTPUT ${outfile}
+- COMMAND ${QT4_UIC_EXECUTABLE}
+- ARGS ${ui_options} -o ${outfile} ${infile}
+- MAIN_DEPENDENCY ${infile})
+- SET(${outfiles} ${${outfiles}} ${outfile})
+- ENDFOREACH (it)
+-
+- ENDMACRO (QT4_WRAP_UI)
+-
+-
+- # QT4_ADD_RESOURCES(outfiles inputfile ... )
+- # TODO perhaps consider adding support for compression and root options to rcc
+-
+- MACRO (QT4_ADD_RESOURCES outfiles )
+- QT4_EXTRACT_OPTIONS(rcc_files rcc_options ${ARGN})
+-
+- FOREACH (it ${rcc_files})
+- GET_FILENAME_COMPONENT(outfilename ${it} NAME_WE)
+- GET_FILENAME_COMPONENT(infile ${it} ABSOLUTE)
+- GET_FILENAME_COMPONENT(rc_path ${infile} PATH)
+- SET(outfile ${CMAKE_CURRENT_BINARY_DIR}/qrc_${outfilename}.cxx)
+- # parse file for dependencies
+- # all files are absolute paths or relative to the location of the qrc file
+- FILE(READ "${infile}" _RC_FILE_CONTENTS)
+- STRING(REGEX MATCHALL "<file[^<]+" _RC_FILES "${_RC_FILE_CONTENTS}")
+- SET(_RC_DEPENDS)
+- FOREACH(_RC_FILE ${_RC_FILES})
+- STRING(REGEX REPLACE "^<file[^>]*>" "" _RC_FILE "${_RC_FILE}")
+- STRING(REGEX MATCH "^/|([A-Za-z]:/)" _ABS_PATH_INDICATOR "${_RC_FILE}")
+- IF(NOT _ABS_PATH_INDICATOR)
+- SET(_RC_FILE "${rc_path}/${_RC_FILE}")
+- ENDIF(NOT _ABS_PATH_INDICATOR)
+- SET(_RC_DEPENDS ${_RC_DEPENDS} "${_RC_FILE}")
+- ENDFOREACH(_RC_FILE)
+- ADD_CUSTOM_COMMAND(OUTPUT ${outfile}
+- COMMAND ${QT_RCC_EXECUTABLE}
+- ARGS ${rcc_options} -name ${outfilename} -o ${outfile} ${infile}
+- MAIN_DEPENDENCY ${infile}
+- DEPENDS ${_RC_DEPENDS})
+- SET(${outfiles} ${${outfiles}} ${outfile})
+- ENDFOREACH (it)
+-
+- ENDMACRO (QT4_ADD_RESOURCES)
+-
+- MACRO(QT4_ADD_DBUS_INTERFACE _sources _interface _basename)
+- GET_FILENAME_COMPONENT(_infile ${_interface} ABSOLUTE)
+- SET(_header ${CMAKE_CURRENT_BINARY_DIR}/${_basename}.h)
+- SET(_impl ${CMAKE_CURRENT_BINARY_DIR}/${_basename}.cpp)
+- SET(_moc ${CMAKE_CURRENT_BINARY_DIR}/${_basename}.moc)
+-
+- GET_SOURCE_FILE_PROPERTY(_nonamespace ${_interface} NO_NAMESPACE)
+- IF ( _nonamespace )
+- SET(_params -N -m)
+- ELSE ( _nonamespace )
+- SET(_params -m)
+- ENDIF ( _nonamespace )
+-
+- GET_SOURCE_FILE_PROPERTY(_include ${_interface} INCLUDE)
+- IF ( _include )
+- SET(_params ${_params} -i ${_include})
+- ENDIF ( _include )
+-
+- ADD_CUSTOM_COMMAND(OUTPUT ${_impl} ${_header}
+- COMMAND ${QT_DBUSXML2CPP_EXECUTABLE} ${_params} -p ${_basename} ${_infile}
+- DEPENDS ${_infile})
+-
+- SET_SOURCE_FILES_PROPERTIES(${_impl} PROPERTIES SKIP_AUTOMOC TRUE)
+-
+- QT4_GENERATE_MOC(${_header} ${_moc})
+-
+- SET(${_sources} ${${_sources}} ${_impl} ${_header} ${_moc})
+- MACRO_ADD_FILE_DEPENDENCIES(${_impl} ${_moc})
+-
+- ENDMACRO(QT4_ADD_DBUS_INTERFACE)
+-
+-
+- MACRO(QT4_ADD_DBUS_INTERFACES _sources)
+- FOREACH (_current_FILE ${ARGN})
+- GET_FILENAME_COMPONENT(_infile ${_current_FILE} ABSOLUTE)
+- # get the part before the ".xml" suffix
+- STRING(REGEX REPLACE "(.*[/\\.])?([^\\.]+)\\.xml" "\\2" _basename ${_current_FILE})
+- STRING(TOLOWER ${_basename} _basename)
+- QT4_ADD_DBUS_INTERFACE(${_sources} ${_infile} ${_basename}interface)
+- ENDFOREACH (_current_FILE)
+- ENDMACRO(QT4_ADD_DBUS_INTERFACES)
+-
+-
+- MACRO(QT4_GENERATE_DBUS_INTERFACE _header) # _customName OPTIONS -some -options )
+- QT4_EXTRACT_OPTIONS(_customName _qt4_dbus_options ${ARGN})
+-
+- GET_FILENAME_COMPONENT(_in_file ${_header} ABSOLUTE)
+- GET_FILENAME_COMPONENT(_basename ${_header} NAME_WE)
+-
+- IF (_customName)
+- SET(_target ${CMAKE_CURRENT_BINARY_DIR}/${_customName})
+- ELSE (_customName)
+- SET(_target ${CMAKE_CURRENT_BINARY_DIR}/${_basename}.xml)
+- ENDIF (_customName)
+-
+- ADD_CUSTOM_COMMAND(OUTPUT ${_target}
+- COMMAND ${QT_DBUSCPP2XML_EXECUTABLE} ${_qt4_dbus_options} ${_in_file} > ${_target}
+- DEPENDS ${_in_file}
+- )
+- ENDMACRO(QT4_GENERATE_DBUS_INTERFACE)
+-
+-
+- MACRO(QT4_ADD_DBUS_ADAPTOR _sources _xml_file _include _parentClass) # _optionalBasename _optionalClassName)
+- GET_FILENAME_COMPONENT(_infile ${_xml_file} ABSOLUTE)
+-
+- SET(_optionalBasename "${ARGV4}")
+- IF (_optionalBasename)
+- SET(_basename ${_optionalBasename} )
+- ELSE (_optionalBasename)
+- STRING(REGEX REPLACE "(.*[/\\.])?([^\\.]+)\\.xml" "\\2adaptor" _basename ${_infile})
+- STRING(TOLOWER ${_basename} _basename)
+- ENDIF (_optionalBasename)
+-
+- SET(_optionalClassName "${ARGV5}")
+- SET(_header ${CMAKE_CURRENT_BINARY_DIR}/${_basename}.h)
+- SET(_impl ${CMAKE_CURRENT_BINARY_DIR}/${_basename}.cpp)
+- SET(_moc ${CMAKE_CURRENT_BINARY_DIR}/${_basename}.moc)
+-
+- IF(_optionalClassName)
+- ADD_CUSTOM_COMMAND(OUTPUT ${_impl} ${_header}
+- COMMAND ${QT_DBUSXML2CPP_EXECUTABLE} -m -a ${_basename} -c ${_optionalClassName} -i ${_include} -l ${_parentClass} ${_infile}
+- DEPENDS ${_infile}
+- )
+- ELSE(_optionalClassName)
+- ADD_CUSTOM_COMMAND(OUTPUT ${_impl} ${_header}
+- COMMAND ${QT_DBUSXML2CPP_EXECUTABLE} -m -a ${_basename} -i ${_include} -l ${_parentClass} ${_infile}
+- DEPENDS ${_infile}
+- )
+- ENDIF(_optionalClassName)
+-
+- QT4_GENERATE_MOC(${_header} ${_moc})
+- SET_SOURCE_FILES_PROPERTIES(${_impl} PROPERTIES SKIP_AUTOMOC TRUE)
+- MACRO_ADD_FILE_DEPENDENCIES(${_impl} ${_moc})
+-
+- SET(${_sources} ${${_sources}} ${_impl} ${_header} ${_moc})
+- ENDMACRO(QT4_ADD_DBUS_ADAPTOR)
+-
+- MACRO(QT4_AUTOMOC)
+- QT4_GET_MOC_INC_DIRS(_moc_INCS)
+-
+- SET(_matching_FILES )
+- FOREACH (_current_FILE ${ARGN})
+-
+- GET_FILENAME_COMPONENT(_abs_FILE ${_current_FILE} ABSOLUTE)
+- # if "SKIP_AUTOMOC" is set to true, we will not handle this file here.
+- # here. this is required to make bouic work correctly:
+- # we need to add generated .cpp files to the sources (to compile them),
+- # but we cannot let automoc handle them, as the .cpp files don't exist yet when
+- # cmake is run for the very first time on them -> however the .cpp files might
+- # exist at a later run. at that time we need to skip them, so that we don't add two
+- # different rules for the same moc file
+- GET_SOURCE_FILE_PROPERTY(_skip ${_abs_FILE} SKIP_AUTOMOC)
+-
+- IF ( NOT _skip AND EXISTS ${_abs_FILE} )
+-
+- FILE(READ ${_abs_FILE} _contents)
+-
+- GET_FILENAME_COMPONENT(_abs_PATH ${_abs_FILE} PATH)
+-
+- STRING(REGEX MATCHALL "#include +[^ ]+\\.moc[\">]" _match "${_contents}")
+- IF(_match)
+- FOREACH (_current_MOC_INC ${_match})
+- STRING(REGEX MATCH "[^ <\"]+\\.moc" _current_MOC "${_current_MOC_INC}")
+-
+- GET_filename_component(_basename ${_current_MOC} NAME_WE)
+- # SET(_header ${CMAKE_CURRENT_SOURCE_DIR}/${_basename}.h)
+- IF (EXISTS ${_abs_PATH}/${_basename}.h)
+- SET(_header ${_abs_PATH}/${_basename}.h)
+- ELSE (EXISTS ${_abs_PATH}/${_basename}.h)
+- SET(_header ${_abs_FILE})
+- ENDIF (EXISTS ${_abs_PATH}/${_basename}.h)
+- SET(_moc ${CMAKE_CURRENT_BINARY_DIR}/${_current_MOC})
+- ADD_CUSTOM_COMMAND(OUTPUT ${_moc}
+- COMMAND ${QT4_MOC_EXECUTABLE}
+- ARGS ${_moc_INCS} ${_header} -o ${_moc}
+- DEPENDS ${_header}
+- )
+-
+- MACRO_ADD_FILE_DEPENDENCIES(${_abs_FILE} ${_moc})
+- ENDFOREACH (_current_MOC_INC)
+- ENDIF(_match)
+- ENDIF ( NOT _skip AND EXISTS ${_abs_FILE} )
+- ENDFOREACH (_current_FILE)
+- ENDMACRO(QT4_AUTOMOC)
+-
+-
+-
+- ######################################
+- #
+- # decide if Qt got found
+- #
+- ######################################
+-
+- # if the includes,libraries,moc,uic and rcc are found then we have it
+- IF( QT4_LIBRARY_DIR AND QT4_INCLUDE_DIR AND QT4_MOC_EXECUTABLE AND QT4_UIC_EXECUTABLE AND QT_RCC_EXECUTABLE)
+- SET( QT4_FOUND "YES" )
+- IF( NOT Qt4_FIND_QUIETLY)
+- MESSAGE(STATUS "Found Qt-Version ${QTVERSION} (using ${QT_QMAKE_EXECUTABLE})")
+- ENDIF( NOT Qt4_FIND_QUIETLY)
+- ELSE( QT4_LIBRARY_DIR AND QT4_INCLUDE_DIR AND QT4_MOC_EXECUTABLE AND QT4_UIC_EXECUTABLE AND QT_RCC_EXECUTABLE)
+- SET( QT4_FOUND "NO")
+- SET(QT_QMAKE_EXECUTABLE "${QT_QMAKE_EXECUTABLE}-NOTFOUND" CACHE FILEPATH "Invalid qmake found" FORCE)
+- IF( Qt4_FIND_REQUIRED)
+- IF ( NOT QT4_LIBRARY_DIR )
+- MESSAGE(STATUS "Qt libraries NOT found!")
+- ENDIF(NOT QT4_LIBRARY_DIR )
+- IF ( NOT QT4_INCLUDE_DIR )
+- MESSAGE(STATUS "Qt includes NOT found!")
+- ENDIF( NOT QT4_INCLUDE_DIR )
+- IF ( NOT QT4_MOC_EXECUTABLE )
+- MESSAGE(STATUS "Qt's moc NOT found!")
+- ENDIF( NOT QT4_MOC_EXECUTABLE )
+- IF ( NOT QT4_UIC_EXECUTABLE )
+- MESSAGE(STATUS "Qt's uic NOT found!")
+- ENDIF( NOT QT4_UIC_EXECUTABLE )
+- IF ( NOT QT_RCC_EXECUTABLE )
+- MESSAGE(STATUS "Qt's rcc NOT found!")
+- ENDIF( NOT QT_RCC_EXECUTABLE )
+- MESSAGE( FATAL_ERROR "Qt libraries, includes, moc, uic or/and rcc NOT found!")
+- ENDIF( Qt4_FIND_REQUIRED)
+- ENDIF( QT4_LIBRARY_DIR AND QT4_INCLUDE_DIR AND QT4_MOC_EXECUTABLE AND QT4_UIC_EXECUTABLE AND QT_RCC_EXECUTABLE)
+- SET(QT_FOUND ${QT4_FOUND})
+-
+-
+- #######################################
+- #
+- # System dependent settings
+- #
+- #######################################
+- # for unix add X11 stuff
+- IF(UNIX)
+- # on OS X X11 may not be required
+- IF (Q_WS_X11)
+- FIND_PACKAGE(X11 REQUIRED)
+- ENDIF (Q_WS_X11)
+- FIND_PACKAGE(Threads)
+- SET(QT4_QTCORE_LIBRARY ${QT4_QTCORE_LIBRARY} ${CMAKE_THREAD_LIBS_INIT})
+- ENDIF(UNIX)
+-
+-
+- #######################################
+- #
+- # compatibility settings
+- #
+- #######################################
+- # Backwards compatibility for CMake1.4 and 1.2
+- SET (QT_MOC_EXE ${QT4_MOC_EXECUTABLE} )
+- SET (QT_UIC_EXE ${QT4_UIC_EXECUTABLE} )
+-
+- SET( QT4_QT_LIBRARY "")
+-
+-ELSE(QT4_QMAKE_FOUND)
+-
+- SET(QT_QMAKE_EXECUTABLE "${QT_QMAKE_EXECUTABLE}-NOTFOUND" CACHE FILEPATH "Invalid qmake found" FORCE)
+- IF(Qt4_FIND_REQUIRED)
+- IF(QT4_INSTALLED_VERSION_TOO_OLD)
+- MESSAGE(FATAL_ERROR "The installed Qt version ${QTVERSION} is too old, at least version ${QT4_MIN_VERSION} is required")
+- ELSE(QT4_INSTALLED_VERSION_TOO_OLD)
+- MESSAGE( FATAL_ERROR "Qt qmake not found!")
+- ENDIF(QT4_INSTALLED_VERSION_TOO_OLD)
+- ELSE(Qt4_FIND_REQUIRED)
+- IF(QT4_INSTALLED_VERSION_TOO_OLD AND NOT Qt4_FIND_QUIETLY)
+- MESSAGE(STATUS "The installed Qt version ${QTVERSION} is too old, at least version ${QT4_MIN_VERSION} is required")
+- ENDIF(QT4_INSTALLED_VERSION_TOO_OLD AND NOT Qt4_FIND_QUIETLY)
+- ENDIF(Qt4_FIND_REQUIRED)
+-
+-ENDIF (QT4_QMAKE_FOUND)
+-ENDIF (QT4_QMAKE_FOUND)
+-
+diff --git a/poppler-qt4.pc.cmake b/poppler-qt4.pc.cmake
+deleted file mode 100644
+index 46a37f6d..00000000
+--- a/poppler-qt4.pc.cmake
++++ /dev/null
+@@ -1,12 +0,0 @@
+-prefix=@CMAKE_INSTALL_PREFIX@
+-libdir=@CMAKE_INSTALL_FULL_LIBDIR@
+-includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@
+-
+-Name: poppler-qt4
+-Description: Qt4 bindings for poppler
+-Version: @POPPLER_VERSION@
+-Requires: @PC_REQUIRES@
+-@PC_REQUIRES_PRIVATE@
+-
+-Libs: -L${libdir} -lpoppler-qt4
+-Cflags: -I${includedir}/poppler/qt4
+diff --git a/qt4/.gitignore b/qt4/.gitignore
+deleted file mode 100644
+index 5540f35d..00000000
+--- a/qt4/.gitignore
++++ /dev/null
+@@ -1,4 +0,0 @@
+-Makefile
+-Makefile.in
+-*~
+-
+diff --git a/qt4/CMakeLists.txt b/qt4/CMakeLists.txt
+deleted file mode 100644
+index 4d345681..00000000
+--- a/qt4/CMakeLists.txt
++++ /dev/null
+@@ -1,6 +0,0 @@
+-# Qt4 headers are not override clean so disable suggest-override if it's there
+-string(REPLACE "-Wsuggest-override" " " CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS})
+-
+-add_subdirectory(src)
+-add_subdirectory(tests)
+-add_subdirectory(demos)
+diff --git a/qt4/demos/.gitignore b/qt4/demos/.gitignore
+deleted file mode 100644
+index 9639e685..00000000
+--- a/qt4/demos/.gitignore
++++ /dev/null
+@@ -1,4 +0,0 @@
+-.deps
+-.libs
+-*moc
+-poppler_qt4viewer
+diff --git a/qt4/demos/CMakeLists.txt b/qt4/demos/CMakeLists.txt
+deleted file mode 100644
+index 76accf81..00000000
+--- a/qt4/demos/CMakeLists.txt
++++ /dev/null
+@@ -1,28 +0,0 @@
+-add_definitions(${QT4_DEFINITIONS})
+-
+-include_directories(
+- ${CMAKE_CURRENT_SOURCE_DIR}
+- ${CMAKE_CURRENT_SOURCE_DIR}/../src
+- ${CMAKE_CURRENT_BINARY_DIR}
+- ${QT4_INCLUDE_DIR}
+-)
+-
+-set(poppler_qt4viewer_SRCS
+- abstractinfodock.cpp
+- documentobserver.cpp
+- embeddedfiles.cpp
+- fonts.cpp
+- info.cpp
+- main_viewer.cpp
+- metadata.cpp
+- navigationtoolbar.cpp
+- optcontent.cpp
+- pageview.cpp
+- permissions.cpp
+- thumbnails.cpp
+- toc.cpp
+- viewer.cpp
+-)
+-qt4_automoc(${poppler_qt4viewer_SRCS})
+-poppler_add_test(poppler_qt4viewer BUILD_QT4_TESTS ${poppler_qt4viewer_SRCS})
+-target_link_libraries(poppler_qt4viewer poppler-qt4)
+diff --git a/qt4/demos/abstractinfodock.cpp b/qt4/demos/abstractinfodock.cpp
+deleted file mode 100644
+index 7b306d82..00000000
+--- a/qt4/demos/abstractinfodock.cpp
++++ /dev/null
+@@ -1,57 +0,0 @@
+-/*
+- * Copyright (C) 2008, Pino Toscano <pino@kde.org>
+- *
+- * This program is free software; you can redistribute it and/or modify
+- * it under the terms of the GNU General Public License as published by
+- * the Free Software Foundation; either version 2, or (at your option)
+- * any later version.
+- *
+- * This program is distributed in the hope that it will be useful,
+- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+- * GNU General Public License for more details.
+- *
+- * You should have received a copy of the GNU General Public License
+- * along with this program; if not, write to the Free Software
+- * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+- */
+-
+-#include "fonts.h"
+-
+-AbstractInfoDock::AbstractInfoDock(QWidget *parent)
+- : QDockWidget(parent), m_filled(false)
+-{
+- connect(this, SIGNAL(visibilityChanged(bool)), SLOT(slotVisibilityChanged(bool)));
+-}
+-
+-AbstractInfoDock::~AbstractInfoDock()
+-{
+-}
+-
+-void AbstractInfoDock::documentLoaded()
+-{
+- if (!isHidden()) {
+- fillInfo();
+- m_filled = true;
+- }
+-}
+-
+-void AbstractInfoDock::documentClosed()
+-{
+- m_filled = false;
+-}
+-
+-void AbstractInfoDock::pageChanged(int page)
+-{
+- Q_UNUSED(page)
+-}
+-
+-void AbstractInfoDock::slotVisibilityChanged(bool visible)
+-{
+- if (visible && document() && !m_filled) {
+- fillInfo();
+- m_filled = true;
+- }
+-}
+-
+-#include "abstractinfodock.moc"
+diff --git a/qt4/demos/abstractinfodock.h b/qt4/demos/abstractinfodock.h
+deleted file mode 100644
+index 2593325a..00000000
+--- a/qt4/demos/abstractinfodock.h
++++ /dev/null
+@@ -1,48 +0,0 @@
+-/*
+- * Copyright (C) 2008, Pino Toscano <pino@kde.org>
+- *
+- * This program is free software; you can redistribute it and/or modify
+- * it under the terms of the GNU General Public License as published by
+- * the Free Software Foundation; either version 2, or (at your option)
+- * any later version.
+- *
+- * This program is distributed in the hope that it will be useful,
+- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+- * GNU General Public License for more details.
+- *
+- * You should have received a copy of the GNU General Public License
+- * along with this program; if not, write to the Free Software
+- * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+- */
+-
+-#ifndef ABSTRACTINFODOCK_H
+-#define ABSTRACTINFODOCK_H
+-
+-#include <QtGui/QDockWidget>
+-
+-#include "documentobserver.h"
+-
+-class AbstractInfoDock : public QDockWidget, public DocumentObserver
+-{
+- Q_OBJECT
+-
+-public:
+- AbstractInfoDock(QWidget *parent = 0);
+- ~AbstractInfoDock();
+-
+- /*virtual*/ void documentLoaded();
+- /*virtual*/ void documentClosed();
+- /*virtual*/ void pageChanged(int page);
+-
+-protected:
+- virtual void fillInfo() = 0;
+-
+-private Q_SLOTS:
+- void slotVisibilityChanged(bool visible);
+-
+-private:
+- bool m_filled;
+-};
+-
+-#endif
+diff --git a/qt4/demos/documentobserver.cpp b/qt4/demos/documentobserver.cpp
+deleted file mode 100644
+index e5c283db..00000000
+--- a/qt4/demos/documentobserver.cpp
++++ /dev/null
+@@ -1,50 +0,0 @@
+-/*
+- * Copyright (C) 2008, Pino Toscano <pino@kde.org>
+- *
+- * This program is free software; you can redistribute it and/or modify
+- * it under the terms of the GNU General Public License as published by
+- * the Free Software Foundation; either version 2, or (at your option)
+- * any later version.
+- *
+- * This program is distributed in the hope that it will be useful,
+- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+- * GNU General Public License for more details.
+- *
+- * You should have received a copy of the GNU General Public License
+- * along with this program; if not, write to the Free Software
+- * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+- */
+-
+-#include "documentobserver.h"
+-
+-#include "viewer.h"
+-
+-DocumentObserver::DocumentObserver()
+- : m_viewer(0)
+-{
+-}
+-
+-DocumentObserver::~DocumentObserver()
+-{
+-}
+-
+-Poppler::Document* DocumentObserver::document() const
+-{
+- return m_viewer->m_doc;
+-}
+-
+-void DocumentObserver::setPage(int page)
+-{
+- m_viewer->setPage(page);
+-}
+-
+-int DocumentObserver::page() const
+-{
+- return m_viewer->page();
+-}
+-
+-void DocumentObserver::reloadPage()
+-{
+- m_viewer->setPage(m_viewer->page());
+-}
+diff --git a/qt4/demos/documentobserver.h b/qt4/demos/documentobserver.h
+deleted file mode 100644
+index 38fe2043..00000000
+--- a/qt4/demos/documentobserver.h
++++ /dev/null
+@@ -1,50 +0,0 @@
+-/*
+- * Copyright (C) 2008, Pino Toscano <pino@kde.org>
+- *
+- * This program is free software; you can redistribute it and/or modify
+- * it under the terms of the GNU General Public License as published by
+- * the Free Software Foundation; either version 2, or (at your option)
+- * any later version.
+- *
+- * This program is distributed in the hope that it will be useful,
+- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+- * GNU General Public License for more details.
+- *
+- * You should have received a copy of the GNU General Public License
+- * along with this program; if not, write to the Free Software
+- * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+- */
+-
+-#ifndef DOCUMENTOBSERVER_H
+-#define DOCUMENTOBSERVER_H
+-
+-class PdfViewer;
+-namespace Poppler {
+-class Document;
+-}
+-
+-class DocumentObserver
+-{
+-friend class PdfViewer;
+-
+-public:
+- virtual ~DocumentObserver();
+-
+- virtual void documentLoaded() = 0;
+- virtual void documentClosed() = 0;
+- virtual void pageChanged(int page) = 0;
+-
+-protected:
+- DocumentObserver();
+-
+- Poppler::Document* document() const;
+- void setPage(int page);
+- int page() const;
+- void reloadPage();
+-
+-private:
+- PdfViewer *m_viewer;
+-};
+-
+-#endif
+diff --git a/qt4/demos/embeddedfiles.cpp b/qt4/demos/embeddedfiles.cpp
+deleted file mode 100644
+index 22f9da7a..00000000
+--- a/qt4/demos/embeddedfiles.cpp
++++ /dev/null
+@@ -1,82 +0,0 @@
+-/*
+- * Copyright (C) 2008, Pino Toscano <pino@kde.org>
+- *
+- * This program is free software; you can redistribute it and/or modify
+- * it under the terms of the GNU General Public License as published by
+- * the Free Software Foundation; either version 2, or (at your option)
+- * any later version.
+- *
+- * This program is distributed in the hope that it will be useful,
+- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+- * GNU General Public License for more details.
+- *
+- * You should have received a copy of the GNU General Public License
+- * along with this program; if not, write to the Free Software
+- * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+- */
+-
+-#include "embeddedfiles.h"
+-
+-#include <poppler-qt4.h>
+-
+-#include <QtGui/QTableWidget>
+-
+-EmbeddedFilesDock::EmbeddedFilesDock(QWidget *parent)
+- : AbstractInfoDock(parent)
+-{
+- m_table = new QTableWidget(this);
+- setWidget(m_table);
+- setWindowTitle(tr("Embedded files"));
+- m_table->setColumnCount(6);
+- m_table->setHorizontalHeaderLabels(
+- QStringList() << tr("Name") << tr("Description") << tr("Size") << tr("Creation date")
+- << tr("Modification date") << tr("Checksum"));
+- m_table->setHorizontalScrollMode(QAbstractItemView::ScrollPerPixel);
+-}
+-
+-EmbeddedFilesDock::~EmbeddedFilesDock()
+-{
+-}
+-
+-void EmbeddedFilesDock::fillInfo()
+-{
+- m_table->setHorizontalHeaderLabels(
+- QStringList() << tr("Name") << tr("Description") << tr("Size") << tr("Creation date")
+- << tr("Modification date") << tr("Checksum"));
+- if (!document()->hasEmbeddedFiles()) {
+- m_table->setItem(0, 0, new QTableWidgetItem(tr("No files")));
+- return;
+- }
+-
+- const QList<Poppler::EmbeddedFile*> files = document()->embeddedFiles();
+- m_table->setRowCount(files.count());
+- int i = 0;
+- Q_FOREACH(Poppler::EmbeddedFile *file, files) {
+- m_table->setItem(i, 0, new QTableWidgetItem(file->name()));
+- m_table->setItem(i, 1, new QTableWidgetItem(file->description()));
+- m_table->setItem(i, 2, new QTableWidgetItem(QString::number(file->size())));
+- m_table->setItem(i, 3, new QTableWidgetItem(file->createDate().toString(Qt::SystemLocaleDate)));
+- m_table->setItem(i, 4, new QTableWidgetItem(file->modDate().toString(Qt::SystemLocaleDate)));
+- const QByteArray checksum = file->checksum();
+- const QString checksumString = !checksum.isEmpty() ? QString::fromAscii(checksum.toHex()) : QString::fromLatin1("n/a");
+- m_table->setItem(i, 5, new QTableWidgetItem(checksumString));
+- ++i;
+- }
+-}
+-
+-void EmbeddedFilesDock::documentLoaded()
+-{
+- if ( document()->pageMode() == Poppler::Document::UseAttach ) {
+- show();
+- }
+-}
+-
+-void EmbeddedFilesDock::documentClosed()
+-{
+- m_table->clear();
+- m_table->setRowCount(0);
+- AbstractInfoDock::documentClosed();
+-}
+-
+-#include "embeddedfiles.moc"
+diff --git a/qt4/demos/embeddedfiles.h b/qt4/demos/embeddedfiles.h
+deleted file mode 100644
+index 7cd60397..00000000
+--- a/qt4/demos/embeddedfiles.h
++++ /dev/null
+@@ -1,44 +0,0 @@
+-/*
+- * Copyright (C) 2008, Pino Toscano <pino@kde.org>
+- *
+- * This program is free software; you can redistribute it and/or modify
+- * it under the terms of the GNU General Public License as published by
+- * the Free Software Foundation; either version 2, or (at your option)
+- * any later version.
+- *
+- * This program is distributed in the hope that it will be useful,
+- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+- * GNU General Public License for more details.
+- *
+- * You should have received a copy of the GNU General Public License
+- * along with this program; if not, write to the Free Software
+- * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+- */
+-
+-#ifndef ATTACHMENTS_H
+-#define ATTACHMENTS_H
+-
+-#include "abstractinfodock.h"
+-
+-class QTableWidget;
+-
+-class EmbeddedFilesDock : public AbstractInfoDock
+-{
+- Q_OBJECT
+-
+-public:
+- EmbeddedFilesDock(QWidget *parent = 0);
+- ~EmbeddedFilesDock();
+-
+- virtual void documentLoaded();
+- /*virtual*/ void documentClosed();
+-
+-protected:
+- /*virtual*/ void fillInfo();
+-
+-private:
+- QTableWidget *m_table;
+-};
+-
+-#endif
+diff --git a/qt4/demos/fonts.cpp b/qt4/demos/fonts.cpp
+deleted file mode 100644
+index bd342bd2..00000000
+--- a/qt4/demos/fonts.cpp
++++ /dev/null
+@@ -1,72 +0,0 @@
+-/*
+- * Copyright (C) 2008, Pino Toscano <pino@kde.org>
+- *
+- * This program is free software; you can redistribute it and/or modify
+- * it under the terms of the GNU General Public License as published by
+- * the Free Software Foundation; either version 2, or (at your option)
+- * any later version.
+- *
+- * This program is distributed in the hope that it will be useful,
+- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+- * GNU General Public License for more details.
+- *
+- * You should have received a copy of the GNU General Public License
+- * along with this program; if not, write to the Free Software
+- * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+- */
+-
+-#include "fonts.h"
+-
+-#include <poppler-qt4.h>
+-
+-#include <QtGui/QTableWidget>
+-
+-static QString yesNoStatement(bool value)
+-{
+- return value ? QString::fromLatin1("yes") : QString::fromLatin1("no");
+-}
+-
+-FontsDock::FontsDock(QWidget *parent)
+- : AbstractInfoDock(parent)
+-{
+- m_table = new QTableWidget(this);
+- setWidget(m_table);
+- setWindowTitle(tr("Fonts"));
+- m_table->setColumnCount(5);
+- m_table->setHorizontalHeaderLabels(QStringList() << tr("Name") << tr("Type") << tr("Embedded") << tr("Subset") << tr("File"));
+- m_table->setHorizontalScrollMode(QAbstractItemView::ScrollPerPixel);
+-}
+-
+-FontsDock::~FontsDock()
+-{
+-}
+-
+-void FontsDock::fillInfo()
+-{
+- const QList<Poppler::FontInfo> fonts = document()->fonts();
+- m_table->setHorizontalHeaderLabels(QStringList() << tr("Name") << tr("Type") << tr("Embedded") << tr("Subset") << tr("File"));
+- m_table->setRowCount(fonts.count());
+- int i = 0;
+- Q_FOREACH(const Poppler::FontInfo &font, fonts) {
+- if (font.name().isNull()) {
+- m_table->setItem(i, 0, new QTableWidgetItem(QString::fromLatin1("[none]")));
+- } else {
+- m_table->setItem(i, 0, new QTableWidgetItem(font.name()));
+- }
+- m_table->setItem(i, 1, new QTableWidgetItem(font.typeName()));
+- m_table->setItem(i, 2, new QTableWidgetItem(yesNoStatement(font.isEmbedded())));
+- m_table->setItem(i, 3, new QTableWidgetItem(yesNoStatement(font.isSubset())));
+- m_table->setItem(i, 4, new QTableWidgetItem(font.file()));
+- ++i;
+- }
+-}
+-
+-void FontsDock::documentClosed()
+-{
+- m_table->clear();
+- m_table->setRowCount(0);
+- AbstractInfoDock::documentClosed();
+-}
+-
+-#include "fonts.moc"
+diff --git a/qt4/demos/fonts.h b/qt4/demos/fonts.h
+deleted file mode 100644
+index 81afa579..00000000
+--- a/qt4/demos/fonts.h
++++ /dev/null
+@@ -1,43 +0,0 @@
+-/*
+- * Copyright (C) 2008, Pino Toscano <pino@kde.org>
+- *
+- * This program is free software; you can redistribute it and/or modify
+- * it under the terms of the GNU General Public License as published by
+- * the Free Software Foundation; either version 2, or (at your option)
+- * any later version.
+- *
+- * This program is distributed in the hope that it will be useful,
+- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+- * GNU General Public License for more details.
+- *
+- * You should have received a copy of the GNU General Public License
+- * along with this program; if not, write to the Free Software
+- * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+- */
+-
+-#ifndef FONTS_H
+-#define FONTS_H
+-
+-#include "abstractinfodock.h"
+-
+-class QTableWidget;
+-
+-class FontsDock : public AbstractInfoDock
+-{
+- Q_OBJECT
+-
+-public:
+- FontsDock(QWidget *parent = 0);
+- ~FontsDock();
+-
+- /*virtual*/ void documentClosed();
+-
+-protected:
+- /*virtual*/ void fillInfo();
+-
+-private:
+- QTableWidget *m_table;
+-};
+-
+-#endif
+diff --git a/qt4/demos/info.cpp b/qt4/demos/info.cpp
+deleted file mode 100644
+index 6491e0e4..00000000
+--- a/qt4/demos/info.cpp
++++ /dev/null
+@@ -1,72 +0,0 @@
+-/*
+- * Copyright (C) 2008, Pino Toscano <pino@kde.org>
+- *
+- * This program is free software; you can redistribute it and/or modify
+- * it under the terms of the GNU General Public License as published by
+- * the Free Software Foundation; either version 2, or (at your option)
+- * any later version.
+- *
+- * This program is distributed in the hope that it will be useful,
+- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+- * GNU General Public License for more details.
+- *
+- * You should have received a copy of the GNU General Public License
+- * along with this program; if not, write to the Free Software
+- * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+- */
+-
+-#include "info.h"
+-
+-#include <poppler-qt4.h>
+-
+-#include <QtGui/QTableWidget>
+-
+-InfoDock::InfoDock(QWidget *parent)
+- : AbstractInfoDock(parent)
+-{
+- m_table = new QTableWidget(this);
+- setWidget(m_table);
+- setWindowTitle(tr("Information"));
+- m_table->setColumnCount(2);
+- m_table->setHorizontalHeaderLabels(QStringList() << tr("Key") << tr("Value"));
+- m_table->setHorizontalScrollMode(QAbstractItemView::ScrollPerPixel);
+-}
+-
+-InfoDock::~InfoDock()
+-{
+-}
+-
+-void InfoDock::fillInfo()
+-{
+- QStringList keys = document()->infoKeys();
+- m_table->setHorizontalHeaderLabels(QStringList() << tr("Key") << tr("Value"));
+- m_table->setRowCount(keys.count());
+- QStringList dateKeys;
+- dateKeys << QString::fromLatin1("CreationDate");
+- dateKeys << QString::fromLatin1("ModDate");
+- int i = 0;
+- Q_FOREACH(const QString &date, dateKeys) {
+- const int id = keys.indexOf(date);
+- if (id != -1) {
+- m_table->setItem(i, 0, new QTableWidgetItem(date));
+- m_table->setItem(i, 1, new QTableWidgetItem(document()->date(date).toString(Qt::SystemLocaleDate)));
+- ++i;
+- keys.removeAt(id);
+- }
+- }
+- Q_FOREACH(const QString &key, keys) {
+- m_table->setItem(i, 0, new QTableWidgetItem(key));
+- m_table->setItem(i, 1, new QTableWidgetItem(document()->info(key)));
+- ++i;
+- }
+-}
+-
+-void InfoDock::documentClosed()
+-{
+- m_table->clear();
+- m_table->setRowCount(0);
+- AbstractInfoDock::documentClosed();
+-}
+-
+-#include "info.moc"
+diff --git a/qt4/demos/info.h b/qt4/demos/info.h
+deleted file mode 100644
+index d294b430..00000000
+--- a/qt4/demos/info.h
++++ /dev/null
+@@ -1,43 +0,0 @@
+-/*
+- * Copyright (C) 2008, Pino Toscano <pino@kde.org>
+- *
+- * This program is free software; you can redistribute it and/or modify
+- * it under the terms of the GNU General Public License as published by
+- * the Free Software Foundation; either version 2, or (at your option)
+- * any later version.
+- *
+- * This program is distributed in the hope that it will be useful,
+- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+- * GNU General Public License for more details.
+- *
+- * You should have received a copy of the GNU General Public License
+- * along with this program; if not, write to the Free Software
+- * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+- */
+-
+-#ifndef INFO_H
+-#define INFO_H
+-
+-#include "abstractinfodock.h"
+-
+-class QTableWidget;
+-
+-class InfoDock : public AbstractInfoDock
+-{
+- Q_OBJECT
+-
+-public:
+- InfoDock(QWidget *parent = 0);
+- ~InfoDock();
+-
+- /*virtual*/ void documentClosed();
+-
+-protected:
+- /*virtual*/ void fillInfo();
+-
+-private:
+- QTableWidget *m_table;
+-};
+-
+-#endif
+diff --git a/qt4/demos/main_viewer.cpp b/qt4/demos/main_viewer.cpp
+deleted file mode 100644
+index 3f7080f2..00000000
+--- a/qt4/demos/main_viewer.cpp
++++ /dev/null
+@@ -1,33 +0,0 @@
+-/*
+- * Copyright (C) 2008, Pino Toscano <pino@kde.org>
+- *
+- * This program is free software; you can redistribute it and/or modify
+- * it under the terms of the GNU General Public License as published by
+- * the Free Software Foundation; either version 2, or (at your option)
+- * any later version.
+- *
+- * This program is distributed in the hope that it will be useful,
+- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+- * GNU General Public License for more details.
+- *
+- * You should have received a copy of the GNU General Public License
+- * along with this program; if not, write to the Free Software
+- * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+- */
+-
+-#include "viewer.h"
+-
+-#include <QtGui/QApplication>
+-
+-int main(int argc, char *argv[])
+-{
+- QApplication app(argc, argv);
+- const QStringList args = QCoreApplication::arguments();
+- PdfViewer *viewer = new PdfViewer();
+- viewer->show();
+- if (args.count() > 1) {
+- viewer->loadDocument(args.at(1));
+- }
+- return app.exec();
+-}
+diff --git a/qt4/demos/metadata.cpp b/qt4/demos/metadata.cpp
+deleted file mode 100644
+index e5c7111d..00000000
+--- a/qt4/demos/metadata.cpp
++++ /dev/null
+@@ -1,50 +0,0 @@
+-/*
+- * Copyright (C) 2008, Pino Toscano <pino@kde.org>
+- *
+- * This program is free software; you can redistribute it and/or modify
+- * it under the terms of the GNU General Public License as published by
+- * the Free Software Foundation; either version 2, or (at your option)
+- * any later version.
+- *
+- * This program is distributed in the hope that it will be useful,
+- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+- * GNU General Public License for more details.
+- *
+- * You should have received a copy of the GNU General Public License
+- * along with this program; if not, write to the Free Software
+- * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+- */
+-
+-#include "metadata.h"
+-
+-#include <poppler-qt4.h>
+-
+-#include <QtGui/QTextEdit>
+-
+-MetadataDock::MetadataDock(QWidget *parent)
+- : AbstractInfoDock(parent)
+-{
+- m_edit = new QTextEdit(this);
+- setWidget(m_edit);
+- setWindowTitle(tr("Metadata"));
+- m_edit->setAcceptRichText(false);
+- m_edit->setReadOnly(true);
+-}
+-
+-MetadataDock::~MetadataDock()
+-{
+-}
+-
+-void MetadataDock::fillInfo()
+-{
+- m_edit->setPlainText(document()->metadata());
+-}
+-
+-void MetadataDock::documentClosed()
+-{
+- m_edit->clear();
+- AbstractInfoDock::documentClosed();
+-}
+-
+-#include "metadata.moc"
+diff --git a/qt4/demos/metadata.h b/qt4/demos/metadata.h
+deleted file mode 100644
+index 6f1507a6..00000000
+--- a/qt4/demos/metadata.h
++++ /dev/null
+@@ -1,43 +0,0 @@
+-/*
+- * Copyright (C) 2008, Pino Toscano <pino@kde.org>
+- *
+- * This program is free software; you can redistribute it and/or modify
+- * it under the terms of the GNU General Public License as published by
+- * the Free Software Foundation; either version 2, or (at your option)
+- * any later version.
+- *
+- * This program is distributed in the hope that it will be useful,
+- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+- * GNU General Public License for more details.
+- *
+- * You should have received a copy of the GNU General Public License
+- * along with this program; if not, write to the Free Software
+- * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+- */
+-
+-#ifndef METADATA_H
+-#define METADATA_H
+-
+-#include "abstractinfodock.h"
+-
+-class QTextEdit;
+-
+-class MetadataDock : public AbstractInfoDock
+-{
+- Q_OBJECT
+-
+-public:
+- MetadataDock(QWidget *parent = 0);
+- ~MetadataDock();
+-
+- /*virtual*/ void documentClosed();
+-
+-protected:
+- /*virtual*/ void fillInfo();
+-
+-private:
+- QTextEdit *m_edit;
+-};
+-
+-#endif
+diff --git a/qt4/demos/navigationtoolbar.cpp b/qt4/demos/navigationtoolbar.cpp
+deleted file mode 100644
+index 79dd418a..00000000
+--- a/qt4/demos/navigationtoolbar.cpp
++++ /dev/null
+@@ -1,144 +0,0 @@
+-/*
+- * Copyright (C) 2008-2009, Pino Toscano <pino@kde.org>
+- * Copyright (C) 2013, Fabio D'Urso <fabiodurso@hotmail.it>
+- *
+- * This program is free software; you can redistribute it and/or modify
+- * it under the terms of the GNU General Public License as published by
+- * the Free Software Foundation; either version 2, or (at your option)
+- * any later version.
+- *
+- * This program is distributed in the hope that it will be useful,
+- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+- * GNU General Public License for more details.
+- *
+- * You should have received a copy of the GNU General Public License
+- * along with this program; if not, write to the Free Software
+- * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+- */
+-
+-#include "navigationtoolbar.h"
+-
+-#include <poppler-qt4.h>
+-
+-#include <QtGui/QAction>
+-#include <QtGui/QComboBox>
+-
+-NavigationToolBar::NavigationToolBar(QWidget *parent)
+- : QToolBar(parent)
+-{
+- m_firstAct = addAction(tr("First"), this, SLOT(slotGoFirst()));
+- m_prevAct = addAction(tr("Previous"), this, SLOT(slotGoPrev()));
+- m_pageCombo = new QComboBox(this);
+- connect(m_pageCombo, SIGNAL(activated(int)), this, SLOT(slotComboActivated(int)));
+- addWidget(m_pageCombo);
+- m_nextAct = addAction(tr("Next"), this, SLOT(slotGoNext()));
+- m_lastAct = addAction(tr("Last"), this, SLOT(slotGoLast()));
+-
+- addSeparator();
+-
+- m_zoomCombo = new QComboBox(this);
+- m_zoomCombo->setEditable(true);
+- m_zoomCombo->addItem(tr("10%"));
+- m_zoomCombo->addItem(tr("25%"));
+- m_zoomCombo->addItem(tr("33%"));
+- m_zoomCombo->addItem(tr("50%"));
+- m_zoomCombo->addItem(tr("66%"));
+- m_zoomCombo->addItem(tr("75%"));
+- m_zoomCombo->addItem(tr("100%"));
+- m_zoomCombo->addItem(tr("125%"));
+- m_zoomCombo->addItem(tr("150%"));
+- m_zoomCombo->addItem(tr("200%"));
+- m_zoomCombo->addItem(tr("300%"));
+- m_zoomCombo->addItem(tr("400%"));
+- m_zoomCombo->setCurrentIndex(6); // "100%"
+- connect(m_zoomCombo, SIGNAL(currentIndexChanged(QString)), this, SLOT(slotZoomComboChanged(QString)));
+- addWidget(m_zoomCombo);
+-
+- m_rotationCombo = new QComboBox(this);
+- // NOTE: \302\260 = degree symbol
+- m_rotationCombo->addItem(trUtf8("0\302\260"));
+- m_rotationCombo->addItem(trUtf8("90\302\260"));
+- m_rotationCombo->addItem(trUtf8("180\302\260"));
+- m_rotationCombo->addItem(trUtf8("270\302\260"));
+- connect(m_rotationCombo, SIGNAL(currentIndexChanged(int)), this, SLOT(slotRotationComboChanged(int)));
+- addWidget(m_rotationCombo);
+-
+- documentClosed();
+-}
+-
+-NavigationToolBar::~NavigationToolBar()
+-{
+-}
+-
+-void NavigationToolBar::documentLoaded()
+-{
+- const int pageCount = document()->numPages();
+- for (int i = 0; i < pageCount; ++i) {
+- m_pageCombo->addItem(QString::number(i + 1));
+- }
+- m_pageCombo->setEnabled(true);
+-}
+-
+-void NavigationToolBar::documentClosed()
+-{
+- m_firstAct->setEnabled(false);
+- m_prevAct->setEnabled(false);
+- m_nextAct->setEnabled(false);
+- m_lastAct->setEnabled(false);
+- m_pageCombo->clear();
+- m_pageCombo->setEnabled(false);
+-}
+-
+-void NavigationToolBar::pageChanged(int page)
+-{
+- const int pageCount = document()->numPages();
+- m_firstAct->setEnabled(page > 0);
+- m_prevAct->setEnabled(page > 0);
+- m_nextAct->setEnabled(page < (pageCount - 1));
+- m_lastAct->setEnabled(page < (pageCount - 1));
+- m_pageCombo->setCurrentIndex(page);
+-}
+-
+-void NavigationToolBar::slotGoFirst()
+-{
+- setPage(0);
+-}
+-
+-void NavigationToolBar::slotGoPrev()
+-{
+- setPage(page() - 1);
+-}
+-
+-void NavigationToolBar::slotGoNext()
+-{
+- setPage(page() + 1);
+-}
+-
+-void NavigationToolBar::slotGoLast()
+-{
+- setPage(document()->numPages() - 1);
+-}
+-
+-void NavigationToolBar::slotComboActivated(int index)
+-{
+- setPage(index);
+-}
+-
+-void NavigationToolBar::slotZoomComboChanged(const QString &_text)
+-{
+- QString text = _text;
+- text.remove(QLatin1Char('%'));
+- bool ok = false;
+- int value = text.toInt(&ok);
+- if (ok && value >= 10) {
+- emit zoomChanged(qreal(value) / 100);
+- }
+-}
+-
+-void NavigationToolBar::slotRotationComboChanged(int idx)
+-{
+- emit rotationChanged(idx * 90);
+-}
+-
+-#include "navigationtoolbar.moc"
+diff --git a/qt4/demos/navigationtoolbar.h b/qt4/demos/navigationtoolbar.h
+deleted file mode 100644
+index d7dbd5dd..00000000
+--- a/qt4/demos/navigationtoolbar.h
++++ /dev/null
+@@ -1,65 +0,0 @@
+-/*
+- * Copyright (C) 2008-2009, Pino Toscano <pino@kde.org>
+- * Copyright (C) 2013, Fabio D'Urso <fabiodurso@hotmail.it>
+- *
+- * This program is free software; you can redistribute it and/or modify
+- * it under the terms of the GNU General Public License as published by
+- * the Free Software Foundation; either version 2, or (at your option)
+- * any later version.
+- *
+- * This program is distributed in the hope that it will be useful,
+- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+- * GNU General Public License for more details.
+- *
+- * You should have received a copy of the GNU General Public License
+- * along with this program; if not, write to the Free Software
+- * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+- */
+-
+-#ifndef NAVIGATIONTOOLBAR_H
+-#define NAVIGATIONTOOLBAR_H
+-
+-#include <QtGui/QToolBar>
+-
+-#include "documentobserver.h"
+-
+-class QAction;
+-class QComboBox;
+-
+-class NavigationToolBar : public QToolBar, public DocumentObserver
+-{
+- Q_OBJECT
+-
+-public:
+- NavigationToolBar(QWidget *parent = 0);
+- ~NavigationToolBar();
+-
+- /*virtual*/ void documentLoaded();
+- /*virtual*/ void documentClosed();
+- /*virtual*/ void pageChanged(int page);
+-
+-Q_SIGNALS:
+- void zoomChanged(qreal value);
+- void rotationChanged(int rotation);
+-
+-private Q_SLOTS:
+- void slotGoFirst();
+- void slotGoPrev();
+- void slotGoNext();
+- void slotGoLast();
+- void slotComboActivated(int index);
+- void slotZoomComboChanged(const QString &text);
+- void slotRotationComboChanged(int idx);
+-
+-private:
+- QAction *m_firstAct;
+- QAction *m_prevAct;
+- QComboBox *m_pageCombo;
+- QAction *m_nextAct;
+- QAction *m_lastAct;
+- QComboBox *m_zoomCombo;
+- QComboBox *m_rotationCombo;
+-};
+-
+-#endif
+diff --git a/qt4/demos/optcontent.cpp b/qt4/demos/optcontent.cpp
+deleted file mode 100644
+index 0c1015b9..00000000
+--- a/qt4/demos/optcontent.cpp
++++ /dev/null
+@@ -1,69 +0,0 @@
+-/*
+- * Copyright (C) 2008, Pino Toscano <pino@kde.org>
+- *
+- * This program is free software; you can redistribute it and/or modify
+- * it under the terms of the GNU General Public License as published by
+- * the Free Software Foundation; either version 2, or (at your option)
+- * any later version.
+- *
+- * This program is distributed in the hope that it will be useful,
+- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+- * GNU General Public License for more details.
+- *
+- * You should have received a copy of the GNU General Public License
+- * along with this program; if not, write to the Free Software
+- * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+- */
+-
+-#include "optcontent.h"
+-
+-#include <poppler-qt4.h>
+-
+-#include <QtGui/QTreeView>
+-
+-OptContentDock::OptContentDock(QWidget *parent)
+- : AbstractInfoDock(parent)
+-{
+- m_view = new QTreeView(this);
+- setWidget(m_view);
+- setWindowTitle(tr("Optional content"));
+- m_view->setHorizontalScrollMode(QAbstractItemView::ScrollPerPixel);
+-}
+-
+-OptContentDock::~OptContentDock()
+-{
+-}
+-
+-
+-void OptContentDock::documentLoaded()
+-{
+- AbstractInfoDock::documentLoaded();
+- if ( document()->pageMode() == Poppler::Document::UseOC ) {
+- show();
+- }
+-}
+-
+-void OptContentDock::fillInfo()
+-{
+- if (!document()->hasOptionalContent()) {
+- return;
+- }
+-
+- m_view->setModel(document()->optionalContentModel());
+- connect(m_view->model(), SIGNAL(dataChanged(QModelIndex, QModelIndex)), this, SLOT(reloadImage()));
+- m_view->expandToDepth(1);
+-}
+-
+-void OptContentDock::documentClosed()
+-{
+- m_view->setModel(0);
+- AbstractInfoDock::documentClosed();
+-}
+-
+-void OptContentDock::reloadImage()
+-{
+- reloadPage();
+-}
+-
+-#include "optcontent.moc"
+diff --git a/qt4/demos/optcontent.h b/qt4/demos/optcontent.h
+deleted file mode 100644
+index b933f5cd..00000000
+--- a/qt4/demos/optcontent.h
++++ /dev/null
+@@ -1,47 +0,0 @@
+-/*
+- * Copyright (C) 2008, Pino Toscano <pino@kde.org>
+- *
+- * This program is free software; you can redistribute it and/or modify
+- * it under the terms of the GNU General Public License as published by
+- * the Free Software Foundation; either version 2, or (at your option)
+- * any later version.
+- *
+- * This program is distributed in the hope that it will be useful,
+- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+- * GNU General Public License for more details.
+- *
+- * You should have received a copy of the GNU General Public License
+- * along with this program; if not, write to the Free Software
+- * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+- */
+-
+-#ifndef OPTCONTENT_H
+-#define OPTCONTENT_H
+-
+-#include "abstractinfodock.h"
+-
+-class QTreeView;
+-
+-class OptContentDock : public AbstractInfoDock
+-{
+- Q_OBJECT
+-
+-public:
+- OptContentDock(QWidget *parent = 0);
+- ~OptContentDock();
+-
+- /*virtual*/ void documentLoaded();
+- /*virtual*/ void documentClosed();
+-
+-protected:
+- /*virtual*/ void fillInfo();
+-
+-private Q_SLOTS:
+- void reloadImage();
+-
+-private:
+- QTreeView *m_view;
+-};
+-
+-#endif
+diff --git a/qt4/demos/pageview.cpp b/qt4/demos/pageview.cpp
+deleted file mode 100644
+index 0dfa5e9e..00000000
+--- a/qt4/demos/pageview.cpp
++++ /dev/null
+@@ -1,101 +0,0 @@
+-/*
+- * Copyright (C) 2008-2009, Pino Toscano <pino@kde.org>
+- * Copyright (C) 2013, Fabio D'Urso <fabiodurso@hotmail.it>
+- *
+- * This program is free software; you can redistribute it and/or modify
+- * it under the terms of the GNU General Public License as published by
+- * the Free Software Foundation; either version 2, or (at your option)
+- * any later version.
+- *
+- * This program is distributed in the hope that it will be useful,
+- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+- * GNU General Public License for more details.
+- *
+- * You should have received a copy of the GNU General Public License
+- * along with this program; if not, write to the Free Software
+- * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+- */
+-
+-#include "pageview.h"
+-
+-#include <poppler-qt4.h>
+-
+-#include <QtGui/QApplication>
+-#include <QtGui/QDesktopWidget>
+-#include <QtGui/QImage>
+-#include <QtGui/QLabel>
+-#include <QtGui/QPixmap>
+-
+-PageView::PageView(QWidget *parent)
+- : QScrollArea(parent)
+- , m_zoom(1.0)
+- , m_rotation(0)
+- , m_dpiX(QApplication::desktop()->physicalDpiX())
+- , m_dpiY(QApplication::desktop()->physicalDpiY())
+-{
+- m_imageLabel = new QLabel(this);
+- m_imageLabel->resize(0, 0);
+- setWidget(m_imageLabel);
+-}
+-
+-PageView::~PageView()
+-{
+-}
+-
+-void PageView::documentLoaded()
+-{
+-}
+-
+-void PageView::documentClosed()
+-{
+- m_imageLabel->clear();
+- m_imageLabel->resize(0, 0);
+-}
+-
+-void PageView::pageChanged(int page)
+-{
+- Poppler::Page *popplerPage = document()->page(page);
+- const double resX = m_dpiX * m_zoom;
+- const double resY = m_dpiY * m_zoom;
+-
+- Poppler::Page::Rotation rot;
+- if (m_rotation == 0)
+- rot = Poppler::Page::Rotate0;
+- else if (m_rotation == 90)
+- rot = Poppler::Page::Rotate90;
+- else if (m_rotation == 180)
+- rot = Poppler::Page::Rotate180;
+- else // m_rotation == 270
+- rot = Poppler::Page::Rotate270;
+-
+- QImage image = popplerPage->renderToImage(resX, resY, -1, -1, -1, -1, rot);
+- if (!image.isNull()) {
+- m_imageLabel->resize(image.size());
+- m_imageLabel->setPixmap(QPixmap::fromImage(image));
+- } else {
+- m_imageLabel->resize(0, 0);
+- m_imageLabel->setPixmap(QPixmap());
+- }
+- delete popplerPage;
+-}
+-
+-void PageView::slotZoomChanged(qreal value)
+-{
+- m_zoom = value;
+- if (!document()) {
+- return;
+- }
+- reloadPage();
+-}
+-
+-void PageView::slotRotationChanged(int value)
+-{
+- m_rotation = value;
+- if (!document()) {
+- return;
+- }
+- reloadPage();
+-}
+-
+-#include "pageview.moc"
+diff --git a/qt4/demos/pageview.h b/qt4/demos/pageview.h
+deleted file mode 100644
+index 24065028..00000000
+--- a/qt4/demos/pageview.h
++++ /dev/null
+@@ -1,53 +0,0 @@
+-/*
+- * Copyright (C) 2008-2009, Pino Toscano <pino@kde.org>
+- * Copyright (C) 2013, Fabio D'Urso <fabiodurso@hotmail.it>
+- *
+- * This program is free software; you can redistribute it and/or modify
+- * it under the terms of the GNU General Public License as published by
+- * the Free Software Foundation; either version 2, or (at your option)
+- * any later version.
+- *
+- * This program is distributed in the hope that it will be useful,
+- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+- * GNU General Public License for more details.
+- *
+- * You should have received a copy of the GNU General Public License
+- * along with this program; if not, write to the Free Software
+- * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+- */
+-
+-#ifndef PAGEVIEW_H
+-#define PAGEVIEW_H
+-
+-#include <QtGui/QScrollArea>
+-
+-#include "documentobserver.h"
+-
+-class QLabel;
+-
+-class PageView : public QScrollArea, public DocumentObserver
+-{
+- Q_OBJECT
+-
+-public:
+- PageView(QWidget *parent = 0);
+- ~PageView();
+-
+- /*virtual*/ void documentLoaded();
+- /*virtual*/ void documentClosed();
+- /*virtual*/ void pageChanged(int page);
+-
+-private Q_SLOTS:
+- void slotZoomChanged(qreal value);
+- void slotRotationChanged(int value);
+-
+-private:
+- QLabel *m_imageLabel;
+- qreal m_zoom;
+- int m_rotation;
+- int m_dpiX;
+- int m_dpiY;
+-};
+-
+-#endif
+diff --git a/qt4/demos/permissions.cpp b/qt4/demos/permissions.cpp
+deleted file mode 100644
+index 38205b2e..00000000
+--- a/qt4/demos/permissions.cpp
++++ /dev/null
+@@ -1,66 +0,0 @@
+-/*
+- * Copyright (C) 2008-2009, Pino Toscano <pino@kde.org>
+- *
+- * This program is free software; you can redistribute it and/or modify
+- * it under the terms of the GNU General Public License as published by
+- * the Free Software Foundation; either version 2, or (at your option)
+- * any later version.
+- *
+- * This program is distributed in the hope that it will be useful,
+- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+- * GNU General Public License for more details.
+- *
+- * You should have received a copy of the GNU General Public License
+- * along with this program; if not, write to the Free Software
+- * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+- */
+-
+-#include "permissions.h"
+-
+-#include <poppler-qt4.h>
+-
+-#include <QtGui/QListWidget>
+-
+-PermissionsDock::PermissionsDock(QWidget *parent)
+- : AbstractInfoDock(parent)
+-{
+- m_table = new QListWidget(this);
+- setWidget(m_table);
+- setWindowTitle(tr("Permissions"));
+- m_table->setHorizontalScrollMode(QAbstractItemView::ScrollPerPixel);
+-}
+-
+-PermissionsDock::~PermissionsDock()
+-{
+-}
+-
+-void PermissionsDock::fillInfo()
+-{
+-#define ADD_ROW(title, function) \
+-do { \
+- QListWidgetItem *item = new QListWidgetItem(); \
+- item->setFlags(item->flags() & ~Qt::ItemIsEnabled); \
+- item->setText(title); \
+- item->setCheckState(document()->function() ? Qt::Checked : Qt::Unchecked); \
+- m_table->addItem(item); \
+-} while (0)
+- ADD_ROW("Print", okToPrint);
+- ADD_ROW("PrintHiRes", okToPrintHighRes);
+- ADD_ROW("Change", okToChange);
+- ADD_ROW("Copy", okToCopy);
+- ADD_ROW("Add Notes", okToAddNotes);
+- ADD_ROW("Fill Forms", okToFillForm);
+- ADD_ROW("Create Forms", okToCreateFormFields);
+- ADD_ROW("Extract for accessibility", okToExtractForAccessibility);
+- ADD_ROW("Assemble", okToAssemble);
+-#undef ADD_ROW
+-}
+-
+-void PermissionsDock::documentClosed()
+-{
+- m_table->clear();
+- AbstractInfoDock::documentClosed();
+-}
+-
+-#include "permissions.moc"
+diff --git a/qt4/demos/permissions.h b/qt4/demos/permissions.h
+deleted file mode 100644
+index 13bcbbf0..00000000
+--- a/qt4/demos/permissions.h
++++ /dev/null
+@@ -1,43 +0,0 @@
+-/*
+- * Copyright (C) 2008-2009, Pino Toscano <pino@kde.org>
+- *
+- * This program is free software; you can redistribute it and/or modify
+- * it under the terms of the GNU General Public License as published by
+- * the Free Software Foundation; either version 2, or (at your option)
+- * any later version.
+- *
+- * This program is distributed in the hope that it will be useful,
+- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+- * GNU General Public License for more details.
+- *
+- * You should have received a copy of the GNU General Public License
+- * along with this program; if not, write to the Free Software
+- * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+- */
+-
+-#ifndef PERMISSIONS_H
+-#define PERMISSIONS_H
+-
+-#include "abstractinfodock.h"
+-
+-class QListWidget;
+-
+-class PermissionsDock : public AbstractInfoDock
+-{
+- Q_OBJECT
+-
+-public:
+- PermissionsDock(QWidget *parent = 0);
+- ~PermissionsDock();
+-
+- /*virtual*/ void documentClosed();
+-
+-protected:
+- /*virtual*/ void fillInfo();
+-
+-private:
+- QListWidget *m_table;
+-};
+-
+-#endif
+diff --git a/qt4/demos/thumbnails.cpp b/qt4/demos/thumbnails.cpp
+deleted file mode 100644
+index 07b19ca7..00000000
+--- a/qt4/demos/thumbnails.cpp
++++ /dev/null
+@@ -1,84 +0,0 @@
+-/*
+- * Copyright (C) 2009, Shawn Rutledge <shawn.t.rutledge@gmail.com>
+- * Copyright (C) 2009, Pino Toscano <pino@kde.org>
+- *
+- * This program is free software; you can redistribute it and/or modify
+- * it under the terms of the GNU General Public License as published by
+- * the Free Software Foundation; either version 2, or (at your option)
+- * any later version.
+- *
+- * This program is distributed in the hope that it will be useful,
+- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+- * GNU General Public License for more details.
+- *
+- * You should have received a copy of the GNU General Public License
+- * along with this program; if not, write to the Free Software
+- * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+- */
+-
+-#include "thumbnails.h"
+-
+-#include <poppler-qt4.h>
+-
+-#include <QtGui/QListWidget>
+-
+-static const int PageRole = Qt::UserRole + 1;
+-
+-ThumbnailsDock::ThumbnailsDock(QWidget *parent)
+- : AbstractInfoDock(parent)
+-{
+- m_list = new QListWidget(this);
+- setWidget(m_list);
+- setWindowTitle(tr("Thumbnails"));
+- m_list->setViewMode(QListView::ListMode);
+- m_list->setMovement(QListView::Static);
+- m_list->setVerticalScrollMode(QListView::ScrollPerPixel);
+- connect(m_list, SIGNAL(itemActivated(QListWidgetItem*)),
+- this, SLOT(slotItemActivated(QListWidgetItem*)));
+-}
+-
+-ThumbnailsDock::~ThumbnailsDock()
+-{
+-}
+-
+-void ThumbnailsDock::fillInfo()
+-{
+- const int num = document()->numPages();
+- QSize maxSize;
+- for (int i = 0; i < num; ++i) {
+- const Poppler::Page *page = document()->page(i);
+- const QImage image = page->thumbnail();
+- if (!image.isNull()) {
+- QListWidgetItem *item = new QListWidgetItem();
+- item->setText(QString::number(i + 1));
+- item->setData(Qt::DecorationRole, QPixmap::fromImage(image));
+- item->setData(PageRole, i);
+- m_list->addItem(item);
+- maxSize.setWidth(qMax(maxSize.width(), image.width()));
+- maxSize.setHeight(qMax(maxSize.height(), image.height()));
+- }
+- delete page;
+- }
+- if (num > 0) {
+- m_list->setGridSize(maxSize);
+- m_list->setIconSize(maxSize);
+- }
+-}
+-
+-void ThumbnailsDock::documentClosed()
+-{
+- m_list->clear();
+- AbstractInfoDock::documentClosed();
+-}
+-
+-void ThumbnailsDock::slotItemActivated(QListWidgetItem *item)
+-{
+- if (!item) {
+- return;
+- }
+-
+- setPage(item->data(PageRole).toInt());
+-}
+-
+-#include "thumbnails.moc"
+diff --git a/qt4/demos/thumbnails.h b/qt4/demos/thumbnails.h
+deleted file mode 100644
+index 076d5aee..00000000
+--- a/qt4/demos/thumbnails.h
++++ /dev/null
+@@ -1,48 +0,0 @@
+-/*
+- * Copyright (C) 2009, Shawn Rutledge <shawn.t.rutledge@gmail.com>
+- * Copyright (C) 2009, Pino Toscano <pino@kde.org>
+- *
+- * This program is free software; you can redistribute it and/or modify
+- * it under the terms of the GNU General Public License as published by
+- * the Free Software Foundation; either version 2, or (at your option)
+- * any later version.
+- *
+- * This program is distributed in the hope that it will be useful,
+- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+- * GNU General Public License for more details.
+- *
+- * You should have received a copy of the GNU General Public License
+- * along with this program; if not, write to the Free Software
+- * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+- */
+-
+-#ifndef THUMBNAILS_H
+-#define THUMBNAILS_H
+-
+-#include "abstractinfodock.h"
+-
+-class QListWidget;
+-class QListWidgetItem;
+-
+-class ThumbnailsDock : public AbstractInfoDock
+-{
+- Q_OBJECT
+-
+-public:
+- ThumbnailsDock(QWidget *parent = 0);
+- ~ThumbnailsDock();
+-
+- /*virtual*/ void documentClosed();
+-
+-protected:
+- /*virtual*/ void fillInfo();
+-
+-private Q_SLOTS:
+- void slotItemActivated(QListWidgetItem *item);
+-
+-private:
+- QListWidget *m_list;
+-};
+-
+-#endif
+diff --git a/qt4/demos/toc.cpp b/qt4/demos/toc.cpp
+deleted file mode 100644
+index bf3e5cbb..00000000
+--- a/qt4/demos/toc.cpp
++++ /dev/null
+@@ -1,88 +0,0 @@
+-/*
+- * Copyright (C) 2008, Pino Toscano <pino@kde.org>
+- *
+- * This program is free software; you can redistribute it and/or modify
+- * it under the terms of the GNU General Public License as published by
+- * the Free Software Foundation; either version 2, or (at your option)
+- * any later version.
+- *
+- * This program is distributed in the hope that it will be useful,
+- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+- * GNU General Public License for more details.
+- *
+- * You should have received a copy of the GNU General Public License
+- * along with this program; if not, write to the Free Software
+- * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+- */
+-
+-#include "toc.h"
+-
+-#include <poppler-qt4.h>
+-
+-#include <QtGui/QHeaderView>
+-#include <QtGui/QTreeWidget>
+-
+-static void fillToc(const QDomNode &parent, QTreeWidget *tree, QTreeWidgetItem *parentItem)
+-{
+- QTreeWidgetItem *newitem = 0;
+- for (QDomNode node = parent.firstChild(); !node.isNull(); node = node.nextSibling()) {
+- QDomElement e = node.toElement();
+-
+- if (!parentItem) {
+- newitem = new QTreeWidgetItem(tree, newitem);
+- } else {
+- newitem = new QTreeWidgetItem(parentItem, newitem);
+- }
+- newitem->setText(0, e.tagName());
+-
+- bool isOpen = false;
+- if (e.hasAttribute(QString::fromLatin1("Open"))) {
+- isOpen = QVariant(e.attribute(QString::fromLatin1("Open"))).toBool();
+- }
+- if (isOpen) {
+- tree->expandItem(newitem);
+- }
+-
+- if (e.hasChildNodes()) {
+- fillToc(node, tree, newitem);
+- }
+- }
+-}
+-
+-
+-TocDock::TocDock(QWidget *parent)
+- : AbstractInfoDock(parent)
+-{
+- m_tree = new QTreeWidget(this);
+- setWidget(m_tree);
+- m_tree->setAlternatingRowColors(true);
+- m_tree->header()->hide();
+- setWindowTitle(tr("TOC"));
+- m_tree->setHorizontalScrollMode(QAbstractItemView::ScrollPerPixel);
+-}
+-
+-TocDock::~TocDock()
+-{
+-}
+-
+-void TocDock::fillInfo()
+-{
+- const QDomDocument *toc = document()->toc();
+- if (toc) {
+- fillToc(*toc, m_tree, 0);
+- } else {
+- QTreeWidgetItem *item = new QTreeWidgetItem();
+- item->setText(0, tr("No TOC"));
+- item->setFlags(item->flags() & ~Qt::ItemIsEnabled);
+- m_tree->addTopLevelItem(item);
+- }
+-}
+-
+-void TocDock::documentClosed()
+-{
+- m_tree->clear();
+- AbstractInfoDock::documentClosed();
+-}
+-
+-#include "toc.moc"
+diff --git a/qt4/demos/toc.h b/qt4/demos/toc.h
+deleted file mode 100644
+index bbc90827..00000000
+--- a/qt4/demos/toc.h
++++ /dev/null
+@@ -1,43 +0,0 @@
+-/*
+- * Copyright (C) 2008, Pino Toscano <pino@kde.org>
+- *
+- * This program is free software; you can redistribute it and/or modify
+- * it under the terms of the GNU General Public License as published by
+- * the Free Software Foundation; either version 2, or (at your option)
+- * any later version.
+- *
+- * This program is distributed in the hope that it will be useful,
+- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+- * GNU General Public License for more details.
+- *
+- * You should have received a copy of the GNU General Public License
+- * along with this program; if not, write to the Free Software
+- * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+- */
+-
+-#ifndef TOC_H
+-#define TOC_H
+-
+-#include "abstractinfodock.h"
+-
+-class QTreeWidget;
+-
+-class TocDock : public AbstractInfoDock
+-{
+- Q_OBJECT
+-
+-public:
+- TocDock(QWidget *parent = 0);
+- ~TocDock();
+-
+- /*virtual*/ void documentClosed();
+-
+-protected:
+- /*virtual*/ void fillInfo();
+-
+-private:
+- QTreeWidget *m_tree;
+-};
+-
+-#endif
+diff --git a/qt4/demos/viewer.cpp b/qt4/demos/viewer.cpp
+deleted file mode 100644
+index c34af23f..00000000
+--- a/qt4/demos/viewer.cpp
++++ /dev/null
+@@ -1,319 +0,0 @@
+-/*
+- * Copyright (C) 2008-2009, Pino Toscano <pino@kde.org>
+- * Copyright (C) 2008, Albert Astals Cid <aacid@kde.org>
+- * Copyright (C) 2009, Shawn Rutledge <shawn.t.rutledge@gmail.com>
+- * Copyright (C) 2013, Fabio D'Urso <fabiodurso@hotmail.it>
+- *
+- * This program is free software; you can redistribute it and/or modify
+- * it under the terms of the GNU General Public License as published by
+- * the Free Software Foundation; either version 2, or (at your option)
+- * any later version.
+- *
+- * This program is distributed in the hope that it will be useful,
+- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+- * GNU General Public License for more details.
+- *
+- * You should have received a copy of the GNU General Public License
+- * along with this program; if not, write to the Free Software
+- * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+- */
+-
+-#include "viewer.h"
+-
+-#include "embeddedfiles.h"
+-#include "fonts.h"
+-#include "info.h"
+-#include "metadata.h"
+-#include "navigationtoolbar.h"
+-#include "optcontent.h"
+-#include "pageview.h"
+-#include "permissions.h"
+-#include "thumbnails.h"
+-#include "toc.h"
+-
+-#include <poppler-qt4.h>
+-
+-#include <QtCore/QDir>
+-#include <QtGui/QAction>
+-#include <QtGui/QApplication>
+-#include <QtGui/QFileDialog>
+-#include <QtGui/QInputDialog>
+-#include <QtGui/QMenu>
+-#include <QtGui/QMenuBar>
+-#include <QtGui/QMessageBox>
+-
+-PdfViewer::PdfViewer()
+- : QMainWindow(), m_currentPage(0), m_doc(0)
+-{
+- setWindowTitle(tr("Poppler-Qt4 Demo"));
+-
+- // setup the menus
+- QMenu *fileMenu = menuBar()->addMenu(tr("&File"));
+- m_fileOpenAct = fileMenu->addAction(tr("&Open"), this, SLOT(slotOpenFile()));
+- m_fileOpenAct->setShortcut(Qt::CTRL + Qt::Key_O);
+- fileMenu->addSeparator();
+- m_fileSaveCopyAct = fileMenu->addAction(tr("&Save a Copy..."), this, SLOT(slotSaveCopy()));
+- m_fileSaveCopyAct->setShortcut(Qt::CTRL + Qt::SHIFT + Qt::Key_S);
+- m_fileSaveCopyAct->setEnabled(false);
+- fileMenu->addSeparator();
+- QAction *act = fileMenu->addAction(tr("&Quit"), qApp, SLOT(closeAllWindows()));
+- act->setShortcut(Qt::CTRL + Qt::Key_Q);
+-
+- QMenu *viewMenu = menuBar()->addMenu(tr("&View"));
+-
+- QMenu *settingsMenu = menuBar()->addMenu(tr("&Settings"));
+- m_settingsTextAAAct = settingsMenu->addAction(tr("Text Antialias"));
+- m_settingsTextAAAct->setCheckable(true);
+- connect(m_settingsTextAAAct, SIGNAL(toggled(bool)), this, SLOT(slotToggleTextAA(bool)));
+- m_settingsGfxAAAct = settingsMenu->addAction(tr("Graphics Antialias"));
+- m_settingsGfxAAAct->setCheckable(true);
+- connect(m_settingsGfxAAAct, SIGNAL(toggled(bool)), this, SLOT(slotToggleGfxAA(bool)));
+- QMenu *settingsRenderMenu = settingsMenu->addMenu(tr("Render Backend"));
+- m_settingsRenderBackendGrp = new QActionGroup(settingsRenderMenu);
+- m_settingsRenderBackendGrp->setExclusive(true);
+- act = settingsRenderMenu->addAction(tr("Splash"));
+- act->setCheckable(true);
+- act->setChecked(true);
+- act->setData(qVariantFromValue(0));
+- m_settingsRenderBackendGrp->addAction(act);
+- act = settingsRenderMenu->addAction(tr("Arthur"));
+- act->setCheckable(true);
+- act->setData(qVariantFromValue(1));
+- m_settingsRenderBackendGrp->addAction(act);
+- connect(m_settingsRenderBackendGrp, SIGNAL(triggered(QAction*)),
+- this, SLOT(slotRenderBackend(QAction*)));
+-
+- QMenu *helpMenu = menuBar()->addMenu(tr("&Help"));
+- act = helpMenu->addAction(tr("&About"), this, SLOT(slotAbout()));
+- act = helpMenu->addAction(tr("About &Qt"), this, SLOT(slotAboutQt()));
+-
+- NavigationToolBar *navbar = new NavigationToolBar(this);
+- addToolBar(navbar);
+- m_observers.append(navbar);
+-
+- PageView *view = new PageView(this);
+- setCentralWidget(view);
+- m_observers.append(view);
+-
+- InfoDock *infoDock = new InfoDock(this);
+- addDockWidget(Qt::LeftDockWidgetArea, infoDock);
+- infoDock->hide();
+- viewMenu->addAction(infoDock->toggleViewAction());
+- m_observers.append(infoDock);
+-
+- TocDock *tocDock = new TocDock(this);
+- addDockWidget(Qt::LeftDockWidgetArea, tocDock);
+- tocDock->hide();
+- viewMenu->addAction(tocDock->toggleViewAction());
+- m_observers.append(tocDock);
+-
+- FontsDock *fontsDock = new FontsDock(this);
+- addDockWidget(Qt::LeftDockWidgetArea, fontsDock);
+- fontsDock->hide();
+- viewMenu->addAction(fontsDock->toggleViewAction());
+- m_observers.append(fontsDock);
+-
+- PermissionsDock *permissionsDock = new PermissionsDock(this);
+- addDockWidget(Qt::LeftDockWidgetArea, permissionsDock);
+- permissionsDock->hide();
+- viewMenu->addAction(permissionsDock->toggleViewAction());
+- m_observers.append(permissionsDock);
+-
+- ThumbnailsDock *thumbnailsDock = new ThumbnailsDock(this);
+- addDockWidget(Qt::LeftDockWidgetArea, thumbnailsDock);
+- thumbnailsDock->hide();
+- viewMenu->addAction(thumbnailsDock->toggleViewAction());
+- m_observers.append(thumbnailsDock);
+-
+- EmbeddedFilesDock *embfilesDock = new EmbeddedFilesDock(this);
+- addDockWidget(Qt::BottomDockWidgetArea, embfilesDock);
+- embfilesDock->hide();
+- viewMenu->addAction(embfilesDock->toggleViewAction());
+- m_observers.append(embfilesDock);
+-
+- MetadataDock *metadataDock = new MetadataDock(this);
+- addDockWidget(Qt::BottomDockWidgetArea, metadataDock);
+- metadataDock->hide();
+- viewMenu->addAction(metadataDock->toggleViewAction());
+- m_observers.append(metadataDock);
+-
+- OptContentDock *optContentDock = new OptContentDock(this);
+- addDockWidget(Qt::LeftDockWidgetArea, optContentDock);
+- optContentDock->hide();
+- viewMenu->addAction(optContentDock->toggleViewAction());
+- m_observers.append(optContentDock);
+-
+- Q_FOREACH(DocumentObserver *obs, m_observers) {
+- obs->m_viewer = this;
+- }
+-
+- connect(navbar, SIGNAL(zoomChanged(qreal)), view, SLOT(slotZoomChanged(qreal)));
+- connect(navbar, SIGNAL(rotationChanged(int)), view, SLOT(slotRotationChanged(int)));
+-
+- // activate AA by default
+- m_settingsTextAAAct->setChecked(true);
+- m_settingsGfxAAAct->setChecked(true);
+-}
+-
+-PdfViewer::~PdfViewer()
+-{
+- closeDocument();
+-}
+-
+-QSize PdfViewer::sizeHint() const
+-{
+- return QSize(500, 600);
+-}
+-
+-void PdfViewer::loadDocument(const QString &file)
+-{
+- Poppler::Document *newdoc = Poppler::Document::load(file);
+- if (!newdoc) {
+- QMessageBox msgbox(QMessageBox::Critical, tr("Open Error"), tr("Cannot open:\n") + file,
+- QMessageBox::Ok, this);
+- msgbox.exec();
+- return;
+- }
+-
+- while (newdoc->isLocked()) {
+- bool ok = true;
+- QString password = QInputDialog::getText(this, tr("Document Password"),
+- tr("Please insert the password of the document:"),
+- QLineEdit::Password, QString(), &ok);
+- if (!ok) {
+- delete newdoc;
+- return;
+- }
+- newdoc->unlock(password.toLatin1(), password.toLatin1());
+- }
+-
+- closeDocument();
+-
+- m_doc = newdoc;
+-
+- m_doc->setRenderHint(Poppler::Document::TextAntialiasing, m_settingsTextAAAct->isChecked());
+- m_doc->setRenderHint(Poppler::Document::Antialiasing, m_settingsGfxAAAct->isChecked());
+- m_doc->setRenderBackend((Poppler::Document::RenderBackend)m_settingsRenderBackendGrp->checkedAction()->data().toInt());
+-
+- Q_FOREACH(DocumentObserver *obs, m_observers) {
+- obs->documentLoaded();
+- obs->pageChanged(0);
+- }
+-
+- m_fileSaveCopyAct->setEnabled(true);
+-}
+-
+-void PdfViewer::closeDocument()
+-{
+- if (!m_doc) {
+- return;
+- }
+-
+- Q_FOREACH(DocumentObserver *obs, m_observers) {
+- obs->documentClosed();
+- }
+-
+- m_currentPage = 0;
+- delete m_doc;
+- m_doc = 0;
+-
+- m_fileSaveCopyAct->setEnabled(false);
+-}
+-
+-void PdfViewer::slotOpenFile()
+-{
+- QString fileName = QFileDialog::getOpenFileName(this, tr("Open PDF Document"), QDir::homePath(), tr("PDF Documents (*.pdf)"));
+- if (fileName.isEmpty()) {
+- return;
+- }
+-
+- loadDocument(fileName);
+-}
+-
+-void PdfViewer::slotSaveCopy()
+-{
+- if (!m_doc) {
+- return;
+- }
+-
+- QString fileName = QFileDialog::getSaveFileName(this, tr("Save Copy"), QDir::homePath(), tr("PDF Documents (*.pdf)"));
+- if (fileName.isEmpty()) {
+- return;
+- }
+-
+- Poppler::PDFConverter *converter = m_doc->pdfConverter();
+- converter->setOutputFileName(fileName);
+- converter->setPDFOptions(converter->pdfOptions() & ~Poppler::PDFConverter::WithChanges);
+- if (!converter->convert()) {
+- QMessageBox msgbox(QMessageBox::Critical, tr("Save Error"), tr("Cannot export to:\n%1").arg(fileName),
+- QMessageBox::Ok, this);
+- }
+- delete converter;
+-}
+-
+-void PdfViewer::slotAbout()
+-{
+- const QString text("This is a demo of the Poppler-Qt4 library.");
+- QMessageBox::about(this, QString::fromLatin1("About Poppler-Qt4 Demo"), text);
+-}
+-
+-void PdfViewer::slotAboutQt()
+-{
+- QMessageBox::aboutQt(this);
+-}
+-
+-void PdfViewer::slotToggleTextAA(bool value)
+-{
+- if (!m_doc) {
+- return;
+- }
+-
+- m_doc->setRenderHint(Poppler::Document::TextAntialiasing, value);
+-
+- Q_FOREACH(DocumentObserver *obs, m_observers) {
+- obs->pageChanged(m_currentPage);
+- }
+-}
+-
+-void PdfViewer::slotToggleGfxAA(bool value)
+-{
+- if (!m_doc) {
+- return;
+- }
+-
+- m_doc->setRenderHint(Poppler::Document::Antialiasing, value);
+-
+- Q_FOREACH(DocumentObserver *obs, m_observers) {
+- obs->pageChanged(m_currentPage);
+- }
+-}
+-
+-void PdfViewer::slotRenderBackend(QAction *act)
+-{
+- if (!m_doc || !act) {
+- return;
+- }
+-
+- m_doc->setRenderBackend((Poppler::Document::RenderBackend)act->data().toInt());
+-
+- Q_FOREACH(DocumentObserver *obs, m_observers) {
+- obs->pageChanged(m_currentPage);
+- }
+-}
+-
+-void PdfViewer::setPage(int page)
+-{
+- Q_FOREACH(DocumentObserver *obs, m_observers) {
+- obs->pageChanged(page);
+- }
+-
+- m_currentPage = page;
+-}
+-
+-int PdfViewer::page() const
+-{
+- return m_currentPage;
+-}
+-
+-#include "viewer.moc"
+diff --git a/qt4/demos/viewer.h b/qt4/demos/viewer.h
+deleted file mode 100644
+index 5e0eaaff..00000000
+--- a/qt4/demos/viewer.h
++++ /dev/null
+@@ -1,73 +0,0 @@
+-/*
+- * Copyright (C) 2008, Pino Toscano <pino@kde.org>
+- *
+- * This program is free software; you can redistribute it and/or modify
+- * it under the terms of the GNU General Public License as published by
+- * the Free Software Foundation; either version 2, or (at your option)
+- * any later version.
+- *
+- * This program is distributed in the hope that it will be useful,
+- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+- * GNU General Public License for more details.
+- *
+- * You should have received a copy of the GNU General Public License
+- * along with this program; if not, write to the Free Software
+- * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+- */
+-
+-#ifndef PDFVIEWER_H
+-#define PDFVIEWER_H
+-
+-#include <QtGui/QMainWindow>
+-
+-class QAction;
+-class QActionGroup;
+-class QLabel;
+-class DocumentObserver;
+-namespace Poppler {
+-class Document;
+-}
+-
+-class PdfViewer : public QMainWindow
+-{
+- Q_OBJECT
+-
+- friend class DocumentObserver;
+-
+-public:
+- PdfViewer();
+- ~PdfViewer();
+-
+- /*virtual*/ QSize sizeHint() const;
+-
+- void loadDocument(const QString &file);
+- void closeDocument();
+-
+-private Q_SLOTS:
+- void slotOpenFile();
+- void slotSaveCopy();
+- void slotAbout();
+- void slotAboutQt();
+- void slotToggleTextAA(bool value);
+- void slotToggleGfxAA(bool value);
+- void slotRenderBackend(QAction *act);
+-
+-private:
+- void setPage(int page);
+- int page() const;
+-
+- int m_currentPage;
+-
+- QAction *m_fileOpenAct;
+- QAction *m_fileSaveCopyAct;
+- QAction *m_settingsTextAAAct;
+- QAction *m_settingsGfxAAAct;
+- QActionGroup *m_settingsRenderBackendGrp;
+-
+- QList<DocumentObserver *> m_observers;
+-
+- Poppler::Document *m_doc;
+-};
+-
+-#endif
+diff --git a/qt4/src/.gitignore b/qt4/src/.gitignore
+deleted file mode 100644
+index 3d124ddd..00000000
+--- a/qt4/src/.gitignore
++++ /dev/null
+@@ -1,9 +0,0 @@
+-.deps
+-.libs
+-*.la
+-*.lo
+-Makefile
+-Makefile.in
+-APIDOCS-html
+-APIDOCS-latex
+-*.moc
+diff --git a/qt4/src/ArthurOutputDev.cc b/qt4/src/ArthurOutputDev.cc
+deleted file mode 100644
+index f2fa6f17..00000000
+--- a/qt4/src/ArthurOutputDev.cc
++++ /dev/null
+@@ -1,812 +0,0 @@
+-//========================================================================
+-//
+-// ArthurOutputDev.cc
+-//
+-// Copyright 2003 Glyph & Cog, LLC
+-//
+-//========================================================================
+-
+-//========================================================================
+-//
+-// Modified under the Poppler project - http://poppler.freedesktop.org
+-//
+-// All changes made under the Poppler project to this file are licensed
+-// under GPL version 2 or later
+-//
+-// Copyright (C) 2005 Brad Hards <bradh@frogmouth.net>
+-// Copyright (C) 2005-2009, 2011, 2012, 2014, 2015 Albert Astals Cid <aacid@kde.org>
+-// Copyright (C) 2008, 2010 Pino Toscano <pino@kde.org>
+-// Copyright (C) 2009, 2011 Carlos Garcia Campos <carlosgc@gnome.org>
+-// Copyright (C) 2009 Petr Gajdos <pgajdos@novell.com>
+-// Copyright (C) 2010 Matthias Fauconneau <matthias.fauconneau@gmail.com>
+-// Copyright (C) 2011 Andreas Hartmetz <ahartmetz@gmail.com>
+-// Copyright (C) 2013 Thomas Freitag <Thomas.Freitag@alfa.de>
+-// Copyright (C) 2013 Dominik Haumann <dhaumann@kde.org>
+-// Copyright (C) 2017 Adrian Johnson <ajohnson@redneon.com>
+-//
+-// To see a description of the changes please see the Changelog file that
+-// came with your tarball or type make ChangeLog if you are building from git
+-//
+-//========================================================================
+-
+-#include <config.h>
+-
+-#ifdef USE_GCC_PRAGMAS
+-#pragma implementation
+-#endif
+-
+-#include <string.h>
+-#include <math.h>
+-
+-#include "goo/gfile.h"
+-#include "GlobalParams.h"
+-#include "Error.h"
+-#include "Object.h"
+-#include "GfxState.h"
+-#include "GfxFont.h"
+-#include "Link.h"
+-#include "FontEncodingTables.h"
+-#include <fofi/FoFiTrueType.h>
+-#include "ArthurOutputDev.h"
+-
+-#include <QtCore/QtDebug>
+-#include <QtGui/QPainterPath>
+-//------------------------------------------------------------------------
+-
+-#ifdef HAVE_SPLASH
+-#include "splash/SplashFontFileID.h"
+-#include "splash/SplashFontFile.h"
+-#include "splash/SplashFontEngine.h"
+-#include "splash/SplashFont.h"
+-#include "splash/SplashMath.h"
+-#include "splash/SplashPath.h"
+-#include "splash/SplashGlyphBitmap.h"
+-//------------------------------------------------------------------------
+-// SplashOutFontFileID
+-//------------------------------------------------------------------------
+-
+-class SplashOutFontFileID: public SplashFontFileID {
+-public:
+-
+- SplashOutFontFileID(Ref *rA) { r = *rA; }
+-
+- ~SplashOutFontFileID() {}
+-
+- GBool matches(SplashFontFileID *id) {
+- return ((SplashOutFontFileID *)id)->r.num == r.num &&
+- ((SplashOutFontFileID *)id)->r.gen == r.gen;
+- }
+-
+-private:
+-
+- Ref r;
+-};
+-
+-#endif
+-
+-//------------------------------------------------------------------------
+-// ArthurOutputDev
+-//------------------------------------------------------------------------
+-
+-ArthurOutputDev::ArthurOutputDev(QPainter *painter):
+- m_painter(painter),
+- m_fontHinting(NoHinting)
+-{
+- m_currentBrush = QBrush(Qt::SolidPattern);
+- m_fontEngine = 0;
+- m_font = 0;
+-}
+-
+-ArthurOutputDev::~ArthurOutputDev()
+-{
+-#ifdef HAVE_SPLASH
+- delete m_fontEngine;
+-#endif
+-}
+-
+-void ArthurOutputDev::startDoc(XRef *xrefA) {
+- xref = xrefA;
+-#ifdef HAVE_SPLASH
+- delete m_fontEngine;
+-
+- const bool isHintingEnabled = m_fontHinting != NoHinting;
+- const bool isSlightHinting = m_fontHinting == SlightHinting;
+-
+- m_fontEngine = new SplashFontEngine(
+- globalParams->getEnableFreeType(),
+- isHintingEnabled,
+- isSlightHinting,
+- m_painter->testRenderHint(QPainter::TextAntialiasing));
+-#endif
+-}
+-
+-void ArthurOutputDev::startPage(int pageNum, GfxState *state, XRef *xref)
+-{
+- // fill page with white background.
+- int w = static_cast<int>(state->getPageWidth());
+- int h = static_cast<int>(state->getPageHeight());
+- QColor fillColour(Qt::white);
+- QBrush fill(fillColour);
+- m_painter->save();
+- m_painter->setPen(fillColour);
+- m_painter->setBrush(fill);
+- m_painter->drawRect(0, 0, w, h);
+- m_painter->restore();
+-}
+-
+-void ArthurOutputDev::endPage() {
+-}
+-
+-void ArthurOutputDev::saveState(GfxState *state)
+-{
+- m_painter->save();
+-}
+-
+-void ArthurOutputDev::restoreState(GfxState *state)
+-{
+- m_painter->restore();
+-}
+-
+-void ArthurOutputDev::updateAll(GfxState *state)
+-{
+- OutputDev::updateAll(state);
+- m_needFontUpdate = gTrue;
+-}
+-
+-// This looks wrong - why aren't adjusting the matrix?
+-void ArthurOutputDev::updateCTM(GfxState *state, double m11, double m12,
+- double m21, double m22,
+- double m31, double m32)
+-{
+- updateLineDash(state);
+- updateLineJoin(state);
+- updateLineCap(state);
+- updateLineWidth(state);
+-}
+-
+-void ArthurOutputDev::updateLineDash(GfxState *state)
+-{
+- double *dashPattern;
+- int dashLength;
+- double dashStart;
+- state->getLineDash(&dashPattern, &dashLength, &dashStart);
+- QVector<qreal> pattern(dashLength);
+- for (int i = 0; i < dashLength; ++i) {
+- pattern[i] = dashPattern[i];
+- }
+- m_currentPen.setDashPattern(pattern);
+- m_currentPen.setDashOffset(dashStart);
+- m_painter->setPen(m_currentPen);
+-}
+-
+-void ArthurOutputDev::updateFlatness(GfxState *state)
+-{
+- // qDebug() << "updateFlatness";
+-}
+-
+-void ArthurOutputDev::updateLineJoin(GfxState *state)
+-{
+- switch (state->getLineJoin()) {
+- case 0:
+- m_currentPen.setJoinStyle(Qt::MiterJoin);
+- break;
+- case 1:
+- m_currentPen.setJoinStyle(Qt::RoundJoin);
+- break;
+- case 2:
+- m_currentPen.setJoinStyle(Qt::BevelJoin);
+- break;
+- }
+- m_painter->setPen(m_currentPen);
+-}
+-
+-void ArthurOutputDev::updateLineCap(GfxState *state)
+-{
+- switch (state->getLineCap()) {
+- case 0:
+- m_currentPen.setCapStyle(Qt::FlatCap);
+- break;
+- case 1:
+- m_currentPen.setCapStyle(Qt::RoundCap);
+- break;
+- case 2:
+- m_currentPen.setCapStyle(Qt::SquareCap);
+- break;
+- }
+- m_painter->setPen(m_currentPen);
+-}
+-
+-void ArthurOutputDev::updateMiterLimit(GfxState *state)
+-{
+- m_currentPen.setMiterLimit(state->getMiterLimit());
+- m_painter->setPen(m_currentPen);
+-}
+-
+-void ArthurOutputDev::updateLineWidth(GfxState *state)
+-{
+- m_currentPen.setWidthF(state->getLineWidth());
+- m_painter->setPen(m_currentPen);
+-}
+-
+-void ArthurOutputDev::updateFillColor(GfxState *state)
+-{
+- GfxRGB rgb;
+- QColor brushColour = m_currentBrush.color();
+- state->getFillRGB(&rgb);
+- brushColour.setRgbF(colToDbl(rgb.r), colToDbl(rgb.g), colToDbl(rgb.b), brushColour.alphaF());
+- m_currentBrush.setColor(brushColour);
+-}
+-
+-void ArthurOutputDev::updateStrokeColor(GfxState *state)
+-{
+- GfxRGB rgb;
+- QColor penColour = m_currentPen.color();
+- state->getStrokeRGB(&rgb);
+- penColour.setRgbF(colToDbl(rgb.r), colToDbl(rgb.g), colToDbl(rgb.b), penColour.alphaF());
+- m_currentPen.setColor(penColour);
+- m_painter->setPen(m_currentPen);
+-}
+-
+-void ArthurOutputDev::updateFillOpacity(GfxState *state)
+-{
+- QColor brushColour= m_currentBrush.color();
+- brushColour.setAlphaF(state->getFillOpacity());
+- m_currentBrush.setColor(brushColour);
+-}
+-
+-void ArthurOutputDev::updateStrokeOpacity(GfxState *state)
+-{
+- QColor penColour= m_currentPen.color();
+- penColour.setAlphaF(state->getStrokeOpacity());
+- m_currentPen.setColor(penColour);
+- m_painter->setPen(m_currentPen);
+-}
+-
+-void ArthurOutputDev::updateFont(GfxState *state)
+-{
+-#ifdef HAVE_SPLASH
+- GfxFont *gfxFont;
+- GfxFontLoc *fontLoc;
+- GfxFontType fontType;
+- SplashOutFontFileID *id;
+- SplashFontFile *fontFile;
+- SplashFontSrc *fontsrc = NULL;
+- FoFiTrueType *ff;
+- Object refObj, strObj;
+- GooString *fileName;
+- char *tmpBuf;
+- int tmpBufLen = 0;
+- int *codeToGID;
+- double *textMat;
+- double m11, m12, m21, m22, fontSize;
+- SplashCoord mat[4];
+- int n;
+- int faceIndex = 0;
+- SplashCoord matrix[6];
+-
+- m_needFontUpdate = false;
+- m_font = NULL;
+- fileName = NULL;
+- tmpBuf = NULL;
+- fontLoc = NULL;
+-
+- if (!(gfxFont = state->getFont())) {
+- goto err1;
+- }
+- fontType = gfxFont->getType();
+- if (fontType == fontType3) {
+- goto err1;
+- }
+-
+- // check the font file cache
+- id = new SplashOutFontFileID(gfxFont->getID());
+- if ((fontFile = m_fontEngine->getFontFile(id))) {
+- delete id;
+-
+- } else {
+-
+- if (!(fontLoc = gfxFont->locateFont(xref, NULL))) {
+- error(errSyntaxError, -1, "Couldn't find a font for '{0:s}'",
+- gfxFont->getName() ? gfxFont->getName()->getCString()
+- : "(unnamed)");
+- goto err2;
+- }
+-
+- // embedded font
+- if (fontLoc->locType == gfxFontLocEmbedded) {
+- // if there is an embedded font, read it to memory
+- tmpBuf = gfxFont->readEmbFontFile(xref, &tmpBufLen);
+- if (! tmpBuf)
+- goto err2;
+-
+- // external font
+- } else { // gfxFontLocExternal
+- fileName = fontLoc->path;
+- fontType = fontLoc->fontType;
+- }
+-
+- fontsrc = new SplashFontSrc;
+- if (fileName)
+- fontsrc->setFile(fileName, gFalse);
+- else
+- fontsrc->setBuf(tmpBuf, tmpBufLen, gTrue);
+-
+- // load the font file
+- switch (fontType) {
+- case fontType1:
+- if (!(fontFile = m_fontEngine->loadType1Font(
+- id,
+- fontsrc,
+- (const char **)((Gfx8BitFont *)gfxFont)->getEncoding()))) {
+- error(errSyntaxError, -1, "Couldn't create a font for '{0:s}'",
+- gfxFont->getName() ? gfxFont->getName()->getCString()
+- : "(unnamed)");
+- goto err2;
+- }
+- break;
+- case fontType1C:
+- if (!(fontFile = m_fontEngine->loadType1CFont(
+- id,
+- fontsrc,
+- (const char **)((Gfx8BitFont *)gfxFont)->getEncoding()))) {
+- error(errSyntaxError, -1, "Couldn't create a font for '{0:s}'",
+- gfxFont->getName() ? gfxFont->getName()->getCString()
+- : "(unnamed)");
+- goto err2;
+- }
+- break;
+- case fontType1COT:
+- if (!(fontFile = m_fontEngine->loadOpenTypeT1CFont(
+- id,
+- fontsrc,
+- (const char **)((Gfx8BitFont *)gfxFont)->getEncoding()))) {
+- error(errSyntaxError, -1, "Couldn't create a font for '{0:s}'",
+- gfxFont->getName() ? gfxFont->getName()->getCString()
+- : "(unnamed)");
+- goto err2;
+- }
+- break;
+- case fontTrueType:
+- case fontTrueTypeOT:
+- if (fileName)
+- ff = FoFiTrueType::load(fileName->getCString());
+- else
+- ff = FoFiTrueType::make(tmpBuf, tmpBufLen);
+- if (ff) {
+- codeToGID = ((Gfx8BitFont *)gfxFont)->getCodeToGIDMap(ff);
+- n = 256;
+- delete ff;
+- } else {
+- codeToGID = NULL;
+- n = 0;
+- }
+- if (!(fontFile = m_fontEngine->loadTrueTypeFont(
+- id,
+- fontsrc,
+- codeToGID, n))) {
+- error(errSyntaxError, -1, "Couldn't create a font for '{0:s}'",
+- gfxFont->getName() ? gfxFont->getName()->getCString()
+- : "(unnamed)");
+- goto err2;
+- }
+- break;
+- case fontCIDType0:
+- case fontCIDType0C:
+- if (!(fontFile = m_fontEngine->loadCIDFont(
+- id,
+- fontsrc))) {
+- error(errSyntaxError, -1, "Couldn't create a font for '{0:s}'",
+- gfxFont->getName() ? gfxFont->getName()->getCString()
+- : "(unnamed)");
+- goto err2;
+- }
+- break;
+- case fontCIDType0COT:
+- if (((GfxCIDFont *)gfxFont)->getCIDToGID()) {
+- n = ((GfxCIDFont *)gfxFont)->getCIDToGIDLen();
+- codeToGID = (int *)gmallocn(n, sizeof(int));
+- memcpy(codeToGID, ((GfxCIDFont *)gfxFont)->getCIDToGID(),
+- n * sizeof(int));
+- } else {
+- codeToGID = NULL;
+- n = 0;
+- }
+- if (!(fontFile = m_fontEngine->loadOpenTypeCFFFont(
+- id,
+- fontsrc,
+- codeToGID, n))) {
+- error(errSyntaxError, -1, "Couldn't create a font for '{0:s}'",
+- gfxFont->getName() ? gfxFont->getName()->getCString()
+- : "(unnamed)");
+- goto err2;
+- }
+- break;
+- case fontCIDType2:
+- case fontCIDType2OT:
+- codeToGID = NULL;
+- n = 0;
+- if (((GfxCIDFont *)gfxFont)->getCIDToGID()) {
+- n = ((GfxCIDFont *)gfxFont)->getCIDToGIDLen();
+- if (n) {
+- codeToGID = (int *)gmallocn(n, sizeof(int));
+- memcpy(codeToGID, ((GfxCIDFont *)gfxFont)->getCIDToGID(),
+- n * sizeof(Gushort));
+- }
+- } else {
+- if (fileName)
+- ff = FoFiTrueType::load(fileName->getCString());
+- else
+- ff = FoFiTrueType::make(tmpBuf, tmpBufLen);
+- if (! ff)
+- goto err2;
+- codeToGID = ((GfxCIDFont *)gfxFont)->getCodeToGIDMap(ff, &n);
+- delete ff;
+- }
+- if (!(fontFile = m_fontEngine->loadTrueTypeFont(
+- id,
+- fontsrc,
+- codeToGID, n, faceIndex))) {
+- error(errSyntaxError, -1, "Couldn't create a font for '{0:s}'",
+- gfxFont->getName() ? gfxFont->getName()->getCString()
+- : "(unnamed)");
+- goto err2;
+- }
+- break;
+- default:
+- // this shouldn't happen
+- goto err2;
+- }
+- }
+-
+- // get the font matrix
+- textMat = state->getTextMat();
+- fontSize = state->getFontSize();
+- m11 = textMat[0] * fontSize * state->getHorizScaling();
+- m12 = textMat[1] * fontSize * state->getHorizScaling();
+- m21 = textMat[2] * fontSize;
+- m22 = textMat[3] * fontSize;
+-
+- {
+- QMatrix painterMatrix = m_painter->worldMatrix();
+- matrix[0] = painterMatrix.m11();
+- matrix[1] = painterMatrix.m12();
+- matrix[2] = painterMatrix.m21();
+- matrix[3] = painterMatrix.m22();
+- matrix[4] = painterMatrix.dx();
+- matrix[5] = painterMatrix.dy();
+- }
+-
+- // create the scaled font
+- mat[0] = m11; mat[1] = -m12;
+- mat[2] = m21; mat[3] = -m22;
+- m_font = m_fontEngine->getFont(fontFile, mat, matrix);
+-
+- delete fontLoc;
+- if (fontsrc && !fontsrc->isFile)
+- fontsrc->unref();
+- return;
+-
+- err2:
+- delete id;
+- delete fontLoc;
+- err1:
+- if (fontsrc && !fontsrc->isFile)
+- fontsrc->unref();
+- return;
+-#endif
+-}
+-
+-static QPainterPath convertPath(GfxState *state, GfxPath *path, Qt::FillRule fillRule)
+-{
+- GfxSubpath *subpath;
+- double x1, y1, x2, y2, x3, y3;
+- int i, j;
+-
+- QPainterPath qPath;
+- qPath.setFillRule(fillRule);
+- for (i = 0; i < path->getNumSubpaths(); ++i) {
+- subpath = path->getSubpath(i);
+- if (subpath->getNumPoints() > 0) {
+- state->transform(subpath->getX(0), subpath->getY(0), &x1, &y1);
+- qPath.moveTo(x1, y1);
+- j = 1;
+- while (j < subpath->getNumPoints()) {
+- if (subpath->getCurve(j)) {
+- state->transform(subpath->getX(j), subpath->getY(j), &x1, &y1);
+- state->transform(subpath->getX(j+1), subpath->getY(j+1), &x2, &y2);
+- state->transform(subpath->getX(j+2), subpath->getY(j+2), &x3, &y3);
+- qPath.cubicTo( x1, y1, x2, y2, x3, y3);
+- j += 3;
+- } else {
+- state->transform(subpath->getX(j), subpath->getY(j), &x1, &y1);
+- qPath.lineTo(x1, y1);
+- ++j;
+- }
+- }
+- if (subpath->isClosed()) {
+- qPath.closeSubpath();
+- }
+- }
+- }
+- return qPath;
+-}
+-
+-void ArthurOutputDev::stroke(GfxState *state)
+-{
+- m_painter->strokePath( convertPath( state, state->getPath(), Qt::OddEvenFill ), m_currentPen );
+-}
+-
+-void ArthurOutputDev::fill(GfxState *state)
+-{
+- m_painter->fillPath( convertPath( state, state->getPath(), Qt::WindingFill ), m_currentBrush );
+-}
+-
+-void ArthurOutputDev::eoFill(GfxState *state)
+-{
+- m_painter->fillPath( convertPath( state, state->getPath(), Qt::OddEvenFill ), m_currentBrush );
+-}
+-
+-void ArthurOutputDev::clip(GfxState *state)
+-{
+- m_painter->setClipPath(convertPath( state, state->getPath(), Qt::WindingFill ) );
+-}
+-
+-void ArthurOutputDev::eoClip(GfxState *state)
+-{
+- m_painter->setClipPath(convertPath( state, state->getPath(), Qt::OddEvenFill ) );
+-}
+-
+-void ArthurOutputDev::drawChar(GfxState *state, double x, double y,
+- double dx, double dy,
+- double originX, double originY,
+- CharCode code, int nBytes, Unicode *u, int uLen) {
+-#ifdef HAVE_SPLASH
+- double x1, y1;
+- double x2, y2;
+-// SplashPath *path;
+- int render;
+-
+- if (m_needFontUpdate) {
+- updateFont(state);
+- }
+- if (!m_font) {
+- return;
+- }
+-
+- // check for invisible text -- this is used by Acrobat Capture
+- render = state->getRender();
+- if (render == 3) {
+- return;
+- }
+-
+- x -= originX;
+- y -= originY;
+-
+- // fill
+- if (!(render & 1)) {
+- SplashPath * fontPath;
+- fontPath = m_font->getGlyphPath(code);
+- if (fontPath) {
+- QPainterPath qPath;
+- qPath.setFillRule(Qt::WindingFill);
+- for (int i = 0; i < fontPath->length; ++i) {
+- // SplashPath.flags: bitwise or allowed
+- if (fontPath->flags[i] & splashPathLast || fontPath->flags[i] & splashPathClosed) {
+- qPath.closeSubpath();
+- }
+- if (fontPath->flags[i] & splashPathFirst) {
+- state->transform(fontPath->pts[i].x+x, -fontPath->pts[i].y+y, &x1, &y1);
+- qPath.moveTo(x1,y1);
+- }
+- if (fontPath->flags[i] & splashPathCurve) {
+- state->transform(fontPath->pts[i].x+x, -fontPath->pts[i].y+y, &x1, &y1);
+- state->transform(fontPath->pts[i+1].x+x, -fontPath->pts[i+1].y+y, &x2, &y2);
+- qPath.quadTo(x1,y1,x2,y2);
+- ++i;
+- }
+- // FIXME fix this
+- // else if (fontPath->flags[i] & splashPathArcCW) {
+- // qDebug() << "Need to implement arc";
+- // }
+- else {
+- state->transform(fontPath->pts[i].x+x, -fontPath->pts[i].y+y, &x1, &y1);
+- qPath.lineTo(x1,y1);
+- }
+- }
+- GfxRGB rgb;
+- QColor brushColour = m_currentBrush.color();
+- state->getFillRGB(&rgb);
+- brushColour.setRgbF(colToDbl(rgb.r), colToDbl(rgb.g), colToDbl(rgb.b), state->getFillOpacity());
+- m_painter->setBrush(brushColour);
+- m_painter->setPen(Qt::NoPen);
+- m_painter->drawPath(qPath);
+- delete fontPath;
+- }
+- }
+-
+- // stroke
+- if ((render & 3) == 1 || (render & 3) == 2) {
+- qDebug() << "no stroke";
+- /*
+- if ((path = m_font->getGlyphPath(code))) {
+- path->offset((SplashCoord)x1, (SplashCoord)y1);
+- splash->stroke(path);
+- delete path;
+- }
+- */
+- }
+-
+- // clip
+- if (render & 4) {
+- qDebug() << "no clip";
+- /*
+- path = m_font->getGlyphPath(code);
+- path->offset((SplashCoord)x1, (SplashCoord)y1);
+- if (textClipPath) {
+- textClipPath->append(path);
+- delete path;
+- } else {
+- textClipPath = path;
+- }
+- */
+- }
+-#endif
+-}
+-
+-GBool ArthurOutputDev::beginType3Char(GfxState *state, double x, double y,
+- double dx, double dy,
+- CharCode code, Unicode *u, int uLen)
+-{
+- return gFalse;
+-}
+-
+-void ArthurOutputDev::endType3Char(GfxState *state)
+-{
+-}
+-
+-void ArthurOutputDev::type3D0(GfxState *state, double wx, double wy)
+-{
+-}
+-
+-void ArthurOutputDev::type3D1(GfxState *state, double wx, double wy,
+- double llx, double lly, double urx, double ury)
+-{
+-}
+-
+-void ArthurOutputDev::endTextObject(GfxState *state)
+-{
+-}
+-
+-
+-void ArthurOutputDev::drawImageMask(GfxState *state, Object *ref, Stream *str,
+- int width, int height, GBool invert,
+- GBool interpolate, GBool inlineImg)
+-{
+- qDebug() << "drawImageMask";
+-#if 0
+- unsigned char *buffer;
+- unsigned char *dest;
+- cairo_surface_t *image;
+- cairo_pattern_t *pattern;
+- int x, y;
+- ImageStream *imgStr;
+- Guchar *pix;
+- double *ctm;
+- cairo_matrix_t matrix;
+- int invert_bit;
+- int row_stride;
+-
+- row_stride = (width + 3) & ~3;
+- buffer = (unsigned char *) malloc (height * row_stride);
+- if (buffer == NULL) {
+- error(-1, "Unable to allocate memory for image.");
+- return;
+- }
+-
+- /* TODO: Do we want to cache these? */
+- imgStr = new ImageStream(str, width, 1, 1);
+- imgStr->reset();
+-
+- invert_bit = invert ? 1 : 0;
+-
+- for (y = 0; y < height; y++) {
+- pix = imgStr->getLine();
+- dest = buffer + y * row_stride;
+- for (x = 0; x < width; x++) {
+-
+- if (pix[x] ^ invert_bit)
+- *dest++ = 0;
+- else
+- *dest++ = 255;
+- }
+- }
+-
+- image = cairo_image_surface_create_for_data (buffer, CAIRO_FORMAT_A8,
+- width, height, row_stride);
+- if (image == NULL)
+- return;
+- pattern = cairo_pattern_create_for_surface (image);
+- if (pattern == NULL)
+- return;
+-
+- ctm = state->getCTM();
+- LOG (printf ("drawImageMask %dx%d, matrix: %f, %f, %f, %f, %f, %f\n",
+- width, height, ctm[0], ctm[1], ctm[2], ctm[3], ctm[4], ctm[5]));
+- matrix.xx = ctm[0] / width;
+- matrix.xy = -ctm[2] / height;
+- matrix.yx = ctm[1] / width;
+- matrix.yy = -ctm[3] / height;
+- matrix.x0 = ctm[2] + ctm[4];
+- matrix.y0 = ctm[3] + ctm[5];
+- cairo_matrix_invert (&matrix);
+- cairo_pattern_set_matrix (pattern, &matrix);
+-
+- cairo_pattern_set_filter (pattern, CAIRO_FILTER_BEST);
+- /* FIXME: Doesn't the image mask support any colorspace? */
+- cairo_set_source_rgb (cairo, fill_color.r, fill_color.g, fill_color.b);
+- cairo_mask (cairo, pattern);
+-
+- cairo_pattern_destroy (pattern);
+- cairo_surface_destroy (image);
+- free (buffer);
+- imgStr->close ();
+- delete imgStr;
+-#endif
+-}
+-
+-//TODO: lots more work here.
+-void ArthurOutputDev::drawImage(GfxState *state, Object *ref, Stream *str,
+- int width, int height,
+- GfxImageColorMap *colorMap,
+- GBool interpolate, int *maskColors, GBool inlineImg)
+-{
+- unsigned int *data;
+- unsigned int *line;
+- int x, y;
+- ImageStream *imgStr;
+- Guchar *pix;
+- int i;
+- double *ctm;
+- QMatrix matrix;
+- QImage image;
+- int stride;
+-
+- /* TODO: Do we want to cache these? */
+- imgStr = new ImageStream(str, width,
+- colorMap->getNumPixelComps(),
+- colorMap->getBits());
+- imgStr->reset();
+-
+- image = QImage(width, height, QImage::Format_ARGB32);
+- data = (unsigned int *)image.bits();
+- stride = image.bytesPerLine()/4;
+- for (y = 0; y < height; y++) {
+- pix = imgStr->getLine();
+- line = data+y*stride;
+- colorMap->getRGBLine(pix, line, width);
+-
+- if (maskColors) {
+- for (x = 0; x < width; x++) {
+- for (i = 0; i < colorMap->getNumPixelComps(); ++i) {
+- if (pix[i] < maskColors[2*i] * 255||
+- pix[i] > maskColors[2*i+1] * 255) {
+- *line = *line | 0xff000000;
+- break;
+- }
+- }
+- pix += colorMap->getNumPixelComps();
+- line++;
+- }
+- } else {
+- for (x = 0; x < width; x++) { *line = *line | 0xff000000; line++; }
+- }
+- }
+-
+- ctm = state->getCTM();
+- matrix.setMatrix(ctm[0] / width, ctm[1] / width, -ctm[2] / height, -ctm[3] / height, ctm[2] + ctm[4], ctm[3] + ctm[5]);
+-
+- m_painter->setMatrix(matrix, true);
+- m_painter->drawImage( QPoint(0,0), image );
+- delete imgStr;
+-
+-}
+diff --git a/qt4/src/ArthurOutputDev.h b/qt4/src/ArthurOutputDev.h
+deleted file mode 100644
+index 9d5e8679..00000000
+--- a/qt4/src/ArthurOutputDev.h
++++ /dev/null
+@@ -1,170 +0,0 @@
+-//========================================================================
+-//
+-// ArthurOutputDev.h
+-//
+-// Copyright 2003 Glyph & Cog, LLC
+-//
+-//========================================================================
+-
+-//========================================================================
+-//
+-// Modified under the Poppler project - http://poppler.freedesktop.org
+-//
+-// All changes made under the Poppler project to this file are licensed
+-// under GPL version 2 or later
+-//
+-// Copyright (C) 2005 Brad Hards <bradh@frogmouth.net>
+-// Copyright (C) 2005 Albert Astals Cid <aacid@kde.org>
+-// Copyright (C) 2009, 2011 Carlos Garcia Campos <carlosgc@gnome.org>
+-// Copyright (C) 2010 Pino Toscano <pino@kde.org>
+-// Copyright (C) 2011 Andreas Hartmetz <ahartmetz@gmail.com>
+-// Copyright (C) 2013 Thomas Freitag <Thomas.Freitag@alfa.de>
+-//
+-// To see a description of the changes please see the Changelog file that
+-// came with your tarball or type make ChangeLog if you are building from git
+-//
+-//========================================================================
+-
+-#ifndef ARTHUROUTPUTDEV_H
+-#define ARTHUROUTPUTDEV_H
+-
+-#ifdef USE_GCC_PRAGMAS
+-#pragma interface
+-#endif
+-
+-#include "goo/gtypes.h"
+-#include "OutputDev.h"
+-#include "GfxState.h"
+-
+-#include <QtGui/QPainter>
+-
+-class GfxState;
+-class GfxPath;
+-class Gfx8BitFont;
+-struct GfxRGB;
+-
+-class SplashFont;
+-class SplashFontEngine;
+-struct SplashGlyphBitmap;
+-
+-//------------------------------------------------------------------------
+-// ArthurOutputDev - Qt 4 QPainter renderer
+-//------------------------------------------------------------------------
+-
+-class ArthurOutputDev: public OutputDev {
+-public:
+- /**
+- * Describes how fonts are distorted (aka hinted) to fit the pixel grid.
+- * More hinting means sharper edges and less adherence to the true letter shapes.
+- */
+- enum FontHinting {
+- NoHinting = 0, ///< Font shapes are left unchanged
+- SlightHinting, ///< Font shapes are distorted vertically only
+- FullHinting ///< Font shapes are distorted horizontally and vertically
+- };
+-
+- // Constructor.
+- ArthurOutputDev(QPainter *painter );
+-
+- // Destructor.
+- virtual ~ArthurOutputDev();
+-
+- void setFontHinting(FontHinting hinting) { m_fontHinting = hinting; }
+-
+- //----- get info about output device
+-
+- // Does this device use upside-down coordinates?
+- // (Upside-down means (0,0) is the top left corner of the page.)
+- virtual GBool upsideDown() { return gTrue; }
+-
+- // Does this device use drawChar() or drawString()?
+- virtual GBool useDrawChar() { return gTrue; }
+-
+- // Does this device use beginType3Char/endType3Char? Otherwise,
+- // text in Type 3 fonts will be drawn with drawChar/drawString.
+- virtual GBool interpretType3Chars() { return gTrue; }
+-
+- //----- initialization and control
+-
+- // Start a page.
+- virtual void startPage(int pageNum, GfxState *state, XRef *xref);
+-
+- // End a page.
+- virtual void endPage();
+-
+- //----- save/restore graphics state
+- virtual void saveState(GfxState *state);
+- virtual void restoreState(GfxState *state);
+-
+- //----- update graphics state
+- virtual void updateAll(GfxState *state);
+- virtual void updateCTM(GfxState *state, double m11, double m12,
+- double m21, double m22, double m31, double m32);
+- virtual void updateLineDash(GfxState *state);
+- virtual void updateFlatness(GfxState *state);
+- virtual void updateLineJoin(GfxState *state);
+- virtual void updateLineCap(GfxState *state);
+- virtual void updateMiterLimit(GfxState *state);
+- virtual void updateLineWidth(GfxState *state);
+- virtual void updateFillColor(GfxState *state);
+- virtual void updateStrokeColor(GfxState *state);
+- virtual void updateFillOpacity(GfxState *state);
+- virtual void updateStrokeOpacity(GfxState *state);
+-
+- //----- update text state
+- virtual void updateFont(GfxState *state);
+-
+- //----- path painting
+- virtual void stroke(GfxState *state);
+- virtual void fill(GfxState *state);
+- virtual void eoFill(GfxState *state);
+-
+- //----- path clipping
+- virtual void clip(GfxState *state);
+- virtual void eoClip(GfxState *state);
+-
+- //----- text drawing
+- // virtual void drawString(GfxState *state, GooString *s);
+- virtual void drawChar(GfxState *state, double x, double y,
+- double dx, double dy,
+- double originX, double originY,
+- CharCode code, int nBytes, Unicode *u, int uLen);
+- virtual GBool beginType3Char(GfxState *state, double x, double y,
+- double dx, double dy,
+- CharCode code, Unicode *u, int uLen);
+- virtual void endType3Char(GfxState *state);
+- virtual void endTextObject(GfxState *state);
+-
+- //----- image drawing
+- virtual void drawImageMask(GfxState *state, Object *ref, Stream *str,
+- int width, int height, GBool invert,
+- GBool interpolate, GBool inlineImg);
+- virtual void drawImage(GfxState *state, Object *ref, Stream *str,
+- int width, int height, GfxImageColorMap *colorMap,
+- GBool interpolate, int *maskColors, GBool inlineImg);
+-
+- //----- Type 3 font operators
+- virtual void type3D0(GfxState *state, double wx, double wy);
+- virtual void type3D1(GfxState *state, double wx, double wy,
+- double llx, double lly, double urx, double ury);
+-
+- //----- special access
+-
+- // Called to indicate that a new PDF document has been loaded.
+- void startDoc(XRef *xrefA);
+-
+- GBool isReverseVideo() { return gFalse; }
+-
+-private:
+- QPainter *m_painter;
+- FontHinting m_fontHinting;
+- QFont m_currentFont;
+- QPen m_currentPen;
+- QBrush m_currentBrush;
+- GBool m_needFontUpdate; // set when the font needs to be updated
+- SplashFontEngine *m_fontEngine;
+- SplashFont *m_font; // current font
+- XRef *xref; // xref table for current document
+-};
+-
+-#endif
+diff --git a/qt4/src/CMakeLists.txt b/qt4/src/CMakeLists.txt
+deleted file mode 100644
+index f6547726..00000000
+--- a/qt4/src/CMakeLists.txt
++++ /dev/null
+@@ -1,54 +0,0 @@
+-add_definitions(${QT4_DEFINITIONS})
+-
+-include_directories(
+- ${CMAKE_CURRENT_SOURCE_DIR}
+- ${QT4_INCLUDE_DIR}
+- ${CMAKE_CURRENT_BINARY_DIR}
+-)
+-
+-set(poppler_qt4_SRCS
+- poppler-annotation.cc
+- poppler-document.cc
+- poppler-embeddedfile.cc
+- poppler-fontinfo.cc
+- poppler-form.cc
+- poppler-link.cc
+- poppler-link-extractor.cc
+- poppler-movie.cc
+- poppler-optcontent.cc
+- poppler-page.cc
+- poppler-base-converter.cc
+- poppler-pdf-converter.cc
+- poppler-private.cc
+- poppler-ps-converter.cc
+- poppler-qiodeviceoutstream.cc
+- poppler-sound.cc
+- poppler-textbox.cc
+- poppler-page-transition.cc
+- poppler-media.cc
+- ArthurOutputDev.cc
+-)
+-qt4_automoc(${poppler_qt4_SRCS})
+-add_library(poppler-qt4 SHARED ${poppler_qt4_SRCS})
+-set_target_properties(poppler-qt4 PROPERTIES VERSION 4.11.0 SOVERSION 4)
+-if(MINGW)
+- get_target_property(POPPLER_QT4_SOVERSION poppler-qt4 SOVERSION)
+- set_target_properties(poppler-qt4 PROPERTIES SUFFIX "-${POPPLER_QT4_SOVERSION}${CMAKE_SHARED_LIBRARY_SUFFIX}")
+-endif()
+-target_link_libraries(poppler-qt4 poppler ${QT4_QTCORE_LIBRARY} ${QT4_QTGUI_LIBRARY} ${QT4_QTXML_LIBRARY})
+-if(MSVC)
+-target_link_libraries(poppler-qt4 poppler ${poppler_LIBS})
+-endif()
+-install(TARGETS poppler-qt4 RUNTIME DESTINATION bin LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
+-
+-install(FILES
+- poppler-qt4.h
+- poppler-link.h
+- poppler-annotation.h
+- poppler-form.h
+- poppler-optcontent.h
+- poppler-export.h
+- poppler-page-transition.h
+- poppler-media.h
+- DESTINATION include/poppler/qt4)
+-
+diff --git a/qt4/src/Doxyfile b/qt4/src/Doxyfile
+deleted file mode 100644
+index e68690ac..00000000
+--- a/qt4/src/Doxyfile
++++ /dev/null
+@@ -1,1637 +0,0 @@
+-# Doxyfile 1.7.1
+-
+-# This file describes the settings to be used by the documentation system
+-# doxygen (www.doxygen.org) for a project
+-#
+-# All text after a hash (#) is considered a comment and will be ignored
+-# The format is:
+-# TAG = value [value, ...]
+-# For lists items can also be appended using:
+-# TAG += value [value, ...]
+-# Values that contain spaces should be placed between quotes (" ")
+-
+-#---------------------------------------------------------------------------
+-# Project related configuration options
+-#---------------------------------------------------------------------------
+-
+-# This tag specifies the encoding used for all characters in the config file
+-# that follow. The default is UTF-8 which is also the encoding used for all
+-# text before the first occurrence of this tag. Doxygen uses libiconv (or the
+-# iconv built into libc) for the transcoding. See
+-# http://www.gnu.org/software/libiconv for the list of possible encodings.
+-
+-DOXYFILE_ENCODING = UTF-8
+-
+-# The PROJECT_NAME tag is a single word (or a sequence of words surrounded
+-# by quotes) that should identify the project.
+-
+-PROJECT_NAME = "Poppler Qt4 "
+-
+-# The PROJECT_NUMBER tag can be used to enter a project or revision number.
+-# This could be handy for archiving the generated documentation or
+-# if some version control system is used.
+-
+-PROJECT_NUMBER = 0.61.1
+-
+-# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute)
+-# base path where the generated documentation will be put.
+-# If a relative path is entered, it will be relative to the location
+-# where doxygen was started. If left blank the current directory will be used.
+-
+-OUTPUT_DIRECTORY =
+-
+-# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create
+-# 4096 sub-directories (in 2 levels) under the output directory of each output
+-# format and will distribute the generated files over these directories.
+-# Enabling this option can be useful when feeding doxygen a huge amount of
+-# source files, where putting all generated files in the same directory would
+-# otherwise cause performance problems for the file system.
+-
+-CREATE_SUBDIRS = NO
+-
+-# The OUTPUT_LANGUAGE tag is used to specify the language in which all
+-# documentation generated by doxygen is written. Doxygen will use this
+-# information to generate all constant output in the proper language.
+-# The default language is English, other supported languages are:
+-# Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional,
+-# Croatian, Czech, Danish, Dutch, Esperanto, Farsi, Finnish, French, German,
+-# Greek, Hungarian, Italian, Japanese, Japanese-en (Japanese with English
+-# messages), Korean, Korean-en, Lithuanian, Norwegian, Macedonian, Persian,
+-# Polish, Portuguese, Romanian, Russian, Serbian, Serbian-Cyrilic, Slovak,
+-# Slovene, Spanish, Swedish, Ukrainian, and Vietnamese.
+-
+-OUTPUT_LANGUAGE = English
+-
+-# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will
+-# include brief member descriptions after the members that are listed in
+-# the file and class documentation (similar to JavaDoc).
+-# Set to NO to disable this.
+-
+-BRIEF_MEMBER_DESC = NO
+-
+-# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend
+-# the brief description of a member or function before the detailed description.
+-# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the
+-# brief descriptions will be completely suppressed.
+-
+-REPEAT_BRIEF = YES
+-
+-# This tag implements a quasi-intelligent brief description abbreviator
+-# that is used to form the text in various listings. Each string
+-# in this list, if found as the leading text of the brief description, will be
+-# stripped from the text and the result after processing the whole list, is
+-# used as the annotated text. Otherwise, the brief description is used as-is.
+-# If left blank, the following values are used ("$name" is automatically
+-# replaced with the name of the entity): "The $name class" "The $name widget"
+-# "The $name file" "is" "provides" "specifies" "contains"
+-# "represents" "a" "an" "the"
+-
+-ABBREVIATE_BRIEF =
+-
+-# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then
+-# Doxygen will generate a detailed section even if there is only a brief
+-# description.
+-
+-ALWAYS_DETAILED_SEC = NO
+-
+-# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all
+-# inherited members of a class in the documentation of that class as if those
+-# members were ordinary class members. Constructors, destructors and assignment
+-# operators of the base classes will not be shown.
+-
+-INLINE_INHERITED_MEMB = NO
+-
+-# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full
+-# path before files name in the file list and in the header files. If set
+-# to NO the shortest path that makes the file name unique will be used.
+-
+-FULL_PATH_NAMES = YES
+-
+-# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag
+-# can be used to strip a user-defined part of the path. Stripping is
+-# only done if one of the specified strings matches the left-hand part of
+-# the path. The tag can be used to show relative paths in the file list.
+-# If left blank the directory from which doxygen is run is used as the
+-# path to strip.
+-
+-STRIP_FROM_PATH =
+-
+-# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of
+-# the path mentioned in the documentation of a class, which tells
+-# the reader which header file to include in order to use a class.
+-# If left blank only the name of the header file containing the class
+-# definition is used. Otherwise one should specify the include paths that
+-# are normally passed to the compiler using the -I flag.
+-
+-STRIP_FROM_INC_PATH =
+-
+-# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter
+-# (but less readable) file names. This can be useful is your file systems
+-# doesn't support long names like on DOS, Mac, or CD-ROM.
+-
+-SHORT_NAMES = NO
+-
+-# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen
+-# will interpret the first line (until the first dot) of a JavaDoc-style
+-# comment as the brief description. If set to NO, the JavaDoc
+-# comments will behave just like regular Qt-style comments
+-# (thus requiring an explicit @brief command for a brief description.)
+-
+-JAVADOC_AUTOBRIEF = YES
+-
+-# If the QT_AUTOBRIEF tag is set to YES then Doxygen will
+-# interpret the first line (until the first dot) of a Qt-style
+-# comment as the brief description. If set to NO, the comments
+-# will behave just like regular Qt-style comments (thus requiring
+-# an explicit \brief command for a brief description.)
+-
+-QT_AUTOBRIEF = NO
+-
+-# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen
+-# treat a multi-line C++ special comment block (i.e. a block of //! or ///
+-# comments) as a brief description. This used to be the default behaviour.
+-# The new default is to treat a multi-line C++ comment block as a detailed
+-# description. Set this tag to YES if you prefer the old behaviour instead.
+-
+-MULTILINE_CPP_IS_BRIEF = NO
+-
+-# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented
+-# member inherits the documentation from any documented member that it
+-# re-implements.
+-
+-INHERIT_DOCS = YES
+-
+-# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce
+-# a new page for each member. If set to NO, the documentation of a member will
+-# be part of the file/class/namespace that contains it.
+-
+-SEPARATE_MEMBER_PAGES = NO
+-
+-# The TAB_SIZE tag can be used to set the number of spaces in a tab.
+-# Doxygen uses this value to replace tabs by spaces in code fragments.
+-
+-TAB_SIZE = 8
+-
+-# This tag can be used to specify a number of aliases that acts
+-# as commands in the documentation. An alias has the form "name=value".
+-# For example adding "sideeffect=\par Side Effects:\n" will allow you to
+-# put the command \sideeffect (or @sideeffect) in the documentation, which
+-# will result in a user-defined paragraph with heading "Side Effects:".
+-# You can put \n's in the value part of an alias to insert newlines.
+-
+-ALIASES =
+-
+-# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C
+-# sources only. Doxygen will then generate output that is more tailored for C.
+-# For instance, some of the names that are used will be different. The list
+-# of all members will be omitted, etc.
+-
+-OPTIMIZE_OUTPUT_FOR_C = NO
+-
+-# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java
+-# sources only. Doxygen will then generate output that is more tailored for
+-# Java. For instance, namespaces will be presented as packages, qualified
+-# scopes will look different, etc.
+-
+-OPTIMIZE_OUTPUT_JAVA = NO
+-
+-# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran
+-# sources only. Doxygen will then generate output that is more tailored for
+-# Fortran.
+-
+-OPTIMIZE_FOR_FORTRAN = NO
+-
+-# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL
+-# sources. Doxygen will then generate output that is tailored for
+-# VHDL.
+-
+-OPTIMIZE_OUTPUT_VHDL = NO
+-
+-# Doxygen selects the parser to use depending on the extension of the files it
+-# parses. With this tag you can assign which parser to use for a given extension.
+-# Doxygen has a built-in mapping, but you can override or extend it using this
+-# tag. The format is ext=language, where ext is a file extension, and language
+-# is one of the parsers supported by doxygen: IDL, Java, Javascript, CSharp, C,
+-# C++, D, PHP, Objective-C, Python, Fortran, VHDL, C, C++. For instance to make
+-# doxygen treat .inc files as Fortran files (default is PHP), and .f files as C
+-# (default is Fortran), use: inc=Fortran f=C. Note that for custom extensions
+-# you also need to set FILE_PATTERNS otherwise the files are not read by doxygen.
+-
+-EXTENSION_MAPPING =
+-
+-# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want
+-# to include (a tag file for) the STL sources as input, then you should
+-# set this tag to YES in order to let doxygen match functions declarations and
+-# definitions whose arguments contain STL classes (e.g. func(std::string); v.s.
+-# func(std::string) {}). This also make the inheritance and collaboration
+-# diagrams that involve STL classes more complete and accurate.
+-
+-BUILTIN_STL_SUPPORT = NO
+-
+-# If you use Microsoft's C++/CLI language, you should set this option to YES to
+-# enable parsing support.
+-
+-CPP_CLI_SUPPORT = NO
+-
+-# Set the SIP_SUPPORT tag to YES if your project consists of sip sources only.
+-# Doxygen will parse them like normal C++ but will assume all classes use public
+-# instead of private inheritance when no explicit protection keyword is present.
+-
+-SIP_SUPPORT = NO
+-
+-# For Microsoft's IDL there are propget and propput attributes to indicate getter
+-# and setter methods for a property. Setting this option to YES (the default)
+-# will make doxygen to replace the get and set methods by a property in the
+-# documentation. This will only work if the methods are indeed getting or
+-# setting a simple type. If this is not the case, or you want to show the
+-# methods anyway, you should set this option to NO.
+-
+-IDL_PROPERTY_SUPPORT = YES
+-
+-# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC
+-# tag is set to YES, then doxygen will reuse the documentation of the first
+-# member in the group (if any) for the other members of the group. By default
+-# all members of a group must be documented explicitly.
+-
+-DISTRIBUTE_GROUP_DOC = NO
+-
+-# Set the SUBGROUPING tag to YES (the default) to allow class member groups of
+-# the same type (for instance a group of public functions) to be put as a
+-# subgroup of that type (e.g. under the Public Functions section). Set it to
+-# NO to prevent subgrouping. Alternatively, this can be done per class using
+-# the \nosubgrouping command.
+-
+-SUBGROUPING = YES
+-
+-# When TYPEDEF_HIDES_STRUCT is enabled, a typedef of a struct, union, or enum
+-# is documented as struct, union, or enum with the name of the typedef. So
+-# typedef struct TypeS {} TypeT, will appear in the documentation as a struct
+-# with name TypeT. When disabled the typedef will appear as a member of a file,
+-# namespace, or class. And the struct will be named TypeS. This can typically
+-# be useful for C code in case the coding convention dictates that all compound
+-# types are typedef'ed and only the typedef is referenced, never the tag name.
+-
+-TYPEDEF_HIDES_STRUCT = NO
+-
+-# The SYMBOL_CACHE_SIZE determines the size of the internal cache use to
+-# determine which symbols to keep in memory and which to flush to disk.
+-# When the cache is full, less often used symbols will be written to disk.
+-# For small to medium size projects (<1000 input files) the default value is
+-# probably good enough. For larger projects a too small cache size can cause
+-# doxygen to be busy swapping symbols to and from disk most of the time
+-# causing a significant performance penality.
+-# If the system has enough physical memory increasing the cache will improve the
+-# performance by keeping more symbols in memory. Note that the value works on
+-# a logarithmic scale so increasing the size by one will rougly double the
+-# memory usage. The cache size is given by this formula:
+-# 2^(16+SYMBOL_CACHE_SIZE). The valid range is 0..9, the default is 0,
+-# corresponding to a cache size of 2^16 = 65536 symbols
+-
+-SYMBOL_CACHE_SIZE = 0
+-
+-#---------------------------------------------------------------------------
+-# Build related configuration options
+-#---------------------------------------------------------------------------
+-
+-# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in
+-# documentation are documented, even if no documentation was available.
+-# Private class members and static file members will be hidden unless
+-# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES
+-
+-EXTRACT_ALL = NO
+-
+-# If the EXTRACT_PRIVATE tag is set to YES all private members of a class
+-# will be included in the documentation.
+-
+-EXTRACT_PRIVATE = NO
+-
+-# If the EXTRACT_STATIC tag is set to YES all static members of a file
+-# will be included in the documentation.
+-
+-EXTRACT_STATIC = NO
+-
+-# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs)
+-# defined locally in source files will be included in the documentation.
+-# If set to NO only classes defined in header files are included.
+-
+-EXTRACT_LOCAL_CLASSES = NO
+-
+-# This flag is only useful for Objective-C code. When set to YES local
+-# methods, which are defined in the implementation section but not in
+-# the interface are included in the documentation.
+-# If set to NO (the default) only methods in the interface are included.
+-
+-EXTRACT_LOCAL_METHODS = NO
+-
+-# If this flag is set to YES, the members of anonymous namespaces will be
+-# extracted and appear in the documentation as a namespace called
+-# 'anonymous_namespace{file}', where file will be replaced with the base
+-# name of the file that contains the anonymous namespace. By default
+-# anonymous namespace are hidden.
+-
+-EXTRACT_ANON_NSPACES = NO
+-
+-# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all
+-# undocumented members of documented classes, files or namespaces.
+-# If set to NO (the default) these members will be included in the
+-# various overviews, but no documentation section is generated.
+-# This option has no effect if EXTRACT_ALL is enabled.
+-
+-HIDE_UNDOC_MEMBERS = NO
+-
+-# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all
+-# undocumented classes that are normally visible in the class hierarchy.
+-# If set to NO (the default) these classes will be included in the various
+-# overviews. This option has no effect if EXTRACT_ALL is enabled.
+-
+-HIDE_UNDOC_CLASSES = NO
+-
+-# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all
+-# friend (class|struct|union) declarations.
+-# If set to NO (the default) these declarations will be included in the
+-# documentation.
+-
+-HIDE_FRIEND_COMPOUNDS = YES
+-
+-# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any
+-# documentation blocks found inside the body of a function.
+-# If set to NO (the default) these blocks will be appended to the
+-# function's detailed documentation block.
+-
+-HIDE_IN_BODY_DOCS = NO
+-
+-# The INTERNAL_DOCS tag determines if documentation
+-# that is typed after a \internal command is included. If the tag is set
+-# to NO (the default) then the documentation will be excluded.
+-# Set it to YES to include the internal documentation.
+-
+-INTERNAL_DOCS = NO
+-
+-# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate
+-# file names in lower-case letters. If set to YES upper-case letters are also
+-# allowed. This is useful if you have classes or files whose names only differ
+-# in case and if your file system supports case sensitive file names. Windows
+-# and Mac users are advised to set this option to NO.
+-
+-CASE_SENSE_NAMES = YES
+-
+-# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen
+-# will show members with their full class and namespace scopes in the
+-# documentation. If set to YES the scope will be hidden.
+-
+-HIDE_SCOPE_NAMES = NO
+-
+-# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen
+-# will put a list of the files that are included by a file in the documentation
+-# of that file.
+-
+-SHOW_INCLUDE_FILES = YES
+-
+-# If the FORCE_LOCAL_INCLUDES tag is set to YES then Doxygen
+-# will list include files with double quotes in the documentation
+-# rather than with sharp brackets.
+-
+-FORCE_LOCAL_INCLUDES = NO
+-
+-# If the INLINE_INFO tag is set to YES (the default) then a tag [inline]
+-# is inserted in the documentation for inline members.
+-
+-INLINE_INFO = NO
+-
+-# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen
+-# will sort the (detailed) documentation of file and class members
+-# alphabetically by member name. If set to NO the members will appear in
+-# declaration order.
+-
+-SORT_MEMBER_DOCS = YES
+-
+-# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the
+-# brief documentation of file, namespace and class members alphabetically
+-# by member name. If set to NO (the default) the members will appear in
+-# declaration order.
+-
+-SORT_BRIEF_DOCS = YES
+-
+-# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen
+-# will sort the (brief and detailed) documentation of class members so that
+-# constructors and destructors are listed first. If set to NO (the default)
+-# the constructors will appear in the respective orders defined by
+-# SORT_MEMBER_DOCS and SORT_BRIEF_DOCS.
+-# This tag will be ignored for brief docs if SORT_BRIEF_DOCS is set to NO
+-# and ignored for detailed docs if SORT_MEMBER_DOCS is set to NO.
+-
+-SORT_MEMBERS_CTORS_1ST = NO
+-
+-# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the
+-# hierarchy of group names into alphabetical order. If set to NO (the default)
+-# the group names will appear in their defined order.
+-
+-SORT_GROUP_NAMES = NO
+-
+-# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be
+-# sorted by fully-qualified names, including namespaces. If set to
+-# NO (the default), the class list will be sorted only by class name,
+-# not including the namespace part.
+-# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES.
+-# Note: This option applies only to the class list, not to the
+-# alphabetical list.
+-
+-SORT_BY_SCOPE_NAME = YES
+-
+-# The GENERATE_TODOLIST tag can be used to enable (YES) or
+-# disable (NO) the todo list. This list is created by putting \todo
+-# commands in the documentation.
+-
+-GENERATE_TODOLIST = YES
+-
+-# The GENERATE_TESTLIST tag can be used to enable (YES) or
+-# disable (NO) the test list. This list is created by putting \test
+-# commands in the documentation.
+-
+-GENERATE_TESTLIST = YES
+-
+-# The GENERATE_BUGLIST tag can be used to enable (YES) or
+-# disable (NO) the bug list. This list is created by putting \bug
+-# commands in the documentation.
+-
+-GENERATE_BUGLIST = YES
+-
+-# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or
+-# disable (NO) the deprecated list. This list is created by putting
+-# \deprecated commands in the documentation.
+-
+-GENERATE_DEPRECATEDLIST= YES
+-
+-# The ENABLED_SECTIONS tag can be used to enable conditional
+-# documentation sections, marked by \if sectionname ... \endif.
+-
+-ENABLED_SECTIONS =
+-
+-# The MAX_INITIALIZER_LINES tag determines the maximum number of lines
+-# the initial value of a variable or define consists of for it to appear in
+-# the documentation. If the initializer consists of more lines than specified
+-# here it will be hidden. Use a value of 0 to hide initializers completely.
+-# The appearance of the initializer of individual variables and defines in the
+-# documentation can be controlled using \showinitializer or \hideinitializer
+-# command in the documentation regardless of this setting.
+-
+-MAX_INITIALIZER_LINES = 30
+-
+-# Set the SHOW_USED_FILES tag to NO to disable the list of files generated
+-# at the bottom of the documentation of classes and structs. If set to YES the
+-# list will mention the files that were used to generate the documentation.
+-
+-SHOW_USED_FILES = YES
+-
+-# If the sources in your project are distributed over multiple directories
+-# then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy
+-# in the documentation. The default is NO.
+-
+-SHOW_DIRECTORIES = NO
+-
+-# Set the SHOW_FILES tag to NO to disable the generation of the Files page.
+-# This will remove the Files entry from the Quick Index and from the
+-# Folder Tree View (if specified). The default is YES.
+-
+-SHOW_FILES = YES
+-
+-# Set the SHOW_NAMESPACES tag to NO to disable the generation of the
+-# Namespaces page.
+-# This will remove the Namespaces entry from the Quick Index
+-# and from the Folder Tree View (if specified). The default is YES.
+-
+-SHOW_NAMESPACES = YES
+-
+-# The FILE_VERSION_FILTER tag can be used to specify a program or script that
+-# doxygen should invoke to get the current version for each file (typically from
+-# the version control system). Doxygen will invoke the program by executing (via
+-# popen()) the command <command> <input-file>, where <command> is the value of
+-# the FILE_VERSION_FILTER tag, and <input-file> is the name of an input file
+-# provided by doxygen. Whatever the program writes to standard output
+-# is used as the file version. See the manual for examples.
+-
+-FILE_VERSION_FILTER =
+-
+-# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed
+-# by doxygen. The layout file controls the global structure of the generated
+-# output files in an output format independent way. The create the layout file
+-# that represents doxygen's defaults, run doxygen with the -l option.
+-# You can optionally specify a file name after the option, if omitted
+-# DoxygenLayout.xml will be used as the name of the layout file.
+-
+-LAYOUT_FILE =
+-
+-#---------------------------------------------------------------------------
+-# configuration options related to warning and progress messages
+-#---------------------------------------------------------------------------
+-
+-# The QUIET tag can be used to turn on/off the messages that are generated
+-# by doxygen. Possible values are YES and NO. If left blank NO is used.
+-
+-QUIET = NO
+-
+-# The WARNINGS tag can be used to turn on/off the warning messages that are
+-# generated by doxygen. Possible values are YES and NO. If left blank
+-# NO is used.
+-
+-WARNINGS = YES
+-
+-# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings
+-# for undocumented members. If EXTRACT_ALL is set to YES then this flag will
+-# automatically be disabled.
+-
+-WARN_IF_UNDOCUMENTED = YES
+-
+-# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for
+-# potential errors in the documentation, such as not documenting some
+-# parameters in a documented function, or documenting parameters that
+-# don't exist or using markup commands wrongly.
+-
+-WARN_IF_DOC_ERROR = YES
+-
+-# This WARN_NO_PARAMDOC option can be abled to get warnings for
+-# functions that are documented, but have no documentation for their parameters
+-# or return value. If set to NO (the default) doxygen will only warn about
+-# wrong or incomplete parameter documentation, but not about the absence of
+-# documentation.
+-
+-WARN_NO_PARAMDOC = NO
+-
+-# The WARN_FORMAT tag determines the format of the warning messages that
+-# doxygen can produce. The string should contain the $file, $line, and $text
+-# tags, which will be replaced by the file and line number from which the
+-# warning originated and the warning text. Optionally the format may contain
+-# $version, which will be replaced by the version of the file (if it could
+-# be obtained via FILE_VERSION_FILTER)
+-
+-WARN_FORMAT = "$file:$line: $text "
+-
+-# The WARN_LOGFILE tag can be used to specify a file to which warning
+-# and error messages should be written. If left blank the output is written
+-# to stderr.
+-
+-WARN_LOGFILE =
+-
+-#---------------------------------------------------------------------------
+-# configuration options related to the input files
+-#---------------------------------------------------------------------------
+-
+-# The INPUT tag can be used to specify the files and/or directories that contain
+-# documented source files. You may enter file names like "myfile.cpp" or
+-# directories like "/usr/src/myproject". Separate the files or directories
+-# with spaces.
+-
+-INPUT = Mainpage.dox \
+- poppler-annotation.h \
+- poppler-form.h \
+- poppler-link.h \
+- poppler-qt4.h \
+- poppler-optcontent.h \
+- poppler-page-transition.h
+-
+-# This tag can be used to specify the character encoding of the source files
+-# that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is
+-# also the default input encoding. Doxygen uses libiconv (or the iconv built
+-# into libc) for the transcoding. See http://www.gnu.org/software/libiconv for
+-# the list of possible encodings.
+-
+-INPUT_ENCODING = UTF-8
+-
+-# If the value of the INPUT tag contains directories, you can use the
+-# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
+-# and *.h) to filter out the source-files in the directories. If left
+-# blank the following patterns are tested:
+-# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx
+-# *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.py *.f90
+-
+-FILE_PATTERNS =
+-
+-# The RECURSIVE tag can be used to turn specify whether or not subdirectories
+-# should be searched for input files as well. Possible values are YES and NO.
+-# If left blank NO is used.
+-
+-RECURSIVE = NO
+-
+-# The EXCLUDE tag can be used to specify files and/or directories that should
+-# excluded from the INPUT source files. This way you can easily exclude a
+-# subdirectory from a directory tree whose root is specified with the INPUT tag.
+-
+-EXCLUDE =
+-
+-# The EXCLUDE_SYMLINKS tag can be used select whether or not files or
+-# directories that are symbolic links (a Unix filesystem feature) are excluded
+-# from the input.
+-
+-EXCLUDE_SYMLINKS = NO
+-
+-# If the value of the INPUT tag contains directories, you can use the
+-# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude
+-# certain files from those directories. Note that the wildcards are matched
+-# against the file with absolute path, so to exclude all test directories
+-# for example use the pattern */test/*
+-
+-EXCLUDE_PATTERNS =
+-
+-# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names
+-# (namespaces, classes, functions, etc.) that should be excluded from the
+-# output. The symbol name can be a fully qualified name, a word, or if the
+-# wildcard * is used, a substring. Examples: ANamespace, AClass,
+-# AClass::ANamespace, ANamespace::*Test
+-
+-EXCLUDE_SYMBOLS =
+-
+-# The EXAMPLE_PATH tag can be used to specify one or more files or
+-# directories that contain example code fragments that are included (see
+-# the \include command).
+-
+-EXAMPLE_PATH =
+-
+-# If the value of the EXAMPLE_PATH tag contains directories, you can use the
+-# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
+-# and *.h) to filter out the source-files in the directories. If left
+-# blank all files are included.
+-
+-EXAMPLE_PATTERNS =
+-
+-# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be
+-# searched for input files to be used with the \include or \dontinclude
+-# commands irrespective of the value of the RECURSIVE tag.
+-# Possible values are YES and NO. If left blank NO is used.
+-
+-EXAMPLE_RECURSIVE = NO
+-
+-# The IMAGE_PATH tag can be used to specify one or more files or
+-# directories that contain image that are included in the documentation (see
+-# the \image command).
+-
+-IMAGE_PATH =
+-
+-# The INPUT_FILTER tag can be used to specify a program that doxygen should
+-# invoke to filter for each input file. Doxygen will invoke the filter program
+-# by executing (via popen()) the command <filter> <input-file>, where <filter>
+-# is the value of the INPUT_FILTER tag, and <input-file> is the name of an
+-# input file. Doxygen will then use the output that the filter program writes
+-# to standard output.
+-# If FILTER_PATTERNS is specified, this tag will be
+-# ignored.
+-
+-INPUT_FILTER =
+-
+-# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern
+-# basis.
+-# Doxygen will compare the file name with each pattern and apply the
+-# filter if there is a match.
+-# The filters are a list of the form:
+-# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further
+-# info on how filters are used. If FILTER_PATTERNS is empty, INPUT_FILTER
+-# is applied to all files.
+-
+-FILTER_PATTERNS =
+-
+-# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using
+-# INPUT_FILTER) will be used to filter the input files when producing source
+-# files to browse (i.e. when SOURCE_BROWSER is set to YES).
+-
+-FILTER_SOURCE_FILES = NO
+-
+-#---------------------------------------------------------------------------
+-# configuration options related to source browsing
+-#---------------------------------------------------------------------------
+-
+-# If the SOURCE_BROWSER tag is set to YES then a list of source files will
+-# be generated. Documented entities will be cross-referenced with these sources.
+-# Note: To get rid of all source code in the generated output, make sure also
+-# VERBATIM_HEADERS is set to NO.
+-
+-SOURCE_BROWSER = NO
+-
+-# Setting the INLINE_SOURCES tag to YES will include the body
+-# of functions and classes directly in the documentation.
+-
+-INLINE_SOURCES = NO
+-
+-# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct
+-# doxygen to hide any special comment blocks from generated source code
+-# fragments. Normal C and C++ comments will always remain visible.
+-
+-STRIP_CODE_COMMENTS = YES
+-
+-# If the REFERENCED_BY_RELATION tag is set to YES
+-# then for each documented function all documented
+-# functions referencing it will be listed.
+-
+-REFERENCED_BY_RELATION = YES
+-
+-# If the REFERENCES_RELATION tag is set to YES
+-# then for each documented function all documented entities
+-# called/used by that function will be listed.
+-
+-REFERENCES_RELATION = YES
+-
+-# If the REFERENCES_LINK_SOURCE tag is set to YES (the default)
+-# and SOURCE_BROWSER tag is set to YES, then the hyperlinks from
+-# functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will
+-# link to the source code.
+-# Otherwise they will link to the documentation.
+-
+-REFERENCES_LINK_SOURCE = YES
+-
+-# If the USE_HTAGS tag is set to YES then the references to source code
+-# will point to the HTML generated by the htags(1) tool instead of doxygen
+-# built-in source browser. The htags tool is part of GNU's global source
+-# tagging system (see http://www.gnu.org/software/global/global.html). You
+-# will need version 4.8.6 or higher.
+-
+-USE_HTAGS = NO
+-
+-# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen
+-# will generate a verbatim copy of the header file for each class for
+-# which an include is specified. Set to NO to disable this.
+-
+-VERBATIM_HEADERS = YES
+-
+-#---------------------------------------------------------------------------
+-# configuration options related to the alphabetical class index
+-#---------------------------------------------------------------------------
+-
+-# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index
+-# of all compounds will be generated. Enable this if the project
+-# contains a lot of classes, structs, unions or interfaces.
+-
+-ALPHABETICAL_INDEX = YES
+-
+-# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then
+-# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns
+-# in which this list will be split (can be a number in the range [1..20])
+-
+-COLS_IN_ALPHA_INDEX = 5
+-
+-# In case all classes in a project start with a common prefix, all
+-# classes will be put under the same header in the alphabetical index.
+-# The IGNORE_PREFIX tag can be used to specify one or more prefixes that
+-# should be ignored while generating the index headers.
+-
+-IGNORE_PREFIX =
+-
+-#---------------------------------------------------------------------------
+-# configuration options related to the HTML output
+-#---------------------------------------------------------------------------
+-
+-# If the GENERATE_HTML tag is set to YES (the default) Doxygen will
+-# generate HTML output.
+-
+-GENERATE_HTML = YES
+-
+-# The HTML_OUTPUT tag is used to specify where the HTML docs will be put.
+-# If a relative path is entered the value of OUTPUT_DIRECTORY will be
+-# put in front of it. If left blank `html' will be used as the default path.
+-
+-HTML_OUTPUT = APIDOCS-html
+-
+-# The HTML_FILE_EXTENSION tag can be used to specify the file extension for
+-# each generated HTML page (for example: .htm,.php,.asp). If it is left blank
+-# doxygen will generate files with .html extension.
+-
+-HTML_FILE_EXTENSION = .html
+-
+-# The HTML_HEADER tag can be used to specify a personal HTML header for
+-# each generated HTML page. If it is left blank doxygen will generate a
+-# standard header.
+-
+-HTML_HEADER =
+-
+-# The HTML_FOOTER tag can be used to specify a personal HTML footer for
+-# each generated HTML page. If it is left blank doxygen will generate a
+-# standard footer.
+-
+-HTML_FOOTER =
+-
+-# The HTML_STYLESHEET tag can be used to specify a user-defined cascading
+-# style sheet that is used by each HTML page. It can be used to
+-# fine-tune the look of the HTML output. If the tag is left blank doxygen
+-# will generate a default style sheet. Note that doxygen will try to copy
+-# the style sheet file to the HTML output directory, so don't put your own
+-# stylesheet in the HTML output directory as well, or it will be erased!
+-
+-HTML_STYLESHEET =
+-
+-# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output.
+-# Doxygen will adjust the colors in the stylesheet and background images
+-# according to this color. Hue is specified as an angle on a colorwheel,
+-# see http://en.wikipedia.org/wiki/Hue for more information.
+-# For instance the value 0 represents red, 60 is yellow, 120 is green,
+-# 180 is cyan, 240 is blue, 300 purple, and 360 is red again.
+-# The allowed range is 0 to 359.
+-
+-HTML_COLORSTYLE_HUE = 220
+-
+-# The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of
+-# the colors in the HTML output. For a value of 0 the output will use
+-# grayscales only. A value of 255 will produce the most vivid colors.
+-
+-HTML_COLORSTYLE_SAT = 100
+-
+-# The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to
+-# the luminance component of the colors in the HTML output. Values below
+-# 100 gradually make the output lighter, whereas values above 100 make
+-# the output darker. The value divided by 100 is the actual gamma applied,
+-# so 80 represents a gamma of 0.8, The value 220 represents a gamma of 2.2,
+-# and 100 does not change the gamma.
+-
+-HTML_COLORSTYLE_GAMMA = 80
+-
+-# If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML
+-# page will contain the date and time when the page was generated. Setting
+-# this to NO can help when comparing the output of multiple runs.
+-
+-HTML_TIMESTAMP = YES
+-
+-# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes,
+-# files or namespaces will be aligned in HTML using tables. If set to
+-# NO a bullet list will be used.
+-
+-HTML_ALIGN_MEMBERS = YES
+-
+-# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML
+-# documentation will contain sections that can be hidden and shown after the
+-# page has loaded. For this to work a browser that supports
+-# JavaScript and DHTML is required (for instance Mozilla 1.0+, Firefox
+-# Netscape 6.0+, Internet explorer 5.0+, Konqueror, or Safari).
+-
+-HTML_DYNAMIC_SECTIONS = NO
+-
+-# If the GENERATE_DOCSET tag is set to YES, additional index files
+-# will be generated that can be used as input for Apple's Xcode 3
+-# integrated development environment, introduced with OSX 10.5 (Leopard).
+-# To create a documentation set, doxygen will generate a Makefile in the
+-# HTML output directory. Running make will produce the docset in that
+-# directory and running "make install" will install the docset in
+-# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find
+-# it at startup.
+-# See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html
+-# for more information.
+-
+-GENERATE_DOCSET = NO
+-
+-# When GENERATE_DOCSET tag is set to YES, this tag determines the name of the
+-# feed. A documentation feed provides an umbrella under which multiple
+-# documentation sets from a single provider (such as a company or product suite)
+-# can be grouped.
+-
+-DOCSET_FEEDNAME = "Doxygen generated docs"
+-
+-# When GENERATE_DOCSET tag is set to YES, this tag specifies a string that
+-# should uniquely identify the documentation set bundle. This should be a
+-# reverse domain-name style string, e.g. com.mycompany.MyDocSet. Doxygen
+-# will append .docset to the name.
+-
+-DOCSET_BUNDLE_ID = org.doxygen.Project
+-
+-# When GENERATE_PUBLISHER_ID tag specifies a string that should uniquely identify
+-# the documentation publisher. This should be a reverse domain-name style
+-# string, e.g. com.mycompany.MyDocSet.documentation.
+-
+-DOCSET_PUBLISHER_ID = org.doxygen.Publisher
+-
+-# The GENERATE_PUBLISHER_NAME tag identifies the documentation publisher.
+-
+-DOCSET_PUBLISHER_NAME = Publisher
+-
+-# If the GENERATE_HTMLHELP tag is set to YES, additional index files
+-# will be generated that can be used as input for tools like the
+-# Microsoft HTML help workshop to generate a compiled HTML help file (.chm)
+-# of the generated HTML documentation.
+-
+-GENERATE_HTMLHELP = NO
+-
+-# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can
+-# be used to specify the file name of the resulting .chm file. You
+-# can add a path in front of the file if the result should not be
+-# written to the html output directory.
+-
+-CHM_FILE =
+-
+-# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can
+-# be used to specify the location (absolute path including file name) of
+-# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run
+-# the HTML help compiler on the generated index.hhp.
+-
+-HHC_LOCATION =
+-
+-# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag
+-# controls if a separate .chi index file is generated (YES) or that
+-# it should be included in the master .chm file (NO).
+-
+-GENERATE_CHI = NO
+-
+-# If the GENERATE_HTMLHELP tag is set to YES, the CHM_INDEX_ENCODING
+-# is used to encode HtmlHelp index (hhk), content (hhc) and project file
+-# content.
+-
+-CHM_INDEX_ENCODING =
+-
+-# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag
+-# controls whether a binary table of contents is generated (YES) or a
+-# normal table of contents (NO) in the .chm file.
+-
+-BINARY_TOC = NO
+-
+-# The TOC_EXPAND flag can be set to YES to add extra items for group members
+-# to the contents of the HTML help documentation and to the tree view.
+-
+-TOC_EXPAND = NO
+-
+-# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and
+-# QHP_VIRTUAL_FOLDER are set, an additional index file will be generated
+-# that can be used as input for Qt's qhelpgenerator to generate a
+-# Qt Compressed Help (.qch) of the generated HTML documentation.
+-
+-GENERATE_QHP = YES
+-
+-# If the QHG_LOCATION tag is specified, the QCH_FILE tag can
+-# be used to specify the file name of the resulting .qch file.
+-# The path specified is relative to the HTML output folder.
+-
+-QCH_FILE = poppler-qt4.qch
+-
+-# The QHP_NAMESPACE tag specifies the namespace to use when generating
+-# Qt Help Project output. For more information please see
+-# http://doc.trolltech.com/qthelpproject.html#namespace
+-
+-QHP_NAMESPACE = org.freedesktop.poppler.qt4
+-
+-# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating
+-# Qt Help Project output. For more information please see
+-# http://doc.trolltech.com/qthelpproject.html#virtual-folders
+-
+-QHP_VIRTUAL_FOLDER = doc
+-
+-# If QHP_CUST_FILTER_NAME is set, it specifies the name of a custom filter to
+-# add. For more information please see
+-# http://doc.trolltech.com/qthelpproject.html#custom-filters
+-
+-QHP_CUST_FILTER_NAME = "Poppler 0.15.0"
+-
+-# The QHP_CUST_FILT_ATTRS tag specifies the list of the attributes of the
+-# custom filter to add. For more information please see
+-# <a href="http://doc.trolltech.com/qthelpproject.html#custom-filters">
+-# Qt Help Project / Custom Filters</a>.
+-
+-QHP_CUST_FILTER_ATTRS = poppler
+-
+-# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this
+-# project's
+-# filter section matches.
+-# <a href="http://doc.trolltech.com/qthelpproject.html#filter-attributes">
+-# Qt Help Project / Filter Attributes</a>.
+-
+-QHP_SECT_FILTER_ATTRS = poppler
+-
+-# If the GENERATE_QHP tag is set to YES, the QHG_LOCATION tag can
+-# be used to specify the location of Qt's qhelpgenerator.
+-# If non-empty doxygen will try to run qhelpgenerator on the generated
+-# .qhp file.
+-
+-QHG_LOCATION = qhelpgenerator
+-
+-# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files
+-# will be generated, which together with the HTML files, form an Eclipse help
+-# plugin. To install this plugin and make it available under the help contents
+-# menu in Eclipse, the contents of the directory containing the HTML and XML
+-# files needs to be copied into the plugins directory of eclipse. The name of
+-# the directory within the plugins directory should be the same as
+-# the ECLIPSE_DOC_ID value. After copying Eclipse needs to be restarted before
+-# the help appears.
+-
+-GENERATE_ECLIPSEHELP = NO
+-
+-# A unique identifier for the eclipse help plugin. When installing the plugin
+-# the directory name containing the HTML and XML files should also have
+-# this name.
+-
+-ECLIPSE_DOC_ID = org.doxygen.Project
+-
+-# The DISABLE_INDEX tag can be used to turn on/off the condensed index at
+-# top of each HTML page. The value NO (the default) enables the index and
+-# the value YES disables it.
+-
+-DISABLE_INDEX = NO
+-
+-# This tag can be used to set the number of enum values (range [1..20])
+-# that doxygen will group on one line in the generated HTML documentation.
+-
+-ENUM_VALUES_PER_LINE = 4
+-
+-# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index
+-# structure should be generated to display hierarchical information.
+-# If the tag value is set to YES, a side panel will be generated
+-# containing a tree-like index structure (just like the one that
+-# is generated for HTML Help). For this to work a browser that supports
+-# JavaScript, DHTML, CSS and frames is required (i.e. any modern browser).
+-# Windows users are probably better off using the HTML help feature.
+-
+-GENERATE_TREEVIEW = NO
+-
+-# By enabling USE_INLINE_TREES, doxygen will generate the Groups, Directories,
+-# and Class Hierarchy pages using a tree view instead of an ordered list.
+-
+-USE_INLINE_TREES = NO
+-
+-# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be
+-# used to set the initial width (in pixels) of the frame in which the tree
+-# is shown.
+-
+-TREEVIEW_WIDTH = 250
+-
+-# When the EXT_LINKS_IN_WINDOW option is set to YES doxygen will open
+-# links to external symbols imported via tag files in a separate window.
+-
+-EXT_LINKS_IN_WINDOW = NO
+-
+-# Use this tag to change the font size of Latex formulas included
+-# as images in the HTML documentation. The default is 10. Note that
+-# when you change the font size after a successful doxygen run you need
+-# to manually remove any form_*.png images from the HTML output directory
+-# to force them to be regenerated.
+-
+-FORMULA_FONTSIZE = 10
+-
+-# Use the FORMULA_TRANPARENT tag to determine whether or not the images
+-# generated for formulas are transparent PNGs. Transparent PNGs are
+-# not supported properly for IE 6.0, but are supported on all modern browsers.
+-# Note that when changing this option you need to delete any form_*.png files
+-# in the HTML output before the changes have effect.
+-
+-FORMULA_TRANSPARENT = YES
+-
+-# When the SEARCHENGINE tag is enabled doxygen will generate a search box
+-# for the HTML output. The underlying search engine uses javascript
+-# and DHTML and should work on any modern browser. Note that when using
+-# HTML help (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets
+-# (GENERATE_DOCSET) there is already a search function so this one should
+-# typically be disabled. For large projects the javascript based search engine
+-# can be slow, then enabling SERVER_BASED_SEARCH may provide a better solution.
+-
+-SEARCHENGINE = NO
+-
+-# When the SERVER_BASED_SEARCH tag is enabled the search engine will be
+-# implemented using a PHP enabled web server instead of at the web client
+-# using Javascript. Doxygen will generate the search PHP script and index
+-# file to put on the web server. The advantage of the server
+-# based approach is that it scales better to large projects and allows
+-# full text search. The disadvances is that it is more difficult to setup
+-# and does not have live searching capabilities.
+-
+-SERVER_BASED_SEARCH = NO
+-
+-#---------------------------------------------------------------------------
+-# configuration options related to the LaTeX output
+-#---------------------------------------------------------------------------
+-
+-# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will
+-# generate Latex output.
+-
+-GENERATE_LATEX = YES
+-
+-# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put.
+-# If a relative path is entered the value of OUTPUT_DIRECTORY will be
+-# put in front of it. If left blank `latex' will be used as the default path.
+-
+-LATEX_OUTPUT = APIDOCS-latex
+-
+-# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be
+-# invoked. If left blank `latex' will be used as the default command name.
+-# Note that when enabling USE_PDFLATEX this option is only used for
+-# generating bitmaps for formulas in the HTML output, but not in the
+-# Makefile that is written to the output directory.
+-
+-LATEX_CMD_NAME = latex
+-
+-# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to
+-# generate index for LaTeX. If left blank `makeindex' will be used as the
+-# default command name.
+-
+-MAKEINDEX_CMD_NAME = makeindex
+-
+-# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact
+-# LaTeX documents. This may be useful for small projects and may help to
+-# save some trees in general.
+-
+-COMPACT_LATEX = NO
+-
+-# The PAPER_TYPE tag can be used to set the paper type that is used
+-# by the printer. Possible values are: a4, a4wide, letter, legal and
+-# executive. If left blank a4wide will be used.
+-
+-PAPER_TYPE = a4wide
+-
+-# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX
+-# packages that should be included in the LaTeX output.
+-
+-EXTRA_PACKAGES =
+-
+-# The LATEX_HEADER tag can be used to specify a personal LaTeX header for
+-# the generated latex document. The header should contain everything until
+-# the first chapter. If it is left blank doxygen will generate a
+-# standard header. Notice: only use this tag if you know what you are doing!
+-
+-LATEX_HEADER =
+-
+-# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated
+-# is prepared for conversion to pdf (using ps2pdf). The pdf file will
+-# contain links (just like the HTML output) instead of page references
+-# This makes the output suitable for online browsing using a pdf viewer.
+-
+-PDF_HYPERLINKS = NO
+-
+-# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of
+-# plain latex in the generated Makefile. Set this option to YES to get a
+-# higher quality PDF documentation.
+-
+-USE_PDFLATEX = NO
+-
+-# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode.
+-# command to the generated LaTeX files. This will instruct LaTeX to keep
+-# running if errors occur, instead of asking the user for help.
+-# This option is also used when generating formulas in HTML.
+-
+-LATEX_BATCHMODE = NO
+-
+-# If LATEX_HIDE_INDICES is set to YES then doxygen will not
+-# include the index chapters (such as File Index, Compound Index, etc.)
+-# in the output.
+-
+-LATEX_HIDE_INDICES = NO
+-
+-# If LATEX_SOURCE_CODE is set to YES then doxygen will include
+-# source code with syntax highlighting in the LaTeX output.
+-# Note that which sources are shown also depends on other settings
+-# such as SOURCE_BROWSER.
+-
+-LATEX_SOURCE_CODE = NO
+-
+-#---------------------------------------------------------------------------
+-# configuration options related to the RTF output
+-#---------------------------------------------------------------------------
+-
+-# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output
+-# The RTF output is optimized for Word 97 and may not look very pretty with
+-# other RTF readers or editors.
+-
+-GENERATE_RTF = NO
+-
+-# The RTF_OUTPUT tag is used to specify where the RTF docs will be put.
+-# If a relative path is entered the value of OUTPUT_DIRECTORY will be
+-# put in front of it. If left blank `rtf' will be used as the default path.
+-
+-RTF_OUTPUT = rtf
+-
+-# If the COMPACT_RTF tag is set to YES Doxygen generates more compact
+-# RTF documents. This may be useful for small projects and may help to
+-# save some trees in general.
+-
+-COMPACT_RTF = NO
+-
+-# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated
+-# will contain hyperlink fields. The RTF file will
+-# contain links (just like the HTML output) instead of page references.
+-# This makes the output suitable for online browsing using WORD or other
+-# programs which support those fields.
+-# Note: wordpad (write) and others do not support links.
+-
+-RTF_HYPERLINKS = NO
+-
+-# Load stylesheet definitions from file. Syntax is similar to doxygen's
+-# config file, i.e. a series of assignments. You only have to provide
+-# replacements, missing definitions are set to their default value.
+-
+-RTF_STYLESHEET_FILE =
+-
+-# Set optional variables used in the generation of an rtf document.
+-# Syntax is similar to doxygen's config file.
+-
+-RTF_EXTENSIONS_FILE =
+-
+-#---------------------------------------------------------------------------
+-# configuration options related to the man page output
+-#---------------------------------------------------------------------------
+-
+-# If the GENERATE_MAN tag is set to YES (the default) Doxygen will
+-# generate man pages
+-
+-GENERATE_MAN = NO
+-
+-# The MAN_OUTPUT tag is used to specify where the man pages will be put.
+-# If a relative path is entered the value of OUTPUT_DIRECTORY will be
+-# put in front of it. If left blank `man' will be used as the default path.
+-
+-MAN_OUTPUT = man
+-
+-# The MAN_EXTENSION tag determines the extension that is added to
+-# the generated man pages (default is the subroutine's section .3)
+-
+-MAN_EXTENSION = .3
+-
+-# If the MAN_LINKS tag is set to YES and Doxygen generates man output,
+-# then it will generate one additional man file for each entity
+-# documented in the real man page(s). These additional files
+-# only source the real man page, but without them the man command
+-# would be unable to find the correct page. The default is NO.
+-
+-MAN_LINKS = NO
+-
+-#---------------------------------------------------------------------------
+-# configuration options related to the XML output
+-#---------------------------------------------------------------------------
+-
+-# If the GENERATE_XML tag is set to YES Doxygen will
+-# generate an XML file that captures the structure of
+-# the code including all documentation.
+-
+-GENERATE_XML = NO
+-
+-# The XML_OUTPUT tag is used to specify where the XML pages will be put.
+-# If a relative path is entered the value of OUTPUT_DIRECTORY will be
+-# put in front of it. If left blank `xml' will be used as the default path.
+-
+-XML_OUTPUT = xml
+-
+-# The XML_SCHEMA tag can be used to specify an XML schema,
+-# which can be used by a validating XML parser to check the
+-# syntax of the XML files.
+-
+-XML_SCHEMA =
+-
+-# The XML_DTD tag can be used to specify an XML DTD,
+-# which can be used by a validating XML parser to check the
+-# syntax of the XML files.
+-
+-XML_DTD =
+-
+-# If the XML_PROGRAMLISTING tag is set to YES Doxygen will
+-# dump the program listings (including syntax highlighting
+-# and cross-referencing information) to the XML output. Note that
+-# enabling this will significantly increase the size of the XML output.
+-
+-XML_PROGRAMLISTING = YES
+-
+-#---------------------------------------------------------------------------
+-# configuration options for the AutoGen Definitions output
+-#---------------------------------------------------------------------------
+-
+-# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will
+-# generate an AutoGen Definitions (see autogen.sf.net) file
+-# that captures the structure of the code including all
+-# documentation. Note that this feature is still experimental
+-# and incomplete at the moment.
+-
+-GENERATE_AUTOGEN_DEF = NO
+-
+-#---------------------------------------------------------------------------
+-# configuration options related to the Perl module output
+-#---------------------------------------------------------------------------
+-
+-# If the GENERATE_PERLMOD tag is set to YES Doxygen will
+-# generate a Perl module file that captures the structure of
+-# the code including all documentation. Note that this
+-# feature is still experimental and incomplete at the
+-# moment.
+-
+-GENERATE_PERLMOD = NO
+-
+-# If the PERLMOD_LATEX tag is set to YES Doxygen will generate
+-# the necessary Makefile rules, Perl scripts and LaTeX code to be able
+-# to generate PDF and DVI output from the Perl module output.
+-
+-PERLMOD_LATEX = NO
+-
+-# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be
+-# nicely formatted so it can be parsed by a human reader.
+-# This is useful
+-# if you want to understand what is going on.
+-# On the other hand, if this
+-# tag is set to NO the size of the Perl module output will be much smaller
+-# and Perl will parse it just the same.
+-
+-PERLMOD_PRETTY = YES
+-
+-# The names of the make variables in the generated doxyrules.make file
+-# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX.
+-# This is useful so different doxyrules.make files included by the same
+-# Makefile don't overwrite each other's variables.
+-
+-PERLMOD_MAKEVAR_PREFIX =
+-
+-#---------------------------------------------------------------------------
+-# Configuration options related to the preprocessor
+-#---------------------------------------------------------------------------
+-
+-# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will
+-# evaluate all C-preprocessor directives found in the sources and include
+-# files.
+-
+-ENABLE_PREPROCESSING = YES
+-
+-# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro
+-# names in the source code. If set to NO (the default) only conditional
+-# compilation will be performed. Macro expansion can be done in a controlled
+-# way by setting EXPAND_ONLY_PREDEF to YES.
+-
+-MACRO_EXPANSION = YES
+-
+-# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES
+-# then the macro expansion is limited to the macros specified with the
+-# PREDEFINED and EXPAND_AS_DEFINED tags.
+-
+-EXPAND_ONLY_PREDEF = YES
+-
+-# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files
+-# in the INCLUDE_PATH (see below) will be search if a #include is found.
+-
+-SEARCH_INCLUDES = YES
+-
+-# The INCLUDE_PATH tag can be used to specify one or more directories that
+-# contain include files that are not input files but should be processed by
+-# the preprocessor.
+-
+-INCLUDE_PATH =
+-
+-# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard
+-# patterns (like *.h and *.hpp) to filter out the header-files in the
+-# directories. If left blank, the patterns specified with FILE_PATTERNS will
+-# be used.
+-
+-INCLUDE_FILE_PATTERNS =
+-
+-# The PREDEFINED tag can be used to specify one or more macro names that
+-# are defined before the preprocessor is started (similar to the -D option of
+-# gcc). The argument of the tag is a list of macros of the form: name
+-# or name=definition (no spaces). If the definition and the = are
+-# omitted =1 is assumed. To prevent a macro definition from being
+-# undefined via #undef or recursively expanded use the := operator
+-# instead of the = operator.
+-
+-PREDEFINED = "Q_DECL_DEPRECATED=" \
+- "POPPLER_QT4_EXPORT="
+-
+-# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then
+-# this tag can be used to specify a list of macro names that should be expanded.
+-# The macro definition that is found in the sources will be used.
+-# Use the PREDEFINED tag if you want to use a different macro definition.
+-
+-EXPAND_AS_DEFINED =
+-
+-# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then
+-# doxygen's preprocessor will remove all function-like macros that are alone
+-# on a line, have an all uppercase name, and do not end with a semicolon. Such
+-# function macros are typically used for boiler-plate code, and will confuse
+-# the parser if not removed.
+-
+-SKIP_FUNCTION_MACROS = YES
+-
+-#---------------------------------------------------------------------------
+-# Configuration::additions related to external references
+-#---------------------------------------------------------------------------
+-
+-# The TAGFILES option can be used to specify one or more tagfiles.
+-# Optionally an initial location of the external documentation
+-# can be added for each tagfile. The format of a tag file without
+-# this location is as follows:
+-#
+-# TAGFILES = file1 file2 ...
+-# Adding location for the tag files is done as follows:
+-#
+-# TAGFILES = file1=loc1 "file2 = loc2" ...
+-# where "loc1" and "loc2" can be relative or absolute paths or
+-# URLs. If a location is present for each tag, the installdox tool
+-# does not have to be run to correct the links.
+-# Note that each tag file must have a unique name
+-# (where the name does NOT include the path)
+-# If a tag file is not located in the directory in which doxygen
+-# is run, you must also specify the path to the tagfile here.
+-
+-TAGFILES =
+-
+-# When a file name is specified after GENERATE_TAGFILE, doxygen will create
+-# a tag file that is based on the input files it reads.
+-
+-GENERATE_TAGFILE =
+-
+-# If the ALLEXTERNALS tag is set to YES all external classes will be listed
+-# in the class index. If set to NO only the inherited external classes
+-# will be listed.
+-
+-ALLEXTERNALS = NO
+-
+-# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed
+-# in the modules index. If set to NO, only the current project's groups will
+-# be listed.
+-
+-EXTERNAL_GROUPS = YES
+-
+-# The PERL_PATH should be the absolute path and name of the perl script
+-# interpreter (i.e. the result of `which perl').
+-
+-PERL_PATH = /usr/bin/perl
+-
+-#---------------------------------------------------------------------------
+-# Configuration options related to the dot tool
+-#---------------------------------------------------------------------------
+-
+-# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will
+-# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base
+-# or super classes. Setting the tag to NO turns the diagrams off. Note that
+-# this option is superseded by the HAVE_DOT option below. This is only a
+-# fallback. It is recommended to install and use dot, since it yields more
+-# powerful graphs.
+-
+-CLASS_DIAGRAMS = YES
+-
+-# You can define message sequence charts within doxygen comments using the \msc
+-# command. Doxygen will then run the mscgen tool (see
+-# http://www.mcternan.me.uk/mscgen/) to produce the chart and insert it in the
+-# documentation. The MSCGEN_PATH tag allows you to specify the directory where
+-# the mscgen tool resides. If left empty the tool is assumed to be found in the
+-# default search path.
+-
+-MSCGEN_PATH =
+-
+-# If set to YES, the inheritance and collaboration graphs will hide
+-# inheritance and usage relations if the target is undocumented
+-# or is not a class.
+-
+-HIDE_UNDOC_RELATIONS = YES
+-
+-# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is
+-# available from the path. This tool is part of Graphviz, a graph visualization
+-# toolkit from AT&T and Lucent Bell Labs. The other options in this section
+-# have no effect if this option is set to NO (the default)
+-
+-HAVE_DOT = YES
+-
+-# The DOT_NUM_THREADS specifies the number of dot invocations doxygen is
+-# allowed to run in parallel. When set to 0 (the default) doxygen will
+-# base this on the number of processors available in the system. You can set it
+-# explicitly to a value larger than 0 to get control over the balance
+-# between CPU load and processing speed.
+-
+-DOT_NUM_THREADS = 0
+-
+-# By default doxygen will write a font called FreeSans.ttf to the output
+-# directory and reference it in all dot files that doxygen generates. This
+-# font does not include all possible unicode characters however, so when you need
+-# these (or just want a differently looking font) you can specify the font name
+-# using DOT_FONTNAME. You need need to make sure dot is able to find the font,
+-# which can be done by putting it in a standard location or by setting the
+-# DOTFONTPATH environment variable or by setting DOT_FONTPATH to the directory
+-# containing the font.
+-
+-DOT_FONTNAME = FreeSans.ttf
+-
+-# The DOT_FONTSIZE tag can be used to set the size of the font of dot graphs.
+-# The default size is 10pt.
+-
+-DOT_FONTSIZE = 10
+-
+-# By default doxygen will tell dot to use the output directory to look for the
+-# FreeSans.ttf font (which doxygen will put there itself). If you specify a
+-# different font using DOT_FONTNAME you can set the path where dot
+-# can find it using this tag.
+-
+-DOT_FONTPATH =
+-
+-# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen
+-# will generate a graph for each documented class showing the direct and
+-# indirect inheritance relations. Setting this tag to YES will force the
+-# the CLASS_DIAGRAMS tag to NO.
+-
+-CLASS_GRAPH = YES
+-
+-# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen
+-# will generate a graph for each documented class showing the direct and
+-# indirect implementation dependencies (inheritance, containment, and
+-# class references variables) of the class with other documented classes.
+-
+-COLLABORATION_GRAPH = YES
+-
+-# If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen
+-# will generate a graph for groups, showing the direct groups dependencies
+-
+-GROUP_GRAPHS = YES
+-
+-# If the UML_LOOK tag is set to YES doxygen will generate inheritance and
+-# collaboration diagrams in a style similar to the OMG's Unified Modeling
+-# Language.
+-
+-UML_LOOK = NO
+-
+-# If set to YES, the inheritance and collaboration graphs will show the
+-# relations between templates and their instances.
+-
+-TEMPLATE_RELATIONS = NO
+-
+-# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT
+-# tags are set to YES then doxygen will generate a graph for each documented
+-# file showing the direct and indirect include dependencies of the file with
+-# other documented files.
+-
+-INCLUDE_GRAPH = YES
+-
+-# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and
+-# HAVE_DOT tags are set to YES then doxygen will generate a graph for each
+-# documented header file showing the documented files that directly or
+-# indirectly include this file.
+-
+-INCLUDED_BY_GRAPH = YES
+-
+-# If the CALL_GRAPH and HAVE_DOT options are set to YES then
+-# doxygen will generate a call dependency graph for every global function
+-# or class method. Note that enabling this option will significantly increase
+-# the time of a run. So in most cases it will be better to enable call graphs
+-# for selected functions only using the \callgraph command.
+-
+-CALL_GRAPH = NO
+-
+-# If the CALLER_GRAPH and HAVE_DOT tags are set to YES then
+-# doxygen will generate a caller dependency graph for every global function
+-# or class method. Note that enabling this option will significantly increase
+-# the time of a run. So in most cases it will be better to enable caller
+-# graphs for selected functions only using the \callergraph command.
+-
+-CALLER_GRAPH = NO
+-
+-# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen
+-# will graphical hierarchy of all classes instead of a textual one.
+-
+-GRAPHICAL_HIERARCHY = YES
+-
+-# If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES
+-# then doxygen will show the dependencies a directory has on other directories
+-# in a graphical way. The dependency relations are determined by the #include
+-# relations between the files in the directories.
+-
+-DIRECTORY_GRAPH = YES
+-
+-# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images
+-# generated by dot. Possible values are png, jpg, or gif
+-# If left blank png will be used.
+-
+-DOT_IMAGE_FORMAT = png
+-
+-# The tag DOT_PATH can be used to specify the path where the dot tool can be
+-# found. If left blank, it is assumed the dot tool can be found in the path.
+-
+-DOT_PATH =
+-
+-# The DOTFILE_DIRS tag can be used to specify one or more directories that
+-# contain dot files that are included in the documentation (see the
+-# \dotfile command).
+-
+-DOTFILE_DIRS =
+-
+-# The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of
+-# nodes that will be shown in the graph. If the number of nodes in a graph
+-# becomes larger than this value, doxygen will truncate the graph, which is
+-# visualized by representing a node as a red box. Note that doxygen if the
+-# number of direct children of the root node in a graph is already larger than
+-# DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note
+-# that the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH.
+-
+-DOT_GRAPH_MAX_NODES = 50
+-
+-# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the
+-# graphs generated by dot. A depth value of 3 means that only nodes reachable
+-# from the root by following a path via at most 3 edges will be shown. Nodes
+-# that lay further from the root node will be omitted. Note that setting this
+-# option to 1 or 2 may greatly reduce the computation time needed for large
+-# code bases. Also note that the size of a graph can be further restricted by
+-# DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction.
+-
+-MAX_DOT_GRAPH_DEPTH = 0
+-
+-# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent
+-# background. This is disabled by default, because dot on Windows does not
+-# seem to support this out of the box. Warning: Depending on the platform used,
+-# enabling this option may lead to badly anti-aliased labels on the edges of
+-# a graph (i.e. they become hard to read).
+-
+-DOT_TRANSPARENT = NO
+-
+-# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output
+-# files in one run (i.e. multiple -o and -T options on the command line). This
+-# makes dot run faster, but since only newer versions of dot (>1.8.10)
+-# support this, this feature is disabled by default.
+-
+-DOT_MULTI_TARGETS = NO
+-
+-# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will
+-# generate a legend page explaining the meaning of the various boxes and
+-# arrows in the dot generated graphs.
+-
+-GENERATE_LEGEND = YES
+-
+-# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will
+-# remove the intermediate dot files that are used to generate
+-# the various graphs.
+-
+-DOT_CLEANUP = YES
+diff --git a/qt4/src/Mainpage.dox b/qt4/src/Mainpage.dox
+deleted file mode 100644
+index 30398c3d..00000000
+--- a/qt4/src/Mainpage.dox
++++ /dev/null
+@@ -1,85 +0,0 @@
+-/**
+-@mainpage The Poppler Qt4 interface library
+-
+-The %Poppler Qt4 interface library, libpoppler-qt4, is a library that
+-allows Qt4 programmers to easily load and render PDF files. The
+-%Poppler Qt4 interface library uses poppler internally to do its job,
+-but the Qt4 programmer will never have to worry about poppler
+-internals.
+-
+-
+-@section help Current Status
+-
+-The %Poppler Qt4 interface library is quite stable and working.
+-
+-@section refimpl Example Programs
+-
+-Examples programs can be found in the qt4/test directory. The %Poppler
+-Qt4 interface library is also used in the KDE's
+-document viewer <a href="http://okular.kde.org">Okular</a>. The source files
+-for Okular's PDF plugin (%Poppler-based) can be found on the git server
+-of the KDE project, under
+-<a
+-href="http://quickgit.kde.org/?p=okular.git&a=tree&f=generators/poppler">this
+-URL</a>.
+-
+-
+-@section req How to use the Poppler Qt4 interface library in three easy steps
+-
+-Programmer who would like to use the %Poppler Qt4 interface library
+-simply need to add the following line to their C++ source files:
+-
+-@code
+-#include <poppler-qt4.h>
+-@endcode
+-
+-A PDF document can then be loaded as follows:
+-@code
+-QString filename;
+-
+-Poppler::Document* document = Poppler::Document::load(filename);
+-if (!document || document->isLocked()) {
+-
+- // ... error message ....
+-
+- delete document;
+- return;
+-}
+-@endcode
+-
+-Pages can be rendered to QImages with the following commands:
+-
+-@code
+-// Paranoid safety check
+-if (document == 0) {
+- // ... error message ...
+- return;
+-}
+-
+-// Access page of the PDF file
+-Poppler::Page* pdfPage = document->page(pageNumber); // Document starts at page 0
+-if (pdfPage == 0) {
+- // ... error message ...
+- return;
+-}
+-
+-// Generate a QImage of the rendered page
+-QImage image = pdfPage->renderToImage(xres, yres, x, y, width, height);
+-if (image.isNull()) {
+- // ... error message ...
+- return;
+-}
+-
+-// ... use image ...
+-
+-// after the usage, the page must be deleted
+-delete pdfPage;
+-@endcode
+-
+-Finally, don't forget to destroy the document:
+-
+-@code
+-delete document;
+-@endcode
+- */
+-
+diff --git a/qt4/src/poppler-annotation-helper.h b/qt4/src/poppler-annotation-helper.h
+deleted file mode 100644
+index 3150569c..00000000
+--- a/qt4/src/poppler-annotation-helper.h
++++ /dev/null
+@@ -1,181 +0,0 @@
+-/* poppler-annotation-helper.h: qt interface to poppler
+- * Copyright (C) 2006, 2008, 2017, Albert Astals Cid <aacid@kde.org>
+- * Copyright (C) 2008, Pino Toscano <pino@kde.org>
+- * Copyright (C) 2012, Fabio D'Urso <fabiodurso@hotmail.it>
+- * Adapting code from
+- * Copyright (C) 2004 by Enrico Ros <eros.kde@email.it>
+- *
+- * This program is free software; you can redistribute it and/or modify
+- * it under the terms of the GNU General Public License as published by
+- * the Free Software Foundation; either version 2, or (at your option)
+- * any later version.
+- *
+- * This program is distributed in the hope that it will be useful,
+- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+- * GNU General Public License for more details.
+- *
+- * You should have received a copy of the GNU General Public License
+- * along with this program; if not, write to the Free Software
+- * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+- */
+-
+-#include <QtCore/QDebug>
+-
+-#include <Object.h>
+-
+-class QColor;
+-
+-class AnnotColor;
+-
+-namespace Poppler {
+-
+-class XPDFReader
+-{
+- public:
+- // find named symbol and parse it
+- static inline void lookupName( Dict *, char *, QString & dest );
+- static inline void lookupString( Dict *, char *, QString & dest );
+- static inline void lookupBool( Dict *, char *, bool & dest );
+- static inline void lookupInt( Dict *, char *, int & dest );
+- static inline void lookupNum( Dict *, char *, double & dest );
+- static inline int lookupNumArray( Dict *, char *, double * dest, int len );
+- static inline void lookupColor( Dict *, char *, QColor & color );
+- static inline void lookupIntRef( Dict *, char *, int & dest );
+- static inline void lookupDate( Dict *, char *, QDateTime & dest );
+- // transform from user coords to normalized ones using the matrix M
+- static inline void transform( double * M, double x, double y, QPointF &res );
+- static inline void invTransform( double * M, const QPointF &p, double &x, double &y );
+-};
+-
+-void XPDFReader::lookupName( Dict * dict, char * type, QString & dest )
+-{
+- Object nameObj = dict->lookup( type );
+- if ( nameObj.isNull() )
+- return;
+- if ( nameObj.isName() )
+- dest = nameObj.getName();
+- else
+- qDebug() << type << " is not Name." << endl;
+-}
+-
+-void XPDFReader::lookupString( Dict * dict, char * type, QString & dest )
+-{
+- Object stringObj = dict->lookup( type );
+- if ( stringObj.isNull() )
+- return;
+- if ( stringObj.isString() )
+- dest = stringObj.getString()->getCString();
+- else
+- qDebug() << type << " is not String." << endl;
+-}
+-
+-void XPDFReader::lookupBool( Dict * dict, char * type, bool & dest )
+-{
+- Object boolObj = dict->lookup( type );
+- if ( boolObj.isNull() )
+- return;
+- if ( boolObj.isBool() )
+- dest = boolObj.getBool() == gTrue;
+- else
+- qDebug() << type << " is not Bool." << endl;
+-}
+-
+-void XPDFReader::lookupInt( Dict * dict, char * type, int & dest )
+-{
+- Object intObj = dict->lookup( type );
+- if ( intObj.isNull() )
+- return;
+- if ( intObj.isInt() )
+- dest = intObj.getInt();
+- else
+- qDebug() << type << " is not Int." << endl;
+-}
+-
+-void XPDFReader::lookupNum( Dict * dict, char * type, double & dest )
+-{
+- Object numObj = dict->lookup( type );
+- if ( numObj.isNull() )
+- return;
+- if ( numObj.isNum() )
+- dest = numObj.getNum();
+- else
+- qDebug() << type << " is not Num." << endl;
+-}
+-
+-int XPDFReader::lookupNumArray( Dict * dict, char * type, double * dest, int len )
+-{
+- Object arrObj = dict->lookup( type );
+- if ( arrObj.isNull() )
+- return 0;
+- if ( arrObj.isArray() )
+- {
+- len = qMin( len, arrObj.arrayGetLength() );
+- for ( int i = 0; i < len; i++ )
+- {
+- Object numObj = arrObj.arrayGet( i );
+- dest[i] = numObj.getNum();
+- }
+- }
+- else
+- {
+- len = 0;
+- qDebug() << type << "is not Array." << endl;
+- }
+- return len;
+-}
+-
+-void XPDFReader::lookupColor( Dict * dict, char * type, QColor & dest )
+-{
+- double c[3];
+- if ( XPDFReader::lookupNumArray( dict, type, c, 3 ) == 3 )
+- dest = QColor( (int)(c[0]*255.0), (int)(c[1]*255.0), (int)(c[2]*255.0));
+-}
+-
+-void XPDFReader::lookupIntRef( Dict * dict, char * type, int & dest )
+-{
+- Object refObj = dict->lookupNF( type );
+- if ( refObj.isNull() )
+- return;
+- if ( refObj.isRef() )
+- dest = refObj.getRefNum();
+- else
+- qDebug() << type << " is not Ref." << endl;
+-}
+-
+-void XPDFReader::lookupDate( Dict * dict, char * type, QDateTime & dest )
+-{
+- Object dateObj = dict->lookup( type );
+- if ( dateObj.isNull() )
+- return;
+- if ( dateObj.isString() )
+- {
+- dest = convertDate( dateObj.getString()->getCString() );
+- }
+- else
+- qDebug() << type << " is not Date" << endl;
+-}
+-
+-void XPDFReader::transform( double * M, double x, double y, QPointF &res )
+-{
+- res.setX( M[0] * x + M[2] * y + M[4] );
+- res.setY( M[1] * x + M[3] * y + M[5] );
+-}
+-
+-void XPDFReader::invTransform( double * M, const QPointF &p, double &x, double &y )
+-{
+- const double det = M[0]*M[3] - M[1]*M[2];
+- Q_ASSERT(det != 0);
+-
+- const double invM[4] = { M[3]/det, -M[1]/det, -M[2]/det, M[0]/det };
+- const double xt = p.x() - M[4];
+- const double yt = p.y() - M[5];
+-
+- x = invM[0] * xt + invM[2] * yt;
+- y = invM[1] * xt + invM[3] * yt;
+-}
+-
+-QColor convertAnnotColor( AnnotColor *color );
+-AnnotColor* convertQColor( const QColor &color );
+-
+-}
+diff --git a/qt4/src/poppler-annotation-private.h b/qt4/src/poppler-annotation-private.h
+deleted file mode 100644
+index b530e2f2..00000000
+--- a/qt4/src/poppler-annotation-private.h
++++ /dev/null
+@@ -1,112 +0,0 @@
+-/* poppler-annotation-private.h: qt interface to poppler
+- * Copyright (C) 2007, Pino Toscano <pino@kde.org>
+- * Copyright (C) 2012, Tobias Koenig <tokoe@kdab.com>
+- * Copyright (C) 2012, 2013 Fabio D'Urso <fabiodurso@hotmail.it>
+- * Copyright (C) 2012, 2014, Albert Astals Cid <aacid@kde.org>
+- *
+- * This program is free software; you can redistribute it and/or modify
+- * it under the terms of the GNU General Public License as published by
+- * the Free Software Foundation; either version 2, or (at your option)
+- * any later version.
+- *
+- * This program is distributed in the hope that it will be useful,
+- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+- * GNU General Public License for more details.
+- *
+- * You should have received a copy of the GNU General Public License
+- * along with this program; if not, write to the Free Software
+- * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+- */
+-
+-#ifndef _POPPLER_ANNOTATION_PRIVATE_H_
+-#define _POPPLER_ANNOTATION_PRIVATE_H_
+-
+-#include <QtCore/QLinkedList>
+-#include <QtCore/QPointF>
+-#include <QtCore/QSharedDataPointer>
+-
+-#include "poppler-annotation.h"
+-
+-#include <Object.h>
+-
+-class Annot;
+-class AnnotPath;
+-class Link;
+-class Page;
+-class PDFRectangle;
+-
+-namespace Poppler
+-{
+-class DocumentData;
+-
+-class AnnotationPrivate : public QSharedData
+-{
+- public:
+- AnnotationPrivate();
+- virtual ~AnnotationPrivate();
+-
+- void addRevision(Annotation *ann, Annotation::RevScope scope, Annotation::RevType type);
+-
+- /* Returns an Annotation of the right subclass whose d_ptr points to
+- * this AnnotationPrivate */
+- virtual Annotation * makeAlias() = 0;
+-
+- /* properties: contents related */
+- QString author;
+- QString contents;
+- QString uniqueName;
+- QDateTime modDate; // before or equal to currentDateTime()
+- QDateTime creationDate; // before or equal to modifyDate
+-
+- /* properties: look/interaction related */
+- int flags;
+- QRectF boundary;
+-
+- /* style and popup */
+- Annotation::Style style;
+- Annotation::Popup popup;
+-
+- /* revisions */
+- Annotation::RevScope revisionScope;
+- Annotation::RevType revisionType;
+- QList<Annotation*> revisions;
+-
+- /* After this call, the Annotation object will behave like a wrapper for
+- * the specified Annot object. All cached values are discarded */
+- void tieToNativeAnnot(Annot *ann, ::Page *page, DocumentData *doc);
+-
+- /* Creates a new Annot object on the specified page, flushes current
+- * values to that object and ties this Annotation to that object */
+- virtual Annot* createNativeAnnot(::Page *destPage, DocumentData *doc) = 0;
+-
+- /* Inited to 0 (i.e. untied annotation) */
+- Annot *pdfAnnot;
+- ::Page *pdfPage;
+- DocumentData * parentDoc;
+-
+- /* The following helpers only work if pdfPage is set */
+- void flushBaseAnnotationProperties();
+- void fillNormalizationMTX(double MTX[6], int pageRotation) const;
+- void fillTransformationMTX(double MTX[6]) const;
+- QRectF fromPdfRectangle(const PDFRectangle &r) const;
+- PDFRectangle boundaryToPdfRectangle(const QRectF &r, int flags) const;
+- AnnotPath * toAnnotPath(const QLinkedList<QPointF> &l) const;
+-
+- /* Scan page for annotations, parentId=0 searches for root annotations, subtypes empty means all subtypes */
+- static QList<Annotation*> findAnnotations(::Page *pdfPage, DocumentData *doc, const QSet<Annotation::SubType> &subtypes, int parentId = 0);
+-
+- /* Add given annotation to given page */
+- static void addAnnotationToPage(::Page *pdfPage, DocumentData *doc, const Annotation * ann);
+-
+- /* Remove annotation from page and destroy ann */
+- static void removeAnnotationFromPage(::Page *pdfPage, const Annotation * ann);
+-
+- Ref pdfObjectReference() const;
+-
+- Link* additionalAction( Annotation::AdditionalActionType type ) const;
+-};
+-
+-}
+-
+-#endif
+diff --git a/qt4/src/poppler-annotation.cc b/qt4/src/poppler-annotation.cc
+deleted file mode 100644
+index 8a7f60b1..00000000
+--- a/qt4/src/poppler-annotation.cc
++++ /dev/null
+@@ -1,5089 +0,0 @@
+-/* poppler-annotation.cc: qt interface to poppler
+- * Copyright (C) 2006, 2009, 2012-2015 Albert Astals Cid <aacid@kde.org>
+- * Copyright (C) 2006, 2008, 2010 Pino Toscano <pino@kde.org>
+- * Copyright (C) 2012, Guillermo A. Amaral B. <gamaral@kde.org>
+- * Copyright (C) 2012-2014 Fabio D'Urso <fabiodurso@hotmail.it>
+- * Copyright (C) 2012, 2015, Tobias Koenig <tokoe@kdab.com>
+- * Adapting code from
+- * Copyright (C) 2004 by Enrico Ros <eros.kde@email.it>
+- *
+- * This program is free software; you can redistribute it and/or modify
+- * it under the terms of the GNU General Public License as published by
+- * the Free Software Foundation; either version 2, or (at your option)
+- * any later version.
+- *
+- * This program is distributed in the hope that it will be useful,
+- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+- * GNU General Public License for more details.
+- *
+- * You should have received a copy of the GNU General Public License
+- * along with this program; if not, write to the Free Software
+- * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+- */
+-
+-// qt/kde includes
+-#include <QtCore/QRegExp>
+-#include <QtCore/QtAlgorithms>
+-#include <QtXml/QDomElement>
+-#include <QtGui/QColor>
+-#include <QtGui/QTransform>
+-
+-// local includes
+-#include "poppler-annotation.h"
+-#include "poppler-link.h"
+-#include "poppler-qt4.h"
+-#include "poppler-annotation-helper.h"
+-#include "poppler-annotation-private.h"
+-#include "poppler-page-private.h"
+-#include "poppler-private.h"
+-
+-// poppler includes
+-#include <Page.h>
+-#include <Annot.h>
+-#include <Gfx.h>
+-#include <Error.h>
+-#include <FileSpec.h>
+-#include <Link.h>
+-
+-/* Almost all getters directly query the underlying poppler annotation, with
+- * the exceptions of link, file attachment, sound, movie and screen annotations,
+- * Whose data retrieval logic has not been moved yet. Their getters return
+- * static data set at creation time by findAnnotations
+- */
+-
+-namespace Poppler {
+-
+-//BEGIN AnnotationUtils implementation
+-Annotation * AnnotationUtils::createAnnotation( const QDomElement & annElement )
+-{
+- // safety check on annotation element
+- if ( !annElement.hasAttribute( "type" ) )
+- return 0;
+-
+- // build annotation of given type
+- Annotation * annotation = 0;
+- int typeNumber = annElement.attribute( "type" ).toInt();
+- switch ( typeNumber )
+- {
+- case Annotation::AText:
+- annotation = new TextAnnotation( annElement );
+- break;
+- case Annotation::ALine:
+- annotation = new LineAnnotation( annElement );
+- break;
+- case Annotation::AGeom:
+- annotation = new GeomAnnotation( annElement );
+- break;
+- case Annotation::AHighlight:
+- annotation = new HighlightAnnotation( annElement );
+- break;
+- case Annotation::AStamp:
+- annotation = new StampAnnotation( annElement );
+- break;
+- case Annotation::AInk:
+- annotation = new InkAnnotation( annElement );
+- break;
+- case Annotation::ACaret:
+- annotation = new CaretAnnotation( annElement );
+- break;
+- }
+-
+- // return created annotation
+- return annotation;
+-}
+-
+-void AnnotationUtils::storeAnnotation( const Annotation * ann, QDomElement & annElement,
+- QDomDocument & document )
+-{
+- // save annotation's type as element's attribute
+- annElement.setAttribute( "type", (uint)ann->subType() );
+-
+- // append all annotation data as children of this node
+- ann->store( annElement, document );
+-}
+-
+-QDomElement AnnotationUtils::findChildElement( const QDomNode & parentNode,
+- const QString & name )
+-{
+- // loop through the whole children and return a 'name' named element
+- QDomNode subNode = parentNode.firstChild();
+- while( subNode.isElement() )
+- {
+- QDomElement element = subNode.toElement();
+- if ( element.tagName() == name )
+- return element;
+- subNode = subNode.nextSibling();
+- }
+- // if the name can't be found, return a dummy null element
+- return QDomElement();
+-}
+-//END AnnotationUtils implementation
+-
+-
+-//BEGIN Annotation implementation
+-AnnotationPrivate::AnnotationPrivate()
+- : flags( 0 ), revisionScope ( Annotation::Root ),
+- revisionType ( Annotation::None ), pdfAnnot ( 0 ), pdfPage ( 0 ),
+- parentDoc ( 0 )
+-{
+-}
+-
+-void AnnotationPrivate::addRevision( Annotation *ann, Annotation::RevScope scope, Annotation::RevType type )
+-{
+- /* Since ownership stays with the caller, create an alias of ann */
+- revisions.append( ann->d_ptr->makeAlias() );
+-
+- /* Set revision properties */
+- revisionScope = scope;
+- revisionType = type;
+-}
+-
+-AnnotationPrivate::~AnnotationPrivate()
+-{
+- // Delete all children revisions
+- qDeleteAll( revisions );
+-
+- // Release Annot object
+- if (pdfAnnot)
+- pdfAnnot->decRefCnt();
+-}
+-
+-void AnnotationPrivate::tieToNativeAnnot(Annot *ann, ::Page *page, Poppler::DocumentData * doc)
+-{
+- if (pdfAnnot)
+- {
+- error(errIO, -1, "Annotation is already tied");
+- return;
+- }
+-
+- pdfAnnot = ann;
+- pdfPage = page;
+- parentDoc = doc;
+-
+- pdfAnnot->incRefCnt();
+-}
+-
+-/* This method is called when a new annotation is created, after pdfAnnot and
+- * pdfPage have been set */
+-void AnnotationPrivate::flushBaseAnnotationProperties()
+-{
+- Q_ASSERT ( pdfPage );
+-
+- Annotation *q = makeAlias(); // Setters are defined in the public class
+-
+- // Since pdfAnnot has been set, this calls will write in the Annot object
+- q->setAuthor(author);
+- q->setContents(contents);
+- q->setUniqueName(uniqueName);
+- q->setModificationDate(modDate);
+- q->setCreationDate(creationDate);
+- q->setFlags(flags);
+- //q->setBoundary(boundary); -- already set by subclass-specific code
+- q->setStyle(style);
+- q->setPopup(popup);
+-
+- // Flush revisions
+- foreach (Annotation *r, revisions)
+- {
+- // TODO: Flush revision
+- delete r; // Object is no longer needed
+- }
+-
+- delete q;
+-
+- // Clear some members to save memory
+- author.clear();
+- contents.clear();
+- uniqueName.clear();
+- revisions.clear();
+-}
+-
+-// Returns matrix to convert from user space coords (oriented according to the
+-// specified rotation) to normalized coords
+-void AnnotationPrivate::fillNormalizationMTX(double MTX[6], int pageRotation) const
+-{
+- Q_ASSERT ( pdfPage );
+-
+- // build a normalized transform matrix for this page at 100% scale
+- GfxState * gfxState = new GfxState( 72.0, 72.0, pdfPage->getCropBox(), pageRotation, gTrue );
+- double * gfxCTM = gfxState->getCTM();
+-
+- double w = pdfPage->getCropWidth();
+- double h = pdfPage->getCropHeight();
+-
+- // Swap width and height if the page is rotated landscape or seascape
+- if ( pageRotation == 90 || pageRotation == 270 )
+- {
+- double t = w;
+- w = h;
+- h = t;
+- }
+-
+- for ( int i = 0; i < 6; i+=2 )
+- {
+- MTX[i] = gfxCTM[i] / w;
+- MTX[i+1] = gfxCTM[i+1] / h;
+- }
+- delete gfxState;
+-}
+-
+-// Returns matrix to convert from user space coords (i.e. those that are stored
+-// in the PDF file) to normalized coords (i.e. those that we expose to clients).
+-// This method also applies a rotation around the top-left corner if the
+-// FixedRotation flag is set.
+-void AnnotationPrivate::fillTransformationMTX(double MTX[6]) const
+-{
+- Q_ASSERT ( pdfPage );
+- Q_ASSERT ( pdfAnnot );
+-
+- const int pageRotate = pdfPage->getRotate();
+-
+- if ( pageRotate == 0 || ( pdfAnnot->getFlags() & Annot::flagNoRotate ) == 0 )
+- {
+- // Use the normalization matrix for this page's rotation
+- fillNormalizationMTX( MTX, pageRotate );
+- }
+- else
+- {
+- // Clients expect coordinates relative to this page's rotation, but
+- // FixedRotation annotations internally use unrotated coordinates:
+- // construct matrix to both normalize and rotate coordinates using the
+- // top-left corner as rotation pivot
+-
+- double MTXnorm[6];
+- fillNormalizationMTX( MTXnorm, pageRotate );
+-
+- QTransform transform( MTXnorm[0], MTXnorm[1], MTXnorm[2],
+- MTXnorm[3], MTXnorm[4], MTXnorm[5] );
+- transform.translate( +pdfAnnot->getXMin(), +pdfAnnot->getYMax() );
+- transform.rotate( pageRotate );
+- transform.translate( -pdfAnnot->getXMin(), -pdfAnnot->getYMax() );
+-
+- MTX[0] = transform.m11();
+- MTX[1] = transform.m12();
+- MTX[2] = transform.m21();
+- MTX[3] = transform.m22();
+- MTX[4] = transform.dx();
+- MTX[5] = transform.dy();
+- }
+-}
+-
+-QRectF AnnotationPrivate::fromPdfRectangle(const PDFRectangle &r) const
+-{
+- double swp, MTX[6];
+- fillTransformationMTX(MTX);
+-
+- QPointF p1, p2;
+- XPDFReader::transform( MTX, r.x1, r.y1, p1 );
+- XPDFReader::transform( MTX, r.x2, r.y2, p2 );
+-
+- double tl_x = p1.x();
+- double tl_y = p1.y();
+- double br_x = p2.x();
+- double br_y = p2.y();
+-
+- if (tl_x > br_x)
+- {
+- swp = tl_x;
+- tl_x = br_x;
+- br_x = swp;
+- }
+-
+- if (tl_y > br_y)
+- {
+- swp = tl_y;
+- tl_y = br_y;
+- br_y = swp;
+- }
+-
+- return QRectF( QPointF(tl_x,tl_y) , QPointF(br_x,br_y) );
+-}
+-
+-// This function converts a boundary QRectF in normalized coords to a
+-// PDFRectangle in user coords. If the FixedRotation flag is set, this function
+-// also applies a rotation around the top-left corner: it's the inverse of
+-// the transformation produced by fillTransformationMTX, but we can't use
+-// fillTransformationMTX here because it relies on the native annotation
+-// object's boundary rect to be already set up.
+-PDFRectangle AnnotationPrivate::boundaryToPdfRectangle(const QRectF &r, int flags) const
+-{
+- Q_ASSERT ( pdfPage );
+-
+- const int pageRotate = pdfPage->getRotate();
+-
+- double MTX[6];
+- fillNormalizationMTX( MTX, pageRotate );
+-
+- double tl_x, tl_y, br_x, br_y, swp;
+- XPDFReader::invTransform( MTX, r.topLeft(), tl_x, tl_y );
+- XPDFReader::invTransform( MTX, r.bottomRight(), br_x, br_y );
+-
+- if (tl_x > br_x)
+- {
+- swp = tl_x;
+- tl_x = br_x;
+- br_x = swp;
+- }
+-
+- if (tl_y > br_y)
+- {
+- swp = tl_y;
+- tl_y = br_y;
+- br_y = swp;
+- }
+-
+- const int rotationFixUp = ( flags & Annotation::FixedRotation ) ? pageRotate : 0;
+- const double width = br_x - tl_x;
+- const double height = br_y - tl_y;
+-
+- if ( rotationFixUp == 0 )
+- return PDFRectangle(tl_x, tl_y, br_x, br_y);
+- else if ( rotationFixUp == 90 )
+- return PDFRectangle(tl_x, tl_y - width, tl_x + height, tl_y);
+- else if ( rotationFixUp == 180 )
+- return PDFRectangle(br_x, tl_y - height, br_x + width, tl_y);
+- else // rotationFixUp == 270
+- return PDFRectangle(br_x, br_y - width, br_x + height, br_y);
+-}
+-
+-AnnotPath * AnnotationPrivate::toAnnotPath(const QLinkedList<QPointF> &list) const
+-{
+- const int count = list.size();
+- AnnotCoord **ac = (AnnotCoord **) gmallocn(count, sizeof(AnnotCoord*));
+-
+- double MTX[6];
+- fillTransformationMTX(MTX);
+-
+- int pos = 0;
+- foreach (const QPointF &p, list)
+- {
+- double x, y;
+- XPDFReader::invTransform( MTX, p, x, y );
+- ac[pos++] = new AnnotCoord(x, y);
+- }
+-
+- return new AnnotPath(ac, count);
+-}
+-
+-QList<Annotation*> AnnotationPrivate::findAnnotations(::Page *pdfPage, DocumentData *doc, const QSet<Annotation::SubType> &subtypes, int parentID)
+-{
+- Annots* annots = pdfPage->getAnnots();
+- const uint numAnnotations = annots->getNumAnnots();
+- if ( numAnnotations == 0 )
+- {
+- return QList<Annotation*>();
+- }
+-
+- const bool wantTextAnnotations = subtypes.isEmpty() || subtypes.contains(Annotation::AText);
+- const bool wantLineAnnotations = subtypes.isEmpty() || subtypes.contains(Annotation::ALine);
+- const bool wantGeomAnnotations = subtypes.isEmpty() || subtypes.contains(Annotation::AGeom);
+- const bool wantHighlightAnnotations = subtypes.isEmpty() || subtypes.contains(Annotation::AHighlight);
+- const bool wantStampAnnotations = subtypes.isEmpty() || subtypes.contains(Annotation::AStamp);
+- const bool wantInkAnnotations = subtypes.isEmpty() || subtypes.contains(Annotation::AInk);
+- const bool wantLinkAnnotations = subtypes.isEmpty() || subtypes.contains(Annotation::ALink);
+- const bool wantCaretAnnotations = subtypes.isEmpty() || subtypes.contains(Annotation::ACaret);
+- const bool wantFileAttachmentAnnotations = subtypes.isEmpty() || subtypes.contains(Annotation::AFileAttachment);
+- const bool wantSoundAnnotations = subtypes.isEmpty() || subtypes.contains(Annotation::ASound);
+- const bool wantMovieAnnotations = subtypes.isEmpty() || subtypes.contains(Annotation::AMovie);
+- const bool wantScreenAnnotations = subtypes.isEmpty() || subtypes.contains(Annotation::AScreen);
+- const bool wantWidgetAnnotations = subtypes.isEmpty() || subtypes.contains(Annotation::AWidget);
+-
+- // Create Annotation objects and tie to their native Annot
+- QList<Annotation*> res;
+- for ( uint j = 0; j < numAnnotations; j++ )
+- {
+- // get the j-th annotation
+- Annot * ann = annots->getAnnot( j );
+- if ( !ann )
+- {
+- error(errInternal, -1, "Annot {0:ud} is null", j);
+- continue;
+- }
+-
+- // Check parent annotation
+- AnnotMarkup * markupann = dynamic_cast< AnnotMarkup * >( ann );
+- if (!markupann)
+- {
+- // Assume it's a root annotation, and skip if user didn't request it
+- if (parentID != 0)
+- continue;
+- }
+- else if (markupann->getInReplyToID() != parentID)
+- continue;
+-
+- /* Create Annotation of the right subclass */
+- Annotation * annotation = 0;
+- Annot::AnnotSubtype subType = ann->getType();
+-
+- switch ( subType )
+- {
+- case Annot::typeText:
+- if (!wantTextAnnotations)
+- continue;
+- annotation = new TextAnnotation(TextAnnotation::Linked);
+- break;
+- case Annot::typeFreeText:
+- if (!wantTextAnnotations)
+- continue;
+- annotation = new TextAnnotation(TextAnnotation::InPlace);
+- break;
+- case Annot::typeLine:
+- if (!wantLineAnnotations)
+- continue;
+- annotation = new LineAnnotation(LineAnnotation::StraightLine);
+- break;
+- case Annot::typePolygon:
+- case Annot::typePolyLine:
+- if (!wantLineAnnotations)
+- continue;
+- annotation = new LineAnnotation(LineAnnotation::Polyline);
+- break;
+- case Annot::typeSquare:
+- case Annot::typeCircle:
+- if (!wantGeomAnnotations)
+- continue;
+- annotation = new GeomAnnotation();
+- break;
+- case Annot::typeHighlight:
+- case Annot::typeUnderline:
+- case Annot::typeSquiggly:
+- case Annot::typeStrikeOut:
+- if (!wantHighlightAnnotations)
+- continue;
+- annotation = new HighlightAnnotation();
+- break;
+- case Annot::typeStamp:
+- if (!wantStampAnnotations)
+- continue;
+- annotation = new StampAnnotation();
+- break;
+- case Annot::typeInk:
+- if (!wantInkAnnotations)
+- continue;
+- annotation = new InkAnnotation();
+- break;
+- case Annot::typeLink: /* TODO: Move logic to getters */
+- {
+- if (!wantLinkAnnotations)
+- continue;
+- // parse Link params
+- AnnotLink * linkann = static_cast< AnnotLink * >( ann );
+- LinkAnnotation * l = new LinkAnnotation();
+- annotation = l;
+-
+- // -> hlMode
+- l->setLinkHighlightMode( (LinkAnnotation::HighlightMode)linkann->getLinkEffect() );
+-
+- // -> link region
+- // TODO
+-
+- // reading link action
+- if ( linkann->getAction() )
+- {
+- Link * popplerLink = PageData::convertLinkActionToLink( linkann->getAction(), doc, QRectF() );
+- if ( popplerLink )
+- {
+- l->setLinkDestination( popplerLink );
+- }
+- }
+- break;
+- }
+- case Annot::typeCaret:
+- if (!wantCaretAnnotations)
+- continue;
+- annotation = new CaretAnnotation();
+- break;
+- case Annot::typeFileAttachment: /* TODO: Move logic to getters */
+- {
+- if (!wantFileAttachmentAnnotations)
+- continue;
+- AnnotFileAttachment * attachann = static_cast< AnnotFileAttachment * >( ann );
+- FileAttachmentAnnotation * f = new FileAttachmentAnnotation();
+- annotation = f;
+- // -> fileIcon
+- f->setFileIconName( QString::fromLatin1( attachann->getName()->getCString() ) );
+- // -> embeddedFile
+- FileSpec *filespec = new FileSpec( attachann->getFile() );
+- f->setEmbeddedFile( new EmbeddedFile( *new EmbeddedFileData( filespec ) ) );
+- break;
+- }
+- case Annot::typeSound: /* TODO: Move logic to getters */
+- {
+- if (!wantSoundAnnotations)
+- continue;
+- AnnotSound * soundann = static_cast< AnnotSound * >( ann );
+- SoundAnnotation * s = new SoundAnnotation();
+- annotation = s;
+-
+- // -> soundIcon
+- s->setSoundIconName( QString::fromLatin1( soundann->getName()->getCString() ) );
+- // -> sound
+- s->setSound( new SoundObject( soundann->getSound() ) );
+- break;
+- }
+- case Annot::typeMovie: /* TODO: Move logic to getters */
+- {
+- if (!wantMovieAnnotations)
+- continue;
+- AnnotMovie * movieann = static_cast< AnnotMovie * >( ann );
+- MovieAnnotation * m = new MovieAnnotation();
+- annotation = m;
+-
+- // -> movie
+- MovieObject *movie = new MovieObject( movieann );
+- m->setMovie( movie );
+- // -> movieTitle
+- GooString * movietitle = movieann->getTitle();
+- if ( movietitle )
+- m->setMovieTitle( QString::fromLatin1( movietitle->getCString() ) );
+- break;
+- }
+- case Annot::typeScreen:
+- {
+- if (!wantScreenAnnotations)
+- continue;
+- AnnotScreen * screenann = static_cast< AnnotScreen * >( ann );
+- if (!screenann->getAction())
+- continue;
+- ScreenAnnotation * s = new ScreenAnnotation();
+- annotation = s;
+-
+- // -> screen
+- Link * popplerLink = PageData::convertLinkActionToLink( screenann->getAction(), doc, QRectF() );
+- s->setAction( static_cast<Poppler::LinkRendition *>(popplerLink) );
+-
+- // -> screenTitle
+- GooString * screentitle = screenann->getTitle();
+- if ( screentitle )
+- s->setScreenTitle( UnicodeParsedString( screentitle ) );
+- break;
+- }
+- case Annot::typePopup:
+- continue; // popups are parsed by Annotation's window() getter
+- case Annot::typeUnknown:
+- continue; // special case for ignoring unknown annotations
+- case Annot::typeWidget:
+- if (!wantWidgetAnnotations)
+- continue;
+- annotation = new WidgetAnnotation();
+- break;
+- case Annot::typeRichMedia:
+- {
+- const AnnotRichMedia * annotRichMedia = static_cast< AnnotRichMedia * >( ann );
+-
+- RichMediaAnnotation *richMediaAnnotation = new RichMediaAnnotation;
+-
+- const AnnotRichMedia::Settings *annotSettings = annotRichMedia->getSettings();
+- if ( annotSettings ) {
+- RichMediaAnnotation::Settings *settings = new RichMediaAnnotation::Settings;
+-
+- if ( annotSettings->getActivation() ) {
+- RichMediaAnnotation::Activation *activation = new RichMediaAnnotation::Activation;
+-
+- switch ( annotSettings->getActivation()->getCondition() )
+- {
+- case AnnotRichMedia::Activation::conditionPageOpened:
+- activation->setCondition( RichMediaAnnotation::Activation::PageOpened );
+- break;
+- case AnnotRichMedia::Activation::conditionPageVisible:
+- activation->setCondition( RichMediaAnnotation::Activation::PageVisible );
+- break;
+- case AnnotRichMedia::Activation::conditionUserAction:
+- activation->setCondition( RichMediaAnnotation::Activation::UserAction );
+- break;
+- }
+-
+- settings->setActivation( activation );
+- }
+-
+- if ( annotSettings->getDeactivation() ) {
+- RichMediaAnnotation::Deactivation *deactivation = new RichMediaAnnotation::Deactivation;
+-
+- switch ( annotSettings->getDeactivation()->getCondition() )
+- {
+- case AnnotRichMedia::Deactivation::conditionPageClosed:
+- deactivation->setCondition( RichMediaAnnotation::Deactivation::PageClosed );
+- break;
+- case AnnotRichMedia::Deactivation::conditionPageInvisible:
+- deactivation->setCondition( RichMediaAnnotation::Deactivation::PageInvisible );
+- break;
+- case AnnotRichMedia::Deactivation::conditionUserAction:
+- deactivation->setCondition( RichMediaAnnotation::Deactivation::UserAction );
+- break;
+- }
+-
+- settings->setDeactivation( deactivation );
+- }
+-
+- richMediaAnnotation->setSettings( settings );
+- }
+-
+- const AnnotRichMedia::Content *annotContent = annotRichMedia->getContent();
+- if ( annotContent ) {
+- RichMediaAnnotation::Content *content = new RichMediaAnnotation::Content;
+-
+- const int configurationsCount = annotContent->getConfigurationsCount();
+- if ( configurationsCount > 0 ) {
+- QList< RichMediaAnnotation::Configuration* > configurations;
+-
+- for ( int i = 0; i < configurationsCount; ++i ) {
+- const AnnotRichMedia::Configuration *annotConfiguration = annotContent->getConfiguration( i );
+- if ( !annotConfiguration )
+- continue;
+-
+- RichMediaAnnotation::Configuration *configuration = new RichMediaAnnotation::Configuration;
+-
+- if ( annotConfiguration->getName() )
+- configuration->setName( UnicodeParsedString( annotConfiguration->getName() ) );
+-
+- switch ( annotConfiguration->getType() )
+- {
+- case AnnotRichMedia::Configuration::type3D:
+- configuration->setType( RichMediaAnnotation::Configuration::Type3D );
+- break;
+- case AnnotRichMedia::Configuration::typeFlash:
+- configuration->setType( RichMediaAnnotation::Configuration::TypeFlash );
+- break;
+- case AnnotRichMedia::Configuration::typeSound:
+- configuration->setType( RichMediaAnnotation::Configuration::TypeSound );
+- break;
+- case AnnotRichMedia::Configuration::typeVideo:
+- configuration->setType( RichMediaAnnotation::Configuration::TypeVideo );
+- break;
+- }
+-
+- const int instancesCount = annotConfiguration->getInstancesCount();
+- if ( instancesCount > 0 ) {
+- QList< RichMediaAnnotation::Instance* > instances;
+-
+- for ( int j = 0; j < instancesCount; ++j ) {
+- const AnnotRichMedia::Instance *annotInstance = annotConfiguration->getInstance( j );
+- if ( !annotInstance )
+- continue;
+-
+- RichMediaAnnotation::Instance *instance = new RichMediaAnnotation::Instance;
+-
+- switch ( annotInstance->getType() )
+- {
+- case AnnotRichMedia::Instance::type3D:
+- instance->setType( RichMediaAnnotation::Instance::Type3D );
+- break;
+- case AnnotRichMedia::Instance::typeFlash:
+- instance->setType( RichMediaAnnotation::Instance::TypeFlash );
+- break;
+- case AnnotRichMedia::Instance::typeSound:
+- instance->setType( RichMediaAnnotation::Instance::TypeSound );
+- break;
+- case AnnotRichMedia::Instance::typeVideo:
+- instance->setType( RichMediaAnnotation::Instance::TypeVideo );
+- break;
+- }
+-
+- const AnnotRichMedia::Params *annotParams = annotInstance->getParams();
+- if ( annotParams ) {
+- RichMediaAnnotation::Params *params = new RichMediaAnnotation::Params;
+-
+- if ( annotParams->getFlashVars() )
+- params->setFlashVars( UnicodeParsedString( annotParams->getFlashVars() ) );
+-
+- instance->setParams( params );
+- }
+-
+- instances.append( instance );
+- }
+-
+- configuration->setInstances( instances );
+- }
+-
+- configurations.append( configuration );
+- }
+-
+- content->setConfigurations( configurations );
+- }
+-
+- const int assetsCount = annotContent->getAssetsCount();
+- if ( assetsCount > 0 ) {
+- QList< RichMediaAnnotation::Asset* > assets;
+-
+- for ( int i = 0; i < assetsCount; ++i ) {
+- const AnnotRichMedia::Asset *annotAsset = annotContent->getAsset( i );
+- if ( !annotAsset )
+- continue;
+-
+- RichMediaAnnotation::Asset *asset = new RichMediaAnnotation::Asset;
+-
+- if ( annotAsset->getName() )
+- asset->setName( UnicodeParsedString( annotAsset->getName() ) );
+-
+- FileSpec *fileSpec = new FileSpec( annotAsset->getFileSpec() );
+- asset->setEmbeddedFile( new EmbeddedFile( *new EmbeddedFileData( fileSpec ) ) );
+-
+- assets.append( asset );
+- }
+-
+- content->setAssets( assets );
+- }
+-
+- richMediaAnnotation->setContent( content );
+- }
+-
+- annotation = richMediaAnnotation;
+-
+- break;
+- }
+- default:
+- {
+-#define CASE_FOR_TYPE( thetype ) \
+- case Annot::type ## thetype: \
+- error(errUnimplemented, -1, "Annotation " #thetype " not supported"); \
+- break;
+- switch ( subType )
+- {
+- CASE_FOR_TYPE( PrinterMark )
+- CASE_FOR_TYPE( TrapNet )
+- CASE_FOR_TYPE( Watermark )
+- CASE_FOR_TYPE( 3D )
+- default: error(errUnimplemented, -1, "Annotation {0:d} not supported", subType);
+- }
+- continue;
+-#undef CASE_FOR_TYPE
+- }
+- }
+-
+- annotation->d_ptr->tieToNativeAnnot(ann, pdfPage, doc);
+- res.append(annotation);
+- }
+-
+- return res;
+-}
+-
+-Ref AnnotationPrivate::pdfObjectReference() const
+-{
+- if (pdfAnnot == 0)
+- {
+- const Ref invalid_ref = { -1, -1 };
+- return invalid_ref;
+- }
+-
+- return pdfAnnot->getRef();
+-}
+-
+-Link* AnnotationPrivate::additionalAction( Annotation::AdditionalActionType type ) const
+-{
+- if ( pdfAnnot->getType() != Annot::typeScreen && pdfAnnot->getType() != Annot::typeWidget )
+- return 0;
+-
+- Annot::AdditionalActionsType actionType = Annot::actionCursorEntering;
+- switch ( type )
+- {
+- case Annotation::CursorEnteringAction: actionType = Annot::actionCursorEntering; break;
+- case Annotation::CursorLeavingAction: actionType = Annot::actionCursorLeaving; break;
+- case Annotation::MousePressedAction: actionType = Annot::actionMousePressed; break;
+- case Annotation::MouseReleasedAction: actionType = Annot::actionMouseReleased; break;
+- case Annotation::FocusInAction: actionType = Annot::actionFocusIn; break;
+- case Annotation::FocusOutAction: actionType = Annot::actionFocusOut; break;
+- case Annotation::PageOpeningAction: actionType = Annot::actionPageOpening; break;
+- case Annotation::PageClosingAction: actionType = Annot::actionPageClosing; break;
+- case Annotation::PageVisibleAction: actionType = Annot::actionPageVisible; break;
+- case Annotation::PageInvisibleAction: actionType = Annot::actionPageInvisible; break;
+- }
+-
+- ::LinkAction *linkAction = 0;
+- if ( pdfAnnot->getType() == Annot::typeScreen )
+- linkAction = static_cast<AnnotScreen*>( pdfAnnot )->getAdditionalAction( actionType );
+- else
+- linkAction = static_cast<AnnotWidget*>( pdfAnnot )->getAdditionalAction( actionType );
+-
+- Link *link = 0;
+-
+- if ( linkAction )
+- link = PageData::convertLinkActionToLink( linkAction, parentDoc, QRectF() );
+-
+- return link;
+-}
+-
+-void AnnotationPrivate::addAnnotationToPage(::Page *pdfPage, DocumentData *doc, const Annotation * ann)
+-{
+- if (ann->d_ptr->pdfAnnot != 0)
+- {
+- error(errIO, -1, "Annotation is already tied");
+- return;
+- }
+-
+- // Unimplemented annotations can't be created by the user because their ctor
+- // is private. Therefore, createNativeAnnot will never return 0
+- Annot *nativeAnnot = ann->d_ptr->createNativeAnnot(pdfPage, doc);
+- Q_ASSERT(nativeAnnot);
+- pdfPage->addAnnot(nativeAnnot);
+-}
+-
+-void AnnotationPrivate::removeAnnotationFromPage(::Page *pdfPage, const Annotation * ann)
+-{
+- if (ann->d_ptr->pdfAnnot == 0)
+- {
+- error(errIO, -1, "Annotation is not tied");
+- return;
+- }
+-
+- if (ann->d_ptr->pdfPage != pdfPage)
+- {
+- error(errIO, -1, "Annotation doesn't belong to the specified page");
+- return;
+- }
+-
+- // Remove annotation
+- pdfPage->removeAnnot(ann->d_ptr->pdfAnnot);
+-
+- // Destroy object
+- delete ann;
+-}
+-
+-class Annotation::Style::Private : public QSharedData
+-{
+- public:
+- Private()
+- : opacity( 1.0 ), width( 1.0 ), lineStyle( Solid ), xCorners( 0.0 ),
+- yCorners( 0.0 ), lineEffect( NoEffect ), effectIntensity( 1.0 )
+- {
+- dashArray.resize(1);
+- dashArray[0] = 3;
+- }
+-
+- QColor color;
+- double opacity;
+- double width;
+- Annotation::LineStyle lineStyle;
+- double xCorners;
+- double yCorners;
+- QVector<double> dashArray;
+- Annotation::LineEffect lineEffect;
+- double effectIntensity;
+-};
+-
+-Annotation::Style::Style()
+- : d ( new Private )
+-{
+-}
+-
+-Annotation::Style::Style( const Style &other )
+- : d( other.d )
+-{
+-}
+-
+-Annotation::Style& Annotation::Style::operator=( const Style &other )
+-{
+- if ( this != &other )
+- d = other.d;
+-
+- return *this;
+-}
+-
+-Annotation::Style::~Style()
+-{
+-}
+-
+-QColor Annotation::Style::color() const
+-{
+- return d->color;
+-}
+-
+-void Annotation::Style::setColor(const QColor &color)
+-{
+- d->color = color;
+-}
+-
+-double Annotation::Style::opacity() const
+-{
+- return d->opacity;
+-}
+-
+-void Annotation::Style::setOpacity(double opacity)
+-{
+- d->opacity = opacity;
+-}
+-
+-double Annotation::Style::width() const
+-{
+- return d->width;
+-}
+-
+-void Annotation::Style::setWidth(double width)
+-{
+- d->width = width;
+-}
+-
+-Annotation::LineStyle Annotation::Style::lineStyle() const
+-{
+- return d->lineStyle;
+-}
+-
+-void Annotation::Style::setLineStyle(Annotation::LineStyle style)
+-{
+- d->lineStyle = style;
+-}
+-
+-double Annotation::Style::xCorners() const
+-{
+- return d->xCorners;
+-}
+-
+-void Annotation::Style::setXCorners(double radius)
+-{
+- d->xCorners = radius;
+-}
+-
+-double Annotation::Style::yCorners() const
+-{
+- return d->yCorners;
+-}
+-
+-void Annotation::Style::setYCorners(double radius)
+-{
+- d->yCorners = radius;
+-}
+-
+-const QVector<double>& Annotation::Style::dashArray() const
+-{
+- return d->dashArray;
+-}
+-
+-void Annotation::Style::setDashArray(const QVector<double> &array)
+-{
+- d->dashArray = array;
+-}
+-
+-Annotation::LineEffect Annotation::Style::lineEffect() const
+-{
+- return d->lineEffect;
+-}
+-
+-void Annotation::Style::setLineEffect(Annotation::LineEffect effect)
+-{
+- d->lineEffect = effect;
+-}
+-
+-double Annotation::Style::effectIntensity() const
+-{
+- return d->effectIntensity;
+-}
+-
+-void Annotation::Style::setEffectIntensity(double intens)
+-{
+- d->effectIntensity = intens;
+-}
+-
+-class Annotation::Popup::Private : public QSharedData
+-{
+- public:
+- Private()
+- : flags( -1 ) {}
+-
+- int flags;
+- QRectF geometry;
+- QString title;
+- QString summary;
+- QString text;
+-};
+-
+-Annotation::Popup::Popup()
+- : d ( new Private )
+-{
+-}
+-
+-Annotation::Popup::Popup( const Popup &other )
+- : d( other.d )
+-{
+-}
+-
+-Annotation::Popup& Annotation::Popup::operator=( const Popup &other )
+-{
+- if ( this != &other )
+- d = other.d;
+-
+- return *this;
+-}
+-
+-Annotation::Popup::~Popup()
+-{
+-}
+-
+-int Annotation::Popup::flags() const
+-{
+- return d->flags;
+-}
+-
+-void Annotation::Popup::setFlags( int flags )
+-{
+- d->flags = flags;
+-}
+-
+-QRectF Annotation::Popup::geometry() const
+-{
+- return d->geometry;
+-}
+-
+-void Annotation::Popup::setGeometry( const QRectF &geom )
+-{
+- d->geometry = geom;
+-}
+-
+-QString Annotation::Popup::title() const
+-{
+- return d->title;
+-}
+-
+-void Annotation::Popup::setTitle( const QString &title )
+-{
+- d->title = title;
+-}
+-
+-QString Annotation::Popup::summary() const
+-{
+- return d->summary;
+-}
+-
+-void Annotation::Popup::setSummary( const QString &summary )
+-{
+- d->summary = summary;
+-}
+-
+-QString Annotation::Popup::text() const
+-{
+- return d->text;
+-}
+-
+-void Annotation::Popup::setText( const QString &text )
+-{
+- d->text = text;
+-}
+-
+-Annotation::Annotation( AnnotationPrivate &dd )
+- : d_ptr( &dd )
+-{
+- window.width = window.height = 0;
+-}
+-
+-Annotation::~Annotation()
+-{
+-}
+-
+-Annotation::Annotation( AnnotationPrivate &dd, const QDomNode &annNode )
+- : d_ptr( &dd )
+-{
+- Q_D( Annotation );
+-
+- window.width = window.height = 0;
+-
+- // get the [base] element of the annotation node
+- QDomElement e = AnnotationUtils::findChildElement( annNode, "base" );
+- if ( e.isNull() )
+- return;
+-
+- Style s;
+- Popup w;
+-
+- // parse -contents- attributes
+- if ( e.hasAttribute( "author" ) )
+- setAuthor(e.attribute( "author" ));
+- if ( e.hasAttribute( "contents" ) )
+- setContents(e.attribute( "contents" ));
+- if ( e.hasAttribute( "uniqueName" ) )
+- setUniqueName(e.attribute( "uniqueName" ));
+- if ( e.hasAttribute( "modifyDate" ) )
+- setModificationDate(QDateTime::fromString( e.attribute( "modifyDate" ) ));
+- if ( e.hasAttribute( "creationDate" ) )
+- setCreationDate(QDateTime::fromString( e.attribute( "creationDate" ) ));
+-
+- // parse -other- attributes
+- if ( e.hasAttribute( "flags" ) )
+- setFlags(e.attribute( "flags" ).toInt());
+- if ( e.hasAttribute( "color" ) )
+- s.setColor(QColor( e.attribute( "color" ) ));
+- if ( e.hasAttribute( "opacity" ) )
+- s.setOpacity(e.attribute( "opacity" ).toDouble());
+-
+- // parse -the-subnodes- (describing Style, Window, Revision(s) structures)
+- // Note: all subnodes if present must be 'attributes complete'
+- QDomNode eSubNode = e.firstChild();
+- while ( eSubNode.isElement() )
+- {
+- QDomElement ee = eSubNode.toElement();
+- eSubNode = eSubNode.nextSibling();
+-
+- // parse boundary
+- if ( ee.tagName() == "boundary" )
+- {
+- QRectF brect;
+- brect.setLeft(ee.attribute( "l" ).toDouble());
+- brect.setTop(ee.attribute( "t" ).toDouble());
+- brect.setRight(ee.attribute( "r" ).toDouble());
+- brect.setBottom(ee.attribute( "b" ).toDouble());
+- setBoundary(brect);
+- }
+- // parse penStyle if not default
+- else if ( ee.tagName() == "penStyle" )
+- {
+- s.setWidth(ee.attribute( "width" ).toDouble());
+- s.setLineStyle((LineStyle)ee.attribute( "style" ).toInt());
+- s.setXCorners(ee.attribute( "xcr" ).toDouble());
+- s.setYCorners(ee.attribute( "ycr" ).toDouble());
+-
+- // Try to parse dash array (new format)
+- QVector<double> dashArray;
+-
+- QDomNode eeSubNode = ee.firstChild();
+- while ( eeSubNode.isElement() )
+- {
+- QDomElement eee = eeSubNode.toElement();
+- eeSubNode = eeSubNode.nextSibling();
+-
+- if ( eee.tagName() != "dashsegm" )
+- continue;
+-
+- dashArray.append(eee.attribute( "len" ).toDouble());
+- }
+-
+- // If no segments were found use marks/spaces (old format)
+- if ( dashArray.size() == 0 )
+- {
+- dashArray.append(ee.attribute( "marks" ).toDouble());
+- dashArray.append(ee.attribute( "spaces" ).toDouble());
+- }
+-
+- s.setDashArray(dashArray);
+- }
+- // parse effectStyle if not default
+- else if ( ee.tagName() == "penEffect" )
+- {
+- s.setLineEffect((LineEffect)ee.attribute( "effect" ).toInt());
+- s.setEffectIntensity(ee.attribute( "intensity" ).toDouble());
+- }
+- // parse window if present
+- else if ( ee.tagName() == "window" )
+- {
+- QRectF geom;
+- geom.setX(ee.attribute( "top" ).toDouble());
+- geom.setY(ee.attribute( "left" ).toDouble());
+-
+- if (ee.hasAttribute("widthDouble"))
+- geom.setWidth(ee.attribute( "widthDouble" ).toDouble());
+- else
+- geom.setWidth(ee.attribute( "width" ).toDouble());
+-
+- if (ee.hasAttribute("widthDouble"))
+- geom.setHeight(ee.attribute( "heightDouble" ).toDouble());
+- else
+- geom.setHeight(ee.attribute( "height" ).toDouble());
+-
+- w.setGeometry(geom);
+-
+- w.setFlags(ee.attribute( "flags" ).toInt());
+- w.setTitle(ee.attribute( "title" ));
+- w.setSummary(ee.attribute( "summary" ));
+- // parse window subnodes
+- QDomNode winNode = ee.firstChild();
+- for ( ; winNode.isElement(); winNode = winNode.nextSibling() )
+- {
+- QDomElement winElement = winNode.toElement();
+- if ( winElement.tagName() == "text" )
+- w.setText(winElement.firstChild().toCDATASection().data());
+- }
+- }
+- }
+-
+- setStyle(s); // assign parsed style
+- setPopup(w); // assign parsed window
+-
+- // get the [revisions] element of the annotation node
+- QDomNode revNode = annNode.firstChild();
+- for ( ; revNode.isElement(); revNode = revNode.nextSibling() )
+- {
+- QDomElement revElement = revNode.toElement();
+- if ( revElement.tagName() != "revision" )
+- continue;
+-
+- Annotation *reply = AnnotationUtils::createAnnotation( revElement );
+-
+- if (reply) // if annotation is valid, add as a revision of this annotation
+- {
+- RevScope scope = (RevScope)revElement.attribute( "revScope" ).toInt();
+- RevType type = (RevType)revElement.attribute( "revType" ).toInt();
+- d->addRevision(reply, scope, type);
+- delete reply;
+- }
+- }
+-}
+-
+-void Annotation::storeBaseAnnotationProperties( QDomNode & annNode, QDomDocument & document ) const
+-{
+- // create [base] element of the annotation node
+- QDomElement e = document.createElement( "base" );
+- annNode.appendChild( e );
+-
+- const Style s = style();
+- const Popup w = popup();
+-
+- // store -contents- attributes
+- if ( !author().isEmpty() )
+- e.setAttribute( "author", author() );
+- if ( !contents().isEmpty() )
+- e.setAttribute( "contents", contents() );
+- if ( !uniqueName().isEmpty() )
+- e.setAttribute( "uniqueName", uniqueName() );
+- if ( modificationDate().isValid() )
+- e.setAttribute( "modifyDate", modificationDate().toString() );
+- if ( creationDate().isValid() )
+- e.setAttribute( "creationDate", creationDate().toString() );
+-
+- // store -other- attributes
+- if ( flags() )
+- e.setAttribute( "flags", flags() );
+- if ( s.color().isValid() )
+- e.setAttribute( "color", s.color().name() );
+- if ( s.opacity() != 1.0 )
+- e.setAttribute( "opacity", QString::number( s.opacity() ) );
+-
+- // Sub-Node-1 - boundary
+- const QRectF brect = boundary();
+- QDomElement bE = document.createElement( "boundary" );
+- e.appendChild( bE );
+- bE.setAttribute( "l", QString::number( (double)brect.left() ) );
+- bE.setAttribute( "t", QString::number( (double)brect.top() ) );
+- bE.setAttribute( "r", QString::number( (double)brect.right() ) );
+- bE.setAttribute( "b", QString::number( (double)brect.bottom() ) );
+-
+- // Sub-Node-2 - penStyle
+- const QVector<double> dashArray = s.dashArray();
+- if ( s.width() != 1 || s.lineStyle() != Solid || s.xCorners() != 0 ||
+- s.yCorners() != 0.0 || dashArray.size() != 1 || dashArray[0] != 3 )
+- {
+- QDomElement psE = document.createElement( "penStyle" );
+- e.appendChild( psE );
+- psE.setAttribute( "width", QString::number( s.width() ) );
+- psE.setAttribute( "style", (int)s.lineStyle() );
+- psE.setAttribute( "xcr", QString::number( s.xCorners() ) );
+- psE.setAttribute( "ycr", QString::number( s.yCorners() ) );
+-
+- int marks = 3, spaces = 0; // Do not break code relying on marks/spaces
+- if (dashArray.size() != 0)
+- marks = (int)dashArray[0];
+- if (dashArray.size() > 1)
+- spaces = (int)dashArray[1];
+-
+- psE.setAttribute( "marks", marks );
+- psE.setAttribute( "spaces", spaces );
+-
+- foreach (double segm, dashArray)
+- {
+- QDomElement pattE = document.createElement( "dashsegm" );
+- pattE.setAttribute( "len", QString::number( segm ) );
+- psE.appendChild(pattE);
+- }
+- }
+-
+- // Sub-Node-3 - penEffect
+- if ( s.lineEffect() != NoEffect || s.effectIntensity() != 1.0 )
+- {
+- QDomElement peE = document.createElement( "penEffect" );
+- e.appendChild( peE );
+- peE.setAttribute( "effect", (int)s.lineEffect() );
+- peE.setAttribute( "intensity", QString::number( s.effectIntensity() ) );
+- }
+-
+- // Sub-Node-4 - window
+- if ( w.flags() != -1 || !w.title().isEmpty() || !w.summary().isEmpty() ||
+- !w.text().isEmpty() )
+- {
+- QDomElement wE = document.createElement( "window" );
+- const QRectF geom = w.geometry();
+- e.appendChild( wE );
+- wE.setAttribute( "flags", w.flags() );
+- wE.setAttribute( "top", QString::number( geom.x() ) );
+- wE.setAttribute( "left", QString::number( geom.y() ) );
+- wE.setAttribute( "width", (int)geom.width() );
+- wE.setAttribute( "height", (int)geom.height() );
+- wE.setAttribute( "widthDouble", QString::number( geom.width() ) );
+- wE.setAttribute( "heightDouble", QString::number( geom.height() ) );
+- wE.setAttribute( "title", w.title() );
+- wE.setAttribute( "summary", w.summary() );
+- // store window.text as a subnode, because we need escaped data
+- if ( !w.text().isEmpty() )
+- {
+- QDomElement escapedText = document.createElement( "text" );
+- wE.appendChild( escapedText );
+- QDomCDATASection textCData = document.createCDATASection( w.text() );
+- escapedText.appendChild( textCData );
+- }
+- }
+-
+- const QList<Annotation*> revs = revisions();
+-
+- // create [revision] element of the annotation node (if any)
+- if ( revs.isEmpty() )
+- return;
+-
+- // add all revisions as children of revisions element
+- foreach (const Annotation *rev, revs)
+- {
+- QDomElement r = document.createElement( "revision" );
+- annNode.appendChild( r );
+- // set element attributes
+- r.setAttribute( "revScope", (int)rev->revisionScope() );
+- r.setAttribute( "revType", (int)rev->revisionType() );
+- // use revision as the annotation element, so fill it up
+- AnnotationUtils::storeAnnotation( rev, r, document );
+- delete rev;
+- }
+-}
+-
+-QString Annotation::author() const
+-{
+- Q_D( const Annotation );
+-
+- if (!d->pdfAnnot)
+- return d->author;
+-
+- const AnnotMarkup *markupann = dynamic_cast<const AnnotMarkup*>(d->pdfAnnot);
+- return markupann ? UnicodeParsedString( markupann->getLabel() ) : QString();
+-}
+-
+-void Annotation::setAuthor( const QString &author )
+-{
+- Q_D( Annotation );
+-
+- if (!d->pdfAnnot)
+- {
+- d->author = author;
+- return;
+- }
+-
+- AnnotMarkup *markupann = dynamic_cast<AnnotMarkup*>(d->pdfAnnot);
+- if (markupann)
+- {
+- GooString *s = QStringToUnicodeGooString(author);
+- markupann->setLabel(s);
+- delete s;
+- }
+-}
+-
+-QString Annotation::contents() const
+-{
+- Q_D( const Annotation );
+-
+- if (!d->pdfAnnot)
+- return d->contents;
+-
+- return UnicodeParsedString( d->pdfAnnot->getContents() );
+-}
+-
+-void Annotation::setContents( const QString &contents )
+-{
+- Q_D( Annotation );
+-
+- if (!d->pdfAnnot)
+- {
+- d->contents = contents;
+- return;
+- }
+-
+- GooString *s = QStringToUnicodeGooString(contents);
+- d->pdfAnnot->setContents(s);
+- delete s;
+-}
+-
+-QString Annotation::uniqueName() const
+-{
+- Q_D( const Annotation );
+-
+- if (!d->pdfAnnot)
+- return d->uniqueName;
+-
+- return UnicodeParsedString( d->pdfAnnot->getName() );
+-}
+-
+-void Annotation::setUniqueName( const QString &uniqueName )
+-{
+- Q_D( Annotation );
+-
+- if (!d->pdfAnnot)
+- {
+- d->uniqueName = uniqueName;
+- return;
+- }
+-
+- QByteArray ascii = uniqueName.toAscii();
+- GooString s(ascii.constData());
+- d->pdfAnnot->setName(&s);
+-}
+-
+-QDateTime Annotation::modificationDate() const
+-{
+- Q_D( const Annotation );
+-
+- if (!d->pdfAnnot)
+- return d->modDate;
+-
+- if ( d->pdfAnnot->getModified() )
+- return convertDate( d->pdfAnnot->getModified()->getCString() );
+- else
+- return QDateTime();
+-}
+-
+-void Annotation::setModificationDate( const QDateTime &date )
+-{
+- Q_D( Annotation );
+-
+- if (!d->pdfAnnot)
+- {
+- d->modDate = date;
+- return;
+- }
+-
+-#if 0 // TODO: Conversion routine is broken
+- if (d->pdfAnnot)
+- {
+- time_t t = date.toTime_t();
+- GooString *s = timeToDateString(&t);
+- d->pdfAnnot->setModified(s);
+- delete s;
+- }
+-#endif
+-}
+-
+-QDateTime Annotation::creationDate() const
+-{
+- Q_D( const Annotation );
+-
+- if (!d->pdfAnnot)
+- return d->creationDate;
+-
+- const AnnotMarkup *markupann = dynamic_cast<const AnnotMarkup*>(d->pdfAnnot);
+-
+- if (markupann && markupann->getDate())
+- return convertDate( markupann->getDate()->getCString() );
+-
+- return modificationDate();
+-}
+-
+-void Annotation::setCreationDate( const QDateTime &date )
+-{
+- Q_D( Annotation );
+-
+- if (!d->pdfAnnot)
+- {
+- d->creationDate = date;
+- return;
+- }
+-
+-#if 0 // TODO: Conversion routine is broken
+- AnnotMarkup *markupann = dynamic_cast<AnnotMarkup*>(d->pdfAnnot);
+- if (markupann)
+- {
+- time_t t = date.toTime_t();
+- GooString *s = timeToDateString(&t);
+- markupann->setDate(s);
+- delete s;
+- }
+-#endif
+-}
+-
+-static int fromPdfFlags(int flags)
+-{
+- int qtflags = 0;
+-
+- if ( flags & Annot::flagHidden )
+- qtflags |= Annotation::Hidden;
+- if ( flags & Annot::flagNoZoom )
+- qtflags |= Annotation::FixedSize;
+- if ( flags & Annot::flagNoRotate )
+- qtflags |= Annotation::FixedRotation;
+- if ( !( flags & Annot::flagPrint ) )
+- qtflags |= Annotation::DenyPrint;
+- if ( flags & Annot::flagReadOnly )
+- qtflags |= (Annotation::DenyWrite | Annotation::DenyDelete);
+- if ( flags & Annot::flagLocked )
+- qtflags |= Annotation::DenyDelete;
+- if ( flags & Annot::flagToggleNoView )
+- qtflags |= Annotation::ToggleHidingOnMouse;
+-
+- return qtflags;
+-}
+-
+-static int toPdfFlags(int qtflags)
+-{
+- int flags = 0;
+-
+- if ( qtflags & Annotation::Hidden )
+- flags |= Annot::flagHidden;
+- if ( qtflags & Annotation::FixedSize )
+- flags |= Annot::flagNoZoom;
+- if ( qtflags & Annotation::FixedRotation )
+- flags |= Annot::flagNoRotate;
+- if ( !( qtflags & Annotation::DenyPrint ) )
+- flags |= Annot::flagPrint;
+- if ( qtflags & Annotation::DenyWrite )
+- flags |= Annot::flagReadOnly;
+- if ( qtflags & Annotation::DenyDelete )
+- flags |= Annot::flagLocked;
+- if ( qtflags & Annotation::ToggleHidingOnMouse )
+- flags |= Annot::flagToggleNoView;
+-
+- return flags;
+-}
+-
+-int Annotation::flags() const
+-{
+- Q_D( const Annotation );
+-
+- if (!d->pdfAnnot)
+- return d->flags;
+-
+- return fromPdfFlags( d->pdfAnnot->getFlags() );
+-}
+-
+-void Annotation::setFlags( int flags )
+-{
+- Q_D( Annotation );
+-
+- if (!d->pdfAnnot)
+- {
+- d->flags = flags;
+- return;
+- }
+-
+- d->pdfAnnot->setFlags(toPdfFlags( flags ));
+-}
+-
+-QRectF Annotation::boundary() const
+-{
+- Q_D( const Annotation );
+-
+- if (!d->pdfAnnot)
+- return d->boundary;
+-
+- const PDFRectangle * rect = d->pdfAnnot->getRect();
+- return d->fromPdfRectangle( *rect );
+-}
+-
+-void Annotation::setBoundary( const QRectF &boundary )
+-{
+- Q_D( Annotation );
+-
+- if (!d->pdfAnnot)
+- {
+- d->boundary = boundary;
+- return;
+- }
+-
+- PDFRectangle rect = d->boundaryToPdfRectangle( boundary, flags() );
+- d->pdfAnnot->setRect(&rect);
+-}
+-
+-Annotation::Style Annotation::style() const
+-{
+- Q_D( const Annotation );
+-
+- if (!d->pdfAnnot)
+- return d->style;
+-
+- Style s;
+- s.setColor(convertAnnotColor( d->pdfAnnot->getColor() ));
+-
+- const AnnotMarkup *markupann = dynamic_cast<const AnnotMarkup*>(d->pdfAnnot);
+- if (markupann)
+- s.setOpacity( markupann->getOpacity() );
+-
+- const AnnotBorder *border = d->pdfAnnot->getBorder();
+- if (border)
+- {
+- if ( border->getType() == AnnotBorder::typeArray )
+- {
+- const AnnotBorderArray *border_array = static_cast<const AnnotBorderArray*>(border);
+- s.setXCorners( border_array->getHorizontalCorner() );
+- s.setYCorners( border_array->getVerticalCorner() );
+- }
+-
+- s.setWidth( border->getWidth() );
+- s.setLineStyle((Annotation::LineStyle)( 1 << border->getStyle() ));
+-
+- const int dashArrLen = border->getDashLength();
+- const double* dashArrData = border->getDash();
+- QVector<double> dashArrVect( dashArrLen );
+- for (int i = 0; i < dashArrLen; ++i)
+- dashArrVect[i] = dashArrData[i];
+- s.setDashArray(dashArrVect);
+- }
+-
+- AnnotBorderEffect *border_effect;
+- switch (d->pdfAnnot->getType())
+- {
+- case Annot::typeFreeText:
+- border_effect = static_cast<AnnotFreeText*>(d->pdfAnnot)->getBorderEffect();
+- break;
+- case Annot::typeSquare:
+- case Annot::typeCircle:
+- border_effect = static_cast<AnnotGeometry*>(d->pdfAnnot)->getBorderEffect();
+- break;
+- default:
+- border_effect = 0;
+- }
+- if (border_effect)
+- {
+- s.setLineEffect( (Annotation::LineEffect)border_effect->getEffectType() );
+- s.setEffectIntensity( border_effect->getIntensity() );
+- }
+-
+- return s;
+-}
+-
+-void Annotation::setStyle( const Annotation::Style& style )
+-{
+- Q_D( Annotation );
+-
+- if (!d->pdfAnnot)
+- {
+- d->style = style;
+- return;
+- }
+-
+- d->pdfAnnot->setColor(convertQColor( style.color() ));
+-
+- AnnotMarkup *markupann = dynamic_cast<AnnotMarkup*>(d->pdfAnnot);
+- if (markupann)
+- markupann->setOpacity( style.opacity() );
+-
+- AnnotBorderArray * border = new AnnotBorderArray();
+- border->setWidth( style.width() );
+- border->setHorizontalCorner( style.xCorners() );
+- border->setVerticalCorner( style.yCorners() );
+- d->pdfAnnot->setBorder(border);
+-}
+-
+-Annotation::Popup Annotation::popup() const
+-{
+- Q_D( const Annotation );
+-
+- if (!d->pdfAnnot)
+- return d->popup;
+-
+- Popup w;
+- AnnotPopup *popup = 0;
+- int flags = -1; // Not initialized
+-
+- const AnnotMarkup *markupann = dynamic_cast<const AnnotMarkup*>(d->pdfAnnot);
+- if (markupann)
+- {
+- popup = markupann->getPopup();
+- w.setSummary(UnicodeParsedString( markupann->getSubject() ));
+- }
+-
+- if (popup)
+- {
+- flags = fromPdfFlags( popup->getFlags() ) & ( Annotation::Hidden |
+- Annotation::FixedSize | Annotation::FixedRotation );
+-
+- if (!popup->getOpen())
+- flags |= Annotation::Hidden;
+-
+- const PDFRectangle * rect = popup->getRect();
+- w.setGeometry( d->fromPdfRectangle( *rect ) );
+- }
+-
+- if (d->pdfAnnot->getType() == Annot::typeText)
+- {
+- const AnnotText * textann = static_cast<const AnnotText*>(d->pdfAnnot);
+-
+- // Text annotations default to same rect as annotation
+- if (flags == -1)
+- {
+- flags = 0;
+- w.setGeometry( boundary() );
+- }
+-
+- // If text is not 'opened', force window hiding. if the window
+- // was parsed from popup, the flag should already be set
+- if ( !textann->getOpen() && flags != -1 )
+- flags |= Annotation::Hidden;
+- }
+-
+- w.setFlags(flags);
+-
+- return w;
+-}
+-
+-void Annotation::setPopup( const Annotation::Popup& popup )
+-{
+- Q_D( Annotation );
+-
+- if (!d->pdfAnnot)
+- {
+- d->popup = popup;
+- return;
+- }
+-
+-#if 0 /* TODO: Remove old popup and add AnnotPopup to page */
+- AnnotMarkup *markupann = dynamic_cast<AnnotMarkup*>(d->pdfAnnot);
+- if (!markupann)
+- return;
+-
+- // Create a new AnnotPopup and assign it to pdfAnnot
+- PDFRectangle rect = d->toPdfRectangle( popup.geometry() );
+- AnnotPopup * p = new AnnotPopup( d->pdfPage->getDoc(), &rect );
+- p->setOpen( !(popup.flags() & Annotation::Hidden) );
+- if (!popup.summary().isEmpty())
+- {
+- GooString *s = QStringToUnicodeGooString(popup.summary());
+- markupann->setLabel(s);
+- delete s;
+- }
+- markupann->setPopup(p);
+-#endif
+-}
+-
+-Annotation::RevScope Annotation::revisionScope() const
+-{
+- Q_D( const Annotation );
+-
+- if (!d->pdfAnnot)
+- return d->revisionScope;
+-
+- const AnnotMarkup *markupann = dynamic_cast<const AnnotMarkup*>(d->pdfAnnot);
+-
+- if (markupann && markupann->getInReplyToID() != 0)
+- {
+- switch (markupann->getReplyTo())
+- {
+- case AnnotMarkup::replyTypeR:
+- return Annotation::Reply;
+- case AnnotMarkup::replyTypeGroup:
+- return Annotation::Group;
+- }
+- }
+-
+- return Annotation::Root; // It's not a revision
+-}
+-
+-Annotation::RevType Annotation::revisionType() const
+-{
+- Q_D( const Annotation );
+-
+- if (!d->pdfAnnot)
+- return d->revisionType;
+-
+- const AnnotText *textann = dynamic_cast<const AnnotText*>(d->pdfAnnot);
+-
+- if (textann && textann->getInReplyToID() != 0)
+- {
+- switch (textann->getState())
+- {
+- case AnnotText::stateMarked:
+- return Annotation::Marked;
+- case AnnotText::stateUnmarked:
+- return Annotation::Unmarked;
+- case AnnotText::stateAccepted:
+- return Annotation::Accepted;
+- case AnnotText::stateRejected:
+- return Annotation::Rejected;
+- case AnnotText::stateCancelled:
+- return Annotation::Cancelled;
+- case AnnotText::stateCompleted:
+- return Annotation::Completed;
+- default:
+- break;
+- }
+- }
+-
+- return Annotation::None;
+-}
+-
+-QList<Annotation*> Annotation::revisions() const
+-{
+- Q_D( const Annotation );
+-
+- if (!d->pdfAnnot)
+- {
+- /* Return aliases, whose ownership goes to the caller */
+- QList<Annotation*> res;
+- foreach (Annotation *rev, d->revisions)
+- res.append( rev->d_ptr->makeAlias() );
+- return res;
+- }
+-
+- /* If the annotation doesn't live in a object on its own (eg bug51361), it
+- * has no ref, therefore it can't have revisions */
+- if ( !d->pdfAnnot->getHasRef() )
+- return QList<Annotation*>();
+-
+- return AnnotationPrivate::findAnnotations( d->pdfPage, d->parentDoc, QSet<Annotation::SubType>(), d->pdfAnnot->getId() );
+-}
+-
+-//END Annotation implementation
+-
+-
+-/** TextAnnotation [Annotation] */
+-class TextAnnotationPrivate : public AnnotationPrivate
+-{
+- public:
+- TextAnnotationPrivate();
+- Annotation * makeAlias();
+- Annot* createNativeAnnot(::Page *destPage, DocumentData *doc);
+-
+- // data fields
+- TextAnnotation::TextType textType;
+- QString textIcon;
+- QFont textFont;
+- int inplaceAlign; // 0:left, 1:center, 2:right
+- QVector<QPointF> inplaceCallout;
+- TextAnnotation::InplaceIntent inplaceIntent;
+-
+- // Helper
+- static GooString * toAppearanceString(const QFont &font);
+-};
+-
+-TextAnnotationPrivate::TextAnnotationPrivate()
+- : AnnotationPrivate(), textType( TextAnnotation::Linked ),
+- textIcon( "Note" ), inplaceAlign( 0 ),
+- inplaceIntent( TextAnnotation::Unknown )
+-{
+-}
+-
+-Annotation * TextAnnotationPrivate::makeAlias()
+-{
+- return new TextAnnotation(*this);
+-}
+-
+-GooString * TextAnnotationPrivate::toAppearanceString(const QFont &font)
+-{
+- GooString * s = GooString::format("/Invalid_font {0:d} Tf", font.pointSize());
+- // TODO: Font family, style (bold, italic, ...) and pointSize as float
+- return s;
+-}
+-
+-Annot* TextAnnotationPrivate::createNativeAnnot(::Page *destPage, DocumentData *doc)
+-{
+- // Setters are defined in the public class
+- TextAnnotation *q = static_cast<TextAnnotation*>( makeAlias() );
+-
+- // Set page and contents
+- pdfPage = destPage;
+- parentDoc = doc;
+-
+- // Set pdfAnnot
+- PDFRectangle rect = boundaryToPdfRectangle(boundary, flags);
+- if (textType == TextAnnotation::Linked)
+- {
+- pdfAnnot = new AnnotText(destPage->getDoc(), &rect);
+- }
+- else
+- {
+- GooString * da = toAppearanceString(textFont);
+- pdfAnnot = new AnnotFreeText(destPage->getDoc(), &rect, da);
+- delete da;
+- }
+-
+- // Set properties
+- flushBaseAnnotationProperties();
+- q->setTextIcon(textIcon);
+- q->setInplaceAlign(inplaceAlign);
+- q->setCalloutPoints(inplaceCallout);
+- q->setInplaceIntent(inplaceIntent);
+-
+- delete q;
+-
+- inplaceCallout.clear(); // Free up memory
+-
+- return pdfAnnot;
+-}
+-
+-TextAnnotation::TextAnnotation( TextAnnotation::TextType type )
+- : Annotation( *new TextAnnotationPrivate() )
+-{
+- setTextType( type );
+-}
+-
+-TextAnnotation::TextAnnotation(TextAnnotationPrivate &dd)
+- : Annotation( dd )
+-{}
+-
+-TextAnnotation::TextAnnotation( const QDomNode & node )
+- : Annotation( *new TextAnnotationPrivate, node )
+-{
+- // loop through the whole children looking for a 'text' element
+- QDomNode subNode = node.firstChild();
+- while( subNode.isElement() )
+- {
+- QDomElement e = subNode.toElement();
+- subNode = subNode.nextSibling();
+- if ( e.tagName() != "text" )
+- continue;
+-
+- // parse the attributes
+- if ( e.hasAttribute( "type" ) )
+- setTextType((TextAnnotation::TextType)e.attribute( "type" ).toInt());
+- if ( e.hasAttribute( "icon" ) )
+- setTextIcon(e.attribute( "icon" ));
+- if ( e.hasAttribute( "font" ) )
+- {
+- QFont font;
+- font.fromString( e.attribute( "font" ) );
+- setTextFont(font);
+- }
+- if ( e.hasAttribute( "align" ) )
+- setInplaceAlign(e.attribute( "align" ).toInt());
+- if ( e.hasAttribute( "intent" ) )
+- setInplaceIntent((TextAnnotation::InplaceIntent)e.attribute( "intent" ).toInt());
+-
+- // parse the subnodes
+- QDomNode eSubNode = e.firstChild();
+- while ( eSubNode.isElement() )
+- {
+- QDomElement ee = eSubNode.toElement();
+- eSubNode = eSubNode.nextSibling();
+-
+- if ( ee.tagName() == "escapedText" )
+- {
+- setInplaceText(ee.firstChild().toCDATASection().data());
+- }
+- else if ( ee.tagName() == "callout" )
+- {
+- QVector<QPointF> points(3);
+- points[0] = QPointF(ee.attribute( "ax" ).toDouble(),
+- ee.attribute( "ay" ).toDouble());
+- points[1] = QPointF(ee.attribute( "bx" ).toDouble(),
+- ee.attribute( "by" ).toDouble());
+- points[2] = QPointF(ee.attribute( "cx" ).toDouble(),
+- ee.attribute( "cy" ).toDouble());
+- setCalloutPoints(points);
+- }
+- }
+-
+- // loading complete
+- break;
+- }
+-}
+-
+-TextAnnotation::~TextAnnotation()
+-{
+-}
+-
+-void TextAnnotation::store( QDomNode & node, QDomDocument & document ) const
+-{
+- // store base annotation properties
+- storeBaseAnnotationProperties( node, document );
+-
+- // create [text] element
+- QDomElement textElement = document.createElement( "text" );
+- node.appendChild( textElement );
+-
+- // store the optional attributes
+- if ( textType() != Linked )
+- textElement.setAttribute( "type", (int)textType() );
+- if ( textIcon() != "Note" )
+- textElement.setAttribute( "icon", textIcon() );
+- if ( inplaceAlign() )
+- textElement.setAttribute( "align", inplaceAlign() );
+- if ( inplaceIntent() != Unknown )
+- textElement.setAttribute( "intent", (int)inplaceIntent() );
+-
+- textElement.setAttribute( "font", textFont().toString() );
+-
+- // Sub-Node-1 - escapedText
+- if ( !inplaceText().isEmpty() )
+- {
+- QDomElement escapedText = document.createElement( "escapedText" );
+- textElement.appendChild( escapedText );
+- QDomCDATASection textCData = document.createCDATASection( inplaceText() );
+- escapedText.appendChild( textCData );
+- }
+-
+- // Sub-Node-2 - callout
+- if ( calloutPoint(0).x() != 0.0 )
+- {
+- QDomElement calloutElement = document.createElement( "callout" );
+- textElement.appendChild( calloutElement );
+- calloutElement.setAttribute( "ax", QString::number( calloutPoint(0).x() ) );
+- calloutElement.setAttribute( "ay", QString::number( calloutPoint(0).y() ) );
+- calloutElement.setAttribute( "bx", QString::number( calloutPoint(1).x() ) );
+- calloutElement.setAttribute( "by", QString::number( calloutPoint(1).y() ) );
+- calloutElement.setAttribute( "cx", QString::number( calloutPoint(2).x() ) );
+- calloutElement.setAttribute( "cy", QString::number( calloutPoint(2).y() ) );
+- }
+-}
+-
+-Annotation::SubType TextAnnotation::subType() const
+-{
+- return AText;
+-}
+-
+-TextAnnotation::TextType TextAnnotation::textType() const
+-{
+- Q_D( const TextAnnotation );
+-
+- if (!d->pdfAnnot)
+- return d->textType;
+-
+- return d->pdfAnnot->getType() == Annot::typeText ?
+- TextAnnotation::Linked : TextAnnotation::InPlace;
+-}
+-
+-void TextAnnotation::setTextType( TextAnnotation::TextType type )
+-{
+- Q_D( TextAnnotation );
+-
+- if (!d->pdfAnnot)
+- {
+- d->textType = type;
+- return;
+- }
+-
+- // Type cannot be changed if annotation is already tied
+-}
+-
+-QString TextAnnotation::textIcon() const
+-{
+- Q_D( const TextAnnotation );
+-
+- if (!d->pdfAnnot)
+- return d->textIcon;
+-
+- if (d->pdfAnnot->getType() == Annot::typeText)
+- {
+- const AnnotText * textann = static_cast<const AnnotText*>(d->pdfAnnot);
+- return QString::fromLatin1( textann->getIcon()->getCString() );
+- }
+-
+- return QString();
+-}
+-
+-void TextAnnotation::setTextIcon( const QString &icon )
+-{
+- Q_D( TextAnnotation );
+-
+- if (!d->pdfAnnot)
+- {
+- d->textIcon = icon;
+- return;
+- }
+-
+- if (d->pdfAnnot->getType() == Annot::typeText)
+- {
+- AnnotText * textann = static_cast<AnnotText*>(d->pdfAnnot);
+- QByteArray encoded = icon.toLatin1();
+- GooString s(encoded.constData());
+- textann->setIcon(&s);
+- }
+-}
+-
+-QFont TextAnnotation::textFont() const
+-{
+- Q_D( const TextAnnotation );
+-
+- if (!d->pdfAnnot)
+- return d->textFont;
+-
+- QFont font;
+-
+- if (d->pdfAnnot->getType() == Annot::typeFreeText)
+- {
+- const AnnotFreeText * ftextann = static_cast<const AnnotFreeText*>(d->pdfAnnot);
+- const GooString * da = ftextann->getAppearanceString();
+- if (da)
+- {
+- // At the moment, only font size is parsed
+- QString style = QString::fromLatin1( da->getCString() );
+- QRegExp rx("(\\d+)(\\.\\d*)? Tf");
+- if (rx.indexIn(style) != -1)
+- font.setPointSize( rx.cap(1).toInt() );
+- // TODO: Other properties
+- }
+- }
+-
+- return font;
+-}
+-
+-void TextAnnotation::setTextFont( const QFont &font )
+-{
+- Q_D( TextAnnotation );
+-
+- if (!d->pdfAnnot)
+- {
+- d->textFont = font;
+- return;
+- }
+-
+- if (d->pdfAnnot->getType() != Annot::typeFreeText)
+- return;
+-
+- AnnotFreeText * ftextann = static_cast<AnnotFreeText*>(d->pdfAnnot);
+- GooString * da = TextAnnotationPrivate::toAppearanceString(font);
+- ftextann->setAppearanceString(da);
+- delete da;
+-}
+-
+-int TextAnnotation::inplaceAlign() const
+-{
+- Q_D( const TextAnnotation );
+-
+- if (!d->pdfAnnot)
+- return d->inplaceAlign;
+-
+- if (d->pdfAnnot->getType() == Annot::typeFreeText)
+- {
+- const AnnotFreeText * ftextann = static_cast<const AnnotFreeText*>(d->pdfAnnot);
+- return ftextann->getQuadding();
+- }
+-
+- return 0;
+-}
+-
+-void TextAnnotation::setInplaceAlign( int align )
+-{
+- Q_D( TextAnnotation );
+-
+- if (!d->pdfAnnot)
+- {
+- d->inplaceAlign = align;
+- return;
+- }
+-
+- if (d->pdfAnnot->getType() == Annot::typeFreeText)
+- {
+- AnnotFreeText * ftextann = static_cast<AnnotFreeText*>(d->pdfAnnot);
+- ftextann->setQuadding((AnnotFreeText::AnnotFreeTextQuadding)align);
+- }
+-}
+-
+-QString TextAnnotation::inplaceText() const
+-{
+- return contents();
+-}
+-
+-void TextAnnotation::setInplaceText( const QString &text )
+-{
+- setContents(text);
+-}
+-
+-QPointF TextAnnotation::calloutPoint( int id ) const
+-{
+- const QVector<QPointF> points = calloutPoints();
+- if ( id < 0 || id >= points.size() )
+- return QPointF();
+- else
+- return points[id];
+-}
+-
+-QVector<QPointF> TextAnnotation::calloutPoints() const
+-{
+- Q_D( const TextAnnotation );
+-
+- if (!d->pdfAnnot)
+- return d->inplaceCallout;
+-
+- if (d->pdfAnnot->getType() == Annot::typeText)
+- return QVector<QPointF>();
+-
+- const AnnotFreeText * ftextann = static_cast<const AnnotFreeText*>(d->pdfAnnot);
+- const AnnotCalloutLine *callout = ftextann->getCalloutLine();
+-
+- if (!callout)
+- return QVector<QPointF>();
+-
+- double MTX[6];
+- d->fillTransformationMTX(MTX);
+-
+- const AnnotCalloutMultiLine * callout_v6 = dynamic_cast<const AnnotCalloutMultiLine*>(callout);
+- QVector<QPointF> res(callout_v6 ? 3 : 2);
+- XPDFReader::transform(MTX, callout->getX1(), callout->getY1(), res[0]);
+- XPDFReader::transform(MTX, callout->getX2(), callout->getY2(), res[1]);
+- if (callout_v6)
+- XPDFReader::transform(MTX, callout_v6->getX3(), callout_v6->getY3(), res[2]);
+- return res;
+-}
+-
+-void TextAnnotation::setCalloutPoints( const QVector<QPointF> &points )
+-{
+- Q_D( TextAnnotation );
+- if (!d->pdfAnnot)
+- {
+- d->inplaceCallout = points;
+- return;
+- }
+-
+- if (d->pdfAnnot->getType() != Annot::typeFreeText)
+- return;
+-
+- AnnotFreeText * ftextann = static_cast<AnnotFreeText*>(d->pdfAnnot);
+- const int count = points.size();
+-
+- if (count == 0)
+- {
+- ftextann->setCalloutLine(0);
+- return;
+- }
+-
+- if (count != 2 && count != 3)
+- {
+- error(errSyntaxError, -1, "Expected zero, two or three points for callout");
+- return;
+- }
+-
+- AnnotCalloutLine *callout;
+- double x1, y1, x2, y2;
+- double MTX[6];
+- d->fillTransformationMTX(MTX);
+-
+- XPDFReader::invTransform( MTX, points[0], x1, y1 );
+- XPDFReader::invTransform( MTX, points[1], x2, y2 );
+- if (count == 3)
+- {
+- double x3, y3;
+- XPDFReader::invTransform( MTX, points[2], x3, y3 );
+- callout = new AnnotCalloutMultiLine(x1, y1, x2, y2, x3, y3);
+- }
+- else
+- {
+- callout = new AnnotCalloutLine(x1, y1, x2, y2);
+- }
+-
+- ftextann->setCalloutLine(callout);
+- delete callout;
+-}
+-
+-TextAnnotation::InplaceIntent TextAnnotation::inplaceIntent() const
+-{
+- Q_D( const TextAnnotation );
+-
+- if (!d->pdfAnnot)
+- return d->inplaceIntent;
+-
+- if (d->pdfAnnot->getType() == Annot::typeFreeText)
+- {
+- const AnnotFreeText * ftextann = static_cast<const AnnotFreeText*>(d->pdfAnnot);
+- return (TextAnnotation::InplaceIntent)ftextann->getIntent();
+- }
+-
+- return TextAnnotation::Unknown;
+-}
+-
+-void TextAnnotation::setInplaceIntent( TextAnnotation::InplaceIntent intent )
+-{
+- Q_D( TextAnnotation );
+-
+- if (!d->pdfAnnot)
+- {
+- d->inplaceIntent = intent;
+- return;
+- }
+-
+- if (d->pdfAnnot->getType() == Annot::typeFreeText)
+- {
+- AnnotFreeText * ftextann = static_cast<AnnotFreeText*>(d->pdfAnnot);
+- ftextann->setIntent((AnnotFreeText::AnnotFreeTextIntent)intent);
+- }
+-}
+-
+-
+-/** LineAnnotation [Annotation] */
+-class LineAnnotationPrivate : public AnnotationPrivate
+-{
+- public:
+- LineAnnotationPrivate();
+- Annotation * makeAlias();
+- Annot* createNativeAnnot(::Page *destPage, DocumentData *doc);
+-
+- // data fields (note uses border for rendering style)
+- QLinkedList<QPointF> linePoints;
+- LineAnnotation::TermStyle lineStartStyle;
+- LineAnnotation::TermStyle lineEndStyle;
+- bool lineClosed : 1; // (if true draw close shape)
+- bool lineShowCaption : 1;
+- LineAnnotation::LineType lineType;
+- QColor lineInnerColor;
+- double lineLeadingFwdPt;
+- double lineLeadingBackPt;
+- LineAnnotation::LineIntent lineIntent;
+-};
+-
+-LineAnnotationPrivate::LineAnnotationPrivate()
+- : AnnotationPrivate(), lineStartStyle( LineAnnotation::None ),
+- lineEndStyle( LineAnnotation::None ), lineClosed( false ),
+- lineShowCaption( false ), lineLeadingFwdPt( 0 ),
+- lineLeadingBackPt( 0 ), lineIntent( LineAnnotation::Unknown )
+-{
+-}
+-
+-Annotation * LineAnnotationPrivate::makeAlias()
+-{
+- return new LineAnnotation(*this);
+-}
+-
+-Annot* LineAnnotationPrivate::createNativeAnnot(::Page *destPage, DocumentData *doc)
+-{
+- // Setters are defined in the public class
+- LineAnnotation *q = static_cast<LineAnnotation*>( makeAlias() );
+-
+- // Set page and document
+- pdfPage = destPage;
+- parentDoc = doc;
+-
+- // Set pdfAnnot
+- PDFRectangle rect = boundaryToPdfRectangle(boundary, flags);
+- if (lineType == LineAnnotation::StraightLine)
+- {
+- pdfAnnot = new AnnotLine(doc->doc, &rect);
+- }
+- else
+- {
+- pdfAnnot = new AnnotPolygon(doc->doc, &rect,
+- lineClosed ? Annot::typePolygon : Annot::typePolyLine );
+- }
+-
+- // Set properties
+- flushBaseAnnotationProperties();
+- q->setLinePoints(linePoints);
+- q->setLineStartStyle(lineStartStyle);
+- q->setLineEndStyle(lineEndStyle);
+- q->setLineInnerColor(lineInnerColor);
+- q->setLineLeadingForwardPoint(lineLeadingFwdPt);
+- q->setLineLeadingBackPoint(lineLeadingBackPt);
+- q->setLineShowCaption(lineShowCaption);
+- q->setLineIntent(lineIntent);
+-
+- delete q;
+-
+- linePoints.clear(); // Free up memory
+-
+- return pdfAnnot;
+-}
+-
+-LineAnnotation::LineAnnotation( LineAnnotation::LineType type )
+- : Annotation( *new LineAnnotationPrivate() )
+-{
+- setLineType(type);
+-}
+-
+-LineAnnotation::LineAnnotation(LineAnnotationPrivate &dd)
+- : Annotation( dd )
+-{}
+-
+-LineAnnotation::LineAnnotation( const QDomNode & node )
+- : Annotation( *new LineAnnotationPrivate(), node )
+-{
+- // loop through the whole children looking for a 'line' element
+- QDomNode subNode = node.firstChild();
+- while( subNode.isElement() )
+- {
+- QDomElement e = subNode.toElement();
+- subNode = subNode.nextSibling();
+- if ( e.tagName() != "line" )
+- continue;
+-
+- // parse the attributes
+- if ( e.hasAttribute( "startStyle" ) )
+- setLineStartStyle((LineAnnotation::TermStyle)e.attribute( "startStyle" ).toInt());
+- if ( e.hasAttribute( "endStyle" ) )
+- setLineEndStyle((LineAnnotation::TermStyle)e.attribute( "endStyle" ).toInt());
+- if ( e.hasAttribute( "closed" ) )
+- setLineClosed(e.attribute( "closed" ).toInt());
+- if ( e.hasAttribute( "innerColor" ) )
+- setLineInnerColor(QColor( e.attribute( "innerColor" ) ));
+- if ( e.hasAttribute( "leadFwd" ) )
+- setLineLeadingForwardPoint(e.attribute( "leadFwd" ).toDouble());
+- if ( e.hasAttribute( "leadBack" ) )
+- setLineLeadingBackPoint(e.attribute( "leadBack" ).toDouble());
+- if ( e.hasAttribute( "showCaption" ) )
+- setLineShowCaption(e.attribute( "showCaption" ).toInt());
+- if ( e.hasAttribute( "intent" ) )
+- setLineIntent((LineAnnotation::LineIntent)e.attribute( "intent" ).toInt());
+-
+- // parse all 'point' subnodes
+- QLinkedList<QPointF> points;
+- QDomNode pointNode = e.firstChild();
+- while ( pointNode.isElement() )
+- {
+- QDomElement pe = pointNode.toElement();
+- pointNode = pointNode.nextSibling();
+-
+- if ( pe.tagName() != "point" )
+- continue;
+-
+- QPointF p(pe.attribute( "x", "0.0" ).toDouble(), pe.attribute( "y", "0.0" ).toDouble());
+- points.append( p );
+- }
+- setLinePoints(points);
+- setLineType(points.size() == 2 ? StraightLine : Polyline);
+-
+- // loading complete
+- break;
+- }
+-}
+-
+-LineAnnotation::~LineAnnotation()
+-{
+-}
+-
+-void LineAnnotation::store( QDomNode & node, QDomDocument & document ) const
+-{
+- // store base annotation properties
+- storeBaseAnnotationProperties( node, document );
+-
+- // create [line] element
+- QDomElement lineElement = document.createElement( "line" );
+- node.appendChild( lineElement );
+-
+- // store the attributes
+- if ( lineStartStyle() != None )
+- lineElement.setAttribute( "startStyle", (int)lineStartStyle() );
+- if ( lineEndStyle() != None )
+- lineElement.setAttribute( "endStyle", (int)lineEndStyle() );
+- if ( isLineClosed() )
+- lineElement.setAttribute( "closed", isLineClosed() );
+- if ( lineInnerColor().isValid() )
+- lineElement.setAttribute( "innerColor", lineInnerColor().name() );
+- if ( lineLeadingForwardPoint() != 0.0 )
+- lineElement.setAttribute( "leadFwd", QString::number( lineLeadingForwardPoint() ) );
+- if ( lineLeadingBackPoint() != 0.0 )
+- lineElement.setAttribute( "leadBack", QString::number( lineLeadingBackPoint() ) );
+- if ( lineShowCaption() )
+- lineElement.setAttribute( "showCaption", lineShowCaption() );
+- if ( lineIntent() != Unknown )
+- lineElement.setAttribute( "intent", lineIntent() );
+-
+- // append the list of points
+- const QLinkedList<QPointF> points = linePoints();
+- if ( points.count() > 1 )
+- {
+- QLinkedList<QPointF>::const_iterator it = points.begin(), end = points.end();
+- while ( it != end )
+- {
+- const QPointF & p = *it;
+- QDomElement pElement = document.createElement( "point" );
+- lineElement.appendChild( pElement );
+- pElement.setAttribute( "x", QString::number( p.x() ) );
+- pElement.setAttribute( "y", QString::number( p.y() ) );
+- ++it;
+- }
+- }
+-}
+-
+-Annotation::SubType LineAnnotation::subType() const
+-{
+- return ALine;
+-}
+-
+-LineAnnotation::LineType LineAnnotation::lineType() const
+-{
+- Q_D( const LineAnnotation );
+-
+- if (!d->pdfAnnot)
+- return d->lineType;
+-
+- return (d->pdfAnnot->getType() == Annot::typeLine) ?
+- LineAnnotation::StraightLine : LineAnnotation::Polyline;
+-}
+-
+-void LineAnnotation::setLineType( LineAnnotation::LineType type )
+-{
+- Q_D( LineAnnotation );
+-
+- if (!d->pdfAnnot)
+- {
+- d->lineType = type;
+- return;
+- }
+-
+- // Type cannot be changed if annotation is already tied
+-}
+-
+-QLinkedList<QPointF> LineAnnotation::linePoints() const
+-{
+- Q_D( const LineAnnotation );
+-
+- if (!d->pdfAnnot)
+- return d->linePoints;
+-
+- double MTX[6];
+- d->fillTransformationMTX(MTX);
+-
+- QLinkedList<QPointF> res;
+- if (d->pdfAnnot->getType() == Annot::typeLine)
+- {
+- const AnnotLine * lineann = static_cast<const AnnotLine*>(d->pdfAnnot);
+- QPointF p;
+- XPDFReader::transform(MTX, lineann->getX1(), lineann->getY1(), p);
+- res.append(p);
+- XPDFReader::transform(MTX, lineann->getX2(), lineann->getY2(), p);
+- res.append(p);
+- }
+- else
+- {
+- const AnnotPolygon * polyann = static_cast<const AnnotPolygon*>(d->pdfAnnot);
+- const AnnotPath * vertices = polyann->getVertices();
+-
+- for (int i = 0; i < vertices->getCoordsLength(); ++i)
+- {
+- QPointF p;
+- XPDFReader::transform(MTX, vertices->getX(i), vertices->getY(i), p);
+- res.append(p);
+- }
+- }
+-
+- return res;
+-}
+-
+-void LineAnnotation::setLinePoints( const QLinkedList<QPointF> &points )
+-{
+- Q_D( LineAnnotation );
+-
+- if (!d->pdfAnnot)
+- {
+- d->linePoints = points;
+- return;
+- }
+-
+- if (d->pdfAnnot->getType() == Annot::typeLine)
+- {
+- AnnotLine *lineann = static_cast<AnnotLine*>(d->pdfAnnot);
+- if (points.size() != 2)
+- {
+- error(errSyntaxError, -1, "Expected two points for a straight line");
+- return;
+- }
+- double x1, y1, x2, y2;
+- double MTX[6];
+- d->fillTransformationMTX(MTX);
+- XPDFReader::invTransform( MTX, points.first(), x1, y1 );
+- XPDFReader::invTransform( MTX, points.last(), x2, y2 );
+- lineann->setVertices(x1, y1, x2, y2);
+- }
+- else
+- {
+- AnnotPolygon *polyann = static_cast<AnnotPolygon*>(d->pdfAnnot);
+- AnnotPath * p = d->toAnnotPath(points);
+- polyann->setVertices(p);
+- delete p;
+- }
+-}
+-
+-LineAnnotation::TermStyle LineAnnotation::lineStartStyle() const
+-{
+- Q_D( const LineAnnotation );
+-
+- if (!d->pdfAnnot)
+- return d->lineStartStyle;
+-
+- if (d->pdfAnnot->getType() == Annot::typeLine)
+- {
+- const AnnotLine * lineann = static_cast<const AnnotLine*>(d->pdfAnnot);
+- return (LineAnnotation::TermStyle)lineann->getStartStyle();
+- }
+- else
+- {
+- const AnnotPolygon * polyann = static_cast<const AnnotPolygon*>(d->pdfAnnot);
+- return (LineAnnotation::TermStyle)polyann->getStartStyle();
+- }
+-}
+-
+-void LineAnnotation::setLineStartStyle( LineAnnotation::TermStyle style )
+-{
+- Q_D( LineAnnotation );
+-
+- if (!d->pdfAnnot)
+- {
+- d->lineStartStyle = style;
+- return;
+- }
+-
+- if (d->pdfAnnot->getType() == Annot::typeLine)
+- {
+- AnnotLine *lineann = static_cast<AnnotLine*>(d->pdfAnnot);
+- lineann->setStartEndStyle((AnnotLineEndingStyle)style, lineann->getEndStyle());
+- }
+- else
+- {
+- AnnotPolygon *polyann = static_cast<AnnotPolygon*>(d->pdfAnnot);
+- polyann->setStartEndStyle((AnnotLineEndingStyle)style, polyann->getEndStyle());
+- }
+-}
+-
+-LineAnnotation::TermStyle LineAnnotation::lineEndStyle() const
+-{
+- Q_D( const LineAnnotation );
+-
+- if (!d->pdfAnnot)
+- return d->lineEndStyle;
+-
+- if (d->pdfAnnot->getType() == Annot::typeLine)
+- {
+- const AnnotLine * lineann = static_cast<const AnnotLine*>(d->pdfAnnot);
+- return (LineAnnotation::TermStyle)lineann->getEndStyle();
+- }
+- else
+- {
+- const AnnotPolygon * polyann = static_cast<const AnnotPolygon*>(d->pdfAnnot);
+- return (LineAnnotation::TermStyle)polyann->getEndStyle();
+- }
+-}
+-
+-void LineAnnotation::setLineEndStyle( LineAnnotation::TermStyle style )
+-{
+- Q_D( LineAnnotation );
+-
+- if (!d->pdfAnnot)
+- {
+- d->lineEndStyle = style;
+- return;
+- }
+-
+- if (d->pdfAnnot->getType() == Annot::typeLine)
+- {
+- AnnotLine *lineann = static_cast<AnnotLine*>(d->pdfAnnot);
+- lineann->setStartEndStyle(lineann->getStartStyle(), (AnnotLineEndingStyle)style);
+- }
+- else
+- {
+- AnnotPolygon *polyann = static_cast<AnnotPolygon*>(d->pdfAnnot);
+- polyann->setStartEndStyle(polyann->getStartStyle(), (AnnotLineEndingStyle)style);
+- }
+-}
+-
+-bool LineAnnotation::isLineClosed() const
+-{
+- Q_D( const LineAnnotation );
+-
+- if (!d->pdfAnnot)
+- return d->lineClosed;
+-
+- return d->pdfAnnot->getType() == Annot::typePolygon;
+-}
+-
+-void LineAnnotation::setLineClosed( bool closed )
+-{
+- Q_D( LineAnnotation );
+-
+- if (!d->pdfAnnot)
+- {
+- d->lineClosed = closed;
+- return;
+- }
+-
+- if (d->pdfAnnot->getType() != Annot::typeLine)
+- {
+- AnnotPolygon *polyann = static_cast<AnnotPolygon*>(d->pdfAnnot);
+-
+- // Set new subtype and switch intent if necessary
+- if (closed)
+- {
+- polyann->setType(Annot::typePolygon);
+- if (polyann->getIntent() == AnnotPolygon::polylineDimension)
+- polyann->setIntent( AnnotPolygon::polygonDimension );
+- }
+- else
+- {
+- polyann->setType(Annot::typePolyLine);
+- if (polyann->getIntent() == AnnotPolygon::polygonDimension)
+- polyann->setIntent( AnnotPolygon::polylineDimension );
+- }
+- }
+-}
+-
+-QColor LineAnnotation::lineInnerColor() const
+-{
+- Q_D( const LineAnnotation );
+-
+- if (!d->pdfAnnot)
+- return d->lineInnerColor;
+-
+- AnnotColor * c;
+-
+- if (d->pdfAnnot->getType() == Annot::typeLine)
+- {
+- const AnnotLine * lineann = static_cast<const AnnotLine*>(d->pdfAnnot);
+- c = lineann->getInteriorColor();
+- }
+- else
+- {
+- const AnnotPolygon * polyann = static_cast<const AnnotPolygon*>(d->pdfAnnot);
+- c = polyann->getInteriorColor();
+- }
+-
+- return convertAnnotColor(c);
+-}
+-
+-void LineAnnotation::setLineInnerColor( const QColor &color )
+-{
+- Q_D( LineAnnotation );
+-
+- if (!d->pdfAnnot)
+- {
+- d->lineInnerColor = color;
+- return;
+- }
+-
+- AnnotColor * c = convertQColor(color);
+-
+- if (d->pdfAnnot->getType() == Annot::typeLine)
+- {
+- AnnotLine *lineann = static_cast<AnnotLine*>(d->pdfAnnot);
+- lineann->setInteriorColor(c);
+- }
+- else
+- {
+- AnnotPolygon *polyann = static_cast<AnnotPolygon*>(d->pdfAnnot);
+- polyann->setInteriorColor(c);
+- }
+-}
+-
+-double LineAnnotation::lineLeadingForwardPoint() const
+-{
+- Q_D( const LineAnnotation );
+-
+- if (!d->pdfAnnot)
+- return d->lineLeadingFwdPt;
+-
+- if (d->pdfAnnot->getType() == Annot::typeLine)
+- {
+- const AnnotLine * lineann = static_cast<const AnnotLine*>(d->pdfAnnot);
+- return lineann->getLeaderLineLength();
+- }
+-
+- return 0;
+-}
+-
+-void LineAnnotation::setLineLeadingForwardPoint( double point )
+-{
+- Q_D( LineAnnotation );
+-
+- if (!d->pdfAnnot)
+- {
+- d->lineLeadingFwdPt = point;
+- return;
+- }
+-
+- if (d->pdfAnnot->getType() == Annot::typeLine)
+- {
+- AnnotLine *lineann = static_cast<AnnotLine*>(d->pdfAnnot);
+- lineann->setLeaderLineLength(point);
+- }
+-}
+-
+-double LineAnnotation::lineLeadingBackPoint() const
+-{
+- Q_D( const LineAnnotation );
+-
+- if (!d->pdfAnnot)
+- return d->lineLeadingBackPt;
+-
+- if (d->pdfAnnot->getType() == Annot::typeLine)
+- {
+- const AnnotLine * lineann = static_cast<const AnnotLine*>(d->pdfAnnot);
+- return lineann->getLeaderLineExtension();
+- }
+-
+- return 0;
+-}
+-
+-void LineAnnotation::setLineLeadingBackPoint( double point )
+-{
+- Q_D( LineAnnotation );
+-
+- if (!d->pdfAnnot)
+- {
+- d->lineLeadingBackPt = point;
+- return;
+- }
+-
+- if (d->pdfAnnot->getType() == Annot::typeLine)
+- {
+- AnnotLine *lineann = static_cast<AnnotLine*>(d->pdfAnnot);
+- lineann->setLeaderLineExtension(point);
+- }
+-}
+-
+-bool LineAnnotation::lineShowCaption() const
+-{
+- Q_D( const LineAnnotation );
+-
+- if (!d->pdfAnnot)
+- return d->lineShowCaption;
+-
+- if (d->pdfAnnot->getType() == Annot::typeLine)
+- {
+- const AnnotLine * lineann = static_cast<const AnnotLine*>(d->pdfAnnot);
+- return lineann->getCaption();
+- }
+-
+- return false;
+-}
+-
+-void LineAnnotation::setLineShowCaption( bool show )
+-{
+- Q_D( LineAnnotation );
+-
+- if (!d->pdfAnnot)
+- {
+- d->lineShowCaption = show;
+- return;
+- }
+-
+- if (d->pdfAnnot->getType() == Annot::typeLine)
+- {
+- AnnotLine *lineann = static_cast<AnnotLine*>(d->pdfAnnot);
+- lineann->setCaption(show);
+- }
+-}
+-
+-LineAnnotation::LineIntent LineAnnotation::lineIntent() const
+-{
+- Q_D( const LineAnnotation );
+-
+- if (!d->pdfAnnot)
+- return d->lineIntent;
+-
+- if (d->pdfAnnot->getType() == Annot::typeLine)
+- {
+- const AnnotLine * lineann = static_cast<const AnnotLine*>(d->pdfAnnot);
+- return (LineAnnotation::LineIntent)( lineann->getIntent() + 1 );
+- }
+- else
+- {
+- const AnnotPolygon * polyann = static_cast<const AnnotPolygon*>(d->pdfAnnot);
+- if ( polyann->getIntent() == AnnotPolygon::polygonCloud )
+- return LineAnnotation::PolygonCloud;
+- else // AnnotPolygon::polylineDimension, AnnotPolygon::polygonDimension
+- return LineAnnotation::Dimension;
+- }
+-}
+-
+-void LineAnnotation::setLineIntent( LineAnnotation::LineIntent intent )
+-{
+- Q_D( LineAnnotation );
+-
+- if (!d->pdfAnnot)
+- {
+- d->lineIntent = intent;
+- return;
+- }
+-
+- if ( intent == LineAnnotation::Unknown )
+- return; // Do not set (actually, it should clear the property)
+-
+- if (d->pdfAnnot->getType() == Annot::typeLine)
+- {
+- AnnotLine * lineann = static_cast<AnnotLine*>(d->pdfAnnot);
+- lineann->setIntent((AnnotLine::AnnotLineIntent)( intent - 1 ));
+- }
+- else
+- {
+- AnnotPolygon * polyann = static_cast<AnnotPolygon*>(d->pdfAnnot);
+- if ( intent == LineAnnotation::PolygonCloud)
+- polyann->setIntent( AnnotPolygon::polygonCloud );
+- else // LineAnnotation::Dimension
+- {
+- if ( d->pdfAnnot->getType() == Annot::typePolygon )
+- polyann->setIntent( AnnotPolygon::polygonDimension );
+- else // Annot::typePolyLine
+- polyann->setIntent( AnnotPolygon::polylineDimension );
+- }
+- }
+-}
+-
+-
+-/** GeomAnnotation [Annotation] */
+-class GeomAnnotationPrivate : public AnnotationPrivate
+-{
+- public:
+- GeomAnnotationPrivate();
+- Annotation * makeAlias();
+- Annot* createNativeAnnot(::Page *destPage, DocumentData *doc);
+-
+- // data fields (note uses border for rendering style)
+- GeomAnnotation::GeomType geomType;
+- QColor geomInnerColor;
+-};
+-
+-GeomAnnotationPrivate::GeomAnnotationPrivate()
+- : AnnotationPrivate(), geomType( GeomAnnotation::InscribedSquare )
+-{
+-}
+-
+-Annotation * GeomAnnotationPrivate::makeAlias()
+-{
+- return new GeomAnnotation(*this);
+-}
+-
+-Annot* GeomAnnotationPrivate::createNativeAnnot(::Page *destPage, DocumentData *doc)
+-{
+- // Setters are defined in the public class
+- GeomAnnotation *q = static_cast<GeomAnnotation*>( makeAlias() );
+-
+- // Set page and document
+- pdfPage = destPage;
+- parentDoc = doc;
+-
+- Annot::AnnotSubtype type;
+- if (geomType == GeomAnnotation::InscribedSquare)
+- type = Annot::typeSquare;
+- else // GeomAnnotation::InscribedCircle
+- type = Annot::typeCircle;
+-
+- // Set pdfAnnot
+- PDFRectangle rect = boundaryToPdfRectangle(boundary, flags);
+- pdfAnnot = new AnnotGeometry(destPage->getDoc(), &rect, type);
+-
+- // Set properties
+- flushBaseAnnotationProperties();
+- q->setGeomInnerColor(geomInnerColor);
+-
+- delete q;
+- return pdfAnnot;
+-}
+-
+-GeomAnnotation::GeomAnnotation()
+- : Annotation( *new GeomAnnotationPrivate() )
+-{}
+-
+-GeomAnnotation::GeomAnnotation(GeomAnnotationPrivate &dd)
+- : Annotation( dd )
+-{}
+-
+-GeomAnnotation::GeomAnnotation( const QDomNode & node )
+- : Annotation( *new GeomAnnotationPrivate(), node )
+-{
+- // loop through the whole children looking for a 'geom' element
+- QDomNode subNode = node.firstChild();
+- while( subNode.isElement() )
+- {
+- QDomElement e = subNode.toElement();
+- subNode = subNode.nextSibling();
+- if ( e.tagName() != "geom" )
+- continue;
+-
+- // parse the attributes
+- if ( e.hasAttribute( "type" ) )
+- setGeomType((GeomAnnotation::GeomType)e.attribute( "type" ).toInt());
+- if ( e.hasAttribute( "color" ) )
+- setGeomInnerColor(QColor( e.attribute( "color" ) ));
+-
+- // loading complete
+- break;
+- }
+-}
+-
+-GeomAnnotation::~GeomAnnotation()
+-{
+-}
+-
+-void GeomAnnotation::store( QDomNode & node, QDomDocument & document ) const
+-{
+- // store base annotation properties
+- storeBaseAnnotationProperties( node, document );
+-
+- // create [geom] element
+- QDomElement geomElement = document.createElement( "geom" );
+- node.appendChild( geomElement );
+-
+- // append the optional attributes
+- if ( geomType() != InscribedSquare )
+- geomElement.setAttribute( "type", (int)geomType() );
+- if ( geomInnerColor().isValid() )
+- geomElement.setAttribute( "color", geomInnerColor().name() );
+-}
+-
+-Annotation::SubType GeomAnnotation::subType() const
+-{
+- return AGeom;
+-}
+-
+-GeomAnnotation::GeomType GeomAnnotation::geomType() const
+-{
+- Q_D( const GeomAnnotation );
+-
+- if (!d->pdfAnnot)
+- return d->geomType;
+-
+- if (d->pdfAnnot->getType() == Annot::typeSquare)
+- return GeomAnnotation::InscribedSquare;
+- else // Annot::typeCircle
+- return GeomAnnotation::InscribedCircle;
+-}
+-
+-void GeomAnnotation::setGeomType( GeomAnnotation::GeomType type )
+-{
+- Q_D( GeomAnnotation );
+-
+- if (!d->pdfAnnot)
+- {
+- d->geomType = type;
+- return;
+- }
+-
+- AnnotGeometry * geomann = static_cast<AnnotGeometry*>(d->pdfAnnot);
+- if (type == GeomAnnotation::InscribedSquare)
+- geomann->setType(Annot::typeSquare);
+- else // GeomAnnotation::InscribedCircle
+- geomann->setType(Annot::typeCircle);
+-}
+-
+-QColor GeomAnnotation::geomInnerColor() const
+-{
+- Q_D( const GeomAnnotation );
+-
+- if (!d->pdfAnnot)
+- return d->geomInnerColor;
+-
+- const AnnotGeometry * geomann = static_cast<const AnnotGeometry*>(d->pdfAnnot);
+- return convertAnnotColor( geomann->getInteriorColor() );
+-}
+-
+-void GeomAnnotation::setGeomInnerColor( const QColor &color )
+-{
+- Q_D( GeomAnnotation );
+-
+- if (!d->pdfAnnot)
+- {
+- d->geomInnerColor = color;
+- return;
+- }
+-
+- AnnotGeometry * geomann = static_cast<AnnotGeometry*>(d->pdfAnnot);
+- geomann->setInteriorColor(convertQColor( color ));
+-}
+-
+-
+-/** HighlightAnnotation [Annotation] */
+-class HighlightAnnotationPrivate : public AnnotationPrivate
+-{
+- public:
+- HighlightAnnotationPrivate();
+- Annotation * makeAlias();
+- Annot* createNativeAnnot(::Page *destPage, DocumentData *doc);
+-
+- // data fields
+- HighlightAnnotation::HighlightType highlightType;
+- QList< HighlightAnnotation::Quad > highlightQuads; // not empty
+-
+- // helpers
+- static Annot::AnnotSubtype toAnnotSubType( HighlightAnnotation::HighlightType type );
+- QList< HighlightAnnotation::Quad > fromQuadrilaterals(AnnotQuadrilaterals *quads) const;
+- AnnotQuadrilaterals * toQuadrilaterals(const QList< HighlightAnnotation::Quad > &quads) const;
+-};
+-
+-HighlightAnnotationPrivate::HighlightAnnotationPrivate()
+- : AnnotationPrivate(), highlightType( HighlightAnnotation::Highlight )
+-{
+-}
+-
+-Annotation * HighlightAnnotationPrivate::makeAlias()
+-{
+- return new HighlightAnnotation(*this);
+-}
+-
+-Annot::AnnotSubtype HighlightAnnotationPrivate::toAnnotSubType( HighlightAnnotation::HighlightType type )
+-{
+- switch (type)
+- {
+- default: // HighlightAnnotation::Highlight:
+- return Annot::typeHighlight;
+- case HighlightAnnotation::Underline:
+- return Annot::typeUnderline;
+- case HighlightAnnotation::Squiggly:
+- return Annot::typeSquiggly;
+- case HighlightAnnotation::StrikeOut:
+- return Annot::typeStrikeOut;
+- }
+-}
+-
+-QList< HighlightAnnotation::Quad > HighlightAnnotationPrivate::fromQuadrilaterals(AnnotQuadrilaterals *hlquads) const
+-{
+- QList< HighlightAnnotation::Quad > quads;
+-
+- if ( !hlquads || !hlquads->getQuadrilateralsLength() )
+- return quads;
+- const int quadsCount = hlquads->getQuadrilateralsLength();
+-
+- double MTX[6];
+- fillTransformationMTX(MTX);
+-
+- quads.reserve(quadsCount);
+- for (int q = 0; q < quadsCount; ++q)
+- {
+- HighlightAnnotation::Quad quad;
+- XPDFReader::transform( MTX, hlquads->getX1( q ), hlquads->getY1( q ), quad.points[ 0 ] );
+- XPDFReader::transform( MTX, hlquads->getX2( q ), hlquads->getY2( q ), quad.points[ 1 ] );
+- XPDFReader::transform( MTX, hlquads->getX3( q ), hlquads->getY3( q ), quad.points[ 2 ] );
+- XPDFReader::transform( MTX, hlquads->getX4( q ), hlquads->getY4( q ), quad.points[ 3 ] );
+- // ### PDF1.6 specs says that point are in ccw order, but in fact
+- // points 3 and 4 are swapped in every PDF around!
+- QPointF tmpPoint = quad.points[ 2 ];
+- quad.points[ 2 ] = quad.points[ 3 ];
+- quad.points[ 3 ] = tmpPoint;
+- // initialize other properties and append quad
+- quad.capStart = true; // unlinked quads are always capped
+- quad.capEnd = true; // unlinked quads are always capped
+- quad.feather = 0.1; // default feather
+- quads.append( quad );
+- }
+-
+- return quads;
+-}
+-
+-AnnotQuadrilaterals * HighlightAnnotationPrivate::toQuadrilaterals(const QList< HighlightAnnotation::Quad > &quads) const
+-{
+- const int count = quads.size();
+- AnnotQuadrilaterals::AnnotQuadrilateral **ac =
+- (AnnotQuadrilaterals::AnnotQuadrilateral**)
+- gmallocn( count, sizeof(AnnotQuadrilaterals::AnnotQuadrilateral*) );
+-
+- double MTX[6];
+- fillTransformationMTX(MTX);
+-
+- int pos = 0;
+- foreach (const HighlightAnnotation::Quad &q, quads)
+- {
+- double x1, y1, x2, y2, x3, y3, x4, y4;
+- XPDFReader::invTransform( MTX, q.points[0], x1, y1 );
+- XPDFReader::invTransform( MTX, q.points[1], x2, y2 );
+- // Swap points 3 and 4 (see HighlightAnnotationPrivate::fromQuadrilaterals)
+- XPDFReader::invTransform( MTX, q.points[3], x3, y3 );
+- XPDFReader::invTransform( MTX, q.points[2], x4, y4 );
+- ac[pos++] = new AnnotQuadrilaterals::AnnotQuadrilateral(x1, y1, x2, y2, x3, y3, x4, y4);
+- }
+-
+- return new AnnotQuadrilaterals(ac, count);
+-}
+-
+-Annot* HighlightAnnotationPrivate::createNativeAnnot(::Page *destPage, DocumentData *doc)
+-{
+- // Setters are defined in the public class
+- HighlightAnnotation *q = static_cast<HighlightAnnotation*>( makeAlias() );
+-
+- // Set page and document
+- pdfPage = destPage;
+- parentDoc = doc;
+-
+- // Set pdfAnnot
+- PDFRectangle rect = boundaryToPdfRectangle(boundary, flags);
+- pdfAnnot = new AnnotTextMarkup(destPage->getDoc(), &rect, toAnnotSubType(highlightType));
+-
+- // Set properties
+- flushBaseAnnotationProperties();
+- q->setHighlightQuads(highlightQuads);
+-
+- highlightQuads.clear(); // Free up memory
+-
+- delete q;
+-
+- return pdfAnnot;
+-}
+-
+-HighlightAnnotation::HighlightAnnotation()
+- : Annotation( *new HighlightAnnotationPrivate() )
+-{}
+-
+-HighlightAnnotation::HighlightAnnotation(HighlightAnnotationPrivate &dd)
+- : Annotation( dd )
+-{}
+-
+-HighlightAnnotation::HighlightAnnotation( const QDomNode & node )
+- : Annotation( *new HighlightAnnotationPrivate(), node )
+-{
+- // loop through the whole children looking for a 'hl' element
+- QDomNode subNode = node.firstChild();
+- while( subNode.isElement() )
+- {
+- QDomElement e = subNode.toElement();
+- subNode = subNode.nextSibling();
+- if ( e.tagName() != "hl" )
+- continue;
+-
+- // parse the attributes
+- if ( e.hasAttribute( "type" ) )
+- setHighlightType((HighlightAnnotation::HighlightType)e.attribute( "type" ).toInt());
+-
+- // parse all 'quad' subnodes
+- QList<HighlightAnnotation::Quad> quads;
+- QDomNode quadNode = e.firstChild();
+- for ( ; quadNode.isElement(); quadNode = quadNode.nextSibling() )
+- {
+- QDomElement qe = quadNode.toElement();
+- if ( qe.tagName() != "quad" )
+- continue;
+-
+- Quad q;
+- q.points[0].setX(qe.attribute( "ax", "0.0" ).toDouble());
+- q.points[0].setY(qe.attribute( "ay", "0.0" ).toDouble());
+- q.points[1].setX(qe.attribute( "bx", "0.0" ).toDouble());
+- q.points[1].setY(qe.attribute( "by", "0.0" ).toDouble());
+- q.points[2].setX(qe.attribute( "cx", "0.0" ).toDouble());
+- q.points[2].setY(qe.attribute( "cy", "0.0" ).toDouble());
+- q.points[3].setX(qe.attribute( "dx", "0.0" ).toDouble());
+- q.points[3].setY(qe.attribute( "dy", "0.0" ).toDouble());
+- q.capStart = qe.hasAttribute( "start" );
+- q.capEnd = qe.hasAttribute( "end" );
+- q.feather = qe.attribute( "feather", "0.1" ).toDouble();
+- quads.append( q );
+- }
+- setHighlightQuads(quads);
+-
+- // loading complete
+- break;
+- }
+-}
+-
+-HighlightAnnotation::~HighlightAnnotation()
+-{
+-}
+-
+-void HighlightAnnotation::store( QDomNode & node, QDomDocument & document ) const
+-{
+- // store base annotation properties
+- storeBaseAnnotationProperties( node, document );
+-
+- // create [hl] element
+- QDomElement hlElement = document.createElement( "hl" );
+- node.appendChild( hlElement );
+-
+- // append the optional attributes
+- if ( highlightType() != Highlight )
+- hlElement.setAttribute( "type", (int)highlightType() );
+-
+- const QList<HighlightAnnotation::Quad> quads = highlightQuads();
+- if ( quads.count() < 1 )
+- return;
+- // append highlight quads, all children describe quads
+- QList< HighlightAnnotation::Quad >::const_iterator it = quads.begin(), end = quads.end();
+- for ( ; it != end; ++it )
+- {
+- QDomElement quadElement = document.createElement( "quad" );
+- hlElement.appendChild( quadElement );
+- const Quad & q = *it;
+- quadElement.setAttribute( "ax", QString::number( q.points[0].x() ) );
+- quadElement.setAttribute( "ay", QString::number( q.points[0].y() ) );
+- quadElement.setAttribute( "bx", QString::number( q.points[1].x() ) );
+- quadElement.setAttribute( "by", QString::number( q.points[1].y() ) );
+- quadElement.setAttribute( "cx", QString::number( q.points[2].x() ) );
+- quadElement.setAttribute( "cy", QString::number( q.points[2].y() ) );
+- quadElement.setAttribute( "dx", QString::number( q.points[3].x() ) );
+- quadElement.setAttribute( "dy", QString::number( q.points[3].y() ) );
+- if ( q.capStart )
+- quadElement.setAttribute( "start", 1 );
+- if ( q.capEnd )
+- quadElement.setAttribute( "end", 1 );
+- quadElement.setAttribute( "feather", QString::number( q.feather ) );
+- }
+-}
+-
+-Annotation::SubType HighlightAnnotation::subType() const
+-{
+- return AHighlight;
+-}
+-
+-HighlightAnnotation::HighlightType HighlightAnnotation::highlightType() const
+-{
+- Q_D( const HighlightAnnotation );
+-
+- if (!d->pdfAnnot)
+- return d->highlightType;
+-
+- Annot::AnnotSubtype subType = d->pdfAnnot->getType();
+-
+- if ( subType == Annot::typeHighlight )
+- return HighlightAnnotation::Highlight;
+- else if ( subType == Annot::typeUnderline )
+- return HighlightAnnotation::Underline;
+- else if ( subType == Annot::typeSquiggly )
+- return HighlightAnnotation::Squiggly;
+- else // Annot::typeStrikeOut
+- return HighlightAnnotation::StrikeOut;
+-}
+-
+-void HighlightAnnotation::setHighlightType( HighlightAnnotation::HighlightType type )
+-{
+- Q_D( HighlightAnnotation );
+-
+- if (!d->pdfAnnot)
+- {
+- d->highlightType = type;
+- return;
+- }
+-
+- AnnotTextMarkup * hlann = static_cast<AnnotTextMarkup*>(d->pdfAnnot);
+- hlann->setType(HighlightAnnotationPrivate::toAnnotSubType( type ));
+-}
+-
+-QList< HighlightAnnotation::Quad > HighlightAnnotation::highlightQuads() const
+-{
+- Q_D( const HighlightAnnotation );
+-
+- if (!d->pdfAnnot)
+- return d->highlightQuads;
+-
+- const AnnotTextMarkup * hlann = static_cast<AnnotTextMarkup*>(d->pdfAnnot);
+- return d->fromQuadrilaterals( hlann->getQuadrilaterals() );
+-}
+-
+-void HighlightAnnotation::setHighlightQuads( const QList< HighlightAnnotation::Quad > &quads )
+-{
+- Q_D( HighlightAnnotation );
+-
+- if (!d->pdfAnnot)
+- {
+- d->highlightQuads = quads;
+- return;
+- }
+-
+- AnnotTextMarkup * hlann = static_cast<AnnotTextMarkup*>(d->pdfAnnot);
+- AnnotQuadrilaterals * quadrilaterals = d->toQuadrilaterals(quads);
+- hlann->setQuadrilaterals(quadrilaterals);
+- delete quadrilaterals;
+-}
+-
+-
+-/** StampAnnotation [Annotation] */
+-class StampAnnotationPrivate : public AnnotationPrivate
+-{
+- public:
+- StampAnnotationPrivate();
+- Annotation * makeAlias();
+- Annot* createNativeAnnot(::Page *destPage, DocumentData *doc);
+-
+- // data fields
+- QString stampIconName;
+-};
+-
+-StampAnnotationPrivate::StampAnnotationPrivate()
+- : AnnotationPrivate(), stampIconName( "Draft" )
+-{
+-}
+-
+-Annotation * StampAnnotationPrivate::makeAlias()
+-{
+- return new StampAnnotation(*this);
+-}
+-
+-Annot* StampAnnotationPrivate::createNativeAnnot(::Page *destPage, DocumentData *doc)
+-{
+- StampAnnotation *q = static_cast<StampAnnotation*>( makeAlias() );
+-
+- // Set page and document
+- pdfPage = destPage;
+- parentDoc = doc;
+-
+- // Set pdfAnnot
+- PDFRectangle rect = boundaryToPdfRectangle(boundary, flags);
+- pdfAnnot = new AnnotStamp(destPage->getDoc(), &rect);
+-
+- // Set properties
+- flushBaseAnnotationProperties();
+- q->setStampIconName(stampIconName);
+-
+- delete q;
+-
+- stampIconName.clear(); // Free up memory
+-
+- return pdfAnnot;
+-}
+-
+-StampAnnotation::StampAnnotation()
+- : Annotation( *new StampAnnotationPrivate() )
+-{}
+-
+-StampAnnotation::StampAnnotation(StampAnnotationPrivate &dd)
+- : Annotation( dd )
+-{}
+-
+-StampAnnotation::StampAnnotation( const QDomNode & node )
+- : Annotation( *new StampAnnotationPrivate(), node )
+-{
+- // loop through the whole children looking for a 'stamp' element
+- QDomNode subNode = node.firstChild();
+- while( subNode.isElement() )
+- {
+- QDomElement e = subNode.toElement();
+- subNode = subNode.nextSibling();
+- if ( e.tagName() != "stamp" )
+- continue;
+-
+- // parse the attributes
+- if ( e.hasAttribute( "icon" ) )
+- setStampIconName(e.attribute( "icon" ));
+-
+- // loading complete
+- break;
+- }
+-}
+-
+-StampAnnotation::~StampAnnotation()
+-{
+-}
+-
+-void StampAnnotation::store( QDomNode & node, QDomDocument & document ) const
+-{
+- // store base annotation properties
+- storeBaseAnnotationProperties( node, document );
+-
+- // create [stamp] element
+- QDomElement stampElement = document.createElement( "stamp" );
+- node.appendChild( stampElement );
+-
+- // append the optional attributes
+- if ( stampIconName() != "Draft" )
+- stampElement.setAttribute( "icon", stampIconName() );
+-}
+-
+-Annotation::SubType StampAnnotation::subType() const
+-{
+- return AStamp;
+-}
+-
+-QString StampAnnotation::stampIconName() const
+-{
+- Q_D( const StampAnnotation );
+-
+- if (!d->pdfAnnot)
+- return d->stampIconName;
+-
+- const AnnotStamp * stampann = static_cast<const AnnotStamp*>(d->pdfAnnot);
+- return QString::fromLatin1( stampann->getIcon()->getCString() );
+-}
+-
+-void StampAnnotation::setStampIconName( const QString &name )
+-{
+- Q_D( StampAnnotation );
+-
+- if (!d->pdfAnnot)
+- {
+- d->stampIconName = name;
+- return;
+- }
+-
+- AnnotStamp * stampann = static_cast<AnnotStamp*>(d->pdfAnnot);
+- QByteArray encoded = name.toLatin1();
+- GooString s(encoded.constData());
+- stampann->setIcon(&s);
+-}
+-
+-/** InkAnnotation [Annotation] */
+-class InkAnnotationPrivate : public AnnotationPrivate
+-{
+- public:
+- InkAnnotationPrivate();
+- Annotation * makeAlias();
+- Annot* createNativeAnnot(::Page *destPage, DocumentData *doc);
+-
+- // data fields
+- QList< QLinkedList<QPointF> > inkPaths;
+-
+- // helper
+- AnnotPath **toAnnotPaths(const QList< QLinkedList<QPointF> > &inkPaths);
+-};
+-
+-InkAnnotationPrivate::InkAnnotationPrivate()
+- : AnnotationPrivate()
+-{
+-}
+-
+-Annotation * InkAnnotationPrivate::makeAlias()
+-{
+- return new InkAnnotation(*this);
+-}
+-
+-// Note: Caller is required to delete array elements and the array itself after use
+-AnnotPath **InkAnnotationPrivate::toAnnotPaths(const QList< QLinkedList<QPointF> > &inkPaths)
+-{
+- const int pathsNumber = inkPaths.size();
+- AnnotPath **res = new AnnotPath*[pathsNumber];
+- for (int i = 0; i < pathsNumber; ++i)
+- res[i] = toAnnotPath( inkPaths[i] );
+- return res;
+-}
+-
+-Annot* InkAnnotationPrivate::createNativeAnnot(::Page *destPage, DocumentData *doc)
+-{
+- // Setters are defined in the public class
+- InkAnnotation *q = static_cast<InkAnnotation*>( makeAlias() );
+-
+- // Set page and document
+- pdfPage = destPage;
+- parentDoc = doc;
+-
+- // Set pdfAnnot
+- PDFRectangle rect = boundaryToPdfRectangle(boundary, flags);
+- pdfAnnot = new AnnotInk(destPage->getDoc(), &rect);
+-
+- // Set properties
+- flushBaseAnnotationProperties();
+- q->setInkPaths(inkPaths);
+-
+- inkPaths.clear(); // Free up memory
+-
+- delete q;
+-
+- return pdfAnnot;
+-}
+-
+-InkAnnotation::InkAnnotation()
+- : Annotation( *new InkAnnotationPrivate() )
+-{}
+-
+-InkAnnotation::InkAnnotation(InkAnnotationPrivate &dd)
+- : Annotation( dd )
+-{}
+-
+-InkAnnotation::InkAnnotation( const QDomNode & node )
+- : Annotation( *new InkAnnotationPrivate(), node )
+-{
+- // loop through the whole children looking for a 'ink' element
+- QDomNode subNode = node.firstChild();
+- while( subNode.isElement() )
+- {
+- QDomElement e = subNode.toElement();
+- subNode = subNode.nextSibling();
+- if ( e.tagName() != "ink" )
+- continue;
+-
+- // parse the 'path' subnodes
+- QList< QLinkedList<QPointF> > paths;
+- QDomNode pathNode = e.firstChild();
+- while ( pathNode.isElement() )
+- {
+- QDomElement pathElement = pathNode.toElement();
+- pathNode = pathNode.nextSibling();
+-
+- if ( pathElement.tagName() != "path" )
+- continue;
+-
+- // build each path parsing 'point' subnodes
+- QLinkedList<QPointF> path;
+- QDomNode pointNode = pathElement.firstChild();
+- while ( pointNode.isElement() )
+- {
+- QDomElement pointElement = pointNode.toElement();
+- pointNode = pointNode.nextSibling();
+-
+- if ( pointElement.tagName() != "point" )
+- continue;
+-
+- QPointF p(pointElement.attribute( "x", "0.0" ).toDouble(), pointElement.attribute( "y", "0.0" ).toDouble());
+- path.append( p );
+- }
+-
+- // add the path to the path list if it contains at least 2 nodes
+- if ( path.count() >= 2 )
+- paths.append( path );
+- }
+- setInkPaths(paths);
+-
+- // loading complete
+- break;
+- }
+-}
+-
+-InkAnnotation::~InkAnnotation()
+-{
+-}
+-
+-void InkAnnotation::store( QDomNode & node, QDomDocument & document ) const
+-{
+- // store base annotation properties
+- storeBaseAnnotationProperties( node, document );
+-
+- // create [ink] element
+- QDomElement inkElement = document.createElement( "ink" );
+- node.appendChild( inkElement );
+-
+- // append the optional attributes
+- const QList< QLinkedList<QPointF> > paths = inkPaths();
+- if ( paths.count() < 1 )
+- return;
+- QList< QLinkedList<QPointF> >::const_iterator pIt = paths.begin(), pEnd = paths.end();
+- for ( ; pIt != pEnd; ++pIt )
+- {
+- QDomElement pathElement = document.createElement( "path" );
+- inkElement.appendChild( pathElement );
+- const QLinkedList<QPointF> & path = *pIt;
+- QLinkedList<QPointF>::const_iterator iIt = path.begin(), iEnd = path.end();
+- for ( ; iIt != iEnd; ++iIt )
+- {
+- const QPointF & point = *iIt;
+- QDomElement pointElement = document.createElement( "point" );
+- pathElement.appendChild( pointElement );
+- pointElement.setAttribute( "x", QString::number( point.x() ) );
+- pointElement.setAttribute( "y", QString::number( point.y() ) );
+- }
+- }
+-}
+-
+-Annotation::SubType InkAnnotation::subType() const
+-{
+- return AInk;
+-}
+-
+-QList< QLinkedList<QPointF> > InkAnnotation::inkPaths() const
+-{
+- Q_D( const InkAnnotation );
+-
+- if (!d->pdfAnnot)
+- return d->inkPaths;
+-
+- const AnnotInk * inkann = static_cast<const AnnotInk *>(d->pdfAnnot);
+-
+- const AnnotPath * const* paths = inkann->getInkList();
+- if ( !paths || !inkann->getInkListLength() )
+- return QList< QLinkedList<QPointF> >();
+-
+- double MTX[6];
+- d->fillTransformationMTX(MTX);
+-
+- const int pathsNumber = inkann->getInkListLength();
+- QList< QLinkedList<QPointF> > inkPaths;
+- inkPaths.reserve(pathsNumber);
+- for (int m = 0; m < pathsNumber; ++m)
+- {
+- // transform each path in a list of normalized points ..
+- QLinkedList<QPointF> localList;
+- const AnnotPath * path = paths[ m ];
+- const int pointsNumber = path ? path->getCoordsLength() : 0;
+- for (int n = 0; n < pointsNumber; ++n)
+- {
+- QPointF point;
+- XPDFReader::transform(MTX, path->getX(n), path->getY(n), point);
+- localList.append(point);
+- }
+- // ..and add it to the annotation
+- inkPaths.append( localList );
+- }
+- return inkPaths;
+-}
+-
+-void InkAnnotation::setInkPaths( const QList< QLinkedList<QPointF> > &paths )
+-{
+- Q_D( InkAnnotation );
+-
+- if (!d->pdfAnnot)
+- {
+- d->inkPaths = paths;
+- return;
+- }
+-
+- AnnotInk * inkann = static_cast<AnnotInk*>(d->pdfAnnot);
+- AnnotPath **annotpaths = d->toAnnotPaths(paths);
+- const int pathsNumber = paths.size();
+- inkann->setInkList(annotpaths, pathsNumber);
+-
+- for (int i = 0; i < pathsNumber; ++i)
+- delete annotpaths[i];
+- delete[] annotpaths;
+-}
+-
+-
+-/** LinkAnnotation [Annotation] */
+-class LinkAnnotationPrivate : public AnnotationPrivate
+-{
+- public:
+- LinkAnnotationPrivate();
+- ~LinkAnnotationPrivate();
+- Annotation * makeAlias();
+- Annot* createNativeAnnot(::Page *destPage, DocumentData *doc);
+-
+- // data fields
+- Link * linkDestination;
+- LinkAnnotation::HighlightMode linkHLMode;
+- QPointF linkRegion[4];
+-};
+-
+-LinkAnnotationPrivate::LinkAnnotationPrivate()
+- : AnnotationPrivate(), linkDestination( 0 ), linkHLMode( LinkAnnotation::Invert )
+-{
+-}
+-
+-LinkAnnotationPrivate::~LinkAnnotationPrivate()
+-{
+- delete linkDestination;
+-}
+-
+-Annotation * LinkAnnotationPrivate::makeAlias()
+-{
+- return new LinkAnnotation(*this);
+-}
+-
+-Annot* LinkAnnotationPrivate::createNativeAnnot(::Page *destPage, DocumentData *doc)
+-{
+- return 0; // Not implemented
+-}
+-
+-LinkAnnotation::LinkAnnotation()
+- : Annotation( *new LinkAnnotationPrivate() )
+-{}
+-
+-LinkAnnotation::LinkAnnotation(LinkAnnotationPrivate &dd)
+- : Annotation( dd )
+-{}
+-
+-LinkAnnotation::LinkAnnotation( const QDomNode & node )
+- : Annotation( *new LinkAnnotationPrivate(), node )
+-{
+- // loop through the whole children looking for a 'link' element
+- QDomNode subNode = node.firstChild();
+- while( subNode.isElement() )
+- {
+- QDomElement e = subNode.toElement();
+- subNode = subNode.nextSibling();
+- if ( e.tagName() != "link" )
+- continue;
+-
+- // parse the attributes
+- if ( e.hasAttribute( "hlmode" ) )
+- setLinkHighlightMode((LinkAnnotation::HighlightMode)e.attribute( "hlmode" ).toInt());
+-
+- // parse all 'quad' subnodes
+- QDomNode quadNode = e.firstChild();
+- for ( ; quadNode.isElement(); quadNode = quadNode.nextSibling() )
+- {
+- QDomElement qe = quadNode.toElement();
+- if ( qe.tagName() == "quad" )
+- {
+- setLinkRegionPoint(0, QPointF(qe.attribute( "ax", "0.0" ).toDouble(),
+- qe.attribute( "ay", "0.0" ).toDouble()));
+- setLinkRegionPoint(1, QPointF(qe.attribute( "bx", "0.0" ).toDouble(),
+- qe.attribute( "by", "0.0" ).toDouble()));
+- setLinkRegionPoint(2, QPointF(qe.attribute( "cx", "0.0" ).toDouble(),
+- qe.attribute( "cy", "0.0" ).toDouble()));
+- setLinkRegionPoint(3, QPointF(qe.attribute( "dx", "0.0" ).toDouble(),
+- qe.attribute( "dy", "0.0" ).toDouble()));
+- }
+- else if ( qe.tagName() == "link" )
+- {
+- QString type = qe.attribute( "type" );
+- if ( type == "GoTo" )
+- {
+- Poppler::LinkGoto * go = new Poppler::LinkGoto( QRect(), qe.attribute( "filename" ), LinkDestination( qe.attribute( "destination" ) ) );
+- setLinkDestination(go);
+- }
+- else if ( type == "Exec" )
+- {
+- Poppler::LinkExecute * exec = new Poppler::LinkExecute( QRect(), qe.attribute( "filename" ), qe.attribute( "parameters" ) );
+- setLinkDestination(exec);
+- }
+- else if ( type == "Browse" )
+- {
+- Poppler::LinkBrowse * browse = new Poppler::LinkBrowse( QRect(), qe.attribute( "url" ) );
+- setLinkDestination(browse);
+- }
+- else if ( type == "Action" )
+- {
+- Poppler::LinkAction::ActionType act;
+- QString actString = qe.attribute( "action" );
+- bool found = true;
+- if ( actString == "PageFirst" )
+- act = Poppler::LinkAction::PageFirst;
+- else if ( actString == "PagePrev" )
+- act = Poppler::LinkAction::PagePrev;
+- else if ( actString == "PageNext" )
+- act = Poppler::LinkAction::PageNext;
+- else if ( actString == "PageLast" )
+- act = Poppler::LinkAction::PageLast;
+- else if ( actString == "HistoryBack" )
+- act = Poppler::LinkAction::HistoryBack;
+- else if ( actString == "HistoryForward" )
+- act = Poppler::LinkAction::HistoryForward;
+- else if ( actString == "Quit" )
+- act = Poppler::LinkAction::Quit;
+- else if ( actString == "Presentation" )
+- act = Poppler::LinkAction::Presentation;
+- else if ( actString == "EndPresentation" )
+- act = Poppler::LinkAction::EndPresentation;
+- else if ( actString == "Find" )
+- act = Poppler::LinkAction::Find;
+- else if ( actString == "GoToPage" )
+- act = Poppler::LinkAction::GoToPage;
+- else if ( actString == "Close" )
+- act = Poppler::LinkAction::Close;
+- else if ( actString == "Print" )
+- act = Poppler::LinkAction::Print;
+- else
+- found = false;
+- if (found)
+- {
+- Poppler::LinkAction * action = new Poppler::LinkAction( QRect(), act );
+- setLinkDestination(action);
+- }
+- }
+-#if 0
+- else if ( type == "Movie" )
+- {
+- Poppler::LinkMovie * movie = new Poppler::LinkMovie( QRect() );
+- setLinkDestination(movie);
+- }
+-#endif
+- }
+- }
+-
+- // loading complete
+- break;
+- }
+-}
+-
+-LinkAnnotation::~LinkAnnotation()
+-{
+-}
+-
+-void LinkAnnotation::store( QDomNode & node, QDomDocument & document ) const
+-{
+- // store base annotation properties
+- storeBaseAnnotationProperties( node, document );
+-
+- // create [hl] element
+- QDomElement linkElement = document.createElement( "link" );
+- node.appendChild( linkElement );
+-
+- // append the optional attributes
+- if ( linkHighlightMode() != Invert )
+- linkElement.setAttribute( "hlmode", (int)linkHighlightMode() );
+-
+- // saving region
+- QDomElement quadElement = document.createElement( "quad" );
+- linkElement.appendChild( quadElement );
+- quadElement.setAttribute( "ax", QString::number( linkRegionPoint(0).x() ) );
+- quadElement.setAttribute( "ay", QString::number( linkRegionPoint(0).y() ) );
+- quadElement.setAttribute( "bx", QString::number( linkRegionPoint(1).x() ) );
+- quadElement.setAttribute( "by", QString::number( linkRegionPoint(1).y() ) );
+- quadElement.setAttribute( "cx", QString::number( linkRegionPoint(2).x() ) );
+- quadElement.setAttribute( "cy", QString::number( linkRegionPoint(2).y() ) );
+- quadElement.setAttribute( "dx", QString::number( linkRegionPoint(3).x() ) );
+- quadElement.setAttribute( "dy", QString::number( linkRegionPoint(3).y() ) );
+-
+- // saving link
+- QDomElement hyperlinkElement = document.createElement( "link" );
+- linkElement.appendChild( hyperlinkElement );
+- if ( linkDestination() )
+- {
+- switch( linkDestination()->linkType() )
+- {
+- case Poppler::Link::Goto:
+- {
+- Poppler::LinkGoto * go = static_cast< Poppler::LinkGoto * >( linkDestination() );
+- hyperlinkElement.setAttribute( "type", "GoTo" );
+- hyperlinkElement.setAttribute( "filename", go->fileName() );
+- hyperlinkElement.setAttribute( "destionation", go->destination().toString() ); // TODO Remove for poppler 0.28
+- hyperlinkElement.setAttribute( "destination", go->destination().toString() );
+- break;
+- }
+- case Poppler::Link::Execute:
+- {
+- Poppler::LinkExecute * exec = static_cast< Poppler::LinkExecute * >( linkDestination() );
+- hyperlinkElement.setAttribute( "type", "Exec" );
+- hyperlinkElement.setAttribute( "filename", exec->fileName() );
+- hyperlinkElement.setAttribute( "parameters", exec->parameters() );
+- break;
+- }
+- case Poppler::Link::Browse:
+- {
+- Poppler::LinkBrowse * browse = static_cast< Poppler::LinkBrowse * >( linkDestination() );
+- hyperlinkElement.setAttribute( "type", "Browse" );
+- hyperlinkElement.setAttribute( "url", browse->url() );
+- break;
+- }
+- case Poppler::Link::Action:
+- {
+- Poppler::LinkAction * action = static_cast< Poppler::LinkAction * >( linkDestination() );
+- hyperlinkElement.setAttribute( "type", "Action" );
+- switch ( action->actionType() )
+- {
+- case Poppler::LinkAction::PageFirst:
+- hyperlinkElement.setAttribute( "action", "PageFirst" );
+- break;
+- case Poppler::LinkAction::PagePrev:
+- hyperlinkElement.setAttribute( "action", "PagePrev" );
+- break;
+- case Poppler::LinkAction::PageNext:
+- hyperlinkElement.setAttribute( "action", "PageNext" );
+- break;
+- case Poppler::LinkAction::PageLast:
+- hyperlinkElement.setAttribute( "action", "PageLast" );
+- break;
+- case Poppler::LinkAction::HistoryBack:
+- hyperlinkElement.setAttribute( "action", "HistoryBack" );
+- break;
+- case Poppler::LinkAction::HistoryForward:
+- hyperlinkElement.setAttribute( "action", "HistoryForward" );
+- break;
+- case Poppler::LinkAction::Quit:
+- hyperlinkElement.setAttribute( "action", "Quit" );
+- break;
+- case Poppler::LinkAction::Presentation:
+- hyperlinkElement.setAttribute( "action", "Presentation" );
+- break;
+- case Poppler::LinkAction::EndPresentation:
+- hyperlinkElement.setAttribute( "action", "EndPresentation" );
+- break;
+- case Poppler::LinkAction::Find:
+- hyperlinkElement.setAttribute( "action", "Find" );
+- break;
+- case Poppler::LinkAction::GoToPage:
+- hyperlinkElement.setAttribute( "action", "GoToPage" );
+- break;
+- case Poppler::LinkAction::Close:
+- hyperlinkElement.setAttribute( "action", "Close" );
+- break;
+- case Poppler::LinkAction::Print:
+- hyperlinkElement.setAttribute( "action", "Print" );
+- break;
+- }
+- break;
+- }
+- case Poppler::Link::Movie:
+- {
+- hyperlinkElement.setAttribute( "type", "Movie" );
+- break;
+- }
+- case Poppler::Link::Rendition:
+- {
+- hyperlinkElement.setAttribute( "type", "Rendition" );
+- break;
+- }
+- case Poppler::Link::Sound:
+- {
+- // FIXME: implement me
+- break;
+- }
+- case Poppler::Link::None:
+- break;
+- }
+- }
+-}
+-
+-Annotation::SubType LinkAnnotation::subType() const
+-{
+- return ALink;
+-}
+-
+-Link* LinkAnnotation::linkDestination() const
+-{
+- Q_D( const LinkAnnotation );
+- return d->linkDestination;
+-}
+-
+-void LinkAnnotation::setLinkDestination( Link *link )
+-{
+- Q_D( LinkAnnotation );
+- delete d->linkDestination;
+- d->linkDestination = link;
+-}
+-
+-LinkAnnotation::HighlightMode LinkAnnotation::linkHighlightMode() const
+-{
+- Q_D( const LinkAnnotation );
+- return d->linkHLMode;
+-}
+-
+-void LinkAnnotation::setLinkHighlightMode( LinkAnnotation::HighlightMode mode )
+-{
+- Q_D( LinkAnnotation );
+- d->linkHLMode = mode;
+-}
+-
+-QPointF LinkAnnotation::linkRegionPoint( int id ) const
+-{
+- if ( id < 0 || id >= 4 )
+- return QPointF();
+-
+- Q_D( const LinkAnnotation );
+- return d->linkRegion[id];
+-}
+-
+-void LinkAnnotation::setLinkRegionPoint( int id, const QPointF &point )
+-{
+- if ( id < 0 || id >= 4 )
+- return;
+-
+- Q_D( LinkAnnotation );
+- d->linkRegion[id] = point;
+-}
+-
+-/** CaretAnnotation [Annotation] */
+-class CaretAnnotationPrivate : public AnnotationPrivate
+-{
+- public:
+- CaretAnnotationPrivate();
+- Annotation * makeAlias();
+- Annot* createNativeAnnot(::Page *destPage, DocumentData *doc);
+-
+- // data fields
+- CaretAnnotation::CaretSymbol symbol;
+-};
+-
+-static QString caretSymbolToString( CaretAnnotation::CaretSymbol symbol )
+-{
+- switch ( symbol )
+- {
+- case CaretAnnotation::None:
+- return QString::fromLatin1( "None" );
+- case CaretAnnotation::P:
+- return QString::fromLatin1( "P" );
+- }
+- return QString();
+-}
+-
+-static CaretAnnotation::CaretSymbol caretSymbolFromString( const QString &symbol )
+-{
+- if ( symbol == QLatin1String( "None" ) )
+- return CaretAnnotation::None;
+- else if ( symbol == QLatin1String( "P" ) )
+- return CaretAnnotation::P;
+- return CaretAnnotation::None;
+-}
+-
+-CaretAnnotationPrivate::CaretAnnotationPrivate()
+- : AnnotationPrivate(), symbol( CaretAnnotation::None )
+-{
+-}
+-
+-Annotation * CaretAnnotationPrivate::makeAlias()
+-{
+- return new CaretAnnotation(*this);
+-}
+-
+-Annot* CaretAnnotationPrivate::createNativeAnnot(::Page *destPage, DocumentData *doc)
+-{
+- // Setters are defined in the public class
+- CaretAnnotation *q = static_cast<CaretAnnotation*>( makeAlias() );
+-
+- // Set page and document
+- pdfPage = destPage;
+- parentDoc = doc;
+-
+- // Set pdfAnnot
+- PDFRectangle rect = boundaryToPdfRectangle(boundary, flags);
+- pdfAnnot = new AnnotCaret(destPage->getDoc(), &rect);
+-
+- // Set properties
+- flushBaseAnnotationProperties();
+- q->setCaretSymbol(symbol);
+-
+- delete q;
+- return pdfAnnot;
+-}
+-
+-CaretAnnotation::CaretAnnotation()
+- : Annotation( *new CaretAnnotationPrivate() )
+-{
+-}
+-
+-CaretAnnotation::CaretAnnotation(CaretAnnotationPrivate &dd)
+- : Annotation( dd )
+-{
+-}
+-
+-CaretAnnotation::CaretAnnotation( const QDomNode & node )
+- : Annotation( *new CaretAnnotationPrivate(), node )
+-{
+- // loop through the whole children looking for a 'caret' element
+- QDomNode subNode = node.firstChild();
+- while( subNode.isElement() )
+- {
+- QDomElement e = subNode.toElement();
+- subNode = subNode.nextSibling();
+- if ( e.tagName() != "caret" )
+- continue;
+-
+- // parse the attributes
+- if ( e.hasAttribute( "symbol" ) )
+- setCaretSymbol(caretSymbolFromString( e.attribute( "symbol" ) ));
+-
+- // loading complete
+- break;
+- }
+-}
+-
+-CaretAnnotation::~CaretAnnotation()
+-{
+-}
+-
+-void CaretAnnotation::store( QDomNode & node, QDomDocument & document ) const
+-{
+- // store base annotation properties
+- storeBaseAnnotationProperties( node, document );
+-
+- // create [caret] element
+- QDomElement caretElement = document.createElement( "caret" );
+- node.appendChild( caretElement );
+-
+- // append the optional attributes
+- if ( caretSymbol() != CaretAnnotation::None )
+- caretElement.setAttribute( "symbol", caretSymbolToString( caretSymbol() ) );
+-}
+-
+-Annotation::SubType CaretAnnotation::subType() const
+-{
+- return ACaret;
+-}
+-
+-CaretAnnotation::CaretSymbol CaretAnnotation::caretSymbol() const
+-{
+- Q_D( const CaretAnnotation );
+-
+- if (!d->pdfAnnot)
+- return d->symbol;
+-
+- const AnnotCaret * caretann = static_cast<const AnnotCaret *>(d->pdfAnnot);
+- return (CaretAnnotation::CaretSymbol)caretann->getSymbol();
+-}
+-
+-void CaretAnnotation::setCaretSymbol( CaretAnnotation::CaretSymbol symbol )
+-{
+- Q_D( CaretAnnotation );
+-
+- if (!d->pdfAnnot)
+- {
+- d->symbol = symbol;
+- return;
+- }
+-
+- AnnotCaret * caretann = static_cast<AnnotCaret *>(d->pdfAnnot);
+- caretann->setSymbol((AnnotCaret::AnnotCaretSymbol)symbol);
+-}
+-
+-/** FileAttachmentAnnotation [Annotation] */
+-class FileAttachmentAnnotationPrivate : public AnnotationPrivate
+-{
+- public:
+- FileAttachmentAnnotationPrivate();
+- ~FileAttachmentAnnotationPrivate();
+- Annotation * makeAlias();
+- Annot* createNativeAnnot(::Page *destPage, DocumentData *doc);
+-
+- // data fields
+- QString icon;
+- EmbeddedFile *embfile;
+-};
+-
+-FileAttachmentAnnotationPrivate::FileAttachmentAnnotationPrivate()
+- : AnnotationPrivate(), icon( "PushPin" ), embfile( 0 )
+-{
+-}
+-
+-FileAttachmentAnnotationPrivate::~FileAttachmentAnnotationPrivate()
+-{
+- delete embfile;
+-}
+-
+-Annotation * FileAttachmentAnnotationPrivate::makeAlias()
+-{
+- return new FileAttachmentAnnotation(*this);
+-}
+-
+-Annot* FileAttachmentAnnotationPrivate::createNativeAnnot(::Page *destPage, DocumentData *doc)
+-{
+- return 0; // Not implemented
+-}
+-
+-FileAttachmentAnnotation::FileAttachmentAnnotation()
+- : Annotation( *new FileAttachmentAnnotationPrivate() )
+-{
+-}
+-
+-FileAttachmentAnnotation::FileAttachmentAnnotation(FileAttachmentAnnotationPrivate &dd)
+- : Annotation( dd )
+-{
+-}
+-
+-FileAttachmentAnnotation::FileAttachmentAnnotation( const QDomNode & node )
+- : Annotation( *new FileAttachmentAnnotationPrivate(), node )
+-{
+- // loop through the whole children looking for a 'fileattachment' element
+- QDomNode subNode = node.firstChild();
+- while( subNode.isElement() )
+- {
+- QDomElement e = subNode.toElement();
+- subNode = subNode.nextSibling();
+- if ( e.tagName() != "fileattachment" )
+- continue;
+-
+- // loading complete
+- break;
+- }
+-}
+-
+-FileAttachmentAnnotation::~FileAttachmentAnnotation()
+-{
+-}
+-
+-void FileAttachmentAnnotation::store( QDomNode & node, QDomDocument & document ) const
+-{
+- // store base annotation properties
+- storeBaseAnnotationProperties( node, document );
+-
+- // create [fileattachment] element
+- QDomElement fileAttachmentElement = document.createElement( "fileattachment" );
+- node.appendChild( fileAttachmentElement );
+-}
+-
+-Annotation::SubType FileAttachmentAnnotation::subType() const
+-{
+- return AFileAttachment;
+-}
+-
+-QString FileAttachmentAnnotation::fileIconName() const
+-{
+- Q_D( const FileAttachmentAnnotation );
+- return d->icon;
+-}
+-
+-void FileAttachmentAnnotation::setFileIconName( const QString &icon )
+-{
+- Q_D( FileAttachmentAnnotation );
+- d->icon = icon;
+-}
+-
+-EmbeddedFile* FileAttachmentAnnotation::embeddedFile() const
+-{
+- Q_D( const FileAttachmentAnnotation );
+- return d->embfile;
+-}
+-
+-void FileAttachmentAnnotation::setEmbeddedFile( EmbeddedFile *ef )
+-{
+- Q_D( FileAttachmentAnnotation );
+- d->embfile = ef;
+-}
+-
+-/** SoundAnnotation [Annotation] */
+-class SoundAnnotationPrivate : public AnnotationPrivate
+-{
+- public:
+- SoundAnnotationPrivate();
+- ~SoundAnnotationPrivate();
+- Annotation * makeAlias();
+- Annot* createNativeAnnot(::Page *destPage, DocumentData *doc);
+-
+- // data fields
+- QString icon;
+- SoundObject *sound;
+-};
+-
+-SoundAnnotationPrivate::SoundAnnotationPrivate()
+- : AnnotationPrivate(), icon( "Speaker" ), sound( 0 )
+-{
+-}
+-
+-SoundAnnotationPrivate::~SoundAnnotationPrivate()
+-{
+- delete sound;
+-}
+-
+-Annotation * SoundAnnotationPrivate::makeAlias()
+-{
+- return new SoundAnnotation(*this);
+-}
+-
+-Annot* SoundAnnotationPrivate::createNativeAnnot(::Page *destPage, DocumentData *doc)
+-{
+- return 0; // Not implemented
+-}
+-
+-SoundAnnotation::SoundAnnotation()
+- : Annotation( *new SoundAnnotationPrivate() )
+-{
+-}
+-
+-SoundAnnotation::SoundAnnotation(SoundAnnotationPrivate &dd)
+- : Annotation( dd )
+-{
+-}
+-
+-SoundAnnotation::SoundAnnotation( const QDomNode & node )
+- : Annotation( *new SoundAnnotationPrivate(), node )
+-{
+- // loop through the whole children looking for a 'sound' element
+- QDomNode subNode = node.firstChild();
+- while( subNode.isElement() )
+- {
+- QDomElement e = subNode.toElement();
+- subNode = subNode.nextSibling();
+- if ( e.tagName() != "sound" )
+- continue;
+-
+- // loading complete
+- break;
+- }
+-}
+-
+-SoundAnnotation::~SoundAnnotation()
+-{
+-}
+-
+-void SoundAnnotation::store( QDomNode & node, QDomDocument & document ) const
+-{
+- // store base annotation properties
+- storeBaseAnnotationProperties( node, document );
+-
+- // create [sound] element
+- QDomElement soundElement = document.createElement( "sound" );
+- node.appendChild( soundElement );
+-}
+-
+-Annotation::SubType SoundAnnotation::subType() const
+-{
+- return ASound;
+-}
+-
+-QString SoundAnnotation::soundIconName() const
+-{
+- Q_D( const SoundAnnotation );
+- return d->icon;
+-}
+-
+-void SoundAnnotation::setSoundIconName( const QString &icon )
+-{
+- Q_D( SoundAnnotation );
+- d->icon = icon;
+-}
+-
+-SoundObject* SoundAnnotation::sound() const
+-{
+- Q_D( const SoundAnnotation );
+- return d->sound;
+-}
+-
+-void SoundAnnotation::setSound( SoundObject *s )
+-{
+- Q_D( SoundAnnotation );
+- d->sound = s;
+-}
+-
+-/** MovieAnnotation [Annotation] */
+-class MovieAnnotationPrivate : public AnnotationPrivate
+-{
+- public:
+- MovieAnnotationPrivate();
+- ~MovieAnnotationPrivate();
+- Annotation * makeAlias();
+- Annot* createNativeAnnot(::Page *destPage, DocumentData *doc);
+-
+- // data fields
+- MovieObject *movie;
+- QString title;
+-};
+-
+-MovieAnnotationPrivate::MovieAnnotationPrivate()
+- : AnnotationPrivate(), movie( 0 )
+-{
+-}
+-
+-MovieAnnotationPrivate::~MovieAnnotationPrivate()
+-{
+- delete movie;
+-}
+-
+-Annotation * MovieAnnotationPrivate::makeAlias()
+-{
+- return new MovieAnnotation(*this);
+-}
+-
+-Annot* MovieAnnotationPrivate::createNativeAnnot(::Page *destPage, DocumentData *doc)
+-{
+- return 0; // Not implemented
+-}
+-
+-MovieAnnotation::MovieAnnotation()
+- : Annotation( *new MovieAnnotationPrivate() )
+-{
+-}
+-
+-MovieAnnotation::MovieAnnotation(MovieAnnotationPrivate &dd)
+- : Annotation( dd )
+-{
+-}
+-
+-MovieAnnotation::MovieAnnotation( const QDomNode & node )
+- : Annotation( *new MovieAnnotationPrivate(), node )
+-{
+- // loop through the whole children looking for a 'movie' element
+- QDomNode subNode = node.firstChild();
+- while( subNode.isElement() )
+- {
+- QDomElement e = subNode.toElement();
+- subNode = subNode.nextSibling();
+- if ( e.tagName() != "movie" )
+- continue;
+-
+- // loading complete
+- break;
+- }
+-}
+-
+-MovieAnnotation::~MovieAnnotation()
+-{
+-}
+-
+-void MovieAnnotation::store( QDomNode & node, QDomDocument & document ) const
+-{
+- // store base annotation properties
+- storeBaseAnnotationProperties( node, document );
+-
+- // create [movie] element
+- QDomElement movieElement = document.createElement( "movie" );
+- node.appendChild( movieElement );
+-}
+-
+-Annotation::SubType MovieAnnotation::subType() const
+-{
+- return AMovie;
+-}
+-
+-MovieObject* MovieAnnotation::movie() const
+-{
+- Q_D( const MovieAnnotation );
+- return d->movie;
+-}
+-
+-void MovieAnnotation::setMovie( MovieObject *movie )
+-{
+- Q_D( MovieAnnotation );
+- d->movie = movie;
+-}
+-
+-QString MovieAnnotation::movieTitle() const
+-{
+- Q_D( const MovieAnnotation );
+- return d->title;
+-}
+-
+-void MovieAnnotation::setMovieTitle( const QString &title )
+-{
+- Q_D( MovieAnnotation );
+- d->title = title;
+-}
+-
+-/** ScreenAnnotation [Annotation] */
+-class ScreenAnnotationPrivate : public AnnotationPrivate
+-{
+- public:
+- ScreenAnnotationPrivate();
+- ~ScreenAnnotationPrivate();
+- Annotation * makeAlias();
+- Annot* createNativeAnnot(::Page *destPage, DocumentData *doc);
+-
+- // data fields
+- LinkRendition *action;
+- QString title;
+-};
+-
+-ScreenAnnotationPrivate::ScreenAnnotationPrivate()
+- : AnnotationPrivate(), action( 0 )
+-{
+-}
+-
+-ScreenAnnotationPrivate::~ScreenAnnotationPrivate()
+-{
+- delete action;
+-}
+-
+-ScreenAnnotation::ScreenAnnotation(ScreenAnnotationPrivate &dd)
+- : Annotation( dd )
+-{}
+-
+-Annotation * ScreenAnnotationPrivate::makeAlias()
+-{
+- return new ScreenAnnotation(*this);
+-}
+-
+-Annot* ScreenAnnotationPrivate::createNativeAnnot(::Page *destPage, DocumentData *doc)
+-{
+- return 0; // Not implemented
+-}
+-
+-ScreenAnnotation::ScreenAnnotation()
+- : Annotation( *new ScreenAnnotationPrivate() )
+-{
+-}
+-
+-ScreenAnnotation::~ScreenAnnotation()
+-{
+-}
+-
+-void ScreenAnnotation::store( QDomNode & node, QDomDocument & document ) const
+-{
+- // store base annotation properties
+- storeBaseAnnotationProperties( node, document );
+-
+- // create [screen] element
+- QDomElement screenElement = document.createElement( "screen" );
+- node.appendChild( screenElement );
+-}
+-
+-Annotation::SubType ScreenAnnotation::subType() const
+-{
+- return AScreen;
+-}
+-
+-LinkRendition* ScreenAnnotation::action() const
+-{
+- Q_D( const ScreenAnnotation );
+- return d->action;
+-}
+-
+-void ScreenAnnotation::setAction( LinkRendition *action )
+-{
+- Q_D( ScreenAnnotation );
+- d->action = action;
+-}
+-
+-QString ScreenAnnotation::screenTitle() const
+-{
+- Q_D( const ScreenAnnotation );
+- return d->title;
+-}
+-
+-void ScreenAnnotation::setScreenTitle( const QString &title )
+-{
+- Q_D( ScreenAnnotation );
+- d->title = title;
+-}
+-
+-Link* ScreenAnnotation::additionalAction( AdditionalActionType type ) const
+-{
+- Q_D( const ScreenAnnotation );
+- return d->additionalAction( type );
+-}
+-
+-/** WidgetAnnotation [Annotation] */
+-class WidgetAnnotationPrivate : public AnnotationPrivate
+-{
+- public:
+- Annotation * makeAlias();
+- Annot* createNativeAnnot(::Page *destPage, DocumentData *doc);
+-};
+-
+-Annotation * WidgetAnnotationPrivate::makeAlias()
+-{
+- return new WidgetAnnotation(*this);
+-}
+-
+-Annot* WidgetAnnotationPrivate::createNativeAnnot(::Page *destPage, DocumentData *doc)
+-{
+- return 0; // Not implemented
+-}
+-
+-WidgetAnnotation::WidgetAnnotation(WidgetAnnotationPrivate &dd)
+- : Annotation( dd )
+-{}
+-
+-WidgetAnnotation::WidgetAnnotation()
+- : Annotation( *new WidgetAnnotationPrivate() )
+-{
+-}
+-
+-WidgetAnnotation::~WidgetAnnotation()
+-{
+-}
+-
+-void WidgetAnnotation::store( QDomNode & node, QDomDocument & document ) const
+-{
+- // store base annotation properties
+- storeBaseAnnotationProperties( node, document );
+-
+- // create [widget] element
+- QDomElement widgetElement = document.createElement( "widget" );
+- node.appendChild( widgetElement );
+-}
+-
+-Annotation::SubType WidgetAnnotation::subType() const
+-{
+- return AWidget;
+-}
+-
+-Link* WidgetAnnotation::additionalAction( AdditionalActionType type ) const
+-{
+- Q_D( const WidgetAnnotation );
+- return d->additionalAction( type );
+-}
+-
+-/** RichMediaAnnotation [Annotation] */
+-class RichMediaAnnotation::Params::Private
+-{
+- public:
+- Private() {}
+-
+- QString flashVars;
+-};
+-
+-RichMediaAnnotation::Params::Params()
+- : d( new Private )
+-{
+-}
+-
+-RichMediaAnnotation::Params::~Params()
+-{
+-}
+-
+-void RichMediaAnnotation::Params::setFlashVars( const QString &flashVars )
+-{
+- d->flashVars = flashVars;
+-}
+-
+-QString RichMediaAnnotation::Params::flashVars() const
+-{
+- return d->flashVars;
+-}
+-
+-
+-class RichMediaAnnotation::Instance::Private
+-{
+- public:
+- Private()
+- : params( 0 )
+- {
+- }
+-
+- ~Private()
+- {
+- delete params;
+- }
+-
+- RichMediaAnnotation::Instance::Type type;
+- RichMediaAnnotation::Params *params;
+-};
+-
+-RichMediaAnnotation::Instance::Instance()
+- : d( new Private )
+-{
+-}
+-
+-RichMediaAnnotation::Instance::~Instance()
+-{
+-}
+-
+-void RichMediaAnnotation::Instance::setType( Type type )
+-{
+- d->type = type;
+-}
+-
+-RichMediaAnnotation::Instance::Type RichMediaAnnotation::Instance::type() const
+-{
+- return d->type;
+-}
+-
+-void RichMediaAnnotation::Instance::setParams( RichMediaAnnotation::Params *params )
+-{
+- delete d->params;
+- d->params = params;
+-}
+-
+-RichMediaAnnotation::Params* RichMediaAnnotation::Instance::params() const
+-{
+- return d->params;
+-}
+-
+-
+-class RichMediaAnnotation::Configuration::Private
+-{
+- public:
+- Private() {}
+- ~Private()
+- {
+- qDeleteAll( instances );
+- instances.clear();
+- }
+-
+- RichMediaAnnotation::Configuration::Type type;
+- QString name;
+- QList< RichMediaAnnotation::Instance* > instances;
+-};
+-
+-RichMediaAnnotation::Configuration::Configuration()
+- : d( new Private )
+-{
+-}
+-
+-RichMediaAnnotation::Configuration::~Configuration()
+-{
+-}
+-
+-void RichMediaAnnotation::Configuration::setType( Type type )
+-{
+- d->type = type;
+-}
+-
+-RichMediaAnnotation::Configuration::Type RichMediaAnnotation::Configuration::type() const
+-{
+- return d->type;
+-}
+-
+-void RichMediaAnnotation::Configuration::setName( const QString &name )
+-{
+- d->name = name;
+-}
+-
+-QString RichMediaAnnotation::Configuration::name() const
+-{
+- return d->name;
+-}
+-
+-void RichMediaAnnotation::Configuration::setInstances( const QList< RichMediaAnnotation::Instance* > &instances )
+-{
+- qDeleteAll( d->instances );
+- d->instances.clear();
+-
+- d->instances = instances;
+-}
+-
+-QList< RichMediaAnnotation::Instance* > RichMediaAnnotation::Configuration::instances() const
+-{
+- return d->instances;
+-}
+-
+-
+-class RichMediaAnnotation::Asset::Private
+-{
+- public:
+- Private()
+- : embeddedFile( 0 )
+- {
+- }
+-
+- ~Private()
+- {
+- delete embeddedFile;
+- }
+-
+- QString name;
+- EmbeddedFile *embeddedFile;
+-};
+-
+-RichMediaAnnotation::Asset::Asset()
+- : d( new Private )
+-{
+-}
+-
+-RichMediaAnnotation::Asset::~Asset()
+-{
+-}
+-
+-void RichMediaAnnotation::Asset::setName( const QString &name )
+-{
+- d->name = name;
+-}
+-
+-QString RichMediaAnnotation::Asset::name() const
+-{
+- return d->name;
+-}
+-
+-void RichMediaAnnotation::Asset::setEmbeddedFile( EmbeddedFile * embeddedFile )
+-{
+- delete d->embeddedFile;
+- d->embeddedFile = embeddedFile;
+-}
+-
+-EmbeddedFile* RichMediaAnnotation::Asset::embeddedFile() const
+-{
+- return d->embeddedFile;
+-}
+-
+-
+-class RichMediaAnnotation::Content::Private
+-{
+- public:
+- Private() {}
+- ~Private()
+- {
+- qDeleteAll( configurations );
+- configurations.clear();
+-
+- qDeleteAll( assets );
+- assets.clear();
+- }
+-
+- QList< RichMediaAnnotation::Configuration* > configurations;
+- QList< RichMediaAnnotation::Asset* > assets;
+-};
+-
+-RichMediaAnnotation::Content::Content()
+- : d( new Private )
+-{
+-}
+-
+-RichMediaAnnotation::Content::~Content()
+-{
+-}
+-
+-void RichMediaAnnotation::Content::setConfigurations( const QList< RichMediaAnnotation::Configuration* > &configurations )
+-{
+- qDeleteAll( d->configurations );
+- d->configurations.clear();
+-
+- d->configurations = configurations;
+-}
+-
+-QList< RichMediaAnnotation::Configuration* > RichMediaAnnotation::Content::configurations() const
+-{
+- return d->configurations;
+-}
+-
+-void RichMediaAnnotation::Content::setAssets( const QList< RichMediaAnnotation::Asset* > &assets )
+-{
+- qDeleteAll( d->assets );
+- d->assets.clear();
+-
+- d->assets = assets;
+-}
+-
+-QList< RichMediaAnnotation::Asset* > RichMediaAnnotation::Content::assets() const
+-{
+- return d->assets;
+-}
+-
+-
+-class RichMediaAnnotation::Activation::Private
+-{
+- public:
+- Private()
+- : condition( RichMediaAnnotation::Activation::UserAction )
+- {
+- }
+-
+- RichMediaAnnotation::Activation::Condition condition;
+-};
+-
+-RichMediaAnnotation::Activation::Activation()
+- : d( new Private )
+-{
+-}
+-
+-RichMediaAnnotation::Activation::~Activation()
+-{
+-}
+-
+-void RichMediaAnnotation::Activation::setCondition( Condition condition )
+-{
+- d->condition = condition;
+-}
+-
+-RichMediaAnnotation::Activation::Condition RichMediaAnnotation::Activation::condition() const
+-{
+- return d->condition;
+-}
+-
+-
+-class RichMediaAnnotation::Deactivation::Private : public QSharedData
+-{
+- public:
+- Private()
+- : condition( RichMediaAnnotation::Deactivation::UserAction )
+- {
+- }
+-
+- RichMediaAnnotation::Deactivation::Condition condition;
+-};
+-
+-RichMediaAnnotation::Deactivation::Deactivation()
+- : d( new Private )
+-{
+-}
+-
+-RichMediaAnnotation::Deactivation::~Deactivation()
+-{
+-}
+-
+-void RichMediaAnnotation::Deactivation::setCondition( Condition condition )
+-{
+- d->condition = condition;
+-}
+-
+-RichMediaAnnotation::Deactivation::Condition RichMediaAnnotation::Deactivation::condition() const
+-{
+- return d->condition;
+-}
+-
+-
+-class RichMediaAnnotation::Settings::Private : public QSharedData
+-{
+- public:
+- Private()
+- : activation( 0 ), deactivation( 0 )
+- {
+- }
+-
+- RichMediaAnnotation::Activation *activation;
+- RichMediaAnnotation::Deactivation *deactivation;
+-};
+-
+-RichMediaAnnotation::Settings::Settings()
+- : d( new Private )
+-{
+-}
+-
+-RichMediaAnnotation::Settings::~Settings()
+-{
+-}
+-
+-void RichMediaAnnotation::Settings::setActivation( RichMediaAnnotation::Activation *activation )
+-{
+- delete d->activation;
+- d->activation = activation;
+-}
+-
+-RichMediaAnnotation::Activation* RichMediaAnnotation::Settings::activation() const
+-{
+- return d->activation;
+-}
+-
+-void RichMediaAnnotation::Settings::setDeactivation( RichMediaAnnotation::Deactivation *deactivation )
+-{
+- delete d->deactivation;
+- d->deactivation = deactivation;
+-}
+-
+-RichMediaAnnotation::Deactivation* RichMediaAnnotation::Settings::deactivation() const
+-{
+- return d->deactivation;
+-}
+-
+-
+-class RichMediaAnnotationPrivate : public AnnotationPrivate
+-{
+- public:
+- RichMediaAnnotationPrivate()
+- : settings( 0 ), content( 0 )
+- {
+- }
+-
+- ~RichMediaAnnotationPrivate()
+- {
+- delete settings;
+- delete content;
+- }
+-
+- Annotation * makeAlias()
+- {
+- return new RichMediaAnnotation( *this );
+- }
+-
+- Annot* createNativeAnnot( ::Page *destPage, DocumentData *doc )
+- {
+- Q_UNUSED( destPage );
+- Q_UNUSED( doc );
+-
+- return 0;
+- }
+-
+- RichMediaAnnotation::Settings *settings;
+- RichMediaAnnotation::Content *content;
+-};
+-
+-RichMediaAnnotation::RichMediaAnnotation()
+- : Annotation( *new RichMediaAnnotationPrivate() )
+-{
+-}
+-
+-RichMediaAnnotation::RichMediaAnnotation( RichMediaAnnotationPrivate &dd )
+- : Annotation( dd )
+-{
+-}
+-
+-RichMediaAnnotation::RichMediaAnnotation( const QDomNode & node )
+- : Annotation( *new RichMediaAnnotationPrivate(), node )
+-{
+- // loop through the whole children looking for a 'richMedia' element
+- QDomNode subNode = node.firstChild();
+- while( subNode.isElement() )
+- {
+- QDomElement e = subNode.toElement();
+- subNode = subNode.nextSibling();
+- if ( e.tagName() != "richMedia" )
+- continue;
+-
+- // loading complete
+- break;
+- }
+-}
+-
+-RichMediaAnnotation::~RichMediaAnnotation()
+-{
+-}
+-
+-void RichMediaAnnotation::store( QDomNode & node, QDomDocument & document ) const
+-{
+- // store base annotation properties
+- storeBaseAnnotationProperties( node, document );
+-
+- // create [richMedia] element
+- QDomElement richMediaElement = document.createElement( "richMedia" );
+- node.appendChild( richMediaElement );
+-}
+-
+-Annotation::SubType RichMediaAnnotation::subType() const
+-{
+- return ARichMedia;
+-}
+-
+-void RichMediaAnnotation::setSettings( RichMediaAnnotation::Settings *settings )
+-{
+- Q_D( RichMediaAnnotation );
+-
+- delete d->settings;
+- d->settings = settings;
+-}
+-
+-RichMediaAnnotation::Settings* RichMediaAnnotation::settings() const
+-{
+- Q_D( const RichMediaAnnotation );
+-
+- return d->settings;
+-}
+-
+-void RichMediaAnnotation::setContent( RichMediaAnnotation::Content *content )
+-{
+- Q_D( RichMediaAnnotation );
+-
+- delete d->content;
+- d->content = content;
+-}
+-
+-RichMediaAnnotation::Content* RichMediaAnnotation::content() const
+-{
+- Q_D( const RichMediaAnnotation );
+-
+- return d->content;
+-}
+-
+-//BEGIN utility annotation functions
+-QColor convertAnnotColor( AnnotColor *color )
+-{
+- if ( !color )
+- return QColor();
+-
+- QColor newcolor;
+- const double *color_data = color->getValues();
+- switch ( color->getSpace() )
+- {
+- case AnnotColor::colorTransparent: // = 0,
+- newcolor = Qt::transparent;
+- break;
+- case AnnotColor::colorGray: // = 1,
+- newcolor.setRgbF( color_data[0], color_data[0], color_data[0] );
+- break;
+- case AnnotColor::colorRGB: // = 3,
+- newcolor.setRgbF( color_data[0], color_data[1], color_data[2] );
+- break;
+- case AnnotColor::colorCMYK: // = 4
+- newcolor.setCmykF( color_data[0], color_data[1], color_data[2], color_data[3] );
+- break;
+- }
+- return newcolor;
+-}
+-
+-AnnotColor* convertQColor( const QColor &c )
+-{
+- if (!c.isValid() || c.alpha() == 0)
+- return new AnnotColor(); // Transparent
+- else
+- return new AnnotColor(c.redF(), c.greenF(), c.blueF());
+-}
+-//END utility annotation functions
+-
+-}
+diff --git a/qt4/src/poppler-annotation.h b/qt4/src/poppler-annotation.h
+deleted file mode 100644
+index ac77c421..00000000
+--- a/qt4/src/poppler-annotation.h
++++ /dev/null
+@@ -1,1375 +0,0 @@
+-/* poppler-annotation.h: qt interface to poppler
+- * Copyright (C) 2006-2008, 2012 Albert Astals Cid <aacid@kde.org>
+- * Copyright (C) 2006, 2008 Pino Toscano <pino@kde.org>
+- * Copyright (C) 2007, Brad Hards <bradh@frogmouth.net>
+- * Copyright (C) 2010, Philip Lorenz <lorenzph+freedesktop@gmail.com>
+- * Copyright (C) 2012, 2015, Tobias Koenig <tobias.koenig@kdab.com>
+- * Copyright (C) 2012, Guillermo A. Amaral B. <gamaral@kde.org>
+- * Copyright (C) 2012, 2013 Fabio D'Urso <fabiodurso@hotmail.it>
+- * Adapting code from
+- * Copyright (C) 2004 by Enrico Ros <eros.kde@email.it>
+- *
+- * This program is free software; you can redistribute it and/or modify
+- * it under the terms of the GNU General Public License as published by
+- * the Free Software Foundation; either version 2, or (at your option)
+- * any later version.
+- *
+- * This program is distributed in the hope that it will be useful,
+- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+- * GNU General Public License for more details.
+- *
+- * You should have received a copy of the GNU General Public License
+- * along with this program; if not, write to the Free Software
+- * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+- */
+-
+-#ifndef _POPPLER_ANNOTATION_H_
+-#define _POPPLER_ANNOTATION_H_
+-
+-#include <QtCore/QDateTime>
+-#include <QtCore/QSharedDataPointer>
+-#include <QtCore/QLinkedList>
+-#include <QtCore/QList>
+-#include <QtCore/QPointF>
+-#include <QtCore/QRectF>
+-#include <QtCore/QVector>
+-#include <QtGui/QColor>
+-#include <QtGui/QFont>
+-#include <QtXml/QDomDocument>
+-#include "poppler-export.h"
+-
+-namespace Poppler {
+-
+-class Annotation;
+-class AnnotationPrivate;
+-class TextAnnotationPrivate;
+-class LineAnnotationPrivate;
+-class GeomAnnotationPrivate;
+-class HighlightAnnotationPrivate;
+-class StampAnnotationPrivate;
+-class InkAnnotationPrivate;
+-class LinkAnnotationPrivate;
+-class CaretAnnotationPrivate;
+-class FileAttachmentAnnotationPrivate;
+-class SoundAnnotationPrivate;
+-class MovieAnnotationPrivate;
+-class ScreenAnnotationPrivate;
+-class WidgetAnnotationPrivate;
+-class RichMediaAnnotationPrivate;
+-class EmbeddedFile;
+-class Link;
+-class SoundObject;
+-class MovieObject;
+-class LinkRendition;
+-class Page;
+-
+-/**
+- * \short Helper class for (recursive) Annotation retrieval/storage.
+- *
+- */
+-class POPPLER_QT4_EXPORT AnnotationUtils
+-{
+- public:
+- /**
+- * Restore an Annotation (with revisions if needed) from the DOM
+- * element \p annElement.
+- * \returns a pointer to the complete Annotation or 0 if element is
+- * invalid.
+- */
+- static Annotation * createAnnotation( const QDomElement & annElement );
+-
+- /**
+- * Save the Annotation \p ann as a child of \p annElement taking
+- * care of saving all revisions if \p ann has any.
+- */
+- static void storeAnnotation( const Annotation * ann,
+- QDomElement & annElement, QDomDocument & document );
+-
+- /**
+- * Returns an element called \p name from the direct children of
+- * \p parentNode or a null element if not found.
+- */
+- static QDomElement findChildElement( const QDomNode & parentNode,
+- const QString & name );
+-};
+-
+-
+-/**
+- * \short Annotation class holding properties shared by all annotations.
+- *
+- * An Annotation is an object (text note, highlight, sound, popup window, ..)
+- * contained by a Page in the document.
+- *
+- * \warning Different Annotation objects might point to the same annotation.
+- *
+- * \section annotCreation How to add annotations
+- *
+- * Create an Annotation object of the desired subclass (for example
+- * TextAnnotation) and set its properties:
+- * @code
+- * Poppler::TextAnnotation* myann = new Poppler::TextAnnotation(Poppler::TextAnnotation::InPlace);
+- * myann->setBoundary(QRectF(0.1, 0.1, 0.2, 0.2)); // normalized coordinates: (0,0) is top-left, (1,1) is bottom-right
+- * myann->setContents("Hello, world!");
+- * @endcode
+- * \note Always set a boundary rectangle, or nothing will be shown!
+- *
+- * Obtain a pointer to the Page where you want to add the annotation (refer to
+- * \ref req for instructions) and add the annotation:
+- * @code
+- * Poppler::Page* mypage = ...;
+- * mypage->addAnnotation(myann);
+- * @endcode
+- *
+- * You can keep on editing the annotation after it has been added to the page:
+- * @code
+- * myann->setContents("World, hello!"); // Let's change text...
+- * myann->setAuthor("Your name here"); // ...and set an author too
+- * @endcode
+- *
+- * When you're done with editing the annotation, you must destroy the Annotation
+- * object:
+- * @code
+- * delete myann;
+- * @endcode
+- *
+- * Use the PDFConverter class to save the modified document.
+- *
+- * \section annotFixedRotation FixedRotation flag specifics
+- *
+- * According to the PDF specification, annotations whose
+- * Annotation::FixedRotation flag is set must always be shown in their original
+- * orientation, no matter what the current rendering rotation or the page's
+- * Page::orientation() values are. In comparison with regular annotations, such
+- * annotations should therefore be transformed by an extra rotation at rendering
+- * time to "undo" such context-related rotations, which is equal to
+- * <code>-(rendering_rotation + page_orientation)</code>. The rotation pivot
+- * is the top-left corner of the boundary rectangle.
+- *
+- * In practice, %Poppler's \ref Page::renderToImage only "unrotates" the
+- * page orientation, and does <b>not</b> unrotate the rendering rotation.
+- * This ensures consistent renderings at different Page::Rotation values:
+- * annotations are always positioned as if they were being positioned at the
+- * default page orientation.
+- *
+- * Just like regular annotations, %Poppler Qt4 exposes normalized coordinates
+- * relative to the page's default orientation. However, behind the scenes, the
+- * coordinate system is different and %Poppler transparently transforms each
+- * shape. If you never call either Annotation::setFlags or
+- * Annotation::setBoundary, you don't need to worry about this; but if you do
+- * call them, then you need to adhere to the following rules:
+- * - Whenever you toggle the Annotation::FixedRotation flag, you <b>must</b>
+- * set again the boundary rectangle first, and then you <b>must</b> set
+- * again any other geometry-related property.
+- * - Whenever you modify the boundary rectangle of an annotation whose
+- * Annotation::FixedRotation flag is set, you <b>must</b> set again any other
+- * geometry-related property.
+- *
+- * These two rules are necessary to make %Poppler's transparent coordinate
+- * conversion work properly.
+- */
+-class POPPLER_QT4_EXPORT Annotation
+-{
+- friend class AnnotationUtils;
+- friend class LinkMovie;
+- friend class LinkRendition;
+-
+- public:
+- // enum definitions
+- /**
+- * Annotation subclasses
+- *
+- * \sa subType()
+- */
+- // WARNING!!! oKular uses that very same values so if you change them notify the author!
+- enum SubType
+- {
+- AText = 1, ///< TextAnnotation
+- ALine = 2, ///< LineAnnotation
+- AGeom = 3, ///< GeomAnnotation
+- AHighlight = 4, ///< HighlightAnnotation
+- AStamp = 5, ///< StampAnnotation
+- AInk = 6, ///< InkAnnotation
+- ALink = 7, ///< LinkAnnotation
+- ACaret = 8, ///< CaretAnnotation
+- AFileAttachment = 9, ///< FileAttachmentAnnotation
+- ASound = 10, ///< SoundAnnotation
+- AMovie = 11, ///< MovieAnnotation
+- AScreen = 12, ///< ScreenAnnotation \since 0.20
+- AWidget = 13, ///< WidgetAnnotation \since 0.22
+- ARichMedia = 14, ///< RichMediaAnnotation \since 0.36
+- A_BASE = 0
+- };
+-
+- /**
+- * Annotation flags
+- *
+- * They can be OR'd together (e.g. Annotation::FixedRotation | Annotation::DenyPrint).
+- *
+- * \sa flags(), setFlags(int)
+- */
+- // NOTE: Only flags that are known to work are documented
+- enum Flag
+- {
+- Hidden = 1, ///< Do not display or print the annotation
+- FixedSize = 2,
+- FixedRotation = 4, ///< Do not rotate the annotation according to page orientation and rendering rotation \warning Extra care is needed with this flag: see \ref annotFixedRotation
+- DenyPrint = 8, ///< Do not print the annotation
+- DenyWrite = 16,
+- DenyDelete = 32,
+- ToggleHidingOnMouse = 64,
+- External = 128
+- };
+-
+- enum LineStyle { Solid = 1, Dashed = 2, Beveled = 4, Inset = 8, Underline = 16 };
+- enum LineEffect { NoEffect = 1, Cloudy = 2};
+- enum RevScope { Root = 0 /** \since 0.20 */, Reply = 1, Group = 2, Delete = 4 };
+- enum RevType { None = 1, Marked = 2, Unmarked = 4, Accepted = 8, Rejected = 16, Cancelled = 32, Completed = 64 };
+-
+- /**
+- * Returns the author of the annotation.
+- */
+- QString author() const;
+- /**
+- * Sets a new author for the annotation.
+- */
+- void setAuthor( const QString &author );
+-
+- QString contents() const;
+- void setContents( const QString &contents );
+-
+- /**
+- * Returns the unique name (ID) of the annotation.
+- */
+- QString uniqueName() const;
+- /**
+- * Sets a new unique name for the annotation.
+- *
+- * \note no check of the new uniqueName is done
+- */
+- void setUniqueName( const QString &uniqueName );
+-
+- QDateTime modificationDate() const;
+- void setModificationDate( const QDateTime &date );
+-
+- QDateTime creationDate() const;
+- void setCreationDate( const QDateTime &date );
+-
+- /**
+- * Returns this annotation's flags
+- *
+- * \sa Flag, setFlags(int)
+- */
+- int flags() const;
+- /**
+- * Sets this annotation's flags
+- *
+- * \sa Flag, flags(), \ref annotFixedRotation
+- */
+- void setFlags( int flags );
+-
+- /**
+- * Returns this annotation's boundary rectangle in normalized coordinates
+- *
+- * \sa setBoundary(const QRectF&)
+- */
+- QRectF boundary() const;
+- /**
+- * Sets this annotation's boundary rectangle
+- *
+- * The boundary rectangle is the smallest rectangle that contains the
+- * annotation.
+- *
+- * \warning This property is mandatory: you must always set this.
+- *
+- * \sa boundary(), \ref annotFixedRotation
+- */
+- void setBoundary( const QRectF &boundary );
+-
+- /**
+- * \short Container class for Annotation style information
+- *
+- * \since 0.20
+- */
+- class POPPLER_QT4_EXPORT Style
+- {
+- public:
+- Style();
+- Style( const Style &other );
+- Style& operator=( const Style &other );
+- ~Style();
+-
+- // appearance properties
+- QColor color() const; // black
+- void setColor(const QColor &color);
+- double opacity() const; // 1.0
+- void setOpacity(double opacity);
+-
+- // pen properties
+- double width() const; // 1.0
+- void setWidth(double width);
+- LineStyle lineStyle() const; // LineStyle::Solid
+- void setLineStyle(LineStyle style);
+- double xCorners() const; // 0.0
+- void setXCorners(double radius);
+- double yCorners() const; // 0.0
+- void setYCorners(double radius);
+- const QVector<double>& dashArray() const; // [ 3 ]
+- void setDashArray(const QVector<double> &array);
+-
+- // pen effects
+- LineEffect lineEffect() const; // LineEffect::NoEffect
+- void setLineEffect(LineEffect effect);
+- double effectIntensity() const; // 1.0
+- void setEffectIntensity(double intens);
+-
+- private:
+- class Private;
+- QSharedDataPointer<Private> d;
+- };
+-
+- /// \since 0.20
+- Style style() const;
+- /// \since 0.20
+- void setStyle( const Style& style );
+-
+- /**
+- * \short Container class for Annotation pop-up window information
+- *
+- * \since 0.20
+- */
+- class POPPLER_QT4_EXPORT Popup
+- {
+- public:
+- Popup();
+- Popup( const Popup &other );
+- Popup& operator=( const Popup &other );
+- ~Popup();
+-
+- // window state (Hidden, FixedRotation, Deny* flags allowed)
+- int flags() const; // -1 (never initialized) -> 0 (if inited and shown)
+- void setFlags( int flags );
+-
+- // geometric properties
+- QRectF geometry() const; // no default
+- void setGeometry( const QRectF &geom );
+-
+- // window contens/override properties
+- QString title() const; // '' text in the titlebar (overrides author)
+- void setTitle( const QString &title );
+- QString summary() const; // '' short description (displayed if not empty)
+- void setSummary( const QString &summary );
+- QString text() const; // '' text for the window (overrides annot->contents)
+- void setText( const QString &text );
+-
+- private:
+- class Private;
+- QSharedDataPointer<Private> d;
+- };
+-
+- /// \since 0.20
+- Popup popup() const;
+- /// \warning Currently does nothing \since 0.20
+- void setPopup( const Popup& popup );
+-
+- /// \cond PRIVATE
+- // This field is deprecated and not used any more. Use popup
+- Q_DECL_DEPRECATED struct { int width, height; } window; // Always set to zero
+- /// \endcond
+-
+- /// \since 0.20
+- RevScope revisionScope() const; // Root
+-
+- /// \since 0.20
+- RevType revisionType() const; // None
+-
+- /**
+- * Returns the revisions of this annotation
+- *
+- * \note The caller owns the returned annotations and they should
+- * be deleted when no longer required.
+- *
+- * \since 0.20
+- */
+- QList<Annotation*> revisions() const;
+-
+- /**
+- * The type of the annotation.
+- */
+- virtual SubType subType() const = 0;
+-
+- /**
+- * Destructor.
+- */
+- virtual ~Annotation();
+-
+- /**
+- * Describes the flags from an annotations 'AA' dictionary.
+- *
+- * This flag is used by the additionalAction() method for ScreenAnnotation
+- * and WidgetAnnotation.
+- *
+- * \since 0.22
+- */
+- enum AdditionalActionType
+- {
+- CursorEnteringAction, ///< Performed when the cursor enters the annotation's active area
+- CursorLeavingAction, ///< Performed when the cursor exists the annotation's active area
+- MousePressedAction, ///< Performed when the mouse button is pressed inside the annotation's active area
+- MouseReleasedAction, ///< Performed when the mouse button is released inside the annotation's active area
+- FocusInAction, ///< Performed when the annotation receives the input focus
+- FocusOutAction, ///< Performed when the annotation loses the input focus
+- PageOpeningAction, ///< Performed when the page containing the annotation is opened
+- PageClosingAction, ///< Performed when the page containing the annotation is closed
+- PageVisibleAction, ///< Performed when the page containing the annotation becomes visible
+- PageInvisibleAction ///< Performed when the page containing the annotation becomes invisible
+- };
+-
+- protected:
+- /// \cond PRIVATE
+- Annotation( AnnotationPrivate &dd );
+- Annotation( AnnotationPrivate &dd, const QDomNode &description );
+- void storeBaseAnnotationProperties( QDomNode & parentNode, QDomDocument & document ) const;
+- Q_DECLARE_PRIVATE( Annotation )
+- QExplicitlySharedDataPointer<AnnotationPrivate> d_ptr;
+- /// \endcond
+-
+- private:
+- virtual void store( QDomNode & parentNode, QDomDocument & document ) const = 0;
+- Q_DISABLE_COPY( Annotation )
+-};
+-
+-/**
+- * \short Annotation containing text.
+- *
+- * A text annotation is an object showing some text directly on the page, or
+- * linked to the contents using an icon shown on a page.
+- */
+-class POPPLER_QT4_EXPORT TextAnnotation : public Annotation
+-{
+- friend class AnnotationUtils;
+- friend class AnnotationPrivate;
+-
+- public:
+- // local enums
+- enum TextType { Linked, InPlace };
+- enum InplaceIntent { Unknown, Callout, TypeWriter };
+-
+- TextAnnotation( TextType type );
+- ~TextAnnotation();
+- SubType subType() const override;
+-
+- /**
+- The type of text annotation represented by this object
+- */
+- TextType textType() const;
+-
+- /**
+- The name of the icon for this text annotation.
+-
+- Standard names for text annotation icons are:
+- - Comment
+- - Help
+- - Insert
+- - Key
+- - NewParagraph
+- - Note (this is the default icon to use)
+- - Paragraph
+- */
+- QString textIcon() const;
+-
+- /**
+- Set the name of the icon to use for this text annotation.
+-
+- \sa textIcon for the list of standard names
+- */
+- void setTextIcon( const QString &icon );
+-
+- QFont textFont() const;
+- void setTextFont( const QFont &font );
+-
+- int inplaceAlign() const;
+- void setInplaceAlign( int align );
+-
+- /**
+- Synonym for contents()
+-
+- \deprecated Use contents() instead
+- */
+- QString inplaceText() const;
+- /**
+- Synonym for setContents()
+-
+- \deprecated Use setContents() instead
+- */
+- void setInplaceText( const QString &text );
+-
+- QPointF calloutPoint( int id ) const;
+- /// \since 0.20
+- QVector<QPointF> calloutPoints() const;
+- /// \since 0.20
+- void setCalloutPoints( const QVector<QPointF> &points );
+-
+- InplaceIntent inplaceIntent() const;
+- void setInplaceIntent( InplaceIntent intent );
+-
+- private:
+- TextAnnotation( const QDomNode &node );
+- TextAnnotation( TextAnnotationPrivate &dd );
+- virtual void store( QDomNode &parentNode, QDomDocument &document ) const;
+- void setTextType( TextType type );
+- Q_DECLARE_PRIVATE( TextAnnotation )
+- Q_DISABLE_COPY( TextAnnotation )
+-};
+-
+-/**
+- * \short Polygon/polyline annotation.
+- *
+- * This annotation represents a polygon (or polyline) to be drawn on a page.
+- */
+-class POPPLER_QT4_EXPORT LineAnnotation : public Annotation
+-{
+- friend class AnnotationUtils;
+- friend class AnnotationPrivate;
+-
+- public:
+- // local enums
+- /// \since 0.20
+- enum LineType { StraightLine, Polyline };
+- enum TermStyle { Square, Circle, Diamond, OpenArrow, ClosedArrow, None,
+- Butt, ROpenArrow, RClosedArrow, Slash };
+- enum LineIntent { Unknown, Arrow, Dimension, PolygonCloud };
+-
+- /// \since 0.20
+- LineAnnotation( LineType type );
+- ~LineAnnotation();
+- SubType subType() const override;
+-
+- /// \since 0.20
+- LineType lineType() const;
+-
+- QLinkedList<QPointF> linePoints() const;
+- void setLinePoints( const QLinkedList<QPointF> &points );
+-
+- TermStyle lineStartStyle() const;
+- void setLineStartStyle( TermStyle style );
+-
+- TermStyle lineEndStyle() const;
+- void setLineEndStyle( TermStyle style );
+-
+- bool isLineClosed() const;
+- void setLineClosed( bool closed );
+-
+- QColor lineInnerColor() const;
+- void setLineInnerColor( const QColor &color );
+-
+- double lineLeadingForwardPoint() const;
+- void setLineLeadingForwardPoint( double point );
+-
+- double lineLeadingBackPoint() const;
+- void setLineLeadingBackPoint( double point );
+-
+- bool lineShowCaption() const;
+- void setLineShowCaption( bool show );
+-
+- LineIntent lineIntent() const;
+- void setLineIntent( LineIntent intent );
+-
+- private:
+- LineAnnotation( const QDomNode &node );
+- LineAnnotation( LineAnnotationPrivate &dd );
+- virtual void store( QDomNode &parentNode, QDomDocument &document ) const;
+- void setLineType( LineType type );
+- Q_DECLARE_PRIVATE( LineAnnotation )
+- Q_DISABLE_COPY( LineAnnotation )
+-};
+-
+-/**
+- * \short Geometric annotation.
+- *
+- * The geometric annotation represents a geometric figure, like a rectangle or
+- * an ellipse.
+- */
+-class POPPLER_QT4_EXPORT GeomAnnotation : public Annotation
+-{
+- friend class AnnotationUtils;
+- friend class AnnotationPrivate;
+-
+- public:
+- GeomAnnotation();
+- virtual ~GeomAnnotation();
+- virtual SubType subType() const;
+-
+- // common enums
+- enum GeomType { InscribedSquare, InscribedCircle };
+-
+- GeomType geomType() const;
+- void setGeomType( GeomType style );
+-
+- QColor geomInnerColor() const;
+- void setGeomInnerColor( const QColor &color );
+-
+- private:
+- GeomAnnotation( const QDomNode &node );
+- GeomAnnotation( GeomAnnotationPrivate &dd );
+- virtual void store( QDomNode &parentNode, QDomDocument &document ) const;
+- Q_DECLARE_PRIVATE( GeomAnnotation )
+- Q_DISABLE_COPY( GeomAnnotation )
+-};
+-
+-/**
+- * \short Text highlight annotation.
+- *
+- * The higlight annotation represents some areas of text being "highlighted".
+- */
+-class POPPLER_QT4_EXPORT HighlightAnnotation : public Annotation
+-{
+- friend class AnnotationUtils;
+- friend class AnnotationPrivate;
+-
+- public:
+- HighlightAnnotation();
+- virtual ~HighlightAnnotation();
+- virtual SubType subType() const;
+-
+- /**
+- The type of highlight
+- */
+- enum HighlightType { Highlight, ///< highlighter pen style annotation
+- Squiggly, ///< jagged or squiggly underline
+- Underline, ///< straight line underline
+- StrikeOut ///< straight line through-line
+- };
+-
+- /**
+- Structure corresponding to a QuadPoints array. This matches a
+- quadrilateral that describes the area around a word (or set of
+- words) that are to be highlighted.
+- */
+- struct Quad
+- {
+- QPointF points[4]; // 8 valid coords
+- bool capStart; // false (vtx 1-4) [K]
+- bool capEnd; // false (vtx 2-3) [K]
+- double feather; // 0.1 (in range 0..1) [K]
+- };
+-
+- /**
+- The type (style) of highlighting to use for this area
+- or these areas.
+- */
+- HighlightType highlightType() const;
+-
+- /**
+- Set the type of highlighting to use for the given area
+- or areas.
+- */
+- void setHighlightType( HighlightType type );
+-
+- /**
+- The list of areas to highlight.
+- */
+- QList< Quad > highlightQuads() const;
+-
+- /**
+- Set the areas to highlight.
+- */
+- void setHighlightQuads( const QList< Quad > &quads );
+-
+- private:
+- HighlightAnnotation( const QDomNode &node );
+- HighlightAnnotation( HighlightAnnotationPrivate &dd );
+- virtual void store( QDomNode &parentNode, QDomDocument &document ) const;
+- Q_DECLARE_PRIVATE( HighlightAnnotation )
+- Q_DISABLE_COPY( HighlightAnnotation )
+-};
+-
+-/**
+- * \short Stamp annotation.
+- *
+- * A simple annotation drawing a stamp on a page.
+- */
+-class POPPLER_QT4_EXPORT StampAnnotation : public Annotation
+-{
+- friend class AnnotationUtils;
+- friend class AnnotationPrivate;
+-
+- public:
+- StampAnnotation();
+- virtual ~StampAnnotation();
+- virtual SubType subType() const;
+-
+- /**
+- The name of the icon for this stamp annotation.
+-
+- Standard names for stamp annotation icons are:
+- - Approved
+- - AsIs
+- - Confidential
+- - Departmental
+- - Draft (this is the default icon type)
+- - Experimental
+- - Expired
+- - Final
+- - ForComment
+- - ForPublicRelease
+- - NotApproved
+- - NotForPublicRelease
+- - Sold
+- - TopSecret
+- */
+- QString stampIconName() const;
+-
+- /**
+- Set the icon type for this stamp annotation.
+-
+- \sa stampIconName for the list of standard icon names
+- */
+- void setStampIconName( const QString &name );
+-
+- private:
+- StampAnnotation( const QDomNode &node );
+- StampAnnotation( StampAnnotationPrivate &dd );
+- virtual void store( QDomNode &parentNode, QDomDocument &document ) const;
+- Q_DECLARE_PRIVATE( StampAnnotation )
+- Q_DISABLE_COPY( StampAnnotation )
+-};
+-
+-/**
+- * \short Ink Annotation.
+- *
+- * Annotation representing an ink path on a page.
+- */
+-class POPPLER_QT4_EXPORT InkAnnotation : public Annotation
+-{
+- friend class AnnotationUtils;
+- friend class AnnotationPrivate;
+-
+- public:
+- InkAnnotation();
+- virtual ~InkAnnotation();
+- virtual SubType subType() const;
+-
+- QList< QLinkedList<QPointF> > inkPaths() const;
+- void setInkPaths( const QList< QLinkedList<QPointF> > &paths );
+-
+- private:
+- InkAnnotation( const QDomNode &node );
+- virtual void store( QDomNode &parentNode, QDomDocument &document ) const;
+- InkAnnotation(InkAnnotationPrivate &dd);
+- Q_DECLARE_PRIVATE( InkAnnotation )
+- Q_DISABLE_COPY( InkAnnotation )
+-};
+-
+-class POPPLER_QT4_EXPORT LinkAnnotation : public Annotation
+-{
+- friend class AnnotationUtils;
+- friend class AnnotationPrivate;
+-
+- public:
+- virtual ~LinkAnnotation();
+- virtual SubType subType() const;
+-
+- // local enums
+- enum HighlightMode { None, Invert, Outline, Push };
+-
+- /** \since 0.20 */
+- Link* linkDestination() const;
+- void setLinkDestination( Link *link );
+-
+- HighlightMode linkHighlightMode() const;
+- void setLinkHighlightMode( HighlightMode mode );
+-
+- QPointF linkRegionPoint( int id ) const;
+- void setLinkRegionPoint( int id, const QPointF &point );
+-
+- private:
+- LinkAnnotation();
+- LinkAnnotation( const QDomNode &node );
+- LinkAnnotation( LinkAnnotationPrivate &dd );
+- virtual void store( QDomNode &parentNode, QDomDocument &document ) const;
+- Q_DECLARE_PRIVATE( LinkAnnotation )
+- Q_DISABLE_COPY( LinkAnnotation )
+-};
+-
+-/**
+- * \short Caret annotation.
+- *
+- * The caret annotation represents a symbol to indicate the presence of text.
+- */
+-class POPPLER_QT4_EXPORT CaretAnnotation : public Annotation
+-{
+- friend class AnnotationUtils;
+- friend class AnnotationPrivate;
+-
+- public:
+- CaretAnnotation();
+- virtual ~CaretAnnotation();
+- virtual SubType subType() const;
+-
+- /**
+- * The symbols for the caret annotation.
+- */
+- enum CaretSymbol { None, P };
+-
+- CaretSymbol caretSymbol() const;
+- void setCaretSymbol( CaretSymbol symbol );
+-
+- private:
+- CaretAnnotation( const QDomNode &node );
+- CaretAnnotation( CaretAnnotationPrivate &dd );
+- virtual void store( QDomNode &parentNode, QDomDocument &document ) const;
+- Q_DECLARE_PRIVATE( CaretAnnotation )
+- Q_DISABLE_COPY( CaretAnnotation )
+-};
+-
+-/**
+- * \short File attachment annotation.
+- *
+- * The file attachment annotation represents a file embedded in the document.
+- *
+- * \since 0.10
+- */
+-class POPPLER_QT4_EXPORT FileAttachmentAnnotation : public Annotation
+-{
+- friend class AnnotationPrivate;
+-
+- public:
+- virtual ~FileAttachmentAnnotation();
+- virtual SubType subType() const;
+-
+- /**
+- * Returns the name of the icon of this annotation.
+- */
+- QString fileIconName() const;
+- /**
+- * Sets a new name for the icon of this annotation.
+- */
+- void setFileIconName( const QString &icon );
+-
+- /**
+- * Returns the EmbeddedFile of this annotation.
+- */
+- EmbeddedFile* embeddedFile() const;
+- /**
+- * Sets a new EmbeddedFile for this annotation.
+- *
+- * \note FileAttachmentAnnotation takes ownership of the object
+- */
+- void setEmbeddedFile( EmbeddedFile *ef );
+-
+- private:
+- FileAttachmentAnnotation();
+- FileAttachmentAnnotation( const QDomNode &node );
+- FileAttachmentAnnotation( FileAttachmentAnnotationPrivate &dd );
+- virtual void store( QDomNode &parentNode, QDomDocument &document ) const;
+- Q_DECLARE_PRIVATE( FileAttachmentAnnotation )
+- Q_DISABLE_COPY( FileAttachmentAnnotation )
+-};
+-
+-/**
+- * \short Sound annotation.
+- *
+- * The sound annotation represents a sound to be played when activated.
+- *
+- * \since 0.10
+- */
+-class POPPLER_QT4_EXPORT SoundAnnotation : public Annotation
+-{
+- friend class AnnotationPrivate;
+-
+- public:
+- virtual ~SoundAnnotation();
+- virtual SubType subType() const;
+-
+- /**
+- * Returns the name of the icon of this annotation.
+- */
+- QString soundIconName() const;
+- /**
+- * Sets a new name for the icon of this annotation.
+- */
+- void setSoundIconName( const QString &icon );
+-
+- /**
+- * Returns the SoundObject of this annotation.
+- */
+- SoundObject* sound() const;
+- /**
+- * Sets a new SoundObject for this annotation.
+- *
+- * \note SoundAnnotation takes ownership of the object
+- */
+- void setSound( SoundObject *ef );
+-
+- private:
+- SoundAnnotation();
+- SoundAnnotation( const QDomNode &node );
+- SoundAnnotation( SoundAnnotationPrivate &dd );
+- virtual void store( QDomNode &parentNode, QDomDocument &document ) const;
+- Q_DECLARE_PRIVATE( SoundAnnotation )
+- Q_DISABLE_COPY( SoundAnnotation )
+-};
+-
+-/**
+- * \short Movie annotation.
+- *
+- * The movie annotation represents a movie to be played when activated.
+- *
+- * \since 0.10
+- */
+-class POPPLER_QT4_EXPORT MovieAnnotation : public Annotation
+-{
+- friend class AnnotationPrivate;
+-
+- public:
+- virtual ~MovieAnnotation();
+- virtual SubType subType() const;
+-
+- /**
+- * Returns the MovieObject of this annotation.
+- */
+- MovieObject* movie() const;
+- /**
+- * Sets a new MovieObject for this annotation.
+- *
+- * \note MovieAnnotation takes ownership of the object
+- */
+- void setMovie( MovieObject *movie );
+-
+- /**
+- * Returns the title of the movie of this annotation.
+- */
+- QString movieTitle() const;
+- /**
+- * Sets a new title for the movie of this annotation.
+- */
+- void setMovieTitle( const QString &title );
+-
+- private:
+- MovieAnnotation();
+- MovieAnnotation( const QDomNode &node );
+- MovieAnnotation( MovieAnnotationPrivate &dd );
+- virtual void store( QDomNode &parentNode, QDomDocument &document ) const;
+- Q_DECLARE_PRIVATE( MovieAnnotation )
+- Q_DISABLE_COPY( MovieAnnotation )
+-};
+-
+-/**
+- * \short Screen annotation.
+- *
+- * The screen annotation represents a screen to be played when activated.
+- *
+- * \since 0.20
+- */
+-class POPPLER_QT4_EXPORT ScreenAnnotation : public Annotation
+-{
+- friend class AnnotationPrivate;
+-
+- public:
+- virtual ~ScreenAnnotation();
+-
+- virtual SubType subType() const;
+-
+- /**
+- * Returns the LinkRendition of this annotation.
+- */
+- LinkRendition* action() const;
+-
+- /**
+- * Sets a new LinkRendition for this annotation.
+- *
+- * \note ScreenAnnotation takes ownership of the object
+- */
+- void setAction( LinkRendition *action );
+-
+- /**
+- * Returns the title of the screen of this annotation.
+- */
+- QString screenTitle() const;
+-
+- /**
+- * Sets a new title for the screen of this annotation.
+- */
+- void setScreenTitle( const QString &title );
+-
+- /**
+- * Returns the additional action of the given @p type fo the annotation or
+- * @c 0 if no action has been defined.
+- *
+- * \since 0.22
+- */
+- Link* additionalAction( AdditionalActionType type ) const;
+-
+- private:
+- ScreenAnnotation();
+- ScreenAnnotation( ScreenAnnotationPrivate &dd );
+- virtual void store( QDomNode &parentNode, QDomDocument &document ) const; // stub
+- Q_DECLARE_PRIVATE( ScreenAnnotation )
+- Q_DISABLE_COPY( ScreenAnnotation )
+-};
+-
+-/**
+- * \short Widget annotation.
+- *
+- * The widget annotation represents a widget (form field) on a page.
+- *
+- * \note This class is just provided for consistency of the annotation API,
+- * use the FormField classes to get all the form-related information.
+- *
+- * \since 0.22
+- */
+-class POPPLER_QT4_EXPORT WidgetAnnotation : public Annotation
+-{
+- friend class AnnotationPrivate;
+-
+- public:
+- virtual ~WidgetAnnotation();
+-
+- virtual SubType subType() const;
+-
+- /**
+- * Returns the additional action of the given @p type fo the annotation or
+- * @c 0 if no action has been defined.
+- *
+- * \since 0.22
+- */
+- Link* additionalAction( AdditionalActionType type ) const;
+-
+- private:
+- WidgetAnnotation();
+- WidgetAnnotation( WidgetAnnotationPrivate &dd );
+- virtual void store( QDomNode &parentNode, QDomDocument &document ) const; // stub
+- Q_DECLARE_PRIVATE( WidgetAnnotation )
+- Q_DISABLE_COPY( WidgetAnnotation )
+-};
+-
+-/**
+- * \short RichMedia annotation.
+- *
+- * The RichMedia annotation represents a video or sound on a page.
+- *
+- * \since 0.36
+- */
+-class POPPLER_QT4_EXPORT RichMediaAnnotation : public Annotation
+-{
+- friend class AnnotationPrivate;
+-
+- public:
+- virtual ~RichMediaAnnotation();
+-
+- virtual SubType subType() const;
+-
+- /**
+- * The params object of a RichMediaAnnotation::Instance object.
+- *
+- * The params object provides media specific parameters, to play
+- * back the media inside the PDF viewer.
+- *
+- * At the moment only parameters for flash player are supported.
+- */
+- class POPPLER_QT4_EXPORT Params
+- {
+- friend class AnnotationPrivate;
+-
+- public:
+- Params();
+- ~Params();
+-
+- /**
+- * Returns the parameters for the flash player.
+- */
+- QString flashVars() const;
+-
+- private:
+- void setFlashVars( const QString &flashVars );
+-
+- class Private;
+- QScopedPointer<Private> d;
+- };
+-
+- /**
+- * The instance object of a RichMediaAnnotation::Configuration object.
+- *
+- * The instance object represents one media object, that should be shown
+- * on the page. It has a media type and a Params object, to define the
+- * media specific parameters.
+- */
+- class POPPLER_QT4_EXPORT Instance
+- {
+- friend class AnnotationPrivate;
+-
+- public:
+- /**
+- * Describes the media type of the instance.
+- */
+- enum Type
+- {
+- Type3D, ///< A 3D media file.
+- TypeFlash, ///< A Flash media file.
+- TypeSound, ///< A sound media file.
+- TypeVideo ///< A video media file.
+- };
+-
+- Instance();
+- ~Instance();
+-
+- /**
+- * Returns the media type of the instance.
+- */
+- Type type() const;
+-
+- /**
+- * Returns the params object of the instance or @c 0 if it doesn't exist.
+- */
+- RichMediaAnnotation::Params* params() const;
+-
+- private:
+- void setType( Type type );
+- void setParams( RichMediaAnnotation::Params *params );
+-
+- class Private;
+- QScopedPointer<Private> d;
+- };
+-
+- /**
+- * The configuration object of a RichMediaAnnotation::Content object.
+- *
+- * The configuration object provides access to the various Instance objects
+- * of the rich media annotation.
+- */
+- class POPPLER_QT4_EXPORT Configuration
+- {
+- friend class AnnotationPrivate;
+-
+- public:
+- /**
+- * Describes the media type of the configuration.
+- */
+- enum Type
+- {
+- Type3D, ///< A 3D media file.
+- TypeFlash, ///< A Flash media file.
+- TypeSound, ///< A sound media file.
+- TypeVideo ///< A video media file.
+- };
+-
+- Configuration();
+- ~Configuration();
+-
+- /**
+- * Returns the media type of the configuration.
+- */
+- Type type() const;
+-
+- /**
+- * Returns the name of the configuration.
+- */
+- QString name() const;
+-
+- /**
+- * Returns the list of Instance objects of the configuration.
+- */
+- QList< RichMediaAnnotation::Instance* > instances() const;
+-
+- private:
+- void setType( Type type );
+- void setName( const QString &name );
+- void setInstances( const QList< RichMediaAnnotation::Instance* > &instances );
+-
+- class Private;
+- QScopedPointer<Private> d;
+- };
+-
+- /**
+- * The asset object of a RichMediaAnnotation::Content object.
+- *
+- * The asset object provides a mapping between identifier name, as
+- * used in the flash vars string of RichMediaAnnotation::Params, and the
+- * associated file spec object.
+- */
+- class POPPLER_QT4_EXPORT Asset
+- {
+- friend class AnnotationPrivate;
+-
+- public:
+- Asset();
+- ~Asset();
+-
+- /**
+- * Returns the identifier name of the asset.
+- */
+- QString name() const;
+-
+- /**
+- * Returns the embedded file the asset points to.
+- */
+- EmbeddedFile* embeddedFile() const;
+-
+- private:
+- void setName( const QString &name );
+- void setEmbeddedFile( EmbeddedFile *embeddedFile );
+-
+- class Private;
+- QScopedPointer<Private> d;
+- };
+-
+- /**
+- * The content object of a RichMediaAnnotation.
+- *
+- * The content object provides access to the list of configurations
+- * and assets of the rich media annotation.
+- */
+- class POPPLER_QT4_EXPORT Content
+- {
+- friend class AnnotationPrivate;
+-
+- public:
+- Content();
+- ~Content();
+-
+- /**
+- * Returns the list of configuration objects of the content object.
+- */
+- QList< RichMediaAnnotation::Configuration* > configurations() const;
+-
+- /**
+- * Returns the list of asset objects of the content object.
+- */
+- QList< RichMediaAnnotation::Asset* > assets() const;
+-
+- private:
+- void setConfigurations( const QList< RichMediaAnnotation::Configuration* > &configurations );
+- void setAssets( const QList< RichMediaAnnotation::Asset* > &assets );
+-
+- class Private;
+- QScopedPointer<Private> d;
+- };
+-
+- /**
+- * The activation object of the RichMediaAnnotation::Settings object.
+- *
+- * The activation object is a wrapper around the settings for the activation
+- * state. At the moment it provides only the activation condition.
+- */
+- class POPPLER_QT4_EXPORT Activation
+- {
+- friend class AnnotationPrivate;
+-
+- public:
+- /**
+- * Describes the condition for activating the rich media.
+- */
+- enum Condition {
+- PageOpened, ///< Activate when page is opened.
+- PageVisible, ///< Activate when page becomes visible.
+- UserAction ///< Activate when user interacts with the annotation.
+- };
+-
+- Activation();
+- ~Activation();
+-
+- /**
+- * Returns the activation condition.
+- */
+- Condition condition() const;
+-
+- private:
+- void setCondition( Condition condition );
+-
+- class Private;
+- QScopedPointer<Private> d;
+- };
+-
+- /**
+- * The deactivation object of the RichMediaAnnotation::Settings object.
+- *
+- * The deactivation object is a wrapper around the settings for the deactivation
+- * state. At the moment it provides only the deactivation condition.
+- */
+- class POPPLER_QT4_EXPORT Deactivation
+- {
+- friend class AnnotationPrivate;
+-
+- public:
+- /**
+- * Describes the condition for deactivating the rich media.
+- */
+- enum Condition {
+- PageClosed, ///< Deactivate when page is closed.
+- PageInvisible, ///< Deactivate when page becomes invisible.
+- UserAction ///< Deactivate when user interacts with the annotation.
+- };
+-
+- Deactivation();
+- ~Deactivation();
+-
+- /**
+- * Returns the deactivation condition.
+- */
+- Condition condition() const;
+-
+- private:
+- void setCondition( Condition condition );
+-
+- class Private;
+- QScopedPointer<Private> d;
+- };
+-
+- /**
+- * The settings object of a RichMediaAnnotation.
+- *
+- * The settings object provides access to the configuration objects
+- * for annotation activation and deactivation.
+- */
+- class POPPLER_QT4_EXPORT Settings
+- {
+- friend class AnnotationPrivate;
+-
+- public:
+- Settings();
+- ~Settings();
+-
+- /**
+- * Returns the Activation object of the settings object or @c 0 if it doesn't exist.
+- */
+- RichMediaAnnotation::Activation* activation() const;
+-
+- /**
+- * Returns the Deactivation object of the settings object or @c 0 if it doesn't exist.
+- */
+- RichMediaAnnotation::Deactivation* deactivation() const;
+-
+- private:
+- void setActivation( RichMediaAnnotation::Activation *activation );
+- void setDeactivation( RichMediaAnnotation::Deactivation *deactivation );
+-
+- class Private;
+- QScopedPointer<Private> d;
+- };
+-
+- /**
+- * Returns the Settings object of the rich media annotation or @c 0 if it doesn't exist.
+- */
+- RichMediaAnnotation::Settings* settings() const;
+-
+- /**
+- * Returns the Content object of the rich media annotation or @c 0 if it doesn't exist.
+- */
+- RichMediaAnnotation::Content* content() const;
+-
+- private:
+- void setSettings( RichMediaAnnotation::Settings *settings );
+- void setContent( RichMediaAnnotation::Content *content );
+-
+- RichMediaAnnotation();
+- RichMediaAnnotation( const QDomNode &node );
+- RichMediaAnnotation( RichMediaAnnotationPrivate &dd );
+- virtual void store( QDomNode &parentNode, QDomDocument &document ) const;
+- Q_DECLARE_PRIVATE( RichMediaAnnotation )
+- Q_DISABLE_COPY( RichMediaAnnotation )
+-};
+-
+-}
+-
+-#endif
+diff --git a/qt4/src/poppler-base-converter.cc b/qt4/src/poppler-base-converter.cc
+deleted file mode 100644
+index 11ff17ca..00000000
+--- a/qt4/src/poppler-base-converter.cc
++++ /dev/null
+@@ -1,105 +0,0 @@
+-/* poppler-base-converter.cc: qt interface to poppler
+- * Copyright (C) 2007, 2009, Albert Astals Cid <aacid@kde.org>
+- * Copyright (C) 2008, Pino Toscano <pino@kde.org>
+- *
+- * This program is free software; you can redistribute it and/or modify
+- * it under the terms of the GNU General Public License as published by
+- * the Free Software Foundation; either version 2, or (at your option)
+- * any later version.
+- *
+- * This program is distributed in the hope that it will be useful,
+- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+- * GNU General Public License for more details.
+- *
+- * You should have received a copy of the GNU General Public License
+- * along with this program; if not, write to the Free Software
+- * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+- */
+-
+-#include "poppler-qt4.h"
+-
+-#include "poppler-converter-private.h"
+-
+-#include <QtCore/QFile>
+-
+-namespace Poppler {
+-
+-BaseConverterPrivate::BaseConverterPrivate()
+- : document(0), iodev(0), ownIodev(true)
+-{
+-}
+-
+-BaseConverterPrivate::~BaseConverterPrivate()
+-{
+-}
+-
+-QIODevice* BaseConverterPrivate::openDevice()
+-{
+- if (!iodev)
+- {
+- Q_ASSERT(!outputFileName.isEmpty());
+- QFile *f = new QFile(outputFileName);
+- iodev = f;
+- ownIodev = true;
+- }
+- Q_ASSERT(iodev);
+- if (!iodev->isOpen())
+- {
+- if (!iodev->open(QIODevice::WriteOnly))
+- {
+- if (ownIodev)
+- {
+- delete iodev;
+- iodev = 0;
+- }
+- else
+- {
+- return 0;
+- }
+- }
+- }
+- return iodev;
+-}
+-
+-void BaseConverterPrivate::closeDevice()
+-{
+- if (ownIodev)
+- {
+- iodev->close();
+- delete iodev;
+- iodev = 0;
+- }
+-}
+-
+-
+-BaseConverter::BaseConverter(BaseConverterPrivate &dd)
+- : d_ptr(&dd)
+-{
+-}
+-
+-BaseConverter::~BaseConverter()
+-{
+- delete d_ptr;
+-}
+-
+-void BaseConverter::setOutputFileName(const QString &outputFileName)
+-{
+- Q_D(BaseConverter);
+- d->outputFileName = outputFileName;
+-}
+-
+-void BaseConverter::setOutputDevice(QIODevice *device)
+-{
+- Q_D(BaseConverter);
+- d->iodev = device;
+- d->ownIodev = false;
+-}
+-
+-BaseConverter::Error BaseConverter::lastError() const
+-{
+- Q_D(const BaseConverter);
+- return d->lastError;
+-}
+-
+-}
+diff --git a/qt4/src/poppler-converter-private.h b/qt4/src/poppler-converter-private.h
+deleted file mode 100644
+index dc3e9437..00000000
+--- a/qt4/src/poppler-converter-private.h
++++ /dev/null
+@@ -1,49 +0,0 @@
+-/* poppler-converter-private.h: Qt4 interface to poppler
+- * Copyright (C) 2007, 2009, Albert Astals Cid <aacid@kde.org>
+- * Copyright (C) 2008, Pino Toscano <pino@kde.org>
+- *
+- * This program is free software; you can redistribute it and/or modify
+- * it under the terms of the GNU General Public License as published by
+- * the Free Software Foundation; either version 2, or (at your option)
+- * any later version.
+- *
+- * This program is distributed in the hope that it will be useful,
+- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+- * GNU General Public License for more details.
+- *
+- * You should have received a copy of the GNU General Public License
+- * along with this program; if not, write to the Free Software
+- * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+- */
+-
+-#ifndef POPPLER_QT4_CONVERTER_PRIVATE_H
+-#define POPPLER_QT4_CONVERTER_PRIVATE_H
+-
+-#include <QtCore/QString>
+-
+-class QIODevice;
+-
+-namespace Poppler {
+-
+-class DocumentData;
+-
+-class BaseConverterPrivate
+-{
+- public:
+- BaseConverterPrivate();
+- virtual ~BaseConverterPrivate();
+-
+- QIODevice* openDevice();
+- void closeDevice();
+-
+- DocumentData *document;
+- QString outputFileName;
+- QIODevice *iodev;
+- bool ownIodev : 1;
+- BaseConverter::Error lastError;
+-};
+-
+-}
+-
+-#endif
+diff --git a/qt4/src/poppler-document.cc b/qt4/src/poppler-document.cc
+deleted file mode 100644
+index d6e2fbf7..00000000
+--- a/qt4/src/poppler-document.cc
++++ /dev/null
+@@ -1,850 +0,0 @@
+-/* poppler-document.cc: qt interface to poppler
+- * Copyright (C) 2005, Net Integration Technologies, Inc.
+- * Copyright (C) 2005, 2008, Brad Hards <bradh@frogmouth.net>
+- * Copyright (C) 2005-2010, 2012, 2013, 2015-2017, Albert Astals Cid <aacid@kde.org>
+- * Copyright (C) 2006-2010, Pino Toscano <pino@kde.org>
+- * Copyright (C) 2010, 2011 Hib Eris <hib@hiberis.nl>
+- * Copyright (C) 2012 Koji Otani <sho@bbr.jp>
+- * Copyright (C) 2012, 2013 Thomas Freitag <Thomas.Freitag@alfa.de>
+- * Copyright (C) 2012 Fabio D'Urso <fabiodurso@hotmail.it>
+- * Copyright (C) 2014 Adam Reichold <adamreichold@myopera.com>
+- * Copyright (C) 2015 William Bader <williambader@hotmail.com>
+- * Copyright (C) 2016 Jakub Alba <jakubalba@gmail.com>
+- * Copyright (C) 2017 Adrian Johnson <ajohnson@redneon.com>
+- *
+- * This program is free software; you can redistribute it and/or modify
+- * it under the terms of the GNU General Public License as published by
+- * the Free Software Foundation; either version 2, or (at your option)
+- * any later version.
+- *
+- * This program is distributed in the hope that it will be useful,
+- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+- * GNU General Public License for more details.
+- *
+- * You should have received a copy of the GNU General Public License
+- * along with this program; if not, write to the Free Software
+- * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+- */
+-
+-#include "poppler-qt4.h"
+-
+-#include <config.h>
+-#include <ErrorCodes.h>
+-#include <GlobalParams.h>
+-#include <Outline.h>
+-#include <PDFDoc.h>
+-#include <Stream.h>
+-#include <Catalog.h>
+-#include <ViewerPreferences.h>
+-#include <DateInfo.h>
+-#include <GfxState.h>
+-
+-#include <QtCore/QDebug>
+-#include <QtCore/QFile>
+-#include <QtCore/QByteArray>
+-
+-#include "poppler-private.h"
+-#include "poppler-page-private.h"
+-
+-#if defined(USE_CMS)
+-#if defined(USE_LCMS1)
+-#include <lcms.h>
+-#else
+-#include <lcms2.h>
+-#endif
+-#endif
+-
+-namespace Poppler {
+-
+- int DocumentData::count = 0;
+-
+- Document *Document::load(const QString &filePath, const QByteArray &ownerPassword,
+- const QByteArray &userPassword)
+- {
+- DocumentData *doc = new DocumentData(filePath,
+- new GooString(ownerPassword.data()),
+- new GooString(userPassword.data()));
+- return DocumentData::checkDocument(doc);
+- }
+-
+- Document *Document::loadFromData(const QByteArray &fileContents,
+- const QByteArray &ownerPassword,
+- const QByteArray &userPassword)
+- {
+- // create stream
+- DocumentData *doc = new DocumentData(fileContents,
+- new GooString(ownerPassword.data()),
+- new GooString(userPassword.data()));
+- return DocumentData::checkDocument(doc);
+- }
+-
+- Document *DocumentData::checkDocument(DocumentData *doc)
+- {
+- Document *pdoc;
+- if (doc->doc->isOk() || doc->doc->getErrorCode() == errEncrypted) {
+- pdoc = new Document(doc);
+- if (doc->doc->getErrorCode() == errEncrypted)
+- pdoc->m_doc->locked = true;
+- else
+- {
+- pdoc->m_doc->locked = false;
+- pdoc->m_doc->fillMembers();
+- }
+- return pdoc;
+- }
+- else
+- {
+- delete doc;
+- }
+- return NULL;
+- }
+-
+- Document::Document(DocumentData *dataA)
+- {
+- m_doc = dataA;
+- }
+-
+- Document::~Document()
+- {
+- delete m_doc;
+- }
+-
+- Page *Document::page(int index) const
+- {
+- Page *page = new Page(m_doc, index);
+- if (page->m_page->page == NULL) {
+- delete page;
+- return NULL;
+- }
+-
+- return page;
+- }
+-
+- bool Document::isLocked() const
+- {
+- return m_doc->locked;
+- }
+-
+- bool Document::unlock(const QByteArray &ownerPassword,
+- const QByteArray &userPassword)
+- {
+- if (m_doc->locked) {
+- /* racier then it needs to be */
+- DocumentData *doc2;
+- if (!m_doc->fileContents.isEmpty())
+- {
+- doc2 = new DocumentData(m_doc->fileContents,
+- new GooString(ownerPassword.data()),
+- new GooString(userPassword.data()));
+- }
+- else
+- {
+- doc2 = new DocumentData(m_doc->m_filePath,
+- new GooString(ownerPassword.data()),
+- new GooString(userPassword.data()));
+- }
+- if (!doc2->doc->isOk()) {
+- delete doc2;
+- } else {
+- delete m_doc;
+- m_doc = doc2;
+- m_doc->locked = false;
+- m_doc->fillMembers();
+- }
+- }
+- return m_doc->locked;
+- }
+-
+- Document::PageMode Document::pageMode() const
+- {
+- switch (m_doc->doc->getCatalog()->getPageMode()) {
+- case Catalog::pageModeNone:
+- return UseNone;
+- case Catalog::pageModeOutlines:
+- return UseOutlines;
+- case Catalog::pageModeThumbs:
+- return UseThumbs;
+- case Catalog::pageModeFullScreen:
+- return FullScreen;
+- case Catalog::pageModeOC:
+- return UseOC;
+- case Catalog::pageModeAttach:
+- return UseAttach;
+- default:
+- return UseNone;
+- }
+- }
+-
+- Document::PageLayout Document::pageLayout() const
+- {
+- switch (m_doc->doc->getCatalog()->getPageLayout()) {
+- case Catalog::pageLayoutNone:
+- return NoLayout;
+- case Catalog::pageLayoutSinglePage:
+- return SinglePage;
+- case Catalog::pageLayoutOneColumn:
+- return OneColumn;
+- case Catalog::pageLayoutTwoColumnLeft:
+- return TwoColumnLeft;
+- case Catalog::pageLayoutTwoColumnRight:
+- return TwoColumnRight;
+- case Catalog::pageLayoutTwoPageLeft:
+- return TwoPageLeft;
+- case Catalog::pageLayoutTwoPageRight:
+- return TwoPageRight;
+- default:
+- return NoLayout;
+- }
+- }
+-
+- Qt::LayoutDirection Document::textDirection() const
+- {
+- if (!m_doc->doc->getCatalog()->getViewerPreferences())
+- return Qt::LayoutDirectionAuto;
+-
+- switch (m_doc->doc->getCatalog()->getViewerPreferences()->getDirection()) {
+- case ViewerPreferences::directionL2R:
+- return Qt::LeftToRight;
+- case ViewerPreferences::directionR2L:
+- return Qt::RightToLeft;
+- default:
+- return Qt::LayoutDirectionAuto;
+- }
+- }
+-
+- int Document::numPages() const
+- {
+- return m_doc->doc->getNumPages();
+- }
+-
+- QList<FontInfo> Document::fonts() const
+- {
+- QList<FontInfo> ourList;
+- FontIterator it( 0, m_doc );
+- while ( it.hasNext() )
+- {
+- ourList += it.next();
+- }
+- return ourList;
+- }
+-
+- QList<EmbeddedFile*> Document::embeddedFiles() const
+- {
+- return m_doc->m_embeddedFiles;
+- }
+-
+- bool Document::scanForFonts( int numPages, QList<FontInfo> *fontList ) const
+- {
+- if ( !m_doc->m_fontInfoIterator )
+- return false;
+- if ( !m_doc->m_fontInfoIterator->hasNext() )
+- return false;
+- while ( m_doc->m_fontInfoIterator->hasNext() && numPages )
+- {
+- (*fontList) += m_doc->m_fontInfoIterator->next();
+- --numPages;
+- }
+- return true;
+- }
+-
+- FontIterator* Document::newFontIterator( int startPage ) const
+- {
+- return new FontIterator( startPage, m_doc );
+- }
+-
+- QByteArray Document::fontData(const FontInfo &fi) const
+- {
+- QByteArray result;
+- if (fi.isEmbedded())
+- {
+- XRef *xref = m_doc->doc->getXRef()->copy();
+-
+- Object refObj(fi.m_data->embRef.num, fi.m_data->embRef.gen);
+- Object strObj = refObj.fetch(xref);
+- if (strObj.isStream())
+- {
+- int c;
+- strObj.streamReset();
+- while ((c = strObj.streamGetChar()) != EOF)
+- {
+- result.append((char)c);
+- }
+- strObj.streamClose();
+- }
+- delete xref;
+- }
+- return result;
+- }
+-
+- QString Document::info( const QString & type ) const
+- {
+- if (m_doc->locked) {
+- return QString();
+- }
+-
+- QScopedPointer<GooString> goo(m_doc->doc->getDocInfoStringEntry(type.toLatin1().constData()));
+- return UnicodeParsedString(goo.data());
+- }
+-
+- bool Document::setInfo( const QString & key, const QString & val )
+- {
+- if (m_doc->locked) {
+- return false;
+- }
+-
+- GooString *goo = QStringToUnicodeGooString(val);
+- m_doc->doc->setDocInfoStringEntry(key.toLatin1().constData(), goo);
+- return true;
+- }
+-
+- QString Document::title() const
+- {
+- if (m_doc->locked) {
+- return QString();
+- }
+-
+- QScopedPointer<GooString> goo(m_doc->doc->getDocInfoTitle());
+- return UnicodeParsedString(goo.data());
+- }
+-
+- bool Document::setTitle( const QString & val )
+- {
+- if (m_doc->locked) {
+- return false;
+- }
+-
+- m_doc->doc->setDocInfoTitle(QStringToUnicodeGooString(val));
+- return true;
+- }
+-
+- QString Document::author() const
+- {
+- if (m_doc->locked) {
+- return QString();
+- }
+-
+- QScopedPointer<GooString> goo(m_doc->doc->getDocInfoAuthor());
+- return UnicodeParsedString(goo.data());
+- }
+-
+- bool Document::setAuthor( const QString & val )
+- {
+- if (m_doc->locked) {
+- return false;
+- }
+-
+- m_doc->doc->setDocInfoAuthor(QStringToUnicodeGooString(val));
+- return true;
+- }
+-
+- QString Document::subject() const
+- {
+- if (m_doc->locked) {
+- return QString();
+- }
+-
+- QScopedPointer<GooString> goo(m_doc->doc->getDocInfoSubject());
+- return UnicodeParsedString(goo.data());
+- }
+-
+- bool Document::setSubject( const QString & val )
+- {
+- if (m_doc->locked) {
+- return false;
+- }
+-
+- m_doc->doc->setDocInfoSubject(QStringToUnicodeGooString(val));
+- return true;
+- }
+-
+- QString Document::keywords() const
+- {
+- if (m_doc->locked) {
+- return QString();
+- }
+-
+- QScopedPointer<GooString> goo(m_doc->doc->getDocInfoKeywords());
+- return UnicodeParsedString(goo.data());
+- }
+-
+- bool Document::setKeywords( const QString & val )
+- {
+- if (m_doc->locked) {
+- return false;
+- }
+-
+- m_doc->doc->setDocInfoKeywords(QStringToUnicodeGooString(val));
+- return true;
+- }
+-
+- QString Document::creator() const
+- {
+- if (m_doc->locked) {
+- return QString();
+- }
+-
+- QScopedPointer<GooString> goo(m_doc->doc->getDocInfoCreator());
+- return UnicodeParsedString(goo.data());
+- }
+-
+- bool Document::setCreator( const QString & val )
+- {
+- if (m_doc->locked) {
+- return false;
+- }
+-
+- m_doc->doc->setDocInfoCreator(QStringToUnicodeGooString(val));
+- return true;
+- }
+-
+- QString Document::producer() const
+- {
+- if (m_doc->locked) {
+- return QString();
+- }
+-
+- QScopedPointer<GooString> goo(m_doc->doc->getDocInfoProducer());
+- return UnicodeParsedString(goo.data());
+- }
+-
+- bool Document::setProducer( const QString & val )
+- {
+- if (m_doc->locked) {
+- return false;
+- }
+-
+- m_doc->doc->setDocInfoProducer(QStringToUnicodeGooString(val));
+- return true;
+- }
+-
+- bool Document::removeInfo()
+- {
+- if (m_doc->locked) {
+- return false;
+- }
+-
+- m_doc->doc->removeDocInfo();
+- return true;
+- }
+-
+- QStringList Document::infoKeys() const
+- {
+- QStringList keys;
+-
+- if ( m_doc->locked )
+- return QStringList();
+-
+- QScopedPointer<XRef> xref(m_doc->doc->getXRef()->copy());
+- if (!xref)
+- return QStringList();
+- Object info = xref->getDocInfo();
+- if ( !info.isDict() )
+- return QStringList();
+-
+- Dict *infoDict = info.getDict();
+- // somehow iterate over keys in infoDict
+- keys.reserve( infoDict->getLength() );
+- for( int i=0; i < infoDict->getLength(); ++i ) {
+- keys.append( QString::fromAscii(infoDict->getKey(i)) );
+- }
+-
+- return keys;
+- }
+-
+- QDateTime Document::date( const QString & type ) const
+- {
+- if (m_doc->locked) {
+- return QDateTime();
+- }
+-
+- QScopedPointer<GooString> goo(m_doc->doc->getDocInfoStringEntry(type.toLatin1().constData()));
+- QString str = UnicodeParsedString(goo.data());
+- return Poppler::convertDate(str.toLatin1().data());
+- }
+-
+- bool Document::setDate( const QString & key, const QDateTime & val )
+- {
+- if (m_doc->locked) {
+- return false;
+- }
+-
+- m_doc->doc->setDocInfoStringEntry(key.toLatin1().constData(), QDateTimeToUnicodeGooString(val));
+- return true;
+- }
+-
+- QDateTime Document::creationDate() const
+- {
+- if (m_doc->locked) {
+- return QDateTime();
+- }
+-
+- QScopedPointer<GooString> goo(m_doc->doc->getDocInfoCreatDate());
+- QString str = UnicodeParsedString(goo.data());
+- return Poppler::convertDate(str.toLatin1().data());
+- }
+-
+- bool Document::setCreationDate( const QDateTime & val )
+- {
+- if (m_doc->locked) {
+- return false;
+- }
+-
+- m_doc->doc->setDocInfoCreatDate(QDateTimeToUnicodeGooString(val));
+- return true;
+- }
+-
+- QDateTime Document::modificationDate() const
+- {
+- if (m_doc->locked) {
+- return QDateTime();
+- }
+-
+- QScopedPointer<GooString> goo(m_doc->doc->getDocInfoModDate());
+- QString str = UnicodeParsedString(goo.data());
+- return Poppler::convertDate(str.toLatin1().data());
+- }
+-
+- bool Document::setModificationDate( const QDateTime & val )
+- {
+- if (m_doc->locked) {
+- return false;
+- }
+-
+- m_doc->doc->setDocInfoModDate(QDateTimeToUnicodeGooString(val));
+- return true;
+- }
+-
+- bool Document::isEncrypted() const
+- {
+- return m_doc->doc->isEncrypted();
+- }
+-
+- bool Document::isLinearized() const
+- {
+- return m_doc->doc->isLinearized();
+- }
+-
+- bool Document::okToPrint() const
+- {
+- return m_doc->doc->okToPrint();
+- }
+-
+- bool Document::okToPrintHighRes() const
+- {
+- return m_doc->doc->okToPrintHighRes();
+- }
+-
+- bool Document::okToChange() const
+- {
+- return m_doc->doc->okToChange();
+- }
+-
+- bool Document::okToCopy() const
+- {
+- return m_doc->doc->okToCopy();
+- }
+-
+- bool Document::okToAddNotes() const
+- {
+- return m_doc->doc->okToAddNotes();
+- }
+-
+- bool Document::okToFillForm() const
+- {
+- return m_doc->doc->okToFillForm();
+- }
+-
+- bool Document::okToCreateFormFields() const
+- {
+- return ( okToFillForm() && okToChange() );
+- }
+-
+- bool Document::okToExtractForAccessibility() const
+- {
+- return m_doc->doc->okToAccessibility();
+- }
+-
+- bool Document::okToAssemble() const
+- {
+- return m_doc->doc->okToAssemble();
+- }
+-
+- double Document::pdfVersion() const
+- {
+- return m_doc->doc->getPDFMajorVersion () + m_doc->doc->getPDFMinorVersion() / 10.0;
+- }
+-
+- void Document::getPdfVersion(int *major, int *minor) const
+- {
+- if (major)
+- *major = m_doc->doc->getPDFMajorVersion();
+- if (minor)
+- *minor = m_doc->doc->getPDFMinorVersion();
+- }
+-
+- Page *Document::page(const QString &label) const
+- {
+- GooString label_g(label.toAscii().data());
+- int index;
+-
+- if (!m_doc->doc->getCatalog()->labelToIndex (&label_g, &index))
+- return NULL;
+-
+- return page(index);
+- }
+-
+- bool Document::hasEmbeddedFiles() const
+- {
+- return (!(0 == m_doc->doc->getCatalog()->numEmbeddedFiles()));
+- }
+-
+- QDomDocument *Document::toc() const
+- {
+- Outline * outline = m_doc->doc->getOutline();
+- if ( !outline )
+- return NULL;
+-
+- GooList * items = outline->getItems();
+- if ( !items || items->getLength() < 1 )
+- return NULL;
+-
+- QDomDocument *toc = new QDomDocument();
+- if ( items->getLength() > 0 )
+- m_doc->addTocChildren( toc, toc, items );
+-
+- return toc;
+- }
+-
+- LinkDestination *Document::linkDestination( const QString &name )
+- {
+- GooString * namedDest = QStringToGooString( name );
+- LinkDestinationData ldd(NULL, namedDest, m_doc, false);
+- LinkDestination *ld = new LinkDestination(ldd);
+- delete namedDest;
+- return ld;
+- }
+-
+- void Document::setPaperColor(const QColor &color)
+- {
+- m_doc->setPaperColor(color);
+- }
+-
+- void Document::setColorDisplayProfile(void* outputProfileA)
+- {
+-#if defined(USE_CMS)
+- GfxColorSpace::setDisplayProfile((cmsHPROFILE)outputProfileA);
+-#else
+- Q_UNUSED(outputProfileA);
+-#endif
+- }
+-
+- void Document::setColorDisplayProfileName(const QString &name)
+- {
+-#if defined(USE_CMS)
+- GooString *profileName = QStringToGooString( name );
+- GfxColorSpace::setDisplayProfileName(profileName);
+- delete profileName;
+-#else
+- Q_UNUSED(name);
+-#endif
+- }
+-
+- void* Document::colorRgbProfile() const
+- {
+-#if defined(USE_CMS)
+- return (void*)GfxColorSpace::getRGBProfile();
+-#else
+- return NULL;
+-#endif
+- }
+-
+- void* Document::colorDisplayProfile() const
+- {
+-#if defined(USE_CMS)
+- return (void*)GfxColorSpace::getDisplayProfile();
+-#else
+- return NULL;
+-#endif
+- }
+-
+- QColor Document::paperColor() const
+- {
+- return m_doc->paperColor;
+- }
+-
+- void Document::setRenderBackend( Document::RenderBackend backend )
+- {
+- // no need to delete the outputdev as for the moment we always create a splash one
+- // as the arthur one does not allow "precaching" due to it's signature
+- // delete m_doc->m_outputDev;
+- // m_doc->m_outputDev = NULL;
+- m_doc->m_backend = backend;
+- }
+-
+- Document::RenderBackend Document::renderBackend() const
+- {
+- return m_doc->m_backend;
+- }
+-
+- QSet<Document::RenderBackend> Document::availableRenderBackends()
+- {
+- QSet<Document::RenderBackend> ret;
+-#if defined(HAVE_SPLASH)
+- ret << Document::SplashBackend;
+-#endif
+- ret << Document::ArthurBackend;
+- return ret;
+- }
+-
+- void Document::setRenderHint( Document::RenderHint hint, bool on )
+- {
+- const bool touchesOverprinting = hint & Document::OverprintPreview;
+-
+- int hintForOperation = hint;
+- if (touchesOverprinting && !isOverprintPreviewAvailable())
+- hintForOperation = hintForOperation & ~(int)Document::OverprintPreview;
+-
+- if ( on )
+- m_doc->m_hints |= hintForOperation;
+- else
+- m_doc->m_hints &= ~hintForOperation;
+-
+- }
+-
+- Document::RenderHints Document::renderHints() const
+- {
+- return Document::RenderHints( m_doc->m_hints );
+- }
+-
+- PSConverter *Document::psConverter() const
+- {
+- return new PSConverter(m_doc);
+- }
+-
+- PDFConverter *Document::pdfConverter() const
+- {
+- return new PDFConverter(m_doc);
+- }
+-
+- QString Document::metadata() const
+- {
+- QString result;
+- Catalog *catalog = m_doc->doc->getCatalog();
+- if (catalog && catalog->isOk())
+- {
+- GooString *s = catalog->readMetadata();
+- if (s) result = UnicodeParsedString(s);
+- delete s;
+- }
+- return result;
+- }
+-
+- bool Document::hasOptionalContent() const
+- {
+- return ( m_doc->doc->getOptContentConfig() && m_doc->doc->getOptContentConfig()->hasOCGs() );
+- }
+-
+- OptContentModel *Document::optionalContentModel()
+- {
+- if (m_doc->m_optContentModel.isNull()) {
+- m_doc->m_optContentModel = new OptContentModel(m_doc->doc->getOptContentConfig(), 0);
+- }
+- return (OptContentModel *)m_doc->m_optContentModel;
+- }
+-
+- QStringList Document::scripts() const
+- {
+- Catalog *catalog = m_doc->doc->getCatalog();
+- const int numScripts = catalog->numJS();
+- QStringList scripts;
+- for (int i = 0; i < numScripts; ++i) {
+- GooString *s = catalog->getJS(i);
+- if (s) {
+- scripts.append(UnicodeParsedString(s));
+- delete s;
+- }
+- }
+- return scripts;
+- }
+-
+- bool Document::getPdfId(QByteArray *permanentId, QByteArray *updateId) const
+- {
+- GooString gooPermanentId;
+- GooString gooUpdateId;
+-
+- if (!m_doc->doc->getID(permanentId ? &gooPermanentId : 0, updateId ? &gooUpdateId : 0))
+- return false;
+-
+- if (permanentId)
+- *permanentId = gooPermanentId.getCString();
+- if (updateId)
+- *updateId = gooUpdateId.getCString();
+-
+- return true;
+- }
+-
+- Document::FormType Document::formType() const
+- {
+- switch ( m_doc->doc->getCatalog()->getFormType() )
+- {
+- case Catalog::NoForm:
+- return Document::NoForm;
+- case Catalog::AcroForm:
+- return Document::AcroForm;
+- case Catalog::XfaForm:
+- return Document::XfaForm;
+- }
+-
+- return Document::NoForm; // make gcc happy
+- }
+-
+- QDateTime convertDate( char *dateString )
+- {
+- int year, mon, day, hour, min, sec, tzHours, tzMins;
+- char tz;
+-
+- if ( parseDateString( dateString, &year, &mon, &day, &hour, &min, &sec, &tz, &tzHours, &tzMins ) )
+- {
+- QDate d( year, mon, day );
+- QTime t( hour, min, sec );
+- if ( d.isValid() && t.isValid() ) {
+- QDateTime dt( d, t, Qt::UTC );
+- if ( tz ) {
+- // then we have some form of timezone
+- if ( 'Z' == tz ) {
+- // We are already at UTC
+- } else if ( '+' == tz ) {
+- // local time is ahead of UTC
+- dt = dt.addSecs(-1*((tzHours*60)+tzMins)*60);
+- } else if ( '-' == tz ) {
+- // local time is behind UTC
+- dt = dt.addSecs(((tzHours*60)+tzMins)*60);
+- } else {
+- qWarning("unexpected tz val");
+- }
+- }
+- return dt;
+- }
+- }
+- return QDateTime();
+- }
+-
+- bool isCmsAvailable()
+- {
+-#if defined(USE_CMS)
+- return true;
+-#else
+- return false;
+-#endif
+- }
+-
+- bool isOverprintPreviewAvailable() {
+-#ifdef SPLASH_CMYK
+- return true;
+-#else
+- return false;
+-#endif
+- }
+-
+-}
+diff --git a/qt4/src/poppler-embeddedfile-private.h b/qt4/src/poppler-embeddedfile-private.h
+deleted file mode 100644
+index 83549dad..00000000
+--- a/qt4/src/poppler-embeddedfile-private.h
++++ /dev/null
+@@ -1,42 +0,0 @@
+-/* poppler-embeddedfile-private.h: Qt4 interface to poppler
+- * Copyright (C) 2005, 2008, 2009, 2012, Albert Astals Cid <aacid@kde.org>
+- * Copyright (C) 2005, Brad Hards <bradh@frogmouth.net>
+- * Copyright (C) 2008, 2011, Pino Toscano <pino@kde.org>
+- *
+- * This program is free software; you can redistribute it and/or modify
+- * it under the terms of the GNU General Public License as published by
+- * the Free Software Foundation; either version 2, or (at your option)
+- * any later version.
+- *
+- * This program is distributed in the hope that it will be useful,
+- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+- * GNU General Public License for more details.
+- *
+- * You should have received a copy of the GNU General Public License
+- * along with this program; if not, write to the Free Software
+- * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+- */
+-
+-#ifndef POPPLER_EMBEDDEDFILE_PRIVATE_H
+-#define POPPLER_EMBEDDEDFILE_PRIVATE_H
+-
+-class FileSpec;
+-
+-namespace Poppler
+-{
+-
+-class EmbeddedFileData
+-{
+-public:
+- EmbeddedFileData(FileSpec *fs);
+- ~EmbeddedFileData();
+-
+- EmbFile *embFile() const;
+-
+- FileSpec *filespec;
+-};
+-
+-}
+-
+-#endif
+diff --git a/qt4/src/poppler-embeddedfile.cc b/qt4/src/poppler-embeddedfile.cc
+deleted file mode 100644
+index f70573ac..00000000
+--- a/qt4/src/poppler-embeddedfile.cc
++++ /dev/null
+@@ -1,135 +0,0 @@
+-/* poppler-document.cc: qt interface to poppler
+- * Copyright (C) 2005, 2008, 2009, 2012, 2013, Albert Astals Cid <aacid@kde.org>
+- * Copyright (C) 2005, Brad Hards <bradh@frogmouth.net>
+- * Copyright (C) 2008, 2011, Pino Toscano <pino@kde.org>
+- *
+- * This program is free software; you can redistribute it and/or modify
+- * it under the terms of the GNU General Public License as published by
+- * the Free Software Foundation; either version 2, or (at your option)
+- * any later version.
+- *
+- * This program is distributed in the hope that it will be useful,
+- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+- * GNU General Public License for more details.
+- *
+- * You should have received a copy of the GNU General Public License
+- * along with this program; if not, write to the Free Software
+- * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+- */
+-
+-#include "poppler-qt4.h"
+-
+-#include <QtCore/QString>
+-#include <QtCore/QDateTime>
+-
+-#include "Object.h"
+-#include "Stream.h"
+-#include "Catalog.h"
+-#include "FileSpec.h"
+-
+-#include "poppler-private.h"
+-#include "poppler-embeddedfile-private.h"
+-
+-namespace Poppler
+-{
+-
+-EmbeddedFileData::EmbeddedFileData(FileSpec *fs)
+- : filespec(fs)
+-{
+-}
+-
+-EmbeddedFileData::~EmbeddedFileData()
+-{
+- delete filespec;
+-}
+-
+-EmbFile *EmbeddedFileData::embFile() const
+-{
+- return filespec->isOk() ? filespec->getEmbeddedFile() : NULL;
+-}
+-
+-
+-EmbeddedFile::EmbeddedFile(EmbFile *embfile)
+- : m_embeddedFile(0)
+-{
+- assert(!"You must not use this private constructor!");
+-}
+-
+-EmbeddedFile::EmbeddedFile(EmbeddedFileData &dd)
+- : m_embeddedFile(&dd)
+-{
+-}
+-
+-EmbeddedFile::~EmbeddedFile()
+-{
+- delete m_embeddedFile;
+-}
+-
+-QString EmbeddedFile::name() const
+-{
+- GooString *goo = m_embeddedFile->filespec->getFileName();
+- return goo ? UnicodeParsedString(goo) : QString();
+-}
+-
+-QString EmbeddedFile::description() const
+-{
+- GooString *goo = m_embeddedFile->filespec->getDescription();
+- return goo ? UnicodeParsedString(goo) : QString();
+-}
+-
+-int EmbeddedFile::size() const
+-{
+- return m_embeddedFile->embFile() ? m_embeddedFile->embFile()->size() : -1;
+-}
+-
+-QDateTime EmbeddedFile::modDate() const
+-{
+- GooString *goo = m_embeddedFile->embFile() ? m_embeddedFile->embFile()->modDate() : NULL;
+- return goo ? convertDate(goo->getCString()) : QDateTime();
+-}
+-
+-QDateTime EmbeddedFile::createDate() const
+-{
+- GooString *goo = m_embeddedFile->embFile() ? m_embeddedFile->embFile()->createDate() : NULL;
+- return goo ? convertDate(goo->getCString()) : QDateTime();
+-}
+-
+-QByteArray EmbeddedFile::checksum() const
+-{
+- GooString *goo = m_embeddedFile->embFile() ? m_embeddedFile->embFile()->checksum() : NULL;
+- return goo ? QByteArray::fromRawData(goo->getCString(), goo->getLength()) : QByteArray();
+-}
+-
+-QString EmbeddedFile::mimeType() const
+-{
+- GooString *goo = m_embeddedFile->embFile() ? m_embeddedFile->embFile()->mimeType() : NULL;
+- return goo ? QString(goo->getCString()) : QString();
+-}
+-
+-QByteArray EmbeddedFile::data()
+-{
+- if (!isValid())
+- return QByteArray();
+- Stream *stream = m_embeddedFile->embFile() ? m_embeddedFile->embFile()->stream() : NULL;
+- if (!stream)
+- return QByteArray();
+-
+- stream->reset();
+- int dataLen = 0;
+- QByteArray fileArray;
+- int i;
+- while ( (i = stream->getChar()) != EOF) {
+- fileArray[dataLen] = (char)i;
+- ++dataLen;
+- }
+- fileArray.resize(dataLen);
+- return fileArray;
+-}
+-
+-bool EmbeddedFile::isValid() const
+-{
+- return m_embeddedFile->filespec->isOk();
+-}
+-
+-}
+diff --git a/qt4/src/poppler-export.h b/qt4/src/poppler-export.h
+deleted file mode 100644
+index 2e2f6ff8..00000000
+--- a/qt4/src/poppler-export.h
++++ /dev/null
+@@ -1,20 +0,0 @@
+-/*
+-* This file is used to set the poppler_qt4_EXPORT macros right.
+-* This is needed for setting the visibility on windows, it will have no effect on other platforms.
+-*/
+-#if defined(_WIN32)
+-# define _POPPLER_QT4_LIB_EXPORT __declspec(dllexport)
+-# define _POPPLER_QT4_LIB_IMPORT __declspec(dllimport)
+-#elif defined(__GNUC__)
+-# define _POPPLER_QT4_LIB_EXPORT __attribute__((visibility("default")))
+-# define _POPPLER_QT4_LIB_IMPORT
+-#else
+-# define _POPPLER_QT4_LIB_EXPORT
+-# define _POPPLER_QT4_LIB_IMPORT
+-#endif
+-
+-#ifdef poppler_qt4_EXPORTS
+-# define POPPLER_QT4_EXPORT _POPPLER_QT4_LIB_EXPORT
+-#else
+-# define POPPLER_QT4_EXPORT _POPPLER_QT4_LIB_IMPORT
+-#endif
+diff --git a/qt4/src/poppler-fontinfo.cc b/qt4/src/poppler-fontinfo.cc
+deleted file mode 100644
+index 5bb9e3a8..00000000
+--- a/qt4/src/poppler-fontinfo.cc
++++ /dev/null
+@@ -1,150 +0,0 @@
+-/* poppler-qt.h: qt interface to poppler
+- * Copyright (C) 2005, Net Integration Technologies, Inc.
+- * Copyright (C) 2005, Tobias Koening <tokoe@kde.org>
+- * Copyright (C) 2005, Brad Hards <bradh@frogmouth.net>
+- * Copyright (C) 2005-2008, 2015, Albert Astals Cid <aacid@kde.org>
+- * Copyright (C) 2008, 2009, Pino Toscano <pino@kde.org>
+- *
+- * This program is free software; you can redistribute it and/or modify
+- * it under the terms of the GNU General Public License as published by
+- * the Free Software Foundation; either version 2, or (at your option)
+- * any later version.
+- *
+- * This program is distributed in the hope that it will be useful,
+- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+- * GNU General Public License for more details.
+- *
+- * You should have received a copy of the GNU General Public License
+- * along with this program; if not, write to the Free Software
+- * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+- */
+-
+-#include "poppler-qt4.h"
+-#include "poppler-private.h"
+-
+-namespace Poppler {
+-
+-FontInfo::FontInfo()
+-{
+- m_data = new FontInfoData();
+-}
+-
+-FontInfo::FontInfo( const FontInfoData &fid )
+-{
+- m_data = new FontInfoData(fid);
+-}
+-
+-FontInfo::FontInfo( const FontInfo &fi )
+-{
+- m_data = new FontInfoData(*fi.m_data);
+-}
+-
+-FontInfo::~FontInfo()
+-{
+- delete m_data;
+-}
+-
+-QString FontInfo::name() const
+-{
+- return m_data->fontName;
+-}
+-
+-QString FontInfo::file() const
+-{
+- return m_data->fontFile;
+-}
+-
+-bool FontInfo::isEmbedded() const
+-{
+- return m_data->isEmbedded;
+-}
+-
+-bool FontInfo::isSubset() const
+-{
+- return m_data->isSubset;
+-}
+-
+-FontInfo::Type FontInfo::type() const
+-{
+- return m_data->type;
+-}
+-
+-QString FontInfo::typeName() const
+-{
+- switch (type()) {
+- case unknown:
+- return QObject::tr("unknown");
+- case Type1:
+- return QObject::tr("Type 1");
+- case Type1C:
+- return QObject::tr("Type 1C");
+- case Type3:
+- return QObject::tr("Type 3");
+- case TrueType:
+- return QObject::tr("TrueType");
+- case CIDType0:
+- return QObject::tr("CID Type 0");
+- case CIDType0C:
+- return QObject::tr("CID Type 0C");
+- case CIDTrueType:
+- return QObject::tr("CID TrueType");
+- case Type1COT:
+- return QObject::tr("Type 1C (OpenType)");
+- case TrueTypeOT:
+- return QObject::tr("TrueType (OpenType)");
+- case CIDType0COT:
+- return QObject::tr("CID Type 0C (OpenType)");
+- case CIDTrueTypeOT:
+- return QObject::tr("CID TrueType (OpenType)");
+- }
+- return QObject::tr("Bug: unexpected font type. Notify poppler mailing list!");
+-}
+-
+-FontInfo& FontInfo::operator=( const FontInfo &fi )
+-{
+- if (this == &fi)
+- return *this;
+-
+- *m_data = *fi.m_data;
+- return *this;
+-}
+-
+-
+-FontIterator::FontIterator( int startPage, DocumentData *dd )
+- : d( new FontIteratorData( startPage, dd ) )
+-{
+-}
+-
+-FontIterator::~FontIterator()
+-{
+- delete d;
+-}
+-
+-QList<FontInfo> FontIterator::next()
+-{
+- ++d->currentPage;
+-
+- QList<FontInfo> fonts;
+- GooList *items = d->fontInfoScanner.scan( 1 );
+- if ( !items )
+- return fonts;
+- fonts.reserve( items->getLength() );
+- for ( int i = 0; i < items->getLength(); ++i ) {
+- fonts.append( FontInfo( FontInfoData( ( ::FontInfo* )items->get( i ) ) ) );
+- }
+- deleteGooList( items, ::FontInfo );
+- return fonts;
+-}
+-
+-bool FontIterator::hasNext() const
+-{
+- return ( d->currentPage + 1 ) < d->totalPages;
+-}
+-
+-int FontIterator::currentPage() const
+-{
+- return d->currentPage;
+-}
+-
+-}
+diff --git a/qt4/src/poppler-form.cc b/qt4/src/poppler-form.cc
+deleted file mode 100644
+index 57cde574..00000000
+--- a/qt4/src/poppler-form.cc
++++ /dev/null
+@@ -1,416 +0,0 @@
+-/* poppler-form.h: qt4 interface to poppler
+- * Copyright (C) 2007-2008, 2011, Pino Toscano <pino@kde.org>
+- * Copyright (C) 2008, 2011, 2012, 2015, 2017, Albert Astals Cid <aacid@kde.org>
+- * Copyright (C) 2011 Carlos Garcia Campos <carlosgc@gnome.org>
+- * Copyright (C) 2012, Adam Reichold <adamreichold@myopera.com>
+- *
+- * This program is free software; you can redistribute it and/or modify
+- * it under the terms of the GNU General Public License as published by
+- * the Free Software Foundation; either version 2, or (at your option)
+- * any later version.
+- *
+- * This program is distributed in the hope that it will be useful,
+- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+- * GNU General Public License for more details.
+- *
+- * You should have received a copy of the GNU General Public License
+- * along with this program; if not, write to the Free Software
+- * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+- */
+-
+-#include "poppler-qt4.h"
+-
+-#include <QtCore/QSizeF>
+-
+-#include <Form.h>
+-#include <Object.h>
+-#include <Link.h>
+-
+-#include "poppler-form.h"
+-#include "poppler-page-private.h"
+-#include "poppler-private.h"
+-#include "poppler-annotation-helper.h"
+-
+-#include <math.h>
+-
+-namespace {
+-
+-Qt::Alignment formTextAlignment(::FormWidget *fm)
+-{
+- Qt::Alignment qtalign = Qt::AlignLeft;
+- switch (fm->getField()->getTextQuadding())
+- {
+- case quaddingCentered:
+- qtalign = Qt::AlignHCenter;
+- break;
+- case quaddingRightJustified:
+- qtalign = Qt::AlignRight;
+- break;
+- case quaddingLeftJustified:
+- qtalign = Qt::AlignLeft;
+- }
+- return qtalign;
+-}
+-
+-}
+-
+-namespace Poppler {
+-
+-FormField::FormField(FormFieldData &dd)
+- : m_formData(&dd)
+-{
+- const int rotation = m_formData->page->getRotate();
+- // reading the coords
+- double left, top, right, bottom;
+- m_formData->fm->getRect(&left, &bottom, &right, &top);
+- // build a normalized transform matrix for this page at 100% scale
+- GfxState gfxState( 72.0, 72.0, m_formData->page->getCropBox(), rotation, gTrue );
+- double * gfxCTM = gfxState.getCTM();
+- double MTX[6];
+- double pageWidth = m_formData->page->getCropWidth();
+- double pageHeight = m_formData->page->getCropHeight();
+- // landscape and seascape page rotation: be sure to use the correct (== rotated) page size
+- if (((rotation / 90) % 2) == 1)
+- qSwap(pageWidth, pageHeight);
+- for ( int i = 0; i < 6; i+=2 )
+- {
+- MTX[i] = gfxCTM[i] / pageWidth;
+- MTX[i+1] = gfxCTM[i+1] / pageHeight;
+- }
+- QPointF topLeft;
+- XPDFReader::transform( MTX, qMin( left, right ), qMax( top, bottom ), topLeft );
+- QPointF bottomRight;
+- XPDFReader::transform( MTX, qMax( left, right ), qMin( top, bottom ), bottomRight );
+- m_formData->box = QRectF(topLeft, QSizeF(bottomRight.x() - topLeft.x(), bottomRight.y() - topLeft.y()));
+-}
+-
+-FormField::~FormField()
+-{
+- delete m_formData;
+- m_formData = 0;
+-}
+-
+-QRectF FormField::rect() const
+-{
+- return m_formData->box;
+-}
+-
+-int FormField::id() const
+-{
+- return m_formData->fm->getID();
+-}
+-
+-QString FormField::name() const
+-{
+- QString name;
+- if (GooString *goo = m_formData->fm->getPartialName())
+- {
+- name = QString::fromLatin1(goo->getCString());
+- }
+- return name;
+-}
+-
+-QString FormField::fullyQualifiedName() const
+-{
+- QString name;
+- if (GooString *goo = m_formData->fm->getFullyQualifiedName())
+- {
+- name = UnicodeParsedString(goo);
+- }
+- return name;
+-}
+-
+-QString FormField::uiName() const
+-{
+- QString name;
+- if (GooString *goo = m_formData->fm->getAlternateUiName())
+- {
+- name = QString::fromLatin1(goo->getCString());
+- }
+- return name;
+-}
+-
+-bool FormField::isReadOnly() const
+-{
+- return m_formData->fm->isReadOnly();
+-}
+-
+-bool FormField::isVisible() const
+-{
+- return !(m_formData->fm->getWidgetAnnotation()->getFlags() & Annot::flagHidden);
+-}
+-
+-Link* FormField::activationAction() const
+-{
+- Link* action = 0;
+- if (::LinkAction *act = m_formData->fm->getActivationAction())
+- {
+- action = PageData::convertLinkActionToLink(act, m_formData->doc, QRectF());
+- }
+- return action;
+-}
+-
+-
+-FormFieldButton::FormFieldButton(DocumentData *doc, ::Page *p, ::FormWidgetButton *w)
+- : FormField(*new FormFieldData(doc, p, w))
+-{
+-}
+-
+-FormFieldButton::~FormFieldButton()
+-{
+-}
+-
+-FormFieldButton::FormType FormFieldButton::type() const
+-{
+- return FormField::FormButton;
+-}
+-
+-FormFieldButton::ButtonType FormFieldButton::buttonType() const
+-{
+- FormWidgetButton* fwb = static_cast<FormWidgetButton*>(m_formData->fm);
+- switch (fwb->getButtonType())
+- {
+- case formButtonCheck:
+- return FormFieldButton::CheckBox;
+- break;
+- case formButtonPush:
+- return FormFieldButton::Push;
+- break;
+- case formButtonRadio:
+- return FormFieldButton::Radio;
+- break;
+- }
+- return FormFieldButton::CheckBox;
+-}
+-
+-QString FormFieldButton::caption() const
+-{
+- FormWidgetButton* fwb = static_cast<FormWidgetButton*>(m_formData->fm);
+- QString ret;
+- if (fwb->getButtonType() == formButtonPush)
+- {
+- Dict *dict = m_formData->fm->getObj()->getDict();
+- Object obj1 = dict->lookup("MK");
+- if (obj1.isDict())
+- {
+- AnnotAppearanceCharacs appearCharacs(obj1.getDict());
+- if (appearCharacs.getNormalCaption())
+- {
+- ret = UnicodeParsedString(appearCharacs.getNormalCaption());
+- }
+- }
+- }
+- else
+- {
+- if (const char *goo = fwb->getOnStr())
+- {
+- ret = QString::fromUtf8(goo);
+- }
+- }
+- return ret;
+-}
+-
+-bool FormFieldButton::state() const
+-{
+- FormWidgetButton* fwb = static_cast<FormWidgetButton*>(m_formData->fm);
+- return fwb->getState();
+-}
+-
+-void FormFieldButton::setState( bool state )
+-{
+- FormWidgetButton* fwb = static_cast<FormWidgetButton*>(m_formData->fm);
+- fwb->setState((GBool)state);
+-}
+-
+-QList<int> FormFieldButton::siblings() const
+-{
+- FormWidgetButton* fwb = static_cast<FormWidgetButton*>(m_formData->fm);
+- ::FormFieldButton* ffb = static_cast< ::FormFieldButton* >(fwb->getField());
+- if (fwb->getButtonType() == formButtonPush)
+- return QList<int>();
+-
+- QList<int> ret;
+- for (int i = 0; i < ffb->getNumSiblings(); ++i)
+- {
+- ::FormFieldButton* sibling = static_cast< ::FormFieldButton* >(ffb->getSibling(i));
+- for (int j = 0; j < sibling->getNumWidgets(); ++j)
+- {
+- FormWidget *w = sibling->getWidget(j);
+- if (w) ret.append(w->getID());
+- }
+- }
+-
+- return ret;
+-}
+-
+-
+-FormFieldText::FormFieldText(DocumentData *doc, ::Page *p, ::FormWidgetText *w)
+- : FormField(*new FormFieldData(doc, p, w))
+-{
+-}
+-
+-FormFieldText::~FormFieldText()
+-{
+-}
+-
+-FormField::FormType FormFieldText::type() const
+-{
+- return FormField::FormText;
+-}
+-
+-FormFieldText::TextType FormFieldText::textType() const
+-{
+- FormWidgetText* fwt = static_cast<FormWidgetText*>(m_formData->fm);
+- if (fwt->isFileSelect())
+- return FormFieldText::FileSelect;
+- else if (fwt->isMultiline())
+- return FormFieldText::Multiline;
+- return FormFieldText::Normal;
+-}
+-
+-QString FormFieldText::text() const
+-{
+- GooString *goo = static_cast<FormWidgetText*>(m_formData->fm)->getContent();
+- return UnicodeParsedString(goo);
+-}
+-
+-void FormFieldText::setText( const QString& text )
+-{
+- FormWidgetText* fwt = static_cast<FormWidgetText*>(m_formData->fm);
+- GooString * goo = QStringToUnicodeGooString( text );
+- fwt->setContent( goo );
+- delete goo;
+-}
+-
+-bool FormFieldText::isPassword() const
+-{
+- FormWidgetText* fwt = static_cast<FormWidgetText*>(m_formData->fm);
+- return fwt->isPassword();
+-}
+-
+-bool FormFieldText::isRichText() const
+-{
+- FormWidgetText* fwt = static_cast<FormWidgetText*>(m_formData->fm);
+- return fwt->isRichText();
+-}
+-
+-int FormFieldText::maximumLength() const
+-{
+- FormWidgetText* fwt = static_cast<FormWidgetText*>(m_formData->fm);
+- const int maxlen = fwt->getMaxLen();
+- return maxlen > 0 ? maxlen : -1;
+-}
+-
+-Qt::Alignment FormFieldText::textAlignment() const
+-{
+- return formTextAlignment(m_formData->fm);
+-}
+-
+-bool FormFieldText::canBeSpellChecked() const
+-{
+- FormWidgetText* fwt = static_cast<FormWidgetText*>(m_formData->fm);
+- return !fwt->noSpellCheck();
+-}
+-
+-
+-FormFieldChoice::FormFieldChoice(DocumentData *doc, ::Page *p, ::FormWidgetChoice *w)
+- : FormField(*new FormFieldData(doc, p, w))
+-{
+-}
+-
+-FormFieldChoice::~FormFieldChoice()
+-{
+-}
+-
+-FormFieldChoice::FormType FormFieldChoice::type() const
+-{
+- return FormField::FormChoice;
+-}
+-
+-FormFieldChoice::ChoiceType FormFieldChoice::choiceType() const
+-{
+- FormWidgetChoice* fwc = static_cast<FormWidgetChoice*>(m_formData->fm);
+- if (fwc->isCombo())
+- return FormFieldChoice::ComboBox;
+- return FormFieldChoice::ListBox;
+-}
+-
+-QStringList FormFieldChoice::choices() const
+-{
+- FormWidgetChoice* fwc = static_cast<FormWidgetChoice*>(m_formData->fm);
+- QStringList ret;
+- int num = fwc->getNumChoices();
+- ret.reserve(num);
+- for (int i = 0; i < num; ++i)
+- {
+- ret.append(UnicodeParsedString(fwc->getChoice(i)));
+- }
+- return ret;
+-}
+-
+-bool FormFieldChoice::isEditable() const
+-{
+- FormWidgetChoice* fwc = static_cast<FormWidgetChoice*>(m_formData->fm);
+- return fwc->isCombo() ? fwc->hasEdit() : false;
+-}
+-
+-bool FormFieldChoice::multiSelect() const
+-{
+- FormWidgetChoice* fwc = static_cast<FormWidgetChoice*>(m_formData->fm);
+- return !fwc->isCombo() ? fwc->isMultiSelect() : false;
+-}
+-
+-QList<int> FormFieldChoice::currentChoices() const
+-{
+- FormWidgetChoice* fwc = static_cast<FormWidgetChoice*>(m_formData->fm);
+- int num = fwc->getNumChoices();
+- QList<int> choices;
+- for ( int i = 0; i < num; ++i )
+- if ( fwc->isSelected( i ) )
+- choices.append( i );
+- return choices;
+-}
+-
+-void FormFieldChoice::setCurrentChoices( const QList<int> &choice )
+-{
+- FormWidgetChoice* fwc = static_cast<FormWidgetChoice*>(m_formData->fm);
+- fwc->deselectAll();
+- for ( int i = 0; i < choice.count(); ++i )
+- fwc->select( choice.at( i ) );
+-}
+-
+-QString FormFieldChoice::editChoice() const
+-{
+- FormWidgetChoice* fwc = static_cast<FormWidgetChoice*>(m_formData->fm);
+-
+- if ( fwc->isCombo() && fwc->hasEdit() )
+- return UnicodeParsedString(fwc->getEditChoice());
+- else
+- return QString();
+-}
+-
+-void FormFieldChoice::setEditChoice(const QString& text)
+-{
+- FormWidgetChoice* fwc = static_cast<FormWidgetChoice*>(m_formData->fm);
+-
+- if ( fwc->isCombo() && fwc->hasEdit() )
+- {
+- GooString* goo = QStringToUnicodeGooString( text );
+- fwc->setEditChoice( goo );
+- delete goo;
+- }
+-}
+-
+-Qt::Alignment FormFieldChoice::textAlignment() const
+-{
+- return formTextAlignment(m_formData->fm);
+-}
+-
+-bool FormFieldChoice::canBeSpellChecked() const
+-{
+- FormWidgetChoice* fwc = static_cast<FormWidgetChoice*>(m_formData->fm);
+- return !fwc->noSpellCheck();
+-}
+-
+-}
+diff --git a/qt4/src/poppler-form.h b/qt4/src/poppler-form.h
+deleted file mode 100644
+index 79ed3932..00000000
+--- a/qt4/src/poppler-form.h
++++ /dev/null
+@@ -1,343 +0,0 @@
+-/* poppler-form.h: qt4 interface to poppler
+- * Copyright (C) 2007-2008, Pino Toscano <pino@kde.org>
+- * Copyright (C) 2008, 2011, Albert Astals Cid <aacid@kde.org>
+- * Copyright (C) 2012, Adam Reichold <adamreichold@myopera.com>
+- *
+- * This program is free software; you can redistribute it and/or modify
+- * it under the terms of the GNU General Public License as published by
+- * the Free Software Foundation; either version 2, or (at your option)
+- * any later version.
+- *
+- * This program is distributed in the hope that it will be useful,
+- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+- * GNU General Public License for more details.
+- *
+- * You should have received a copy of the GNU General Public License
+- * along with this program; if not, write to the Free Software
+- * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+- */
+-
+-#ifndef _POPPLER_QT4_FORM_H_
+-#define _POPPLER_QT4_FORM_H_
+-
+-#include <QtCore/QRectF>
+-#include <QtCore/QStringList>
+-#include "poppler-export.h"
+-
+-class Page;
+-class FormWidget;
+-class FormWidgetButton;
+-class FormWidgetText;
+-class FormWidgetChoice;
+-
+-namespace Poppler {
+-
+- class DocumentData;
+- class Link;
+-
+- class FormFieldData;
+- /**
+- The base class representing a form field.
+-
+- \since 0.6
+- */
+- class POPPLER_QT4_EXPORT FormField {
+- public:
+-
+- /**
+- The different types of form field.
+- */
+- enum FormType {
+- FormButton, ///< A button field. See \ref Poppler::FormFieldButton::ButtonType "ButtonType"
+- FormText, ///< A text field. See \ref Poppler::FormFieldText::TextType "TextType"
+- FormChoice, ///< A single choice field. See \ref Poppler::FormFieldChoice::ChoiceType "ChoiceType"
+- FormSignature ///< A signature field.
+- };
+-
+- virtual ~FormField();
+-
+- /**
+- The type of the field.
+- */
+- virtual FormType type() const = 0;
+-
+- /**
+- \return The size of the field, in normalized coordinates, i.e.
+- [0..1] with regard to the dimensions (cropbox) of the page
+- */
+- QRectF rect() const;
+-
+- /**
+- The ID of the field.
+- */
+- int id() const;
+-
+- /**
+- The internal name of the field.
+- */
+- QString name() const;
+-
+- /**
+- The internal fully qualified name of the field.
+- \since 0.18
+- */
+- QString fullyQualifiedName() const;
+-
+- /**
+- The name of the field to be used in user interface (eg messages to
+- the user).
+- */
+- QString uiName() const;
+-
+- /**
+- Whether this form field is read-only.
+- */
+- bool isReadOnly() const;
+-
+- /**
+- Whether this form field is visible.
+- */
+- bool isVisible() const;
+-
+- /**
+- The activation action of this form field.
+-
+- \note It may be null.
+- */
+- Link* activationAction() const;
+-
+- protected:
+- /// \cond PRIVATE
+- FormField(FormFieldData &dd);
+-
+- FormFieldData *m_formData;
+- /// \endcond
+-
+- private:
+- Q_DISABLE_COPY(FormField)
+- };
+-
+- /**
+- A form field that represents a "button".
+-
+- \since 0.8
+- */
+- class POPPLER_QT4_EXPORT FormFieldButton : public FormField {
+- public:
+-
+- /**
+- * The types of button field.
+- */
+- enum ButtonType
+- {
+- Push, ///< A simple push button.
+- CheckBox, ///< A check box.
+- Radio ///< A radio button.
+- };
+-
+- /// \cond PRIVATE
+- FormFieldButton(DocumentData *doc, ::Page *p, ::FormWidgetButton *w);
+- /// \endcond
+- virtual ~FormFieldButton();
+-
+- virtual FormType type() const;
+-
+- /**
+- The particular type of the button field.
+- */
+- ButtonType buttonType() const;
+-
+- /**
+- * The caption to be used for the button.
+- */
+- QString caption() const;
+-
+- /**
+- The state of the button.
+- */
+- bool state() const;
+-
+- /**
+- Sets the state of the button to the new \p state .
+- */
+- void setState( bool state );
+-
+- /**
+- The list with the IDs of siblings (ie, buttons belonging to the same
+- group as the current one.
+-
+- Valid only for \ref Radio buttons, an empty list otherwise.
+- */
+- QList<int> siblings() const;
+-
+- private:
+- Q_DISABLE_COPY(FormFieldButton)
+- };
+-
+- /**
+- A form field that represents a text input.
+-
+- \since 0.6
+- */
+- class POPPLER_QT4_EXPORT FormFieldText : public FormField {
+- public:
+-
+- /**
+- The particular type of this text field.
+- */
+- enum TextType {
+- Normal, ///< A simple singleline text field.
+- Multiline, ///< A multiline text field.
+- FileSelect ///< An input field to select the path of a file on disk.
+- };
+-
+- /// \cond PRIVATE
+- FormFieldText(DocumentData *doc, ::Page *p, ::FormWidgetText *w);
+- /// \endcond
+- virtual ~FormFieldText();
+-
+- virtual FormType type() const;
+-
+- /**
+- The text type of the text field.
+- */
+- TextType textType() const;
+-
+- /**
+- The text associated with the text field.
+- */
+- QString text() const;
+-
+- /**
+- Sets the text associated with the text field to the specified
+- \p text.
+- */
+- void setText( const QString& text );
+-
+- /**
+- Whether this text field is a password input, eg its text \b must be
+- replaced with asterisks.
+-
+- Always false for \ref FileSelect text fields.
+- */
+- bool isPassword() const;
+-
+- /**
+- Whether this text field should allow rich text.
+- */
+- bool isRichText() const;
+-
+- /**
+- The maximum length for the text of this field, or -1 if not set.
+- */
+- int maximumLength() const;
+-
+- /**
+- The horizontal alignment for the text of this text field.
+- */
+- Qt::Alignment textAlignment() const;
+-
+- /**
+- Whether the text inserted manually in the field (where possible)
+- can be spell-checked.
+- */
+- bool canBeSpellChecked() const;
+-
+- private:
+- Q_DISABLE_COPY(FormFieldText)
+- };
+-
+- /**
+- A form field that represents a choice field.
+-
+- \since 0.6
+- */
+- class POPPLER_QT4_EXPORT FormFieldChoice : public FormField {
+- public:
+-
+- /**
+- The particular type of this choice field.
+- */
+- enum ChoiceType {
+- ComboBox, ///< A simple singleline text field.
+- ListBox ///< A multiline text field.
+- };
+-
+- /// \cond PRIVATE
+- FormFieldChoice(DocumentData *doc, ::Page *p, ::FormWidgetChoice *w);
+- /// \endcond
+- virtual ~FormFieldChoice();
+-
+- virtual FormType type() const;
+-
+- /**
+- The choice type of the choice field.
+- */
+- ChoiceType choiceType() const;
+-
+- /**
+- The possible choices of the choice field.
+- */
+- QStringList choices() const;
+-
+- /**
+- Whether this FormFieldChoice::ComboBox is editable, i.e. the user
+- can type in a custom value.
+-
+- Always false for the other types of choices.
+- */
+- bool isEditable() const;
+-
+- /**
+- Whether more than one choice of this FormFieldChoice::ListBox
+- can be selected at the same time.
+-
+- Always false for the other types of choices.
+- */
+- bool multiSelect() const;
+-
+- /**
+- The currently selected choices.
+- */
+- QList<int> currentChoices() const;
+-
+- /**
+- Sets the selected choices to \p choice.
+- */
+- void setCurrentChoices( const QList<int> &choice );
+-
+- /**
+- The text entered into an editable combo box choice field. Otherwise a null string.
+-
+- \since 0.22
+- */
+- QString editChoice() const;
+-
+- /**
+- Sets the text entered into an editable combo box choice field. Otherwise does nothing.
+-
+- \since 0.22
+- */
+- void setEditChoice(const QString& text);
+-
+- /**
+- The horizontal alignment for the text of this text field.
+- */
+- Qt::Alignment textAlignment() const;
+-
+- /**
+- Whether the text inserted manually in the field (where possible)
+- can be spell-checked.
+-
+- Returns false if the field is not an editable text field.
+- */
+- bool canBeSpellChecked() const;
+-
+- private:
+- Q_DISABLE_COPY(FormFieldChoice)
+- };
+-
+-}
+-
+-#endif
+diff --git a/qt4/src/poppler-link-extractor-private.h b/qt4/src/poppler-link-extractor-private.h
+deleted file mode 100644
+index 32ddd038..00000000
+--- a/qt4/src/poppler-link-extractor-private.h
++++ /dev/null
+@@ -1,57 +0,0 @@
+-/* poppler-link-extractor_p.h: qt interface to poppler
+- * Copyright (C) 2007, 2008, 2011, Pino Toscano <pino@kde.org>
+- *
+- * This program is free software; you can redistribute it and/or modify
+- * it under the terms of the GNU General Public License as published by
+- * the Free Software Foundation; either version 2, or (at your option)
+- * any later version.
+- *
+- * This program is distributed in the hope that it will be useful,
+- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+- * GNU General Public License for more details.
+- *
+- * You should have received a copy of the GNU General Public License
+- * along with this program; if not, write to the Free Software
+- * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+- */
+-
+-#ifndef _POPPLER_LINK_EXTRACTOR_H_
+-#define _POPPLER_LINK_EXTRACTOR_H_
+-
+-#include <Object.h>
+-#include <OutputDev.h>
+-
+-#include <QtCore/QList>
+-
+-namespace Poppler
+-{
+-
+-class Link;
+-class PageData;
+-
+-class LinkExtractorOutputDev : public OutputDev
+-{
+- public:
+- LinkExtractorOutputDev(PageData *data);
+- virtual ~LinkExtractorOutputDev();
+-
+- // inherited from OutputDev
+- virtual GBool upsideDown() { return gFalse; }
+- virtual GBool useDrawChar() { return gFalse; }
+- virtual GBool interpretType3Chars() { return gFalse; }
+- virtual void processLink(::AnnotLink *link);
+-
+- // our stuff
+- QList< Link* > links();
+-
+- private:
+- PageData *m_data;
+- double m_pageCropWidth;
+- double m_pageCropHeight;
+- QList< Link* > m_links;
+-};
+-
+-}
+-
+-#endif
+diff --git a/qt4/src/poppler-link-extractor.cc b/qt4/src/poppler-link-extractor.cc
+deleted file mode 100644
+index 0b1563b6..00000000
+--- a/qt4/src/poppler-link-extractor.cc
++++ /dev/null
+@@ -1,84 +0,0 @@
+-/* poppler-link-extractor_p.h: qt interface to poppler
+- * Copyright (C) 2007, 2008, 2011, Pino Toscano <pino@kde.org>
+- * Copyright (C) 2008, Albert Astals Cid <aacid@kde.org>
+- *
+- * This program is free software; you can redistribute it and/or modify
+- * it under the terms of the GNU General Public License as published by
+- * the Free Software Foundation; either version 2, or (at your option)
+- * any later version.
+- *
+- * This program is distributed in the hope that it will be useful,
+- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+- * GNU General Public License for more details.
+- *
+- * You should have received a copy of the GNU General Public License
+- * along with this program; if not, write to the Free Software
+- * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+- */
+-
+-#include "poppler-link-extractor-private.h"
+-
+-#include <GfxState.h>
+-#include <Link.h>
+-#include <Object.h>
+-#include <Page.h>
+-#include <Annot.h>
+-
+-#include "poppler-qt4.h"
+-#include "poppler-page-private.h"
+-
+-namespace Poppler
+-{
+-
+-LinkExtractorOutputDev::LinkExtractorOutputDev(PageData *data)
+- : m_data(data)
+-{
+- Q_ASSERT(m_data);
+- ::Page *popplerPage = m_data->page;
+- m_pageCropWidth = popplerPage->getCropWidth();
+- m_pageCropHeight = popplerPage->getCropHeight();
+- if (popplerPage->getRotate() == 90 || popplerPage->getRotate() == 270)
+- qSwap(m_pageCropWidth, m_pageCropHeight);
+- GfxState gfxState(72.0, 72.0, popplerPage->getCropBox(), popplerPage->getRotate(), gTrue);
+- setDefaultCTM(gfxState.getCTM());
+-}
+-
+-LinkExtractorOutputDev::~LinkExtractorOutputDev()
+-{
+- qDeleteAll(m_links);
+-}
+-
+-void LinkExtractorOutputDev::processLink(::AnnotLink *link)
+-{
+- if (!link->isOk())
+- return;
+-
+- double left, top, right, bottom;
+- int leftAux, topAux, rightAux, bottomAux;
+- link->getRect(&left, &top, &right, &bottom);
+- QRectF linkArea;
+-
+- cvtUserToDev(left, top, &leftAux, &topAux);
+- cvtUserToDev(right, bottom, &rightAux, &bottomAux);
+- linkArea.setLeft((double)leftAux / m_pageCropWidth);
+- linkArea.setTop((double)topAux / m_pageCropHeight);
+- linkArea.setRight((double)rightAux / m_pageCropWidth);
+- linkArea.setBottom((double)bottomAux / m_pageCropHeight);
+-
+- Link *popplerLink = m_data->convertLinkActionToLink(link->getAction(), linkArea);
+- if (popplerLink)
+- {
+- m_links.append(popplerLink);
+- }
+- OutputDev::processLink(link);
+-}
+-
+-QList< Link* > LinkExtractorOutputDev::links()
+-{
+- QList< Link* > ret = m_links;
+- m_links.clear();
+- return ret;
+-}
+-
+-}
+diff --git a/qt4/src/poppler-link-private.h b/qt4/src/poppler-link-private.h
+deleted file mode 100644
+index 7b03c1c3..00000000
+--- a/qt4/src/poppler-link-private.h
++++ /dev/null
+@@ -1,57 +0,0 @@
+-/* poppler-link-private.h: qt interface to poppler
+- * Copyright (C) 2016, Albert Astals Cid <aacid@kde.org>
+- *
+- * This program is free software; you can redistribute it and/or modify
+- * it under the terms of the GNU General Public License as published by
+- * the Free Software Foundation; either version 2, or (at your option)
+- * any later version.
+- *
+- * This program is distributed in the hope that it will be useful,
+- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+- * GNU General Public License for more details.
+- *
+- * You should have received a copy of the GNU General Public License
+- * along with this program; if not, write to the Free Software
+- * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+- */
+-
+-#ifndef _POPPLER_LINK_PRIVATE_H_
+-#define _POPPLER_LINK_PRIVATE_H_
+-
+-class LinkOCGState;
+-
+-namespace Poppler {
+-
+-class LinkPrivate
+-{
+-public:
+- LinkPrivate( const QRectF &area )
+- : linkArea( area )
+- {
+- }
+-
+- virtual ~LinkPrivate()
+- {
+- }
+-
+- QRectF linkArea;
+-};
+-
+-
+-
+-class LinkOCGStatePrivate : public LinkPrivate
+-{
+-public:
+- LinkOCGStatePrivate( const QRectF &area, ::LinkOCGState *plocg )
+- : LinkPrivate( area )
+- , popplerLinkOCGState( plocg )
+- {
+- }
+-
+- ::LinkOCGState *popplerLinkOCGState;
+-};
+-
+-}
+-
+-#endif
+diff --git a/qt4/src/poppler-link.cc b/qt4/src/poppler-link.cc
+deleted file mode 100644
+index 1e37f5bd..00000000
+--- a/qt4/src/poppler-link.cc
++++ /dev/null
+@@ -1,710 +0,0 @@
+-/* poppler-link.cc: qt interface to poppler
+- * Copyright (C) 2006-2007, 2016, 2017, Albert Astals Cid
+- * Copyright (C) 2007-2008, Pino Toscano <pino@kde.org>
+- * Copyright (C) 2010 Hib Eris <hib@hiberis.nl>
+- * Copyright (C) 2012, Tobias Koenig <tokoe@kdab.com>
+- * Copyright (C) 2012, Guillermo A. Amaral B. <gamaral@kde.org>
+- * Adapting code from
+- * Copyright (C) 2004 by Enrico Ros <eros.kde@email.it>
+- *
+- * This program is free software; you can redistribute it and/or modify
+- * it under the terms of the GNU General Public License as published by
+- * the Free Software Foundation; either version 2, or (at your option)
+- * any later version.
+- *
+- * This program is distributed in the hope that it will be useful,
+- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+- * GNU General Public License for more details.
+- *
+- * You should have received a copy of the GNU General Public License
+- * along with this program; if not, write to the Free Software
+- * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+- */
+-
+-#include <poppler-qt4.h>
+-#include <poppler-link-private.h>
+-#include <poppler-private.h>
+-#include <poppler-media.h>
+-
+-#include <QtCore/QStringList>
+-
+-#include "poppler-annotation-private.h"
+-
+-#include "Link.h"
+-#include "Rendition.h"
+-
+-static bool operator==( const Ref &r1, const Ref &r2 )
+-{
+- return r1.num == r2.num && r1.gen == r2.gen;
+-}
+-
+-namespace Poppler {
+-
+-class LinkDestinationPrivate : public QSharedData
+-{
+- public:
+- LinkDestinationPrivate();
+-
+- LinkDestination::Kind kind; // destination type
+- QString name;
+- int pageNum; // page number
+- double left, bottom; // position
+- double right, top;
+- double zoom; // zoom factor
+- bool changeLeft : 1, changeTop : 1; // for destXYZ links, which position
+- bool changeZoom : 1; // components to change
+-};
+-
+- LinkDestinationPrivate::LinkDestinationPrivate()
+- {
+- // sane defaults
+- kind = LinkDestination::destXYZ;
+- pageNum = 0;
+- left = 0;
+- bottom = 0;
+- right = 0;
+- top = 0;
+- zoom = 1;
+- changeLeft = true;
+- changeTop = true;
+- changeZoom = false;
+- }
+-
+-class LinkGotoPrivate : public LinkPrivate
+-{
+- public:
+- LinkGotoPrivate( const QRectF &area, const LinkDestination &dest );
+-
+- QString extFileName;
+- LinkDestination destination;
+-};
+-
+- LinkGotoPrivate::LinkGotoPrivate( const QRectF &area, const LinkDestination &dest )
+- : LinkPrivate( area ), destination( dest )
+- {
+- }
+-
+-class LinkExecutePrivate : public LinkPrivate
+-{
+- public:
+- LinkExecutePrivate( const QRectF &area );
+-
+- QString fileName;
+- QString parameters;
+-};
+-
+- LinkExecutePrivate::LinkExecutePrivate( const QRectF &area )
+- : LinkPrivate( area )
+- {
+- }
+-
+-class LinkBrowsePrivate : public LinkPrivate
+-{
+- public:
+- LinkBrowsePrivate( const QRectF &area );
+-
+- QString url;
+-};
+-
+- LinkBrowsePrivate::LinkBrowsePrivate( const QRectF &area )
+- : LinkPrivate( area )
+- {
+- }
+-
+-class LinkActionPrivate : public LinkPrivate
+-{
+- public:
+- LinkActionPrivate( const QRectF &area );
+-
+- LinkAction::ActionType type;
+-};
+-
+- LinkActionPrivate::LinkActionPrivate( const QRectF &area )
+- : LinkPrivate( area )
+- {
+- }
+-
+-class LinkSoundPrivate : public LinkPrivate
+-{
+- public:
+- LinkSoundPrivate( const QRectF &area );
+- ~LinkSoundPrivate();
+-
+- double volume;
+- bool sync : 1;
+- bool repeat : 1;
+- bool mix : 1;
+- SoundObject *sound;
+-};
+-
+- LinkSoundPrivate::LinkSoundPrivate( const QRectF &area )
+- : LinkPrivate( area ), sound( 0 )
+- {
+- }
+-
+- LinkSoundPrivate::~LinkSoundPrivate()
+- {
+- delete sound;
+- }
+-
+-class LinkRenditionPrivate : public LinkPrivate
+-{
+- public:
+- LinkRenditionPrivate( const QRectF &area, ::MediaRendition *rendition, ::LinkRendition::RenditionOperation operation, const QString &script, const Ref &annotationReference );
+- ~LinkRenditionPrivate();
+-
+- MediaRendition *rendition;
+- LinkRendition::RenditionAction action;
+- QString script;
+- Ref annotationReference;
+-};
+-
+- LinkRenditionPrivate::LinkRenditionPrivate( const QRectF &area, ::MediaRendition *r, ::LinkRendition::RenditionOperation operation, const QString &javaScript, const Ref &ref )
+- : LinkPrivate( area )
+- , rendition( r ? new MediaRendition( r ) : 0 )
+- , action( LinkRendition::PlayRendition )
+- , script( javaScript )
+- , annotationReference( ref )
+- {
+- switch ( operation )
+- {
+- case ::LinkRendition::NoRendition:
+- action = LinkRendition::NoRendition;
+- break;
+- case ::LinkRendition::PlayRendition:
+- action = LinkRendition::PlayRendition;
+- break;
+- case ::LinkRendition::StopRendition:
+- action = LinkRendition::StopRendition;
+- break;
+- case ::LinkRendition::PauseRendition:
+- action = LinkRendition::PauseRendition;
+- break;
+- case ::LinkRendition::ResumeRendition:
+- action = LinkRendition::ResumeRendition;
+- break;
+- }
+- }
+-
+- LinkRenditionPrivate::~LinkRenditionPrivate()
+- {
+- delete rendition;
+- }
+-
+-class LinkJavaScriptPrivate : public LinkPrivate
+-{
+- public:
+- LinkJavaScriptPrivate( const QRectF &area );
+-
+- QString js;
+-};
+-
+- LinkJavaScriptPrivate::LinkJavaScriptPrivate( const QRectF &area )
+- : LinkPrivate( area )
+- {
+- }
+-
+-class LinkMoviePrivate : public LinkPrivate
+-{
+- public:
+- LinkMoviePrivate( const QRectF &area, LinkMovie::Operation operation, const QString &title, const Ref &reference );
+-
+- LinkMovie::Operation operation;
+- QString annotationTitle;
+- Ref annotationReference;
+-};
+-
+- LinkMoviePrivate::LinkMoviePrivate( const QRectF &area, LinkMovie::Operation _operation, const QString &title, const Ref &reference )
+- : LinkPrivate( area ), operation( _operation ), annotationTitle( title ), annotationReference( reference )
+- {
+- }
+-
+- static void cvtUserToDev(::Page *page, double xu, double yu, int *xd, int *yd) {
+- double ctm[6];
+-
+- page->getDefaultCTM(ctm, 72.0, 72.0, 0, false, true);
+- *xd = (int)(ctm[0] * xu + ctm[2] * yu + ctm[4] + 0.5);
+- *yd = (int)(ctm[1] * xu + ctm[3] * yu + ctm[5] + 0.5);
+- }
+-
+- LinkDestination::LinkDestination(const LinkDestinationData &data)
+- : d( new LinkDestinationPrivate )
+- {
+- bool deleteDest = false;
+- LinkDest *ld = data.ld;
+-
+- if ( data.namedDest && !ld && !data.externalDest )
+- {
+- deleteDest = true;
+- ld = data.doc->doc->findDest( data.namedDest );
+- }
+- // in case this destination was named one, and it was not resolved
+- if ( data.namedDest && !ld )
+- {
+- d->name = QString::fromLatin1( data.namedDest->getCString() );
+- }
+-
+- if (!ld) return;
+-
+- if (ld->getKind() == ::destXYZ) d->kind = destXYZ;
+- else if (ld->getKind() == ::destFit) d->kind = destFit;
+- else if (ld->getKind() == ::destFitH) d->kind = destFitH;
+- else if (ld->getKind() == ::destFitV) d->kind = destFitV;
+- else if (ld->getKind() == ::destFitR) d->kind = destFitR;
+- else if (ld->getKind() == ::destFitB) d->kind = destFitB;
+- else if (ld->getKind() == ::destFitBH) d->kind = destFitBH;
+- else if (ld->getKind() == ::destFitBV) d->kind = destFitBV;
+-
+- if ( !ld->isPageRef() ) d->pageNum = ld->getPageNum();
+- else
+- {
+- Ref ref = ld->getPageRef();
+- d->pageNum = data.doc->doc->findPage( ref.num, ref.gen );
+- }
+- double left = ld->getLeft();
+- double bottom = ld->getBottom();
+- double right = ld->getRight();
+- double top = ld->getTop();
+- d->zoom = ld->getZoom();
+- d->changeLeft = ld->getChangeLeft();
+- d->changeTop = ld->getChangeTop();
+- d->changeZoom = ld->getChangeZoom();
+-
+- int leftAux = 0, topAux = 0, rightAux = 0, bottomAux = 0;
+-
+- if (!data.externalDest) {
+- ::Page *page;
+- if (d->pageNum > 0 &&
+- d->pageNum <= data.doc->doc->getNumPages() &&
+- (page = data.doc->doc->getPage( d->pageNum )))
+- {
+- cvtUserToDev( page, left, top, &leftAux, &topAux );
+- cvtUserToDev( page, right, bottom, &rightAux, &bottomAux );
+-
+- d->left = leftAux / (double)page->getCropWidth();
+- d->top = topAux / (double)page->getCropHeight();
+- d->right = rightAux/ (double)page->getCropWidth();
+- d->bottom = bottomAux / (double)page->getCropHeight();
+- }
+- else d->pageNum = 0;
+- }
+-
+- if (deleteDest) delete ld;
+- }
+-
+- LinkDestination::LinkDestination(const QString &description)
+- : d( new LinkDestinationPrivate )
+- {
+- QStringList tokens = description.split( ';' );
+- d->kind = static_cast<Kind>(tokens.at(0).toInt());
+- d->pageNum = tokens.at(1).toInt();
+- d->left = tokens.at(2).toDouble();
+- d->bottom = tokens.at(3).toDouble();
+- d->right = tokens.at(4).toDouble();
+- d->top = tokens.at(5).toDouble();
+- d->zoom = tokens.at(6).toDouble();
+- d->changeLeft = static_cast<bool>(tokens.at(7).toInt());
+- d->changeTop = static_cast<bool>(tokens.at(8).toInt());
+- d->changeZoom = static_cast<bool>(tokens.at(9).toInt());
+- }
+-
+- LinkDestination::LinkDestination(const LinkDestination &other)
+- : d( other.d )
+- {
+- }
+-
+- LinkDestination::~LinkDestination()
+- {
+- }
+-
+- LinkDestination::Kind LinkDestination::kind() const
+- {
+- return d->kind;
+- }
+-
+- int LinkDestination::pageNumber() const
+- {
+- return d->pageNum;
+- }
+-
+- double LinkDestination::left() const
+- {
+- return d->left;
+- }
+-
+- double LinkDestination::bottom() const
+- {
+- return d->bottom;
+- }
+-
+- double LinkDestination::right() const
+- {
+- return d->right;
+- }
+-
+- double LinkDestination::top() const
+- {
+- return d->top;
+- }
+-
+- double LinkDestination::zoom() const
+- {
+- return d->zoom;
+- }
+-
+- bool LinkDestination::isChangeLeft() const
+- {
+- return d->changeLeft;
+- }
+-
+- bool LinkDestination::isChangeTop() const
+- {
+- return d->changeTop;
+- }
+-
+- bool LinkDestination::isChangeZoom() const
+- {
+- return d->changeZoom;
+- }
+-
+- QString LinkDestination::toString() const
+- {
+- QString s = QString::number( (qint8)d->kind );
+- s += ";" + QString::number( d->pageNum );
+- s += ";" + QString::number( d->left );
+- s += ";" + QString::number( d->bottom );
+- s += ";" + QString::number( d->right );
+- s += ";" + QString::number( d->top );
+- s += ";" + QString::number( d->zoom );
+- s += ";" + QString::number( (qint8)d->changeLeft );
+- s += ";" + QString::number( (qint8)d->changeTop );
+- s += ";" + QString::number( (qint8)d->changeZoom );
+- return s;
+- }
+-
+- QString LinkDestination::destinationName() const
+- {
+- return d->name;
+- }
+-
+- LinkDestination& LinkDestination::operator=(const LinkDestination &other)
+- {
+- if ( this == &other )
+- return *this;
+-
+- d = other.d;
+- return *this;
+- }
+-
+-
+- // Link
+- Link::~Link()
+- {
+- delete d_ptr;
+- }
+-
+- Link::Link(const QRectF &linkArea)
+- : d_ptr( new LinkPrivate( linkArea ) )
+- {
+- }
+-
+- Link::Link( LinkPrivate &dd )
+- : d_ptr( &dd )
+- {
+- }
+-
+- Link::LinkType Link::linkType() const
+- {
+- return None;
+- }
+-
+- QRectF Link::linkArea() const
+- {
+- Q_D( const Link );
+- return d->linkArea;
+- }
+-
+- // LinkGoto
+- LinkGoto::LinkGoto( const QRectF &linkArea, QString extFileName, const LinkDestination & destination )
+- : Link( *new LinkGotoPrivate( linkArea, destination ) )
+- {
+- Q_D( LinkGoto );
+- d->extFileName = extFileName;
+- }
+-
+- LinkGoto::~LinkGoto()
+- {
+- }
+-
+- bool LinkGoto::isExternal() const
+- {
+- Q_D( const LinkGoto );
+- return !d->extFileName.isEmpty();
+- }
+-
+- QString LinkGoto::fileName() const
+- {
+- Q_D( const LinkGoto );
+- return d->extFileName;
+- }
+-
+- LinkDestination LinkGoto::destination() const
+- {
+- Q_D( const LinkGoto );
+- return d->destination;
+- }
+-
+- Link::LinkType LinkGoto::linkType() const
+- {
+- return Goto;
+- }
+-
+- // LinkExecute
+- LinkExecute::LinkExecute( const QRectF &linkArea, const QString & file, const QString & params )
+- : Link( *new LinkExecutePrivate( linkArea ) )
+- {
+- Q_D( LinkExecute );
+- d->fileName = file;
+- d->parameters = params;
+- }
+-
+- LinkExecute::~LinkExecute()
+- {
+- }
+-
+- QString LinkExecute::fileName() const
+- {
+- Q_D( const LinkExecute );
+- return d->fileName;
+- }
+- QString LinkExecute::parameters() const
+- {
+- Q_D( const LinkExecute );
+- return d->parameters;
+- }
+-
+- Link::LinkType LinkExecute::linkType() const
+- {
+- return Execute;
+- }
+-
+- // LinkBrowse
+- LinkBrowse::LinkBrowse( const QRectF &linkArea, const QString &url )
+- : Link( *new LinkBrowsePrivate( linkArea ) )
+- {
+- Q_D( LinkBrowse );
+- d->url = url;
+- }
+-
+- LinkBrowse::~LinkBrowse()
+- {
+- }
+-
+- QString LinkBrowse::url() const
+- {
+- Q_D( const LinkBrowse );
+- return d->url;
+- }
+-
+- Link::LinkType LinkBrowse::linkType() const
+- {
+- return Browse;
+- }
+-
+- // LinkAction
+- LinkAction::LinkAction( const QRectF &linkArea, ActionType actionType )
+- : Link( *new LinkActionPrivate( linkArea ) )
+- {
+- Q_D( LinkAction );
+- d->type = actionType;
+- }
+-
+- LinkAction::~LinkAction()
+- {
+- }
+-
+- LinkAction::ActionType LinkAction::actionType() const
+- {
+- Q_D( const LinkAction );
+- return d->type;
+- }
+-
+- Link::LinkType LinkAction::linkType() const
+- {
+- return Action;
+- }
+-
+- // LinkSound
+- LinkSound::LinkSound( const QRectF &linkArea, double volume, bool sync, bool repeat, bool mix, SoundObject *sound )
+- : Link( *new LinkSoundPrivate( linkArea ) )
+- {
+- Q_D( LinkSound );
+- d->volume = volume;
+- d->sync = sync;
+- d->repeat = repeat;
+- d->mix = mix;
+- d->sound = sound;
+- }
+-
+- LinkSound::~LinkSound()
+- {
+- }
+-
+- Link::LinkType LinkSound::linkType() const
+- {
+- return Sound;
+- }
+-
+- double LinkSound::volume() const
+- {
+- Q_D( const LinkSound );
+- return d->volume;
+- }
+-
+- bool LinkSound::synchronous() const
+- {
+- Q_D( const LinkSound );
+- return d->sync;
+- }
+-
+- bool LinkSound::repeat() const
+- {
+- Q_D( const LinkSound );
+- return d->repeat;
+- }
+-
+- bool LinkSound::mix() const
+- {
+- Q_D( const LinkSound );
+- return d->mix;
+- }
+-
+- SoundObject *LinkSound::sound() const
+- {
+- Q_D( const LinkSound );
+- return d->sound;
+- }
+-
+- // LinkRendition
+- LinkRendition::LinkRendition( const QRectF &linkArea, ::MediaRendition *rendition )
+- : Link( *new LinkRenditionPrivate( linkArea, rendition, ::LinkRendition::NoRendition, QString(), Ref() ) )
+- {
+- }
+-
+- LinkRendition::LinkRendition( const QRectF &linkArea, ::MediaRendition *rendition, int operation, const QString &script, const Ref &annotationReference )
+- : Link( *new LinkRenditionPrivate( linkArea, rendition, static_cast<enum ::LinkRendition::RenditionOperation>(operation), script, annotationReference ) )
+- {
+- }
+-
+- LinkRendition::~LinkRendition()
+- {
+- }
+-
+- Link::LinkType LinkRendition::linkType() const
+- {
+- return Rendition;
+- }
+-
+- MediaRendition * LinkRendition::rendition() const
+- {
+- Q_D( const LinkRendition );
+- return d->rendition;
+- }
+-
+- LinkRendition::RenditionAction LinkRendition::action() const
+- {
+- Q_D( const LinkRendition );
+- return d->action;
+- }
+-
+- QString LinkRendition::script() const
+- {
+- Q_D( const LinkRendition );
+- return d->script;
+- }
+-
+- bool LinkRendition::isReferencedAnnotation( const ScreenAnnotation *annotation ) const
+- {
+- Q_D( const LinkRendition );
+- if ( d->annotationReference.num != -1 && d->annotationReference == annotation->d_ptr->pdfObjectReference() )
+- {
+- return true;
+- }
+-
+- return false;
+- }
+-
+- // LinkJavaScript
+- LinkJavaScript::LinkJavaScript( const QRectF &linkArea, const QString &js )
+- : Link( *new LinkJavaScriptPrivate( linkArea ) )
+- {
+- Q_D( LinkJavaScript );
+- d->js = js;
+- }
+-
+- LinkJavaScript::~LinkJavaScript()
+- {
+- }
+-
+- Link::LinkType LinkJavaScript::linkType() const
+- {
+- return JavaScript;
+- }
+-
+- QString LinkJavaScript::script() const
+- {
+- Q_D( const LinkJavaScript );
+- return d->js;
+- }
+-
+- // LinkMovie
+- LinkMovie::LinkMovie( const QRectF &linkArea, Operation operation, const QString &annotationTitle, const Ref &annotationReference )
+- : Link( *new LinkMoviePrivate( linkArea, operation, annotationTitle, annotationReference ) )
+- {
+- }
+-
+- LinkMovie::~LinkMovie()
+- {
+- }
+-
+- Link::LinkType LinkMovie::linkType() const
+- {
+- return Movie;
+- }
+-
+- LinkMovie::Operation LinkMovie::operation() const
+- {
+- Q_D( const LinkMovie );
+- return d->operation;
+- }
+-
+- bool LinkMovie::isReferencedAnnotation( const MovieAnnotation *annotation ) const
+- {
+- Q_D( const LinkMovie );
+- if ( d->annotationReference.num != -1 && d->annotationReference == annotation->d_ptr->pdfObjectReference() )
+- {
+- return true;
+- }
+- else if ( !d->annotationTitle.isNull() )
+- {
+- return ( annotation->movieTitle() == d->annotationTitle );
+- }
+-
+- return false;
+- }
+-
+- LinkOCGState::LinkOCGState( LinkOCGStatePrivate *ocgp )
+- : Link ( *ocgp )
+- {
+- }
+-
+- LinkOCGState::~LinkOCGState()
+- {
+- }
+-
+- Link::LinkType LinkOCGState::linkType() const
+- {
+- return OCGState;
+- }
+-}
+diff --git a/qt4/src/poppler-link.h b/qt4/src/poppler-link.h
+deleted file mode 100644
+index 42a8c1fc..00000000
+--- a/qt4/src/poppler-link.h
++++ /dev/null
+@@ -1,641 +0,0 @@
+-/* poppler-link.h: qt interface to poppler
+- * Copyright (C) 2006, 2013, 2016, Albert Astals Cid <aacid@kde.org>
+- * Copyright (C) 2007-2008, 2010, Pino Toscano <pino@kde.org>
+- * Copyright (C) 2010, 2012, Guillermo Amaral <gamaral@kdab.com>
+- * Copyright (C) 2012, Tobias Koenig <tokoe@kdab.com>
+- * Adapting code from
+- * Copyright (C) 2004 by Enrico Ros <eros.kde@email.it>
+- *
+- * This program is free software; you can redistribute it and/or modify
+- * it under the terms of the GNU General Public License as published by
+- * the Free Software Foundation; either version 2, or (at your option)
+- * any later version.
+- *
+- * This program is distributed in the hope that it will be useful,
+- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+- * GNU General Public License for more details.
+- *
+- * You should have received a copy of the GNU General Public License
+- * along with this program; if not, write to the Free Software
+- * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+- */
+-
+-#ifndef _POPPLER_LINK_H_
+-#define _POPPLER_LINK_H_
+-
+-#include <QtCore/QString>
+-#include <QtCore/QRectF>
+-#include <QtCore/QSharedDataPointer>
+-#include "poppler-export.h"
+-
+-struct Ref;
+-class MediaRendition;
+-class MovieAnnotation;
+-class ScreenAnnotation;
+-
+-namespace Poppler {
+-
+-class LinkPrivate;
+-class LinkGotoPrivate;
+-class LinkExecutePrivate;
+-class LinkBrowsePrivate;
+-class LinkActionPrivate;
+-class LinkSoundPrivate;
+-class LinkJavaScriptPrivate;
+-class LinkMoviePrivate;
+-class LinkDestinationData;
+-class LinkDestinationPrivate;
+-class LinkRenditionPrivate;
+-class LinkOCGStatePrivate;
+-class MediaRendition;
+-class SoundObject;
+-
+-/**
+- * \short A destination.
+- *
+- * The LinkDestination class represent a "destination" (in terms of visual
+- * viewport to be displayed) for \link Poppler::LinkGoto GoTo\endlink links,
+- * and items in the table of contents (TOC) of a document.
+- *
+- * Coordinates are in 0..1 range
+- */
+-class POPPLER_QT4_EXPORT LinkDestination
+-{
+- public:
+- /**
+- * The possible kind of "viewport destination".
+- */
+- enum Kind
+- {
+- /**
+- * The new viewport is specified in terms of:
+- * - possibile new left coordinate (see isChangeLeft() )
+- * - possibile new top coordinate (see isChangeTop() )
+- * - possibile new zoom level (see isChangeZoom() )
+- */
+- destXYZ = 1,
+- destFit = 2,
+- destFitH = 3,
+- destFitV = 4,
+- destFitR = 5,
+- destFitB = 6,
+- destFitBH = 7,
+- destFitBV = 8
+- };
+-
+- /// \cond PRIVATE
+- LinkDestination(const LinkDestinationData &data);
+- LinkDestination(const QString &description);
+- /// \endcond
+- /**
+- * Copy constructor.
+- */
+- LinkDestination(const LinkDestination &other);
+- /**
+- * Destructor.
+- */
+- ~LinkDestination();
+-
+- // Accessors.
+- /**
+- * The kind of destination.
+- */
+- Kind kind() const;
+- /**
+- * Which page is the target of this destination.
+- *
+- * \note this number is 1-based, so for a 5 pages document the
+- * valid page numbers go from 1 to 5 (both included).
+- */
+- int pageNumber() const;
+- /**
+- * The new left for the viewport of the target page, in case
+- * it is specified to be changed (see isChangeLeft() )
+- */
+- double left() const;
+- double bottom() const;
+- double right() const;
+- /**
+- * The new top for the viewport of the target page, in case
+- * it is specified to be changed (see isChangeTop() )
+- */
+- double top() const;
+- double zoom() const;
+- /**
+- * Whether the left of the viewport on the target page should
+- * be changed.
+- *
+- * \see left()
+- */
+- bool isChangeLeft() const;
+- /**
+- * Whether the top of the viewport on the target page should
+- * be changed.
+- *
+- * \see top()
+- */
+- bool isChangeTop() const;
+- /**
+- * Whether the zoom level should be changed.
+- *
+- * \see zoom()
+- */
+- bool isChangeZoom() const;
+-
+- /**
+- * Return a string repesentation of this destination.
+- */
+- QString toString() const;
+-
+- /**
+- * Return the name of this destination.
+- *
+- * \since 0.12
+- */
+- QString destinationName() const;
+-
+- /**
+- * Assignment operator.
+- */
+- LinkDestination& operator=(const LinkDestination &other);
+-
+- private:
+- QSharedDataPointer< LinkDestinationPrivate > d;
+-};
+-
+-/**
+- * \short Encapsulates data that describes a link.
+- *
+- * This is the base class for links. It makes mandatory for inherited
+- * kind of links to reimplement the linkType() method and return the type of
+- * the link described by the reimplemented class.
+- */
+-class POPPLER_QT4_EXPORT Link
+-{
+- friend class OptContentModel;
+-
+- public:
+- /// \cond PRIVATE
+- Link( const QRectF &linkArea );
+- /// \endcond
+-
+- /**
+- * The possible kinds of link.
+- *
+- * Inherited classes must return an unique identifier
+- */
+- enum LinkType
+- {
+- None, ///< Unknown link
+- Goto, ///< A "Go To" link
+- Execute, ///< A command to be executed
+- Browse, ///< An URL to be browsed (eg "http://poppler.freedesktop.org")
+- Action, ///< A "standard" action to be executed in the viewer
+- Sound, ///< A link representing a sound to be played
+- Movie, ///< An action to be executed on a movie
+- Rendition, ///< A rendition link \since 0.20
+- JavaScript, ///< A JavaScript code to be interpreted \since 0.10
+- OCGState ///< An Optional Content Group state change \since 0.50
+- };
+-
+- /**
+- * The type of this link.
+- */
+- virtual LinkType linkType() const;
+-
+- /**
+- * Destructor.
+- */
+- virtual ~Link();
+-
+- /**
+- * The area of a Page where the link should be active.
+- *
+- * \note this can be a null rect, in this case the link represents
+- * a general action. The area is given in 0..1 range
+- */
+- QRectF linkArea() const;
+-
+- protected:
+- /// \cond PRIVATE
+- Link( LinkPrivate &dd );
+- Q_DECLARE_PRIVATE( Link )
+- LinkPrivate *d_ptr;
+- /// \endcond
+-
+- private:
+- Q_DISABLE_COPY( Link )
+-};
+-
+-
+-/**
+- * \brief Viewport reaching request.
+- *
+- * With a LinkGoto link, the document requests the specified viewport to be
+- * reached (aka, displayed in a viewer). Furthermore, if a file name is specified,
+- * then the destination refers to that document (and not to the document the
+- * current LinkGoto belongs to).
+- */
+-class POPPLER_QT4_EXPORT LinkGoto : public Link
+-{
+- public:
+- /**
+- * Create a new Goto link.
+- *
+- * \param linkArea the active area of the link
+- * \param extFileName if not empty, the file name to be open
+- * \param destination the destination to be reached
+- */
+- LinkGoto( const QRectF &linkArea, QString extFileName, const LinkDestination & destination );
+- /**
+- * Destructor.
+- */
+- ~LinkGoto();
+-
+- /**
+- * Whether the destination is in an external document
+- * (i.e. not the current document)
+- */
+- bool isExternal() const;
+- // query for goto parameters
+- /**
+- * The file name of the document the destination() refers to,
+- * or an empty string in case it refers to the current document.
+- */
+- QString fileName() const;
+- /**
+- * The destination to reach.
+- */
+- LinkDestination destination() const;
+- LinkType linkType() const override;
+-
+- private:
+- Q_DECLARE_PRIVATE( LinkGoto )
+- Q_DISABLE_COPY( LinkGoto )
+-};
+-
+-/**
+- * \brief Generic execution request.
+- *
+- * The LinkExecute link represent a "file name" execution request. The result
+- * depends on the \link fileName() file name\endlink:
+- * - if it is a document, then it is requested to be open
+- * - otherwise, it represents an executable to be run with the specified parameters
+- */
+-class POPPLER_QT4_EXPORT LinkExecute : public Link
+-{
+- public:
+- /**
+- * The file name to be executed
+- */
+- QString fileName() const;
+- /**
+- * The parameters for the command.
+- */
+- QString parameters() const;
+-
+- /**
+- * Create a new Execute link.
+- *
+- * \param linkArea the active area of the link
+- * \param file the file name to be open, or the program to be execute
+- * \param params the parameters for the program to execute
+- */
+- LinkExecute( const QRectF &linkArea, const QString & file, const QString & params );
+- /**
+- * Destructor.
+- */
+- ~LinkExecute();
+- LinkType linkType() const;
+-
+- private:
+- Q_DECLARE_PRIVATE( LinkExecute )
+- Q_DISABLE_COPY( LinkExecute )
+-};
+-
+-/**
+- * \brief An URL to browse.
+- *
+- * The LinkBrowse link holds a URL (eg 'http://poppler.freedesktop.org',
+- * 'mailto:john@some.org', etc) to be open.
+- *
+- * The format of the URL is specified by RFC 2396 (http://www.ietf.org/rfc/rfc2396.txt)
+- */
+-class POPPLER_QT4_EXPORT LinkBrowse : public Link
+-{
+- public:
+- /**
+- * The URL to open
+- */
+- QString url() const;
+-
+- /**
+- * Create a new browse link.
+- *
+- * \param linkArea the active area of the link
+- * \param url the URL to be open
+- */
+- LinkBrowse( const QRectF &linkArea, const QString &url );
+- /**
+- * Destructor.
+- */
+- ~LinkBrowse();
+- LinkType linkType() const;
+-
+- private:
+- Q_DECLARE_PRIVATE( LinkBrowse )
+- Q_DISABLE_COPY( LinkBrowse )
+-};
+-
+-/**
+- * \brief "Standard" action request.
+- *
+- * The LinkAction class represents a link that request a "standard" action
+- * to be performed by the viewer on the displayed document.
+- */
+-class POPPLER_QT4_EXPORT LinkAction : public Link
+-{
+- public:
+- /**
+- * The possible types of actions
+- */
+- enum ActionType { PageFirst = 1,
+- PagePrev = 2,
+- PageNext = 3,
+- PageLast = 4,
+- HistoryBack = 5,
+- HistoryForward = 6,
+- Quit = 7,
+- Presentation = 8,
+- EndPresentation = 9,
+- Find = 10,
+- GoToPage = 11,
+- Close = 12,
+- Print = 13 ///< \since 0.16
+- };
+-
+- /**
+- * The action of the current LinkAction
+- */
+- ActionType actionType() const;
+-
+- /**
+- * Create a new Action link, that executes a specified action
+- * on the document.
+- *
+- * \param linkArea the active area of the link
+- * \param actionType which action should be executed
+- */
+- LinkAction( const QRectF &linkArea, ActionType actionType );
+- /**
+- * Destructor.
+- */
+- ~LinkAction();
+- LinkType linkType() const;
+-
+- private:
+- Q_DECLARE_PRIVATE( LinkAction )
+- Q_DISABLE_COPY( LinkAction )
+-};
+-
+-/**
+- * Sound: a sound to be played.
+- *
+- * \since 0.6
+- */
+-class POPPLER_QT4_EXPORT LinkSound : public Link
+-{
+- public:
+- // create a Link_Sound
+- LinkSound( const QRectF &linkArea, double volume, bool sync, bool repeat, bool mix, SoundObject *sound );
+- /**
+- * Destructor.
+- */
+- virtual ~LinkSound();
+-
+- LinkType linkType() const;
+-
+- /**
+- * The volume to be used when playing the sound.
+- *
+- * The volume is in the range [ -1, 1 ], where:
+- * - a negative number: no volume (mute)
+- * - 1: full volume
+- */
+- double volume() const;
+- /**
+- * Whether the playback of the sound should be synchronous
+- * (thus blocking, waiting for the end of the sound playback).
+- */
+- bool synchronous() const;
+- /**
+- * Whether the sound should be played continuously (that is,
+- * started again when it ends)
+- */
+- bool repeat() const;
+- /**
+- * Whether the playback of this sound can be mixed with
+- * playbacks with other sounds of the same document.
+- *
+- * \note When false, any other playback must be stopped before
+- * playing the sound.
+- */
+- bool mix() const;
+- /**
+- * The sound object to be played
+- */
+- SoundObject *sound() const;
+-
+- private:
+- Q_DECLARE_PRIVATE( LinkSound )
+- Q_DISABLE_COPY( LinkSound )
+-};
+-
+-/**
+- * Rendition: Rendition link.
+- *
+- * \since 0.20
+- */
+-class POPPLER_QT4_EXPORT LinkRendition : public Link
+-{
+- public:
+- /**
+- * Describes the possible rendition actions.
+- *
+- * \since 0.22
+- */
+- enum RenditionAction {
+- NoRendition,
+- PlayRendition,
+- StopRendition,
+- PauseRendition,
+- ResumeRendition
+- };
+-
+- /**
+- * Create a new rendition link.
+- *
+- * \param linkArea the active area of the link
+- * \param rendition the media rendition object. Ownership is taken
+- *
+- * \deprecated Use the constructor that takes all parameter instead
+- */
+- Q_DECL_DEPRECATED LinkRendition( const QRectF &linkArea, ::MediaRendition *rendition );
+-
+- /**
+- * Create a new rendition link.
+- *
+- * \param linkArea the active area of the link
+- * \param rendition the media rendition object. Ownership is taken
+- * \param operation the numeric operation (action) (@see ::LinkRendition::RenditionOperation)
+- * \param script the java script code
+- * \param annotationReference the object reference of the screen annotation associated with this rendition action
+- * \since 0.22
+- */
+- LinkRendition( const QRectF &linkArea, ::MediaRendition *rendition, int operation, const QString &script, const Ref &annotationReference );
+-
+- /**
+- * Destructor.
+- */
+- virtual ~LinkRendition();
+-
+- LinkType linkType() const;
+-
+- /**
+- * Returns the media rendition object if the redition provides one, @c 0 otherwise
+- */
+- MediaRendition *rendition() const;
+-
+- /**
+- * Returns the action that should be executed if a rendition object is provided.
+- *
+- * \since 0.22
+- */
+- RenditionAction action() const;
+-
+- /**
+- * The JS code that shall be executed or an empty string.
+- *
+- * \since 0.22
+- */
+- QString script() const;
+-
+- /**
+- * Returns whether the given @p annotation is the referenced screen annotation for this rendition @p link.
+- *
+- * \since 0.22
+- */
+- bool isReferencedAnnotation( const ScreenAnnotation *annotation ) const;
+-
+- private:
+- Q_DECLARE_PRIVATE( LinkRendition )
+- Q_DISABLE_COPY( LinkRendition )
+-};
+-
+-/**
+- * JavaScript: a JavaScript code to be interpreted.
+- *
+- * \since 0.10
+- */
+-class POPPLER_QT4_EXPORT LinkJavaScript : public Link
+-{
+- public:
+- /**
+- * Create a new JavaScript link.
+- *
+- * \param linkArea the active area of the link
+- * \param js the JS code to be interpreted
+- */
+- LinkJavaScript( const QRectF &linkArea, const QString &js );
+- /**
+- * Destructor.
+- */
+- virtual ~LinkJavaScript();
+-
+- LinkType linkType() const;
+-
+- /**
+- * The JS code
+- */
+- QString script() const;
+-
+- private:
+- Q_DECLARE_PRIVATE( LinkJavaScript )
+- Q_DISABLE_COPY( LinkJavaScript )
+-};
+-
+-/**
+- * Movie: a movie to be played.
+- *
+- * \since 0.20
+- */
+-class POPPLER_QT4_EXPORT LinkMovie : public Link
+-{
+- public:
+- /**
+- * Describes the operation to be performed on the movie.
+- */
+- enum Operation { Play,
+- Stop,
+- Pause,
+- Resume
+- };
+-
+- /**
+- * Create a new Movie link.
+- *
+- * \param linkArea the active area of the link
+- * \param operation the operation to be performed on the movie
+- * \param annotationTitle the title of the movie annotation identifying the movie to be played
+- * \param annotationReference the object reference of the movie annotation identifying the movie to be played
+- *
+- * Note: This constructor is supposed to be used by Poppler::Page only.
+- */
+- LinkMovie( const QRectF &linkArea, Operation operation, const QString &annotationTitle, const Ref &annotationReference );
+- /**
+- * Destructor.
+- */
+- ~LinkMovie();
+- LinkType linkType() const;
+- /**
+- * Returns the operation to be performed on the movie.
+- */
+- Operation operation() const;
+- /**
+- * Returns whether the given @p annotation is the referenced movie annotation for this movie @p link.
+- */
+- bool isReferencedAnnotation( const MovieAnnotation *annotation ) const;
+-
+- private:
+- Q_DECLARE_PRIVATE( LinkMovie )
+- Q_DISABLE_COPY( LinkMovie )
+-};
+-
+-/**
+- * OCGState: an optional content group state change.
+- *
+- * \since 0.50
+- */
+-class POPPLER_QT4_EXPORT LinkOCGState : public Link
+-{
+- public:
+- /**
+- * Create a new OCGState link. This is only used by Poppler::Page.
+- */
+- LinkOCGState( LinkOCGStatePrivate *ocgp );
+- /**
+- * Destructor.
+- */
+- ~LinkOCGState();
+-
+- LinkType linkType() const;
+-
+- private:
+- Q_DECLARE_PRIVATE( LinkOCGState )
+- Q_DISABLE_COPY( LinkOCGState )
+-};
+-
+-}
+-
+-#endif
+diff --git a/qt4/src/poppler-media.cc b/qt4/src/poppler-media.cc
+deleted file mode 100644
+index f385f02e..00000000
+--- a/qt4/src/poppler-media.cc
++++ /dev/null
+@@ -1,168 +0,0 @@
+-/* poppler-media.cc: qt interface to poppler
+- * Copyright (C) 2012 Guillermo A. Amaral B. <gamaral@kde.org>
+- * Copyright (C) 2013 Albert Astals Cid <aacid@kde.org>
+- *
+- * This program is free software; you can redistribute it and/or modify
+- * it under the terms of the GNU General Public License as published by
+- * the Free Software Foundation; either version 2, or (at your option)
+- * any later version.
+- *
+- * This program is distributed in the hope that it will be useful,
+- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+- * GNU General Public License for more details.
+- *
+- * You should have received a copy of the GNU General Public License
+- * along with this program; if not, write to the Free Software
+- * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+- */
+-
+-#include "poppler-media.h"
+-
+-#include "Rendition.h"
+-
+-#include "poppler-private.h"
+-
+-#include <QtCore/QBuffer>
+-
+-#define BUFFER_MAX 4096
+-
+-namespace Poppler
+-{
+-
+-class MediaRenditionPrivate
+-{
+-public:
+-
+- MediaRenditionPrivate(::MediaRendition *rendition)
+- : rendition(rendition)
+- {
+- }
+-
+- ~MediaRenditionPrivate()
+- {
+- delete rendition;
+- }
+-
+- ::MediaRendition *rendition;
+-};
+-
+-MediaRendition::MediaRendition(::MediaRendition *rendition)
+- : d_ptr(new MediaRenditionPrivate(rendition))
+-{
+-}
+-
+-MediaRendition::~MediaRendition()
+-{
+- delete d_ptr;
+-}
+-
+-bool
+-MediaRendition::isValid() const
+-{
+- Q_D( const MediaRendition );
+- return d->rendition && d->rendition->isOk();
+-}
+-
+-QString
+-MediaRendition::contentType() const
+-{
+- Q_ASSERT(isValid() && "Invalid media rendition.");
+- Q_D( const MediaRendition );
+- return UnicodeParsedString(d->rendition->getContentType());
+-}
+-
+-QString
+-MediaRendition::fileName() const
+-{
+- Q_ASSERT(isValid() && "Invalid media rendition.");
+- Q_D( const MediaRendition );
+- return UnicodeParsedString(d->rendition->getFileName());
+-}
+-
+-bool
+-MediaRendition::isEmbedded() const
+-{
+- Q_ASSERT(isValid() && "Invalid media rendition.");
+- Q_D( const MediaRendition );
+- return d->rendition->getIsEmbedded();
+-}
+-
+-QByteArray
+-MediaRendition::data() const
+-{
+- Q_ASSERT(isValid() && "Invalid media rendition.");
+- Q_D( const MediaRendition );
+-
+- Stream *s = d->rendition->getEmbbededStream();
+- if (!s)
+- return QByteArray();
+-
+- QBuffer buffer;
+- Guchar data[BUFFER_MAX];
+- int bread;
+-
+- buffer.open(QIODevice::WriteOnly);
+- s->reset();
+- while ((bread = s->doGetChars(BUFFER_MAX, data)) != 0)
+- buffer.write(reinterpret_cast<const char *>(data), bread);
+- buffer.close();
+-
+- return buffer.data();
+-}
+-
+-bool
+-MediaRendition::autoPlay() const
+-{
+- Q_D( const MediaRendition );
+- if (d->rendition->getBEParameters()) {
+- return d->rendition->getBEParameters()->autoPlay;
+- } else if (d->rendition->getMHParameters()) {
+- return d->rendition->getMHParameters()->autoPlay;
+- } else qDebug("No BE or MH parameters to reference!");
+- return false;
+-}
+-
+-bool
+-MediaRendition::showControls() const
+-{
+- Q_D( const MediaRendition );
+- if (d->rendition->getBEParameters()) {
+- return d->rendition->getBEParameters()->showControls;
+- } else if (d->rendition->getMHParameters()) {
+- return d->rendition->getMHParameters()->showControls;
+- } else qDebug("No BE or MH parameters to reference!");
+- return false;
+-}
+-
+-float
+-MediaRendition::repeatCount() const
+-{
+- Q_D( const MediaRendition );
+- if (d->rendition->getBEParameters()) {
+- return d->rendition->getBEParameters()->repeatCount;
+- } else if (d->rendition->getMHParameters()) {
+- return d->rendition->getMHParameters()->repeatCount;
+- } else qDebug("No BE or MH parameters to reference!");
+- return 1.f;
+-}
+-
+-QSize
+-MediaRendition::size() const
+-{
+- Q_D( const MediaRendition );
+- MediaParameters *mp = 0;
+-
+- if (d->rendition->getBEParameters())
+- mp = d->rendition->getBEParameters();
+- else if (d->rendition->getMHParameters())
+- mp = d->rendition->getMHParameters();
+- else qDebug("No BE or MH parameters to reference!");
+-
+- if (mp)
+- return QSize(mp->windowParams.width, mp->windowParams.height);
+- return QSize();
+-}
+-
+-}
+-
+diff --git a/qt4/src/poppler-media.h b/qt4/src/poppler-media.h
+deleted file mode 100644
+index 34e5c361..00000000
+--- a/qt4/src/poppler-media.h
++++ /dev/null
+@@ -1,100 +0,0 @@
+-/* poppler-media.h: qt interface to poppler
+- * Copyright (C) 2012 Guillermo A. Amaral B. <gamaral@kde.org>
+- * Copyright (C) 2012, 2013 Albert Astals Cid <aacid@kde.org>
+- *
+- * This program is free software; you can redistribute it and/or modify
+- * it under the terms of the GNU General Public License as published by
+- * the Free Software Foundation; either version 2, or (at your option)
+- * any later version.
+- *
+- * This program is distributed in the hope that it will be useful,
+- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+- * GNU General Public License for more details.
+- *
+- * You should have received a copy of the GNU General Public License
+- * along with this program; if not, write to the Free Software
+- * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+- */
+-
+-#ifndef __POPPLER_MEDIARENDITION_H__
+-#define __POPPLER_MEDIARENDITION_H__
+-
+-#include "poppler-export.h"
+-
+-#include <QtCore/QSize>
+-#include <QtCore/QString>
+-
+-class MediaRendition;
+-class QIODevice;
+-
+-namespace Poppler
+-{
+- class MediaRenditionPrivate;
+-
+- /**
+- Qt wrapper for MediaRendition.
+-
+- \since 0.20
+- */
+- class POPPLER_QT4_EXPORT MediaRendition {
+- public:
+- /**
+- Constructs a MediaRendition. Takes ownership of the passed rendition
+- */
+- MediaRendition(::MediaRendition *rendition);
+- ~MediaRendition();
+-
+- /**
+- Check if wrapper is holding a valid rendition object.
+- */
+- bool isValid() const;
+-
+- /**
+- Returns content type.
+- */
+- QString contentType() const;
+-
+- /**
+- Returns file name.
+- */
+- QString fileName() const;
+-
+- /**
+- Returns true if media is embedded.
+- */
+- bool isEmbedded() const;
+-
+- /**
+- Returns data buffer.
+- */
+- QByteArray data() const;
+-
+- /**
+- Convenience accessor for auto-play parameter.
+- */
+- bool autoPlay() const;
+-
+- /**
+- Convenience accessor for show controls parameter.
+- */
+- bool showControls() const;
+-
+- /**
+- Convenience accessor for repeat count parameter.
+- */
+- float repeatCount() const;
+-
+- /**
+- Convenience accessor for size parameter.
+- */
+- QSize size() const;
+-
+- private:
+- Q_DECLARE_PRIVATE( MediaRendition )
+- MediaRenditionPrivate *d_ptr;
+- Q_DISABLE_COPY( MediaRendition )
+- };
+-}
+-
+-#endif /* __POPPLER_MEDIARENDITION_H__ */
+diff --git a/qt4/src/poppler-movie.cc b/qt4/src/poppler-movie.cc
+deleted file mode 100644
+index a64847c0..00000000
+--- a/qt4/src/poppler-movie.cc
++++ /dev/null
+@@ -1,110 +0,0 @@
+-/* poppler-sound.cc: qt interface to poppler
+- * Copyright (C) 2008, 2010, Pino Toscano <pino@kde.org>
+- * Copyright (C) 2008, Albert Astals Cid <aacid@kde.org>
+- * Copyright (C) 2010, Carlos Garcia Campos <carlosgc@gnome.org>
+- * Copyright (C) 2012, Tobias Koenig <tobias.koenig@kdab.com>
+- *
+- * This program is free software; you can redistribute it and/or modify
+- * it under the terms of the GNU General Public License as published by
+- * the Free Software Foundation; either version 2, or (at your option)
+- * any later version.
+- *
+- * This program is distributed in the hope that it will be useful,
+- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+- * GNU General Public License for more details.
+- *
+- * You should have received a copy of the GNU General Public License
+- * along with this program; if not, write to the Free Software
+- * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+- */
+-
+-#include "poppler-qt4.h"
+-
+-#include "Object.h"
+-#include "Annot.h"
+-#include "Movie.h"
+-
+-#include <QtGui/QImage>
+-
+-namespace Poppler
+-{
+-
+-class MovieData
+-{
+-public:
+- MovieData()
+- : m_movieObj( 0 )
+- {
+- }
+-
+- ~MovieData()
+- {
+- delete m_movieObj;
+- }
+-
+- Movie *m_movieObj;
+- QSize m_size;
+- int m_rotation;
+- QImage m_posterImage;
+- MovieObject::PlayMode m_playMode : 3;
+- bool m_showControls : 1;
+-};
+-
+-MovieObject::MovieObject( AnnotMovie *ann )
+-{
+- m_movieData = new MovieData();
+- m_movieData->m_movieObj = ann->getMovie()->copy();
+- //TODO: copy poster image
+-
+- MovieActivationParameters *mp = m_movieData->m_movieObj->getActivationParameters();
+- int width, height;
+- m_movieData->m_movieObj->getFloatingWindowSize(&width, &height);
+- m_movieData->m_size = QSize(width, height);
+- m_movieData->m_rotation = m_movieData->m_movieObj->getRotationAngle();
+- m_movieData->m_showControls = mp->showControls;
+- m_movieData->m_playMode = (MovieObject::PlayMode)mp->repeatMode;
+-}
+-
+-MovieObject::~MovieObject()
+-{
+- delete m_movieData;
+-}
+-
+-QString MovieObject::url() const
+-{
+- GooString * goo = m_movieData->m_movieObj->getFileName();
+- return goo ? QString( goo->getCString() ) : QString();
+-}
+-
+-QSize MovieObject::size() const
+-{
+- return m_movieData->m_size;
+-}
+-
+-int MovieObject::rotation() const
+-{
+- return m_movieData->m_rotation;
+-}
+-
+-bool MovieObject::showControls() const
+-{
+- return m_movieData->m_showControls;
+-}
+-
+-MovieObject::PlayMode MovieObject::playMode() const
+-{
+- return m_movieData->m_playMode;
+-}
+-
+-bool MovieObject::showPosterImage() const
+-{
+- return (m_movieData->m_movieObj->getShowPoster() == gTrue);
+-}
+-
+-QImage MovieObject::posterImage() const
+-{
+- return m_movieData->m_posterImage;
+-}
+-
+-}
+diff --git a/qt4/src/poppler-optcontent-private.h b/qt4/src/poppler-optcontent-private.h
+deleted file mode 100644
+index b5e52999..00000000
+--- a/qt4/src/poppler-optcontent-private.h
++++ /dev/null
+@@ -1,124 +0,0 @@
+-/* poppler-optcontent-private.h: qt interface to poppler
+- *
+- * Copyright (C) 2007, Brad Hards <bradh@kde.org>
+- * Copyright (C) 2008, Pino Toscano <pino@kde.org>
+- * Copyright (C) 2016, Albert Astals Cid <aacid@kde.org>
+- * Copyright (C) 2017, Hubert Figuière <hub@figuiere.net>
+- *
+- * This program is free software; you can redistribute it and/or modify
+- * it under the terms of the GNU General Public License as published by
+- * the Free Software Foundation; either version 2, or (at your option)
+- * any later version.
+- *
+- * This program is distributed in the hope that it will be useful,
+- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+- * GNU General Public License for more details.
+- *
+- * You should have received a copy of the GNU General Public License
+- * along with this program; if not, write to the Free Software
+- * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+- */
+-
+-#ifndef POPPLER_OPTCONTENT_PRIVATE_H
+-#define POPPLER_OPTCONTENT_PRIVATE_H
+-
+-#include <QtCore/QMap>
+-#include <QtCore/QSet>
+-#include <QtCore/QString>
+-
+-class Array;
+-class OCGs;
+-class OptionalContentGroup;
+-
+-class QModelIndex;
+-
+-namespace Poppler
+-{
+- class OptContentItem;
+- class OptContentModel;
+- class OptContentModelPrivate;
+-
+- class RadioButtonGroup
+- {
+- public:
+- RadioButtonGroup( OptContentModelPrivate *ocModel, Array *rbarray);
+- ~RadioButtonGroup();
+- QSet<OptContentItem *> setItemOn( OptContentItem *itemToSetOn );
+-
+- private:
+- QList<OptContentItem*> itemsInGroup;
+- };
+-
+- class OptContentItem
+- {
+- public:
+- enum ItemState { On, Off, HeadingOnly };
+-
+- OptContentItem( OptionalContentGroup *group );
+- OptContentItem( const QString &label );
+- OptContentItem();
+- ~OptContentItem();
+-
+- QString name() const { return m_name; }
+- ItemState state() const { return m_stateBackup; }
+- void setState(ItemState state, bool obeyRadioGroups, QSet<OptContentItem *> &changedItems);
+-
+- QList<OptContentItem*> childList() { return m_children; }
+-
+- void setParent( OptContentItem* parent) { m_parent = parent; }
+- OptContentItem* parent() { return m_parent; }
+-
+- void addChild( OptContentItem *child );
+-
+- void appendRBGroup( RadioButtonGroup *rbgroup );
+-
+- bool isEnabled() const { return m_enabled; }
+-
+- QSet<OptContentItem*> recurseListChildren(bool includeMe = false) const;
+-
+- private:
+- OptionalContentGroup *m_group;
+- QString m_name;
+- ItemState m_state; // true for ON, false for OFF
+- ItemState m_stateBackup;
+- QList<OptContentItem*> m_children;
+- OptContentItem *m_parent;
+- QList<RadioButtonGroup*> m_rbGroups;
+- bool m_enabled;
+- };
+-
+- class OptContentModelPrivate
+- {
+- public:
+- OptContentModelPrivate( OptContentModel *qq, OCGs *optContent );
+- ~OptContentModelPrivate();
+-
+- void parseRBGroupsArray( Array *rBGroupArray );
+- OptContentItem *nodeFromIndex(const QModelIndex &index, bool canBeNull = false) const;
+- QModelIndex indexFromItem(OptContentItem *node, int column) const;
+-
+- /**
+- Get the OptContentItem corresponding to a given reference value.
+-
+- \param ref the reference number (e.g. from Object.getRefNum()) to look up
+-
+- \return the matching optional content item, or null if the reference wasn't found
+- */
+- OptContentItem *itemFromRef( const QString &ref ) const;
+- void setRootNode(OptContentItem *node);
+-
+- OptContentModel *q;
+-
+- QMap<QString, OptContentItem*> m_optContentItems;
+- QList<OptContentItem*> m_headerOptContentItems;
+- QList<RadioButtonGroup*> m_rbgroups;
+- OptContentItem *m_rootNode;
+-
+- private:
+- void addChild( OptContentItem *parent, OptContentItem *child);
+- void parseOrderArray( OptContentItem *parentNode, Array *orderArray );
+- };
+-}
+-
+-#endif
+diff --git a/qt4/src/poppler-optcontent.cc b/qt4/src/poppler-optcontent.cc
+deleted file mode 100644
+index 0e7b5345..00000000
+--- a/qt4/src/poppler-optcontent.cc
++++ /dev/null
+@@ -1,456 +0,0 @@
+-/* poppler-optcontent.cc: qt interface to poppler
+- *
+- * Copyright (C) 2007, Brad Hards <bradh@kde.org>
+- * Copyright (C) 2008, 2014, Pino Toscano <pino@kde.org>
+- * Copyright (C) 2008, Carlos Garcia Campos <carlosgc@gnome.org>
+- * Copyright (C) 2015-2017, Albert Astals Cid <aacid@kde.org>
+- * Copyright (C) 2017, Hubert Figuière <hub@figuiere.net>
+- *
+- * This program is free software; you can redistribute it and/or modify
+- * it under the terms of the GNU General Public License as published by
+- * the Free Software Foundation; either version 2, or (at your option)
+- * any later version.
+- *
+- * This program is distributed in the hope that it will be useful,
+- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+- * GNU General Public License for more details.
+- *
+- * You should have received a copy of the GNU General Public License
+- * along with this program; if not, write to the Free Software
+- * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+- */
+-
+-#include "poppler-optcontent.h"
+-
+-#include "poppler-optcontent-private.h"
+-
+-#include "poppler-private.h"
+-#include "poppler-link-private.h"
+-
+-#include <QtCore/QDebug>
+-#include <QtCore/QtAlgorithms>
+-
+-#include "poppler/OptionalContent.h"
+-#include "poppler/Link.h"
+-
+-namespace Poppler
+-{
+-
+- RadioButtonGroup::RadioButtonGroup( OptContentModelPrivate *ocModel, Array *rbarray )
+- {
+- itemsInGroup.reserve( rbarray->getLength() );
+- for (int i = 0; i < rbarray->getLength(); ++i) {
+- Object ref = rbarray->getNF( i );
+- if ( ! ref.isRef() ) {
+- qDebug() << "expected ref, but got:" << ref.getType();
+- }
+- OptContentItem *item = ocModel->itemFromRef( QString::number(ref.getRefNum() ) );
+- itemsInGroup.append( item );
+- }
+- for (int i = 0; i < itemsInGroup.size(); ++i) {
+- OptContentItem *item = itemsInGroup.at(i);
+- item->appendRBGroup( this );
+- }
+- }
+-
+- RadioButtonGroup::~RadioButtonGroup()
+- {
+- }
+-
+- QSet<OptContentItem *> RadioButtonGroup::setItemOn( OptContentItem *itemToSetOn )
+- {
+- QSet<OptContentItem *> changedItems;
+- for (int i = 0; i < itemsInGroup.size(); ++i) {
+- OptContentItem *thisItem = itemsInGroup.at(i);
+- if (thisItem != itemToSetOn) {
+- QSet<OptContentItem *> newChangedItems;
+- thisItem->setState(OptContentItem::Off, false /*obeyRadioGroups*/, newChangedItems);
+- changedItems += newChangedItems;
+- }
+- }
+- return changedItems;
+- }
+-
+-
+-
+- OptContentItem::OptContentItem( OptionalContentGroup *group )
+- {
+- m_group = group;
+- m_parent = 0;
+- m_name = UnicodeParsedString( group->getName() );
+- if ( group->getState() == OptionalContentGroup::On ) {
+- m_state = OptContentItem::On;
+- } else {
+- m_state = OptContentItem::Off;
+- }
+- m_stateBackup = m_state;
+- m_enabled = true;
+- }
+-
+- OptContentItem::OptContentItem( const QString &label )
+- {
+- m_parent = 0;
+- m_name = label;
+- m_group = 0;
+- m_state = OptContentItem::HeadingOnly;
+- m_stateBackup = m_state;
+- m_enabled = true;
+- }
+-
+- OptContentItem::OptContentItem() :
+- m_parent( 0 ), m_enabled(true)
+- {
+- }
+-
+- OptContentItem::~OptContentItem()
+- {
+- }
+-
+- void OptContentItem::appendRBGroup( RadioButtonGroup *rbgroup )
+- {
+- m_rbGroups.append( rbgroup );
+- }
+-
+-
+- void OptContentItem::setState(ItemState state, bool obeyRadioGroups, QSet<OptContentItem *> &changedItems)
+- {
+- if (state == m_state)
+- return;
+-
+- m_state = state;
+- m_stateBackup = m_state;
+- changedItems.insert(this);
+- QSet<OptContentItem *> empty;
+- Q_FOREACH (OptContentItem *child, m_children) {
+- ItemState oldState = child->m_stateBackup;
+- child->setState(state == OptContentItem::On ? child->m_stateBackup : OptContentItem::Off, true /*obeyRadioGroups*/, empty);
+- child->m_enabled = state == OptContentItem::On;
+- child->m_stateBackup = oldState;
+- }
+- if (!m_group || !obeyRadioGroups) {
+- return;
+- }
+- if ( state == OptContentItem::On ) {
+- m_group->setState( OptionalContentGroup::On );
+- for (int i = 0; i < m_rbGroups.size(); ++i) {
+- RadioButtonGroup *rbgroup = m_rbGroups.at(i);
+- changedItems += rbgroup->setItemOn( this );
+- }
+- } else if ( state == OptContentItem::Off ) {
+- m_group->setState( OptionalContentGroup::Off );
+- }
+- }
+-
+- void OptContentItem::addChild( OptContentItem *child )
+- {
+- m_children += child;
+- child->setParent( this );
+- }
+-
+- QSet<OptContentItem*> OptContentItem::recurseListChildren(bool includeMe) const
+- {
+- QSet<OptContentItem*> ret;
+- if (includeMe) {
+- ret.insert(const_cast<OptContentItem*>(this));
+- }
+- Q_FOREACH (OptContentItem *child, m_children) {
+- ret += child->recurseListChildren(true);
+- }
+- return ret;
+- }
+-
+- OptContentModelPrivate::OptContentModelPrivate( OptContentModel *qq, OCGs *optContent )
+- : q(qq)
+- {
+- m_rootNode = new OptContentItem();
+- GooList *ocgs = optContent->getOCGs();
+-
+- for (int i = 0; i < ocgs->getLength(); ++i) {
+- OptionalContentGroup *ocg = static_cast<OptionalContentGroup*>(ocgs->get(i));
+- OptContentItem *node = new OptContentItem( ocg );
+- m_optContentItems.insert( QString::number(ocg->getRef().num), node);
+- }
+-
+- if ( optContent->getOrderArray() == 0 ) {
+- // no Order array, so drop them all at the top level
+- QMapIterator<QString, OptContentItem*> i(m_optContentItems);
+- while ( i.hasNext() ) {
+- i.next();
+- addChild( m_rootNode, i.value() );
+- }
+- } else {
+- parseOrderArray( m_rootNode, optContent->getOrderArray() );
+- }
+-
+- parseRBGroupsArray( optContent->getRBGroupsArray() );
+- }
+-
+- OptContentModelPrivate::~OptContentModelPrivate()
+- {
+- qDeleteAll( m_optContentItems );
+- qDeleteAll( m_rbgroups );
+- qDeleteAll( m_headerOptContentItems );
+- delete m_rootNode;
+- }
+-
+- void OptContentModelPrivate::parseOrderArray( OptContentItem *parentNode, Array *orderArray )
+- {
+- OptContentItem *lastItem = parentNode;
+- for (int i = 0; i < orderArray->getLength(); ++i) {
+- Object orderItem = orderArray->get(i);
+- if ( orderItem.isDict() ) {
+- Object item = orderArray->getNF(i);
+- if (item.isRef() ) {
+- OptContentItem *ocItem = m_optContentItems.value(QString::number(item.getRefNum()), 0);
+- if (ocItem) {
+- addChild( parentNode, ocItem );
+- lastItem = ocItem;
+- } else {
+- qDebug() << "could not find group for object" << item.getRefNum();
+- }
+- }
+- } else if ( (orderItem.isArray()) && (orderItem.arrayGetLength() > 0) ) {
+- parseOrderArray(lastItem, orderItem.getArray());
+- } else if ( orderItem.isString() ) {
+- GooString *label = orderItem.getString();
+- OptContentItem *header = new OptContentItem ( UnicodeParsedString ( label ) );
+- m_headerOptContentItems.append( header );
+- addChild( parentNode, header );
+- parentNode = header;
+- lastItem = header;
+- } else {
+- qDebug() << "something unexpected";
+- }
+- }
+- }
+-
+- void OptContentModelPrivate::parseRBGroupsArray( Array *rBGroupArray )
+- {
+- if (! rBGroupArray) {
+- return;
+- }
+- // This is an array of array(s)
+- for (int i = 0; i < rBGroupArray->getLength(); ++i) {
+- Object rbObj = rBGroupArray->get(i);
+- if ( ! rbObj.isArray() ) {
+- qDebug() << "expected inner array, got:" << rbObj.getType();
+- return;
+- }
+- Array *rbarray = rbObj.getArray();
+- RadioButtonGroup *rbg = new RadioButtonGroup( this, rbarray );
+- m_rbgroups.append( rbg );
+- }
+- }
+-
+- OptContentModel::OptContentModel( OCGs *optContent, QObject *parent)
+- : QAbstractItemModel(parent)
+- {
+- d = new OptContentModelPrivate( this, optContent );
+- }
+-
+- OptContentModel::~OptContentModel()
+- {
+- delete d;
+- }
+-
+- void OptContentModelPrivate::setRootNode(OptContentItem *node)
+- {
+- delete m_rootNode;
+- m_rootNode = node;
+- q->reset();
+- }
+-
+- QModelIndex OptContentModel::index(int row, int column, const QModelIndex &parent) const
+- {
+- if (row < 0 || column != 0) {
+- return QModelIndex();
+- }
+-
+- OptContentItem *parentNode = d->nodeFromIndex( parent );
+- if (row < parentNode->childList().count()) {
+- return createIndex(row, column, parentNode->childList().at(row));
+- }
+- return QModelIndex();
+- }
+-
+- QModelIndex OptContentModel::parent(const QModelIndex &child) const
+- {
+- OptContentItem *childNode = d->nodeFromIndex( child );
+- if (!childNode) {
+- return QModelIndex();
+- }
+- return d->indexFromItem(childNode->parent(), child.column());
+- }
+-
+- QModelIndex OptContentModelPrivate::indexFromItem(OptContentItem *node, int column) const
+- {
+- if (!node) {
+- return QModelIndex();
+- }
+- OptContentItem *parentNode = node->parent();
+- if (!parentNode) {
+- return QModelIndex();
+- }
+- const int row = parentNode->childList().indexOf(node);
+- return q->createIndex(row, column, node);
+- }
+-
+- int OptContentModel::rowCount(const QModelIndex &parent) const
+- {
+- OptContentItem *parentNode = d->nodeFromIndex( parent );
+- if (!parentNode) {
+- return 0;
+- } else {
+- return parentNode->childList().count();
+- }
+- }
+-
+- int OptContentModel::columnCount(const QModelIndex &parent) const
+- {
+- return 1;
+- }
+-
+-
+- QVariant OptContentModel::data(const QModelIndex &index, int role) const
+- {
+- OptContentItem *node = d->nodeFromIndex(index, true);
+- if (!node) {
+- return QVariant();
+- }
+-
+- switch (role) {
+- case Qt::DisplayRole:
+- return node->name();
+- break;
+- case Qt::EditRole:
+- if (node->state() == OptContentItem::On) {
+- return true;
+- } else if (node->state() == OptContentItem::Off) {
+- return false;
+- }
+- break;
+- case Qt::CheckStateRole:
+- if (node->state() == OptContentItem::On) {
+- return Qt::Checked;
+- } else if (node->state() == OptContentItem::Off) {
+- return Qt::Unchecked;
+- }
+- break;
+- }
+-
+- return QVariant();
+- }
+-
+- bool OptContentModel::setData ( const QModelIndex & index, const QVariant & value, int role )
+- {
+- OptContentItem *node = d->nodeFromIndex(index, true);
+- if (!node) {
+- return false;
+- }
+-
+- switch (role) {
+- case Qt::CheckStateRole:
+- {
+- const bool newvalue = value.toBool();
+- QSet<OptContentItem *> changedItems;
+- node->setState(newvalue ? OptContentItem::On : OptContentItem::Off, true /*obeyRadioGroups*/, changedItems);
+-
+- if (!changedItems.isEmpty()) {
+- changedItems += node->recurseListChildren(false);
+- QModelIndexList indexes;
+- Q_FOREACH (OptContentItem *item, changedItems) {
+- indexes.append(d->indexFromItem(item, 0));
+- }
+- qStableSort(indexes);
+- Q_FOREACH (const QModelIndex &changedIndex, indexes) {
+- emit dataChanged(changedIndex, changedIndex);
+- }
+- return true;
+- }
+- break;
+- }
+- }
+-
+- return false;
+- }
+-
+- Qt::ItemFlags OptContentModel::flags ( const QModelIndex & index ) const
+- {
+- OptContentItem *node = d->nodeFromIndex(index);
+- Qt::ItemFlags itemFlags = Qt::ItemIsSelectable | Qt::ItemIsUserCheckable;
+- if (node->isEnabled()) {
+- itemFlags |= Qt::ItemIsEnabled;
+- }
+- return itemFlags;
+- }
+-
+- QVariant OptContentModel::headerData( int section, Qt::Orientation orientation, int role ) const
+- {
+- return QAbstractItemModel::headerData( section, orientation, role );
+- }
+-
+- void OptContentModel::applyLink( LinkOCGState *link )
+- {
+- ::LinkOCGState *popplerLinkOCGState = static_cast<LinkOCGStatePrivate*>(link->d_ptr)->popplerLinkOCGState;
+-
+- QSet<OptContentItem *> changedItems;
+-
+- GooList *statesList = popplerLinkOCGState->getStateList();
+- for (int i = 0; i < statesList->getLength(); ++i) {
+- ::LinkOCGState::StateList *stateList = (::LinkOCGState::StateList*)statesList->get(i);
+-
+- GooList *refsList = stateList->list;
+- for (int j = 0; j < refsList->getLength(); ++j) {
+- Ref *ref = (Ref *)refsList->get(j);
+- OptContentItem *item = d->itemFromRef(QString::number(ref->num));
+-
+- if (stateList->st == ::LinkOCGState::On) {
+- item->setState(OptContentItem::On, popplerLinkOCGState->getPreserveRB(), changedItems);
+- } else if (stateList->st == ::LinkOCGState::Off) {
+- item->setState(OptContentItem::Off, popplerLinkOCGState->getPreserveRB(), changedItems);
+- } else {
+- OptContentItem::ItemState newState = item->state() == OptContentItem::On ? OptContentItem::Off : OptContentItem::On;
+- item->setState(newState, popplerLinkOCGState->getPreserveRB(), changedItems);
+- }
+- }
+- }
+-
+- if (!changedItems.isEmpty()) {
+- QSet<OptContentItem *> aux;
+- Q_FOREACH (OptContentItem *item, aux) {
+- changedItems += item->recurseListChildren(false);
+- }
+-
+- QModelIndexList indexes;
+- Q_FOREACH (OptContentItem *item, changedItems) {
+- indexes.append(d->indexFromItem(item, 0));
+- }
+- qStableSort(indexes);
+- Q_FOREACH (const QModelIndex &changedIndex, indexes) {
+- emit dataChanged(changedIndex, changedIndex);
+- }
+- }
+- }
+-
+- void OptContentModelPrivate::addChild( OptContentItem *parent, OptContentItem *child )
+- {
+- parent->addChild( child );
+- }
+-
+- OptContentItem* OptContentModelPrivate::itemFromRef( const QString &ref ) const
+- {
+- return m_optContentItems.value(ref, 0);
+- }
+-
+- OptContentItem* OptContentModelPrivate::nodeFromIndex(const QModelIndex &index, bool canBeNull) const
+- {
+- if (index.isValid()) {
+- return static_cast<OptContentItem *>(index.internalPointer());
+- } else {
+- return canBeNull ? 0 : m_rootNode;
+- }
+- }
+-}
+-
+-#include "poppler-optcontent.moc"
+diff --git a/qt4/src/poppler-optcontent.h b/qt4/src/poppler-optcontent.h
+deleted file mode 100644
+index bf00a88d..00000000
+--- a/qt4/src/poppler-optcontent.h
++++ /dev/null
+@@ -1,84 +0,0 @@
+-/* poppler-optcontent.h: qt interface to poppler
+- *
+- * Copyright (C) 2007, Brad Hards <bradh@kde.org>
+- * Copyright (C) 2008, Pino Toscano <pino@kde.org>
+- * Copyright (C) 2016, Albert Astals Cid <aacid@kde.org>
+- *
+- * This program is free software; you can redistribute it and/or modify
+- * it under the terms of the GNU General Public License as published by
+- * the Free Software Foundation; either version 2, or (at your option)
+- * any later version.
+- *
+- * This program is distributed in the hope that it will be useful,
+- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+- * GNU General Public License for more details.
+- *
+- * You should have received a copy of the GNU General Public License
+- * along with this program; if not, write to the Free Software
+- * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+- */
+-
+-#ifndef POPPLER_OPTCONTENT_H
+-#define POPPLER_OPTCONTENT_H
+-
+-#include <QtCore/QAbstractListModel>
+-
+-#include "poppler-export.h"
+-#include "poppler-link.h"
+-
+-class OCGs;
+-
+-namespace Poppler
+-{
+- class Document;
+- class OptContentModelPrivate;
+-
+- /**
+- * \brief Model for optional content
+- *
+- * OptContentModel is an item model representing the optional content items
+- * that can be found in PDF documents.
+- *
+- * The model offers a mostly read-only display of the data, allowing to
+- * enable/disable some contents setting the Qt::CheckStateRole data role.
+- *
+- * \since 0.8
+- */
+- class POPPLER_QT4_EXPORT OptContentModel : public QAbstractItemModel
+- {
+- friend class Document;
+-
+- Q_OBJECT
+-
+- public:
+- virtual ~OptContentModel();
+-
+- QModelIndex index(int row, int column, const QModelIndex &parent) const;
+- QModelIndex parent(const QModelIndex &child) const;
+-
+- int rowCount(const QModelIndex &parent = QModelIndex()) const;
+- int columnCount(const QModelIndex &parent) const;
+-
+- QVariant data(const QModelIndex &index, int role) const;
+- virtual bool setData ( const QModelIndex & index, const QVariant & value, int role = Qt::EditRole );
+-
+- Qt::ItemFlags flags ( const QModelIndex & index ) const;
+-
+- virtual QVariant headerData( int section, Qt::Orientation orientation, int role = Qt::DisplayRole ) const;
+-
+- /**
+- * Applies the Optional Content Changes specified by that link.
+- * \since 0.50
+- */
+- void applyLink( LinkOCGState *link );
+-
+- private:
+- OptContentModel( OCGs *optContent, QObject *parent = 0);
+-
+- friend class OptContentModelPrivate;
+- OptContentModelPrivate *d;
+- };
+-}
+-
+-#endif
+diff --git a/qt4/src/poppler-page-private.h b/qt4/src/poppler-page-private.h
+deleted file mode 100644
+index 1cb63e9f..00000000
+--- a/qt4/src/poppler-page-private.h
++++ /dev/null
+@@ -1,57 +0,0 @@
+-/* poppler-page.cc: qt interface to poppler
+- * Copyright (C) 2005, Net Integration Technologies, Inc.
+- * Copyright (C) 2007, 2012, Albert Astals Cid <aacid@kde.org>
+- * Copyright (C) 2008, Pino Toscano <pino@kde.org>
+- * Copyright (C) 2015 Adam Reichold <adamreichold@myopera.com>
+- *
+- * This program is free software; you can redistribute it and/or modify
+- * it under the terms of the GNU General Public License as published by
+- * the Free Software Foundation; either version 2, or (at your option)
+- * any later version.
+- *
+- * This program is distributed in the hope that it will be useful,
+- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+- * GNU General Public License for more details.
+- *
+- * You should have received a copy of the GNU General Public License
+- * along with this program; if not, write to the Free Software
+- * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+- */
+-
+-#ifndef _POPPLER_PAGE_PRIVATE_H_
+-#define _POPPLER_PAGE_PRIVATE_H_
+-
+-#include "CharTypes.h"
+-
+-class QRectF;
+-
+-class LinkAction;
+-class Page;
+-class TextPage;
+-
+-namespace Poppler
+-{
+-
+-class DocumentData;
+-class PageTransition;
+-
+-class PageData {
+-public:
+- Link* convertLinkActionToLink(::LinkAction * a, const QRectF &linkArea);
+-
+- DocumentData *parentDoc;
+- ::Page *page;
+- int index;
+- PageTransition *transition;
+-
+- static Link* convertLinkActionToLink(::LinkAction * a, DocumentData *parentDoc, const QRectF &linkArea);
+-
+- TextPage *prepareTextSearch(const QString &text, Page::Rotation rotate, QVector<Unicode> *u);
+- GBool performSingleTextSearch(TextPage* textPage, QVector<Unicode> &u, double &sLeft, double &sTop, double &sRight, double &sBottom, Page::SearchDirection direction, GBool sCase, GBool sWords);
+- QList<QRectF> performMultipleTextSearch(TextPage* textPage, QVector<Unicode> &u, GBool sCase, GBool sWords);
+-};
+-
+-}
+-
+-#endif
+diff --git a/qt4/src/poppler-page-transition-private.h b/qt4/src/poppler-page-transition-private.h
+deleted file mode 100644
+index 63febb09..00000000
+--- a/qt4/src/poppler-page-transition-private.h
++++ /dev/null
+@@ -1,28 +0,0 @@
+-/*
+- * Copyright (C) 2005, Albert Astals Cid
+- *
+- * This program is free software; you can redistribute it and/or modify
+- * it under the terms of the GNU General Public License as published by
+- * the Free Software Foundation; either version 2, or (at your option)
+- * any later version.
+- *
+- * This program is distributed in the hope that it will be useful,
+- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+- * GNU General Public License for more details.
+- *
+- * You should have received a copy of the GNU General Public License
+- * along with this program; if not, write to the Free Software
+- * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+- */
+-
+-class Object;
+-
+-namespace Poppler {
+-
+-class PageTransitionParams {
+- public:
+- Object *dictObj;
+-};
+-
+-}
+diff --git a/qt4/src/poppler-page-transition.cc b/qt4/src/poppler-page-transition.cc
+deleted file mode 100644
+index 4fa39edd..00000000
+--- a/qt4/src/poppler-page-transition.cc
++++ /dev/null
+@@ -1,101 +0,0 @@
+-/* PageTransition.cc
+- * Copyright (C) 2005, Net Integration Technologies, Inc.
+- * Copyright (C) 2015, Arseniy Lartsev <arseniy@alumni.chalmers.se>
+- *
+- * This program is free software; you can redistribute it and/or modify
+- * it under the terms of the GNU General Public License as published by
+- * the Free Software Foundation; either version 2, or (at your option)
+- * any later version.
+- *
+- * This program is distributed in the hope that it will be useful,
+- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+- * GNU General Public License for more details.
+- *
+- * You should have received a copy of the GNU General Public License
+- * along with this program; if not, write to the Free Software
+- * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+- */
+-
+-#include "PageTransition.h"
+-#include "poppler-page-transition.h"
+-#include "poppler-page-transition-private.h"
+-
+-namespace Poppler {
+-
+-class PageTransitionData
+-{
+- public:
+- PageTransitionData(Object *trans)
+- {
+- pt = new ::PageTransition(trans);
+- }
+-
+- PageTransitionData(const PageTransitionData &ptd)
+- {
+- pt = new ::PageTransition(*ptd.pt);
+- }
+-
+- ~PageTransitionData()
+- {
+- delete pt;
+- }
+-
+- ::PageTransition *pt;
+-};
+-
+-PageTransition::PageTransition(const PageTransitionParams &params)
+-{
+- data = new PageTransitionData(params.dictObj);
+-}
+-
+-PageTransition::PageTransition(const PageTransition &pt)
+-{
+- data = new PageTransitionData(*pt.data);
+-}
+-
+-PageTransition::~PageTransition()
+-{
+- delete data;
+-}
+-
+-PageTransition::Type PageTransition::type() const
+-{
+- return (Poppler::PageTransition::Type)data->pt->getType();
+-}
+-
+-int PageTransition::duration() const
+-{
+- return data->pt->getDuration();
+-}
+-
+-double PageTransition::durationReal() const
+-{
+- return data->pt->getDuration();
+-}
+-
+-PageTransition::Alignment PageTransition::alignment() const
+-{
+- return (Poppler::PageTransition::Alignment)data->pt->getAlignment();
+-}
+-
+-PageTransition::Direction PageTransition::direction() const
+-{
+- return (Poppler::PageTransition::Direction)data->pt->getDirection();
+-}
+-
+-int PageTransition::angle() const
+-{
+- return data->pt->getAngle();
+-}
+-
+-double PageTransition::scale() const
+-{
+- return data->pt->getScale();
+-}
+-bool PageTransition::isRectangular() const
+-{
+- return data->pt->isRectangular();
+-}
+-
+-}
+diff --git a/qt4/src/poppler-page-transition.h b/qt4/src/poppler-page-transition.h
+deleted file mode 100644
+index e92adbd8..00000000
+--- a/qt4/src/poppler-page-transition.h
++++ /dev/null
+@@ -1,158 +0,0 @@
+-/* PageTransition.h
+- * Copyright (C) 2005, Net Integration Technologies, Inc.
+- * Copyright (C) 2005, Brad Hards <bradh@frogmouth.net>
+- * Copyright (C) 2015, Arseniy Lartsev <arseniy@alumni.chalmers.se>
+- *
+- * This program is free software; you can redistribute it and/or modify
+- * it under the terms of the GNU General Public License as published by
+- * the Free Software Foundation; either version 2, or (at your option)
+- * any later version.
+- *
+- * This program is distributed in the hope that it will be useful,
+- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+- * GNU General Public License for more details.
+- *
+- * You should have received a copy of the GNU General Public License
+- * along with this program; if not, write to the Free Software
+- * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+- */
+-
+-#ifndef __PAGETRANSITION_X_H__
+-#define __PAGETRANSITION_X_H__
+-
+-#include "poppler-export.h"
+-
+-#include <QtCore/qglobal.h>
+-
+-namespace Poppler {
+-
+-class PageTransitionParams;
+-class PageTransitionData;
+-
+-/**
+- \brief Describes how a PDF file viewer shall perform the transition
+- from one page to another
+-
+- In PDF files there is a way to specify if the viewer shall use
+- certain effects to perform the transition from one page to
+- another. This feature can be used, e.g., in a PDF-based beamer
+- presentation.
+-
+- This utility class represents the transition effect, and can be
+- used to extract the information from a PDF object.
+-*/
+-
+-
+-class POPPLER_QT4_EXPORT PageTransition {
+- public:
+-
+- /** \brief transition effect that shall be used
+- */
+- // if changed remember to keep in sync with PageTransition.h enum
+- enum Type {
+- Replace = 0,
+- Split,
+- Blinds,
+- Box,
+- Wipe,
+- Dissolve,
+- Glitter,
+- Fly,
+- Push,
+- Cover,
+- Uncover,
+- Fade
+- };
+-
+- /** \brief alignment of the transition effect that shall be used
+- */
+- // if changed remember to keep in sync with PageTransition.h enum
+- enum Alignment {
+- Horizontal = 0,
+- Vertical
+- };
+-
+- /** \brief direction of the transition effect that shall be used
+- */
+- // if changed remember to keep in sync with PageTransition.h enum
+- enum Direction {
+- Inward = 0,
+- Outward
+- };
+-
+- /** \brief Construct a new PageTransition object from a page dictionary.
+-
+- Users of the library will rarely need to construct a
+- PageTransition object themselves. Instead, the method
+- Poppler::Page::transition() can be used to find out if a certain
+- transition effect is specified.
+-
+- @warning In case or error, this method will print an error message to stderr,
+- and construct a default object.
+-
+- @param params an object whose dictionary will be read and
+- parsed. This must be a valid object, whose dictionaries are
+- accessed by the constructor. The object is only accessed by this
+- constructor, and may be deleted after the constructor returns.
+- */
+- PageTransition(const PageTransitionParams &params);
+-
+- /** \brief copy constructor */
+- PageTransition(const PageTransition &pt);
+-
+- /**
+- Destructor
+- */
+- ~PageTransition();
+-
+- /**
+- \brief Get type of the transition.
+- */
+- Type type() const;
+-
+- /**
+- \brief Get duration of the transition in seconds as integer
+-
+- \deprecated This function is left for backward compatibility, use durationReal() instead.
+- */
+- Q_DECL_DEPRECATED int duration() const;
+-
+- /**
+- \brief Get duration of the transition in seconds
+- */
+- double durationReal() const;
+-
+- /**
+- \brief Get dimension in which the transition effect occurs.
+- */
+- Alignment alignment() const;
+-
+- /**
+- \brief Get direction of motion of the transition effect.
+- */
+- Direction direction() const;
+-
+- /**
+- \brief Get direction in which the transition effect moves.
+- */
+- int angle() const;
+-
+- /**
+- \brief Get starting or ending scale.
+- */
+- double scale() const;
+-
+- /**
+- \brief Returns true if the area to be flown is rectangular and
+- opaque.
+- */
+- bool isRectangular() const;
+-
+- private:
+- PageTransitionData *data;
+-};
+-
+-}
+-
+-#endif
+diff --git a/qt4/src/poppler-page.cc b/qt4/src/poppler-page.cc
+deleted file mode 100644
+index ffe6e99c..00000000
+--- a/qt4/src/poppler-page.cc
++++ /dev/null
+@@ -1,810 +0,0 @@
+-/* poppler-page.cc: qt interface to poppler
+- * Copyright (C) 2005, Net Integration Technologies, Inc.
+- * Copyright (C) 2005, Brad Hards <bradh@frogmouth.net>
+- * Copyright (C) 2005-2017, Albert Astals Cid <aacid@kde.org>
+- * Copyright (C) 2005, Stefan Kebekus <stefan.kebekus@math.uni-koeln.de>
+- * Copyright (C) 2006-2011, Pino Toscano <pino@kde.org>
+- * Copyright (C) 2008 Carlos Garcia Campos <carlosgc@gnome.org>
+- * Copyright (C) 2009 Shawn Rutledge <shawn.t.rutledge@gmail.com>
+- * Copyright (C) 2010, 2012, Guillermo Amaral <gamaral@kdab.com>
+- * Copyright (C) 2010 Suzuki Toshiya <mpsuzuki@hiroshima-u.ac.jp>
+- * Copyright (C) 2010 Matthias Fauconneau <matthias.fauconneau@gmail.com>
+- * Copyright (C) 2010 Hib Eris <hib@hiberis.nl>
+- * Copyright (C) 2012 Tobias Koenig <tokoe@kdab.com>
+- * Copyright (C) 2012 Fabio D'Urso <fabiodurso@hotmail.it>
+- * Copyright (C) 2012, 2015 Adam Reichold <adamreichold@myopera.com>
+- * Copyright (C) 2012, 2013 Thomas Freitag <Thomas.Freitag@alfa.de>
+- * Copyright (C) 2015 William Bader <williambader@hotmail.com>
+- * Copyright (C) 2016 Arseniy Lartsev <arseniy@alumni.chalmers.se>
+- * Copyright (C) 2017 Adrian Johnson <ajohnson@redneon.com>
+- *
+- * This program is free software; you can redistribute it and/or modify
+- * it under the terms of the GNU General Public License as published by
+- * the Free Software Foundation; either version 2, or (at your option)
+- * any later version.
+- *
+- * This program is distributed in the hope that it will be useful,
+- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+- * GNU General Public License for more details.
+- *
+- * You should have received a copy of the GNU General Public License
+- * along with this program; if not, write to the Free Software
+- * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+- */
+-
+-#include <poppler-qt4.h>
+-
+-#include <QtCore/QHash>
+-#include <QtCore/QMap>
+-#include <QtCore/QVarLengthArray>
+-#include <QtGui/QImage>
+-#include <QtGui/QPainter>
+-
+-#include <config.h>
+-#include <PDFDoc.h>
+-#include <Catalog.h>
+-#include <Form.h>
+-#include <ErrorCodes.h>
+-#include <TextOutputDev.h>
+-#include <Annot.h>
+-#include <Link.h>
+-#include <ArthurOutputDev.h>
+-#include <Rendition.h>
+-#if defined(HAVE_SPLASH)
+-#include <SplashOutputDev.h>
+-#include <splash/SplashBitmap.h>
+-#endif
+-
+-#include "poppler-private.h"
+-#include "poppler-page-transition-private.h"
+-#include "poppler-page-private.h"
+-#include "poppler-link-extractor-private.h"
+-#include "poppler-link-private.h"
+-#include "poppler-annotation-private.h"
+-#include "poppler-form.h"
+-#include "poppler-media.h"
+-
+-namespace Poppler {
+-
+-Link* PageData::convertLinkActionToLink(::LinkAction * a, const QRectF &linkArea)
+-{
+- return convertLinkActionToLink(a, parentDoc, linkArea);
+-}
+-
+-Link* PageData::convertLinkActionToLink(::LinkAction * a, DocumentData *parentDoc, const QRectF &linkArea)
+-{
+- if ( !a )
+- return NULL;
+-
+- Link * popplerLink = NULL;
+- switch ( a->getKind() )
+- {
+- case actionGoTo:
+- {
+- LinkGoTo * g = (LinkGoTo *) a;
+- const LinkDestinationData ldd( g->getDest(), g->getNamedDest(), parentDoc, false );
+- // create link: no ext file, namedDest, object pointer
+- popplerLink = new LinkGoto( linkArea, QString::null, LinkDestination( ldd ) );
+- }
+- break;
+-
+- case actionGoToR:
+- {
+- LinkGoToR * g = (LinkGoToR *) a;
+- // copy link file
+- const QString fileName = UnicodeParsedString( g->getFileName() );
+- const LinkDestinationData ldd( g->getDest(), g->getNamedDest(), parentDoc, !fileName.isEmpty() );
+- // ceate link: fileName, namedDest, object pointer
+- popplerLink = new LinkGoto( linkArea, fileName, LinkDestination( ldd ) );
+- }
+- break;
+-
+- case actionLaunch:
+- {
+- LinkLaunch * e = (LinkLaunch *)a;
+- GooString * p = e->getParams();
+- popplerLink = new LinkExecute( linkArea, e->getFileName()->getCString(), p ? p->getCString() : 0 );
+- }
+- break;
+-
+- case actionNamed:
+- {
+- const char * name = ((LinkNamed *)a)->getName()->getCString();
+- if ( !strcmp( name, "NextPage" ) )
+- popplerLink = new LinkAction( linkArea, LinkAction::PageNext );
+- else if ( !strcmp( name, "PrevPage" ) )
+- popplerLink = new LinkAction( linkArea, LinkAction::PagePrev );
+- else if ( !strcmp( name, "FirstPage" ) )
+- popplerLink = new LinkAction( linkArea, LinkAction::PageFirst );
+- else if ( !strcmp( name, "LastPage" ) )
+- popplerLink = new LinkAction( linkArea, LinkAction::PageLast );
+- else if ( !strcmp( name, "GoBack" ) )
+- popplerLink = new LinkAction( linkArea, LinkAction::HistoryBack );
+- else if ( !strcmp( name, "GoForward" ) )
+- popplerLink = new LinkAction( linkArea, LinkAction::HistoryForward );
+- else if ( !strcmp( name, "Quit" ) )
+- popplerLink = new LinkAction( linkArea, LinkAction::Quit );
+- else if ( !strcmp( name, "GoToPage" ) )
+- popplerLink = new LinkAction( linkArea, LinkAction::GoToPage );
+- else if ( !strcmp( name, "Find" ) )
+- popplerLink = new LinkAction( linkArea, LinkAction::Find );
+- else if ( !strcmp( name, "FullScreen" ) )
+- popplerLink = new LinkAction( linkArea, LinkAction::Presentation );
+- else if ( !strcmp( name, "Print" ) )
+- popplerLink = new LinkAction( linkArea, LinkAction::Print );
+- else if ( !strcmp( name, "Close" ) )
+- {
+- // acroread closes the document always, doesnt care whether
+- // its presentation mode or not
+- // popplerLink = new LinkAction( linkArea, LinkAction::EndPresentation );
+- popplerLink = new LinkAction( linkArea, LinkAction::Close );
+- }
+- else
+- {
+- // TODO
+- }
+- }
+- break;
+-
+- case actionURI:
+- {
+- popplerLink = new LinkBrowse( linkArea, ((LinkURI *)a)->getURI()->getCString() );
+- }
+- break;
+-
+- case actionSound:
+- {
+- ::LinkSound *ls = (::LinkSound *)a;
+- popplerLink = new LinkSound( linkArea, ls->getVolume(), ls->getSynchronous(), ls->getRepeat(), ls->getMix(), new SoundObject( ls->getSound() ) );
+- }
+- break;
+-
+- case actionJavaScript:
+- {
+- ::LinkJavaScript *ljs = (::LinkJavaScript *)a;
+- popplerLink = new LinkJavaScript( linkArea, UnicodeParsedString(ljs->getScript()) );
+- }
+- break;
+-
+- case actionMovie:
+- {
+- ::LinkMovie *lm = (::LinkMovie *)a;
+-
+- const QString title = ( lm->hasAnnotTitle() ? UnicodeParsedString( lm->getAnnotTitle() ) : QString() );
+-
+- Ref reference;
+- reference.num = reference.gen = -1;
+- if ( lm->hasAnnotRef() )
+- reference = *lm->getAnnotRef();
+-
+- LinkMovie::Operation operation = LinkMovie::Play;
+- switch ( lm->getOperation() )
+- {
+- case ::LinkMovie::operationTypePlay:
+- operation = LinkMovie::Play;
+- break;
+- case ::LinkMovie::operationTypePause:
+- operation = LinkMovie::Pause;
+- break;
+- case ::LinkMovie::operationTypeResume:
+- operation = LinkMovie::Resume;
+- break;
+- case ::LinkMovie::operationTypeStop:
+- operation = LinkMovie::Stop;
+- break;
+- };
+-
+- popplerLink = new LinkMovie( linkArea, operation, title, reference );
+- }
+- break;
+-
+- case actionRendition:
+- {
+- ::LinkRendition *lrn = (::LinkRendition *)a;
+-
+- Ref reference;
+- reference.num = reference.gen = -1;
+- if ( lrn->hasScreenAnnot() )
+- reference = lrn->getScreenAnnot();
+-
+- popplerLink = new LinkRendition( linkArea, lrn->getMedia() ? lrn->getMedia()->copy() : NULL, lrn->getOperation(), UnicodeParsedString( lrn->getScript() ), reference );
+- }
+- break;
+-
+- case actionOCGState:
+- {
+- ::LinkOCGState *plocg = (::LinkOCGState *)a;
+-
+- LinkOCGStatePrivate *locgp = new LinkOCGStatePrivate( linkArea, plocg );
+- popplerLink = new LinkOCGState( locgp );
+- }
+-
+- case actionUnknown:
+- break;
+- }
+-
+- return popplerLink;
+-}
+-
+-inline TextPage *PageData::prepareTextSearch(const QString &text, Page::Rotation rotate, QVector<Unicode> *u)
+-{
+- const QChar * str = text.unicode();
+- const int len = text.length();
+- u->resize(len);
+- for (int i = 0; i < len; ++i) (*u)[i] = str[i].unicode();
+-
+- const int rotation = (int)rotate * 90;
+-
+- // fetch ourselves a textpage
+- TextOutputDev td(NULL, gTrue, 0, gFalse, gFalse);
+- parentDoc->doc->displayPage( &td, index + 1, 72, 72, rotation, false, true, false,
+- NULL, NULL, NULL, NULL, gTrue);
+- TextPage *textPage=td.takeText();
+-
+- return textPage;
+-}
+-
+-inline GBool PageData::performSingleTextSearch(TextPage* textPage, QVector<Unicode> &u, double &sLeft, double &sTop, double &sRight, double &sBottom, Page::SearchDirection direction, GBool sCase, GBool sWords)
+-{
+- if (direction == Page::FromTop)
+- return textPage->findText( u.data(), u.size(),
+- gTrue, gTrue, gFalse, gFalse, sCase, gFalse, sWords, &sLeft, &sTop, &sRight, &sBottom );
+- else if ( direction == Page::NextResult )
+- return textPage->findText( u.data(), u.size(),
+- gFalse, gTrue, gTrue, gFalse, sCase, gFalse, sWords, &sLeft, &sTop, &sRight, &sBottom );
+- else if ( direction == Page::PreviousResult )
+- return textPage->findText( u.data(), u.size(),
+- gFalse, gTrue, gTrue, gFalse, sCase, gTrue, sWords, &sLeft, &sTop, &sRight, &sBottom );
+-
+- return gFalse;
+-}
+-
+-inline QList<QRectF> PageData::performMultipleTextSearch(TextPage* textPage, QVector<Unicode> &u, GBool sCase, GBool sWords)
+-{
+- QList<QRectF> results;
+- double sLeft = 0.0, sTop = 0.0, sRight = 0.0, sBottom = 0.0;
+-
+- while(textPage->findText( u.data(), u.size(),
+- gFalse, gTrue, gTrue, gFalse, sCase, gFalse, sWords, &sLeft, &sTop, &sRight, &sBottom ))
+- {
+- QRectF result;
+-
+- result.setLeft(sLeft);
+- result.setTop(sTop);
+- result.setRight(sRight);
+- result.setBottom(sBottom);
+-
+- results.append(result);
+- }
+-
+- return results;
+-}
+-
+-Page::Page(DocumentData *doc, int index) {
+- m_page = new PageData();
+- m_page->index = index;
+- m_page->parentDoc = doc;
+- m_page->page = doc->doc->getPage(m_page->index + 1);
+- m_page->transition = 0;
+-}
+-
+-Page::~Page()
+-{
+- delete m_page->transition;
+- delete m_page;
+-}
+-
+-QImage Page::renderToImage(double xres, double yres, int x, int y, int w, int h, Rotation rotate) const
+-{
+- int rotation = (int)rotate * 90;
+- QImage img;
+- switch(m_page->parentDoc->m_backend)
+- {
+- case Poppler::Document::SplashBackend:
+- {
+-#if defined(HAVE_SPLASH)
+- SplashColor bgColor;
+- GBool overprintPreview = gFalse;
+-#ifdef SPLASH_CMYK
+- overprintPreview = m_page->parentDoc->m_hints & Document::OverprintPreview ? gTrue : gFalse;
+- if (overprintPreview)
+- {
+- Guchar c, m, y, k;
+-
+- c = 255 - m_page->parentDoc->paperColor.blue();
+- m = 255 - m_page->parentDoc->paperColor.red();
+- y = 255 - m_page->parentDoc->paperColor.green();
+- k = c;
+- if (m < k) {
+- k = m;
+- }
+- if (y < k) {
+- k = y;
+- }
+- bgColor[0] = c - k;
+- bgColor[1] = m - k;
+- bgColor[2] = y - k;
+- bgColor[3] = k;
+- for (int i = 4; i < SPOT_NCOMPS + 4; i++) {
+- bgColor[i] = 0;
+- }
+- }
+- else
+-#endif
+- {
+- bgColor[0] = m_page->parentDoc->paperColor.blue();
+- bgColor[1] = m_page->parentDoc->paperColor.green();
+- bgColor[2] = m_page->parentDoc->paperColor.red();
+- }
+-
+- SplashColorMode colorMode = splashModeXBGR8;
+-#ifdef SPLASH_CMYK
+- if (overprintPreview) colorMode = splashModeDeviceN8;
+-#endif
+-
+- SplashThinLineMode thinLineMode = splashThinLineDefault;
+- if (m_page->parentDoc->m_hints & Document::ThinLineShape) thinLineMode = splashThinLineShape;
+- if (m_page->parentDoc->m_hints & Document::ThinLineSolid) thinLineMode = splashThinLineSolid;
+-
+- const bool ignorePaperColor = m_page->parentDoc->m_hints & Document::IgnorePaperColor;
+-
+- SplashOutputDev splash_output(
+- colorMode, 4,
+- gFalse,
+- ignorePaperColor ? NULL : bgColor,
+- gTrue,
+- thinLineMode,
+- overprintPreview);
+-
+- splash_output.setFontAntialias(m_page->parentDoc->m_hints & Document::TextAntialiasing ? gTrue : gFalse);
+- splash_output.setVectorAntialias(m_page->parentDoc->m_hints & Document::Antialiasing ? gTrue : gFalse);
+- splash_output.setFreeTypeHinting(m_page->parentDoc->m_hints & Document::TextHinting ? gTrue : gFalse,
+- m_page->parentDoc->m_hints & Document::TextSlightHinting ? gTrue : gFalse);
+-
+- splash_output.startDoc(m_page->parentDoc->doc);
+-
+- m_page->parentDoc->doc->displayPageSlice(&splash_output, m_page->index + 1, xres, yres,
+- rotation, false, true, false, x, y, w, h,
+- NULL, NULL, NULL, NULL, gTrue);
+-
+- SplashBitmap *bitmap = splash_output.getBitmap();
+-
+- const int bw = bitmap->getWidth();
+- const int bh = bitmap->getHeight();
+- const int brs = bitmap->getRowSize();
+-
+- // If we use DeviceN8, convert to XBGR8.
+- // If requested, also transfer Splash's internal alpha channel.
+- const SplashBitmap::ConversionMode mode = ignorePaperColor
+- ? SplashBitmap::conversionAlphaPremultiplied
+- : SplashBitmap::conversionOpaque;
+-
+- const QImage::Format format = ignorePaperColor
+- ? QImage::Format_ARGB32_Premultiplied
+- : QImage::Format_RGB32;
+-
+- if (bitmap->convertToXBGR(mode)) {
+- SplashColorPtr data = bitmap->getDataPtr();
+-
+- if (QSysInfo::ByteOrder == QSysInfo::BigEndian) {
+- // Convert byte order from RGBX to XBGR.
+- for (int i = 0; i < bh; ++i) {
+- for (int j = 0; j < bw; ++j) {
+- SplashColorPtr pixel = &data[i * brs + j];
+-
+- qSwap(pixel[0], pixel[3]);
+- qSwap(pixel[1], pixel[2]);
+- }
+- }
+- }
+-
+- // Construct a Qt image sharing the raw bitmap data.
+- img = QImage(data, bw, bh, brs, format).copy();
+- }
+-#endif
+- break;
+- }
+- case Poppler::Document::ArthurBackend:
+- {
+- QSize size = pageSize();
+- QImage tmpimg(w == -1 ? qRound( size.width() * xres / 72.0 ) : w, h == -1 ? qRound( size.height() * yres / 72.0 ) : h, QImage::Format_ARGB32);
+-
+- QPainter painter(&tmpimg);
+- renderToPainter(&painter, xres, yres, x, y, w, h, rotate, DontSaveAndRestore);
+- painter.end();
+- img = tmpimg;
+- break;
+- }
+- }
+-
+- return img;
+-}
+-
+-bool Page::renderToPainter(QPainter* painter, double xres, double yres, int x, int y, int w, int h, Rotation rotate, PainterFlags flags) const
+-{
+- if (!painter)
+- return false;
+-
+- switch(m_page->parentDoc->m_backend)
+- {
+- case Poppler::Document::SplashBackend:
+- return false;
+- case Poppler::Document::ArthurBackend:
+- {
+- const bool savePainter = !(flags & DontSaveAndRestore);
+- if (savePainter)
+- painter->save();
+- if (m_page->parentDoc->m_hints & Document::Antialiasing)
+- painter->setRenderHint(QPainter::Antialiasing);
+- if (m_page->parentDoc->m_hints & Document::TextAntialiasing)
+- painter->setRenderHint(QPainter::TextAntialiasing);
+- painter->translate(x == -1 ? 0 : -x, y == -1 ? 0 : -y);
+- ArthurOutputDev arthur_output(painter);
+- arthur_output.startDoc(m_page->parentDoc->doc->getXRef());
+- m_page->parentDoc->doc->displayPageSlice(&arthur_output,
+- m_page->index + 1,
+- xres,
+- yres,
+- (int)rotate * 90,
+- false,
+- true,
+- false,
+- x,
+- y,
+- w,
+- h);
+- if (savePainter)
+- painter->restore();
+- return true;
+- }
+- }
+- return false;
+-}
+-
+-QImage Page::thumbnail() const
+-{
+- unsigned char* data = 0;
+- int w = 0;
+- int h = 0;
+- int rowstride = 0;
+- GBool r = m_page->page->loadThumb(&data, &w, &h, &rowstride);
+- QImage ret;
+- if (r)
+- {
+- // first construct a temporary image with the data got,
+- // then force a copy of it so we can free the raw thumbnail data
+- ret = QImage(data, w, h, rowstride, QImage::Format_RGB888).copy();
+- gfree(data);
+- }
+- return ret;
+-}
+-
+-QString Page::text(const QRectF &r, TextLayout textLayout) const
+-{
+- TextOutputDev *output_dev;
+- GooString *s;
+- PDFRectangle *rect;
+- QString result;
+-
+- const GBool rawOrder = textLayout == RawOrderLayout;
+- output_dev = new TextOutputDev(0, gFalse, 0, rawOrder, gFalse);
+- m_page->parentDoc->doc->displayPageSlice(output_dev, m_page->index + 1, 72, 72,
+- 0, false, true, false, -1, -1, -1, -1,
+- NULL, NULL, NULL, NULL, gTrue);
+- if (r.isNull())
+- {
+- rect = m_page->page->getCropBox();
+- s = output_dev->getText(rect->x1, rect->y1, rect->x2, rect->y2);
+- }
+- else
+- {
+- s = output_dev->getText(r.left(), r.top(), r.right(), r.bottom());
+- }
+-
+- result = QString::fromUtf8(s->getCString());
+-
+- delete output_dev;
+- delete s;
+- return result;
+-}
+-
+-QString Page::text(const QRectF &r) const
+-{
+- return text(r, PhysicalLayout);
+-}
+-
+-bool Page::search(const QString &text, double &sLeft, double &sTop, double &sRight, double &sBottom, SearchDirection direction, SearchMode caseSensitive, Rotation rotate) const
+-{
+- const GBool sCase = caseSensitive == Page::CaseSensitive ? gTrue : gFalse;
+-
+- QVector<Unicode> u;
+- TextPage *textPage = m_page->prepareTextSearch(text, rotate, &u);
+-
+- const bool found = m_page->performSingleTextSearch(textPage, u, sLeft, sTop, sRight, sBottom, direction, sCase, gFalse);
+-
+- textPage->decRefCnt();
+-
+- return found;
+-}
+-
+-bool Page::search(const QString &text, double &sLeft, double &sTop, double &sRight, double &sBottom, SearchDirection direction, SearchFlags flags, Rotation rotate) const
+-{
+- const GBool sCase = flags.testFlag(IgnoreCase) ? gFalse : gTrue;
+- const GBool sWords = flags.testFlag(WholeWords) ? gTrue : gFalse;
+-
+- QVector<Unicode> u;
+- TextPage *textPage = m_page->prepareTextSearch(text, rotate, &u);
+-
+- const bool found = m_page->performSingleTextSearch(textPage, u, sLeft, sTop, sRight, sBottom, direction, sCase, sWords);
+-
+- textPage->decRefCnt();
+-
+- return found;
+-}
+-
+-bool Page::search(const QString &text, QRectF &rect, SearchDirection direction, SearchMode caseSensitive, Rotation rotate) const
+-{
+- double sLeft, sTop, sRight, sBottom;
+- sLeft = rect.left();
+- sTop = rect.top();
+- sRight = rect.right();
+- sBottom = rect.bottom();
+-
+- bool found = search(text, sLeft, sTop, sRight, sBottom, direction, caseSensitive, rotate);
+-
+- rect.setLeft( sLeft );
+- rect.setTop( sTop );
+- rect.setRight( sRight );
+- rect.setBottom( sBottom );
+-
+- return found;
+-}
+-
+-QList<QRectF> Page::search(const QString &text, SearchMode caseSensitive, Rotation rotate) const
+-{
+- const GBool sCase = caseSensitive == Page::CaseSensitive ? gTrue : gFalse;
+-
+- QVector<Unicode> u;
+- TextPage *textPage = m_page->prepareTextSearch(text, rotate, &u);
+-
+- const QList<QRectF> results = m_page->performMultipleTextSearch(textPage, u, sCase, gFalse);
+-
+- textPage->decRefCnt();
+-
+- return results;
+-}
+-
+-QList<QRectF> Page::search(const QString &text, SearchFlags flags, Rotation rotate) const
+-{
+- const GBool sCase = flags.testFlag(IgnoreCase) ? gFalse : gTrue;
+- const GBool sWords = flags.testFlag(WholeWords) ? gTrue : gFalse;
+-
+- QVector<Unicode> u;
+- TextPage *textPage = m_page->prepareTextSearch(text, rotate, &u);
+-
+- const QList<QRectF> results = m_page->performMultipleTextSearch(textPage, u, sCase, sWords);
+-
+- textPage->decRefCnt();
+-
+- return results;
+-}
+-
+-QList<TextBox*> Page::textList(Rotation rotate) const
+-{
+- TextOutputDev *output_dev;
+-
+- QList<TextBox*> output_list;
+-
+- output_dev = new TextOutputDev(0, gFalse, 0, gFalse, gFalse);
+-
+- int rotation = (int)rotate * 90;
+-
+- m_page->parentDoc->doc->displayPageSlice(output_dev, m_page->index + 1, 72, 72,
+- rotation, false, false, false, -1, -1, -1, -1,
+- NULL, NULL, NULL, NULL, gTrue);
+-
+- TextWordList *word_list = output_dev->makeWordList();
+-
+- if (!word_list) {
+- delete output_dev;
+- return output_list;
+- }
+-
+- QHash<TextWord *, TextBox*> wordBoxMap;
+-
+- output_list.reserve(word_list->getLength());
+- for (int i = 0; i < word_list->getLength(); i++) {
+- TextWord *word = word_list->get(i);
+- GooString *gooWord = word->getText();
+- QString string = QString::fromUtf8(gooWord->getCString());
+- delete gooWord;
+- double xMin, yMin, xMax, yMax;
+- word->getBBox(&xMin, &yMin, &xMax, &yMax);
+-
+- TextBox* text_box = new TextBox(string, QRectF(xMin, yMin, xMax-xMin, yMax-yMin));
+- text_box->m_data->hasSpaceAfter = word->hasSpaceAfter() == gTrue;
+- text_box->m_data->charBBoxes.reserve(word->getLength());
+- for (int j = 0; j < word->getLength(); ++j)
+- {
+- word->getCharBBox(j, &xMin, &yMin, &xMax, &yMax);
+- text_box->m_data->charBBoxes.append(QRectF(xMin, yMin, xMax-xMin, yMax-yMin));
+- }
+-
+- wordBoxMap.insert(word, text_box);
+-
+- output_list.append(text_box);
+- }
+-
+- for (int i = 0; i < word_list->getLength(); i++) {
+- TextWord *word = word_list->get(i);
+- TextBox* text_box = wordBoxMap.value(word);
+- text_box->m_data->nextWord = wordBoxMap.value(word->nextWord());
+- }
+-
+- delete word_list;
+- delete output_dev;
+-
+- return output_list;
+-}
+-
+-PageTransition *Page::transition() const
+-{
+- if (!m_page->transition) {
+- PageTransitionParams params;
+- Object o = m_page->page->getTrans();
+- params.dictObj = &o;
+- if (o.isDict()) m_page->transition = new PageTransition(params);
+- }
+- return m_page->transition;
+-}
+-
+-Link *Page::action( PageAction act ) const
+-{
+- if ( act == Page::Opening || act == Page::Closing )
+- {
+- Object o = m_page->page->getActions();
+- if (!o.isDict())
+- {
+- return 0;
+- }
+- Dict *dict = o.getDict();
+- const char *key = act == Page::Opening ? "O" : "C";
+- Object o2 = dict->lookup((char*)key);
+- ::LinkAction *lact = ::LinkAction::parseAction(&o2, m_page->parentDoc->doc->getCatalog()->getBaseURI() );
+- Link *popplerLink = NULL;
+- if (lact != NULL)
+- {
+- popplerLink = m_page->convertLinkActionToLink(lact, QRectF());
+- delete lact;
+- }
+- return popplerLink;
+- }
+- return 0;
+-}
+-
+-QSizeF Page::pageSizeF() const
+-{
+- Page::Orientation orient = orientation();
+- if ( ( Page::Landscape == orient ) || (Page::Seascape == orient ) ) {
+- return QSizeF( m_page->page->getCropHeight(), m_page->page->getCropWidth() );
+- } else {
+- return QSizeF( m_page->page->getCropWidth(), m_page->page->getCropHeight() );
+- }
+-}
+-
+-QSize Page::pageSize() const
+-{
+- return pageSizeF().toSize();
+-}
+-
+-Page::Orientation Page::orientation() const
+-{
+- const int rotation = m_page->page->getRotate();
+- switch (rotation) {
+- case 90:
+- return Page::Landscape;
+- break;
+- case 180:
+- return Page::UpsideDown;
+- break;
+- case 270:
+- return Page::Seascape;
+- break;
+- default:
+- return Page::Portrait;
+- }
+-}
+-
+-void Page::defaultCTM(double *CTM, double dpiX, double dpiY, int rotate, bool upsideDown)
+-{
+- m_page->page->getDefaultCTM(CTM, dpiX, dpiY, rotate, gFalse, upsideDown);
+-}
+-
+-QList<Link*> Page::links() const
+-{
+- LinkExtractorOutputDev link_dev(m_page);
+- m_page->parentDoc->doc->processLinks(&link_dev, m_page->index + 1);
+- QList<Link*> popplerLinks = link_dev.links();
+-
+- return popplerLinks;
+-}
+-
+-QList<Annotation*> Page::annotations() const
+-{
+- return AnnotationPrivate::findAnnotations(m_page->page, m_page->parentDoc, QSet<Annotation::SubType>());
+-}
+-
+-QList<Annotation*> Page::annotations(const QSet<Annotation::SubType> &subtypes) const
+-{
+- return AnnotationPrivate::findAnnotations(m_page->page, m_page->parentDoc, subtypes);
+-}
+-
+-void Page::addAnnotation( const Annotation *ann )
+-{
+- AnnotationPrivate::addAnnotationToPage(m_page->page, m_page->parentDoc, ann);
+-}
+-
+-void Page::removeAnnotation( const Annotation *ann )
+-{
+- AnnotationPrivate::removeAnnotationFromPage(m_page->page, ann);
+-}
+-
+-QList<FormField*> Page::formFields() const
+-{
+- QList<FormField*> fields;
+- ::Page *p = m_page->page;
+- ::FormPageWidgets * form = p->getFormWidgets();
+- int formcount = form->getNumWidgets();
+- for (int i = 0; i < formcount; ++i)
+- {
+- ::FormWidget *fm = form->getWidget(i);
+- FormField * ff = NULL;
+- switch (fm->getType())
+- {
+- case formButton:
+- {
+- ff = new FormFieldButton(m_page->parentDoc, p, static_cast<FormWidgetButton*>(fm));
+- }
+- break;
+-
+- case formText:
+- {
+- ff = new FormFieldText(m_page->parentDoc, p, static_cast<FormWidgetText*>(fm));
+- }
+- break;
+-
+- case formChoice:
+- {
+- ff = new FormFieldChoice(m_page->parentDoc, p, static_cast<FormWidgetChoice*>(fm));
+- }
+- break;
+-
+- default: ;
+- }
+-
+- if (ff)
+- fields.append(ff);
+- }
+-
+- delete form;
+-
+- return fields;
+-}
+-
+-double Page::duration() const
+-{
+- return m_page->page->getDuration();
+-}
+-
+-QString Page::label() const
+-{
+- GooString goo;
+- if (!m_page->parentDoc->doc->getCatalog()->indexToLabel(m_page->index, &goo))
+- return QString();
+-
+- return UnicodeParsedString(&goo);
+-}
+-
+-
+-}
+diff --git a/qt4/src/poppler-pdf-converter.cc b/qt4/src/poppler-pdf-converter.cc
+deleted file mode 100644
+index 9699b75b..00000000
+--- a/qt4/src/poppler-pdf-converter.cc
++++ /dev/null
+@@ -1,115 +0,0 @@
+-/* poppler-pdf-converter.cc: qt4 interface to poppler
+- * Copyright (C) 2008, Pino Toscano <pino@kde.org>
+- * Copyright (C) 2008, 2009, Albert Astals Cid <aacid@kde.org>
+- *
+- * This program is free software; you can redistribute it and/or modify
+- * it under the terms of the GNU General Public License as published by
+- * the Free Software Foundation; either version 2, or (at your option)
+- * any later version.
+- *
+- * This program is distributed in the hope that it will be useful,
+- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+- * GNU General Public License for more details.
+- *
+- * You should have received a copy of the GNU General Public License
+- * along with this program; if not, write to the Free Software
+- * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+- */
+-
+-#include "poppler-qt4.h"
+-
+-#include "poppler-private.h"
+-#include "poppler-converter-private.h"
+-#include "poppler-qiodeviceoutstream-private.h"
+-
+-#include <QtCore/QFile>
+-
+-#include <ErrorCodes.h>
+-
+-namespace Poppler {
+-
+-class PDFConverterPrivate : public BaseConverterPrivate
+-{
+- public:
+- PDFConverterPrivate();
+-
+- PDFConverter::PDFOptions opts;
+-};
+-
+-PDFConverterPrivate::PDFConverterPrivate()
+- : BaseConverterPrivate(), opts(0)
+-{
+-}
+-
+-
+-PDFConverter::PDFConverter(DocumentData *document)
+- : BaseConverter(*new PDFConverterPrivate())
+-{
+- Q_D(PDFConverter);
+- d->document = document;
+-}
+-
+-PDFConverter::~PDFConverter()
+-{
+-}
+-
+-void PDFConverter::setPDFOptions(PDFConverter::PDFOptions options)
+-{
+- Q_D(PDFConverter);
+- d->opts = options;
+-}
+-
+-PDFConverter::PDFOptions PDFConverter::pdfOptions() const
+-{
+- Q_D(const PDFConverter);
+- return d->opts;
+-}
+-
+-bool PDFConverter::convert()
+-{
+- Q_D(PDFConverter);
+- d->lastError = NoError;
+-
+- if (d->document->locked)
+- {
+- d->lastError = FileLockedError;
+- return false;
+- }
+-
+- QIODevice *dev = d->openDevice();
+- if (!dev)
+- {
+- d->lastError = OpenOutputError;
+- return false;
+- }
+-
+- bool deleteFile = false;
+- if (QFile *file = qobject_cast<QFile*>(dev))
+- deleteFile = !file->exists();
+-
+- int errorCode = errNone;
+- QIODeviceOutStream stream(dev);
+- if (d->opts & WithChanges)
+- {
+- errorCode = d->document->doc->saveAs(&stream);
+- }
+- else
+- {
+- errorCode = d->document->doc->saveWithoutChangesAs(&stream);
+- }
+- d->closeDevice();
+- if (errorCode != errNone)
+- {
+- if (deleteFile)
+- {
+- qobject_cast<QFile*>(dev)->remove();
+- }
+- if (errorCode == errOpenFile) d->lastError = OpenOutputError;
+- else d->lastError = NotSupportedInputFileError;
+- }
+-
+- return (errorCode == errNone);
+-}
+-
+-}
+diff --git a/qt4/src/poppler-private.cc b/qt4/src/poppler-private.cc
+deleted file mode 100644
+index 1338a185..00000000
+--- a/qt4/src/poppler-private.cc
++++ /dev/null
+@@ -1,296 +0,0 @@
+-/* poppler-private.cc: qt interface to poppler
+- * Copyright (C) 2005, Net Integration Technologies, Inc.
+- * Copyright (C) 2006, 2011, 2015, 2017 by Albert Astals Cid <aacid@kde.org>
+- * Copyright (C) 2008, 2010, 2011 by Pino Toscano <pino@kde.org>
+- * Copyright (C) 2013 by Thomas Freitag <Thomas.Freitag@alfa.de>
+- * Copyright (C) 2013 Adrian Johnson <ajohnson@redneon.com>
+- * Copyright (C) 2016 Jakub Alba <jakubalba@gmail.com>
+- * Inspired on code by
+- * Copyright (C) 2004 by Albert Astals Cid <tsdgeos@terra.es>
+- * Copyright (C) 2004 by Enrico Ros <eros.kde@email.it>
+- *
+- * This program is free software; you can redistribute it and/or modify
+- * it under the terms of the GNU General Public License as published by
+- * the Free Software Foundation; either version 2, or (at your option)
+- * any later version.
+- *
+- * This program is distributed in the hope that it will be useful,
+- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+- * GNU General Public License for more details.
+- *
+- * You should have received a copy of the GNU General Public License
+- * along with this program; if not, write to the Free Software
+- * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+- */
+-
+-#include "poppler-private.h"
+-
+-#include <QtCore/QByteArray>
+-#include <QtCore/QDebug>
+-#include <QtCore/QVariant>
+-
+-#include <Link.h>
+-#include <Outline.h>
+-#include <PDFDocEncoding.h>
+-#include <UnicodeMap.h>
+-
+-namespace Poppler {
+-
+-namespace Debug {
+-
+- static void qDebugDebugFunction(const QString &message, const QVariant & /*closure*/)
+- {
+- qDebug() << message;
+- }
+-
+- PopplerDebugFunc debugFunction = qDebugDebugFunction;
+- QVariant debugClosure;
+-
+-}
+-
+- static UnicodeMap *utf8Map = 0;
+-
+- void setDebugErrorFunction(PopplerDebugFunc function, const QVariant &closure)
+- {
+- Debug::debugFunction = function ? function : Debug::qDebugDebugFunction;
+- Debug::debugClosure = closure;
+- }
+-
+- static void qt4ErrorFunction(void * /*data*/, ErrorCategory /*category*/, Goffset pos, char *msg)
+- {
+- QString emsg;
+-
+- if (pos >= 0)
+- {
+- emsg = QString::fromLatin1("Error (%1): ").arg(pos);
+- }
+- else
+- {
+- emsg = QString::fromLatin1("Error: ");
+- }
+- emsg += QString::fromAscii(msg);
+- (*Debug::debugFunction)(emsg, Debug::debugClosure);
+- }
+-
+- QString unicodeToQString(Unicode* u, int len) {
+- if (!utf8Map)
+- {
+- GooString enc("UTF-8");
+- utf8Map = globalParams->getUnicodeMap(&enc);
+- utf8Map->incRefCnt();
+- }
+-
+- // ignore the last character if it is 0x0
+- if ((len > 0) && (u[len - 1] == 0))
+- {
+- --len;
+- }
+-
+- GooString convertedStr;
+- for (int i = 0; i < len; ++i)
+- {
+- char buf[8];
+- const int n = utf8Map->mapUnicode(u[i], buf, sizeof(buf));
+- convertedStr.append(buf, n);
+- }
+-
+- return QString::fromUtf8(convertedStr.getCString(), convertedStr.getLength());
+- }
+-
+- QString UnicodeParsedString(GooString *s1) {
+- if ( !s1 || s1->getLength() == 0 )
+- return QString();
+-
+- char *cString;
+- int stringLength;
+- bool deleteCString;
+- if ( ( s1->getChar(0) & 0xff ) == 0xfe && ( s1->getLength() > 1 && ( s1->getChar(1) & 0xff ) == 0xff ) )
+- {
+- cString = s1->getCString();
+- stringLength = s1->getLength();
+- deleteCString = false;
+- }
+- else
+- {
+- cString = pdfDocEncodingToUTF16(s1, &stringLength);
+- deleteCString = true;
+- }
+-
+- QString result;
+- // i = 2 to skip the unicode marker
+- for ( int i = 2; i < stringLength; i += 2 )
+- {
+- const Unicode u = ( ( cString[i] & 0xff ) << 8 ) | ( cString[i+1] & 0xff );
+- result += QChar( u );
+- }
+- if (deleteCString)
+- delete[] cString;
+- return result;
+- }
+-
+- GooString *QStringToUnicodeGooString(const QString &s) {
+- int len = s.length() * 2 + 2;
+- char *cstring = (char *)gmallocn(len, sizeof(char));
+- cstring[0] = (char)0xfe;
+- cstring[1] = (char)0xff;
+- for (int i = 0; i < s.length(); ++i)
+- {
+- cstring[2+i*2] = s.at(i).row();
+- cstring[3+i*2] = s.at(i).cell();
+- }
+- GooString *ret = new GooString(cstring, len);
+- gfree(cstring);
+- return ret;
+- }
+-
+- GooString *QStringToGooString(const QString &s) {
+- int len = s.length();
+- char *cstring = (char *)gmallocn(s.length(), sizeof(char));
+- for (int i = 0; i < len; ++i)
+- cstring[i] = s.at(i).unicode();
+- GooString *ret = new GooString(cstring, len);
+- gfree(cstring);
+- return ret;
+- }
+-
+- GooString *QDateTimeToUnicodeGooString(const QDateTime &dt) {
+- if (!dt.isValid()) {
+- return NULL;
+- }
+-
+- return QStringToUnicodeGooString(dt.toUTC().toString("yyyyMMddhhmmss+00'00'"));
+- }
+-
+- static void linkActionToTocItem( ::LinkAction * a, DocumentData * doc, QDomElement * e )
+- {
+- if ( !a || !e )
+- return;
+-
+- switch ( a->getKind() )
+- {
+- case actionGoTo:
+- {
+- // page number is contained/referenced in a LinkGoTo
+- LinkGoTo * g = static_cast< LinkGoTo * >( a );
+- LinkDest * destination = g->getDest();
+- if ( !destination && g->getNamedDest() )
+- {
+- // no 'destination' but an internal 'named reference'. we could
+- // get the destination for the page now, but it's VERY time consuming,
+- // so better storing the reference and provide the viewport on demand
+- GooString *s = g->getNamedDest();
+- QChar *charArray = new QChar[s->getLength()];
+- for (int i = 0; i < s->getLength(); ++i) charArray[i] = QChar(s->getCString()[i]);
+- QString aux(charArray, s->getLength());
+- e->setAttribute( "DestinationName", aux );
+- delete[] charArray;
+- }
+- else if ( destination && destination->isOk() )
+- {
+- LinkDestinationData ldd(destination, NULL, doc, false);
+- e->setAttribute( "Destination", LinkDestination(ldd).toString() );
+- }
+- break;
+- }
+- case actionGoToR:
+- {
+- // page number is contained/referenced in a LinkGoToR
+- LinkGoToR * g = static_cast< LinkGoToR * >( a );
+- LinkDest * destination = g->getDest();
+- if ( !destination && g->getNamedDest() )
+- {
+- // no 'destination' but an internal 'named reference'. we could
+- // get the destination for the page now, but it's VERY time consuming,
+- // so better storing the reference and provide the viewport on demand
+- GooString *s = g->getNamedDest();
+- QChar *charArray = new QChar[s->getLength()];
+- for (int i = 0; i < s->getLength(); ++i) charArray[i] = QChar(s->getCString()[i]);
+- QString aux(charArray, s->getLength());
+- e->setAttribute( "DestinationName", aux );
+- delete[] charArray;
+- }
+- else if ( destination && destination->isOk() )
+- {
+- LinkDestinationData ldd(destination, NULL, doc, g->getFileName() != 0);
+- e->setAttribute( "Destination", LinkDestination(ldd).toString() );
+- }
+- e->setAttribute( "ExternalFileName", g->getFileName()->getCString() );
+- break;
+- }
+- case actionURI:
+- {
+- LinkURI * u = static_cast< LinkURI * >( a );
+- e->setAttribute( "DestinationURI", u->getURI()->getCString() );
+- }
+- default: ;
+- }
+- }
+-
+- DocumentData::~DocumentData()
+- {
+- qDeleteAll(m_embeddedFiles);
+- delete (OptContentModel *)m_optContentModel;
+- delete doc;
+- delete m_fontInfoIterator;
+-
+- count --;
+- if ( count == 0 )
+- {
+- utf8Map = 0;
+- delete globalParams;
+- }
+- }
+-
+- void DocumentData::init()
+- {
+- m_fontInfoIterator = 0;
+- m_backend = Document::SplashBackend;
+- paperColor = Qt::white;
+- m_hints = 0;
+- m_optContentModel = 0;
+-
+- if ( count == 0 )
+- {
+- utf8Map = 0;
+- globalParams = new GlobalParams();
+- setErrorCallback(qt4ErrorFunction, NULL);
+- }
+- count ++;
+- }
+-
+-
+- void DocumentData::addTocChildren( QDomDocument * docSyn, QDomNode * parent, GooList * items )
+- {
+- int numItems = items->getLength();
+- for ( int i = 0; i < numItems; ++i )
+- {
+- // iterate over every object in 'items'
+- OutlineItem * outlineItem = (OutlineItem *)items->get( i );
+-
+- // 1. create element using outlineItem's title as tagName
+- QString name;
+- Unicode * uniChar = outlineItem->getTitle();
+- int titleLength = outlineItem->getTitleLength();
+- name = unicodeToQString(uniChar, titleLength);
+- if ( name.isEmpty() )
+- continue;
+-
+- QDomElement item = docSyn->createElement( name );
+- parent->appendChild( item );
+-
+- // 2. find the page the link refers to
+- ::LinkAction * a = outlineItem->getAction();
+- linkActionToTocItem( a, this, &item );
+-
+- item.setAttribute( "Open", QVariant( (bool)outlineItem->isOpen() ).toString() );
+-
+- // 3. recursively descend over children
+- outlineItem->open();
+- GooList * children = outlineItem->getKids();
+- if ( children )
+- addTocChildren( docSyn, &item, children );
+- }
+- }
+-
+-}
+diff --git a/qt4/src/poppler-private.h b/qt4/src/poppler-private.h
+deleted file mode 100644
+index a5ad3f3e..00000000
+--- a/qt4/src/poppler-private.h
++++ /dev/null
+@@ -1,241 +0,0 @@
+-/* poppler-private.h: qt interface to poppler
+- * Copyright (C) 2005, Net Integration Technologies, Inc.
+- * Copyright (C) 2005, 2008, Brad Hards <bradh@frogmouth.net>
+- * Copyright (C) 2006-2009, 2011, 2012, 2017 by Albert Astals Cid <aacid@kde.org>
+- * Copyright (C) 2007-2009, 2011 by Pino Toscano <pino@kde.org>
+- * Copyright (C) 2011 Andreas Hartmetz <ahartmetz@gmail.com>
+- * Copyright (C) 2011 Hib Eris <hib@hiberis.nl>
+- * Copyright (C) 2012, 2013 Thomas Freitag <Thomas.Freitag@alfa.de>
+- * Copyright (C) 2013 Julien Nabet <serval2412@yahoo.fr>
+- * Copyright (C) 2016 Jakub Alba <jakubalba@gmail.com>
+- * Inspired on code by
+- * Copyright (C) 2004 by Albert Astals Cid <tsdgeos@terra.es>
+- * Copyright (C) 2004 by Enrico Ros <eros.kde@email.it>
+- *
+- * This program is free software; you can redistribute it and/or modify
+- * it under the terms of the GNU General Public License as published by
+- * the Free Software Foundation; either version 2, or (at your option)
+- * any later version.
+- *
+- * This program is distributed in the hope that it will be useful,
+- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+- * GNU General Public License for more details.
+- *
+- * You should have received a copy of the GNU General Public License
+- * along with this program; if not, write to the Free Software
+- * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+- */
+-
+-#ifndef _POPPLER_PRIVATE_H_
+-#define _POPPLER_PRIVATE_H_
+-
+-#include <QtCore/QFile>
+-#include <QtCore/QPointer>
+-#include <QtCore/QVector>
+-
+-#include <config.h>
+-#include <GfxState.h>
+-#include <GlobalParams.h>
+-#include <PDFDoc.h>
+-#include <FontInfo.h>
+-#include <OutputDev.h>
+-#include <Error.h>
+-#if defined(HAVE_SPLASH)
+-#include <SplashOutputDev.h>
+-#endif
+-
+-#include "poppler-qt4.h"
+-#include "poppler-embeddedfile-private.h"
+-
+-class LinkDest;
+-class FormWidget;
+-
+-namespace Poppler {
+-
+- /* borrowed from kpdf */
+- QString unicodeToQString(Unicode* u, int len);
+-
+- QString UnicodeParsedString(GooString *s1);
+-
+- GooString *QStringToUnicodeGooString(const QString &s);
+-
+- GooString *QStringToGooString(const QString &s);
+-
+- GooString *QDateTimeToUnicodeGooString(const QDateTime &dt);
+-
+- void qt4ErrorFunction(int pos, char *msg, va_list args);
+-
+- class LinkDestinationData
+- {
+- public:
+- LinkDestinationData( LinkDest *l, GooString *nd, Poppler::DocumentData *pdfdoc, bool external )
+- : ld(l), namedDest(nd), doc(pdfdoc), externalDest(external)
+- {
+- }
+-
+- LinkDest *ld;
+- GooString *namedDest;
+- Poppler::DocumentData *doc;
+- bool externalDest;
+- };
+-
+- class DocumentData {
+- public:
+- DocumentData(const QString &filePath, GooString *ownerPassword, GooString *userPassword)
+- {
+- init();
+- m_filePath = filePath;
+-
+-#if defined(_WIN32)
+- wchar_t *fileName = new WCHAR[filePath.length()];
+- int length = filePath.toWCharArray(fileName);
+- doc = new PDFDoc(fileName, length, ownerPassword, userPassword);
+- delete[] fileName;
+-#else
+- GooString *fileName = new GooString(QFile::encodeName(filePath));
+- doc = new PDFDoc(fileName, ownerPassword, userPassword);
+-#endif
+-
+- delete ownerPassword;
+- delete userPassword;
+- }
+-
+- DocumentData(const QByteArray &data, GooString *ownerPassword, GooString *userPassword)
+- {
+- fileContents = data;
+- MemStream *str = new MemStream((char*)fileContents.data(), 0, fileContents.length(), Object(objNull));
+- init();
+- doc = new PDFDoc(str, ownerPassword, userPassword);
+- delete ownerPassword;
+- delete userPassword;
+- }
+-
+- void init();
+-
+- ~DocumentData();
+-
+- void addTocChildren( QDomDocument * docSyn, QDomNode * parent, GooList * items );
+-
+- void setPaperColor(const QColor &color)
+- {
+- paperColor = color;
+- }
+-
+- void fillMembers()
+- {
+- m_fontInfoIterator = new FontIterator(0, this);
+- int numEmb = doc->getCatalog()->numEmbeddedFiles();
+- if (!(0 == numEmb)) {
+- // we have some embedded documents, build the list
+- for (int yalv = 0; yalv < numEmb; ++yalv) {
+- FileSpec *fs = doc->getCatalog()->embeddedFile(yalv);
+- m_embeddedFiles.append(new EmbeddedFile(*new EmbeddedFileData(fs)));
+- }
+- }
+- }
+-
+- static Document *checkDocument(DocumentData *doc);
+-
+- PDFDoc *doc;
+- QString m_filePath;
+- QByteArray fileContents;
+- bool locked;
+- FontIterator *m_fontInfoIterator;
+- Document::RenderBackend m_backend;
+- QList<EmbeddedFile*> m_embeddedFiles;
+- QPointer<OptContentModel> m_optContentModel;
+- QColor paperColor;
+- int m_hints;
+- static int count;
+- };
+-
+- class FontInfoData
+- {
+- public:
+- FontInfoData()
+- {
+- isEmbedded = false;
+- isSubset = false;
+- type = FontInfo::unknown;
+- }
+-
+- FontInfoData( const FontInfoData &fid )
+- {
+- fontName = fid.fontName;
+- fontFile = fid.fontFile;
+- isEmbedded = fid.isEmbedded;
+- isSubset = fid.isSubset;
+- type = fid.type;
+- embRef = fid.embRef;
+- }
+-
+- FontInfoData( ::FontInfo* fi )
+- {
+- if (fi->getName()) fontName = fi->getName()->getCString();
+- if (fi->getFile()) fontFile = fi->getFile()->getCString();
+- isEmbedded = fi->getEmbedded();
+- isSubset = fi->getSubset();
+- type = (Poppler::FontInfo::Type)fi->getType();
+- embRef = fi->getEmbRef();
+- }
+-
+- QString fontName;
+- QString fontFile;
+- bool isEmbedded : 1;
+- bool isSubset : 1;
+- FontInfo::Type type;
+- Ref embRef;
+- };
+-
+- class FontIteratorData
+- {
+- public:
+- FontIteratorData( int startPage, DocumentData *dd )
+- : fontInfoScanner( dd->doc, startPage )
+- , totalPages( dd->doc->getNumPages() )
+- , currentPage( qMax( startPage, 0 ) - 1 )
+- {
+- }
+-
+- ~FontIteratorData()
+- {
+- }
+-
+- FontInfoScanner fontInfoScanner;
+- int totalPages;
+- int currentPage;
+- };
+-
+- class TextBoxData
+- {
+- public:
+- TextBoxData()
+- : nextWord(0), hasSpaceAfter(false)
+- {
+- }
+-
+- QString text;
+- QRectF bBox;
+- TextBox *nextWord;
+- QVector<QRectF> charBBoxes; // the boundingRect of each character
+- bool hasSpaceAfter;
+- };
+-
+- class FormFieldData
+- {
+- public:
+- FormFieldData(DocumentData *_doc, ::Page *p, ::FormWidget *w) :
+- doc(_doc), page(p), fm(w)
+- {
+- }
+-
+- DocumentData *doc;
+- ::Page *page;
+- ::FormWidget *fm;
+- QRectF box;
+- };
+-
+-}
+-
+-#endif
+diff --git a/qt4/src/poppler-ps-converter.cc b/qt4/src/poppler-ps-converter.cc
+deleted file mode 100644
+index 4b43d8ec..00000000
+--- a/qt4/src/poppler-ps-converter.cc
++++ /dev/null
+@@ -1,280 +0,0 @@
+-/* poppler-ps-converter.cc: qt interface to poppler
+- * Copyright (C) 2007, 2009, 2010, 2015, Albert Astals Cid <aacid@kde.org>
+- * Copyright (C) 2008, Pino Toscano <pino@kde.org>
+- * Copyright (C) 2010 Hib Eris <hib@hiberis.nl>
+- * Copyright (C) 2011 Glad Deschrijver <glad.deschrijver@gmail.com>
+- * Copyright (C) 2012 Fabio D'Urso <fabiodurso@hotmail.it>
+- * Copyright (C) 2013 Thomas Freitag <Thomas.Freitag@alfa.de>
+- * Copyright (C) 2014 Adrian Johnson <ajohnson@redneon.com>
+- *
+- * This program is free software; you can redistribute it and/or modify
+- * it under the terms of the GNU General Public License as published by
+- * the Free Software Foundation; either version 2, or (at your option)
+- * any later version.
+- *
+- * This program is distributed in the hope that it will be useful,
+- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+- * GNU General Public License for more details.
+- *
+- * You should have received a copy of the GNU General Public License
+- * along with this program; if not, write to the Free Software
+- * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+- */
+-
+-#include "poppler-qt4.h"
+-
+-#include "poppler-private.h"
+-#include "poppler-converter-private.h"
+-
+-#include "PSOutputDev.h"
+-
+-static void outputToQIODevice(void *stream, const char *data, int len)
+-{
+- static_cast<QIODevice*>(stream)->write(data, len);
+-}
+-
+-namespace Poppler {
+-
+-class PSConverterPrivate : public BaseConverterPrivate
+-{
+- public:
+- PSConverterPrivate();
+-
+- QList<int> pageList;
+- QString title;
+- double hDPI;
+- double vDPI;
+- int rotate;
+- int paperWidth;
+- int paperHeight;
+- int marginRight;
+- int marginBottom;
+- int marginLeft;
+- int marginTop;
+- PSConverter::PSOptions opts;
+- void (* pageConvertedCallback)(int page, void *payload);
+- void *pageConvertedPayload;
+-};
+-
+-PSConverterPrivate::PSConverterPrivate()
+- : BaseConverterPrivate(),
+- hDPI(72), vDPI(72), rotate(0), paperWidth(-1), paperHeight(-1),
+- marginRight(0), marginBottom(0), marginLeft(0), marginTop(0),
+- opts(PSConverter::Printing), pageConvertedCallback(0),
+- pageConvertedPayload(0)
+-{
+-}
+-
+-
+-PSConverter::PSConverter(DocumentData *document)
+- : BaseConverter(*new PSConverterPrivate())
+-{
+- Q_D(PSConverter);
+- d->document = document;
+-}
+-
+-PSConverter::~PSConverter()
+-{
+-}
+-
+-void PSConverter::setPageList(const QList<int> &pageList)
+-{
+- Q_D(PSConverter);
+- d->pageList = pageList;
+-}
+-
+-void PSConverter::setTitle(const QString &title)
+-{
+- Q_D(PSConverter);
+- d->title = title;
+-}
+-
+-void PSConverter::setHDPI(double hDPI)
+-{
+- Q_D(PSConverter);
+- d->hDPI = hDPI;
+-}
+-
+-void PSConverter::setVDPI(double vDPI)
+-{
+- Q_D(PSConverter);
+- d->vDPI = vDPI;
+-}
+-
+-void PSConverter::setRotate(int rotate)
+-{
+- Q_D(PSConverter);
+- d->rotate = rotate;
+-}
+-
+-void PSConverter::setPaperWidth(int paperWidth)
+-{
+- Q_D(PSConverter);
+- d->paperWidth = paperWidth;
+-}
+-
+-void PSConverter::setPaperHeight(int paperHeight)
+-{
+- Q_D(PSConverter);
+- d->paperHeight = paperHeight;
+-}
+-
+-void PSConverter::setRightMargin(int marginRight)
+-{
+- Q_D(PSConverter);
+- d->marginRight = marginRight;
+-}
+-
+-void PSConverter::setBottomMargin(int marginBottom)
+-{
+- Q_D(PSConverter);
+- d->marginBottom = marginBottom;
+-}
+-
+-void PSConverter::setLeftMargin(int marginLeft)
+-{
+- Q_D(PSConverter);
+- d->marginLeft = marginLeft;
+-}
+-
+-void PSConverter::setTopMargin(int marginTop)
+-{
+- Q_D(PSConverter);
+- d->marginTop = marginTop;
+-}
+-
+-void PSConverter::setStrictMargins(bool strictMargins)
+-{
+- Q_D(PSConverter);
+- if (strictMargins)
+- d->opts |= StrictMargins;
+- else
+- d->opts &= ~StrictMargins;
+-}
+-
+-void PSConverter::setForceRasterize(bool forceRasterize)
+-{
+- Q_D(PSConverter);
+- if (forceRasterize)
+- d->opts |= ForceRasterization;
+- else
+- d->opts &= ~ForceRasterization;
+-}
+-
+-void PSConverter::setPSOptions(PSConverter::PSOptions options)
+-{
+- Q_D(PSConverter);
+- d->opts = options;
+-}
+-
+-PSConverter::PSOptions PSConverter::psOptions() const
+-{
+- Q_D(const PSConverter);
+- return d->opts;
+-}
+-
+-void PSConverter::setPageConvertedCallback(void (* callback)(int page, void *payload), void *payload)
+-{
+- Q_D(PSConverter);
+- d->pageConvertedCallback = callback;
+- d->pageConvertedPayload = payload;
+-}
+-
+-static GBool annotDisplayDecideCbk(Annot *annot, void *user_data)
+-{
+- if (annot->getType() == Annot::typeWidget)
+- return gTrue; // Never hide forms
+- else
+- return *(GBool*)user_data;
+-}
+-
+-bool PSConverter::convert()
+-{
+- Q_D(PSConverter);
+- d->lastError = NoError;
+-
+- Q_ASSERT(!d->pageList.isEmpty());
+- Q_ASSERT(d->paperWidth != -1);
+- Q_ASSERT(d->paperHeight != -1);
+-
+- if (d->document->locked)
+- {
+- d->lastError = FileLockedError;
+- return false;
+- }
+-
+- QIODevice *dev = d->openDevice();
+- if (!dev)
+- {
+- d->lastError = OpenOutputError;
+- return false;
+- }
+-
+- QByteArray pstitle8Bit = d->title.toLocal8Bit();
+- char* pstitlechar;
+- if (!d->title.isEmpty()) pstitlechar = pstitle8Bit.data();
+- else pstitlechar = 0;
+-
+- std::vector<int> pages;
+- foreach(int page, d->pageList)
+- {
+- pages.push_back(page);
+- }
+-
+- PSOutputDev *psOut = new PSOutputDev(outputToQIODevice, dev,
+- pstitlechar,
+- d->document->doc,
+- pages,
+- (d->opts & PrintToEPS) ? psModeEPS : psModePS,
+- d->paperWidth,
+- d->paperHeight,
+- gFalse,
+- gFalse,
+- d->marginLeft,
+- d->marginBottom,
+- d->paperWidth - d->marginRight,
+- d->paperHeight - d->marginTop,
+- (d->opts & ForceRasterization));
+-
+- if (d->opts & StrictMargins)
+- {
+- double xScale = ((double)d->paperWidth - (double)d->marginLeft - (double)d->marginRight) / (double)d->paperWidth;
+- double yScale = ((double)d->paperHeight - (double)d->marginBottom - (double)d->marginTop) / (double)d->paperHeight;
+- psOut->setScale(xScale, yScale);
+- }
+-
+- if (psOut->isOk())
+- {
+- GBool isPrinting = (d->opts & Printing) ? gTrue : gFalse;
+- GBool showAnnotations = (d->opts & HideAnnotations) ? gFalse : gTrue;
+- foreach(int page, d->pageList)
+- {
+- d->document->doc->displayPage(psOut,
+- page,
+- d->hDPI,
+- d->vDPI,
+- d->rotate,
+- gFalse,
+- gTrue,
+- isPrinting,
+- NULL,
+- NULL,
+- annotDisplayDecideCbk,
+- &showAnnotations, gTrue);
+- if (d->pageConvertedCallback)
+- (*d->pageConvertedCallback)(page, d->pageConvertedPayload);
+- }
+- delete psOut;
+- d->closeDevice();
+- return true;
+- }
+- else
+- {
+- delete psOut;
+- d->closeDevice();
+- return false;
+- }
+-}
+-
+-}
+diff --git a/qt4/src/poppler-qiodeviceoutstream-private.h b/qt4/src/poppler-qiodeviceoutstream-private.h
+deleted file mode 100644
+index d0d20073..00000000
+--- a/qt4/src/poppler-qiodeviceoutstream-private.h
++++ /dev/null
+@@ -1,47 +0,0 @@
+-/* poppler-qiodevicestream-private.h: Qt4 interface to poppler
+- * Copyright (C) 2008, Pino Toscano <pino@kde.org>
+- * Copyright (C) 2013 Adrian Johnson <ajohnson@redneon.com>
+- *
+- * This program is free software; you can redistribute it and/or modify
+- * it under the terms of the GNU General Public License as published by
+- * the Free Software Foundation; either version 2, or (at your option)
+- * any later version.
+- *
+- * This program is distributed in the hope that it will be useful,
+- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+- * GNU General Public License for more details.
+- *
+- * You should have received a copy of the GNU General Public License
+- * along with this program; if not, write to the Free Software
+- * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+- */
+-
+-#ifndef POPPLER_QIODEVICESTREAM_PRIVATE_H
+-#define POPPLER_QIODEVICESTREAM_PRIVATE_H
+-
+-#include "Object.h"
+-#include "Stream.h"
+-
+-class QIODevice;
+-
+-namespace Poppler {
+-
+-class QIODeviceOutStream : public OutStream
+-{
+- public:
+- QIODeviceOutStream(QIODevice* device);
+- virtual ~QIODeviceOutStream();
+-
+- virtual void close();
+- virtual Goffset getPos();
+- virtual void put(char c);
+- virtual void printf(const char *format, ...);
+-
+- private:
+- QIODevice *m_device;
+-};
+-
+-}
+-
+-#endif
+diff --git a/qt4/src/poppler-qiodeviceoutstream.cc b/qt4/src/poppler-qiodeviceoutstream.cc
+deleted file mode 100644
+index e3e9f895..00000000
+--- a/qt4/src/poppler-qiodeviceoutstream.cc
++++ /dev/null
+@@ -1,64 +0,0 @@
+-/* poppler-qiodevicestream.cc: Qt4 interface to poppler
+- * Copyright (C) 2008, Pino Toscano <pino@kde.org>
+- * Copyright (C) 2013 Adrian Johnson <ajohnson@redneon.com>
+- *
+- * This program is free software; you can redistribute it and/or modify
+- * it under the terms of the GNU General Public License as published by
+- * the Free Software Foundation; either version 2, or (at your option)
+- * any later version.
+- *
+- * This program is distributed in the hope that it will be useful,
+- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+- * GNU General Public License for more details.
+- *
+- * You should have received a copy of the GNU General Public License
+- * along with this program; if not, write to the Free Software
+- * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+- */
+-
+-#include "poppler-qiodeviceoutstream-private.h"
+-
+-#include <QtCore/QIODevice>
+-
+-#include <stdio.h>
+-
+-#define QIODeviceOutStreamBufSize 8192
+-
+-namespace Poppler {
+-
+-QIODeviceOutStream::QIODeviceOutStream(QIODevice* device)
+- : m_device(device)
+-{
+-}
+-
+-QIODeviceOutStream::~QIODeviceOutStream()
+-{
+-}
+-
+-void QIODeviceOutStream::close()
+-{
+-}
+-
+-Goffset QIODeviceOutStream::getPos()
+-{
+- return m_device->pos();
+-}
+-
+-void QIODeviceOutStream::put(char c)
+-{
+- m_device->putChar(c);
+-}
+-
+-void QIODeviceOutStream::printf(const char *format, ...)
+-{
+- va_list ap;
+- va_start(ap, format);
+- char buf[QIODeviceOutStreamBufSize];
+- size_t bufsize = 0;
+- bufsize = qvsnprintf(buf, QIODeviceOutStreamBufSize - 1, format, ap);
+- va_end(ap);
+- m_device->write(buf, bufsize);
+-}
+-
+-}
+diff --git a/qt4/src/poppler-qt4.h b/qt4/src/poppler-qt4.h
+deleted file mode 100644
+index 1b5afb2e..00000000
+--- a/qt4/src/poppler-qt4.h
++++ /dev/null
+@@ -1,1990 +0,0 @@
+-/* poppler-qt.h: qt interface to poppler
+- * Copyright (C) 2005, Net Integration Technologies, Inc.
+- * Copyright (C) 2005, 2007, Brad Hards <bradh@frogmouth.net>
+- * Copyright (C) 2005-2012, 2014, 2015, Albert Astals Cid <aacid@kde.org>
+- * Copyright (C) 2005, Stefan Kebekus <stefan.kebekus@math.uni-koeln.de>
+- * Copyright (C) 2006-2011, Pino Toscano <pino@kde.org>
+- * Copyright (C) 2009 Shawn Rutledge <shawn.t.rutledge@gmail.com>
+- * Copyright (C) 2010 Suzuki Toshiya <mpsuzuki@hiroshima-u.ac.jp>
+- * Copyright (C) 2010 Matthias Fauconneau <matthias.fauconneau@gmail.com>
+- * Copyright (C) 2011 Andreas Hartmetz <ahartmetz@gmail.com>
+- * Copyright (C) 2011 Glad Deschrijver <glad.deschrijver@gmail.com>
+- * Copyright (C) 2012, Guillermo A. Amaral B. <gamaral@kde.org>
+- * Copyright (C) 2012, Fabio D'Urso <fabiodurso@hotmail.it>
+- * Copyright (C) 2012, Tobias Koenig <tobias.koenig@kdab.com>
+- * Copyright (C) 2012, 2014, 2015 Adam Reichold <adamreichold@myopera.com>
+- * Copyright (C) 2012, 2013 Thomas Freitag <Thomas.Freitag@alfa.de>
+- * Copyright (C) 2016 Jakub Alba <jakubalba@gmail.com>
+- *
+- * This program is free software; you can redistribute it and/or modify
+- * it under the terms of the GNU General Public License as published by
+- * the Free Software Foundation; either version 2, or (at your option)
+- * any later version.
+- *
+- * This program is distributed in the hope that it will be useful,
+- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+- * GNU General Public License for more details.
+- *
+- * You should have received a copy of the GNU General Public License
+- * along with this program; if not, write to the Free Software
+- * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+- */
+-
+-#ifndef __POPPLER_QT_H__
+-#define __POPPLER_QT_H__
+-
+-#include "poppler-annotation.h"
+-#include "poppler-link.h"
+-#include "poppler-optcontent.h"
+-#include "poppler-page-transition.h"
+-
+-#include <QtCore/QByteArray>
+-#include <QtCore/QDateTime>
+-#include <QtCore/QSet>
+-#include <QtXml/QDomDocument>
+-#include "poppler-export.h"
+-
+-class EmbFile;
+-class Sound;
+-class AnnotMovie;
+-
+-/**
+- The %Poppler Qt4 binding.
+-*/
+-namespace Poppler {
+-
+- class Document;
+- class DocumentData;
+-
+- class PageData;
+-
+- class FormField;
+-
+- class TextBoxData;
+-
+- class PDFConverter;
+- class PSConverter;
+-
+- /**
+- Debug/error function.
+-
+- This function type is used for debugging & error output;
+- the first parameter is the actual message, the second is the unaltered
+- closure argument which was passed to the setDebugErrorFunction call.
+-
+- \since 0.16
+- */
+- typedef void (*PopplerDebugFunc)(const QString & /*message*/, const QVariant & /*closure*/);
+-
+- /**
+- Set a new debug/error output function.
+-
+- If not set, by default error and debug messages will be sent to the
+- Qt \p qDebug() function.
+-
+- \param debugFunction the new debug function
+- \param closure user data which will be passes as-is to the debug function
+-
+- \since 0.16
+- */
+- POPPLER_QT4_EXPORT void setDebugErrorFunction(PopplerDebugFunc debugFunction, const QVariant &closure);
+-
+- /**
+- Describes the physical location of text on a document page
+-
+- This very simple class describes the physical location of text
+- on the page. It consists of
+- - a QString that contains the text
+- - a QRectF that gives a box that describes where on the page
+- the text is found.
+- */
+- class POPPLER_QT4_EXPORT TextBox {
+- friend class Page;
+- public:
+- /**
+- The default constructor sets the \p text and the rectangle that
+- contains the text. Coordinates for the \p bBox are in points =
+- 1/72 of an inch.
+- */
+- TextBox(const QString& text, const QRectF &bBox);
+- /**
+- Destructor.
+- */
+- ~TextBox();
+-
+- /**
+- Returns the text of this text box
+- */
+- QString text() const;
+-
+- /**
+- Returns the position of the text, in point, i.e., 1/72 of
+- an inch
+-
+- \since 0.8
+- */
+- QRectF boundingBox() const;
+-
+- /**
+- Returns the pointer to the next text box, if there is one.
+-
+- Otherwise, it returns a null pointer.
+- */
+- TextBox *nextWord() const;
+-
+- /**
+- Returns the bounding box of the \p i -th characted of the word.
+- */
+- QRectF charBoundingBox(int i) const;
+-
+- /**
+- Returns whether there is a space character after this text box
+- */
+- bool hasSpaceAfter() const;
+-
+- private:
+- Q_DISABLE_COPY(TextBox)
+-
+- TextBoxData *m_data;
+- };
+-
+-
+- class FontInfoData;
+- /**
+- Container class for information about a font within a PDF
+- document
+- */
+- class POPPLER_QT4_EXPORT FontInfo {
+- friend class Document;
+- public:
+- /**
+- The type of font.
+- */
+- enum Type {
+- unknown,
+- Type1,
+- Type1C,
+- Type1COT,
+- Type3,
+- TrueType,
+- TrueTypeOT,
+- CIDType0,
+- CIDType0C,
+- CIDType0COT,
+- CIDTrueType,
+- CIDTrueTypeOT
+- };
+-
+- /// \cond PRIVATE
+- /**
+- Create a new font information container.
+- */
+- FontInfo();
+-
+- /**
+- Create a new font information container.
+- */
+- FontInfo( const FontInfoData &fid );
+- /// \endcond
+-
+- /**
+- Copy constructor.
+- */
+- FontInfo( const FontInfo &fi );
+-
+- /**
+- Destructor.
+- */
+- ~FontInfo();
+-
+- /**
+- The name of the font. Can be QString::null if the font has no name
+- */
+- QString name() const;
+-
+- /**
+- The path of the font file used to represent this font on this system,
+- or a null string is the font is embedded
+- */
+- QString file() const;
+-
+- /**
+- Whether the font is embedded in the file, or not
+-
+- \return true if the font is embedded
+- */
+- bool isEmbedded() const;
+-
+- /**
+- Whether the font provided is only a subset of the full
+- font or not. This only has meaning if the font is embedded.
+-
+- \return true if the font is only a subset
+- */
+- bool isSubset() const;
+-
+- /**
+- The type of font encoding
+-
+- \return a enumerated value corresponding to the font encoding used
+-
+- \sa typeName for a string equivalent
+- */
+- Type type() const;
+-
+- /**
+- The name of the font encoding used
+-
+- \note if you are looking for the name of the font (as opposed to the
+- encoding format used), you probably want name().
+-
+- \sa type for a enumeration version
+- */
+- QString typeName() const;
+-
+- /**
+- Standard assignment operator
+- */
+- FontInfo& operator=( const FontInfo &fi );
+-
+- private:
+- FontInfoData *m_data;
+- };
+-
+-
+- class FontIteratorData;
+- /**
+- Iterator for reading the fonts in a document.
+-
+- FontIterator provides a Java-style iterator for reading the fonts in a
+- document.
+-
+- You can use it in the following way:
+- \code
+-Poppler::FontIterator* it = doc->newFontIterator();
+-while (it->hasNext()) {
+- QList<Poppler::FontInfo> fonts = it->next();
+- // do something with the fonts
+-}
+-// after doing the job, the iterator must be freed
+-delete it;
+- \endcode
+-
+- \since 0.12
+- */
+- class POPPLER_QT4_EXPORT FontIterator {
+- friend class Document;
+- friend class DocumentData;
+- public:
+- /**
+- Destructor.
+- */
+- ~FontIterator();
+-
+- /**
+- Returns the fonts of the current page and then advances the iterator
+- to the next page.
+- */
+- QList<FontInfo> next();
+-
+- /**
+- Checks whether there is at least one more page to iterate, ie returns
+- false when the iterator is beyond the last page.
+- */
+- bool hasNext() const;
+-
+- /**
+- Returns the current page where the iterator is.
+- */
+- int currentPage() const;
+-
+- private:
+- Q_DISABLE_COPY( FontIterator )
+- FontIterator( int, DocumentData *dd );
+-
+- FontIteratorData *d;
+- };
+-
+-
+- class EmbeddedFileData;
+- /**
+- Container class for an embedded file with a PDF document
+- */
+- class POPPLER_QT4_EXPORT EmbeddedFile {
+- friend class DocumentData;
+- friend class AnnotationPrivate;
+- public:
+- /// \cond PRIVATE
+- EmbeddedFile(EmbFile *embfile);
+- /// \endcond
+-
+- /**
+- Destructor.
+- */
+- ~EmbeddedFile();
+-
+- /**
+- The name associated with the file
+- */
+- QString name() const;
+-
+- /**
+- The description associated with the file, if any.
+-
+- This will return an empty QString if there is no description element
+- */
+- QString description() const;
+-
+- /**
+- The size of the file.
+-
+- This will return < 0 if there is no size element
+- */
+- int size() const;
+-
+- /**
+- The modification date for the embedded file, if known.
+- */
+- QDateTime modDate() const;
+-
+- /**
+- The creation date for the embedded file, if known.
+- */
+- QDateTime createDate() const;
+-
+- /**
+- The MD5 checksum of the file.
+-
+- This will return an empty QByteArray if there is no checksum element.
+- */
+- QByteArray checksum() const;
+-
+- /**
+- The MIME type of the file, if known.
+-
+- \since 0.8
+- */
+- QString mimeType() const;
+-
+- /**
+- The data as a byte array
+- */
+- QByteArray data();
+-
+- /**
+- Is the embedded file valid?
+-
+- \since 0.12
+- */
+- bool isValid() const;
+-
+- /**
+- A QDataStream for the actual data?
+- */
+- //QDataStream dataStream() const;
+-
+- private:
+- Q_DISABLE_COPY(EmbeddedFile)
+- EmbeddedFile(EmbeddedFileData &dd);
+-
+- EmbeddedFileData *m_embeddedFile;
+- };
+-
+-
+- /**
+- \brief A page in a document.
+-
+- The Page class represents a single page within a PDF document.
+-
+- You cannot construct a Page directly, but you have to use the Document
+- functions that return a new Page out of an index or a label.
+- */
+- class POPPLER_QT4_EXPORT Page {
+- friend class Document;
+- public:
+- /**
+- Destructor.
+- */
+- ~Page();
+-
+- /**
+- The type of rotation to apply for an operation
+- */
+- enum Rotation { Rotate0 = 0, ///< Do not rotate
+- Rotate90 = 1, ///< Rotate 90 degrees clockwise
+- Rotate180 = 2, ///< Rotate 180 degrees
+- Rotate270 = 3 ///< Rotate 270 degrees clockwise (90 degrees counterclockwise)
+- };
+-
+- /**
+- The kinds of page actions
+- */
+- enum PageAction {
+- Opening, ///< The action when a page is "opened"
+- Closing ///< The action when a page is "closed"
+- };
+-
+- /**
+- How the text is going to be returned
+- \since 0.16
+- */
+- enum TextLayout {
+- PhysicalLayout, ///< The text is layouted to resemble the real page layout
+- RawOrderLayout ///< The text is returned without any type of processing
+- };
+-
+- /**
+- Additional flags for the renderToPainter method
+- \since 0.16
+- */
+- enum PainterFlag {
+- /**
+- Do not save/restore the caller-owned painter.
+-
+- renderToPainter() by default preserves, using save() + restore(),
+- the state of the painter specified; if this is not needed, this
+- flag can avoid this job
+- */
+- DontSaveAndRestore = 0x00000001
+- };
+- Q_DECLARE_FLAGS( PainterFlags, PainterFlag )
+-
+- /**
+- Render the page to a QImage using the current
+- \link Document::renderBackend() Document renderer\endlink.
+-
+- If \p x = \p y = \p w = \p h = -1, the method will automatically
+- compute the size of the image from the horizontal and vertical
+- resolutions specified in \p xres and \p yres. Otherwise, the
+- method renders only a part of the page, specified by the
+- parameters (\p x, \p y, \p w, \p h) in pixel coordinates. The returned
+- QImage then has size (\p w, \p h), independent of the page
+- size.
+-
+- \param x specifies the left x-coordinate of the box, in
+- pixels.
+-
+- \param y specifies the top y-coordinate of the box, in
+- pixels.
+-
+- \param w specifies the width of the box, in pixels.
+-
+- \param h specifies the height of the box, in pixels.
+-
+- \param xres horizontal resolution of the graphics device,
+- in dots per inch
+-
+- \param yres vertical resolution of the graphics device, in
+- dots per inch
+-
+- \param rotate how to rotate the page
+-
+- \warning The parameter (\p x, \p y, \p w, \p h) are not
+- well-tested. Unusual or meaningless parameters may lead to
+- rather unexpected results.
+-
+- \returns a QImage of the page, or a null image on failure.
+-
+- \since 0.6
+- */
+- QImage renderToImage(double xres=72.0, double yres=72.0, int x=-1, int y=-1, int w=-1, int h=-1, Rotation rotate = Rotate0) const;
+-
+- /**
+- Render the page to the specified QPainter using the current
+- \link Document::renderBackend() Document renderer\endlink.
+-
+- If \p x = \p y = \p w = \p h = -1, the method will automatically
+- compute the size of the page area from the horizontal and vertical
+- resolutions specified in \p xres and \p yres. Otherwise, the
+- method renders only a part of the page, specified by the
+- parameters (\p x, \p y, \p w, \p h) in pixel coordinates.
+-
+- \param painter the painter to paint on
+-
+- \param x specifies the left x-coordinate of the box, in
+- pixels.
+-
+- \param y specifies the top y-coordinate of the box, in
+- pixels.
+-
+- \param w specifies the width of the box, in pixels.
+-
+- \param h specifies the height of the box, in pixels.
+-
+- \param xres horizontal resolution of the graphics device,
+- in dots per inch
+-
+- \param yres vertical resolution of the graphics device, in
+- dots per inch
+-
+- \param rotate how to rotate the page
+-
+- \param flags additional painter flags
+-
+- \warning The parameter (\p x, \p y, \p w, \p h) are not
+- well-tested. Unusual or meaningless parameters may lead to
+- rather unexpected results.
+-
+- \returns whether the painting succeeded
+-
+- \note This method is only supported for Arthur
+-
+- \since 0.16
+- */
+- bool renderToPainter(QPainter* painter, double xres=72.0, double yres=72.0, int x=-1, int y=-1, int w=-1, int h=-1,
+- Rotation rotate = Rotate0, PainterFlags flags = 0) const;
+-
+- /**
+- Get the page thumbnail if it exists.
+-
+- \return a QImage of the thumbnail, or a null image
+- if the PDF does not contain one for this page
+-
+- \since 0.12
+- */
+- QImage thumbnail() const;
+-
+- /**
+- Returns the text that is inside a specified rectangle
+-
+- \param rect the rectangle specifying the area of interest,
+- with coordinates given in points, i.e., 1/72th of an inch.
+- If rect is null, all text on the page is given
+-
+- \since 0.16
+- **/
+- QString text(const QRectF &rect, TextLayout textLayout) const;
+-
+- /**
+- Returns the text that is inside a specified rectangle.
+- The text is returned using the physical layout of the page
+-
+- \param rect the rectangle specifying the area of interest,
+- with coordinates given in points, i.e., 1/72th of an inch.
+- If rect is null, all text on the page is given
+- **/
+- QString text(const QRectF &rect) const;
+-
+- /**
+- The starting point for a search
+- */
+- enum SearchDirection { FromTop, ///< Start sorting at the top of the document
+- NextResult, ///< Find the next result, moving "down the page"
+- PreviousResult ///< Find the previous result, moving "up the page"
+- };
+-
+- /**
+- The type of search to perform
+- */
+- enum SearchMode { CaseSensitive, ///< Case differences cause no match in searching
+- CaseInsensitive ///< Case differences are ignored in matching
+- };
+-
+- /**
+- Flags to modify the search behaviour \since 0.31
+- */
+- enum SearchFlag
+- {
+- IgnoreCase = 0x00000001, ///< Case differences are ignored
+- WholeWords = 0x00000002 ///< Only whole words are matched
+- };
+- Q_DECLARE_FLAGS( SearchFlags, SearchFlag )
+-
+- /**
+- Returns true if the specified text was found.
+-
+- \param text the text the search
+- \param rect in all directions is used to return where the text was found, for NextResult and PreviousResult
+- indicates where to continue searching for
+- \param direction in which direction do the search
+- \param caseSensitive be case sensitive?
+- \param rotate the rotation to apply for the search order
+- **/
+- Q_DECL_DEPRECATED bool search(const QString &text, QRectF &rect, SearchDirection direction, SearchMode caseSensitive, Rotation rotate = Rotate0) const;
+-
+- /**
+- Returns true if the specified text was found.
+-
+- \param text the text the search
+- \param rectXXX in all directions is used to return where the text was found, for NextResult and PreviousResult
+- indicates where to continue searching for
+- \param direction in which direction do the search
+- \param caseSensitive be case sensitive?
+- \param rotate the rotation to apply for the search order
+- \since 0.14
+- **/
+- Q_DECL_DEPRECATED bool search(const QString &text, double &rectLeft, double &rectTop, double &rectRight, double &rectBottom, SearchDirection direction, SearchMode caseSensitive, Rotation rotate = Rotate0) const;
+-
+- /**
+- Returns true if the specified text was found.
+-
+- \param text the text the search
+- \param rectXXX in all directions is used to return where the text was found, for NextResult and PreviousResult
+- indicates where to continue searching for
+- \param direction in which direction do the search
+- \param flags the flags to consider during matching
+- \param rotate the rotation to apply for the search order
+-
+- \since 0.31
+- **/
+- bool search(const QString &text, double &rectLeft, double &rectTop, double &rectRight, double &rectBottom, SearchDirection direction, SearchFlags flags = 0, Rotation rotate = Rotate0) const;
+-
+- /**
+- Returns a list of all occurrences of the specified text on the page.
+-
+- \param text the text to search
+- \param caseSensitive whether to be case sensitive
+- \param rotate the rotation to apply for the search order
+-
+- \warning Do not use the returned QRectF as arguments of another search call because of truncation issues if qreal is defined as float.
+-
+- \since 0.22
+- **/
+- Q_DECL_DEPRECATED QList<QRectF> search(const QString &text, SearchMode caseSensitive, Rotation rotate = Rotate0) const;
+-
+- /**
+- Returns a list of all occurrences of the specified text on the page.
+-
+- \param text the text to search
+- \param flags the flags to consider during matching
+- \param rotate the rotation to apply for the search order
+-
+- \warning Do not use the returned QRectF as arguments of another search call because of truncation issues if qreal is defined as float.
+-
+- \since 0.31
+- **/
+- QList<QRectF> search(const QString &text, SearchFlags flags = 0, Rotation rotate = Rotate0) const;
+-
+- /**
+- Returns a list of text of the page
+-
+- This method returns a QList of TextBoxes that contain all
+- the text of the page, with roughly one text word of text
+- per TextBox item.
+-
+- For text written in western languages (left-to-right and
+- up-to-down), the QList contains the text in the proper
+- order.
+-
+- \note The caller owns the text boxes and they should
+- be deleted when no longer required.
+-
+- \warning This method is not tested with Asian scripts
+- */
+- QList<TextBox*> textList(Rotation rotate = Rotate0) const;
+-
+- /**
+- \return The dimensions (cropbox) of the page, in points (i.e. 1/72th of an inch)
+- */
+- QSizeF pageSizeF() const;
+-
+- /**
+- \return The dimensions (cropbox) of the page, in points (i.e. 1/72th of an inch)
+- */
+- QSize pageSize() const;
+-
+- /**
+- Returns the transition of this page
+-
+- \returns a pointer to a PageTransition structure that
+- defines how transition to this page shall be performed.
+-
+- \note The PageTransition structure is owned by this page, and will
+- automatically be destroyed when this page class is
+- destroyed.
+- **/
+- PageTransition *transition() const;
+-
+- /**
+- Gets the page action specified, or NULL if there is no action.
+-
+- \since 0.6
+- **/
+- Link *action( PageAction act ) const;
+-
+- /**
+- Types of orientations that are possible
+- */
+- enum Orientation {
+- Landscape, ///< Landscape orientation (portrait, with 90 degrees clockwise rotation )
+- Portrait, ///< Normal portrait orientation
+- Seascape, ///< Seascape orientation (portrait, with 270 degrees clockwise rotation)
+- UpsideDown ///< Upside down orientation (portrait, with 180 degrees rotation)
+- };
+-
+- /**
+- The orientation of the page
+- */
+- Orientation orientation() const;
+-
+- /**
+- The default CTM
+- */
+- void defaultCTM(double *CTM, double dpiX, double dpiY, int rotate, bool upsideDown);
+-
+- /**
+- Gets the links of the page
+- */
+- QList<Link*> links() const;
+-
+- /**
+- Returns the annotations of the page
+-
+- \note If you call this method twice, you get different objects
+- pointing to the same annotations (see Annotation).
+- The caller owns the returned objects and they should be deleted
+- when no longer required.
+- */
+- QList<Annotation*> annotations() const;
+-
+- /**
+- Returns the annotations of the page
+-
+- \param subtypes the subtypes of annotations you are interested in
+-
+- \note If you call this method twice, you get different objects
+- pointing to the same annotations (see Annotation).
+- The caller owns the returned objects and they should be deleted
+- when no longer required.
+-
+- \since 0.28
+- */
+- QList<Annotation*> annotations(const QSet<Annotation::SubType> &subtypes) const;
+-
+- /**
+- Adds an annotation to the page
+-
+- \note Ownership of the annotation object stays with the caller, who can
+- delete it at any time.
+- \since 0.20
+- */
+- void addAnnotation( const Annotation *ann );
+-
+- /**
+- Removes an annotation from the page and destroys the annotation object
+-
+- \note There mustn't be other Annotation objects pointing this annotation
+- \since 0.20
+- */
+- void removeAnnotation( const Annotation *ann );
+-
+- /**
+- Returns the form fields on the page
+- The caller gets the ownership of the returned objects.
+-
+- \since 0.6
+- */
+- QList<FormField*> formFields() const;
+-
+- /**
+- Returns the page duration. That is the time, in seconds, that the page
+- should be displayed before the presentation automatically advances to the next page.
+- Returns < 0 if duration is not set.
+-
+- \since 0.6
+- */
+- double duration() const;
+-
+- /**
+- Returns the label of the page, or a null string is the page has no label.
+-
+- \since 0.6
+- **/
+- QString label() const;
+-
+- private:
+- Q_DISABLE_COPY(Page)
+-
+- Page(DocumentData *doc, int index);
+- PageData *m_page;
+- };
+-
+-/**
+- \brief PDF document.
+-
+- The Document class represents a PDF document: its pages, and all the global
+- properties, metadata, etc.
+-
+- \section ownership Ownership of the returned objects
+-
+- All the functions that returns class pointers create new object, and the
+- responsability of those is given to the callee.
+-
+- The only exception is \link Poppler::Page::transition() Page::transition()\endlink.
+-
+- \section document-loading Loading
+-
+- To get a Document, you have to load it via the load() & loadFromData()
+- functions.
+-
+- In all the functions that have passwords as arguments, they \b must be Latin1
+- encoded. If you have a password that is a UTF-8 string, you need to use
+- QString::toLatin1() (or similar) to convert the password first.
+- If you have a UTF-8 character array, consider converting it to a QString first
+- (QString::fromUtf8(), or similar) before converting to Latin1 encoding.
+-
+- \section document-rendering Rendering
+-
+- To render pages of a document, you have different Document functions to set
+- various options.
+-
+- \subsection document-rendering-backend Backends
+-
+- %Poppler offers a different backends for rendering the pages. Currently
+- there are two backends (see #RenderBackend), but only the Splash engine works
+- well and has been tested.
+-
+- The available rendering backends can be discovered via availableRenderBackends().
+- The current rendering backend can be changed using setRenderBackend().
+- Please note that setting a backend not listed in the available ones
+- will always result in null QImage's.
+-
+- \section document-cms Color management support
+-
+- %Poppler, if compiled with this support, provides functions to handle color
+- profiles.
+-
+- To know whether the %Poppler version you are using has support for color
+- management, you can query Poppler::isCmsAvailable(). In case it is not
+- avilable, all the color management-related functions will either do nothing
+- or return null.
+-*/
+- class POPPLER_QT4_EXPORT Document {
+- friend class Page;
+- friend class DocumentData;
+-
+- public:
+- /**
+- The page mode
+- */
+- enum PageMode {
+- UseNone, ///< No mode - neither document outline nor thumbnail images are visible
+- UseOutlines, ///< Document outline visible
+- UseThumbs, ///< Thumbnail images visible
+- FullScreen, ///< Fullscreen mode (no menubar, windows controls etc)
+- UseOC, ///< Optional content group panel visible
+- UseAttach ///< Attachments panel visible
+- };
+-
+- /**
+- The page layout
+- */
+- enum PageLayout {
+- NoLayout, ///< Layout not specified
+- SinglePage, ///< Display a single page
+- OneColumn, ///< Display a single column of pages
+- TwoColumnLeft, ///< Display the pages in two columns, with odd-numbered pages on the left
+- TwoColumnRight, ///< Display the pages in two columns, with odd-numbered pages on the right
+- TwoPageLeft, ///< Display the pages two at a time, with odd-numbered pages on the left
+- TwoPageRight ///< Display the pages two at a time, with odd-numbered pages on the right
+- };
+-
+- /**
+- The render backends available
+-
+- \since 0.6
+- */
+- enum RenderBackend {
+- SplashBackend, ///< Splash backend
+- ArthurBackend ///< Arthur (Qt4) backend
+- };
+-
+- /**
+- The render hints available
+-
+- \since 0.6
+- */
+- enum RenderHint {
+- Antialiasing = 0x00000001, ///< Antialiasing for graphics
+- TextAntialiasing = 0x00000002, ///< Antialiasing for text
+- TextHinting = 0x00000004, ///< Hinting for text \since 0.12.1
+- TextSlightHinting = 0x00000008, ///< Lighter hinting for text when combined with TextHinting \since 0.18
+- OverprintPreview = 0x00000010, ///< Overprint preview \since 0.22
+- ThinLineSolid = 0x00000020, ///< Enhance thin lines solid \since 0.24
+- ThinLineShape = 0x00000040, ///< Enhance thin lines shape. Wins over ThinLineSolid \since 0.24
+- IgnorePaperColor = 0x00000080 ///< Do not compose with the paper color \since 0.35
+- };
+- Q_DECLARE_FLAGS( RenderHints, RenderHint )
+-
+- /**
+- Form types
+-
+- \since 0.22
+- */
+- enum FormType {
+- NoForm, ///< Document doesn't contain forms
+- AcroForm, ///< AcroForm
+- XfaForm ///< Adobe XML Forms Architecture (XFA), currently unsupported
+- };
+-
+- /**
+- Set a color display profile for the current document.
+-
+- \param outputProfileA is a \c cmsHPROFILE of the LCMS library.
+-
+- \since 0.12
+- */
+- void setColorDisplayProfile(void *outputProfileA);
+- /**
+- Set a color display profile for the current document.
+-
+- \param name is the name of the display profile to set.
+-
+- \since 0.12
+- */
+- void setColorDisplayProfileName(const QString &name);
+- /**
+- Return the current RGB profile.
+-
+- \return a \c cmsHPROFILE of the LCMS library.
+-
+- \since 0.12
+- */
+- void* colorRgbProfile() const;
+- /**
+- Return the current display profile.
+-
+- \return a \c cmsHPROFILE of the LCMS library.
+-
+- \since 0.12
+- */
+- void *colorDisplayProfile() const;
+-
+- /**
+- Load the document from a file on disk
+-
+- \param filePath the name (and path, if required) of the file to load
+- \param ownerPassword the Latin1-encoded owner password to use in
+- loading the file
+- \param userPassword the Latin1-encoded user ("open") password
+- to use in loading the file
+-
+- \return the loaded document, or NULL on error
+-
+- \note The caller owns the pointer to Document, and this should
+- be deleted when no longer required.
+-
+- \warning The returning document may be locked if a password is required
+- to open the file, and one is not provided (as the userPassword).
+- */
+- static Document *load(const QString & filePath,
+- const QByteArray &ownerPassword=QByteArray(),
+- const QByteArray &userPassword=QByteArray());
+-
+- /**
+- Load the document from memory
+-
+- \param fileContents the file contents. They are copied so there is no need
+- to keep the byte array around for the full life time of
+- the document.
+- \param ownerPassword the Latin1-encoded owner password to use in
+- loading the file
+- \param userPassword the Latin1-encoded user ("open") password
+- to use in loading the file
+-
+- \return the loaded document, or NULL on error
+-
+- \note The caller owns the pointer to Document, and this should
+- be deleted when no longer required.
+-
+- \warning The returning document may be locked if a password is required
+- to open the file, and one is not provided (as the userPassword).
+-
+- \since 0.6
+- */
+- static Document *loadFromData(const QByteArray &fileContents,
+- const QByteArray &ownerPassword=QByteArray(),
+- const QByteArray &userPassword=QByteArray());
+-
+- /**
+- Get a specified Page
+-
+- Note that this follows the PDF standard of being zero based - if you
+- want the first page, then you need an index of zero.
+-
+- The caller gets the ownership of the returned object.
+-
+- \param index the page number index
+- */
+- Page *page(int index) const;
+-
+- /**
+- \overload
+-
+-
+- The intent is that you can pass in a label like \c "ix" and
+- get the page with that label (which might be in the table of
+- contents), or pass in \c "1" and get the page that the user
+- expects (which might not be the first page, if there is a
+- title page and a table of contents).
+-
+- \param label the page label
+- */
+- Page *page(const QString &label) const;
+-
+- /**
+- The number of pages in the document
+- */
+- int numPages() const;
+-
+- /**
+- The type of mode that should be used by the application
+- when the document is opened. Note that while this is
+- called page mode, it is really viewer application mode.
+- */
+- PageMode pageMode() const;
+-
+- /**
+- The layout that pages should be shown in when the document
+- is first opened. This basically describes how pages are
+- shown relative to each other.
+- */
+- PageLayout pageLayout() const;
+-
+- /**
+- The predominant reading order for text as supplied by
+- the document's viewer preferences.
+-
+- \since 0.26
+- */
+- Qt::LayoutDirection textDirection() const;
+-
+- /**
+- Provide the passwords required to unlock the document
+-
+- \param ownerPassword the Latin1-encoded owner password to use in
+- loading the file
+- \param userPassword the Latin1-encoded user ("open") password
+- to use in loading the file
+- */
+- bool unlock(const QByteArray &ownerPassword, const QByteArray &userPassword);
+-
+- /**
+- Determine if the document is locked
+- */
+- bool isLocked() const;
+-
+- /**
+- The date associated with the document
+-
+- You would use this method with something like:
+- \code
+-QDateTime created = m_doc->date("CreationDate");
+-QDateTime modified = m_doc->date("ModDate");
+- \endcode
+-
+- The available dates are:
+- - CreationDate: the date of creation of the document
+- - ModDate: the date of the last change in the document
+-
+- \param data the type of date that is required
+- */
+- QDateTime date( const QString & data ) const;
+-
+- /**
+- Set the Info dict date entry specified by \param key to \param val
+-
+- \returns true on success, false on failure
+- */
+- bool setDate( const QString & key, const QDateTime & val );
+-
+- /**
+- The date of the creation of the document
+- */
+- QDateTime creationDate() const;
+-
+- /**
+- Set the creation date of the document to \param val
+-
+- \returns true on success, false on failure
+- */
+- bool setCreationDate( const QDateTime & val );
+-
+- /**
+- The date of the last change in the document
+- */
+- QDateTime modificationDate() const;
+-
+- /**
+- Set the modification date of the document to \param val
+-
+- \returns true on success, false on failure
+- */
+- bool setModificationDate( const QDateTime & val );
+-
+- /**
+- Get specified information associated with the document
+-
+- You would use this method with something like:
+- \code
+-QString title = m_doc->info("Title");
+-QString subject = m_doc->info("Subject");
+- \endcode
+-
+- In addition to \c Title and \c Subject, other information that may
+- be available include \c Author, \c Keywords, \c Creator and \c Producer.
+-
+- \param data the information that is required
+-
+- \sa infoKeys() to get a list of the available keys
+- */
+- QString info( const QString & data ) const;
+-
+- /**
+- Set the value of the document's Info dictionary entry specified by \param key to \param val
+-
+- \returns true on success, false on failure
+- */
+- bool setInfo( const QString & key, const QString & val );
+-
+- /**
+- The title of the document
+- */
+- QString title() const;
+-
+- /**
+- Set the title of the document to \param val
+-
+- \returns true on success, false on failure
+- */
+- bool setTitle( const QString & val );
+-
+- /**
+- The author of the document
+- */
+- QString author() const;
+-
+- /**
+- Set the author of the document to \param val
+-
+- \returns true on success, false on failure
+- */
+- bool setAuthor( const QString & val );
+-
+- /**
+- The subject of the document
+- */
+- QString subject() const;
+-
+- /**
+- Set the subject of the document to \param val
+-
+- \returns true on success, false on failure
+- */
+- bool setSubject( const QString & val );
+-
+- /**
+- The keywords of the document
+- */
+- QString keywords() const;
+-
+- /**
+- Set the keywords of the document to \param val
+-
+- \returns true on success, false on failure
+- */
+- bool setKeywords( const QString & val );
+-
+- /**
+- The creator of the document
+- */
+- QString creator() const;
+-
+- /**
+- Set the creator of the document to \param val
+-
+- \returns true on success, false on failure
+- */
+- bool setCreator( const QString & val );
+-
+- /**
+- The producer of the document
+- */
+- QString producer() const;
+-
+- /**
+- Set the producer of the document to \param val
+-
+- \returns true on success, false on failure
+- */
+- bool setProducer( const QString & val );
+-
+- /**
+- Remove the document's Info dictionary
+-
+- \returns true on success, false on failure
+- */
+- bool removeInfo();
+-
+- /**
+- Obtain a list of the available string information keys.
+- */
+- QStringList infoKeys() const;
+-
+- /**
+- Test if the document is encrypted
+- */
+- bool isEncrypted() const;
+-
+- /**
+- Test if the document is linearised
+-
+- In some cases, this is called "fast web view", since it
+- is mostly an optimisation for viewing over the Web.
+- */
+- bool isLinearized() const;
+-
+- /**
+- Test if the permissions on the document allow it to be
+- printed
+- */
+- bool okToPrint() const;
+-
+- /**
+- Test if the permissions on the document allow it to be
+- printed at high resolution
+- */
+- bool okToPrintHighRes() const;
+-
+- /**
+- Test if the permissions on the document allow it to be
+- changed.
+-
+- \note depending on the type of change, it may be more
+- appropriate to check other properties as well.
+- */
+- bool okToChange() const;
+-
+- /**
+- Test if the permissions on the document allow the
+- contents to be copied / extracted
+- */
+- bool okToCopy() const;
+-
+- /**
+- Test if the permissions on the document allow annotations
+- to be added or modified, and interactive form fields (including
+- signature fields) to be completed.
+- */
+- bool okToAddNotes() const;
+-
+- /**
+- Test if the permissions on the document allow interactive
+- form fields (including signature fields) to be completed.
+-
+- \note this can be true even if okToAddNotes() is false - this
+- means that only form completion is permitted.
+- */
+- bool okToFillForm() const;
+-
+- /**
+- Test if the permissions on the document allow interactive
+- form fields (including signature fields) to be set, created and
+- modified
+- */
+- bool okToCreateFormFields() const;
+-
+- /**
+- Test if the permissions on the document allow content extraction
+- (text and perhaps other content) for accessibility usage (eg for
+- a screen reader)
+- */
+- bool okToExtractForAccessibility() const;
+-
+- /**
+- Test if the permissions on the document allow it to be
+- "assembled" - insertion, rotation and deletion of pages;
+- or creation of bookmarks and thumbnail images.
+-
+- \note this can be true even if okToChange() is false
+- */
+- bool okToAssemble() const;
+-
+- /**
+- The version of the PDF specification that the document
+- conforms to
+-
+- \deprecated use getPdfVersion and avoid float point
+- comparisons/handling
+- */
+- Q_DECL_DEPRECATED double pdfVersion() const;
+-
+- /**
+- The version of the PDF specification that the document
+- conforms to
+-
+- \param major an optional pointer to a variable where store the
+- "major" number of the version
+- \param minor an optional pointer to a variable where store the
+- "minor" number of the version
+-
+- \since 0.12
+- */
+- void getPdfVersion(int *major, int *minor) const;
+-
+- /**
+- The fonts within the PDF document.
+-
+- This is a shorthand for getting all the fonts at once.
+-
+- \note this can take a very long time to run with a large
+- document. You may wish to use a FontIterator if you have more
+- than say 20 pages
+-
+- \see newFontIterator()
+- */
+- QList<FontInfo> fonts() const;
+-
+- /**
+- Scans for fonts within the PDF document.
+-
+- \param numPages the number of pages to scan
+- \param fontList pointer to the list where the font information
+- should be placed
+-
+- \note with this method you can scan for fonts only \em once for each
+- document; once the end is reached, no more scanning with this method
+- can be done
+-
+- \return false if the end of the document has been reached
+-
+- \deprecated this function is quite limited in its job (see note),
+- better use fonts() or newFontIterator()
+-
+- \see fonts(), newFontIterator()
+- */
+- Q_DECL_DEPRECATED bool scanForFonts( int numPages, QList<FontInfo> *fontList ) const;
+-
+- /**
+- Creates a new FontIterator object for font scanning.
+-
+- The new iterator can be used for reading the font information of the
+- document, reading page by page.
+-
+- The caller is responsible for the returned object, ie it should freed
+- it when no more useful.
+-
+- \param startPage the initial page from which start reading fonts
+-
+- \see fonts()
+-
+- \since 0.12
+- */
+- FontIterator* newFontIterator( int startPage = 0 ) const;
+-
+- /**
+- The font data if the font is an embedded one.
+-
+- \since 0.10
+- */
+- QByteArray fontData(const FontInfo &font) const;
+-
+- /**
+- The documents embedded within the PDF document.
+-
+- \note there are two types of embedded document - this call
+- only accesses documents that are embedded at the document level.
+- */
+- QList<EmbeddedFile*> embeddedFiles() const;
+-
+- /**
+- Whether there are any documents embedded in this PDF document.
+- */
+- bool hasEmbeddedFiles() const;
+-
+- /**
+- Gets the table of contents (TOC) of the Document.
+-
+- The caller is responsable for the returned object.
+-
+- In the tree the tag name is the 'screen' name of the entry. A tag can have
+- attributes. Here follows the list of tag attributes with meaning:
+- - Destination: A string description of the referred destination
+- - DestinationName: A 'named reference' to the viewport
+- - ExternalFileName: A link to a external filename
+- - Open: A bool value that tells whether the subbranch of the item is open or not
+-
+- Resolving the final destination for each item can be done in the following way:
+- - first, checking for 'Destination': if not empty, then a LinkDestination
+- can be constructed straight with it
+- - as second step, if the 'DestinationName' is not empty, then the destination
+- can be resolved using linkDestination()
+-
+- Note also that if 'ExternalFileName' is not emtpy, then the destination refers
+- to that document (and not to the current one).
+-
+- \returns the TOC, or NULL if the Document does not have one
+- */
+- QDomDocument *toc() const;
+-
+- /**
+- Tries to resolve the named destination \p name.
+-
+- \note this operation starts a search through the whole document
+-
+- \returns a new LinkDestination object if the named destination was
+- actually found, or NULL otherwise
+- */
+- LinkDestination *linkDestination( const QString &name );
+-
+- /**
+- Sets the paper color
+-
+- \param color the new paper color
+- */
+- void setPaperColor(const QColor &color);
+- /**
+- The paper color
+-
+- The default color is white.
+- */
+- QColor paperColor() const;
+-
+- /**
+- Sets the backend used to render the pages.
+-
+- \param backend the new rendering backend
+-
+- \since 0.6
+- */
+- void setRenderBackend( RenderBackend backend );
+- /**
+- The currently set render backend
+-
+- The default backend is \ref SplashBackend
+-
+- \since 0.6
+- */
+- RenderBackend renderBackend() const;
+-
+- /**
+- The available rendering backends.
+-
+- \since 0.6
+- */
+- static QSet<RenderBackend> availableRenderBackends();
+-
+- /**
+- Sets the render \p hint .
+-
+- \note some hints may not be supported by some rendering backends.
+-
+- \param on whether the flag should be added or removed.
+-
+- \since 0.6
+- */
+- void setRenderHint( RenderHint hint, bool on = true );
+- /**
+- The currently set render hints.
+-
+- \since 0.6
+- */
+- RenderHints renderHints() const;
+-
+- /**
+- Gets a new PS converter for this document.
+-
+- The caller gets the ownership of the returned converter.
+-
+- \since 0.6
+- */
+- PSConverter *psConverter() const;
+-
+- /**
+- Gets a new PDF converter for this document.
+-
+- The caller gets the ownership of the returned converter.
+-
+- \since 0.8
+- */
+- PDFConverter *pdfConverter() const;
+-
+- /**
+- Gets the metadata stream contents
+-
+- \since 0.6
+- */
+- QString metadata() const;
+-
+- /**
+- Test whether this document has "optional content".
+-
+- Optional content is used to optionally turn on (display)
+- and turn off (not display) some elements of the document.
+- The most common use of this is for layers in design
+- applications, but it can be used for a range of things,
+- such as not including some content in printing, and
+- displaying content in the appropriate language.
+-
+- \since 0.8
+- */
+- bool hasOptionalContent() const;
+-
+- /**
+- Itemviews model for optional content.
+-
+- The model is owned by the document.
+-
+- \since 0.8
+- */
+- OptContentModel *optionalContentModel();
+-
+- /**
+- Document-level JavaScript scripts.
+-
+- Returns the list of document level JavaScript scripts to be always
+- executed before any other script.
+-
+- \since 0.10
+- */
+- QStringList scripts() const;
+-
+- /**
+- The PDF identifiers.
+-
+- \param permanentId an optional pointer to a variable where store the
+- permanent ID of the document
+- \param updateId an optional pointer to a variable where store the
+- update ID of the document
+-
+- \return whether the document has the IDs
+-
+- \since 0.16
+- */
+- bool getPdfId(QByteArray *permanentId, QByteArray *updateId) const;
+-
+- /**
+- Returns the type of forms contained in the document
+-
+- \since 0.22
+- */
+- FormType formType() const;
+-
+- /**
+- Destructor.
+- */
+- ~Document();
+-
+- private:
+- Q_DISABLE_COPY(Document)
+-
+- DocumentData *m_doc;
+-
+- Document(DocumentData *dataA);
+- };
+-
+- class BaseConverterPrivate;
+- class PSConverterPrivate;
+- class PDFConverterPrivate;
+- /**
+- \brief Base converter.
+-
+- This is the base class for the converters.
+-
+- \since 0.8
+- */
+- class POPPLER_QT4_EXPORT BaseConverter
+- {
+- friend class Document;
+- public:
+- /**
+- Destructor.
+- */
+- virtual ~BaseConverter();
+-
+- /** Sets the output file name. You must set this or the output device. */
+- void setOutputFileName(const QString &outputFileName);
+-
+- /**
+- * Sets the output device. You must set this or the output file name.
+- *
+- * \since 0.8
+- */
+- void setOutputDevice(QIODevice *device);
+-
+- /**
+- Does the conversion.
+-
+- \return whether the conversion succeeded
+- */
+- virtual bool convert() = 0;
+-
+- enum Error
+- {
+- NoError,
+- FileLockedError,
+- OpenOutputError,
+- NotSupportedInputFileError
+- };
+-
+- /**
+- Returns the last error
+- \since 0.12.1
+- */
+- Error lastError() const;
+-
+- protected:
+- /// \cond PRIVATE
+- BaseConverter(BaseConverterPrivate &dd);
+- Q_DECLARE_PRIVATE(BaseConverter)
+- BaseConverterPrivate *d_ptr;
+- /// \endcond
+-
+- private:
+- Q_DISABLE_COPY(BaseConverter)
+- };
+-
+- /**
+- Converts a PDF to PS
+-
+- Sizes have to be in Points (1/72 inch)
+-
+- If you are using QPrinter you can get paper size by doing:
+- \code
+-QPrinter dummy(QPrinter::PrinterResolution);
+-dummy.setFullPage(true);
+-dummy.setPageSize(myPageSize);
+-width = dummy.width();
+-height = dummy.height();
+- \endcode
+-
+- \since 0.6
+- */
+- class POPPLER_QT4_EXPORT PSConverter : public BaseConverter
+- {
+- friend class Document;
+- public:
+- /**
+- Options for the PS export.
+-
+- \since 0.10
+- */
+- enum PSOption {
+- Printing = 0x00000001, ///< The PS is generated for printing purposes
+- StrictMargins = 0x00000002,
+- ForceRasterization = 0x00000004,
+- PrintToEPS = 0x00000008, ///< Output EPS instead of PS \since 0.20
+- HideAnnotations = 0x00000010 ///< Don't print annotations \since 0.20
+- };
+- Q_DECLARE_FLAGS( PSOptions, PSOption )
+-
+- /**
+- Destructor.
+- */
+- ~PSConverter();
+-
+- /** Sets the list of pages to print. Mandatory. */
+- void setPageList(const QList<int> &pageList);
+-
+- /**
+- Sets the title of the PS Document. Optional
+- */
+- void setTitle(const QString &title);
+-
+- /**
+- Sets the horizontal DPI. Defaults to 72.0
+- */
+- void setHDPI(double hDPI);
+-
+- /**
+- Sets the vertical DPI. Defaults to 72.0
+- */
+- void setVDPI(double vDPI);
+-
+- /**
+- Sets the rotate. Defaults to not rotated
+- */
+- void setRotate(int rotate);
+-
+- /**
+- Sets the output paper width. Has to be set.
+- */
+- void setPaperWidth(int paperWidth);
+-
+- /**
+- Sets the output paper height. Has to be set.
+- */
+- void setPaperHeight(int paperHeight);
+-
+- /**
+- Sets the output right margin. Defaults to 0
+- */
+- void setRightMargin(int marginRight);
+-
+- /**
+- Sets the output bottom margin. Defaults to 0
+- */
+- void setBottomMargin(int marginBottom);
+-
+- /**
+- Sets the output left margin. Defaults to 0
+- */
+- void setLeftMargin(int marginLeft);
+-
+- /**
+- Sets the output top margin. Defaults to 0
+- */
+- void setTopMargin(int marginTop);
+-
+- /**
+- Defines if margins have to be strictly followed (even if that
+- means changing aspect ratio), or if the margins can be adapted
+- to keep aspect ratio.
+-
+- Defaults to false.
+- */
+- void setStrictMargins(bool strictMargins);
+-
+- /** Defines if the page will be rasterized to an image before printing. Defaults to false */
+- void setForceRasterize(bool forceRasterize);
+-
+- /**
+- Sets the options for the PS export.
+-
+- \since 0.10
+- */
+- void setPSOptions(PSOptions options);
+-
+- /**
+- The currently set options for the PS export.
+-
+- The default flags are: Printing.
+-
+- \since 0.10
+- */
+- PSOptions psOptions() const;
+-
+- /**
+- Sets a function that will be called each time a page is converted.
+-
+- The payload belongs to the caller.
+-
+- \since 0.16
+- */
+- void setPageConvertedCallback(void (* callback)(int page, void *payload), void *payload);
+-
+- bool convert();
+-
+- private:
+- Q_DECLARE_PRIVATE(PSConverter)
+- Q_DISABLE_COPY(PSConverter)
+-
+- PSConverter(DocumentData *document);
+- };
+-
+- /**
+- Converts a PDF to PDF (thus saves a copy of the document).
+-
+- \since 0.8
+- */
+- class POPPLER_QT4_EXPORT PDFConverter : public BaseConverter
+- {
+- friend class Document;
+- public:
+- /**
+- Options for the PDF export.
+- */
+- enum PDFOption {
+- WithChanges = 0x00000001 ///< The changes done to the document are saved as well
+- };
+- Q_DECLARE_FLAGS( PDFOptions, PDFOption )
+-
+- /**
+- Destructor.
+- */
+- virtual ~PDFConverter();
+-
+- /**
+- Sets the options for the PDF export.
+- */
+- void setPDFOptions(PDFOptions options);
+- /**
+- The currently set options for the PDF export.
+- */
+- PDFOptions pdfOptions() const;
+-
+- bool convert();
+-
+- private:
+- Q_DECLARE_PRIVATE(PDFConverter)
+- Q_DISABLE_COPY(PDFConverter)
+-
+- PDFConverter(DocumentData *document);
+- };
+-
+- /**
+- Conversion from PDF date string format to QDateTime
+- */
+- POPPLER_QT4_EXPORT QDateTime convertDate( char *dateString );
+-
+- /**
+- Whether the color management functions are available.
+-
+- \since 0.12
+- */
+- POPPLER_QT4_EXPORT bool isCmsAvailable();
+-
+- /**
+- Whether the overprint preview functionality is available.
+-
+- \since 0.22
+- */
+- POPPLER_QT4_EXPORT bool isOverprintPreviewAvailable();
+-
+- class SoundData;
+- /**
+- Container class for a sound file in a PDF document.
+-
+- A sound can be either External (in that case should be loaded the file
+- whose url is represented by url() ), or Embedded, and the player has to
+- play the data contained in data().
+-
+- \since 0.6
+- */
+- class POPPLER_QT4_EXPORT SoundObject {
+- public:
+- /**
+- The type of sound
+- */
+- enum SoundType {
+- External, ///< The real sound file is external
+- Embedded ///< The sound is contained in the data
+- };
+-
+- /**
+- The encoding format used for the sound
+- */
+- enum SoundEncoding {
+- Raw, ///< Raw encoding, with unspecified or unsigned values in the range [ 0, 2^B - 1 ]
+- Signed, ///< Twos-complement values
+- muLaw, ///< mu-law-encoded samples
+- ALaw ///< A-law-encoded samples
+- };
+-
+- /// \cond PRIVATE
+- SoundObject(Sound *popplersound);
+- /// \endcond
+-
+- ~SoundObject();
+-
+- /**
+- Is the sound embedded (SoundObject::Embedded) or external (SoundObject::External)?
+- */
+- SoundType soundType() const;
+-
+- /**
+- The URL of the sound file to be played, in case of SoundObject::External
+- */
+- QString url() const;
+-
+- /**
+- The data of the sound, in case of SoundObject::Embedded
+- */
+- QByteArray data() const;
+-
+- /**
+- The sampling rate of the sound
+- */
+- double samplingRate() const;
+-
+- /**
+- The number of sound channels to use to play the sound
+- */
+- int channels() const;
+-
+- /**
+- The number of bits per sample value per channel
+- */
+- int bitsPerSample() const;
+-
+- /**
+- The encoding used for the sound
+- */
+- SoundEncoding soundEncoding() const;
+-
+- private:
+- Q_DISABLE_COPY(SoundObject)
+-
+- SoundData *m_soundData;
+- };
+-
+- class MovieData;
+- /**
+- Container class for a movie object in a PDF document.
+-
+- \since 0.10
+- */
+- class POPPLER_QT4_EXPORT MovieObject {
+- friend class AnnotationPrivate;
+- public:
+- /**
+- The play mode for playing the movie
+- */
+- enum PlayMode {
+- PlayOnce, ///< Play the movie once, closing the movie controls at the end
+- PlayOpen, ///< Like PlayOnce, but leaving the controls open
+- PlayRepeat, ///< Play continuously until stopped
+- PlayPalindrome ///< Play forward, then backward, then again foward and so on until stopped
+- };
+-
+- ~MovieObject();
+-
+- /**
+- The URL of the movie to be played
+- */
+- QString url() const;
+-
+- /**
+- The size of the movie
+- */
+- QSize size() const;
+-
+- /**
+- The rotation (either 0, 90, 180, or 270 degrees clockwise) for the movie,
+- */
+- int rotation() const;
+-
+- /**
+- Whether show a bar with movie controls
+- */
+- bool showControls() const;
+-
+- /**
+- How to play the movie
+- */
+- PlayMode playMode() const;
+-
+- /**
+- Returns whether a poster image should be shown if the movie is not playing.
+- \since 0.22
+- */
+- bool showPosterImage() const;
+-
+- /**
+- Returns the poster image that should be shown if the movie is not playing.
+- If the image is null but showImagePoster() returns @c true, the first frame of the movie
+- should be used as poster image.
+- \since 0.22
+- */
+- QImage posterImage() const;
+-
+- private:
+- /// \cond PRIVATE
+- MovieObject( AnnotMovie *ann );
+- /// \endcond
+-
+- Q_DISABLE_COPY(MovieObject)
+-
+- MovieData *m_movieData;
+- };
+-
+-}
+-
+-Q_DECLARE_OPERATORS_FOR_FLAGS(Poppler::Page::PainterFlags)
+-Q_DECLARE_OPERATORS_FOR_FLAGS(Poppler::Page::SearchFlags)
+-Q_DECLARE_OPERATORS_FOR_FLAGS(Poppler::Document::RenderHints)
+-Q_DECLARE_OPERATORS_FOR_FLAGS(Poppler::PDFConverter::PDFOptions)
+-Q_DECLARE_OPERATORS_FOR_FLAGS(Poppler::PSConverter::PSOptions)
+-
+-#endif
+diff --git a/qt4/src/poppler-sound.cc b/qt4/src/poppler-sound.cc
+deleted file mode 100644
+index eb19b9d3..00000000
+--- a/qt4/src/poppler-sound.cc
++++ /dev/null
+@@ -1,132 +0,0 @@
+-/* poppler-sound.cc: qt interface to poppler
+- * Copyright (C) 2006-2007, Pino Toscano <pino@kde.org>
+- * Copyright (C) 2008, Albert Astals Cid <aacid@kde.org>
+- *
+- * This program is free software; you can redistribute it and/or modify
+- * it under the terms of the GNU General Public License as published by
+- * the Free Software Foundation; either version 2, or (at your option)
+- * any later version.
+- *
+- * This program is distributed in the hope that it will be useful,
+- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+- * GNU General Public License for more details.
+- *
+- * You should have received a copy of the GNU General Public License
+- * along with this program; if not, write to the Free Software
+- * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+- */
+-
+-#include "poppler-qt4.h"
+-
+-#include "Object.h"
+-#include "Stream.h"
+-#include "Sound.h"
+-
+-namespace Poppler
+-{
+-
+-class SoundData
+-{
+-public:
+- SoundData()
+- : m_soundObj( 0 )
+- {
+- }
+-
+- ~SoundData()
+- {
+- delete m_soundObj;
+- }
+-
+- SoundObject::SoundType m_type;
+- Sound *m_soundObj;
+-};
+-
+-SoundObject::SoundObject(Sound *popplersound)
+-{
+- m_soundData = new SoundData();
+- switch ( popplersound->getSoundKind() )
+- {
+- case soundEmbedded:
+- m_soundData->m_type = SoundObject::Embedded;
+- break;
+- case soundExternal:
+- default:
+- m_soundData->m_type = SoundObject::External;
+- break;
+- }
+-
+- m_soundData->m_soundObj = popplersound->copy();
+-}
+-
+-SoundObject::~SoundObject()
+-{
+- delete m_soundData;
+-}
+-
+-SoundObject::SoundType SoundObject::soundType() const
+-{
+- return m_soundData->m_type;
+-}
+-
+-QString SoundObject::url() const
+-{
+- if ( m_soundData->m_type != SoundObject::External )
+- return QString();
+-
+- GooString * goo = m_soundData->m_soundObj->getFileName();
+- return goo ? QString( goo->getCString() ) : QString();
+-}
+-
+-QByteArray SoundObject::data() const
+-{
+- if ( m_soundData->m_type != SoundObject::Embedded )
+- return QByteArray();
+-
+- Stream *stream = m_soundData->m_soundObj->getStream();
+- stream->reset();
+- int dataLen = 0;
+- QByteArray fileArray;
+- int i;
+- while ( (i = stream->getChar()) != EOF) {
+- fileArray[dataLen] = (char)i;
+- ++dataLen;
+- }
+- fileArray.resize(dataLen);
+-
+- return fileArray;
+-}
+-
+-double SoundObject::samplingRate() const
+-{
+- return m_soundData->m_soundObj->getSamplingRate();
+-}
+-
+-int SoundObject::channels() const
+-{
+- return m_soundData->m_soundObj->getChannels();
+-}
+-
+-int SoundObject::bitsPerSample() const
+-{
+- return m_soundData->m_soundObj->getBitsPerSample();
+-}
+-
+-SoundObject::SoundEncoding SoundObject::soundEncoding() const
+-{
+- switch ( m_soundData->m_soundObj->getEncoding() )
+- {
+- case soundRaw:
+- return SoundObject::Raw;
+- case soundSigned:
+- return SoundObject::Signed;
+- case soundMuLaw:
+- return SoundObject::muLaw;
+- case soundALaw:
+- return SoundObject::ALaw;
+- }
+- return SoundObject::Raw;
+-}
+-
+-}
+diff --git a/qt4/src/poppler-textbox.cc b/qt4/src/poppler-textbox.cc
+deleted file mode 100644
+index 88cf2a9e..00000000
+--- a/qt4/src/poppler-textbox.cc
++++ /dev/null
+@@ -1,63 +0,0 @@
+-/* poppler-qt.h: qt interface to poppler
+- * Copyright (C) 2005, Brad Hards <bradh@frogmouth.net>
+- * Copyright (C) 2006-2008, Albert Astals Cid <aacid@kde.org>
+- * Copyright (C) 2008, Pino Toscano <pino@kde.org>
+- *
+- * This program is free software; you can redistribute it and/or modify
+- * it under the terms of the GNU General Public License as published by
+- * the Free Software Foundation; either version 2, or (at your option)
+- * any later version.
+- *
+- * This program is distributed in the hope that it will be useful,
+- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+- * GNU General Public License for more details.
+- *
+- * You should have received a copy of the GNU General Public License
+- * along with this program; if not, write to the Free Software
+- * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+- */
+-
+-#include "poppler-qt4.h"
+-#include "poppler-private.h"
+-
+-namespace Poppler {
+-
+-TextBox::TextBox(const QString& text, const QRectF &bBox)
+-{
+- m_data = new TextBoxData();
+- m_data->text = text;
+- m_data->bBox = bBox;
+-}
+-
+-TextBox::~TextBox()
+-{
+- delete m_data;
+-}
+-
+-QString TextBox::text() const
+-{
+- return m_data->text;
+-}
+-
+-QRectF TextBox::boundingBox() const
+-{
+- return m_data->bBox;
+-}
+-
+-TextBox *TextBox::nextWord() const
+-{
+- return m_data->nextWord;
+-}
+-
+-QRectF TextBox::charBoundingBox(int i) const
+-{
+- return m_data->charBBoxes.value(i);
+-}
+-
+-bool TextBox::hasSpaceAfter() const
+-{
+- return m_data->hasSpaceAfter;
+-}
+-
+-}
+diff --git a/qt4/tests/.gitignore b/qt4/tests/.gitignore
+deleted file mode 100644
+index 3746eb87..00000000
+--- a/qt4/tests/.gitignore
++++ /dev/null
+@@ -1,33 +0,0 @@
+-.deps
+-.libs
+-*.la
+-*.lo
+-*.moc
+-Makefile
+-Makefile.in
+-stress-poppler-qt4
+-stress-poppler-dir
+-test-poppler-qt4
+-test-password-qt4
+-poppler-attachments
+-poppler-fonts
+-poppler-texts
+-poppler-forms
+-stress-threads-qt4
+-test-render-to-file
+-check_actualtext
+-check_attachments
+-check_dateConversion
+-check_fonts
+-check_goostring
+-check_lexer
+-check_links
+-check_metadata
+-check_optcontent
+-check_permissions
+-check_pagelayout
+-check_pagemode
+-check_password
+-check_search
+-check_strings
+-
+diff --git a/qt4/tests/CMakeLists.txt b/qt4/tests/CMakeLists.txt
+deleted file mode 100644
+index a01a638a..00000000
+--- a/qt4/tests/CMakeLists.txt
++++ /dev/null
+@@ -1,67 +0,0 @@
+-add_definitions(${QT4_DEFINITIONS})
+-add_definitions(-DTESTDATADIR=\"${TESTDATADIR}\")
+-
+-include_directories(
+- ${CMAKE_CURRENT_SOURCE_DIR}
+- ${CMAKE_CURRENT_SOURCE_DIR}/../src
+- ${CMAKE_CURRENT_BINARY_DIR}
+- ${QT4_INCLUDE_DIR}
+-)
+-
+-macro(QT4_ADD_SIMPLETEST exe source)
+- string(REPLACE "-" "" test_name ${exe})
+- set(${test_name}_SOURCES
+- ${source}
+- )
+- poppler_add_test(${exe} BUILD_QT4_TESTS ${${test_name}_SOURCES})
+- target_link_libraries(${exe} poppler-qt4)
+- if(MSVC)
+- target_link_libraries(${exe} poppler ${poppler_LIBS})
+- endif()
+-endmacro(QT4_ADD_SIMPLETEST)
+-
+-macro(QT4_ADD_QTEST exe source)
+- if (QT4_QTTEST_FOUND)
+- string(REPLACE "-" "" test_name ${exe})
+- set(${test_name}_SOURCES
+- ${source}
+- )
+- poppler_add_unittest(${exe} BUILD_QT4_TESTS ${${test_name}_SOURCES})
+- qt4_automoc(${${test_name}_SOURCES})
+- target_link_libraries(${exe} poppler-qt4 ${QT4_QTTEST_LIBRARY})
+- if(MSVC)
+- target_link_libraries(${exe} poppler ${poppler_LIBS})
+- endif()
+- endif ()
+-endmacro(QT4_ADD_QTEST)
+-
+-
+-qt4_add_simpletest(test-poppler-qt4 test-poppler-qt4.cpp)
+-qt4_add_simpletest(test-password-qt4 test-password-qt4.cpp)
+-qt4_add_simpletest(test-render-to-file-qt4 test-render-to-file.cpp)
+-qt4_add_simpletest(poppler-qt4-forms poppler-forms.cpp)
+-qt4_add_simpletest(poppler-qt4-fonts poppler-fonts.cpp)
+-qt4_add_simpletest(poppler-qt4-attachments poppler-attachments.cpp)
+-qt4_add_simpletest(stress-poppler-qt4 stress-poppler-qt4.cpp)
+-qt4_add_simpletest(stress-poppler-dir-qt4 stress-poppler-dir.cpp)
+-qt4_add_simpletest(stress-threads-qt4 stress-threads-qt4.cpp)
+-qt4_add_simpletest(poppler-qt4-texts poppler-texts.cpp)
+-
+-qt4_add_qtest(check_qt4_attachments check_attachments.cpp)
+-qt4_add_qtest(check_qt4_dateConversion check_dateConversion.cpp)
+-qt4_add_qtest(check_qt4_fonts check_fonts.cpp)
+-qt4_add_qtest(check_qt4_links check_links.cpp)
+-qt4_add_qtest(check_qt4_metadata check_metadata.cpp)
+-qt4_add_qtest(check_qt4_optcontent check_optcontent.cpp)
+-qt4_add_qtest(check_qt4_pagelayout check_pagelayout.cpp)
+-qt4_add_qtest(check_qt4_pagemode check_pagemode.cpp)
+-qt4_add_qtest(check_qt4_password check_password.cpp)
+-qt4_add_qtest(check_qt4_permissions check_permissions.cpp)
+-qt4_add_qtest(check_qt4_search check_search.cpp)
+-qt4_add_qtest(check_qt4_actualtext check_actualtext.cpp)
+-qt4_add_qtest(check_qt4_lexer check_lexer.cpp)
+-qt4_add_qtest(check_qt4_pagelabelinfo check_pagelabelinfo.cpp)
+-qt4_add_qtest(check_qt4_goostring check_goostring.cpp)
+-if (NOT WIN32)
+- qt4_add_qtest(check_qt4_strings check_strings.cpp)
+-endif ()
+diff --git a/qt4/tests/README.unittest b/qt4/tests/README.unittest
+deleted file mode 100644
+index 02296e08..00000000
+--- a/qt4/tests/README.unittest
++++ /dev/null
+@@ -1,23 +0,0 @@
+-The unittests for the Qt4 bindings rely on the QtTestLib package, and
+-will not be built until this is installed. If you do not have it, then
+-you can download it from the Trolltech website.
+-
+-Note that there are a range of ways in which you can run the tests:
+-1. "make check" will run all the tests.
+-2. You can run a single test by executing the applicable
+-executable. For example, you can run the PageMode tests by
+-"./check_pagemode"
+-3. You can run a single function within a single test by appending the
+-name of the function to the executable. For example, if you just want
+-to run the FullScreen test within the PageMode tests, you can
+-"./check_pagemode checkFullScreen". Run the executable with -functions
+-to get a list of all the functions.
+-4. You can run a single function with specific data by appending the
+-name of the function, followed by a colon, then the data label to the
+-executable. For example, to just do the Author check within the
+-metadata checks, you can "./check_metadata checkStrings:Author".
+-
+-For a full list of options, run a executable with "-help".
+-
+-Brad Hards
+-bradh@frogmouth.net
+diff --git a/qt4/tests/check_actualtext.cpp b/qt4/tests/check_actualtext.cpp
+deleted file mode 100644
+index 5c765c51..00000000
+--- a/qt4/tests/check_actualtext.cpp
++++ /dev/null
+@@ -1,33 +0,0 @@
+-#include <QtTest/QtTest>
+-
+-#include <poppler-qt4.h>
+-
+-#include <QtCore/QFile>
+-
+-class TestActualText: public QObject
+-{
+- Q_OBJECT
+-private slots:
+- void checkActualText1();
+-};
+-
+-void TestActualText::checkActualText1()
+-{
+- Poppler::Document *doc;
+- doc = Poppler::Document::load(TESTDATADIR "/unittestcases/WithActualText.pdf");
+- QVERIFY( doc );
+-
+- Poppler::Page *page = doc->page(0);
+- QVERIFY( page );
+-
+- QCOMPARE( page->text(QRectF()), QString("The slow brown fox jumps over the black dog.") );
+-
+- delete page;
+-
+- delete doc;
+-}
+-
+-QTEST_MAIN(TestActualText)
+-
+-#include "check_actualtext.moc"
+-
+diff --git a/qt4/tests/check_attachments.cpp b/qt4/tests/check_attachments.cpp
+deleted file mode 100644
+index 73e31502..00000000
+--- a/qt4/tests/check_attachments.cpp
++++ /dev/null
+@@ -1,157 +0,0 @@
+-#include <QtTest/QtTest>
+-
+-#include <poppler-qt4.h>
+-
+-#include <QtCore/QFile>
+-
+-class TestAttachments: public QObject
+-{
+- Q_OBJECT
+-private slots:
+- void checkNoAttachments();
+- void checkAttach1();
+- void checkAttach2();
+- void checkAttach3();
+- void checkAttach4();
+-};
+-
+-void TestAttachments::checkNoAttachments()
+-{
+- Poppler::Document *doc;
+- doc = Poppler::Document::load(TESTDATADIR "/unittestcases/truetype.pdf");
+- QVERIFY( doc );
+-
+- QCOMPARE( doc->hasEmbeddedFiles(), false );
+-
+- delete doc;
+-}
+-
+-void TestAttachments::checkAttach1()
+-{
+-
+- Poppler::Document *doc;
+- doc = Poppler::Document::load(TESTDATADIR "/unittestcases/WithAttachments.pdf");
+- QVERIFY( doc );
+-
+- QVERIFY( doc->hasEmbeddedFiles() );
+-
+- QList<Poppler::EmbeddedFile*> fileList = doc->embeddedFiles();
+- QCOMPARE( fileList.size(), 2 );
+-
+- Poppler::EmbeddedFile *embfile = fileList.at(0);
+- QCOMPARE( embfile->name(), QString( "kroller.png" ) );
+- QCOMPARE( embfile->description(), QString() );
+- QCOMPARE( embfile->createDate(), QDateTime( QDate(), QTime() ) );
+- QCOMPARE( embfile->modDate(), QDateTime( QDate(), QTime() ) );
+- QCOMPARE( embfile->mimeType(), QString() );
+-
+- QFile file(TESTDATADIR "/unittestcases/kroller.png" );
+- QVERIFY( file.open( QIODevice::ReadOnly ) );
+- QByteArray krollerData = file.readAll();
+- QByteArray embdata = embfile->data();
+- QCOMPARE( krollerData, embdata );
+-
+-
+- Poppler::EmbeddedFile *embfile2 = fileList.at(1);
+- QCOMPARE( embfile2->name(), QString("gnome-64.gif") );
+- QCOMPARE( embfile2->description(), QString() );
+- QCOMPARE( embfile2->modDate(), QDateTime( QDate(), QTime() ) );
+- QCOMPARE( embfile2->createDate(), QDateTime( QDate(), QTime() ) );
+- QCOMPARE( embfile2->mimeType(), QString() );
+-
+- QFile file2(TESTDATADIR "/unittestcases/gnome-64.gif" );
+- QVERIFY( file2.open( QIODevice::ReadOnly ) );
+- QByteArray g64Data = file2.readAll();
+- QByteArray emb2data = embfile2->data();
+- QCOMPARE( g64Data, emb2data );
+-
+- delete doc;
+-}
+-
+-
+-void TestAttachments::checkAttach2()
+-{
+-
+- Poppler::Document *doc;
+- doc = Poppler::Document::load(TESTDATADIR "/unittestcases/A6EmbeddedFiles.pdf");
+- QVERIFY( doc );
+-
+- QVERIFY( doc->hasEmbeddedFiles() );
+-
+- QList<Poppler::EmbeddedFile*> fileList;
+- fileList = doc->embeddedFiles();
+- QCOMPARE( fileList.size(), 3 );
+-
+- Poppler::EmbeddedFile *embfile1 = fileList.at(0);
+- QCOMPARE( embfile1->name(), QString("Acro7 thoughts") );
+- QCOMPARE( embfile1->description(), QString() );
+- QCOMPARE( embfile1->createDate(), QDateTime( QDate( 2003, 8, 4 ), QTime( 13, 54, 54), Qt::UTC ) );
+- QCOMPARE( embfile1->modDate(), QDateTime( QDate( 2003, 8, 4 ), QTime( 14, 15, 27), Qt::UTC ) );
+- QCOMPARE( embfile1->mimeType(), QString("text/xml") );
+-
+- Poppler::EmbeddedFile *embfile2 = fileList.at(1);
+- QCOMPARE( embfile2->name(), QString("acro transitions 1.xls") );
+- QCOMPARE( embfile2->description(), QString() );
+- QCOMPARE( embfile2->createDate(), QDateTime( QDate( 2003, 7, 18 ), QTime( 21, 7, 16), Qt::UTC ) );
+- QCOMPARE( embfile2->modDate(), QDateTime( QDate( 2003, 7, 22 ), QTime( 13, 4, 40), Qt::UTC ) );
+- QCOMPARE( embfile2->mimeType(), QString("application/excel") );
+-
+- Poppler::EmbeddedFile *embfile3 = fileList.at(2);
+- QCOMPARE( embfile3->name(), QString("apago_pdfe_wide.gif") );
+- QCOMPARE( embfile3->description(), QString() );
+- QCOMPARE( embfile3->createDate(), QDateTime( QDate( 2003, 1, 31 ), QTime( 15, 54, 29), Qt::UTC ) );
+- QCOMPARE( embfile3->modDate(), QDateTime( QDate( 2003, 1, 31 ), QTime( 15, 52, 58), Qt::UTC ) );
+- QCOMPARE( embfile3->mimeType(), QString() );
+-
+- delete doc;
+-}
+-
+-void TestAttachments::checkAttach3()
+-{
+-
+- Poppler::Document *doc;
+- doc = Poppler::Document::load(TESTDATADIR "/unittestcases/shapes+attachments.pdf");
+- QVERIFY( doc );
+-
+- QVERIFY( doc->hasEmbeddedFiles() );
+-
+- QList<Poppler::EmbeddedFile*> fileList;
+- fileList = doc->embeddedFiles();
+- QCOMPARE( fileList.size(), 1 );
+-
+- Poppler::EmbeddedFile *embfile = fileList.at(0);
+- QCOMPARE( embfile->name(), QString( "ADEX1.xpdf.pgp" ) );
+- QCOMPARE( embfile->description(), QString() );
+- QCOMPARE( embfile->createDate(), QDateTime( QDate( 2004, 3, 29 ), QTime( 19, 37, 16), Qt::UTC ) );
+- QCOMPARE( embfile->modDate(), QDateTime( QDate( 2004, 3, 29 ), QTime( 19, 37, 16), Qt::UTC ) );
+- QCOMPARE( embfile->mimeType(), QString() );
+- delete doc;
+-
+-}
+-
+-void TestAttachments::checkAttach4()
+-{
+-
+- Poppler::Document *doc;
+- doc = Poppler::Document::load(TESTDATADIR "/unittestcases/imageretrieve+attachment.pdf");
+- QVERIFY( doc );
+-
+- QVERIFY( doc->hasEmbeddedFiles() );
+-
+- QList<Poppler::EmbeddedFile*> fileList;
+- fileList = doc->embeddedFiles();
+- QCOMPARE( fileList.size(), 1 );
+-
+- Poppler::EmbeddedFile *embfile = fileList.at(0);
+- QCOMPARE( embfile->name(), QString( "export-altona.csv" ) );
+- QCOMPARE( embfile->description(), QString("Altona Export") );
+- QCOMPARE( embfile->createDate(), QDateTime( QDate( 2005, 8, 30 ), QTime( 20, 49, 35), Qt::UTC ) );
+- QCOMPARE( embfile->modDate(), QDateTime( QDate( 2005, 8, 30 ), QTime( 20, 49, 52), Qt::UTC ) );
+- QCOMPARE( embfile->mimeType(), QString("application/vnd.ms-excel") );
+- delete doc;
+-
+-}
+-
+-QTEST_MAIN(TestAttachments)
+-#include "check_attachments.moc"
+-
+diff --git a/qt4/tests/check_dateConversion.cpp b/qt4/tests/check_dateConversion.cpp
+deleted file mode 100644
+index c1f84e2f..00000000
+--- a/qt4/tests/check_dateConversion.cpp
++++ /dev/null
+@@ -1,142 +0,0 @@
+-#include <QtTest/QtTest>
+-
+-Q_DECLARE_METATYPE(QDate)
+-Q_DECLARE_METATYPE(QTime)
+-
+-#include <poppler-qt4.h>
+-
+-class TestDateConv: public QObject
+-{
+- Q_OBJECT
+-private slots:
+- void initTestCase();
+- void checkDates_data();
+- void checkDates();
+- void checkInvalidDates_data();
+- void checkInvalidDates();
+-};
+-
+-void TestDateConv::initTestCase()
+-{
+- qRegisterMetaType<QDate>("QDate");
+- qRegisterMetaType<QTime>("QTime");
+-}
+-
+-void TestDateConv::checkDates_data()
+-{
+- QTest::addColumn<QByteArray>("input");
+- QTest::addColumn<QDate>("day");
+- QTest::addColumn<QTime>("time");
+-
+- // This is a typical case - all data provided
+- QTest::newRow("D:20040101121110")
+- << QByteArray("D:20040101121110Z")
+- << QDate( 2004, 1, 1)
+- << QTime( 12, 11, 10);
+-
+- // The D: is strongly recommended, but optional
+- QTest::newRow("20040101121110")
+- << QByteArray("20040101121110Z")
+- << QDate( 2004, 1, 1)
+- << QTime( 12, 11, 10);
+-
+- // Only the year is actually required
+- QTest::newRow("D:2006")
+- << QByteArray("D:2006")
+- << QDate( 2006, 1, 1)
+- << QTime( 0, 0, 0);
+-
+- QTest::newRow("D:200602")
+- << QByteArray("D:200602")
+- << QDate( 2006, 2, 1)
+- << QTime( 0, 0, 0);
+-
+- QTest::newRow("D:20060304")
+- << QByteArray("D:20060304")
+- << QDate( 2006, 3, 4)
+- << QTime( 0, 0, 0);
+-
+- QTest::newRow("D:2006030405")
+- << QByteArray("D:2006030405")
+- << QDate( 2006, 3, 4)
+- << QTime( 5, 0, 0);
+-
+- QTest::newRow("D:200603040512")
+- << QByteArray("D:200603040512")
+- << QDate( 2006, 3, 4)
+- << QTime( 5, 12, 0);
+-
+- // If the timezone isn't specified, I assume UTC
+- QTest::newRow("D:20060304051226")
+- << QByteArray("D:20060304051226")
+- << QDate( 2006, 3, 4)
+- << QTime( 5, 12, 26);
+-
+- // Check for real timezone conversions
+- QTest::newRow("D:20030131115258-04'00'")
+- << QByteArray("D:20030131115258-04'00'")
+- << QDate( 2003, 1, 31)
+- << QTime( 15, 52, 58);
+-
+- QTest::newRow("D:20030131115258+05'00'")
+- << QByteArray("D:20030131115258+05'00'")
+- << QDate( 2003, 1, 31)
+- << QTime( 6, 52, 58);
+-
+- // There are places that have non-hour offsets
+- // Yep, that means you Adelaide.
+- QTest::newRow("D:20030131115258+08'30'")
+- << QByteArray("D:20030131115258+08'30'")
+- << QDate( 2003, 1, 31)
+- << QTime( 3, 22, 58);
+-
+- QTest::newRow("D:20030131115258-08'30'")
+- << QByteArray("D:20030131115258-08'30'")
+- << QDate( 2003, 1, 31)
+- << QTime( 20, 22, 58);
+-}
+-
+-void TestDateConv::checkDates()
+-{
+- QFETCH(QByteArray, input);
+- QFETCH(QDate, day);
+- QFETCH(QTime, time);
+-
+- QCOMPARE( Poppler::convertDate(input.data()), QDateTime(day, time, Qt::UTC) );
+-}
+-
+-void TestDateConv::checkInvalidDates_data()
+-{
+- QTest::addColumn<QByteArray>("input");
+-
+- // Null data
+- QTest::newRow("Null data")
+- << QByteArray();
+-
+- // Empty data
+- QTest::newRow("Empty data")
+- << QByteArray("");
+-
+- // Empty data
+- QTest::newRow("One character")
+- << QByteArray("D");
+-
+- // Empty data
+- QTest::newRow("'D:'")
+- << QByteArray("D:");
+-
+- // Empty data
+- QTest::newRow("Not a date")
+- << QByteArray("D:IAmNotAValidDate");
+-}
+-
+-void TestDateConv::checkInvalidDates()
+-{
+- QFETCH(QByteArray, input);
+-
+- QCOMPARE(Poppler::convertDate(input.data()), QDateTime());
+-}
+-
+-QTEST_MAIN(TestDateConv)
+-
+-#include "check_dateConversion.moc"
+diff --git a/qt4/tests/check_fonts.cpp b/qt4/tests/check_fonts.cpp
+deleted file mode 100644
+index 77579a97..00000000
+--- a/qt4/tests/check_fonts.cpp
++++ /dev/null
+@@ -1,248 +0,0 @@
+-#include <QtTest/QtTest>
+-
+-#include <poppler-qt4.h>
+-
+-#include <memory>
+-
+-class TestFontsData: public QObject
+-{
+- Q_OBJECT
+-private slots:
+- void checkNoFonts();
+- void checkType1();
+- void checkType3();
+- void checkTrueType();
+- void checkFontIterator();
+- void checkSecondDocumentQuery();
+- void checkMultipleIterations();
+- void checkScanForFonts();
+-};
+-
+-
+-static QList<Poppler::FontInfo> loadFontsViaIterator( Poppler::Document *doc, int from = 0, int count = -1 )
+-{
+- int num = count == -1 ? doc->numPages() - from : count;
+- QList<Poppler::FontInfo> list;
+- std::unique_ptr< Poppler::FontIterator > it( doc->newFontIterator( from ) );
+- while ( it->hasNext() && num )
+- {
+- list += it->next();
+- --num;
+- }
+- return list;
+-}
+-
+-namespace Poppler
+-{
+-static bool operator==( const FontInfo &f1, const FontInfo &f2 )
+-{
+- if ( f1.name() != f2.name() )
+- return false;
+- if ( f1.file() != f2.file() )
+- return false;
+- if ( f1.isEmbedded() != f2.isEmbedded() )
+- return false;
+- if ( f1.isSubset() != f2.isSubset() )
+- return false;
+- if ( f1.type() != f2.type() )
+- return false;
+- if ( f1.typeName() != f2.typeName() )
+- return false;
+- return true;
+-}
+-}
+-
+-void TestFontsData::checkNoFonts()
+-{
+- Poppler::Document *doc;
+- doc = Poppler::Document::load(TESTDATADIR "/tests/image.pdf");
+- QVERIFY( doc );
+-
+- QList<Poppler::FontInfo> listOfFonts = doc->fonts();
+- QCOMPARE( listOfFonts.size(), 0 );
+-
+- delete doc;
+-}
+-
+-void TestFontsData::checkType1()
+-{
+- Poppler::Document *doc;
+- doc = Poppler::Document::load(TESTDATADIR "/tests/text.pdf");
+- QVERIFY( doc );
+-
+- QList<Poppler::FontInfo> listOfFonts = doc->fonts();
+- QCOMPARE( listOfFonts.size(), 1 );
+- QCOMPARE( listOfFonts.at(0).name(), QString("Helvetica") );
+- QCOMPARE( listOfFonts.at(0).type(), Poppler::FontInfo::Type1 );
+- QCOMPARE( listOfFonts.at(0).typeName(), QString("Type 1") );
+-
+- QCOMPARE( listOfFonts.at(0).isEmbedded(), false );
+- QCOMPARE( listOfFonts.at(0).isSubset(), false );
+-
+- delete doc;
+-}
+-
+-void TestFontsData::checkType3()
+-{
+- Poppler::Document *doc;
+- doc = Poppler::Document::load(TESTDATADIR "/tests/type3.pdf");
+- QVERIFY( doc );
+-
+- QList<Poppler::FontInfo> listOfFonts = doc->fonts();
+- QCOMPARE( listOfFonts.size(), 2 );
+- QCOMPARE( listOfFonts.at(0).name(), QString("Helvetica") );
+- QCOMPARE( listOfFonts.at(0).type(), Poppler::FontInfo::Type1 );
+- QCOMPARE( listOfFonts.at(0).typeName(), QString("Type 1") );
+-
+- QCOMPARE( listOfFonts.at(0).isEmbedded(), false );
+- QCOMPARE( listOfFonts.at(0).isSubset(), false );
+-
+- QCOMPARE( listOfFonts.at(1).name(), QString("") );
+- QCOMPARE( listOfFonts.at(1).type(), Poppler::FontInfo::Type3 );
+- QCOMPARE( listOfFonts.at(1).typeName(), QString("Type 3") );
+-
+- QCOMPARE( listOfFonts.at(1).isEmbedded(), true );
+- QCOMPARE( listOfFonts.at(1).isSubset(), false );
+-
+- delete doc;
+-}
+-
+-void TestFontsData::checkTrueType()
+-{
+- Poppler::Document *doc;
+- doc = Poppler::Document::load(TESTDATADIR "/unittestcases/truetype.pdf");
+- QVERIFY( doc );
+-
+- QList<Poppler::FontInfo> listOfFonts = doc->fonts();
+- QCOMPARE( listOfFonts.size(), 2 );
+- QCOMPARE( listOfFonts.at(0).name(), QString("Arial-BoldMT") );
+- QCOMPARE( listOfFonts.at(0).type(), Poppler::FontInfo::TrueType );
+- QCOMPARE( listOfFonts.at(0).typeName(), QString("TrueType") );
+-
+- QCOMPARE( listOfFonts.at(0).isEmbedded(), false );
+- QCOMPARE( listOfFonts.at(0).isSubset(), false );
+-
+- QCOMPARE( listOfFonts.at(1).name(), QString("ArialMT") );
+- QCOMPARE( listOfFonts.at(1).type(), Poppler::FontInfo::TrueType );
+- QCOMPARE( listOfFonts.at(1).typeName(), QString("TrueType") );
+-
+- QCOMPARE( listOfFonts.at(1).isEmbedded(), false );
+- QCOMPARE( listOfFonts.at(1).isSubset(), false );
+-
+- delete doc;
+-}
+-
+-void TestFontsData::checkFontIterator()
+-{
+- // loading a 1-page document
+- Poppler::Document *doc;
+- doc = Poppler::Document::load(TESTDATADIR "/tests/type3.pdf");
+- QVERIFY( doc );
+- // loading a 6-pages document
+- Poppler::Document *doc6 = Poppler::Document::load(TESTDATADIR "/tests/cropbox.pdf");
+- QVERIFY( doc6 );
+-
+- std::unique_ptr< Poppler::FontIterator > it;
+-
+- // some tests with the 1-page document:
+- // - check a default iterator
+- it.reset( doc->newFontIterator() );
+- QVERIFY( it->hasNext() );
+- // - check an iterator for negative pages to behave as 0
+- it.reset( doc->newFontIterator( -1 ) );
+- QVERIFY( it->hasNext() );
+- // - check an iterator for pages out of the page limit
+- it.reset( doc->newFontIterator( 1 ) );
+- QVERIFY( !it->hasNext() );
+- // - check that it reaches the end after 1 iteration
+- it.reset( doc->newFontIterator() );
+- QVERIFY( it->hasNext() );
+- it->next();
+- QVERIFY( !it->hasNext() );
+-
+- // some tests with the 6-page document:
+- // - check a default iterator
+- it.reset( doc6->newFontIterator() );
+- QVERIFY( it->hasNext() );
+- // - check an iterator for pages out of the page limit
+- it.reset( doc6->newFontIterator( 6 ) );
+- QVERIFY( !it->hasNext() );
+- // - check that it reaches the end after 6 iterations
+- it.reset( doc6->newFontIterator() );
+- QVERIFY( it->hasNext() );
+- it->next();
+- QVERIFY( it->hasNext() );
+- it->next();
+- QVERIFY( it->hasNext() );
+- it->next();
+- QVERIFY( it->hasNext() );
+- it->next();
+- QVERIFY( it->hasNext() );
+- it->next();
+- QVERIFY( it->hasNext() );
+- it->next();
+- QVERIFY( !it->hasNext() );
+-
+- delete doc;
+- delete doc6;
+-}
+-
+-void TestFontsData::checkSecondDocumentQuery()
+-{
+- Poppler::Document *doc;
+- doc = Poppler::Document::load(TESTDATADIR "/tests/type3.pdf");
+- QVERIFY( doc );
+-
+- QList<Poppler::FontInfo> listOfFonts = doc->fonts();
+- QCOMPARE( listOfFonts.size(), 2 );
+- // check we get the very same result when calling fonts() again (#19405)
+- QList<Poppler::FontInfo> listOfFonts2 = doc->fonts();
+- QCOMPARE( listOfFonts, listOfFonts2 );
+-
+- delete doc;
+-}
+-
+-void TestFontsData::checkMultipleIterations()
+-{
+- Poppler::Document *doc;
+- doc = Poppler::Document::load(TESTDATADIR "/tests/type3.pdf");
+- QVERIFY( doc );
+-
+- QList<Poppler::FontInfo> listOfFonts = loadFontsViaIterator( doc );
+- QCOMPARE( listOfFonts.size(), 2 );
+- QList<Poppler::FontInfo> listOfFonts2 = loadFontsViaIterator( doc );
+- QCOMPARE( listOfFonts, listOfFonts2 );
+-
+- delete doc;
+-}
+-
+-void TestFontsData::checkScanForFonts()
+-{
+- Poppler::Document *doc;
+- doc = Poppler::Document::load(TESTDATADIR "/tests/fonts.pdf");
+- QVERIFY( doc );
+-
+- QList<Poppler::FontInfo> listOfFonts = doc->fonts();
+- QCOMPARE( listOfFonts.size(), 3 );
+- // check we get the very same result when gatering fonts using scanForFonts
+- QList<Poppler::FontInfo> listOfFonts2;
+- for ( int i = 0; i < doc->numPages(); ++i )
+- {
+- doc->scanForFonts( 1, &listOfFonts2 );
+- }
+- QCOMPARE( listOfFonts, listOfFonts2 );
+-
+- // check doing a second scanForFonts gives no result
+- QList<Poppler::FontInfo> listOfFonts3;
+- for ( int i = 0; i < doc->numPages(); ++i )
+- {
+- doc->scanForFonts( 1, &listOfFonts3 );
+- }
+- QVERIFY( listOfFonts3.isEmpty() );
+-
+- delete doc;
+-}
+-
+-QTEST_MAIN(TestFontsData)
+-#include "check_fonts.moc"
+-
+diff --git a/qt4/tests/check_goostring.cpp b/qt4/tests/check_goostring.cpp
+deleted file mode 100644
+index 69f7cdc5..00000000
+--- a/qt4/tests/check_goostring.cpp
++++ /dev/null
+@@ -1,127 +0,0 @@
+-#include <QtCore/QScopedPointer>
+-#include <QtTest/QtTest>
+-
+-#include "goo/GooString.h"
+-
+-class TestGooString : public QObject
+-{
+- Q_OBJECT
+-private slots:
+- void testInsertData_data();
+- void testInsertData();
+- void testInsert();
+- void testFormat();
+-};
+-
+-void TestGooString::testInsertData_data()
+-{
+- QTest::addColumn<QByteArray>("string");
+- QTest::addColumn<QByteArray>("addition");
+- QTest::addColumn<int>("position");
+- QTest::addColumn<QByteArray>("result");
+-
+- QTest::newRow("foo") << QByteArray("foo") << QByteArray("bar") << 0 << QByteArray("barfoo");
+- QTest::newRow("<empty>") << QByteArray() << QByteArray("bar") << 0 << QByteArray("bar");
+- QTest::newRow("foo+bar #1") << QByteArray("f+bar") << QByteArray("oo") << 1 << QByteArray("foo+bar");
+- QTest::newRow("foo+bar #2") << QByteArray("fobar") << QByteArray("o+") << 2 << QByteArray("foo+bar");
+- QTest::newRow("foo+bar #last") << QByteArray("foo+r") << QByteArray("ba") << 4 << QByteArray("foo+bar");
+- QTest::newRow("foo+bar #end") << QByteArray("foo+") << QByteArray("bar") << 4 << QByteArray("foo+bar");
+- QTest::newRow("long #start") << QByteArray("very string") << QByteArray("long long long long long ") << 5 << QByteArray("very long long long long long string");
+-}
+-
+-void TestGooString::testInsertData()
+-{
+- QFETCH(QByteArray, string);
+- QFETCH(QByteArray, addition);
+- QFETCH(int, position);
+- QFETCH(QByteArray, result);
+-
+- GooString goo(string.constData());
+- QCOMPARE(goo.getCString(), string.constData());
+- goo.insert(position, addition.constData());
+- QCOMPARE(goo.getCString(), result.constData());
+-}
+-
+-void TestGooString::testInsert()
+-{
+- {
+- GooString goo;
+- goo.insert(0, ".");
+- goo.insert(0, "This is a very long long test string");
+- QCOMPARE(goo.getCString(), "This is a very long long test string.");
+- }
+- {
+- GooString goo;
+- goo.insert(0, "second-part-third-part");
+- goo.insert(0, "first-part-");
+- QCOMPARE(goo.getCString(), "first-part-second-part-third-part");
+- }
+-}
+-
+-void TestGooString::testFormat()
+-{
+- {
+- const QScopedPointer<GooString> goo(GooString::format("{0:d},{1:x}", 1, 0xF));
+- QCOMPARE(goo->getCString(), "1,f");
+- }
+- {
+- const QScopedPointer<GooString> goo(GooString::format("{0:d},{0:x},{0:X},{0:o},{0:b},{0:w}", 0xA));
+- QCOMPARE(goo->getCString(), "10,a,A,12,1010, ");
+- }
+- {
+- const QScopedPointer<GooString> goo(GooString::format("{0:d},{0:x},{0:X},{0:o},{0:b}", -0xA));
+- QCOMPARE(goo->getCString(), "-10,-a,-A,-12,-1010");
+- }
+- {
+- const QScopedPointer<GooString> goo(GooString::format("{0:c}{1:c}{2:c}{3:c}",
+- 'T', (char)'E', (short)'S', (int)'T'));
+- QCOMPARE(goo->getCString(), "TEST");
+-
+- const QScopedPointer<GooString> goo2(GooString::format("{0:s} {1:t}", "TEST", goo.data()));
+- QCOMPARE(goo2->getCString(), "TEST TEST");
+- }
+- {
+- const QScopedPointer<GooString> goo(GooString::format("{0:ud} {1:d} {2:d}",
+- UINT_MAX, INT_MAX, INT_MIN));
+- const QByteArray expected = QString("%1 %2 %3").arg(UINT_MAX).arg(INT_MAX).arg(INT_MIN).toLatin1();
+- QCOMPARE(goo->getCString(), expected.constData());
+- }
+- {
+- const QScopedPointer<GooString> goo(GooString::format("{0:uld} {1:ld} {2:ld}",
+- ULONG_MAX, LONG_MAX, LONG_MIN));
+- const QByteArray expected = QString("%1 %2 %3").arg(ULONG_MAX).arg(LONG_MAX).arg(LONG_MIN).toLatin1();
+- QCOMPARE(goo->getCString(), expected.constData());
+- }
+- {
+- const QScopedPointer<GooString> goo(GooString::format("{0:ulld} {1:lld} {2:lld}",
+- ULLONG_MAX, LLONG_MAX, LLONG_MIN));
+- const QByteArray expected = QString("%1 %2 %3").arg(ULLONG_MAX).arg(LLONG_MAX).arg(LLONG_MIN).toLatin1();
+- QCOMPARE(goo->getCString(), expected.constData());
+- }
+- {
+- const QScopedPointer<GooString> gooD(GooString::format("{0:.1f} {0:.1g} {0:.1gs} | {1:.1f} {1:.1g} {1:.1gs}", 1., .012));
+- const QScopedPointer<GooString> gooF(GooString::format("{0:.1f} {0:.1g} {0:.1gs} | {1:.1f} {1:.1g} {1:.1gs}", 1.f, .012f));
+- QCOMPARE(gooD->getCString(), "1.0 1 1 | 0.0 0 0.01");
+- QCOMPARE(gooF->getCString(), "1.0 1 1 | 0.0 0 0.01");
+- }
+- {
+- const QScopedPointer<GooString> goo(GooString::format("{0:.4f} {0:.4g} {0:.4gs}", .012));
+- QCOMPARE(goo->getCString(), "0.0120 0.012 0.012");
+- }
+- {
+- const QScopedPointer<GooString> goo(GooString::format("{{ SomeText {0:d} }}", 1));
+- QCOMPARE(goo->getCString(), "{ SomeText 1 }");
+- }
+- {
+- const QScopedPointer<GooString> goo(GooString::format("{{{{ {{ SomeText {0:d}", 2));
+- QCOMPARE(goo->getCString(), "{{ { SomeText 2");
+- }
+- {
+- const QScopedPointer<GooString> goo(GooString::format("SomeText {0:d} }} }}}}", 3));
+- QCOMPARE(goo->getCString(), "SomeText 3 } }}");
+- }
+-}
+-
+-QTEST_MAIN(TestGooString)
+-#include "check_goostring.moc"
+-
+diff --git a/qt4/tests/check_lexer.cpp b/qt4/tests/check_lexer.cpp
+deleted file mode 100644
+index 93c3621d..00000000
+--- a/qt4/tests/check_lexer.cpp
++++ /dev/null
+@@ -1,107 +0,0 @@
+-#include <QtTest/QtTest>
+-
+-#include "Object.h"
+-#include "Lexer.h"
+-
+-class TestLexer : public QObject
+-{
+- Q_OBJECT
+-private slots:
+- void testNumbers();
+-};
+-
+-void TestLexer::testNumbers()
+-{
+- char data[] = "0 1 -1 2147483647 -2147483647 2147483648 -2147483648 4294967297 -2147483649 0.1 1.1 -1.1 2147483647.1 -2147483647.1 2147483648.1 -2147483648.1 4294967297.1 -2147483649.1 9223372036854775807 18446744073709551615";
+- MemStream *stream = new MemStream(data, 0, strlen(data), Object(objNull));
+- Lexer *lexer = new Lexer(NULL, stream);
+- QVERIFY( lexer );
+-
+- Object obj;
+-
+- obj = lexer->getObj();
+- QCOMPARE(obj.getType(), objInt);
+- QCOMPARE(obj.getInt(), 0);
+-
+- obj = lexer->getObj();
+- QCOMPARE(obj.getType(), objInt);
+- QCOMPARE(obj.getInt(), 1);
+-
+- obj = lexer->getObj();
+- QCOMPARE(obj.getType(), objInt);
+- QCOMPARE(obj.getInt(), -1);
+-
+- obj = lexer->getObj();
+- QCOMPARE(obj.getType(), objInt);
+- QCOMPARE(obj.getInt(), 2147483647);
+-
+- obj = lexer->getObj();
+- QCOMPARE(obj.getType(), objInt);
+- QCOMPARE(obj.getInt(), -2147483647);
+-
+- obj = lexer->getObj();
+- QCOMPARE(obj.getType(), objInt64);
+- QCOMPARE(obj.getInt64(), 2147483648ll);
+-
+- obj = lexer->getObj();
+- QCOMPARE(obj.getType(), objInt);
+- QCOMPARE(obj.getInt(), -2147483647-1);
+-
+- obj = lexer->getObj();
+- QCOMPARE(obj.getType(), objInt64);
+- QCOMPARE(obj.getInt64(), 4294967297ll);
+-
+- obj = lexer->getObj();
+- QCOMPARE(obj.getType(), objInt64);
+- QCOMPARE(obj.getInt64(), -2147483649ll);
+-
+- obj = lexer->getObj();
+- QCOMPARE(obj.getType(), objReal);
+- QCOMPARE(obj.getReal(), 0.1);
+-
+- obj = lexer->getObj();
+- QCOMPARE(obj.getType(), objReal);
+- QCOMPARE(obj.getReal(), 1.1);
+-
+- obj = lexer->getObj();
+- QCOMPARE(obj.getType(), objReal);
+- QCOMPARE(obj.getReal(), -1.1);
+-
+- obj = lexer->getObj();
+- QCOMPARE(obj.getType(), objReal);
+- QCOMPARE(obj.getReal(), 2147483647.1);
+-
+- obj = lexer->getObj();
+- QCOMPARE(obj.getType(), objReal);
+- QCOMPARE(obj.getReal(), -2147483647.1);
+-
+- obj = lexer->getObj();
+- QCOMPARE(obj.getType(), objReal);
+- QCOMPARE(obj.getReal(), 2147483648.1);
+-
+- obj = lexer->getObj();
+- QCOMPARE(obj.getType(), objReal);
+- QCOMPARE(obj.getReal(), -2147483648.1);
+-
+- obj = lexer->getObj();
+- QCOMPARE(obj.getType(), objReal);
+- QCOMPARE(obj.getReal(), 4294967297.1);
+-
+- obj = lexer->getObj();
+- QCOMPARE(obj.getType(), objReal);
+- QCOMPARE(obj.getReal(), -2147483649.1);
+-
+- obj = lexer->getObj();
+- QCOMPARE(obj.getType(), objInt64);
+- QCOMPARE(obj.getInt64(), 9223372036854775807ll);
+-
+- obj = lexer->getObj();
+- QCOMPARE(obj.getType(), objReal);
+- QCOMPARE(obj.getReal(), 18446744073709551616.);
+-
+- delete lexer;
+-}
+-
+-QTEST_MAIN(TestLexer)
+-#include "check_lexer.moc"
+-
+diff --git a/qt4/tests/check_links.cpp b/qt4/tests/check_links.cpp
+deleted file mode 100644
+index e5c17368..00000000
+--- a/qt4/tests/check_links.cpp
++++ /dev/null
+@@ -1,98 +0,0 @@
+-#include <QtTest/QtTest>
+-
+-#include <poppler-qt4.h>
+-
+-#include <memory>
+-
+-class TestLinks : public QObject
+-{
+- Q_OBJECT
+-private slots:
+- void checkDocumentWithNoDests();
+- void checkDests_xr01();
+- void checkDests_xr02();
+-};
+-
+-static bool isDestinationValid_pageNumber( const Poppler::LinkDestination *dest, const Poppler::Document *doc )
+-{
+- return dest->pageNumber() > 0 && dest->pageNumber() <= doc->numPages();
+-}
+-
+-static bool isDestinationValid_name( const Poppler::LinkDestination *dest )
+-{
+- return !dest->destinationName().isEmpty();
+-}
+-
+-
+-void TestLinks::checkDocumentWithNoDests()
+-{
+- Poppler::Document *doc;
+- doc = Poppler::Document::load(TESTDATADIR "/unittestcases/WithAttachments.pdf");
+- QVERIFY( doc );
+-
+- std::unique_ptr< Poppler::LinkDestination > dest;
+- dest.reset( doc->linkDestination("no.dests.in.this.document") );
+- QVERIFY( !isDestinationValid_pageNumber( dest.get(), doc ) );
+- QVERIFY( isDestinationValid_name( dest.get() ) );
+-
+- delete doc;
+-}
+-
+-void TestLinks::checkDests_xr01()
+-{
+- Poppler::Document *doc;
+- doc = Poppler::Document::load(TESTDATADIR "/unittestcases/xr01.pdf");
+- QVERIFY( doc );
+-
+- Poppler::Page *page = doc->page(0);
+- QVERIFY( page );
+-
+- QList< Poppler::Link* > links = page->links();
+- QCOMPARE( links.count(), 2 );
+-
+- {
+- QCOMPARE( links.at(0)->linkType(), Poppler::Link::Goto );
+- Poppler::LinkGoto *link = static_cast< Poppler::LinkGoto * >( links.at(0) );
+- const Poppler::LinkDestination dest = link->destination();
+- QVERIFY( !isDestinationValid_pageNumber( &dest, doc ) );
+- QVERIFY( isDestinationValid_name( &dest ) );
+- QCOMPARE( dest.destinationName(), QString::fromLatin1("section.1") );
+- }
+-
+- {
+- QCOMPARE( links.at(1)->linkType(), Poppler::Link::Goto );
+- Poppler::LinkGoto *link = static_cast< Poppler::LinkGoto * >( links.at(1) );
+- const Poppler::LinkDestination dest = link->destination();
+- QVERIFY( !isDestinationValid_pageNumber( &dest, doc ) );
+- QVERIFY( isDestinationValid_name( &dest ) );
+- QCOMPARE( dest.destinationName(), QString::fromLatin1("section.2") );
+- }
+-
+- qDeleteAll(links);
+- delete page;
+- delete doc;
+-}
+-
+-void TestLinks::checkDests_xr02()
+-{
+- Poppler::Document *doc;
+- doc = Poppler::Document::load(TESTDATADIR "/unittestcases/xr02.pdf");
+- QVERIFY( doc );
+-
+- std::unique_ptr< Poppler::LinkDestination > dest;
+- dest.reset( doc->linkDestination("section.1") );
+- QVERIFY( isDestinationValid_pageNumber( dest.get(), doc ) );
+- QVERIFY( !isDestinationValid_name( dest.get() ) );
+- dest.reset( doc->linkDestination("section.2") );
+- QVERIFY( isDestinationValid_pageNumber( dest.get(), doc ) );
+- QVERIFY( !isDestinationValid_name( dest.get() ) );
+- dest.reset( doc->linkDestination("section.3") );
+- QVERIFY( !isDestinationValid_pageNumber( dest.get(), doc ) );
+- QVERIFY( isDestinationValid_name( dest.get() ) );
+-
+- delete doc;
+-}
+-
+-QTEST_MAIN(TestLinks)
+-
+-#include "check_links.moc"
+diff --git a/qt4/tests/check_metadata.cpp b/qt4/tests/check_metadata.cpp
+deleted file mode 100644
+index fb4f7163..00000000
+--- a/qt4/tests/check_metadata.cpp
++++ /dev/null
+@@ -1,275 +0,0 @@
+-#include <QtTest/QtTest>
+-
+-#include <poppler-qt4.h>
+-
+-class TestMetaData: public QObject
+-{
+- Q_OBJECT
+-private slots:
+- void checkStrings_data();
+- void checkStrings();
+- void checkStrings2_data();
+- void checkStrings2();
+- void checkStringKeys();
+- void checkLinearised();
+- void checkNumPages();
+- void checkDate();
+- void checkPageSize();
+- void checkPortraitOrientation();
+- void checkLandscapeOrientation();
+- void checkUpsideDownOrientation();
+- void checkSeascapeOrientation();
+- void checkVersion();
+- void checkPdfId();
+- void checkNoPdfId();
+-};
+-
+-void TestMetaData::checkStrings_data()
+-{
+- QTest::addColumn<QString>("key");
+- QTest::addColumn<QString>("value");
+-
+- QTest::newRow( "Author" ) << "Author" << "Brad Hards";
+- QTest::newRow( "Title" ) << "Title" << "Two pages";
+- QTest::newRow( "Subject" ) << "Subject"
+- << "A two page layout for poppler testing";
+- QTest::newRow( "Keywords" ) << "Keywords" << "Qt4 bindings";
+- QTest::newRow( "Creator" ) << "Creator" << "iText: cgpdftops CUPS filter";
+- QTest::newRow( "Producer" ) << "Producer" << "Acrobat Distiller 7.0 for Macintosh";
+-}
+-
+-void TestMetaData::checkStrings()
+-{
+- Poppler::Document *doc;
+- doc = Poppler::Document::load(TESTDATADIR "/unittestcases/doublepage.pdf");
+- QVERIFY( doc );
+-
+- QFETCH( QString, key );
+- QFETCH( QString, value );
+- QCOMPARE( doc->info(key), value );
+-
+- delete doc;
+-}
+-
+-void TestMetaData::checkStrings2_data()
+-{
+- QTest::addColumn<QString>("key");
+- QTest::addColumn<QString>("value");
+-
+- QTest::newRow( "Title" ) << "Title" << "Malaga hotels";
+- QTest::newRow( "Author" ) << "Author" << "Brad Hards";
+- QTest::newRow( "Creator" ) << "Creator" << "Safari: cgpdftops CUPS filter";
+- QTest::newRow( "Producer" ) << "Producer" << "Acrobat Distiller 7.0 for Macintosh";
+- QTest::newRow( "Keywords" ) << "Keywords" << "First\rSecond\rthird";
+- QTest::newRow( "Custom1" ) << "Custom1" << "CustomValue1";
+- QTest::newRow( "Custom2" ) << "Custom2" << "CustomValue2";
+-}
+-
+-void TestMetaData::checkStrings2()
+-{
+- Poppler::Document *doc;
+- doc = Poppler::Document::load(TESTDATADIR "/unittestcases/truetype.pdf");
+- QVERIFY( doc );
+-
+- QFETCH( QString, key );
+- QFETCH( QString, value );
+- QCOMPARE( doc->info(key), value );
+-
+- delete doc;
+-}
+-
+-void TestMetaData::checkStringKeys()
+-{
+- Poppler::Document *doc;
+- doc = Poppler::Document::load(TESTDATADIR "/unittestcases/truetype.pdf");
+- QVERIFY( doc );
+-
+- QStringList keyList;
+- keyList << "Title" << "Author" << "Creator" << "Keywords" << "CreationDate";
+- keyList << "Producer" << "ModDate" << "Custom1" << "Custom2";
+- keyList.sort();
+- QStringList keysInDoc = doc->infoKeys();
+- keysInDoc.sort();
+- QCOMPARE( keysInDoc, keyList );
+-
+- delete doc;
+-}
+-
+-void TestMetaData::checkLinearised()
+-{
+- Poppler::Document *doc;
+- doc = Poppler::Document::load(TESTDATADIR "/unittestcases/orientation.pdf");
+- QVERIFY( doc );
+-
+- QVERIFY( doc->isLinearized() );
+-
+- delete doc;
+-
+- doc = Poppler::Document::load(TESTDATADIR "/unittestcases/truetype.pdf");
+- QVERIFY( doc );
+- QCOMPARE( doc->isLinearized(), false );
+-
+- delete doc;
+-}
+-
+-void TestMetaData::checkPortraitOrientation()
+-{
+- Poppler::Document *doc;
+- doc = Poppler::Document::load(TESTDATADIR "/unittestcases/orientation.pdf");
+- QVERIFY( doc );
+-
+- Poppler::Page *page = doc->page(0);
+- QCOMPARE( page->orientation(), Poppler::Page::Portrait );
+-
+- delete page;
+- delete doc;
+-}
+-
+-void TestMetaData::checkNumPages()
+-{
+- Poppler::Document *doc;
+- doc = Poppler::Document::load(TESTDATADIR "/unittestcases/doublepage.pdf");
+- QVERIFY( doc );
+- QCOMPARE( doc->numPages(), 2 );
+-
+- delete doc;
+-
+- doc = Poppler::Document::load(TESTDATADIR "/unittestcases/truetype.pdf");
+- QVERIFY( doc );
+- QCOMPARE( doc->numPages(), 1 );
+-
+- delete doc;
+-}
+-
+-void TestMetaData::checkDate()
+-{
+- Poppler::Document *doc;
+-
+- doc = Poppler::Document::load(TESTDATADIR "/unittestcases/truetype.pdf");
+- QVERIFY( doc );
+- QCOMPARE( doc->date("ModDate"), QDateTime(QDate(2005, 12, 5), QTime(9,44,46), Qt::UTC ) );
+- QCOMPARE( doc->date("CreationDate"), QDateTime(QDate(2005, 8, 13), QTime(1,12,11), Qt::UTC ) );
+-
+- delete doc;
+-}
+-
+-void TestMetaData::checkPageSize()
+-{
+- Poppler::Document *doc;
+-
+- doc = Poppler::Document::load(TESTDATADIR "/unittestcases/truetype.pdf");
+- QVERIFY( doc );
+- Poppler::Page *page = doc->page(0);
+- QCOMPARE( page->pageSize(), QSize(595, 842) );
+- QCOMPARE( page->pageSizeF(), QSizeF(595.22, 842) );
+-
+- delete page;
+- delete doc;
+-}
+-
+-
+-void TestMetaData::checkLandscapeOrientation()
+-{
+- Poppler::Document *doc;
+- doc = Poppler::Document::load(TESTDATADIR "/unittestcases/orientation.pdf");
+- QVERIFY( doc );
+-
+- Poppler::Page *page = doc->page(1);
+- QCOMPARE( page->orientation(), Poppler::Page::Landscape );
+-
+- delete page;
+- delete doc;
+-}
+-
+-void TestMetaData::checkUpsideDownOrientation()
+-{
+- Poppler::Document *doc;
+- doc = Poppler::Document::load(TESTDATADIR "/unittestcases/orientation.pdf");
+- QVERIFY( doc );
+-
+- Poppler::Page *page = doc->page(2);
+- QCOMPARE( page->orientation(), Poppler::Page::UpsideDown );
+-
+- delete page;
+- delete doc;
+-}
+-
+-void TestMetaData::checkSeascapeOrientation()
+-{
+- Poppler::Document *doc;
+- doc = Poppler::Document::load(TESTDATADIR "/unittestcases/orientation.pdf");
+- QVERIFY( doc );
+-
+- Poppler::Page *page = doc->page(3);
+- QCOMPARE( page->orientation(), Poppler::Page::Seascape );
+-
+- delete page;
+- delete doc;
+-}
+-
+-void TestMetaData::checkVersion()
+-{
+- Poppler::Document *doc;
+- doc = Poppler::Document::load(TESTDATADIR "/unittestcases/doublepage.pdf");
+- QVERIFY( doc );
+-
+- QCOMPARE( doc->pdfVersion(), 1.6 );
+- int major = 0, minor = 0;
+- doc->getPdfVersion( &major, &minor );
+- QCOMPARE( major, 1 );
+- QCOMPARE( minor, 6 );
+-
+- delete doc;
+-}
+-
+-void TestMetaData::checkPdfId()
+-{
+- Poppler::Document *doc;
+- doc = Poppler::Document::load(TESTDATADIR "/unittestcases/A6EmbeddedFiles.pdf");
+- QVERIFY( doc );
+-
+- const QByteArray referencePermanentId( "00C9D5B6D8FB11D7A902003065D630AA" );
+- const QByteArray referenceUpdateId( "39AECAE6D8FB11D7A902003065D630AA" );
+-
+- {
+- // no IDs wanted, just existance check
+- QVERIFY( doc->getPdfId( 0, 0 ) );
+- }
+- {
+- // only permanent ID
+- QByteArray permanentId;
+- QVERIFY( doc->getPdfId( &permanentId, 0 ) );
+- QCOMPARE( permanentId.toUpper(), referencePermanentId );
+- }
+- {
+- // only update ID
+- QByteArray updateId;
+- QVERIFY( doc->getPdfId( 0, &updateId ) );
+- QCOMPARE( updateId.toUpper(), referenceUpdateId );
+- }
+- {
+- // both IDs
+- QByteArray permanentId;
+- QByteArray updateId;
+- QVERIFY( doc->getPdfId( &permanentId, &updateId ) );
+- QCOMPARE( permanentId.toUpper(), referencePermanentId );
+- QCOMPARE( updateId.toUpper(), referenceUpdateId );
+- }
+-
+- delete doc;
+-}
+-
+-void TestMetaData::checkNoPdfId()
+-{
+- Poppler::Document *doc;
+- doc = Poppler::Document::load(TESTDATADIR "/unittestcases/WithActualText.pdf");
+- QVERIFY( doc );
+-
+- QVERIFY( !doc->getPdfId( 0, 0 ) );
+-
+- delete doc;
+-}
+-
+-QTEST_MAIN(TestMetaData)
+-#include "check_metadata.moc"
+-
+diff --git a/qt4/tests/check_optcontent.cpp b/qt4/tests/check_optcontent.cpp
+deleted file mode 100644
+index 2de29952..00000000
+--- a/qt4/tests/check_optcontent.cpp
++++ /dev/null
+@@ -1,446 +0,0 @@
+-#include <QtTest/QtTest>
+-
+-#include "PDFDoc.h"
+-#include "GlobalParams.h"
+-
+-#include <poppler-qt4.h>
+-
+-class TestOptionalContent: public QObject
+-{
+- Q_OBJECT
+-private slots:
+- void checkVisPolicy();
+- void checkNestedLayers();
+- void checkNoOptionalContent();
+- void checkIsVisible();
+- void checkVisibilitySetting();
+- void checkRadioButtons();
+-};
+-
+-void TestOptionalContent::checkVisPolicy()
+-{
+- Poppler::Document *doc;
+- doc = Poppler::Document::load(TESTDATADIR "/unittestcases/vis_policy_test.pdf");
+- QVERIFY( doc );
+-
+- QVERIFY( doc->hasOptionalContent() );
+-
+- Poppler::OptContentModel *optContent = doc->optionalContentModel();
+- QModelIndex index;
+- index = optContent->index( 0, 0, QModelIndex() );
+- QCOMPARE( optContent->data( index, Qt::DisplayRole ).toString(), QString( "A" ) );
+- QCOMPARE( static_cast<Qt::CheckState>( optContent->data( index, Qt::CheckStateRole ).toInt() ), Qt::Checked );
+- index = optContent->index( 1, 0, QModelIndex() );
+- QCOMPARE( optContent->data( index, Qt::DisplayRole ).toString(), QString( "B" ) );
+- QCOMPARE( static_cast<Qt::CheckState>( optContent->data( index, Qt::CheckStateRole ).toInt() ), Qt::Checked );
+-
+- delete doc;
+-}
+-
+-void TestOptionalContent::checkNestedLayers()
+-{
+- Poppler::Document *doc;
+- doc = Poppler::Document::load(TESTDATADIR "/unittestcases/NestedLayers.pdf");
+- QVERIFY( doc );
+-
+- QVERIFY( doc->hasOptionalContent() );
+-
+- Poppler::OptContentModel *optContent = doc->optionalContentModel();
+- QModelIndex index;
+-
+- index = optContent->index( 0, 0, QModelIndex() );
+- QCOMPARE( optContent->data( index, Qt::DisplayRole ).toString(), QString( "Black Text and Green Snow" ) );
+- QCOMPARE( static_cast<Qt::CheckState>( optContent->data( index, Qt::CheckStateRole ).toInt() ), Qt::Unchecked );
+-
+- index = optContent->index( 1, 0, QModelIndex() );
+- QCOMPARE( optContent->data( index, Qt::DisplayRole ).toString(), QString( "Mountains and Image" ) );
+- QCOMPARE( static_cast<Qt::CheckState>( optContent->data( index, Qt::CheckStateRole ).toInt() ), Qt::Checked );
+-
+- // This is a sub-item of "Mountains and Image"
+- QModelIndex subindex = optContent->index( 0, 0, index );
+- QCOMPARE( optContent->data( subindex, Qt::DisplayRole ).toString(), QString( "Image" ) );
+- QCOMPARE( static_cast<Qt::CheckState>( optContent->data( index, Qt::CheckStateRole ).toInt() ), Qt::Checked );
+-
+- index = optContent->index( 2, 0, QModelIndex() );
+- QCOMPARE( optContent->data( index, Qt::DisplayRole ).toString(), QString( "Starburst" ) );
+- QCOMPARE( static_cast<Qt::CheckState>( optContent->data( index, Qt::CheckStateRole ).toInt() ), Qt::Checked );
+-
+- index = optContent->index( 3, 0, QModelIndex() );
+- QCOMPARE( optContent->data( index, Qt::DisplayRole ).toString(), QString( "Watermark" ) );
+- QCOMPARE( static_cast<Qt::CheckState>( optContent->data( index, Qt::CheckStateRole ).toInt() ), Qt::Unchecked );
+-
+- delete doc;
+-}
+-
+-void TestOptionalContent::checkNoOptionalContent()
+-{
+- Poppler::Document *doc;
+- doc = Poppler::Document::load(TESTDATADIR "/unittestcases/orientation.pdf");
+- QVERIFY( doc );
+-
+- QCOMPARE( doc->hasOptionalContent(), false );
+-
+- delete doc;
+-}
+-
+-void TestOptionalContent::checkIsVisible()
+-{
+- GooString *fileName = new GooString(TESTDATADIR "/unittestcases/vis_policy_test.pdf");
+- globalParams = new GlobalParams();
+- PDFDoc *doc = new PDFDoc( fileName );
+- QVERIFY( doc );
+-
+- OCGs *ocgs = doc->getOptContentConfig();
+- QVERIFY( ocgs );
+-
+- XRef *xref = doc->getXRef();
+-
+- Object obj;
+-
+- // In this test, both Ref(21,0) and Ref(2,0) are set to On
+-
+- // AnyOn, one element array:
+- // 22 0 obj<</Type/OCMD/OCGs[21 0 R]/P/AnyOn>>endobj
+- obj = xref->fetch( 22, 0 );
+- QVERIFY( obj.isDict() );
+- QVERIFY( ocgs->optContentIsVisible( &obj ) );
+-
+- // Same again, looking for any leaks or dubious free()'s
+- obj = xref->fetch( 22, 0 );
+- QVERIFY( obj.isDict() );
+- QVERIFY( ocgs->optContentIsVisible( &obj ) );
+-
+- // AnyOff, one element array:
+- // 29 0 obj<</Type/OCMD/OCGs[21 0 R]/P/AnyOff>>endobj
+- obj = xref->fetch( 29, 0 );
+- QVERIFY( obj.isDict() );
+- QCOMPARE( ocgs->optContentIsVisible( &obj ), false );
+-
+- // AllOn, one element array:
+- // 36 0 obj<</Type/OCMD/OCGs[28 0 R]/P/AllOn>>endobj
+- obj = xref->fetch( 36, 0 );
+- QVERIFY( obj.isDict() );
+- QCOMPARE( ocgs->optContentIsVisible( &obj ), true );
+-
+-
+- // AllOff, one element array:
+- // 43 0 obj<</Type/OCMD/OCGs[28 0 R]/P/AllOff>>endobj
+- obj = xref->fetch( 43, 0 );
+- QVERIFY( obj.isDict() );
+- QCOMPARE( ocgs->optContentIsVisible( &obj ), false );
+-
+- // AnyOn, multi-element array:
+- // 50 0 obj<</Type/OCMD/OCGs[21 0 R 28 0 R]/P/AnyOn>>endobj
+- obj = xref->fetch( 50, 0 );
+- QVERIFY( obj.isDict() );
+- QCOMPARE( ocgs->optContentIsVisible( &obj ), true );
+-
+- // AnyOff, multi-element array:
+- // 57 0 obj<</Type/OCMD/P/AnyOff/OCGs[21 0 R 28 0 R]>>endobj
+- obj = xref->fetch( 57, 0 );
+- QVERIFY( obj.isDict() );
+- QCOMPARE( ocgs->optContentIsVisible( &obj ), false );
+-
+- // AllOn, multi-element array:
+- // 64 0 obj<</Type/OCMD/P/AllOn/OCGs[21 0 R 28 0 R]>>endobj
+- obj = xref->fetch( 64, 0 );
+- QVERIFY( obj.isDict() );
+- QCOMPARE( ocgs->optContentIsVisible( &obj ), true );
+-
+- // AllOff, multi-element array:
+- // 71 0 obj<</Type/OCMD/P/AllOff/OCGs[21 0 R 28 0 R]>>endobj
+- obj = xref->fetch( 71, 0 );
+- QVERIFY( obj.isDict() );
+- QCOMPARE( ocgs->optContentIsVisible( &obj ), false );
+-
+- delete doc;
+- delete globalParams;
+-}
+-
+-void TestOptionalContent::checkVisibilitySetting()
+-{
+- globalParams = new GlobalParams();
+- GooString *fileName = new GooString(TESTDATADIR "/unittestcases/vis_policy_test.pdf");
+- PDFDoc *doc = new PDFDoc( fileName );
+- QVERIFY( doc );
+-
+- OCGs *ocgs = doc->getOptContentConfig();
+- QVERIFY( ocgs );
+-
+- XRef *xref = doc->getXRef();
+-
+- Object obj;
+-
+- // In this test, both Ref(21,0) and Ref(28,0) start On,
+- // based on the file settings
+- Object ref21obj( 21, 0 );
+- Ref ref21 = ref21obj.getRef();
+- OptionalContentGroup *ocgA = ocgs->findOcgByRef( ref21 );
+- QVERIFY( ocgA );
+-
+- QVERIFY( (ocgA->getName()->cmp("A")) == 0 );
+- QCOMPARE( ocgA->getState(), OptionalContentGroup::On );
+-
+- Object ref28obj( 28, 0 );
+- Ref ref28 = ref28obj.getRef();
+- OptionalContentGroup *ocgB = ocgs->findOcgByRef( ref28 );
+- QVERIFY( ocgB );
+-
+- QVERIFY( (ocgB->getName()->cmp("B")) == 0 );
+- QCOMPARE( ocgB->getState(), OptionalContentGroup::On );
+-
+- // turn one Off
+- ocgA->setState( OptionalContentGroup::Off );
+-
+- // AnyOn, one element array:
+- // 22 0 obj<</Type/OCMD/OCGs[21 0 R]/P/AnyOn>>endobj
+- obj = xref->fetch( 22, 0 );
+- QVERIFY( obj.isDict() );
+- QCOMPARE( ocgs->optContentIsVisible( &obj ), false );
+-
+- // Same again, looking for any leaks or dubious free()'s
+- obj = xref->fetch( 22, 0 );
+- QVERIFY( obj.isDict() );
+- QCOMPARE( ocgs->optContentIsVisible( &obj ), false );
+-
+- // AnyOff, one element array:
+- // 29 0 obj<</Type/OCMD/OCGs[21 0 R]/P/AnyOff>>endobj
+- obj = xref->fetch( 29, 0 );
+- QVERIFY( obj.isDict() );
+- QCOMPARE( ocgs->optContentIsVisible( &obj ), true );
+-
+- // AllOn, one element array:
+- // 36 0 obj<</Type/OCMD/OCGs[28 0 R]/P/AllOn>>endobj
+- obj = xref->fetch( 36, 0 );
+- QVERIFY( obj.isDict() );
+- QCOMPARE( ocgs->optContentIsVisible( &obj ), true );
+-
+- // AllOff, one element array:
+- // 43 0 obj<</Type/OCMD/OCGs[28 0 R]/P/AllOff>>endobj
+- obj = xref->fetch( 43, 0 );
+- QVERIFY( obj.isDict() );
+- QCOMPARE( ocgs->optContentIsVisible( &obj ), false );
+-
+- // AnyOn, multi-element array:
+- // 50 0 obj<</Type/OCMD/OCGs[21 0 R 28 0 R]/P/AnyOn>>endobj
+- obj = xref->fetch( 50, 0 );
+- QVERIFY( obj.isDict() );
+- QCOMPARE( ocgs->optContentIsVisible( &obj ), true );
+-
+- // AnyOff, multi-element array:
+- // 57 0 obj<</Type/OCMD/P/AnyOff/OCGs[21 0 R 28 0 R]>>endobj
+- obj = xref->fetch( 57, 0 );
+- QVERIFY( obj.isDict() );
+- QCOMPARE( ocgs->optContentIsVisible( &obj ), true );
+-
+- // AllOn, multi-element array:
+- // 64 0 obj<</Type/OCMD/P/AllOn/OCGs[21 0 R 28 0 R]>>endobj
+- obj = xref->fetch( 64, 0 );
+- QVERIFY( obj.isDict() );
+- QCOMPARE( ocgs->optContentIsVisible( &obj ), false );
+-
+- // AllOff, multi-element array:
+- // 71 0 obj<</Type/OCMD/P/AllOff/OCGs[21 0 R 28 0 R]>>endobj
+- obj = xref->fetch( 71, 0 );
+- QVERIFY( obj.isDict() );
+- QCOMPARE( ocgs->optContentIsVisible( &obj ), false );
+-
+-
+- // Turn the other one off as well (i.e. both are Off)
+- ocgB->setState(OptionalContentGroup::Off);
+-
+- // AnyOn, one element array:
+- // 22 0 obj<</Type/OCMD/OCGs[21 0 R]/P/AnyOn>>endobj
+- obj = xref->fetch( 22, 0 );
+- QVERIFY( obj.isDict() );
+- QCOMPARE( ocgs->optContentIsVisible( &obj ), false );
+-
+- // Same again, looking for any leaks or dubious free()'s
+- obj = xref->fetch( 22, 0 );
+- QVERIFY( obj.isDict() );
+- QCOMPARE( ocgs->optContentIsVisible( &obj ), false );
+-
+- // AnyOff, one element array:
+- // 29 0 obj<</Type/OCMD/OCGs[21 0 R]/P/AnyOff>>endobj
+- obj = xref->fetch( 29, 0 );
+- QVERIFY( obj.isDict() );
+- QCOMPARE( ocgs->optContentIsVisible( &obj ), true );
+-
+- // AllOn, one element array:
+- // 36 0 obj<</Type/OCMD/OCGs[28 0 R]/P/AllOn>>endobj
+- obj = xref->fetch( 36, 0 );
+- QVERIFY( obj.isDict() );
+- QCOMPARE( ocgs->optContentIsVisible( &obj ), false );
+-
+- // AllOff, one element array:
+- // 43 0 obj<</Type/OCMD/OCGs[28 0 R]/P/AllOff>>endobj
+- obj = xref->fetch( 43, 0 );
+- QVERIFY( obj.isDict() );
+- QCOMPARE( ocgs->optContentIsVisible( &obj ), true );
+-
+- // AnyOn, multi-element array:
+- // 50 0 obj<</Type/OCMD/OCGs[21 0 R 28 0 R]/P/AnyOn>>endobj
+- obj = xref->fetch( 50, 0 );
+- QVERIFY( obj.isDict() );
+- QCOMPARE( ocgs->optContentIsVisible( &obj ), false );
+-
+- // AnyOff, multi-element array:
+- // 57 0 obj<</Type/OCMD/P/AnyOff/OCGs[21 0 R 28 0 R]>>endobj
+- obj = xref->fetch( 57, 0 );
+- QVERIFY( obj.isDict() );
+- QCOMPARE( ocgs->optContentIsVisible( &obj ), true );
+-
+- // AllOn, multi-element array:
+- // 64 0 obj<</Type/OCMD/P/AllOn/OCGs[21 0 R 28 0 R]>>endobj
+- obj = xref->fetch( 64, 0 );
+- QVERIFY( obj.isDict() );
+- QCOMPARE( ocgs->optContentIsVisible( &obj ), false );
+-
+- // AllOff, multi-element array:
+- // 71 0 obj<</Type/OCMD/P/AllOff/OCGs[21 0 R 28 0 R]>>endobj
+- obj = xref->fetch( 71, 0 );
+- QVERIFY( obj.isDict() );
+- QCOMPARE( ocgs->optContentIsVisible( &obj ), true );
+-
+-
+- // Turn the first one on again (21 is On, 28 is Off)
+- ocgA->setState(OptionalContentGroup::On);
+-
+- // AnyOn, one element array:
+- // 22 0 obj<</Type/OCMD/OCGs[21 0 R]/P/AnyOn>>endobj
+- obj = xref->fetch( 22, 0);
+- QVERIFY( obj.isDict() );
+- QCOMPARE( ocgs->optContentIsVisible( &obj ), true );
+-
+- // Same again, looking for any leaks or dubious free()'s
+- obj = xref->fetch( 22, 0);
+- QVERIFY( obj.isDict() );
+- QCOMPARE( ocgs->optContentIsVisible( &obj ), true );
+-
+- // AnyOff, one element array:
+- // 29 0 obj<</Type/OCMD/OCGs[21 0 R]/P/AnyOff>>endobj
+- obj = xref->fetch( 29, 0);
+- QVERIFY( obj.isDict() );
+- QCOMPARE( ocgs->optContentIsVisible( &obj ), false );
+-
+- // AllOn, one element array:
+- // 36 0 obj<</Type/OCMD/OCGs[28 0 R]/P/AllOn>>endobj
+- obj = xref->fetch( 36, 0);
+- QVERIFY( obj.isDict() );
+- QCOMPARE( ocgs->optContentIsVisible( &obj ), false );
+-
+- // AllOff, one element array:
+- // 43 0 obj<</Type/OCMD/OCGs[28 0 R]/P/AllOff>>endobj
+- obj = xref->fetch( 43, 0);
+- QVERIFY( obj.isDict() );
+- QCOMPARE( ocgs->optContentIsVisible( &obj ), true );
+-
+- // AnyOn, multi-element array:
+- // 50 0 obj<</Type/OCMD/OCGs[21 0 R 28 0 R]/P/AnyOn>>endobj
+- obj = xref->fetch( 50, 0);
+- QVERIFY( obj.isDict() );
+- QCOMPARE( ocgs->optContentIsVisible( &obj ), true );
+-
+- // AnyOff, multi-element array:
+- // 57 0 obj<</Type/OCMD/P/AnyOff/OCGs[21 0 R 28 0 R]>>endobj
+- obj = xref->fetch( 57, 0);
+- QVERIFY( obj.isDict() );
+- QCOMPARE( ocgs->optContentIsVisible( &obj ), true );
+-
+- // AllOn, multi-element array:
+- // 64 0 obj<</Type/OCMD/P/AllOn/OCGs[21 0 R 28 0 R]>>endobj
+- obj = xref->fetch( 64, 0);
+- QVERIFY( obj.isDict() );
+- QCOMPARE( ocgs->optContentIsVisible( &obj ), false );
+-
+- // AllOff, multi-element array:
+- // 71 0 obj<</Type/OCMD/P/AllOff/OCGs[21 0 R 28 0 R]>>endobj
+- obj = xref->fetch( 71, 0 );
+- QVERIFY( obj.isDict() );
+- QCOMPARE( ocgs->optContentIsVisible( &obj ), false );
+-
+- delete doc;
+- delete globalParams;
+-}
+-
+-void TestOptionalContent::checkRadioButtons()
+-{
+- Poppler::Document *doc;
+- doc = Poppler::Document::load(TESTDATADIR "/unittestcases/ClarityOCGs.pdf");
+- QVERIFY( doc );
+-
+- QVERIFY( doc->hasOptionalContent() );
+-
+- Poppler::OptContentModel *optContent = doc->optionalContentModel();
+- QModelIndex index;
+-
+- index = optContent->index( 0, 0, QModelIndex() );
+- QCOMPARE( optContent->data( index, Qt::DisplayRole ).toString(), QString( "Languages" ) );
+- QCOMPARE( static_cast<Qt::CheckState>( optContent->data( index, Qt::CheckStateRole ).toInt() ), Qt::Unchecked );
+-
+- // These are sub-items of the "Languages" label
+- QModelIndex subindex = optContent->index( 0, 0, index );
+- QCOMPARE( optContent->data( subindex, Qt::DisplayRole ).toString(), QString( "English" ) );
+- QCOMPARE( static_cast<Qt::CheckState>( optContent->data( subindex, Qt::CheckStateRole ).toInt() ), Qt::Checked );
+-
+- subindex = optContent->index( 1, 0, index );
+- QCOMPARE( optContent->data( subindex, Qt::DisplayRole ).toString(), QString( "French" ) );
+- QCOMPARE( static_cast<Qt::CheckState>( optContent->data( subindex, Qt::CheckStateRole ).toInt() ), Qt::Unchecked );
+-
+- subindex = optContent->index( 2, 0, index );
+- QCOMPARE( optContent->data( subindex, Qt::DisplayRole ).toString(), QString( "Japanese" ) );
+- QCOMPARE( static_cast<Qt::CheckState>( optContent->data( subindex, Qt::CheckStateRole ).toInt() ), Qt::Unchecked );
+-
+- // RBGroup of languages, so turning on Japanese should turn off English
+- QVERIFY( optContent->setData( subindex, QVariant( true ), Qt::CheckStateRole ) );
+-
+- subindex = optContent->index( 0, 0, index );
+- QCOMPARE( optContent->data( subindex, Qt::DisplayRole ).toString(), QString( "English" ) );
+- QCOMPARE( static_cast<Qt::CheckState>( optContent->data( subindex, Qt::CheckStateRole ).toInt() ), Qt::Unchecked );
+-
+- subindex = optContent->index( 2, 0, index );
+- QCOMPARE( optContent->data( subindex, Qt::DisplayRole ).toString(), QString( "Japanese" ) );
+- QCOMPARE( static_cast<Qt::CheckState>( optContent->data( subindex, Qt::CheckStateRole ).toInt() ), Qt::Checked );
+-
+- subindex = optContent->index( 1, 0, index );
+- QCOMPARE( optContent->data( subindex, Qt::DisplayRole ).toString(), QString( "French" ) );
+- QCOMPARE( static_cast<Qt::CheckState>( optContent->data( subindex, Qt::CheckStateRole ).toInt() ), Qt::Unchecked );
+-
+- // and turning on French should turn off Japanese
+- QVERIFY( optContent->setData( subindex, QVariant( true ), Qt::CheckStateRole ) );
+-
+- subindex = optContent->index( 0, 0, index );
+- QCOMPARE( optContent->data( subindex, Qt::DisplayRole ).toString(), QString( "English" ) );
+- QCOMPARE( static_cast<Qt::CheckState>( optContent->data( subindex, Qt::CheckStateRole ).toInt() ), Qt::Unchecked );
+-
+- subindex = optContent->index( 2, 0, index );
+- QCOMPARE( optContent->data( subindex, Qt::DisplayRole ).toString(), QString( "Japanese" ) );
+- QCOMPARE( static_cast<Qt::CheckState>( optContent->data( subindex, Qt::CheckStateRole ).toInt() ), Qt::Unchecked );
+-
+- subindex = optContent->index( 1, 0, index );
+- QCOMPARE( optContent->data( subindex, Qt::DisplayRole ).toString(), QString( "French" ) );
+- QCOMPARE( static_cast<Qt::CheckState>( optContent->data( subindex, Qt::CheckStateRole ).toInt() ), Qt::Checked );
+-
+-
+- // and turning off French should leave them all off
+- QVERIFY( optContent->setData( subindex, QVariant( false ), Qt::CheckStateRole ) );
+-
+- subindex = optContent->index( 0, 0, index );
+- QCOMPARE( optContent->data( subindex, Qt::DisplayRole ).toString(), QString( "English" ) );
+- QCOMPARE( static_cast<Qt::CheckState>( optContent->data( subindex, Qt::CheckStateRole ).toInt() ), Qt::Unchecked );
+-
+- subindex = optContent->index( 2, 0, index );
+- QCOMPARE( optContent->data( subindex, Qt::DisplayRole ).toString(), QString( "Japanese" ) );
+- QCOMPARE( static_cast<Qt::CheckState>( optContent->data( subindex, Qt::CheckStateRole ).toInt() ), Qt::Unchecked );
+-
+- subindex = optContent->index( 1, 0, index );
+- QCOMPARE( optContent->data( subindex, Qt::DisplayRole ).toString(), QString( "French" ) );
+- QCOMPARE( static_cast<Qt::CheckState>( optContent->data( subindex, Qt::CheckStateRole ).toInt() ), Qt::Unchecked );
+-
+- delete doc;
+-}
+-
+-QTEST_MAIN(TestOptionalContent)
+-
+-#include "check_optcontent.moc"
+-
+diff --git a/qt4/tests/check_pagelabelinfo.cpp b/qt4/tests/check_pagelabelinfo.cpp
+deleted file mode 100644
+index 4eb1ec36..00000000
+--- a/qt4/tests/check_pagelabelinfo.cpp
++++ /dev/null
+@@ -1,43 +0,0 @@
+-#include <QtTest/QtTest>
+-
+-#include "PageLabelInfo_p.h"
+-
+-class TestPageLabelInfo : public QObject
+-{
+- Q_OBJECT
+-private slots:
+- void testToRoman();
+- void testFromRoman();
+- void testToLatin();
+- void testFromLatin();
+-};
+-
+-void TestPageLabelInfo::testToRoman()
+-{
+- GooString str;
+- toRoman(177, &str, gFalse);
+- QCOMPARE (str.getCString(), "clxxvii");
+-}
+-
+-void TestPageLabelInfo::testFromRoman()
+-{
+- GooString roman("clxxvii");
+- QCOMPARE(fromRoman(roman.getCString()), 177);
+-}
+-
+-void TestPageLabelInfo::testToLatin()
+-{
+- GooString str;
+- toLatin(54, &str, gFalse);
+- QCOMPARE(str.getCString(), "bbb");
+-}
+-
+-void TestPageLabelInfo::testFromLatin()
+-{
+- GooString latin("ddd");
+- QCOMPARE(fromLatin(latin.getCString()), 56);
+-}
+-
+-QTEST_MAIN(TestPageLabelInfo)
+-#include "check_pagelabelinfo.moc"
+-
+diff --git a/qt4/tests/check_pagelayout.cpp b/qt4/tests/check_pagelayout.cpp
+deleted file mode 100644
+index 6108f886..00000000
+--- a/qt4/tests/check_pagelayout.cpp
++++ /dev/null
+@@ -1,49 +0,0 @@
+-#include <QtTest/QtTest>
+-
+-#include <poppler-qt4.h>
+-
+-class TestPageLayout: public QObject
+-{
+- Q_OBJECT
+-private slots:
+- void checkNone();
+- void checkSingle();
+- void checkFacing();
+-};
+-
+-void TestPageLayout::checkNone()
+-{
+- Poppler::Document *doc;
+- doc = Poppler::Document::load(TESTDATADIR "/unittestcases/UseNone.pdf");
+- QVERIFY( doc );
+-
+- QCOMPARE( doc->pageLayout(), Poppler::Document::NoLayout );
+-
+- delete doc;
+-}
+-
+-void TestPageLayout::checkSingle()
+-{
+- Poppler::Document *doc;
+- doc = Poppler::Document::load(TESTDATADIR "/unittestcases/FullScreen.pdf");
+- QVERIFY( doc );
+-
+- QCOMPARE( doc->pageLayout(), Poppler::Document::SinglePage );
+-
+- delete doc;
+-}
+-
+-void TestPageLayout::checkFacing()
+-{
+- Poppler::Document *doc;
+- doc = Poppler::Document::load(TESTDATADIR "/unittestcases/doublepage.pdf");
+- QVERIFY( doc );
+-
+- QCOMPARE( doc->pageLayout(), Poppler::Document::TwoPageRight );
+-
+- delete doc;
+-}
+-
+-QTEST_MAIN(TestPageLayout)
+-#include "check_pagelayout.moc"
+-
+diff --git a/qt4/tests/check_pagemode.cpp b/qt4/tests/check_pagemode.cpp
+deleted file mode 100644
+index 0565fe20..00000000
+--- a/qt4/tests/check_pagemode.cpp
++++ /dev/null
+@@ -1,73 +0,0 @@
+-#include <QtTest/QtTest>
+-
+-#include <poppler-qt4.h>
+-
+-class TestPageMode: public QObject
+-{
+- Q_OBJECT
+-private slots:
+- void checkNone();
+- void checkFullScreen();
+- void checkAttachments();
+- void checkThumbs();
+- void checkOC();
+-};
+-
+-void TestPageMode::checkNone()
+-{
+- Poppler::Document *doc;
+- doc = Poppler::Document::load(TESTDATADIR "/unittestcases/UseNone.pdf");
+- QVERIFY( doc );
+-
+- QCOMPARE( doc->pageMode(), Poppler::Document::UseNone );
+-
+- delete doc;
+-}
+-
+-void TestPageMode::checkFullScreen()
+-{
+- Poppler::Document *doc;
+- doc = Poppler::Document::load(TESTDATADIR "/unittestcases/FullScreen.pdf");
+- QVERIFY( doc );
+-
+- QCOMPARE( doc->pageMode(), Poppler::Document::FullScreen );
+-
+- delete doc;
+-}
+-
+-void TestPageMode::checkAttachments()
+-{
+- Poppler::Document *doc;
+- doc = Poppler::Document::load(TESTDATADIR "/unittestcases/UseAttachments.pdf");
+- QVERIFY( doc );
+-
+- QCOMPARE( doc->pageMode(), Poppler::Document::UseAttach );
+-
+- delete doc;
+-}
+-
+-void TestPageMode::checkThumbs()
+-{
+- Poppler::Document *doc;
+- doc = Poppler::Document::load(TESTDATADIR "/unittestcases/UseThumbs.pdf");
+- QVERIFY( doc );
+-
+- QCOMPARE( doc->pageMode(), Poppler::Document::UseThumbs );
+-
+- delete doc;
+-}
+-
+-void TestPageMode::checkOC()
+-{
+- Poppler::Document *doc;
+- doc = Poppler::Document::load(TESTDATADIR "/unittestcases/UseOC.pdf");
+- QVERIFY( doc );
+-
+- QCOMPARE( doc->pageMode(), Poppler::Document::UseOC );
+-
+- delete doc;
+-}
+-
+-QTEST_MAIN(TestPageMode)
+-#include "check_pagemode.moc"
+-
+diff --git a/qt4/tests/check_password.cpp b/qt4/tests/check_password.cpp
+deleted file mode 100644
+index 4c7dcd1c..00000000
+--- a/qt4/tests/check_password.cpp
++++ /dev/null
+@@ -1,88 +0,0 @@
+-#include <QtTest/QtTest>
+-
+-#include <poppler-qt4.h>
+-
+-class TestPassword: public QObject
+-{
+- Q_OBJECT
+-private slots:
+- void password1();
+- void password1a();
+- void password2();
+- void password2a();
+- void password2b();
+- void password3();
+-};
+-
+-
+-// BUG:4557
+-void TestPassword::password1()
+-{
+- Poppler::Document *doc;
+- doc = Poppler::Document::load(QString::fromUtf8(TESTDATADIR "/unittestcases/Gday garçon - open.pdf"), "", QString::fromUtf8("garçon").toLatin1() );
+- QVERIFY( doc );
+- QVERIFY( !doc->isLocked() );
+-
+- delete doc;
+-}
+-
+-
+-void TestPassword::password1a()
+-{
+- Poppler::Document *doc;
+- doc = Poppler::Document::load(QString::fromUtf8(TESTDATADIR "/unittestcases/Gday garçon - open.pdf") );
+- QVERIFY( doc );
+- QVERIFY( doc->isLocked() );
+- QVERIFY( !doc->unlock( "", QString::fromUtf8("garçon").toLatin1() ) );
+- QVERIFY( !doc->isLocked() );
+-
+- delete doc;
+-}
+-
+-void TestPassword::password2()
+-{
+- Poppler::Document *doc;
+- doc = Poppler::Document::load(QString::fromUtf8(TESTDATADIR "/unittestcases/Gday garçon - owner.pdf"), QString::fromUtf8("garçon").toLatin1(), "" );
+- QVERIFY( doc );
+- QVERIFY( !doc->isLocked() );
+-
+- delete doc;
+-}
+-
+-void TestPassword::password2a()
+-{
+- Poppler::Document *doc;
+- doc = Poppler::Document::load(QString::fromUtf8(TESTDATADIR "/unittestcases/Gday garçon - owner.pdf"), QString::fromUtf8("garçon").toLatin1() );
+- QVERIFY( doc );
+- QVERIFY( !doc->isLocked() );
+-
+- delete doc;
+-}
+-
+-void TestPassword::password2b()
+-{
+- Poppler::Document *doc;
+- doc = Poppler::Document::load(QString::fromUtf8(TESTDATADIR "/unittestcases/Gday garçon - owner.pdf") );
+- QVERIFY( doc );
+- QVERIFY( !doc->isLocked() );
+- QVERIFY( !doc->unlock( QString::fromUtf8("garçon").toLatin1(), "" ) );
+- QVERIFY( !doc->isLocked() );
+-
+- delete doc;
+-}
+-
+-void TestPassword::password3()
+-{
+- Poppler::Document *doc;
+- doc = Poppler::Document::load( QString::fromUtf8(TESTDATADIR "/unittestcases/PasswordEncrypted.pdf") );
+- QVERIFY( doc );
+- QVERIFY( doc->isLocked() );
+- QVERIFY( !doc->unlock( "", "password" ) );
+- QVERIFY( !doc->isLocked() );
+-
+- delete doc;
+-}
+-
+-QTEST_MAIN(TestPassword)
+-#include "check_password.moc"
+-
+diff --git a/qt4/tests/check_permissions.cpp b/qt4/tests/check_permissions.cpp
+deleted file mode 100644
+index a3f3bdc6..00000000
+--- a/qt4/tests/check_permissions.cpp
++++ /dev/null
+@@ -1,44 +0,0 @@
+-#include <QtTest/QtTest>
+-
+-#include <poppler-qt4.h>
+-
+-class TestPermissions: public QObject
+-{
+- Q_OBJECT
+-private slots:
+- void permissions1();
+-};
+-
+-void TestPermissions::permissions1()
+-{
+- Poppler::Document *doc;
+- doc = Poppler::Document::load(TESTDATADIR "/unittestcases/orientation.pdf");
+- QVERIFY( doc );
+-
+- // we are allowed to print
+- QVERIFY( doc->okToPrint() );
+-
+- // we are not allowed to change
+- QVERIFY( !(doc->okToChange()) );
+-
+- // we are not allowed to copy or extract content
+- QVERIFY( !(doc->okToCopy()) );
+-
+- // we are not allowed to print at high resolution
+- QVERIFY( !(doc->okToPrintHighRes()) );
+-
+- // we are not allowed to fill forms
+- QVERIFY( !(doc->okToFillForm()) );
+-
+- // we are allowed to extract content for accessibility
+- QVERIFY( doc->okToExtractForAccessibility() );
+-
+- // we are allowed to assemble this document
+- QVERIFY( doc->okToAssemble() );
+-
+- delete doc;
+-}
+-
+-QTEST_MAIN(TestPermissions)
+-#include "check_permissions.moc"
+-
+diff --git a/qt4/tests/check_search.cpp b/qt4/tests/check_search.cpp
+deleted file mode 100644
+index 99659e04..00000000
+--- a/qt4/tests/check_search.cpp
++++ /dev/null
+@@ -1,175 +0,0 @@
+-#include <QtTest/QtTest>
+-
+-#include <poppler-qt4.h>
+-
+-class TestSearch: public QObject
+-{
+- Q_OBJECT
+-private slots:
+- void bug7063();
+- void testNextAndPrevious();
+- void testWholeWordsOnly();
+-};
+-
+-void TestSearch::bug7063()
+-{
+- QScopedPointer< Poppler::Document > document(Poppler::Document::load(TESTDATADIR "/unittestcases/bug7063.pdf"));
+- QVERIFY( document );
+-
+- QScopedPointer< Poppler::Page > page(document->page(0));
+- QVERIFY( page );
+-
+- QRectF pageRegion( QPointF(0,0), page->pageSize() );
+- QCOMPARE( page->search(QString("non-ascii:"), pageRegion, Poppler::Page::FromTop, Poppler::Page::CaseSensitive), true );
+-
+- QCOMPARE( page->search(QString("Ascii"), pageRegion, Poppler::Page::FromTop, Poppler::Page::CaseSensitive), false );
+- QCOMPARE( page->search(QString("Ascii"), pageRegion, Poppler::Page::FromTop, Poppler::Page::CaseInsensitive), true );
+-
+- QCOMPARE( page->search(QString("latin1:"), pageRegion, Poppler::Page::FromTop, Poppler::Page::CaseSensitive), false );
+-
+- QCOMPARE( page->search(QString::fromUtf8("é"), pageRegion, Poppler::Page::FromTop, Poppler::Page::CaseSensitive), true );
+- QCOMPARE( page->search(QString::fromUtf8("à"), pageRegion, Poppler::Page::FromTop, Poppler::Page::CaseSensitive), true );
+- QCOMPARE( page->search(QString::fromUtf8("ç"), pageRegion, Poppler::Page::FromTop, Poppler::Page::CaseSensitive), true );
+- QCOMPARE( page->search(QString::fromUtf8("search \"é\", \"à\" or \"ç\""), pageRegion, Poppler::Page::FromTop, Poppler::Page::CaseSensitive), true );
+- QCOMPARE( page->search(QString::fromUtf8("¥µ©"), pageRegion, Poppler::Page::FromTop, Poppler::Page::CaseSensitive), true );
+- QCOMPARE( page->search(QString::fromUtf8("¥©"), pageRegion, Poppler::Page::FromTop, Poppler::Page::CaseSensitive), false );
+-
+- double rectLeft = 0.0, rectTop = 0.0, rectRight = page->pageSizeF().width(), rectBottom = page->pageSizeF().height();
+-
+- QCOMPARE( page->search(QString("non-ascii:"), rectLeft, rectTop, rectRight, rectBottom, Poppler::Page::FromTop), true );
+-
+- QCOMPARE( page->search(QString("Ascii"), rectLeft, rectTop, rectRight, rectBottom, Poppler::Page::FromTop), false );
+- QCOMPARE( page->search(QString("Ascii"), rectLeft, rectTop, rectRight, rectBottom, Poppler::Page::FromTop, Poppler::Page::IgnoreCase), true );
+-
+- QCOMPARE( page->search(QString("latin1:"), rectLeft, rectTop, rectRight, rectBottom, Poppler::Page::FromTop), false );
+-
+- QCOMPARE( page->search(QString::fromUtf8("é"), rectLeft, rectTop, rectRight, rectBottom, Poppler::Page::FromTop), true );
+- QCOMPARE( page->search(QString::fromUtf8("à"), rectLeft, rectTop, rectRight, rectBottom, Poppler::Page::FromTop), true );
+- QCOMPARE( page->search(QString::fromUtf8("ç"), rectLeft, rectTop, rectRight, rectBottom, Poppler::Page::FromTop), true );
+- QCOMPARE( page->search(QString::fromUtf8("search \"é\", \"à\" or \"ç\""), rectLeft, rectTop, rectRight, rectBottom, Poppler::Page::FromTop), true );
+- QCOMPARE( page->search(QString::fromUtf8("¥µ©"), rectLeft, rectTop, rectRight, rectBottom, Poppler::Page::FromTop), true );
+- QCOMPARE( page->search(QString::fromUtf8("¥©"), rectLeft, rectTop, rectRight, rectBottom, Poppler::Page::FromTop), false );
+-}
+-
+-void TestSearch::testNextAndPrevious()
+-{
+- QScopedPointer< Poppler::Document > document(Poppler::Document::load(TESTDATADIR "/unittestcases/xr01.pdf"));
+- QVERIFY( document );
+-
+- QScopedPointer< Poppler::Page > page(document->page(0));
+- QVERIFY( page );
+-
+- QRectF region( QPointF(0,0), page->pageSize() );
+-
+- QCOMPARE( page->search(QString("is"), region, Poppler::Page::FromTop, Poppler::Page::CaseSensitive), true );
+- QVERIFY( qAbs(region.x() - 161.44) < 0.01 );
+- QVERIFY( qAbs(region.y() - 127.85) < 0.01 );
+- QVERIFY( qAbs(region.width() - 6.70) < 0.01 );
+- QVERIFY( qAbs(region.height() - 8.85) < 0.01 );
+- QCOMPARE( page->search(QString("is"), region, Poppler::Page::NextResult, Poppler::Page::CaseSensitive), true );
+- QVERIFY( qAbs(region.x() - 171.46) < 0.01 );
+- QVERIFY( qAbs(region.y() - 127.85) < 0.01 );
+- QVERIFY( qAbs(region.width() - 6.70) < 0.01 );
+- QVERIFY( qAbs(region.height() - 8.85) < 0.01 );
+- QCOMPARE( page->search(QString("is"), region, Poppler::Page::NextResult, Poppler::Page::CaseSensitive), true );
+- QVERIFY( qAbs(region.x() - 161.44) < 0.01 );
+- QVERIFY( qAbs(region.y() - 139.81) < 0.01 );
+- QVERIFY( qAbs(region.width() - 6.70) < 0.01 );
+- QVERIFY( qAbs(region.height() - 8.85) < 0.01 );
+- QCOMPARE( page->search(QString("is"), region, Poppler::Page::NextResult, Poppler::Page::CaseSensitive), true );
+- QVERIFY( qAbs(region.x() - 171.46) < 0.01 );
+- QVERIFY( qAbs(region.y() - 139.81) < 0.01 );
+- QVERIFY( qAbs(region.width() - 6.70) < 0.01 );
+- QVERIFY( qAbs(region.height() - 8.85) < 0.01 );
+- QCOMPARE( page->search(QString("is"), region, Poppler::Page::NextResult, Poppler::Page::CaseSensitive), false );
+- QCOMPARE( page->search(QString("is"), region, Poppler::Page::PreviousResult, Poppler::Page::CaseSensitive), true );
+- QVERIFY( qAbs(region.x() - 161.44) < 0.01 );
+- QVERIFY( qAbs(region.y() - 139.81) < 0.01 );
+- QVERIFY( qAbs(region.width() - 6.70) < 0.01 );
+- QVERIFY( qAbs(region.height() - 8.85) < 0.01 );
+- QCOMPARE( page->search(QString("is"), region, Poppler::Page::PreviousResult, Poppler::Page::CaseSensitive), true );
+- QVERIFY( qAbs(region.x() - 171.46) < 0.01 );
+- QVERIFY( qAbs(region.y() - 127.85) < 0.01 );
+- QVERIFY( qAbs(region.width() - 6.70) < 0.01 );
+- QVERIFY( qAbs(region.height() - 8.85) < 0.01 );
+- QCOMPARE( page->search(QString("is"), region, Poppler::Page::PreviousResult, Poppler::Page::CaseSensitive), true );
+- QVERIFY( qAbs(region.x() - 161.44) < 0.01 );
+- QVERIFY( qAbs(region.y() - 127.85) < 0.01 );
+- QVERIFY( qAbs(region.width() - 6.70) < 0.01 );
+- QVERIFY( qAbs(region.height() - 8.85) < 0.01 );
+- QCOMPARE( page->search(QString("is"), region, Poppler::Page::PreviousResult, Poppler::Page::CaseSensitive), false );
+-
+- double rectLeft = 0.0, rectTop = 0.0, rectRight = page->pageSizeF().width(), rectBottom = page->pageSizeF().height();
+-
+- QCOMPARE( page->search(QString("is"), rectLeft, rectTop, rectRight, rectBottom, Poppler::Page::FromTop), true );
+- QVERIFY( qAbs(rectLeft - 161.44) < 0.01 );
+- QVERIFY( qAbs(rectTop - 127.85) < 0.01 );
+- QVERIFY( qAbs(rectRight - rectLeft - 6.70) < 0.01 );
+- QVERIFY( qAbs(rectBottom - rectTop - 8.85) < 0.01 );
+- QCOMPARE( page->search(QString("is"), rectLeft, rectTop, rectRight, rectBottom, Poppler::Page::NextResult), true );
+- QVERIFY( qAbs(rectLeft - 171.46) < 0.01 );
+- QVERIFY( qAbs(rectTop - 127.85) < 0.01 );
+- QVERIFY( qAbs(rectRight - rectLeft - 6.70) < 0.01 );
+- QVERIFY( qAbs(rectBottom - rectTop - 8.85) < 0.01 );
+- QCOMPARE( page->search(QString("is"), rectLeft, rectTop, rectRight, rectBottom, Poppler::Page::NextResult), true );
+- QVERIFY( qAbs(rectLeft - 161.44) < 0.01 );
+- QVERIFY( qAbs(rectTop - 139.81) < 0.01 );
+- QVERIFY( qAbs(rectRight - rectLeft - 6.70) < 0.01 );
+- QVERIFY( qAbs(rectBottom - rectTop - 8.85) < 0.01 );
+- QCOMPARE( page->search(QString("is"), rectLeft, rectTop, rectRight, rectBottom, Poppler::Page::NextResult), true );
+- QVERIFY( qAbs(rectLeft - 171.46) < 0.01 );
+- QVERIFY( qAbs(rectTop - 139.81) < 0.01 );
+- QVERIFY( qAbs(rectRight - rectLeft - 6.70) < 0.01 );
+- QVERIFY( qAbs(rectBottom - rectTop - 8.85) < 0.01 );
+- QCOMPARE( page->search(QString("is"), rectLeft, rectTop, rectRight, rectBottom, Poppler::Page::NextResult), false );
+- QCOMPARE( page->search(QString("is"), rectLeft, rectTop, rectRight, rectBottom, Poppler::Page::PreviousResult), true );
+- QVERIFY( qAbs(rectLeft - 161.44) < 0.01 );
+- QVERIFY( qAbs(rectTop - 139.81) < 0.01 );
+- QVERIFY( qAbs(rectRight - rectLeft - 6.70) < 0.01 );
+- QVERIFY( qAbs(rectBottom - rectTop - 8.85) < 0.01 );
+- QCOMPARE( page->search(QString("is"), rectLeft, rectTop, rectRight, rectBottom, Poppler::Page::PreviousResult), true );
+- QVERIFY( qAbs(rectLeft - 171.46) < 0.01 );
+- QVERIFY( qAbs(rectTop - 127.85) < 0.01 );
+- QVERIFY( qAbs(rectRight - rectLeft - 6.70) < 0.01 );
+- QVERIFY( qAbs(rectBottom - rectTop - 8.85) < 0.01 );
+- QCOMPARE( page->search(QString("is"), rectLeft, rectTop, rectRight, rectBottom, Poppler::Page::PreviousResult), true );
+- QVERIFY( qAbs(rectLeft - 161.44) < 0.01 );
+- QVERIFY( qAbs(rectTop - 127.85) < 0.01 );
+- QVERIFY( qAbs(rectRight - rectLeft - 6.70) < 0.01 );
+- QVERIFY( qAbs(rectBottom - rectTop - 8.85) < 0.01 );
+- QCOMPARE( page->search(QString("is"), rectLeft, rectTop, rectRight, rectBottom, Poppler::Page::PreviousResult), false );
+-}
+-
+-void TestSearch::testWholeWordsOnly()
+-{
+- QScopedPointer< Poppler::Document > document(Poppler::Document::load(TESTDATADIR "/unittestcases/WithActualText.pdf"));
+- QVERIFY( document );
+-
+- QScopedPointer< Poppler::Page > page(document->page(0));
+- QVERIFY( page );
+-
+- const Poppler::Page::SearchDirection direction = Poppler::Page::FromTop;
+-
+- const Poppler::Page::SearchFlags mode0 = 0;
+- const Poppler::Page::SearchFlags mode1 = Poppler::Page::IgnoreCase;
+- const Poppler::Page::SearchFlags mode2 = Poppler::Page::WholeWords;
+- const Poppler::Page::SearchFlags mode3 = Poppler::Page::IgnoreCase | Poppler::Page::WholeWords;
+-
+- double left, top, right, bottom;
+-
+- QCOMPARE( page->search(QLatin1String("brown"), left, top, right, bottom, direction, mode0), true );
+- QCOMPARE( page->search(QLatin1String("brOwn"), left, top, right, bottom, direction, mode0), false );
+-
+- QCOMPARE( page->search(QLatin1String("brOwn"), left, top, right, bottom, direction, mode1), true );
+- QCOMPARE( page->search(QLatin1String("brawn"), left, top, right, bottom, direction, mode1), false );
+-
+- QCOMPARE( page->search(QLatin1String("brown"), left, top, right, bottom, direction, mode2), true );
+- QCOMPARE( page->search(QLatin1String("own"), left, top, right, bottom, direction, mode2), false );
+-
+- QCOMPARE( page->search(QLatin1String("brOwn"), left, top, right, bottom, direction, mode3), true );
+- QCOMPARE( page->search(QLatin1String("Own"), left, top, right, bottom, direction, mode3), false );
+-}
+-
+-QTEST_MAIN(TestSearch)
+-#include "check_search.moc"
+-
+diff --git a/qt4/tests/check_strings.cpp b/qt4/tests/check_strings.cpp
+deleted file mode 100644
+index 700ae9c2..00000000
+--- a/qt4/tests/check_strings.cpp
++++ /dev/null
+@@ -1,250 +0,0 @@
+-/*
+- * Copyright (C) 2010, 2011, Pino Toscano <pino@kde.org>
+- *
+- * This program is free software; you can redistribute it and/or modify
+- * it under the terms of the GNU General Public License as published by
+- * the Free Software Foundation; either version 2, or (at your option)
+- * any later version.
+- *
+- * This program is distributed in the hope that it will be useful,
+- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+- * GNU General Public License for more details.
+- *
+- * You should have received a copy of the GNU General Public License
+- * along with this program; if not, write to the Free Software
+- * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+- */
+-
+-#include <QtTest/QtTest>
+-
+-#include <poppler-qt4.h>
+-#include <poppler-private.h>
+-
+-#include <GlobalParams.h>
+-
+-Q_DECLARE_METATYPE(GooString*)
+-Q_DECLARE_METATYPE(Unicode*)
+-
+-class TestStrings : public QObject
+-{
+- Q_OBJECT
+-
+-private slots:
+- void initTestCase();
+- void cleanupTestCase();
+- void check_unicodeToQString_data();
+- void check_unicodeToQString();
+- void check_UnicodeParsedString_data();
+- void check_UnicodeParsedString();
+- void check_QStringToUnicodeGooString_data();
+- void check_QStringToUnicodeGooString();
+- void check_QStringToGooString_data();
+- void check_QStringToGooString();
+-
+-private:
+- GooString* newGooString(const char *s);
+- GooString* newGooString(const char *s, int l);
+-
+- QVector<GooString *> m_gooStrings;
+-};
+-
+-void TestStrings::initTestCase()
+-{
+- qRegisterMetaType<GooString*>("GooString*");
+- qRegisterMetaType<Unicode*>("Unicode*");
+-
+- globalParams = new GlobalParams();
+-}
+-
+-void TestStrings::cleanupTestCase()
+-{
+- qDeleteAll(m_gooStrings);
+-
+- delete globalParams;
+-}
+-
+-void TestStrings::check_unicodeToQString_data()
+-{
+- QTest::addColumn<Unicode*>("data");
+- QTest::addColumn<int>("length");
+- QTest::addColumn<QString>("result");
+-
+- {
+- const int l = 1;
+- Unicode *u = new Unicode[l];
+- u[0] = int('a');
+- QTest::newRow("a") << u << l << QString::fromUtf8("a");
+- }
+- {
+- const int l = 1;
+- Unicode *u = new Unicode[l];
+- u[0] = 0x0161;
+- QTest::newRow("\u0161") << u << l << QString::fromUtf8("\u0161");
+- }
+- {
+- const int l = 2;
+- Unicode *u = new Unicode[l];
+- u[0] = int('a');
+- u[1] = int('b');
+- QTest::newRow("ab") << u << l << QString::fromUtf8("ab");
+- }
+- {
+- const int l = 2;
+- Unicode *u = new Unicode[l];
+- u[0] = int('a');
+- u[1] = 0x0161;
+- QTest::newRow("a\u0161") << u << l << QString::fromUtf8("a\u0161");
+- }
+- {
+- const int l = 2;
+- Unicode *u = new Unicode[l];
+- u[0] = 0x5c01;
+- u[1] = 0x9762;
+- QTest::newRow("\xe5\xb0\x81\xe9\x9d\xa2") << u << l << QString::fromUtf8("\xe5\xb0\x81\xe9\x9d\xa2");
+- }
+- {
+- const int l = 3;
+- Unicode *u = new Unicode[l];
+- u[0] = 0x5c01;
+- u[1] = 0x9762;
+- u[2] = 0x0;
+- QTest::newRow("\xe5\xb0\x81\xe9\x9d\xa2 + 0") << u << l << QString::fromUtf8("\xe5\xb0\x81\xe9\x9d\xa2");
+- }
+-}
+-
+-void TestStrings::check_unicodeToQString()
+-{
+- QFETCH(Unicode*, data);
+- QFETCH(int, length);
+- QFETCH(QString, result);
+-
+- QCOMPARE(Poppler::unicodeToQString(data, length), result);
+-
+- delete [] data;
+-}
+-
+-void TestStrings::check_UnicodeParsedString_data()
+-{
+- QTest::addColumn<GooString*>("string");
+- QTest::addColumn<QString>("result");
+-
+- // non-unicode strings
+- QTest::newRow("<empty>") << newGooString("")
+- << QString();
+- QTest::newRow("a") << newGooString("a")
+- << QString::fromUtf8("a");
+- QTest::newRow("ab") << newGooString("ab")
+- << QString::fromUtf8("ab");
+- QTest::newRow("~") << newGooString("~")
+- << QString::fromUtf8("~");
+- QTest::newRow("test string") << newGooString("test string")
+- << QString::fromUtf8("test string");
+-
+- // unicode strings
+- QTest::newRow("<unicode marks>") << newGooString("\xFE\xFF")
+- << QString();
+- QTest::newRow("U a") << newGooString("\xFE\xFF\0a", 4)
+- << QString::fromUtf8("a");
+- QTest::newRow("U ~") << newGooString("\xFE\xFF\0~", 4)
+- << QString::fromUtf8("~");
+- QTest::newRow("U aa") << newGooString("\xFE\xFF\0a\0a", 6)
+- << QString::fromUtf8("aa");
+- QTest::newRow("U \xC3\x9F") << newGooString("\xFE\xFF\0\xDF", 4)
+- << QString::fromUtf8("\xC3\x9F");
+- QTest::newRow("U \xC3\x9F\x61") << newGooString("\xFE\xFF\0\xDF\0\x61", 6)
+- << QString::fromUtf8("\xC3\x9F\x61");
+- QTest::newRow("U \xC5\xA1") << newGooString("\xFE\xFF\x01\x61", 4)
+- << QString::fromUtf8("\xC5\xA1");
+- QTest::newRow("U \xC5\xA1\x61") << newGooString("\xFE\xFF\x01\x61\0\x61", 6)
+- << QString::fromUtf8("\xC5\xA1\x61");
+- QTest::newRow("test string") << newGooString("\xFE\xFF\0t\0e\0s\0t\0 \0s\0t\0r\0i\0n\0g", 24)
+- << QString::fromUtf8("test string");
+-}
+-
+-void TestStrings::check_UnicodeParsedString()
+-{
+- QFETCH(GooString*, string);
+- QFETCH(QString, result);
+-
+- QCOMPARE(Poppler::UnicodeParsedString(string), result);
+-}
+-
+-void TestStrings::check_QStringToUnicodeGooString_data()
+-{
+- QTest::addColumn<QString>("string");
+- QTest::addColumn<QByteArray>("result");
+-
+-
+- QTest::newRow("<null>") << QString()
+- << QByteArray("");
+- QTest::newRow("<empty>") << QString::fromUtf8("")
+- << QByteArray("");
+- QTest::newRow("a") << QString::fromUtf8("a")
+- << QByteArray("\0a", 2);
+- QTest::newRow("ab") << QString::fromUtf8("ab")
+- << QByteArray("\0a\0b", 4);
+- QTest::newRow("test string") << QString::fromUtf8("test string")
+- << QByteArray("\0t\0e\0s\0t\0 \0s\0t\0r\0i\0n\0g", 22);
+- QTest::newRow("\xC3\x9F") << QString::fromUtf8("\xC3\x9F")
+- << QByteArray("\0\xDF", 2);
+- QTest::newRow("\xC3\x9F\x61") << QString::fromUtf8("\xC3\x9F\x61")
+- << QByteArray("\0\xDF\0\x61", 4);
+-}
+-
+-void TestStrings::check_QStringToUnicodeGooString()
+-{
+- QFETCH(QString, string);
+- QFETCH(QByteArray, result);
+-
+- GooString *goo = Poppler::QStringToUnicodeGooString(string);
+- QVERIFY(goo->hasUnicodeMarker());
+- QCOMPARE(goo->getLength(), string.length() * 2 + 2);
+- QCOMPARE(result, QByteArray::fromRawData(goo->getCString() + 2, goo->getLength() - 2));
+-
+- delete goo;
+-}
+-
+-void TestStrings::check_QStringToGooString_data()
+-{
+- QTest::addColumn<QString>("string");
+- QTest::addColumn<GooString*>("result");
+-
+- QTest::newRow("<null>") << QString()
+- << newGooString("");
+- QTest::newRow("<empty>") << QString::fromUtf8("")
+- << newGooString("");
+- QTest::newRow("a") << QString::fromUtf8("a")
+- << newGooString("a");
+- QTest::newRow("ab") << QString::fromUtf8("ab")
+- << newGooString("ab");
+-}
+-
+-void TestStrings::check_QStringToGooString()
+-{
+- QFETCH(QString, string);
+- QFETCH(GooString*, result);
+-
+- GooString *goo = Poppler::QStringToGooString(string);
+- QCOMPARE(goo->getCString(), result->getCString());
+-
+- delete goo;
+-}
+-
+-GooString* TestStrings::newGooString(const char *s)
+-{
+- GooString *goo = new GooString(s);
+- m_gooStrings.append(goo);
+- return goo;
+-}
+-
+-GooString* TestStrings::newGooString(const char *s, int l)
+-{
+- GooString *goo = new GooString(s, l);
+- m_gooStrings.append(goo);
+- return goo;
+-}
+-
+-QTEST_MAIN(TestStrings)
+-
+-#include "check_strings.moc"
+diff --git a/qt4/tests/poppler-attachments.cpp b/qt4/tests/poppler-attachments.cpp
+deleted file mode 100644
+index 992dc565..00000000
+--- a/qt4/tests/poppler-attachments.cpp
++++ /dev/null
+@@ -1,39 +0,0 @@
+-#include <QtCore/QCoreApplication>
+-#include <QtCore/QDebug>
+-
+-#include <iostream>
+-
+-#include <poppler-qt4.h>
+-
+-int main( int argc, char **argv )
+-{
+- QCoreApplication a( argc, argv ); // QApplication required!
+-
+- if (!( argc == 2 ))
+- {
+- qWarning() << "usage: poppler-attachments filename";
+- exit(1);
+- }
+-
+- Poppler::Document *doc = Poppler::Document::load(argv[1]);
+- if (!doc)
+- {
+- qWarning() << "doc not loaded";
+- exit(1);
+- }
+-
+- if (doc->hasEmbeddedFiles()) {
+- std::cout << "Embedded files: " << std::endl;
+- foreach(Poppler::EmbeddedFile *file, doc->embeddedFiles()) {
+- std::cout << " " << qPrintable(file->name()) << std::endl;
+- std::cout << " desc:" << qPrintable(file->description()) << std::endl;
+- QByteArray data = file->data();
+- std::cout << " data: " << data.constData() << std::endl;
+- }
+-
+- } else {
+- std::cout << "There are no embedded document at the top level" << std::endl;
+- }
+- delete doc;
+-
+-}
+diff --git a/qt4/tests/poppler-fonts.cpp b/qt4/tests/poppler-fonts.cpp
+deleted file mode 100644
+index 6b66ec42..00000000
+--- a/qt4/tests/poppler-fonts.cpp
++++ /dev/null
+@@ -1,89 +0,0 @@
+-#include <QtCore/QCoreApplication>
+-#include <QtCore/QDebug>
+-
+-#include <iostream>
+-
+-#include <poppler-qt4.h>
+-
+-int main( int argc, char **argv )
+-{
+- QCoreApplication a( argc, argv ); // QApplication required!
+-
+- if (!( argc == 2 ))
+- {
+- qWarning() << "usage: poppler-fonts filename";
+- exit(1);
+- }
+-
+- Poppler::Document *doc = Poppler::Document::load(argv[1]);
+- if (!doc)
+- {
+- qWarning() << "doc not loaded";
+- exit(1);
+- }
+-
+- std::cout << "name type emb sub font file";
+- std::cout << std::endl;
+- std::cout << "------------------------------------ ------------ --- --- ---------";
+- std::cout << std::endl;
+-
+- foreach( const Poppler::FontInfo &font, doc->fonts() ) {
+- if (font.name().isNull()) {
+- std::cout << qPrintable( QString("%1").arg(QString("[none]"), -37) );
+- } else {
+- std::cout << qPrintable( QString("%1").arg(font.name(), -37) );
+- }
+- switch( font.type() ) {
+- case Poppler::FontInfo::unknown:
+- std::cout << "unknown ";
+- break;
+- case Poppler::FontInfo::Type1:
+- std::cout << "Type 1 ";
+- break;
+- case Poppler::FontInfo::Type1C:
+- std::cout << "Type 1C ";
+- break;
+- case Poppler::FontInfo::Type3:
+- std::cout << "Type 3 ";
+- break;
+- case Poppler::FontInfo::TrueType:
+- std::cout << "TrueType ";
+- break;
+- case Poppler::FontInfo::CIDType0:
+- std::cout << "CID Type 0 ";
+- break;
+- case Poppler::FontInfo::CIDType0C:
+- std::cout << "CID Type 0C ";
+- break;
+- case Poppler::FontInfo::CIDTrueType:
+- std::cout << "CID TrueType ";
+- break;
+- case Poppler::FontInfo::Type1COT:
+- std::cout << "Type 1C (OT) ";
+- break;
+- case Poppler::FontInfo::TrueTypeOT:
+- std::cout << "TrueType (OT) ";
+- break;
+- case Poppler::FontInfo::CIDType0COT:
+- std::cout << "CID Type 0C (OT) ";
+- break;
+- case Poppler::FontInfo::CIDTrueTypeOT:
+- std::cout << "CID TrueType (OT) ";
+- break;
+- }
+-
+- if ( font.isEmbedded() ) {
+- std::cout << "yes ";
+- } else {
+- std::cout << "no ";
+- }
+- if ( font.isSubset() ) {
+- std::cout << "yes ";
+- } else {
+- std::cout << "no ";
+- }
+- std::cout << qPrintable( QString("%1").arg(font.file()) );
+- std::cout << std::endl;
+- }
+- delete doc;
+-}
+diff --git a/qt4/tests/poppler-forms.cpp b/qt4/tests/poppler-forms.cpp
+deleted file mode 100644
+index 98891a91..00000000
+--- a/qt4/tests/poppler-forms.cpp
++++ /dev/null
+@@ -1,166 +0,0 @@
+-#include <QtCore/QCoreApplication>
+-#include <QtCore/QDebug>
+-
+-#include <iostream>
+-
+-#include <poppler-qt4.h>
+-#include <poppler-form.h>
+-
+-static std::ostream& operator<< (std::ostream &out, Poppler::FormField::FormType type)
+-{
+- switch (type) {
+- case Poppler::FormField::FormButton: out << "Button"; break;
+- case Poppler::FormField::FormText: out << "Text"; break;
+- case Poppler::FormField::FormChoice: out << "Choice"; break;
+- case Poppler::FormField::FormSignature: out << "Signature"; break;
+- }
+- return out;
+-}
+-
+-static std::ostream& operator<< (std::ostream &out, Poppler::FormFieldButton::ButtonType type)
+-{
+- switch (type) {
+- case Poppler::FormFieldButton::Push: out << "Push"; break;
+- case Poppler::FormFieldButton::CheckBox: out << "CheckBox"; break;
+- case Poppler::FormFieldButton::Radio: out << "Radio"; break;
+- }
+- return out;
+-}
+-
+-static std::ostream& operator<< (std::ostream &out, Poppler::FormFieldText::TextType type)
+-{
+- switch (type) {
+- case Poppler::FormFieldText::Normal: out << "Normal"; break;
+- case Poppler::FormFieldText::Multiline: out << "Multiline"; break;
+- case Poppler::FormFieldText::FileSelect: out << "FileSelect"; break;
+- }
+- return out;
+-}
+-
+-static std::ostream& operator<< (std::ostream &out, Poppler::FormFieldChoice::ChoiceType type)
+-{
+- switch (type) {
+- case Poppler::FormFieldChoice::ComboBox: out << "ComboBox"; break;
+- case Poppler::FormFieldChoice::ListBox: out << "ListBox"; break;
+- }
+- return out;
+-}
+-
+-static std::ostream& operator<< (std::ostream &out, Qt::Alignment alignment)
+-{
+- switch (alignment) {
+- case Qt::AlignLeft: out << "Left"; break;
+- case Qt::AlignRight: out << "Right"; break;
+- case Qt::AlignHCenter: out << "HCenter"; break;
+- case Qt::AlignJustify: out << "Justify"; break;
+- case Qt::AlignTop: out << "Top"; break;
+- case Qt::AlignBottom: out << "Bottom"; break;
+- case Qt::AlignVCenter: out << "VCenter"; break;
+- case Qt::AlignCenter: out << "Center"; break;
+- case Qt::AlignAbsolute: out << "Absolute"; break;
+- }
+- return out;
+-}
+-
+-static std::ostream& operator<< (std::ostream &out, const QString &string)
+-{
+- out << string.toUtf8().constData();
+- return out;
+-}
+-
+-static std::ostream& operator<< (std::ostream &out, const QRectF &rect)
+-{
+- out << QString("top: %1 left: %2 width: %3 height: %4").arg(rect.x()).arg(rect.y()).arg(rect.width()).arg(rect.height());
+- return out;
+-}
+-
+-template<typename T>
+-std::ostream& operator<< (std::ostream &out, const QList<T> &elems)
+-{
+- bool isFirst = true;
+- for (int i = 0; i < elems.count(); ++i) {
+- if (!isFirst)
+- out << " ";
+- out << elems[i];
+- isFirst = false;
+- }
+- return out;
+-}
+-
+-int main( int argc, char **argv )
+-{
+- QCoreApplication a( argc, argv );
+-
+- if (!( argc == 2 ))
+- {
+- qWarning() << "usage: poppler-forms filename";
+- exit(1);
+- }
+-
+- Poppler::Document *doc = Poppler::Document::load(argv[1]);
+- if (!doc)
+- {
+- qWarning() << "doc not loaded";
+- exit(1);
+- }
+-
+- std::cout << "Forms for file " << argv[1] << std::endl;
+- for (int i = 0; i < doc->numPages(); ++i) {
+- Poppler::Page *page = doc->page(i);
+- if (page) {
+- QList<Poppler::FormField*> forms = page->formFields();
+- std::cout << "\tPage " << i + 1 << std::endl;
+- foreach( const Poppler::FormField *form, forms ) {
+- std::cout << "\t\tForm" << std::endl;
+- std::cout << "\t\t\tType: " << form->type() << std::endl;
+- std::cout << "\t\t\tRect: " << form->rect() << std::endl;
+- std::cout << "\t\t\tID: " << form->id() << std::endl;
+- std::cout << "\t\t\tName: " << form->name() << std::endl;
+- std::cout << "\t\t\tFullyQualifiedName: " << form->fullyQualifiedName() << std::endl;
+- std::cout << "\t\t\tUIName: " << form->uiName() << std::endl;
+- std::cout << "\t\t\tReadOnly: " << form->isReadOnly() << std::endl;
+- std::cout << "\t\t\tVisible: " << form->isVisible() << std::endl;
+- switch (form->type()) {
+- case Poppler::FormField::FormButton: {
+- const Poppler::FormFieldButton *buttonForm = static_cast<const Poppler::FormFieldButton *>(form);
+- std::cout << "\t\t\tButtonType: " << buttonForm->buttonType() << std::endl;
+- std::cout << "\t\t\tCaption: " << buttonForm->caption() << std::endl;
+- std::cout << "\t\t\tState: " << buttonForm->state() << std::endl;
+- std::cout << "\t\t\tSiblings: " << buttonForm->siblings() << std::endl;
+- }
+- break;
+-
+- case Poppler::FormField::FormText: {
+- const Poppler::FormFieldText *textForm = static_cast<const Poppler::FormFieldText *>(form);
+- std::cout << "\t\t\tTextType: " << textForm->textType() << std::endl;
+- std::cout << "\t\t\tText: " << textForm->text() << std::endl;
+- std::cout << "\t\t\tIsPassword: " << textForm->isPassword() << std::endl;
+- std::cout << "\t\t\tIsRichText: " << textForm->isRichText() << std::endl;
+- std::cout << "\t\t\tMaximumLength: " << textForm->maximumLength() << std::endl;
+- std::cout << "\t\t\tTextAlignment: " << textForm->textAlignment() << std::endl;
+- std::cout << "\t\t\tCanBeSpellChecked: " << textForm->canBeSpellChecked() << std::endl;
+- }
+- break;
+-
+- case Poppler::FormField::FormChoice: {
+- const Poppler::FormFieldChoice *choiceForm = static_cast<const Poppler::FormFieldChoice *>(form);
+- std::cout << "\t\t\tChoiceType: " << choiceForm->choiceType() << std::endl;
+- std::cout << "\t\t\tChoices: " << choiceForm->choices() << std::endl;
+- std::cout << "\t\t\tIsEditable: " << choiceForm->isEditable() << std::endl;
+- std::cout << "\t\t\tIsMultiSelect: " << choiceForm->multiSelect() << std::endl;
+- std::cout << "\t\t\tCurrentChoices: " << choiceForm->currentChoices() << std::endl;
+- std::cout << "\t\t\tEditChoice: " << choiceForm->editChoice() << std::endl;
+- std::cout << "\t\t\tTextAlignment: " << choiceForm->textAlignment() << std::endl;
+- std::cout << "\t\t\tCanBeSpellChecked: " << choiceForm->canBeSpellChecked() << std::endl;
+- }
+- break;
+-
+- case Poppler::FormField::FormSignature:
+- break;
+- }
+- }
+- qDeleteAll(forms);
+- }
+- }
+- delete doc;
+-}
+diff --git a/qt4/tests/poppler-texts.cpp b/qt4/tests/poppler-texts.cpp
+deleted file mode 100644
+index ec283531..00000000
+--- a/qt4/tests/poppler-texts.cpp
++++ /dev/null
+@@ -1,40 +0,0 @@
+-#include <QtCore/QCoreApplication>
+-#include <QtCore/QDebug>
+-
+-#include <iostream>
+-
+-#include <poppler-qt4.h>
+-
+-int main( int argc, char **argv )
+-{
+- QCoreApplication a( argc, argv ); // QApplication required!
+-
+- if (!( argc == 2 ))
+- {
+- qWarning() << "usage: poppler-texts filename";
+- exit(1);
+- }
+-
+- Poppler::Document *doc = Poppler::Document::load(argv[1]);
+- if (!doc)
+- {
+- qWarning() << "doc not loaded";
+- exit(1);
+- }
+-
+- for ( int i = 0; i < doc->numPages(); i++ )
+- {
+- int j = 0;
+- std::cout << "*** Page " << i << std::endl;
+- std::cout << std::flush;
+-
+- Poppler::Page *page = doc->page(i);
+- const QByteArray utf8str = page->text( QRectF(), Poppler::Page::RawOrderLayout ).toUtf8();
+- std::cout << std::flush;
+- for ( j = 0; j < utf8str.size(); j++ )
+- std::cout << utf8str[j];
+- std::cout << std::endl;
+- delete page;
+- }
+- delete doc;
+-}
+diff --git a/qt4/tests/stress-poppler-dir.cpp b/qt4/tests/stress-poppler-dir.cpp
+deleted file mode 100644
+index 6eeab6fa..00000000
+--- a/qt4/tests/stress-poppler-dir.cpp
++++ /dev/null
+@@ -1,67 +0,0 @@
+-#include <QtCore/QDebug>
+-#include <QtCore/QDir>
+-#include <QtCore/QTime>
+-#include <QtGui/QApplication>
+-#include <QtGui/QImage>
+-
+-#include <iostream>
+-
+-#include <poppler-qt4.h>
+-
+-int main( int argc, char **argv )
+-{
+- QApplication a( argc, argv ); // QApplication required!
+-
+- QTime t;
+- t.start();
+-
+- QDir directory( argv[1] );
+- foreach ( const QString &fileName, directory.entryList() ) {
+- if (fileName.endsWith("pdf") ) {
+- qDebug() << "Doing" << fileName.toLatin1().data() << ":";
+- Poppler::Document *doc = Poppler::Document::load( directory.canonicalPath()+"/"+fileName );
+- if (!doc) {
+- qWarning() << "doc not loaded";
+- } else if ( doc->isLocked() ) {
+- if (! doc->unlock( "", "password" ) ) {
+- qWarning() << "couldn't unlock document";
+- delete doc;
+- }
+- } else {
+- int major = 0, minor = 0;
+- doc->getPdfVersion( &major, &minor );
+- doc->info("Title");
+- doc->info("Subject");
+- doc->info("Author");
+- doc->info("Keywords");
+- doc->info("Creator");
+- doc->info("Producer");
+- doc->date("CreationDate").toString();
+- doc->date("ModDate").toString();
+- doc->numPages();
+- doc->isLinearized();
+- doc->isEncrypted();
+- doc->okToPrint();
+- doc->okToCopy();
+- doc->okToChange();
+- doc->okToAddNotes();
+- doc->pageMode();
+-
+- for( int index = 0; index < doc->numPages(); ++index ) {
+- Poppler::Page *page = doc->page( index );
+- QImage image = page->renderToImage();
+- page->pageSize();
+- page->orientation();
+- delete page;
+- std::cout << ".";
+- std::cout.flush();
+- }
+- std::cout << std::endl;
+- delete doc;
+- }
+- }
+- }
+-
+- std::cout << "Elapsed time: " << (t.elapsed()/1000) << "seconds" << std::endl;
+-
+-}
+diff --git a/qt4/tests/stress-poppler-qt4.cpp b/qt4/tests/stress-poppler-qt4.cpp
+deleted file mode 100644
+index 56844543..00000000
+--- a/qt4/tests/stress-poppler-qt4.cpp
++++ /dev/null
+@@ -1,74 +0,0 @@
+-#include <QtCore/QDebug>
+-#include <QtCore/QDir>
+-#include <QtCore/QTime>
+-#include <QtGui/QApplication>
+-#include <QtGui/QImage>
+-
+-#include <iostream>
+-
+-#include <poppler-qt4.h>
+-
+-int main( int argc, char **argv )
+-{
+- QApplication a( argc, argv ); // QApplication required!
+-
+- Q_UNUSED( argc );
+- Q_UNUSED( argv );
+-
+- QTime t;
+- t.start();
+- QDir dbDir( QString( "./pdfdb" ) );
+- if ( !dbDir.exists() ) {
+- qWarning() << "Database directory does not exist";
+- }
+-
+- QStringList excludeSubDirs;
+- excludeSubDirs << "000048" << "000607";
+-
+- foreach ( const QString &subdir, dbDir.entryList(QStringList() << "0000*", QDir::Dirs) ) {
+- if ( excludeSubDirs.contains(subdir) ) {
+- // then skip it
+- } else {
+- QString path = "./pdfdb/" + subdir + "/data.pdf";
+- std::cout <<"Doing " << path.toLatin1().data() << " :";
+- Poppler::Document *doc = Poppler::Document::load( path );
+- if (!doc) {
+- qWarning() << "doc not loaded";
+- } else {
+- int major = 0, minor = 0;
+- doc->getPdfVersion( &major, &minor );
+- doc->info("Title");
+- doc->info("Subject");
+- doc->info("Author");
+- doc->info("Keywords");
+- doc->info("Creator");
+- doc->info("Producer");
+- doc->date("CreationDate").toString();
+- doc->date("ModDate").toString();
+- doc->numPages();
+- doc->isLinearized();
+- doc->isEncrypted();
+- doc->okToPrint();
+- doc->okToCopy();
+- doc->okToChange();
+- doc->okToAddNotes();
+- doc->pageMode();
+-
+- for( int index = 0; index < doc->numPages(); ++index ) {
+- Poppler::Page *page = doc->page( index );
+- QImage image = page->renderToImage();
+- page->pageSize();
+- page->orientation();
+- delete page;
+- std::cout << ".";
+- std::cout.flush();
+- }
+- std::cout << std::endl;
+- delete doc;
+- }
+- }
+- }
+-
+- std::cout << "Elapsed time: " << (t.elapsed()/1000) << std::endl;
+-
+-}
+diff --git a/qt4/tests/stress-threads-qt4.cpp b/qt4/tests/stress-threads-qt4.cpp
+deleted file mode 100644
+index 00968de1..00000000
+--- a/qt4/tests/stress-threads-qt4.cpp
++++ /dev/null
+@@ -1,309 +0,0 @@
+-
+-#ifndef _WIN32
+-#include <unistd.h>
+-#else
+-#include <windows.h>
+-#define sleep Sleep
+-#endif
+-#include <time.h>
+-
+-#include <poppler-qt4.h>
+-#include <poppler-form.h>
+-
+-#include <QtCore/QDebug>
+-#include <QtCore/QFile>
+-#include <QtCore/QMutex>
+-#include <QtCore/QThread>
+-#include <QtGui/QImage>
+-
+-class SillyThread : public QThread
+-{
+-public:
+- SillyThread(Poppler::Document* document, QObject* parent = 0);
+-
+- void run();
+-
+-private:
+- Poppler::Document* m_document;
+- QVector< Poppler::Page* > m_pages;
+-
+-};
+-
+-class CrazyThread : public QThread
+-{
+-public:
+- CrazyThread(uint seed, Poppler::Document* document, QMutex* annotationMutex, QObject* parent = 0);
+-
+- void run();
+-
+-private:
+- uint m_seed;
+- Poppler::Document* m_document;
+- QMutex* m_annotationMutex;
+-
+-};
+-
+-static Poppler::Page* loadPage(Poppler::Document* document, int index)
+-{
+- Poppler::Page* page = document->page(index);
+-
+- if(page == 0)
+- {
+- qDebug() << "!Document::page";
+-
+- exit(EXIT_FAILURE);
+- }
+-
+- return page;
+-}
+-
+-static Poppler::Page* loadRandomPage(Poppler::Document* document)
+-{
+- return loadPage(document, qrand() % document->numPages());
+-}
+-
+-SillyThread::SillyThread(Poppler::Document* document, QObject* parent) : QThread(parent),
+- m_document(document),
+- m_pages()
+-{
+- m_pages.reserve(m_document->numPages());
+-
+- for(int index = 0; index < m_document->numPages(); ++index)
+- {
+- m_pages.append(loadPage(m_document, index));
+- }
+-}
+-
+-
+-void SillyThread::run()
+-{
+- forever
+- {
+- foreach(Poppler::Page* page, m_pages)
+- {
+- QImage image = page->renderToImage();
+-
+- if(image.isNull())
+- {
+- qDebug() << "!Page::renderToImage";
+-
+- ::exit(EXIT_FAILURE);
+- }
+- }
+- }
+-}
+-
+-CrazyThread::CrazyThread(uint seed, Poppler::Document* document, QMutex* annotationMutex, QObject* parent) : QThread(parent),
+- m_seed(seed),
+- m_document(document),
+- m_annotationMutex(annotationMutex)
+-{
+-}
+-
+-void CrazyThread::run()
+-{
+- typedef QScopedPointer< Poppler::Page > PagePointer;
+-
+- qsrand(m_seed);
+-
+- forever
+- {
+- if(qrand() % 2 == 0)
+- {
+- qDebug() << "search...";
+-
+- PagePointer page(loadRandomPage(m_document));
+-
+- page->search("c", Poppler::Page::CaseInsensitive);
+- page->search("r", Poppler::Page::CaseSensitive);
+- page->search("a", Poppler::Page::CaseInsensitive);
+- page->search("z", Poppler::Page::CaseSensitive);
+- page->search("y", Poppler::Page::CaseInsensitive);
+- }
+-
+- if(qrand() % 2 == 0)
+- {
+- qDebug() << "links...";
+-
+- PagePointer page(loadRandomPage(m_document));
+-
+- QList< Poppler::Link* > links = page->links();
+-
+- qDeleteAll(links);
+- }
+-
+- if(qrand() % 2 == 0)
+- {
+- qDebug() << "form fields...";
+-
+- PagePointer page(loadRandomPage(m_document));
+-
+- QList< Poppler::FormField* > formFields = page->formFields();
+-
+- qDeleteAll(formFields);
+- }
+-
+- if(qrand() % 2 == 0)
+- {
+- qDebug() << "thumbnail...";
+-
+- PagePointer page(loadRandomPage(m_document));
+-
+- page->thumbnail();
+- }
+-
+- if(qrand() % 2 == 0)
+- {
+- qDebug() << "text...";
+-
+- PagePointer page(loadRandomPage(m_document));
+-
+- page->text(QRectF(QPointF(), page->pageSizeF()));
+- }
+-
+- if(qrand() % 2 == 0)
+- {
+- QMutexLocker mutexLocker(m_annotationMutex);
+-
+- qDebug() << "add annotation...";
+-
+- PagePointer page(loadRandomPage(m_document));
+-
+- Poppler::Annotation* annotation = 0;
+-
+- switch(qrand() % 3)
+- {
+- default:
+- case 0:
+- annotation = new Poppler::TextAnnotation(qrand() % 2 == 0 ? Poppler::TextAnnotation::Linked : Poppler::TextAnnotation::InPlace);
+- break;
+- case 1:
+- annotation = new Poppler::HighlightAnnotation();
+- break;
+- case 2:
+- annotation = new Poppler::InkAnnotation();
+- break;
+- }
+-
+- annotation->setBoundary(QRectF(0.0, 0.0, 0.5, 0.5));
+- annotation->setContents("crazy");
+-
+- page->addAnnotation(annotation);
+-
+- delete annotation;
+- }
+-
+- if(qrand() % 2 == 0)
+- {
+- QMutexLocker mutexLocker(m_annotationMutex);
+-
+- for(int index = 0; index < m_document->numPages(); ++index)
+- {
+- PagePointer page(loadPage(m_document, index));
+-
+- QList< Poppler::Annotation* > annotations = page->annotations();
+-
+- if(!annotations.isEmpty())
+- {
+- qDebug() << "modify annotation...";
+-
+- annotations.at(qrand() % annotations.size())->setBoundary(QRectF(0.5, 0.5, 0.25, 0.25));
+- annotations.at(qrand() % annotations.size())->setAuthor("foo");
+- annotations.at(qrand() % annotations.size())->setContents("bar");
+- annotations.at(qrand() % annotations.size())->setCreationDate(QDateTime::currentDateTime());
+- annotations.at(qrand() % annotations.size())->setModificationDate(QDateTime::currentDateTime());
+- }
+-
+- qDeleteAll(annotations);
+-
+- if(!annotations.isEmpty())
+- {
+- break;
+- }
+- }
+- }
+-
+- if(qrand() % 2 == 0)
+- {
+- QMutexLocker mutexLocker(m_annotationMutex);
+-
+- for(int index = 0; index < m_document->numPages(); ++index)
+- {
+- PagePointer page(loadPage(m_document, index));
+-
+- QList< Poppler::Annotation* > annotations = page->annotations();
+-
+- if(!annotations.isEmpty())
+- {
+- qDebug() << "remove annotation...";
+-
+- page->removeAnnotation(annotations.takeAt(qrand() % annotations.size()));
+- }
+-
+- qDeleteAll(annotations);
+-
+- if(!annotations.isEmpty())
+- {
+- break;
+- }
+- }
+- }
+-
+- if(qrand() % 2 == 0)
+- {
+- qDebug() << "fonts...";
+-
+- m_document->fonts();
+- }
+- }
+-}
+-
+-int main(int argc, char** argv)
+-{
+- if(argc < 5)
+- {
+- qDebug() << "usage: stress-threads-qt duration sillyCount crazyCount file(s)";
+-
+- return EXIT_FAILURE;
+- }
+-
+- const int duration = atoi(argv[1]);
+- const int sillyCount = atoi(argv[2]);
+- const int crazyCount = atoi(argv[3]);
+-
+- qsrand(time(0));
+-
+- for(int argi = 4; argi < argc; ++argi)
+- {
+- const QString file = QFile::decodeName(argv[argi]);
+- Poppler::Document* document = Poppler::Document::load(file);
+-
+- if(document == 0)
+- {
+- qDebug() << "Could not load" << file;
+- continue;
+- }
+-
+- if(document->isLocked())
+- {
+- qDebug() << file << "is locked";
+- continue;
+- }
+-
+- for(int i = 0; i < sillyCount; ++i)
+- {
+- (new SillyThread(document))->start();
+- }
+-
+- QMutex* annotationMutex = new QMutex();
+-
+- for(int i = 0; i < crazyCount; ++i)
+- {
+- (new CrazyThread(qrand(), document, annotationMutex))->start();
+- }
+- }
+-
+- sleep(duration);
+-
+- return EXIT_SUCCESS;
+-}
+diff --git a/qt4/tests/test-password-qt4.cpp b/qt4/tests/test-password-qt4.cpp
+deleted file mode 100644
+index c961874d..00000000
+--- a/qt4/tests/test-password-qt4.cpp
++++ /dev/null
+@@ -1,136 +0,0 @@
+-#include <QtCore/QDebug>
+-#include <QtGui/QApplication>
+-#include <QtGui/QImage>
+-#include <QtGui/QPainter>
+-#include <QtGui/QPaintEvent>
+-#include <QtGui/QWidget>
+-
+-#include <poppler-qt4.h>
+-
+-class PDFDisplay : public QWidget // picture display widget
+-{
+-public:
+- PDFDisplay( Poppler::Document *d );
+- ~PDFDisplay();
+-protected:
+- void paintEvent( QPaintEvent * );
+- void keyPressEvent( QKeyEvent * );
+-private:
+- void display();
+- int m_currentPage;
+- QImage image;
+- Poppler::Document *doc;
+-};
+-
+-PDFDisplay::PDFDisplay( Poppler::Document *d )
+-{
+- doc = d;
+- m_currentPage = 0;
+- display();
+-}
+-
+-void PDFDisplay::display()
+-{
+- if (doc) {
+- Poppler::Page *page = doc->page(m_currentPage);
+- if (page) {
+- qDebug() << "Displaying page: " << m_currentPage;
+- image = page->renderToImage();
+- update();
+- delete page;
+- }
+- } else {
+- qWarning() << "doc not loaded";
+- }
+-}
+-
+-PDFDisplay::~PDFDisplay()
+-{
+- delete doc;
+-}
+-
+-void PDFDisplay::paintEvent( QPaintEvent *e )
+-{
+- QPainter paint( this ); // paint widget
+- if (!image.isNull()) {
+- paint.drawImage(0, 0, image);
+- } else {
+- qWarning() << "null image";
+- }
+-}
+-
+-void PDFDisplay::keyPressEvent( QKeyEvent *e )
+-{
+- if (e->key() == Qt::Key_Down)
+- {
+- if (m_currentPage + 1 < doc->numPages())
+- {
+- m_currentPage++;
+- display();
+- }
+- }
+- else if (e->key() == Qt::Key_Up)
+- {
+- if (m_currentPage > 0)
+- {
+- m_currentPage--;
+- display();
+- }
+- }
+- else if (e->key() == Qt::Key_Q)
+- {
+- exit(0);
+- }
+-}
+-
+-int main( int argc, char **argv )
+-{
+- QApplication a( argc, argv ); // QApplication required!
+-
+- if ( argc != 3)
+- {
+- qWarning() << "usage: test-password-qt4 owner-password filename";
+- exit(1);
+- }
+-
+- Poppler::Document *doc = Poppler::Document::load(argv[2], argv[1]);
+- if (!doc)
+- {
+- qWarning() << "doc not loaded";
+- exit(1);
+- }
+-
+- // output some meta-data
+- int major = 0, minor = 0;
+- doc->getPdfVersion( &major, &minor );
+- qDebug() << " PDF Version: " << qPrintable(QString::fromLatin1("%1.%2").arg(major).arg(minor));
+- qDebug() << " Title: " << doc->info("Title");
+- qDebug() << " Subject: " << doc->info("Subject");
+- qDebug() << " Author: " << doc->info("Author");
+- qDebug() << " Key words: " << doc->info("Keywords");
+- qDebug() << " Creator: " << doc->info("Creator");
+- qDebug() << " Producer: " << doc->info("Producer");
+- qDebug() << " Date created: " << doc->date("CreationDate").toString();
+- qDebug() << " Date modified: " << doc->date("ModDate").toString();
+- qDebug() << "Number of pages: " << doc->numPages();
+- qDebug() << " Linearised: " << doc->isLinearized();
+- qDebug() << " Encrypted: " << doc->isEncrypted();
+- qDebug() << " OK to print: " << doc->okToPrint();
+- qDebug() << " OK to copy: " << doc->okToCopy();
+- qDebug() << " OK to change: " << doc->okToChange();
+- qDebug() << "OK to add notes: " << doc->okToAddNotes();
+- qDebug() << " Page mode: " << doc->pageMode();
+- QStringList fontNameList;
+- foreach( const Poppler::FontInfo &font, doc->fonts() )
+- fontNameList += font.name();
+- qDebug() << " Fonts: " << fontNameList.join( ", " );
+-
+- Poppler::Page *page = doc->page(0);
+- qDebug() << " Page 1 size: " << page->pageSize().width()/72 << "inches x " << page->pageSize().height()/72 << "inches";
+-
+- PDFDisplay test( doc ); // create picture display
+- test.setWindowTitle("Poppler-Qt4 Test");
+- test.show(); // show it
+-
+- return a.exec(); // start event loop
+-}
+diff --git a/qt4/tests/test-poppler-qt4.cpp b/qt4/tests/test-poppler-qt4.cpp
+deleted file mode 100644
+index ae6b11f3..00000000
+--- a/qt4/tests/test-poppler-qt4.cpp
++++ /dev/null
+@@ -1,235 +0,0 @@
+-#include <QtCore/QDebug>
+-#include <QtCore/QFile>
+-#include <QtGui/QApplication>
+-#include <QtGui/QImage>
+-#include <QtGui/QLabel>
+-#include <QtGui/QMouseEvent>
+-#include <QtGui/QPainter>
+-#include <QtGui/QPaintEvent>
+-#include <QtGui/QToolTip>
+-#include <QtGui/QWidget>
+-
+-#include <poppler-qt4.h>
+-
+-class PDFDisplay : public QWidget // picture display widget
+-{
+-public:
+- PDFDisplay( Poppler::Document *d, bool arthur );
+- ~PDFDisplay();
+- void setShowTextRects(bool show);
+- void display();
+-protected:
+- void paintEvent( QPaintEvent * );
+- void keyPressEvent( QKeyEvent * );
+- void mousePressEvent( QMouseEvent * );
+-private:
+- int m_currentPage;
+- QImage image;
+- Poppler::Document *doc;
+- QString backendString;
+- bool showTextRects;
+- QList<Poppler::TextBox*> textRects;
+-};
+-
+-PDFDisplay::PDFDisplay( Poppler::Document *d, bool arthur )
+-{
+- showTextRects = false;
+- doc = d;
+- m_currentPage = 0;
+- if (arthur)
+- {
+- backendString = "Arthur";
+- doc->setRenderBackend(Poppler::Document::ArthurBackend);
+- }
+- else
+- {
+- backendString = "Splash";
+- doc->setRenderBackend(Poppler::Document::SplashBackend);
+- }
+- doc->setRenderHint(Poppler::Document::Antialiasing, true);
+- doc->setRenderHint(Poppler::Document::TextAntialiasing, true);
+-}
+-
+-void PDFDisplay::setShowTextRects(bool show)
+-{
+- showTextRects = show;
+-}
+-
+-void PDFDisplay::display()
+-{
+- if (doc) {
+- Poppler::Page *page = doc->page(m_currentPage);
+- if (page) {
+- qDebug() << "Displaying page using" << backendString << "backend: " << m_currentPage;
+- QTime t = QTime::currentTime();
+- image = page->renderToImage();
+- qDebug() << "Rendering took" << t.msecsTo(QTime::currentTime()) << "msecs";
+- qDeleteAll(textRects);
+- if (showTextRects)
+- {
+- QPainter painter(&image);
+- painter.setPen(Qt::red);
+- textRects = page->textList();
+- foreach(Poppler::TextBox *tb, textRects)
+- {
+- painter.drawRect(tb->boundingBox());
+- }
+- }
+- else textRects.clear();
+- update();
+- delete page;
+- }
+- } else {
+- qWarning() << "doc not loaded";
+- }
+-}
+-
+-PDFDisplay::~PDFDisplay()
+-{
+- qDeleteAll(textRects);
+- delete doc;
+-}
+-
+-void PDFDisplay::paintEvent( QPaintEvent *e )
+-{
+- QPainter paint( this ); // paint widget
+- if (!image.isNull()) {
+- paint.drawImage(0, 0, image);
+- } else {
+- qWarning() << "null image";
+- }
+-}
+-
+-void PDFDisplay::keyPressEvent( QKeyEvent *e )
+-{
+- if (e->key() == Qt::Key_Down)
+- {
+- if (m_currentPage + 1 < doc->numPages())
+- {
+- m_currentPage++;
+- display();
+- }
+- }
+- else if (e->key() == Qt::Key_Up)
+- {
+- if (m_currentPage > 0)
+- {
+- m_currentPage--;
+- display();
+- }
+- }
+- else if (e->key() == Qt::Key_Q)
+- {
+- exit(0);
+- }
+-}
+-
+-void PDFDisplay::mousePressEvent( QMouseEvent *e )
+-{
+- int i = 0;
+- foreach(Poppler::TextBox *tb, textRects)
+- {
+- if (tb->boundingBox().contains(e->pos()))
+- {
+- QString tt = QString("Text: \"%1\"\nIndex in text list: %2").arg(tb->text()).arg(i);
+- QToolTip::showText(e->globalPos(), tt, this);
+- break;
+- }
+- ++i;
+- }
+-}
+-
+-int main( int argc, char **argv )
+-{
+- QApplication a( argc, argv ); // QApplication required!
+-
+- if ( argc < 2 ||
+- (argc == 3 && strcmp(argv[2], "-extract") != 0 && strcmp(argv[2], "-arthur") != 0 && strcmp(argv[2], "-textRects") != 0) ||
+- argc > 3)
+- {
+- // use argument as file name
+- qWarning() << "usage: test-poppler-qt4 filename [-extract|-arthur|-textRects]";
+- exit(1);
+- }
+-
+- Poppler::Document *doc = Poppler::Document::load(QFile::decodeName(argv[1]));
+- if (!doc)
+- {
+- qWarning() << "doc not loaded";
+- exit(1);
+- }
+-
+- if (doc->isLocked())
+- {
+- qWarning() << "document locked (needs password)";
+- exit(0);
+- }
+-
+- // output some meta-data
+- int major = 0, minor = 0;
+- doc->getPdfVersion( &major, &minor );
+- qDebug() << " PDF Version: " << qPrintable(QString::fromLatin1("%1.%2").arg(major).arg(minor));
+- qDebug() << " Title: " << doc->info("Title");
+- qDebug() << " Subject: " << doc->info("Subject");
+- qDebug() << " Author: " << doc->info("Author");
+- qDebug() << " Key words: " << doc->info("Keywords");
+- qDebug() << " Creator: " << doc->info("Creator");
+- qDebug() << " Producer: " << doc->info("Producer");
+- qDebug() << " Date created: " << doc->date("CreationDate").toString();
+- qDebug() << " Date modified: " << doc->date("ModDate").toString();
+- qDebug() << "Number of pages: " << doc->numPages();
+- qDebug() << " Linearised: " << doc->isLinearized();
+- qDebug() << " Encrypted: " << doc->isEncrypted();
+- qDebug() << " OK to print: " << doc->okToPrint();
+- qDebug() << " OK to copy: " << doc->okToCopy();
+- qDebug() << " OK to change: " << doc->okToChange();
+- qDebug() << "OK to add notes: " << doc->okToAddNotes();
+- qDebug() << " Page mode: " << doc->pageMode();
+- qDebug() << " Metadata: " << doc->metadata();
+-
+- if ( doc->hasEmbeddedFiles() ) {
+- qDebug() << "Embedded files:";
+- foreach( Poppler::EmbeddedFile *file, doc->embeddedFiles() ) {
+- qDebug() << " " << file->name();
+- }
+- qDebug();
+- } else {
+- qDebug() << "No embedded files";
+- }
+-
+- if (doc->numPages() <= 0)
+- {
+- delete doc;
+- qDebug() << "Doc has no pages";
+- return 0;
+- }
+-
+- Poppler::Page *page = doc->page(0);
+- if (page)
+- {
+- qDebug() << "Page 1 size: " << page->pageSize().width()/72 << "inches x " << page->pageSize().height()/72 << "inches";
+- delete page;
+- }
+-
+- if (argc == 2 || (argc == 3 && strcmp(argv[2], "-arthur") == 0) || (argc == 3 && strcmp(argv[2], "-textRects") == 0))
+- {
+- bool useArthur = (argc == 3 && strcmp(argv[2], "-arthur") == 0);
+- PDFDisplay test( doc, useArthur ); // create picture display
+- test.setWindowTitle("Poppler-Qt4 Test");
+- test.setShowTextRects(argc == 3 && strcmp(argv[2], "-textRects") == 0);
+- test.display();
+- test.show(); // show it
+-
+- return a.exec(); // start event loop
+- }
+- else
+- {
+- Poppler::Page *page = doc->page(0);
+-
+- QLabel *l = new QLabel(page->text(QRectF()), 0);
+- l->show();
+- delete page;
+- delete doc;
+- return a.exec();
+- }
+-}
+diff --git a/qt4/tests/test-render-to-file.cpp b/qt4/tests/test-render-to-file.cpp
+deleted file mode 100644
+index b01aa03c..00000000
+--- a/qt4/tests/test-render-to-file.cpp
++++ /dev/null
+@@ -1,69 +0,0 @@
+-#include <QtCore/QDebug>
+-#include <QtCore/QFile>
+-#include <QtGui/QApplication>
+-#include <QtGui/QImage>
+-
+-#include <poppler-qt4.h>
+-
+-int main( int argc, char **argv )
+-{
+- QApplication a( argc, argv ); // QApplication required!
+-
+- if ( argc < 2 ||
+- (argc == 3 && strcmp(argv[2], "-arthur") != 0) ||
+- argc > 3)
+- {
+- // use argument as file name
+- qWarning() << "usage: test-poppler-qt4 filename [-arthur]";
+- exit(1);
+- }
+-
+- Poppler::Document *doc = Poppler::Document::load(QFile::decodeName(argv[1]));
+- if (!doc)
+- {
+- qWarning() << "doc not loaded";
+- exit(1);
+- }
+-
+- if (doc->isLocked())
+- {
+- qWarning() << "document locked (needs password)";
+- exit(0);
+- }
+-
+- if (doc->numPages() <= 0)
+- {
+- delete doc;
+- qDebug() << "Doc has no pages";
+- return 0;
+- }
+-
+- QString backendString;
+- if (argc == 3 && strcmp(argv[2], "-arthur") == 0)
+- {
+- backendString = "Arthur";
+- doc->setRenderBackend(Poppler::Document::ArthurBackend);
+- }
+- else
+- {
+- backendString = "Splash";
+- doc->setRenderBackend(Poppler::Document::SplashBackend);
+- }
+- doc->setRenderHint(Poppler::Document::Antialiasing, true);
+- doc->setRenderHint(Poppler::Document::TextAntialiasing, true);
+-
+- for (int i = 0; i < doc->numPages(); ++i)
+- {
+- Poppler::Page *page = doc->page(i);
+- if (page) {
+- qDebug() << "Rendering page using" << backendString << "backend: " << i;
+- QTime t = QTime::currentTime();
+- QImage image = page->renderToImage();
+- qDebug() << "Rendering took" << t.msecsTo(QTime::currentTime()) << "msecs";
+- image.save(QString("test-rennder-to-file%1.ppm").arg(i));
+- delete page;
+- }
+- }
+-
+- return 0;
+-}
+
diff --git a/deps/poppler/poppler.splashpath.h.revert.diff b/deps/poppler/poppler.splashpath.h.revert.diff
new file mode 100644
index 0000000..6408606
--- /dev/null
+++ b/deps/poppler/poppler.splashpath.h.revert.diff
@@ -0,0 +1,42 @@
+--- ./splash/SplashPath.h.orig 2018-03-18 13:23:49.000000000 -0500
++++ ./splash/SplashPath.h 2017-12-03 13:25:06.000000000 -0600
+@@ -4,20 +4,6 @@
+ //
+ //========================================================================
+
+-//========================================================================
+-//
+-// Modified under the Poppler project - http://poppler.freedesktop.org
+-//
+-// All changes made under the Poppler project to this file are licensed
+-// under GPL version 2 or later
+-//
+-// Copyright (C) 2018 Albert Astals Cid <aacid@kde.org>
+-//
+-// To see a description of the changes please see the Changelog file that
+-// came with your tarball or type make ChangeLog if you are building from git
+-//
+-//========================================================================
+-
+ #ifndef SPLASHPATH_H
+ #define SPLASHPATH_H
+
+@@ -76,9 +62,6 @@
+
+ ~SplashPath();
+
+- SplashPath(const SplashPath&) = delete;
+- SplashPath& operator=(const SplashPath&) = delete;
+-
+ // Append <path> to <this>.
+ void append(SplashPath *path);
+
+@@ -133,6 +116,8 @@
+
+ friend class SplashXPath;
+ friend class Splash;
++ // this is a temporary hack, until we read FreeType paths directly
++ friend class ArthurOutputDev;
+ };
+
+ #endif
diff --git a/deps/qca-qt5/.url b/deps/qca-qt5/.url
index e63affd..f3dd020 100644
--- a/deps/qca-qt5/.url
+++ b/deps/qca-qt5/.url
@@ -1,2 +1,2 @@
-http://download.kde.org/stable/qca/2.1.1/src/qca-2.1.1.tar.xz
+https://download.kde.org/stable/qca/2.1.3/src/qca-2.1.3.tar.xz
diff --git a/deps/qca-qt5/qca-qt5.SlackBuild b/deps/qca-qt5/qca-qt5.SlackBuild
index 26e8990..dc8b76c 100755
--- a/deps/qca-qt5/qca-qt5.SlackBuild
+++ b/deps/qca-qt5/qca-qt5.SlackBuild
@@ -1,7 +1,7 @@
#!/bin/sh
# Copyright 2015 Patrick J. Volkerding, Sebeka, MN, USA
-# Copyright 2015, 2016 Eric Hameleers, Eindhoven, NL
+# Copyright 2015, 2016, 2017 Eric Hameleers, Eindhoven, NL
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -23,14 +23,14 @@
PKGNAM=qca-qt5
SRCNAM=qca
-VERSION=${VERSION:-2.1.1}
-BUILD=${BUILD:-5}
+VERSION=${VERSION:-2.1.3}
+BUILD=${BUILD:-2}
NUMJOBS=${NUMJOBS:--j6}
# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
case "$(uname -m)" in
- i?86) ARCH=i486 ;;
+ i?86) ARCH=i586 ;;
arm*) readelf /usr/bin/file -A | egrep -q "Tag_CPU.*[4,5]" && ARCH=arm || ARCH=armv7hl ;;
# Unless $ARCH is already set, use uname -m for all other archs:
*) ARCH=$(uname -m) ;;
@@ -41,6 +41,9 @@ fi
if [ "$ARCH" = "i486" ]; then
SLKCFLAGS="-O2 -march=i486 -mtune=i686"
LIBDIRSUFFIX=""
+elif [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
+ LIBDIRSUFFIX=""
elif [ "$ARCH" = "s390" ]; then
SLKCFLAGS="-O2"
LIBDIRSUFFIX=""
@@ -67,6 +70,8 @@ find . \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \;
+# Note: Slackware already has the qt4 build of this,
+# it needs "-DQT4_BUILD=ON" as aditional cmake parameter.
mkdir -p build
cd build
cmake \
@@ -87,7 +92,7 @@ cd -
find $PKG | xargs file | grep -e "executable" -e "shared object" \
| grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
-mv $PKG/usr/share/man $PKG/usr/
+#mv $PKG/usr/share/man $PKG/usr/
gzip -9 $PKG/usr/man/man?/*.1
mkdir -p $PKG/usr/doc/$PKGNAM-$VERSION
diff --git a/deps/qrencode/.url b/deps/qrencode/.url
new file mode 100644
index 0000000..17eab4d
--- /dev/null
+++ b/deps/qrencode/.url
@@ -0,0 +1 @@
+http://fukuchi.org/works/qrencode/qrencode-3.4.4.tar.gz
diff --git a/deps/qrencode/qrencode.SlackBuild b/deps/qrencode/qrencode.SlackBuild
new file mode 100755
index 0000000..acb351f
--- /dev/null
+++ b/deps/qrencode/qrencode.SlackBuild
@@ -0,0 +1,127 @@
+#!/bin/sh
+
+# Copyright 2017 Patrick J. Volkerding, Sebeka, MN, USA
+# Copyright 2014, 2017 Eric Hameleers, Eindhoven, NL
+# All rights reserved.
+#
+# Permission to use, copy, modify, and distribute this software for
+# any purpose with or without fee is hereby granted, provided that
+# the above copyright notice and this permission notice appear in all
+# copies.
+#
+# THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+# IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
+# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+# USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+# OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+# SUCH DAMAGE.
+# -----------------------------------------------------------------------------
+
+
+PKGNAM=qrencode
+VERSION=${VERSION:-3.4.4}
+BUILD=${BUILD:-1}
+NUMJOBS=${NUMJOBS:-" -j4 "}
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+PKG=$TMP/package-$PKGNAM
+
+# Automatically determine the architecture we're building on:
+MARCH=$( uname -m )
+if [ -z "$ARCH" ]; then
+ case "$MARCH" in
+ i?86) export ARCH=i486 ;;
+ armv7hl) export ARCH=$MARCH ;;
+ armv6hl) export ARCH=$MARCH ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$MARCH ;;
+ esac
+fi
+
+case "$ARCH" in
+ i486) SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+ SLKLDFLAGS=""; LIBDIRSUFFIX=""
+ ;;
+ x86_64) SLKCFLAGS="-O2 -fPIC"
+ SLKLDFLAGS="-L/usr/lib64"; LIBDIRSUFFIX="64"
+ ;;
+ armv7hl) SLKCFLAGS="-O2 -march=armv7-a -mfpu=vfpv3-d16"
+ SLKLDFLAGS=""; LIBDIRSUFFIX=""
+ ;;
+ armv6hl) SLKCFLAGS="-O2 -march=armv6 -mfpu=vfp -mfloat-abi=hard"
+ SLKLDFLAGS=""; LIBDIRSUFFIX=""
+ ;;
+ *) SLKCFLAGS=${SLKCFLAGS:-"O2"}
+ SLKLDFLAGS=${SLKLDFLAGS:-""}; LIBDIRSUFFIX=${LIBDIRSUFFIX:-""}
+ ;;
+esac
+
+case "$ARCH" in
+ arm*) TARGET=$ARCH-slackware-linux-gnueabi ;;
+ *) TARGET=$ARCH-slackware-linux ;;
+esac
+
+rm -rf $PKG
+mkdir -p $TMP $PKG
+cd $TMP
+rm -rf $PKGNAM-$VERSION
+tar xvf $CWD/$PKGNAM-$VERSION.tar.gz || exit 1
+cd $PKGNAM-$VERSION || exit 1
+chown -R root:root .
+find -L . \
+ \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \;
+
+LDFLAGS="$SLKLDFLAGS" \
+CXXFLAGS="$SLKCFLAGS" \
+CFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --mandir=/usr/man \
+ --docdir=/usr/doc/$PKGNAM-$VERSION \
+ --localstatedir=/var \
+ --sysconfdir=/etc \
+ --without-tests \
+ --program-prefix= \
+ --program-suffix= \
+ --build=$TARGET
+
+# Build and install:
+make $NUMJOBS || make || exit 1
+make DESTDIR=$PKG install || exit 1
+
+# Add documentation:
+mkdir -p $PKG/usr/doc/$PKGNAM-$VERSION
+cp -a \
+ COPYING ChangeLog NEWS README TODO \
+ $PKG/usr/doc/$PKGNAM-$VERSION
+
+# Compress the man page(s):
+if [ -d $PKG/usr/man ]; then
+ find $PKG/usr/man -type f -name "*.?" -exec gzip -9f {} \;
+ for i in $(find $PKG/usr/man -type l -name "*.?") ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
+fi
+
+# Strip binaries (if any):
+find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
+ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
+
+# Add a package description:
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+# Build the package:
+cd $PKG
+/sbin/makepkg -l y -c n $TMP/${PKGNAM}-${VERSION}-${ARCH}-${BUILD}.txz
+
diff --git a/deps/qrencode/slack-desc b/deps/qrencode/slack-desc
new file mode 100644
index 0000000..fb67fee
--- /dev/null
+++ b/deps/qrencode/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|'
+# on the right side marks the last column you can put a character in. You must
+# make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':' except on otherwise blank lines.
+
+ |-----handy-ruler------------------------------------------------------|
+qrencode: qrencode (library for encoding data into QR Code)
+qrencode:
+qrencode: Libqrencode is a library for encoding data in a QR Code symbol,
+qrencode: a kind of 2D symbology that can be scanned by handy terminals such as
+qrencode: a mobile phone with CCD.
+qrencode: The capacity of QR Code is up to 7000 digits or 4000 characters,
+qrencode: and has high robustness.
+qrencode:
+qrencode:
+qrencode: qrencode home: http://fukuchi.org/works/qrencode/index.en.html
+qrencode:
diff --git a/deps/qt-gstreamer/qt-gstreamer.SlackBuild b/deps/qt-gstreamer/qt-gstreamer.SlackBuild
index 2470b81..9fb80a2 100755
--- a/deps/qt-gstreamer/qt-gstreamer.SlackBuild
+++ b/deps/qt-gstreamer/qt-gstreamer.SlackBuild
@@ -1,7 +1,7 @@
#!/bin/sh
# Copyright 2014, 2015 Patrick J. Volkerding, Sebeka, MN, USA
-# Copyright 2014, 2015, 2016 Eric Hameleers, Eindhoven, NL
+# Copyright 2014, 2015, 2016, 2017 Eric Hameleers, Eindhoven, NL
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -24,7 +24,7 @@
PKGNAM=qt-gstreamer
VERSION=${VERSION:-1.2.0}
-BUILD=${BUILD:-5}
+BUILD=${BUILD:-6}
NUMJOBS=${NUMJOBS:--j7}
@@ -32,7 +32,7 @@ NUMJOBS=${NUMJOBS:--j7}
MARCH=$( uname -m )
if [ -z "$ARCH" ]; then
case "$MARCH" in
- i?86) export ARCH=i486 ;;
+ i?86) export ARCH=i586 ;;
armv7hl) export ARCH=$MARCH ;;
arm*) export ARCH=arm ;;
# Unless $ARCH is already set, use uname -m for all other archs:
@@ -43,6 +43,9 @@ fi
if [ "$ARCH" = "i486" ]; then
SLKCFLAGS="-O2 -march=i486 -mtune=i686"
LIBDIRSUFFIX=""
+elif [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
+ LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
LIBDIRSUFFIX=""
diff --git a/deps/qt5-webkit/.url b/deps/qt5-webkit/.url
index 46f309b..0924d34 100644
--- a/deps/qt5-webkit/.url
+++ b/deps/qt5-webkit/.url
@@ -1 +1 @@
-http://download.qt.io/community_releases/5.6/5.6.1/qtwebkit-opensource-src-5.6.1.tar.xz
+http://download.qt.io/official_releases/qt/5.9/5.9.1/submodules/qtwebkit-opensource-src-5.9.1.tar.xz
diff --git a/deps/qt5-webkit/patches/qt5-webkit.gcc7.patch b/deps/qt5-webkit/patches/qt5-webkit.gcc7.patch
new file mode 100644
index 0000000..bddb6fc
--- /dev/null
+++ b/deps/qt5-webkit/patches/qt5-webkit.gcc7.patch
@@ -0,0 +1,34 @@
+diff -u -r webkitgtk-2.16.5/Source/WTF/wtf/text/StringImpl.h webkitgtk-2.16.5-gcc7/Source/WTF/wtf/text/StringImpl.h
+--- webkitgtk-2.16.5/Source/WTF/wtf/text/StringImpl.h 2017-02-20 17:20:15.000000000 +0100
++++ webkitgtk-2.16.5-gcc7/Source/WTF/wtf/text/StringImpl.h 2017-06-27 13:13:57.801527350 +0200
+@@ -581,29 +581,7 @@
+ // FIXME: Does this really belong in StringImpl?
+ template <typename T> static void copyChars(T* destination, const T* source, unsigned numCharacters)
+ {
+- if (numCharacters == 1) {
+- *destination = *source;
+- return;
+- }
+-
+- if (numCharacters <= s_copyCharsInlineCutOff) {
+- unsigned i = 0;
+-#if (CPU(X86) || CPU(X86_64))
+- const unsigned charsPerInt = sizeof(uint32_t) / sizeof(T);
+-
+- if (numCharacters > charsPerInt) {
+- unsigned stopCount = numCharacters & ~(charsPerInt - 1);
+-
+- const uint32_t* srcCharacters = reinterpret_cast<const uint32_t*>(source);
+- uint32_t* destCharacters = reinterpret_cast<uint32_t*>(destination);
+- for (unsigned j = 0; i < stopCount; i += charsPerInt, ++j)
+- destCharacters[j] = srcCharacters[j];
+- }
+-#endif
+- for (; i < numCharacters; ++i)
+- destination[i] = source[i];
+- } else
+- memcpy(destination, source, numCharacters * sizeof(T));
++ memcpy(destination, source, numCharacters * sizeof(T));
+ }
+
+ ALWAYS_INLINE static void copyChars(UChar* destination, const LChar* source, unsigned numCharacters)
diff --git a/deps/qt5-webkit/patches/qt5-webkit.icu59.patch b/deps/qt5-webkit/patches/qt5-webkit.icu59.patch
new file mode 100644
index 0000000..3eb73b2
--- /dev/null
+++ b/deps/qt5-webkit/patches/qt5-webkit.icu59.patch
@@ -0,0 +1,80 @@
+Submitted by: DJ Lucas (dj_AT_linuxfromscratch_DOT_org)
+Date: 2017-04-29
+Initial Package Version: 5.8.0
+Upstream Status: Unknown
+Origin: https://bugreports.qt.io/browse/QTBUG-35971
+Description: Fixes build with icu-59.
+
+diff -Naurp qtwebkit-opensource-src-5.8.0-orig/Source/JavaScriptCore/API/JSStringRef.h qtwebkit-opensource-src-5.8.0/Source/JavaScriptCore/API/JSStringRef.h
+--- qtwebkit-opensource-src-5.8.0-orig/Source/JavaScriptCore/API/JSStringRef.h 2016-12-10 10:32:34.000000000 -0600
++++ qtwebkit-opensource-src-5.8.0/Source/JavaScriptCore/API/JSStringRef.h 2017-04-29 17:03:35.280465079 -0500
+@@ -32,6 +32,7 @@
+ #include <stdbool.h>
+ #endif
+ #include <stddef.h> /* for size_t */
++#include <uchar.h>
+
+ #ifdef __cplusplus
+ extern "C" {
+@@ -43,7 +44,7 @@ extern "C" {
+ @typedef JSChar
+ @abstract A Unicode character.
+ */
+- typedef unsigned short JSChar;
++ typedef char16_t JSChar;
+ #else
+ typedef wchar_t JSChar;
+ #endif
+diff -Naurp qtwebkit-opensource-src-5.8.0-orig/Source/WTF/wtf/Compiler.h qtwebkit-opensource-src-5.8.0/Source/WTF/wtf/Compiler.h
+--- qtwebkit-opensource-src-5.8.0-orig/Source/WTF/wtf/Compiler.h 2016-12-10 10:32:34.000000000 -0600
++++ qtwebkit-opensource-src-5.8.0/Source/WTF/wtf/Compiler.h 2017-04-29 17:03:35.280465079 -0500
+@@ -61,6 +61,7 @@
+ #define WTF_COMPILER_SUPPORTS_HAS_TRIVIAL_DESTRUCTOR __has_feature(has_trivial_destructor)
+ #define WTF_COMPILER_SUPPORTS_CXX_STRONG_ENUMS __has_feature(cxx_strong_enums)
+ #define WTF_COMPILER_SUPPORTS_CXX_REFERENCE_QUALIFIED_FUNCTIONS __has_feature(cxx_reference_qualified_functions)
++#define WTF_COMPILER_SUPPORTS_CXX_NEW_CHAR_TYPES !defined(_LIBCPP_HAS_NO_UNICODE_CHARS)
+
+ #endif
+
+@@ -142,6 +143,7 @@
+ #define WTF_COMPILER_SUPPORTS_CXX_DELETED_FUNCTIONS 1
+ #endif
+ #if GCC_VERSION_AT_LEAST(4, 5, 0)
++#define WTF_COMPILER_SUPPORTS_CXX_NEW_CHAR_TYPES 1
+ #define WTF_COMPILER_SUPPORTS_CXX_EXPLICIT_CONVERSIONS 1
+ #endif
+ #if GCC_VERSION_AT_LEAST(4, 6, 0)
+diff -Naurp qtwebkit-opensource-src-5.8.0-orig/Source/WTF/wtf/TypeTraits.h qtwebkit-opensource-src-5.8.0/Source/WTF/wtf/TypeTraits.h
+--- qtwebkit-opensource-src-5.8.0-orig/Source/WTF/wtf/TypeTraits.h 2016-12-10 10:32:34.000000000 -0600
++++ qtwebkit-opensource-src-5.8.0/Source/WTF/wtf/TypeTraits.h 2017-04-29 17:03:35.280465079 -0500
+@@ -75,6 +75,10 @@ namespace WTF {
+ #if !COMPILER(MSVC) || defined(_NATIVE_WCHAR_T_DEFINED)
+ template<> struct IsInteger<wchar_t> { static const bool value = true; };
+ #endif
++#if COMPILER_SUPPORTS(CXX_NEW_CHAR_TYPES)
++ template<> struct IsInteger<char16_t> { static const bool value = true; };
++ template<> struct IsInteger<char32_t> { static const bool value = true; };
++#endif
+
+ template<typename T> struct IsFloatingPoint { static const bool value = false; };
+ template<> struct IsFloatingPoint<float> { static const bool value = true; };
+diff -Naurp qtwebkit-opensource-src-5.8.0-orig/Source/WebKit2/Shared/API/c/WKString.h qtwebkit-opensource-src-5.8.0/Source/WebKit2/Shared/API/c/WKString.h
+--- qtwebkit-opensource-src-5.8.0-orig/Source/WebKit2/Shared/API/c/WKString.h 2016-12-10 10:32:34.000000000 -0600
++++ qtwebkit-opensource-src-5.8.0/Source/WebKit2/Shared/API/c/WKString.h 2017-04-29 17:03:35.280465079 -0500
+@@ -31,6 +31,7 @@
+ #ifndef __cplusplus
+ #include <stdbool.h>
+ #endif
++#include <uchar.h>
+
+ #ifdef __cplusplus
+ extern "C" {
+@@ -38,7 +39,7 @@ extern "C" {
+
+ #if !defined(WIN32) && !defined(_WIN32) \
+ && !((defined(__CC_ARM) || defined(__ARMCC__)) && !defined(__linux__)) /* RVCT */
+- typedef unsigned short WKChar;
++ typedef char16_t WKChar;
+ #else
+ typedef wchar_t WKChar;
+ #endif
diff --git a/deps/qt5-webkit/qt5-webkit.SlackBuild b/deps/qt5-webkit/qt5-webkit.SlackBuild
index 59e9b9b..721b79d 100755
--- a/deps/qt5-webkit/qt5-webkit.SlackBuild
+++ b/deps/qt5-webkit/qt5-webkit.SlackBuild
@@ -22,18 +22,18 @@
# Derived from the qt5.SlackBuild
-# Modifications for qt5-webkit 5.6.0, 5.6.1, 5.7.0 2016 by Eric Hameleers, Eindhoven, NL
+# Modifications for qt5-webkit 5.6.0, 5.6.1, 5.7.0, 5.7.1, 5.9.0, 5.9.1 2016,2017 by Eric Hameleers, Eindhoven, NL
PKGNAM=qt5-webkit
-VERSION=${VERSION:-5.7.0}
-BUILD=${BUILD:-1}
+VERSION=${VERSION:-5.9.1}
+BUILD=${BUILD:-3}
NUMJOBS=${NUMJOBS:--j7}
# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
case "$(uname -m)" in
- i?86) ARCH=i486 ;;
+ i?86) ARCH=i586 ;;
arm*) readelf /usr/bin/file -A | egrep -q "Tag_CPU.*[4,5]" && ARCH=arm || ARCH=armv7hl ;;
# Unless $ARCH is already set, use uname -m for all other archs:
*) ARCH=$(uname -m) ;;
@@ -45,6 +45,10 @@ if [ "$ARCH" = "i486" ]; then
SLKCFLAGS="-O2 -march=i486 -mtune=i686"
SLKLDFLAGS=""
LIBDIRSUFFIX=""
+elif [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
+ SLKLDFLAGS=""
+ LIBDIRSUFFIX=""
elif [ "$ARCH" = "s390" ]; then
SLKCFLAGS="-O2"
SLKLDFLAGS=""
@@ -84,8 +88,15 @@ echo "Extracting qtwebkit-opensource-src-$VERSION.tar.xz"
tar xf $CWD/qtwebkit-opensource-src-$VERSION.tar.xz || exit 1
cd qtwebkit-opensource-src-$VERSION || exit 1
-## Fix linking to pthread:
-#cat $CWD/patches/qt5-webkit.pthread.patch | patch -p1 --verbose || exit 1
+# Prevent crashes when compiled with gcc7:
+cat $CWD/patches/qt5-webkit.gcc7.patch | patch -p1 --verbose || exit 1
+
+## Prevent compile error against icu-59:
+#cat $CWD/patches/qt5-webkit.icu59.patch | patch -p1 --verbose || exit 1
+
+# Avoid literally thousands of unneeded warning messages (thanks BLFS):
+sed -e '/CONFIG/a QMAKE_CXXFLAGS += -Wno-expansion-to-defined' \
+ -i Tools/qmake/mkspecs/features/unix/default_pre.prf
chown -R root:root .
find . \
@@ -110,7 +121,7 @@ export LD_LIBRARY_PATH="${QTDIR}/qtbase/lib:${QTDIR}/qttools/lib:${LD_LIBRARY_PA
mkdir build
cd build
- qmake-qt5 ..
+ qmake-qt5 ../WebKit.pro
make || exit 1
make install INSTALL_ROOT=$PKG || exit 1
cd ..
@@ -134,9 +145,9 @@ sed -i \
find "$PKG/usr/lib${LIBDIRSUFFIX}" -type f -name '*.prl' \
-exec sed -i -e '/^QMAKE_PRL_BUILD_DIR/d;s/\(QMAKE_PRL_LIBS =\).*/\1/' {} \;
-# Fix the qmake path in pri file:
-sed -i "s,${QTDIR}/qtbase,/usr/lib${LIBDIRSUFFIX}/qt5," \
- $PKG/usr/lib${LIBDIRSUFFIX}/qt5/mkspecs/modules/qt_lib_bootstrap_private.pri
+## Fix the qmake path in pri file:
+#sed -i "s,${QTDIR}/qtbase,/usr/lib${LIBDIRSUFFIX}/qt5," \
+# $PKG/usr/lib${LIBDIRSUFFIX}/qt5/mkspecs/modules/qt_lib_bootstrap_private.pri
# Add a documentation directory:
mkdir -p $PKG/usr/doc/$PKGNAM-$VERSION
diff --git a/deps/qt5/.url b/deps/qt5/.url
index 34da870..5018bbc 100644
--- a/deps/qt5/.url
+++ b/deps/qt5/.url
@@ -1 +1 @@
-http://download.qt.io/official_releases/qt/5.7/5.7.0/single/qt-everywhere-opensource-src-5.7.0.tar.gz
+http://download.qt.io/official_releases/qt/5.9/5.9.6/single/qt-everywhere-opensource-src-5.9.6.tar.xz
diff --git a/deps/qt5/patches/qt5.cr206850.patch b/deps/qt5/patches/qt5.cr206850.patch
new file mode 100644
index 0000000..1fb71df
--- /dev/null
+++ b/deps/qt5/patches/qt5.cr206850.patch
@@ -0,0 +1,43 @@
+The latest MariaDB versions aren't caught properly by the checks in Qt, which
+may cause a regression to appear (regression, because it was already fixed in
+Qt by Dan Vratil): this manifests itself in Akonadi losing its connection to
+the database if running for long periods of time.
+
+Until this is fixed in Qt, you may want to apply this patch in your packages:
+
+https://codereview.qt-project.org/#/c/206850/
+
+From 64588c9bae92ef79f9ca5e87653ffb0962691d0d Mon Sep 17 00:00:00 2001
+From: Andy Shaw <andy.shaw@qt.io>
+Date: Wed, 27 Sep 2017 09:23:10 +0200
+Subject: [PATCH] Extend the MariaDB define check to cover the later versions too
+
+Change-Id: Ide89b4e07feb116bf152cbf3f5630d313e8ba0f1
+---
+ src/plugins/sqldrivers/mysql/qsql_mysql.cpp | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/plugins/sqldrivers/mysql/qsql_mysql.cpp b/src/plugins/sqldrivers/mysql/qsql_mysql.cpp
+index 6e428fb..b2d3e85 100644
+--- a/src/plugins/sqldrivers/mysql/qsql_mysql.cpp
++++ b/src/plugins/sqldrivers/mysql/qsql_mysql.cpp
+@@ -1159,14 +1159,14 @@ static void qLibraryInit()
+ # endif // MYSQL_VERSION_ID
+ #endif // Q_NO_MYSQL_EMBEDDED
+
+-#ifdef MARIADB_BASE_VERSION
++#if defined(MARIADB_BASE_VERSION) || defined(MARIADB_VERSION_ID)
+ qAddPostRoutine(mysql_server_end);
+ #endif
+ }
+
+ static void qLibraryEnd()
+ {
+-#if !defined(MARIADB_BASE_VERSION)
++#if !defined(MARIADB_BASE_VERSION) && !defined(MARIADB_VERSION_ID)
+ # if !defined(Q_NO_MYSQL_EMBEDDED)
+ # if MYSQL_VERSION_ID > 40000
+ # if (MYSQL_VERSION_ID >= 40110 && MYSQL_VERSION_ID < 50000) || MYSQL_VERSION_ID >= 50003
+--
+2.7.4
+
diff --git a/deps/qt5/patches/qt5.glibc224.patch b/deps/qt5/patches/qt5.glibc224.patch
new file mode 100644
index 0000000..773781a
--- /dev/null
+++ b/deps/qt5/patches/qt5.glibc224.patch
@@ -0,0 +1,33 @@
+From b12ffcd411d4776f7120ccecb3be34344d930d2b Mon Sep 17 00:00:00 2001
+From: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
+Date: Tue, 9 Aug 2016 16:21:29 +0200
+Subject: Do not depend on Linux 4.5
+
+Avoid using MADV_FREE that was only recently added to Linux. It will fail when
+run on older Linux kernels.
+
+Change-Id: I9b0369fb31402f088b2327c12f70dd39f5e4c8c0
+Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu>
+---
+ chromium/third_party/WebKit/Source/wtf/PageAllocator.cpp | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/src/3rdparty/chromium/third_party/WebKit/Source/wtf/PageAllocator.cpp b/src/3rdparty/chromium/third_party/WebKit/Source/wtf/PageAllocator.cpp
+index 121b687..be7c3b9 100644
+--- a/src/3rdparty/chromium/third_party/WebKit/Source/wtf/PageAllocator.cpp
++++ b/src/3rdparty/chromium/third_party/WebKit/Source/wtf/PageAllocator.cpp
+@@ -39,6 +39,11 @@
+
+ #include <sys/mman.h>
+
++#if OS(LINUX) && defined(MADV_FREE)
++// Added in Linux 4.5, but we don't want to depend on 4.5 at runtime
++#undef MADV_FREE
++#endif
++
+ #ifndef MADV_FREE
+ #define MADV_FREE MADV_DONTNEED
+ #endif
+--
+cgit v1.0-4-g1e03
+
diff --git a/deps/qt5/patches/qt5.mysql.h.diff b/deps/qt5/patches/qt5.mysql.h.diff
index 41dc9d3..f1cf11b 100644
--- a/deps/qt5/patches/qt5.mysql.h.diff
+++ b/deps/qt5/patches/qt5.mysql.h.diff
@@ -1,7 +1,6 @@
-diff -Naur qt-everywhere-opensource-src-5.1.0.orig/qtbase/src/sql/drivers/mysql/qsql_mysql_p.h qt-everywhere-opensource-src-5.1.0/qtbase/src/sql/drivers/mysql/qsql_mysql_p.h
---- qt-everywhere-opensource-src-5.1.0.orig/qtbase/src/sql/drivers/mysql/qsql_mysql_p.h 2013-07-02 07:09:52.000000000 +0000
-+++ qt-everywhere-opensource-src-5.1.0/qtbase/src/sql/drivers/mysql/qsql_mysql_p.h 2013-07-21 21:21:01.190172379 +0000
-@@ -60,7 +60,7 @@
+--- qt-everywhere-opensource-src-5.9.0/qtbase/src/plugins/sqldrivers/mysql/qsql_mysql_p.h.orig 2017-05-26 14:43:31.000000000 +0200
++++ qt-everywhere-opensource-src-5.9.0/qtbase/src/plugins/sqldrivers/mysql/qsql_mysql_p.h 2017-06-17 22:11:34.211899826 +0200
+@@ -57,7 +57,7 @@
#include <QtCore/qt_windows.h>
#endif
diff --git a/deps/qt5/patches/qt5.qtbug-49061.patch b/deps/qt5/patches/qt5.qtbug-49061.patch
new file mode 100644
index 0000000..d006edb
--- /dev/null
+++ b/deps/qt5/patches/qt5.qtbug-49061.patch
@@ -0,0 +1,80 @@
+#
+# https://github.com/qt/qtbase/commit/494376f9.patch
+#
+From 494376f980e96339b6f1eff7c41336ca4d853065 Mon Sep 17 00:00:00 2001
+From: Thiago Macieira <thiago.macieira@intel.com>
+Date: Thu, 12 Nov 2015 10:14:51 -0800
+Subject: [PATCH] Stop unloading plugins in QPluginLoader and QFactoryLoader
+
+QPluginLoader hasn't unloaded in its destructor since Qt 5.0, but we
+missed the equivalent code in QFactoryLoader (which bypasses
+QPluginLoader). Besides, QPluginLoader::unload() was still doing
+unloading, which it won't anymore.
+
+Not unloading plugins is Qt's policy, as decided during the 5.0
+development process and reaffirmed now in 5.6. This is due to static
+data in plugins leaking out and remaining in use past the unloading of
+the plugin, causing crashes.
+
+This does not affect QLibrary and QLibrary::unload(). Those are meant
+for non-Qt loadable modules, so unloading them may be safe.
+
+Task-number: QTBUG-49061
+Discussed-on: http://lists.qt-project.org/pipermail/development/2015-November/023681.html
+Change-Id: I461e9fc7199748faa187ffff1416070f138df8db
+Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
+Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
+---
+ src/corelib/plugin/qfactoryloader.cpp | 6 ++++--
+ src/corelib/plugin/qpluginloader.cpp | 5 +++--
+ 2 files changed, 7 insertions(+), 4 deletions(-)
+
+diff --git a/src/corelib/plugin/qfactoryloader.cpp b/src/corelib/plugin/qfactoryloader.cpp
+index 53b38c3..c820d53 100644
+--- a/src/corelib/plugin/qfactoryloader.cpp
++++ b/src/corelib/plugin/qfactoryloader.cpp
+@@ -203,10 +203,12 @@ void QFactoryLoader::update()
+ ++keyUsageCount;
+ }
+ }
+- if (keyUsageCount || keys.isEmpty())
++ if (keyUsageCount || keys.isEmpty()) {
++ library->setLoadHints(QLibrary::PreventUnloadHint); // once loaded, don't unload
+ d->libraryList += library;
+- else
++ } else {
+ library->release();
++ }
+ }
+ }
+ #else
+diff --git a/src/corelib/plugin/qpluginloader.cpp b/src/corelib/plugin/qpluginloader.cpp
+index 62067c7..4752f69 100644
+--- a/src/corelib/plugin/qpluginloader.cpp
++++ b/src/corelib/plugin/qpluginloader.cpp
+@@ -154,6 +154,7 @@ QPluginLoader::QPluginLoader(const QString &fileName, QObject *parent)
+ : QObject(parent), d(0), did_load(false)
+ {
+ setFileName(fileName);
++ setLoadHints(QLibrary::PreventUnloadHint);
+ }
+
+ /*!
+@@ -348,7 +349,7 @@ static QString locatePlugin(const QString& fileName)
+ void QPluginLoader::setFileName(const QString &fileName)
+ {
+ #if defined(QT_SHARED)
+- QLibrary::LoadHints lh;
++ QLibrary::LoadHints lh = QLibrary::PreventUnloadHint;
+ if (d) {
+ lh = d->loadHints();
+ d->release();
+@@ -394,7 +395,7 @@ QString QPluginLoader::errorString() const
+ \brief Give the load() function some hints on how it should behave.
+
+ You can give hints on how the symbols in the plugin are
+- resolved. By default, none of the hints are set.
++ resolved. By default since Qt 5.7, QLibrary::PreventUnloadHint is set.
+
+ See the documentation of QLibrary::loadHints for a complete
+ description of how this property works.
diff --git a/deps/qt5/patches/qt5.qtbug-51927.patch b/deps/qt5/patches/qt5.qtbug-51927.patch
new file mode 100644
index 0000000..d253dc1
--- /dev/null
+++ b/deps/qt5/patches/qt5.qtbug-51927.patch
@@ -0,0 +1,185 @@
+From 5149aa68eca6ede8836ec4f07a14d22d9da9b161 Mon Sep 17 00:00:00 2001
+From: Mitch Curtis <mitch.curtis@qt.io>
+Date: Tue, 13 Sep 2016 12:42:12 +0200
+Subject: Fix crash on exit when using default property aliases with layouts
+
+The layout was being destroyed before the text, which meant that the
+removeItemChangeListener() call never got hit. To ensure that the
+listener is always removed, loop through each child in QQuickLayout's
+destructor.
+
+This is a manual cherry-pick of
+59c6c0e0b1b5b46747595a58e11311b7393d7e70.
+
+Task-number: QTBUG-51927
+Change-Id: I669f42beb8c3dd6b4b741cae0b16e017bb3409df
+Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
+---
+ src/imports/layouts/qquicklayout.cpp | 4 ++
+ .../qquicklayouts/data/rowlayout/Container.qml | 55 ++++++++++++++++++++++
+ .../qquicklayouts/data/rowlayout/ContainerUser.qml | 53 +++++++++++++++++++++
+ .../quick/qquicklayouts/data/tst_rowlayout.qml | 12 +++++
+ 4 files changed, 124 insertions(+)
+ create mode 100644 tests/auto/quick/qquicklayouts/data/rowlayout/Container.qml
+ create mode 100644 tests/auto/quick/qquicklayouts/data/rowlayout/ContainerUser.qml
+
+diff --git a/src/imports/layouts/qquicklayout.cpp b/src/imports/layouts/qquicklayout.cpp
+index abc8f97..9914826 100644
+--- a/src/imports/layouts/qquicklayout.cpp
++++ b/src/imports/layouts/qquicklayout.cpp
+@@ -698,6 +698,10 @@ QQuickLayout::QQuickLayout(QQuickLayoutPrivate &dd, QQuickItem *parent)
+ QQuickLayout::~QQuickLayout()
+ {
+ d_func()->m_isReady = false;
++
++ const auto childItems = d_func()->childItems;
++ for (QQuickItem *child : childItems)
++ QQuickItemPrivate::get(child)->removeItemChangeListener(this, QQuickItemPrivate::SiblingOrder);
+ }
+
+ QQuickLayoutAttached *QQuickLayout::qmlAttachedProperties(QObject *object)
+diff --git a/tests/auto/quick/qquicklayouts/data/rowlayout/Container.qml b/tests/auto/quick/qquicklayouts/data/rowlayout/Container.qml
+new file mode 100644
+index 0000000..22205c1
+--- /dev/null
++++ b/tests/auto/quick/qquicklayouts/data/rowlayout/Container.qml
+@@ -0,0 +1,55 @@
++/****************************************************************************
++**
++** Copyright (C) 2016 The Qt Company Ltd.
++** Contact: http://www.qt.io/licensing/
++**
++** This file is part of the test suite of the Qt Toolkit.
++**
++** $QT_BEGIN_LICENSE:BSD$
++** You may use this file under the terms of the BSD license as follows:
++**
++** "Redistribution and use in source and binary forms, with or without
++** modification, are permitted provided that the following conditions are
++** met:
++** * Redistributions of source code must retain the above copyright
++** notice, this list of conditions and the following disclaimer.
++** * Redistributions in binary form must reproduce the above copyright
++** notice, this list of conditions and the following disclaimer in
++** the documentation and/or other materials provided with the
++** distribution.
++** * Neither the name of The Qt Company Ltd nor the names of its
++** contributors may be used to endorse or promote products derived
++** from this software without specific prior written permission.
++**
++**
++** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
++** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
++** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
++** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
++** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
++** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
++** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
++** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
++** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
++** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
++** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
++**
++** $QT_END_LICENSE$
++**
++****************************************************************************/
++
++import QtQuick 2.7
++import QtQuick.Layouts 1.3
++
++Item {
++ objectName: "qtbug51927-window"
++ visible: true
++
++ default property alias _contents: customContent.data
++
++ RowLayout {
++ id: customContent
++ objectName: "qtbug51927-columnLayout"
++ anchors.fill: parent
++ }
++}
+diff --git a/tests/auto/quick/qquicklayouts/data/rowlayout/ContainerUser.qml b/tests/auto/quick/qquicklayouts/data/rowlayout/ContainerUser.qml
+new file mode 100644
+index 0000000..ff7ce62
+--- /dev/null
++++ b/tests/auto/quick/qquicklayouts/data/rowlayout/ContainerUser.qml
+@@ -0,0 +1,53 @@
++/****************************************************************************
++**
++** Copyright (C) 2016 The Qt Company Ltd.
++** Contact: http://www.qt.io/licensing/
++**
++** This file is part of the test suite of the Qt Toolkit.
++**
++** $QT_BEGIN_LICENSE:BSD$
++** You may use this file under the terms of the BSD license as follows:
++**
++** "Redistribution and use in source and binary forms, with or without
++** modification, are permitted provided that the following conditions are
++** met:
++** * Redistributions of source code must retain the above copyright
++** notice, this list of conditions and the following disclaimer.
++** * Redistributions in binary form must reproduce the above copyright
++** notice, this list of conditions and the following disclaimer in
++** the documentation and/or other materials provided with the
++** distribution.
++** * Neither the name of The Qt Company Ltd nor the names of its
++** contributors may be used to endorse or promote products derived
++** from this software without specific prior written permission.
++**
++**
++** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
++** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
++** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
++** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
++** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
++** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
++** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
++** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
++** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
++** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
++** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
++**
++** $QT_END_LICENSE$
++**
++****************************************************************************/
++
++import QtQuick 2.6
++import QtQuick.Window 2.2
++
++Container {
++ visible: true
++
++ Text {
++ objectName: "qtbug51927-text"
++ text: qsTr("Hello World")
++ anchors.centerIn: parent
++ renderType: Text.QtRendering
++ }
++}
+diff --git a/tests/auto/quick/qquicklayouts/data/tst_rowlayout.qml b/tests/auto/quick/qquicklayouts/data/tst_rowlayout.qml
+index 33b8fd0..2d4e227 100644
+--- a/tests/auto/quick/qquicklayouts/data/tst_rowlayout.qml
++++ b/tests/auto/quick/qquicklayouts/data/tst_rowlayout.qml
+@@ -926,5 +926,17 @@ Item {
+ waitForRendering(layout)
+ layout.destroy()
+ }
++
++
++ function test_defaultPropertyAliasCrash() {
++ var containerUserComponent = Qt.createComponent("rowlayout/ContainerUser.qml");
++ compare(containerUserComponent.status, Component.Ready);
++
++ var containerUser = containerUserComponent.createObject(testCase);
++ verify(containerUser);
++
++ // Shouldn't crash.
++ containerUser.destroy();
++ }
+ }
+ }
+--
+cgit v1.0-4-g1e03
+
diff --git a/deps/qt5/patches/qt5.qtbug-55583.patch b/deps/qt5/patches/qt5.qtbug-55583.patch
new file mode 100644
index 0000000..804f538
--- /dev/null
+++ b/deps/qt5/patches/qt5.qtbug-55583.patch
@@ -0,0 +1,41 @@
+#
+# https://github.com/qt/qtbase/commit/84ea00d4.patch
+#
+From 84ea00d47049d882f2fabf1446ec6c6eb5fe3038 Mon Sep 17 00:00:00 2001
+From: J-P Nurmi <jpnurmi@qt.io>
+Date: Tue, 6 Dec 2016 16:30:31 +0100
+Subject: [PATCH] QGtk3Dialog: don't crash on Wayland
+
+Check if it's an X11 window before calling XSetTransientForHint().
+No transient parent will be set for GTK+ dialogs on Wayland. That
+has to be implemented separately.
+
+Task-number: QTBUG-55583
+Change-Id: Iabc2a72681c8157bb2f2fe500892853aa397106b
+Reviewed-by: Dmitry Shachnev <mitya57@gmail.com>
+Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
+---
+ src/plugins/platformthemes/gtk3/qgtk3dialoghelpers.cpp | 10 ++++++----
+ 1 file changed, 6 insertions(+), 4 deletions(-)
+
+diff --git a/src/plugins/platformthemes/gtk3/qgtk3dialoghelpers.cpp b/src/plugins/platformthemes/gtk3/qgtk3dialoghelpers.cpp
+index ba5089a..699b058 100644
+--- a/src/plugins/platformthemes/gtk3/qgtk3dialoghelpers.cpp
++++ b/src/plugins/platformthemes/gtk3/qgtk3dialoghelpers.cpp
+@@ -135,10 +135,12 @@ bool QGtk3Dialog::show(Qt::WindowFlags flags, Qt::WindowModality modality, QWind
+
+ GdkWindow *gdkWindow = gtk_widget_get_window(gtkWidget);
+ if (parent) {
+- GdkDisplay *gdkDisplay = gdk_window_get_display(gdkWindow);
+- XSetTransientForHint(gdk_x11_display_get_xdisplay(gdkDisplay),
+- gdk_x11_window_get_xid(gdkWindow),
+- parent->winId());
++ if (GDK_IS_X11_WINDOW(gdkWindow)) {
++ GdkDisplay *gdkDisplay = gdk_window_get_display(gdkWindow);
++ XSetTransientForHint(gdk_x11_display_get_xdisplay(gdkDisplay),
++ gdk_x11_window_get_xid(gdkWindow),
++ parent->winId());
++ }
+ }
+
+ if (modality != Qt::NonModal) {
diff --git a/deps/qt5/patches/qt5.qtbug-60558.patch b/deps/qt5/patches/qt5.qtbug-60558.patch
new file mode 100644
index 0000000..2d03920
--- /dev/null
+++ b/deps/qt5/patches/qt5.qtbug-60558.patch
@@ -0,0 +1,32 @@
+https://github.com/qt/qtbase/commit/f45c6c18.patch
+
+From f45c6c180463ccb6620e1d273a264f14a1204a93 Mon Sep 17 00:00:00 2001
+From: Thiago Macieira <thiago.macieira@intel.com>
+Date: Wed, 3 May 2017 14:08:50 -0700
+Subject: [PATCH] QInternal::unregisterCallback: don't crash on unregistering
+ during exit
+
+Task-number: QTBUG-60558
+Change-Id: Ica9894dc9b5e48278fd4fffd14bb34c6d98d2555
+Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
+---
+ src/corelib/global/qglobal.cpp | 6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/src/corelib/global/qglobal.cpp b/src/corelib/global/qglobal.cpp
+index c37503f3db..22fc20d47e 100644
+--- a/src/corelib/global/qglobal.cpp
++++ b/src/corelib/global/qglobal.cpp
+@@ -3988,8 +3988,10 @@ bool QInternal::registerCallback(Callback cb, qInternalCallback callback)
+ bool QInternal::unregisterCallback(Callback cb, qInternalCallback callback)
+ {
+ if (cb >= 0 && cb < QInternal::LastCallback) {
+- QInternal_CallBackTable *cbt = global_callback_table();
+- return (bool) cbt->callbacks[cb].removeAll(callback);
++ if (global_callback_table.exists()) {
++ QInternal_CallBackTable *cbt = global_callback_table();
++ return (bool) cbt->callbacks[cb].removeAll(callback);
++ }
+ }
+ return false;
+ }
diff --git a/deps/qt5/patches/qt5.qtbug-61140.patch b/deps/qt5/patches/qt5.qtbug-61140.patch
new file mode 100644
index 0000000..17468a9
--- /dev/null
+++ b/deps/qt5/patches/qt5.qtbug-61140.patch
@@ -0,0 +1,101 @@
+https://github.com/qt/qtbase/commit/744fd39e.patch
+
+From 744fd39e66b0b44e65a2505d674fa1cda8b205a4 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= <tor.arne.vestbo@qt.io>
+Date: Fri, 2 Jun 2017 11:09:55 +0200
+Subject: [PATCH] xcb: Don't destroy foreign windows
+
+We can't rely on virtual dispatch in the destructor.
+
+Task-number: QTBUG-61140
+Change-Id: Ib1026caf126095778c24254775cb5a0bfecf3a38
+Reviewed-by: Fabian Vogt
+Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
+---
+ src/plugins/platforms/xcb/qxcbintegration.cpp | 18 +-----------------
+ src/plugins/platforms/xcb/qxcbwindow.cpp | 16 ++++++++++------
+ src/plugins/platforms/xcb/qxcbwindow.h | 12 ++++++++++++
+ 3 files changed, 23 insertions(+), 23 deletions(-)
+
+diff --git a/src/plugins/platforms/xcb/qxcbintegration.cpp b/src/plugins/platforms/xcb/qxcbintegration.cpp
+index b414bee204..8e3ee20329 100644
+--- a/src/plugins/platforms/xcb/qxcbintegration.cpp
++++ b/src/plugins/platforms/xcb/qxcbintegration.cpp
+@@ -214,25 +214,9 @@ QPlatformWindow *QXcbIntegration::createPlatformWindow(QWindow *window) const
+ return xcbWindow;
+ }
+
+-class QXcbForeignWindow : public QXcbWindow
+-{
+-public:
+- QXcbForeignWindow(QWindow *window, WId nativeHandle)
+- : QXcbWindow(window) { m_window = nativeHandle; }
+- ~QXcbForeignWindow() {}
+- bool isForeignWindow() const override { return true; }
+-
+-protected:
+- // No-ops
+- void create() override {}
+- void destroy() override {}
+-};
+-
+ QPlatformWindow *QXcbIntegration::createForeignWindow(QWindow *window, WId nativeHandle) const
+ {
+- QXcbWindow *xcbWindow = new QXcbForeignWindow(window, nativeHandle);
+- xcbWindow->create();
+- return xcbWindow;
++ return new QXcbForeignWindow(window, nativeHandle);
+ }
+
+ #ifndef QT_NO_OPENGL
+diff --git a/src/plugins/platforms/xcb/qxcbwindow.cpp b/src/plugins/platforms/xcb/qxcbwindow.cpp
+index 289d0720e7..d6c69d52ef 100644
+--- a/src/plugins/platforms/xcb/qxcbwindow.cpp
++++ b/src/plugins/platforms/xcb/qxcbwindow.cpp
+@@ -597,13 +597,17 @@ QXcbWindow::~QXcbWindow()
+ }
+
+ destroy();
++}
+
+- if (isForeignWindow()) {
+- if (connection()->mouseGrabber() == this)
+- connection()->setMouseGrabber(Q_NULLPTR);
+- if (connection()->mousePressWindow() == this)
+- connection()->setMousePressWindow(Q_NULLPTR);
+- }
++QXcbForeignWindow::~QXcbForeignWindow()
++{
++ // Clear window so that destroy() does not affect it
++ m_window = 0;
++
++ if (connection()->mouseGrabber() == this)
++ connection()->setMouseGrabber(nullptr);
++ if (connection()->mousePressWindow() == this)
++ connection()->setMousePressWindow(nullptr);
+ }
+
+ void QXcbWindow::destroy()
+diff --git a/src/plugins/platforms/xcb/qxcbwindow.h b/src/plugins/platforms/xcb/qxcbwindow.h
+index 56628094ee..f38343b6c2 100644
+--- a/src/plugins/platforms/xcb/qxcbwindow.h
++++ b/src/plugins/platforms/xcb/qxcbwindow.h
+@@ -278,6 +278,18 @@ public Q_SLOTS:
+ xcb_cursor_t m_currentBitmapCursor = XCB_CURSOR_NONE;
+ };
+
++class QXcbForeignWindow : public QXcbWindow
++{
++public:
++ QXcbForeignWindow(QWindow *window, WId nativeHandle)
++ : QXcbWindow(window) { m_window = nativeHandle; }
++ ~QXcbForeignWindow();
++ bool isForeignWindow() const override { return true; }
++
++protected:
++ void create() override {} // No-op
++};
++
+ QT_END_NAMESPACE
+
+ Q_DECLARE_METATYPE(QXcbWindow*)
diff --git a/deps/qt5/patches/qt5.qtbug-66103.patch b/deps/qt5/patches/qt5.qtbug-66103.patch
new file mode 100644
index 0000000..62d1b30
--- /dev/null
+++ b/deps/qt5/patches/qt5.qtbug-66103.patch
@@ -0,0 +1,172 @@
+https://code.qt.io/cgit/qt/qtbase.git/patch/?id=4a7771f206d4b29be549d3827c36a46679d90de6
+
+From 4a7771f206d4b29be549d3827c36a46679d90de6 Mon Sep 17 00:00:00 2001
+From: Eike Hein <hein@kde.org>
+Date: Sun, 7 Jan 2018 13:02:01 +0900
+Subject: QSimpleDrag: Fix mouse release coords for delayed event transmission
+
+On platforms such as XCB, the drag cursor pixmap is shown via a window
+(a QShapedPixmapWindow) under the cursor.
+
+The mouse button release event at the end of the drag is received in
+this QXcbWindow, but intercepted by an event filter that QSimpleDrag
+installs on the QApplication. It then resends it unmodified(!) after
+the drag has ended and the drag pixmap window destroyed, causing it to
+be delivered to the new top-level window.
+
+The local coordinates in the unmodified QMouseEvent are local to the
+drag pixmap window and don't match the window it is delayed-transmitted
+to.
+
+This ends up having fatal, user-visible effects particularly in Qt
+Quick: QQuickWindow synthesizes a hover event once per frame using
+the last received mouse coordinates, here: the release posted by
+QSimpleDrag. This is done to update the hover event state for items
+under the cursor when the mouse hasn't moved (e.g. QQuickMouseArea::
+containsMouse). The bogus event coordinates in the release event then
+usually end up causing an item near the top-left of the QQuickWindow
+to assume it is hovered (because drag pixmap windows tend to be small),
+even when the mouse cursor is actually far away from it at the end of
+the drag.
+
+This shows up e.g. in the Plasma 5 desktop, where dragging an icon
+on the desktop will cause the icon at the top-left of the screen (if
+any) to switch to hovered state, as the release coordinates on the
+drag pixmap window (showing a dragged icon) fall into the geometry
+of the top-left icon.
+
+QSimpleDrag contains a topLevelAt() function to find the top-level
+window under the global cursor coordinates that is not the drag
+pixmap window. This is used by the drop event delivery code.
+
+This patch uses this function to find the relevant top-level window,
+then asks it to map the global cusor coordinates to its local
+coordinate system, then synthesizes a new QMouseEvent with local
+coordinates computed in this fashion. As a result the window now
+gets a release event with coordinates that make sense and are
+correct.
+
+Task-number: QTBUG-66103
+Change-Id: I04ebe6ccd4a991fdd4b540ff0227973ea8896a9d
+Reviewed-by: Eike Hein <hein@kde.org>
+Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
+---
+ src/gui/kernel/qsimpledrag.cpp | 32 +++++++++++++++++++++++++++-----
+ src/gui/kernel/qsimpledrag_p.h | 6 +++---
+ 2 files changed, 30 insertions(+), 8 deletions(-)
+
+diff --git a/src/gui/kernel/qsimpledrag.cpp b/src/gui/kernel/qsimpledrag.cpp
+index a1e25dc53c..87d3ba5915 100644
+--- a/src/gui/kernel/qsimpledrag.cpp
++++ b/src/gui/kernel/qsimpledrag.cpp
+@@ -58,6 +58,7 @@
+
+ #include <QtCore/QEventLoop>
+ #include <QtCore/QDebug>
++#include <QtCore/QLoggingCategory>
+
+ #include <private/qguiapplication_p.h>
+ #include <private/qdnd_p.h>
+@@ -69,6 +70,8 @@ QT_BEGIN_NAMESPACE
+
+ #ifndef QT_NO_DRAGANDDROP
+
++Q_LOGGING_CATEGORY(lcDnd, "qt.gui.dnd")
++
+ static QWindow* topLevelAt(const QPoint &pos)
+ {
+ QWindowList list = QGuiApplication::topLevelWindows();
+@@ -94,10 +97,10 @@ static QWindow* topLevelAt(const QPoint &pos)
+ */
+
+ QBasicDrag::QBasicDrag() :
+- m_restoreCursor(false), m_eventLoop(0),
++ m_current_window(nullptr), m_restoreCursor(false), m_eventLoop(nullptr),
+ m_executed_drop_action(Qt::IgnoreAction), m_can_drop(false),
+- m_drag(0), m_drag_icon_window(0), m_useCompositing(true),
+- m_screen(Q_NULLPTR)
++ m_drag(nullptr), m_drag_icon_window(nullptr), m_useCompositing(true),
++ m_screen(nullptr)
+ {
+ }
+
+@@ -161,6 +164,7 @@ bool QBasicDrag::eventFilter(QObject *o, QEvent *e)
+ return true; // Eat all mouse move events
+ }
+ case QEvent::MouseButtonRelease:
++ {
+ disableEventFilter();
+ if (canDrop()) {
+ QPoint nativePosition = getNativeMousePos(e, m_drag_icon_window);
+@@ -169,8 +173,25 @@ bool QBasicDrag::eventFilter(QObject *o, QEvent *e)
+ cancel();
+ }
+ exitDndEventLoop();
+- QCoreApplication::postEvent(o, new QMouseEvent(*static_cast<QMouseEvent *>(e)));
++
++ // If a QShapedPixmapWindow (drag feedback) is being dragged along, the
++ // mouse event's localPos() will be relative to that, which is useless.
++ // We want a position relative to the window where the drag ends, if possible (?).
++ // If there is no such window (belonging to this Qt application),
++ // make the event relative to the window where the drag started. (QTBUG-66103)
++ const QMouseEvent *release = static_cast<QMouseEvent *>(e);
++ const QWindow *releaseWindow = topLevelAt(release->globalPos());
++ qCDebug(lcDnd) << "mouse released over" << releaseWindow << "after drag from" << m_current_window << "globalPos" << release->globalPos();
++ if (!releaseWindow)
++ releaseWindow = m_current_window;
++ QPoint releaseWindowPos = (releaseWindow ? releaseWindow->mapFromGlobal(release->globalPos()) : release->globalPos());
++ QMouseEvent *newRelease = new QMouseEvent(release->type(),
++ releaseWindowPos, releaseWindowPos, release->screenPos(),
++ release->button(), release->buttons(),
++ release->modifiers(), release->source());
++ QCoreApplication::postEvent(o, newRelease);
+ return true; // defer mouse release events until drag event loop has returned
++ }
+ case QEvent::MouseButtonDblClick:
+ case QEvent::Wheel:
+ return true;
+@@ -349,7 +370,7 @@ static inline QPoint fromNativeGlobalPixels(const QPoint &point)
+ into account.
+ */
+
+-QSimpleDrag::QSimpleDrag() : m_current_window(0)
++QSimpleDrag::QSimpleDrag()
+ {
+ }
+
+@@ -373,6 +394,7 @@ void QSimpleDrag::startDrag()
+ updateCursor(Qt::IgnoreAction);
+ }
+ setExecutedDropAction(Qt::IgnoreAction);
++ qCDebug(lcDnd) << "drag began from" << m_current_window<< "cursor pos" << QCursor::pos() << "can drop?" << canDrop();
+ }
+
+ void QSimpleDrag::cancel()
+diff --git a/src/gui/kernel/qsimpledrag_p.h b/src/gui/kernel/qsimpledrag_p.h
+index 0b8a0bc703..bbd7f7f4bb 100644
+--- a/src/gui/kernel/qsimpledrag_p.h
++++ b/src/gui/kernel/qsimpledrag_p.h
+@@ -105,6 +105,9 @@ protected:
+
+ QDrag *drag() const { return m_drag; }
+
++protected:
++ QWindow *m_current_window;
++
+ private:
+ void enableEventFilter();
+ void disableEventFilter();
+@@ -132,9 +135,6 @@ protected:
+ virtual void cancel() Q_DECL_OVERRIDE;
+ virtual void move(const QPoint &globalPos) Q_DECL_OVERRIDE;
+ virtual void drop(const QPoint &globalPos) Q_DECL_OVERRIDE;
+-
+-private:
+- QWindow *m_current_window;
+ };
+
+ #endif // QT_NO_DRAGANDDROP
+--
+cgit v1.1-6-g87c4
+
+
diff --git a/deps/qt5/qt5.SlackBuild b/deps/qt5/qt5.SlackBuild
index 9b57607..8484b4a 100755
--- a/deps/qt5/qt5.SlackBuild
+++ b/deps/qt5/qt5.SlackBuild
@@ -1,6 +1,6 @@
#!/bin/sh
-# Copyright 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016 Patrick J. Volkerding, Sebeka, MN, USA
+# Copyright 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018 Patrick J. Volkerding, Sebeka, MN, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -36,7 +36,7 @@
# Alternate method (we don't use this):
# wget http://qt.gitorious.org/qt/kde-qt/archive-tarball/4.6.2-patched
#
-# Modifications 2010, 2011, 2012, 2013, 2014, 2015, 2016 Eric Hameleers, Eindhoven, NL
+# Modifications 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017 Eric Hameleers, Eindhoven, NL
# qt 4.7.3, 4.7.4, 4.8.0, 4.8.1, 4.8.2, 4.8.4, are built from original nokia sources.
#
# Modifications for qt 5.2.0 2013 by Michael James, AU
@@ -48,19 +48,27 @@
# Modifications for qt 5.6.0 2016 by Eric Hameleers, Eindhoven, NL
# Modifications for qt 5.6.1 2016 by Eric Hameleers, Eindhoven, NL
# Modifications for qt 5.7.0 2016 by Eric Hameleers, Eindhoven, NL
+# Modifications for qt 5.7.1 2017 by Eric Hameleers, Eindhoven, NL
+# Modifications for qt 5.9.0 2017 by Eric Hameleers, Eindhoven, NL
+# Modifications for qt 5.9.1 2017 by Eric Hameleers, Eindhoven, NL
+# Modifications for qt 5.9.2 2017 by Eric Hameleers, Eindhoven, NL
+# Modifications for qt 5.9.3 2017 by Eric Hameleers, Eindhoven, NL
+# Modifications for qt 5.9.4 2018 by Eric Hameleers, Eindhoven, NL
+# Modifications for qt 5.9.5 2018 by Eric Hameleers, Eindhoven, NL
+# Modifications for qt 5.9.6 2018 by Eric Hameleers, Eindhoven, NL
PKGNAM=qt5
-VERSION=${VERSION:-5.7.0}
+VERSION=${VERSION:-5.9.6}
+BUILD=${BUILD:-1}
PKGSRC=$(echo $VERSION |cut -d- -f1)
PKGVER=$(echo $VERSION |tr - _)
-BUILD=${BUILD:-1}
-NUMJOBS=${NUMJOBS:--j7}
+NUMJOBS=${NUMJOBS:-"-j$(nproc)"}
# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
case "$(uname -m)" in
- i?86) ARCH=i486 ;;
+ i?86) ARCH=i586 ;;
arm*) readelf /usr/bin/file -A | egrep -q "Tag_CPU.*[4,5]" && ARCH=arm || ARCH=armv7hl ;;
# Unless $ARCH is already set, use uname -m for all other archs:
*) ARCH=$(uname -m) ;;
@@ -68,10 +76,22 @@ if [ -z "$ARCH" ]; then
export ARCH
fi
+# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
+# the name of the created package would be, and then exit. This information
+# could be useful to other scripts.
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PKGNAM-${PKGVER}-${ARCH}-${BUILD}.txz"
+ exit 0
+fi
+
if [ "$ARCH" = "i486" ]; then
SLKCFLAGS="-O2 -march=i486 -mtune=i686"
SLKLDFLAGS=""
LIBDIRSUFFIX=""
+elif [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
+ SLKLDFLAGS=""
+ LIBDIRSUFFIX=""
elif [ "$ARCH" = "s390" ]; then
SLKCFLAGS="-O2"
SLKLDFLAGS=""
@@ -118,12 +138,6 @@ find . \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \;
-# Fix dangling symlinks, thanks Larry Hajali:
-rm -f qtwebengine/src/3rdparty/chromium/third_party/mesa/src/src/gallium/state_trackers/d3d1x/w32api
-rm -f qtwebengine/src/3rdparty/chromium/third_party/webrtc/tools/e2e_quality/audio/perf
-ln -s ../../../../../tools/perf \
- qtwebengine/src/3rdparty/chromium/third_party/webrtc/tools/e2e_quality/audio/
-
# Use -reduce-relocations only on i?86 and x86_64 architextures.
# https://bugreports.qt-project.org/browse/QTBUG-36129
if echo $ARCH | grep -q '\(i.86\|x86_64\)' 2>/dev/null; then
@@ -135,15 +149,9 @@ fi
# Fix path to mysql header:
cat $CWD/patches/qt5.mysql.h.diff | patch -p1 --verbose || exit 1
-# Fix UNSIGNED values in QMYSQL:
-cd qtbase
- cat $CWD/patches/qt5.qtbug-53237.patch | patch -p1 --verbose || exit 1
-cd -
-
-# Fix freetype engine performance:
-cd qtbase
- cat $CWD/patches/qt5.qtbug-49452.patch | patch -p1 --verbose || exit 1
-cd -
+# Fix missing private includes: QTBUG-37417
+sed -e '/CMAKE_NO_PRIVATE_INCLUDES\ \=\ true/d' \
+ -i qtbase/mkspecs/features/create_cmake.prf
if ! pkg-config --exists libpulse 2>/dev/null ; then
# Forcibly disable pulseaudio in qtwebengine:
@@ -154,10 +162,18 @@ else
PACONF=" "
fi
-sed -i -e "s/-O2/$SLKCFLAGS/" qtbase/mkspecs/common/g++-base.conf || exit 1
+# Use our custom compiler and linker flags:
+#sed -i -e "s/-O2/$SLKCFLAGS/" qtbase/mkspecs/common/g++-base.conf || exit 1
sed -i -e "s/-O2/$SLKCFLAGS/" qtbase/mkspecs/common/gcc-base.conf || exit 1
+sed -i -e "s/-O3/$SLKCFLAGS/" qtbase/mkspecs/common/gcc-base.conf || exit 1
sed -i -e "/^QMAKE_LFLAGS\s/s,+=,+= $SLKLDFLAGS,g" qtbase/mkspecs/common/gcc-base.conf || exit 1
+# Enable h.264 codec support:
+echo "WEBENGINE_CONFIG += use_proprietary_codecs" >> qtwebengine/.qmake.conf
+
+# Enable all languages in the virtual keyboard (required by Plasma 5.11):
+echo "CONFIG += lang-all" >> qtvirtualkeyboard/.qmake.conf
+
export CFLAGS="$SLKCFLAGS"
export CXXFLAGS="$SLKCFLAGS"
export OPENSOURCE_CXXFLAGS="$SLKCFLAGS"
@@ -178,7 +194,6 @@ export QT_PLUGIN_PATH="${QTDIR}/qtbase/plugins"
-examplesdir /usr/doc/qt5-$PKGVER/examples \
-system-libpng \
-system-libjpeg \
- -system-pcre \
-system-sqlite \
-system-zlib \
-plugin-sql-mysql \
@@ -188,6 +203,7 @@ export QT_PLUGIN_PATH="${QTDIR}/qtbase/plugins"
-dbus \
-glib \
-icu \
+ -opengl \
-openssl \
-optimized-qmake \
-qpa xcb \
@@ -202,6 +218,8 @@ export QT_PLUGIN_PATH="${QTDIR}/qtbase/plugins"
${PACONF} \
${RELOCATIONS} \
-no-pch \
+ OPENSSL_INCDIR="/usr/include/openssl-1.0" \
+ OPENSSL_LIBDIR="/usr/lib${LIBDIRSUFFIX}/openssl-1.0" \
# No-precompiled-headers is ccache-friendly.
# Sometimes a failure happens when parallelizing make. Try again if make fails,
@@ -213,16 +231,22 @@ make install INSTALL_ROOT=$PKG || exit 1
find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
-# Fix internal linking for Qt5WebKit.pc , thanks to Larry Hajali's SBo script:
+# Remove rpaths:
+for file in $(find . | xargs file | grep -e "executable" -e "shared object" | grep ELF | cut -f 1 -d : 2> /dev/null) ; do
+ if [ ! "$(patchelf --print-rpath $file 2> /dev/null)" = "" ]; then
+ patchelf --remove-rpath $file
+ fi
+done
+
+# Don't ship .la files:
+rm -f $PKG/usr/lib${LIBDIRSUFFIX}/*.la
+
+# Fix internal linking for Qt5WebEngineCore.pc ,
+# thanks to Larry Hajali's SBo script:
sed -i \
- -e "s|-Wl,-whole-archive -lWebKit1 -Wl,-no-whole-archive -L${PWD}/qtwebkit/Source/WebKit[^ ]* ||" \
- -e "s|-Wl,-whole-archive -lWebKit2 -Wl,-no-whole-archive -L${PWD}/qtwebkit/Source/WebKit2[^ ]* ||" \
- -e "s|-Wl,-whole-archive -lWebCore -Wl,-no-whole-archive -L${PWD}/qtwebkit/Source/WebCore[^ ]* ||" \
- -e "s|-Wl,-whole-archive -lANGLE -Wl,-no-whole-archive -L${PWD}/qtwebkit/Source/ThirdParty/ANGLE[^ ]* ||" \
- -e "s|-Wl,-whole-archive -lJavaScriptCore -Wl,-no-whole-archive -L${PWD}/qtwebkit/Source/JavaScriptCore[^ ]* ||" \
- -e "s|-Wl,-whole-archive -lWTF -Wl,-no-whole-archive -L${PWD}/qtwebkit/Source/WTF[^ ]* ||" \
- -e "s|-Wl,-whole-archive -lleveldb -Wl,-no-whole-archive -L${PWD}/qtwebkit/Source/ThirdParty/leveldb[^ ]* ||" \
- $PKG/usr/lib${LIBDIRSUFFIX}/pkgconfig/Qt5WebKit.pc
+ -e 's|-Wl,--start-group.* -Wl,--end-group||' \
+ -e "s|-L${PWD}/qtwebengine/src/core/api/Release||" \
+ $PKG/usr/lib${LIBDIRSUFFIX}/pkgconfig/Qt5WebEngineCore.pc
# Fix the path in prl files:
find "$PKG/usr/lib${LIBDIRSUFFIX}" -type f -name '*.prl' \
@@ -271,7 +295,7 @@ cat <<EOF > $PKG/usr/share/applications/qt5-designer.desktop
Name=Qt5 Designer
GenericName=Interface Designer
Comment=Design GUIs for Qt5 applications
-Exec=designer-qt5 -qt=5
+Exec=designer-qt5
Icon=qt5-designer
MimeType=application/x-designer;
Terminal=false
@@ -283,7 +307,7 @@ cat <<EOF > $PKG/usr/share/applications/qt5-assistant.desktop
[Desktop Entry]
Name=Qt5 Assistant
Comment=Shows Qt5 documentation and examples
-Exec=assistant-qt5 -qt=5
+Exec=assistant-qt5
Icon=qt5-assistant
Terminal=false
Encoding=UTF-8
@@ -294,7 +318,7 @@ cat <<EOF > $PKG/usr/share/applications/qt5-linguist.desktop
[Desktop Entry]
Name=Qt5 Linguist
Comment=Add translations to Qt5 applications
-Exec=linguist-qt5 -qt=5
+Exec=linguist-qt5
Icon=qt5-linguist
MimeType=text/vnd.trolltech.linguist;application/x-linguist;
Terminal=false
diff --git a/deps/qtav/.url b/deps/qtav/.url
new file mode 100644
index 0000000..e35c34f
--- /dev/null
+++ b/deps/qtav/.url
@@ -0,0 +1 @@
+https://github.com/wang-bin/QtAV/archive/v1.12.0.tar.gz
diff --git a/deps/qtav/doinst.sh b/deps/qtav/doinst.sh
new file mode 100644
index 0000000..e4e6459
--- /dev/null
+++ b/deps/qtav/doinst.sh
@@ -0,0 +1,8 @@
+if [ -x /usr/bin/update-desktop-database ]; then
+ /usr/bin/update-desktop-database -q usr/share/applications >/dev/null 2>&1
+fi
+
+if [ -x /usr/bin/update-mime-database ]; then
+ /usr/bin/update-mime-database usr/share/mime >/dev/null 2>&1
+fi
+
diff --git a/deps/qtav/qtav.SlackBuild b/deps/qtav/qtav.SlackBuild
new file mode 100755
index 0000000..f5138ca
--- /dev/null
+++ b/deps/qtav/qtav.SlackBuild
@@ -0,0 +1,120 @@
+#!/bin/sh
+
+# Copyright 2017 Eric Hameleers, Eindhoven, NL
+# Copyright 2017 Patrick J. Volkerding, Sebeka, MN, USA
+# All rights reserved.
+#
+# Permission to use, copy, modify, and distribute this software for
+# any purpose with or without fee is hereby granted, provided that
+# the above copyright notice and this permission notice appear in all
+# copies.
+#
+# THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+# IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
+# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+# USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+# OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+# SUCH DAMAGE.
+# -----------------------------------------------------------------------------
+
+
+PKGNAM=qtav
+SRCNAM=QtAV
+VERSION=${VERSION:-1.12.0}
+BUILD=${BUILD:-1}
+NUMJOBS=${NUMJOBS:-" -j4 "}
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+PKG=$TMP/package-$PKGNAM
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$(uname -m)" in
+ i?86) ARCH=i586 ;;
+ arm*) readelf /usr/bin/file -A | egrep -q "Tag_CPU.*[4,5]" && ARCH=arm || ARCH=armv7hl ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) ARCH=$(uname -m) ;;
+ esac
+ export ARCH
+fi
+
+if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+ SLKLDFLAGS=""
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
+ SLKLDFLAGS=""
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ SLKLDFLAGS="-L/usr/lib64"
+ LIBDIRSUFFIX="64"
+elif [ "$ARCH" = "armv7hl" ]; then
+ SLKCFLAGS="-O3 -march=armv7-a -mfpu=vfpv3-d16"
+ SLKLDFLAGS=""
+ LIBDIRSUFFIX=""
+else
+ SLKCFLAGS="-O2"
+ SLKLDFLAGS=""
+ LIBDIRSUFFIX=""
+fi
+
+case "$ARCH" in
+ arm*) TARGET=$ARCH-slackware-linux-gnueabi ;;
+ *) TARGET=$ARCH-slackware-linux ;;
+esac
+
+rm -rf $PKG
+mkdir -p $TMP $PKG
+cd $TMP
+rm -rf $SRCNAM-$VERSION
+tar xvf $CWD/$SRCNAM-$VERSION.tar.?z* || exit 1
+cd $SRCNAM-$VERSION || exit 1
+
+# Fix bogus permissions:
+chown -R root:root .
+find . \
+ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \;
+
+export CFLAGS="$SLKCFLAGS"
+export CXXFLAGS="$SLKCFLAGS"
+export LDFLAGS="$SLKLDFLAGS"
+
+qmake-qt5 INSTALL_PREFIX=/usr "CONFIG+=no-tests no_rpath recheck"
+make $NUMJOBS || make || exit 1
+make INSTALL_ROOT=$PKG install || exit 1
+
+# Create symlinks for the binaries; these are referenced in *.desktop:
+mkdir -p $PKG/usr/bin
+ln -s ../lib${LIBDIRSUFFIX}/qt5/bin/Player $PKG/usr/bin
+ln -s ../lib${LIBDIRSUFFIX}/qt5/bin/QMLPlayer $PKG/usr/bin
+
+# Fix documentation directory:
+mkdir -p $PKG/usr/doc/$PKGNAM-$VERSION
+mv $PKG/usr/share/doc/* $PKG/usr/doc/$PKGNAM-$VERSION/
+rmdir $PKG/usr/share/doc
+
+# Strip binaries:
+find $PKG | xargs file | grep -e "executable" -e "shared object" \
+ | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+
+# Add a package description:
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+cat $CWD/doinst.sh > $PKG/install/doinst.sh
+
+# Build the package:
+cd $PKG
+/sbin/makepkg -l y -c n $TMP/$PKGNAM-$VERSION-$ARCH-$BUILD.txz
+
diff --git a/deps/qtav/slack-desc b/deps/qtav/slack-desc
new file mode 100644
index 0000000..2d29561
--- /dev/null
+++ b/deps/qtav/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|'
+# on the right side marks the last column you can put a character in. You must
+# make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+qtav: qtav (multimedia playback framework)
+qtav:
+qtav: QtAV is a multimedia playback framework based on Qt and FFMpeg. Some
+qtav: components in QtAV are designed to be extensible.
+qtav:
+qtav:
+qtav:
+qtav:
+qtav:
+qtav: See also: http://qtav.org
+qtav:
diff --git a/deps/sip/.url b/deps/sip/.url
new file mode 100644
index 0000000..1e93d0f
--- /dev/null
+++ b/deps/sip/.url
@@ -0,0 +1,2 @@
+https://sourceforge.net/projects/pyqt/files/sip/sip-4.19.6/sip-4.19.6.tar.gz
+
diff --git a/deps/sip/sip.SlackBuild b/deps/sip/sip.SlackBuild
new file mode 100755
index 0000000..dee07cb
--- /dev/null
+++ b/deps/sip/sip.SlackBuild
@@ -0,0 +1,124 @@
+#!/bin/sh
+
+# Copyright 2008 Aleksandar Samardzic <asamardzic@gmail.com>
+# Copyright 2008, 2009, 2010, 2011, 2017 Patrick J. Volkerding, Sebeka, MN, USA
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ''AS IS'' AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+# Modified by Robby Workman <rworkman@slackware.com>
+# Modified by Eric Hameleers <alien@slackware.com>
+
+
+PKGNAM=sip
+VERSION=${VERSION:-4.19.6}
+BUILD=${BUILD:-1}
+
+NUMJOBS=${NUMJOBS:--j7}
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$(uname -m)" in
+ i?86) ARCH=i586 ;;
+ arm*) readelf /usr/bin/file -A | egrep -q "Tag_CPU.*[4,5]" && ARCH=arm || ARCH=armv7hl ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) ARCH=$(uname -m) ;;
+ esac
+ export ARCH
+fi
+
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+elif [ "$ARCH" = "armv7hl" ]; then
+ SLKCFLAGS="-O2 -march=armv7-a -mfpu=vfpv3-d16"
+else
+ SLKCFLAGS="-O2"
+fi
+
+PYTHONVER=$(python -V 2>&1 | cut -f 2 -d' ' | cut -f 1-2 -d. 2>/dev/null)
+PYTHONLIB=$( python -c 'from distutils.sysconfig import get_python_lib; print get_python_lib()' 2>/dev/null )
+
+PYTHON3VER=$(python3 -V 2>&1 | cut -f 2 -d' ' | cut -f 1-2 -d. 2>/dev/null)
+PYTHON3LIB=$( python3 -c 'from distutils.sysconfig import get_python_lib; print(get_python_lib())' 2>/dev/null )
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+PKG=$TMP/package-$PKGNAM
+
+rm -rf $PKG
+mkdir -p $TMP $PKG $OUTPUT
+cd $TMP
+rm -rf $PKGNAM-$VERSION
+tar xvf $CWD/$PKGNAM-$VERSION.tar.?z* || exit 1
+cd $PKGNAM-$VERSION || exit 1
+chown -R root:root .
+find . \
+ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \;
+
+if [ -n "${PYTHON3LIB}" ]; then
+ python3 configure.py \
+ -b "/usr/bin" \
+ -d "$PYTHON3LIB" \
+ CFLAGS="$SLKCFLAGS" \
+ CXXFLAGS="$SLKCFLAGS" || exit 1
+ make $NUMJOBS || make || exit 1
+ make install DESTDIR=$PKG || exit 1
+
+ mv $PKG/usr/bin/sip $PKG/usr/bin/sip3
+fi
+
+python configure.py \
+ -b "/usr/bin" \
+ -d "$PYTHONLIB" \
+ CFLAGS="$SLKCFLAGS" \
+ CXXFLAGS="$SLKCFLAGS" \
+ || exit 1
+
+make $NUMJOBS || make || exit 1
+make install DESTDIR=$PKG || exit 1
+
+find $PKG | xargs file | grep -e "executable" -e "shared object" \
+ | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+
+mkdir -p $PKG/usr/doc/$PKGNAM-$VERSION
+cp -a \
+ LICENSE* COPYING* ChangeLog NEWS README TODO doc/* \
+ $PKG/usr/doc/$PKGNAM-$VERSION
+chown -R root:root $PKG/usr/doc
+
+# If there's a ChangeLog, installing at least part of the recent history
+# is useful, but don't let it get totally out of control:
+if [ -r ChangeLog ]; then
+ DOCSDIR=$(echo $PKG/usr/doc/${PKGNAM}-$VERSION)
+ cat ChangeLog | head -n 1000 > $DOCSDIR/ChangeLog
+ touch -r ChangeLog $DOCSDIR/ChangeLog
+fi
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+cd $PKG
+/sbin/makepkg -l y -c n $TMP/$PKGNAM-$(echo $VERSION |tr - _)-$ARCH-$BUILD.txz
+
diff --git a/deps/sip/slack-desc b/deps/sip/slack-desc
new file mode 100644
index 0000000..d2fae24
--- /dev/null
+++ b/deps/sip/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|'
+# on the right side marks the last column you can put a character in. You must
+# make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+sip: SIP (a tool for generating Python bindings)
+sip:
+sip: SIP is a tool that makes it very easy to create Python bindings for
+sip: C and C++ libraries. It was originally developed to create PyQt,
+sip: the Python bindings for the Qt toolkit, but can be used to create
+sip: bindings for any C or C++ library.
+sip:
+sip: Homepage: http://www.riverbankcomputing.co.uk/software/sip/
+sip:
+sip:
+sip:
diff --git a/deps/sni-qt/sni-qt.SlackBuild b/deps/sni-qt/sni-qt.SlackBuild
index 1d090f9..e793059 100755
--- a/deps/sni-qt/sni-qt.SlackBuild
+++ b/deps/sni-qt/sni-qt.SlackBuild
@@ -1,7 +1,7 @@
#!/bin/sh
# Copyright 2015 Patrick J. Volkerding, Sebeka, MN, USA
-# Copyright 2015, 2016 Eric Hameleers, Eindhoven, NL
+# Copyright 2015, 2016, 2017 Eric Hameleers, Eindhoven, NL
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -23,13 +23,13 @@
PKGNAM=sni-qt
VERSION=${VERSION:-0.2.6}
-BUILD=${BUILD:-4}
+BUILD=${BUILD:-5}
NUMJOBS=${NUMJOBS:--j6}
# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
case "$(uname -m)" in
- i?86) ARCH=i486 ;;
+ i?86) ARCH=i586 ;;
arm*) readelf /usr/bin/file -A | egrep -q "Tag_CPU.*[4,5]" && ARCH=arm || ARCH=armv7hl ;;
# Unless $ARCH is already set, use uname -m for all other archs:
*) ARCH=$(uname -m) ;;
@@ -37,8 +37,8 @@ if [ -z "$ARCH" ]; then
export ARCH
fi
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "s390" ]; then
SLKCFLAGS="-O2"
diff --git a/deps/telepathy/farstream/farstream.url b/deps/telepathy/farstream/.url
index 41fe18e..41fe18e 100644
--- a/deps/telepathy/farstream/farstream.url
+++ b/deps/telepathy/farstream/.url
diff --git a/deps/telepathy/libaccounts-glib/.url b/deps/telepathy/libaccounts-glib/.url
new file mode 100644
index 0000000..5430453
--- /dev/null
+++ b/deps/telepathy/libaccounts-glib/.url
@@ -0,0 +1 @@
+https://gitlab.com/accounts-sso/libaccounts-glib/repository/VERSION_1.23/archive.tar.gz
diff --git a/deps/telepathy/libaccounts-glib/libaccounts-glib.SlackBuild b/deps/telepathy/libaccounts-glib/libaccounts-glib.SlackBuild
index bd76bed..06f04f4 100755
--- a/deps/telepathy/libaccounts-glib/libaccounts-glib.SlackBuild
+++ b/deps/telepathy/libaccounts-glib/libaccounts-glib.SlackBuild
@@ -1,6 +1,6 @@
#!/bin/sh
-# Copyright 2015, 2016 Eric Hameleers, Eindhoven, NL
+# Copyright 2015, 2016, 2017 Eric Hameleers, Eindhoven, NL
# Copyright 2015 Patrick J. Volkerding, Sebeka, MN, USA
# All rights reserved.
#
@@ -23,15 +23,15 @@
PKGNAM=libaccounts-glib
-VERSION=${VERSION:-"1.21"}
-BUILD=${BUILD:-1}
+VERSION=${VERSION:-"1.23"}
+BUILD=${BUILD:-2}
NUMJOBS=${NUMJOBS:--j7}
# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
case "$(uname -m)" in
- i?86) ARCH=i486 ;;
+ i?86) ARCH=i586 ;;
arm*) readelf /usr/bin/file -A | egrep -q "Tag_CPU.*[4,5]" && ARCH=arm || ARCH=armv7hl ;;
# Unless $ARCH is already set, use uname -m for all other archs:
*) ARCH=$(uname -m) ;;
@@ -43,8 +43,8 @@ CWD=$(pwd)
TMP=${TMP:-/tmp}
PKG=$TMP/package-$PKGNAM
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
SLKLDFLAGS=""
LIBDIRSUFFIX=""
elif [ "$ARCH" = "x86_64" ]; then
diff --git a/deps/telepathy/libaccounts-glib/libaccounts-glib.url b/deps/telepathy/libaccounts-glib/libaccounts-glib.url
deleted file mode 100644
index 1e3715e..0000000
--- a/deps/telepathy/libaccounts-glib/libaccounts-glib.url
+++ /dev/null
@@ -1 +0,0 @@
-https://gitlab.com/accounts-sso/libaccounts-glib/repository/archive.zip?ref=master
diff --git a/deps/telepathy/libaccounts-qt5/.url b/deps/telepathy/libaccounts-qt5/.url
new file mode 100644
index 0000000..813b209
--- /dev/null
+++ b/deps/telepathy/libaccounts-qt5/.url
@@ -0,0 +1,2 @@
+https://gitlab.com/accounts-sso/libaccounts-qt/repository/VERSION_1.15/archive.tar.gz
+
diff --git a/deps/telepathy/libaccounts-qt5/libaccounts-qt5.SlackBuild b/deps/telepathy/libaccounts-qt5/libaccounts-qt5.SlackBuild
index 7dc8fb2..ab95f60 100755
--- a/deps/telepathy/libaccounts-qt5/libaccounts-qt5.SlackBuild
+++ b/deps/telepathy/libaccounts-qt5/libaccounts-qt5.SlackBuild
@@ -1,6 +1,6 @@
#!/bin/sh
-# Copyright 2015, 2016 Eric Hameleers, Eindhoven, NL
+# Copyright 2015, 2016, 2017 Eric Hameleers, Eindhoven, NL
# Copyright 2015 Patrick J. Volkerding, Sebeka, MN, USA
# All rights reserved.
#
@@ -24,7 +24,7 @@
PKGNAM=libaccounts-qt5
SRCNAM=libaccounts-qt
-VERSION=${VERSION:-"627a089_20151106git"}
+VERSION=${VERSION:-"1.15"}
BUILD=${BUILD:-1}
NUMJOBS=${NUMJOBS:--j7}
@@ -32,7 +32,7 @@ NUMJOBS=${NUMJOBS:--j7}
# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
case "$(uname -m)" in
- i?86) ARCH=i486 ;;
+ i?86) ARCH=i586 ;;
arm*) readelf /usr/bin/file -A | egrep -q "Tag_CPU.*[4,5]" && ARCH=arm || ARCH=armv7hl ;;
# Unless $ARCH is already set, use uname -m for all other archs:
*) ARCH=$(uname -m) ;;
@@ -40,8 +40,8 @@ if [ -z "$ARCH" ]; then
export ARCH
fi
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "s390" ]; then
SLKCFLAGS="-O2"
@@ -75,6 +75,10 @@ find . \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \;
+# Fix a compilation error:
+sed -i accounts-qt.pro \
+ -e 's|SUBDIRS += Accounts tests|SUBDIRS += Accounts|'
+
QTDIR=/usr/lib${LIBDIRSUFFIX}/qt5 \
PATH=$QTDIR/bin:$PATH \
qmake \
diff --git a/deps/telepathy/libaccounts-qt5/libaccounts-qt5.url b/deps/telepathy/libaccounts-qt5/libaccounts-qt5.url
deleted file mode 100644
index b4015f3..0000000
--- a/deps/telepathy/libaccounts-qt5/libaccounts-qt5.url
+++ /dev/null
@@ -1,2 +0,0 @@
-https://gitlab.com/accounts-sso/libaccounts-qt/repository/archive.tar.gz?ref=627a0898899d8dc356095d5a3123bae709db8bc0
-
diff --git a/deps/telepathy/libnice/.url b/deps/telepathy/libnice/.url
new file mode 100644
index 0000000..a6cbef3
--- /dev/null
+++ b/deps/telepathy/libnice/.url
@@ -0,0 +1 @@
+https://nice.freedesktop.org/releases/libnice-0.1.14.tar.gz
diff --git a/deps/telepathy/libnice/libnice.SlackBuild b/deps/telepathy/libnice/libnice.SlackBuild
index d7c9656..e57175e 100755
--- a/deps/telepathy/libnice/libnice.SlackBuild
+++ b/deps/telepathy/libnice/libnice.SlackBuild
@@ -23,18 +23,18 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-# Modified 2015 by Eric Hameleers <alien@slackware.com>
+# Modified 2015, 2017 by Eric Hameleers <alien@slackware.com>
PKGNAM=libnice
-VERSION=${VERSION:-0.1.13}
-BUILD=${BUILD:-2}
+VERSION=${VERSION:-0.1.14}
+BUILD=${BUILD:-1}
NUMJOBS=${NUMJOBS:--j7}
# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
case "$(uname -m)" in
- i?86) ARCH=i486 ;;
+ i?86) ARCH=i586 ;;
arm*) readelf /usr/bin/file -A | egrep -q "Tag_CPU.*[4,5]" && ARCH=arm || ARCH=armv7hl ;;
# Unless $ARCH is already set, use uname -m for all other archs:
*) ARCH=$(uname -m) ;;
@@ -46,8 +46,8 @@ CWD=$(pwd)
TMP=${TMP:-/tmp}
PKG=$TMP/package-$PKGNAM
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
SLKLDFLAGS=""
LIBDIRSUFFIX=""
elif [ "$ARCH" = "x86_64" ]; then
diff --git a/deps/telepathy/libnice/libnice.url b/deps/telepathy/libnice/libnice.url
deleted file mode 100644
index 32ff125..0000000
--- a/deps/telepathy/libnice/libnice.url
+++ /dev/null
@@ -1 +0,0 @@
-https://nice.freedesktop.org/releases/libnice-0.1.13.tar.gz
diff --git a/deps/telepathy/libotr/libotr.url b/deps/telepathy/libotr/.url
index d538b2a..d538b2a 100644
--- a/deps/telepathy/libotr/libotr.url
+++ b/deps/telepathy/libotr/.url
diff --git a/deps/telepathy/libsignon-glib/.url b/deps/telepathy/libsignon-glib/.url
new file mode 100644
index 0000000..c9b5dce
--- /dev/null
+++ b/deps/telepathy/libsignon-glib/.url
@@ -0,0 +1 @@
+https://gitlab.com/accounts-sso/libsignon-glib/repository/VERSION_1.14/archive.tar.gz
diff --git a/deps/telepathy/libsignon-glib/libsignon-glib.SlackBuild b/deps/telepathy/libsignon-glib/libsignon-glib.SlackBuild
index 2c6cfcf..1c35c0d 100755
--- a/deps/telepathy/libsignon-glib/libsignon-glib.SlackBuild
+++ b/deps/telepathy/libsignon-glib/libsignon-glib.SlackBuild
@@ -1,6 +1,6 @@
#!/bin/sh
-# Copyright 2015, 2016 Eric Hameleers, Eindhoven, NL
+# Copyright 2015, 2016, 2017 Eric Hameleers, Eindhoven, NL
# Copyright 2015 Patrick J. Volkerding, Sebeka, MN, USA
# All rights reserved.
#
@@ -23,13 +23,13 @@
PKGNAM=libsignon-glib
-VERSION=${VERSION:-"1.13"}
+VERSION=${VERSION:-"1.14"}
BUILD=${BUILD:-1}
# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
case "$(uname -m)" in
- i?86) ARCH=i486 ;;
+ i?86) ARCH=i586 ;;
arm*) readelf /usr/bin/file -A | egrep -q "Tag_CPU.*[4,5]" && ARCH=arm || ARCH=armv7hl ;;
# Unless $ARCH is already set, use uname -m for all other archs:
*) ARCH=$(uname -m) ;;
@@ -41,8 +41,8 @@ CWD=$(pwd)
TMP=${TMP:-/tmp}
PKG=$TMP/package-$PKGNAM
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
SLKLDFLAGS=""
LIBDIRSUFFIX=""
elif [ "$ARCH" = "x86_64" ]; then
diff --git a/deps/telepathy/libsignon-glib/libsignon-glib.url b/deps/telepathy/libsignon-glib/libsignon-glib.url
deleted file mode 100644
index 2c6f064..0000000
--- a/deps/telepathy/libsignon-glib/libsignon-glib.url
+++ /dev/null
@@ -1,2 +0,0 @@
-#https://gitlab.com/accounts-sso/libsignon-glib/repository/archive.tar.gz?ref=1.13
-https://gitlab.com/accounts-sso/libsignon-glib/repository/archive.tar.gz?ref=b74889415b725211c46f107103577bdaddcbd1d5
diff --git a/deps/telepathy/signon-plugin-oauth2/signon-plugin-oauth2.url b/deps/telepathy/signon-plugin-oauth2/.url
index 3c331e3..e49023b 100644
--- a/deps/telepathy/signon-plugin-oauth2/signon-plugin-oauth2.url
+++ b/deps/telepathy/signon-plugin-oauth2/.url
@@ -1 +1 @@
-https://gitlab.com/accounts-sso/signon-plugin-oauth2/repository/archive.tar.gz?ref=3dec32c5c640838db827a962c7866e6983657e1c
+https://gitlab.com/accounts-sso/signon-plugin-oauth2/repository/VERSION_0.24/archive.tar.gz
diff --git a/deps/telepathy/signon-plugin-oauth2/signon-plugin-oauth2.SlackBuild b/deps/telepathy/signon-plugin-oauth2/signon-plugin-oauth2.SlackBuild
index cb6a9bc..536a60c 100755
--- a/deps/telepathy/signon-plugin-oauth2/signon-plugin-oauth2.SlackBuild
+++ b/deps/telepathy/signon-plugin-oauth2/signon-plugin-oauth2.SlackBuild
@@ -1,6 +1,6 @@
#!/bin/sh
-# Copyright 2015, 2016 Eric Hameleers, Eindhoven, NL
+# Copyright 2015, 2016, 2017 Eric Hameleers, Eindhoven, NL
# Copyright 2015 Patrick J. Volkerding, Sebeka, MN, USA
# All rights reserved.
#
@@ -23,25 +23,24 @@
PKGNAM=signon-plugin-oauth2
-VERSION=${VERSION:-"3dec32c_20160414git"}
+VERSION=${VERSION:-"0.24"}
BUILD=${BUILD:-1}
NUMJOBS=${NUMJOBS:--j7}
# Automatically determine the architecture we're building on:
-MARCH=$( uname -m )
if [ -z "$ARCH" ]; then
- case "$MARCH" in
- i?86) export ARCH=i486 ;;
- armv7hl) export ARCH=$MARCH ;;
- arm*) export ARCH=arm ;;
+ case "$(uname -m)" in
+ i?86) ARCH=i586 ;;
+ arm*) readelf /usr/bin/file -A | egrep -q "Tag_CPU.*[4,5]" && ARCH=arm || ARCH=armv7hl ;;
# Unless $ARCH is already set, use uname -m for all other archs:
- *) export ARCH=$MARCH ;;
+ *) ARCH=$(uname -m) ;;
esac
+ export ARCH
fi
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "s390" ]; then
SLKCFLAGS="-O2"
diff --git a/deps/telepathy/signon-ui/.url b/deps/telepathy/signon-ui/.url
new file mode 100644
index 0000000..9c68416
--- /dev/null
+++ b/deps/telepathy/signon-ui/.url
@@ -0,0 +1 @@
+https://gitlab.com/accounts-sso/signon-ui/repository/0.17+15.10.20150810-0ubuntu1/archive.tar.gz
diff --git a/deps/telepathy/signon-ui/signon-ui.SlackBuild b/deps/telepathy/signon-ui/signon-ui.SlackBuild
index a14e177..bf88037 100755
--- a/deps/telepathy/signon-ui/signon-ui.SlackBuild
+++ b/deps/telepathy/signon-ui/signon-ui.SlackBuild
@@ -1,6 +1,6 @@
#!/bin/sh
-# Copyright 2015 Eric Hameleers, Eindhoven, NL
+# Copyright 2015, 2017 Eric Hameleers, Eindhoven, NL
# Copyright 2015 Patrick J. Volkerding, Sebeka, MN, USA
# All rights reserved.
#
@@ -25,24 +25,23 @@
PKGNAM=signon-ui
SRCNAM=signon-ui
VERSION=${VERSION:-"0.17+15.10.20150810"}
-BUILD=${BUILD:-3}
+BUILD=${BUILD:-4}
NUMJOBS=${NUMJOBS:--j7}
# Automatically determine the architecture we're building on:
-MARCH=$( uname -m )
if [ -z "$ARCH" ]; then
- case "$MARCH" in
- i?86) export ARCH=i486 ;;
- armv7hl) export ARCH=$MARCH ;;
- arm*) export ARCH=arm ;;
+ case "$(uname -m)" in
+ i?86) ARCH=i586 ;;
+ arm*) readelf /usr/bin/file -A | egrep -q "Tag_CPU.*[4,5]" && ARCH=arm || ARCH=armv7hl ;;
# Unless $ARCH is already set, use uname -m for all other archs:
- *) export ARCH=$MARCH ;;
+ *) ARCH=$(uname -m) ;;
esac
+ export ARCH
fi
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "s390" ]; then
SLKCFLAGS="-O2"
diff --git a/deps/telepathy/signon-ui/signon-ui.url b/deps/telepathy/signon-ui/signon-ui.url
deleted file mode 100644
index 5b18dc7..0000000
--- a/deps/telepathy/signon-ui/signon-ui.url
+++ /dev/null
@@ -1 +0,0 @@
-http://archive.ubuntu.com/ubuntu/pool/main/s/signon-ui/signon-ui_0.17+15.10.20150810.orig.tar.gz
diff --git a/deps/telepathy/signon/.url b/deps/telepathy/signon/.url
new file mode 100644
index 0000000..f2bc9fb
--- /dev/null
+++ b/deps/telepathy/signon/.url
@@ -0,0 +1 @@
+https://gitlab.com/accounts-sso/signond/repository/VERSION_8.59/archive.tar.gz
diff --git a/deps/telepathy/signon/signon.SlackBuild b/deps/telepathy/signon/signon.SlackBuild
index ba32513..8137abf 100755
--- a/deps/telepathy/signon/signon.SlackBuild
+++ b/deps/telepathy/signon/signon.SlackBuild
@@ -1,6 +1,6 @@
#!/bin/sh
-# Copyright 2015, 2016 Eric Hameleers, Eindhoven, NL
+# Copyright 2015, 2016, 2017 Eric Hameleers, Eindhoven, NL
# Copyright 2015 Patrick J. Volkerding, Sebeka, MN, USA
# All rights reserved.
#
@@ -24,25 +24,25 @@
PKGNAM=signon
SRCNAM=signond
-VERSION=${VERSION:-"49e13c1_20160414git"}
+VERSION=${VERSION:-"8.59"}
BUILD=${BUILD:-1}
NUMJOBS=${NUMJOBS:--j7}
# Automatically determine the architecture we're building on:
-MARCH=$( uname -m )
if [ -z "$ARCH" ]; then
- case "$MARCH" in
- i?86) export ARCH=i486 ;;
- armv7hl) export ARCH=$MARCH ;;
- arm*) export ARCH=arm ;;
+ case "$(uname -m)" in
+ i?86) ARCH=i586 ;;
+ arm*) readelf /usr/bin/file -A | egrep -q "Tag_CPU.*[4,5]" && ARCH=arm || AR
+CH=armv7hl ;;
# Unless $ARCH is already set, use uname -m for all other archs:
- *) export ARCH=$MARCH ;;
+ *) ARCH=$(uname -m) ;;
esac
+ export ARCH
fi
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "s390" ]; then
SLKCFLAGS="-O2"
diff --git a/deps/telepathy/signon/signon.url b/deps/telepathy/signon/signon.url
deleted file mode 100644
index 313e4d5..0000000
--- a/deps/telepathy/signon/signon.url
+++ /dev/null
@@ -1 +0,0 @@
-https://gitlab.com/accounts-sso/signond/repository/archive.tar.gz?ref=49e13c1b5aae35278168984fb1a7c0fc1ad8883e
diff --git a/deps/telepathy/telegram-qt/.url b/deps/telepathy/telegram-qt/.url
new file mode 100644
index 0000000..f182d32
--- /dev/null
+++ b/deps/telepathy/telegram-qt/.url
@@ -0,0 +1 @@
+https://github.com/Kaffeine/telegram-qt/archive/telegram-qt-0.1.0.tar.gz
diff --git a/deps/telepathy/telegram-qt/doinst.sh b/deps/telepathy/telegram-qt/doinst.sh
new file mode 100644
index 0000000..6f09c59
--- /dev/null
+++ b/deps/telepathy/telegram-qt/doinst.sh
@@ -0,0 +1,3 @@
+# Flush D-Bus user/group information caches and trigger policy changes:
+killall -HUP dbus-daemon 2>&1
+
diff --git a/deps/telepathy/telegram-qt/slack-desc b/deps/telepathy/telegram-qt/slack-desc
new file mode 100644
index 0000000..2187119
--- /dev/null
+++ b/deps/telepathy/telegram-qt/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|'
+# on the right side marks the last column you can put a character in. You must
+# make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':'.
+
+ |-----handy-ruler-------------------------------------------------------|
+telegram-qt: telegram-qt (Qt-based library for Telegram network)
+telegram-qt:
+telegram-qt: This package contains a Qt-based library for Telegram network.
+telegram-qt:
+telegram-qt:
+telegram-qt:
+telegram-qt:
+telegram-qt:
+telegram-qt:
+telegram-qt: Homepage: https://github.com/Kaffeine/telegram-qt/
+telegram-qt:
diff --git a/deps/telepathy/telegram-qt/telegram-qt.SlackBuild b/deps/telepathy/telegram-qt/telegram-qt.SlackBuild
new file mode 100755
index 0000000..5d15ce6
--- /dev/null
+++ b/deps/telepathy/telegram-qt/telegram-qt.SlackBuild
@@ -0,0 +1,118 @@
+#!/bin/sh
+
+# Copyright 2016, 2017 Eric Hameleers, Eindhoven, NL
+# Copyright 2016 Patrick J. Volkerding, Sebeka, MN, USA
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ''AS IS'' AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+PKGNAM=telegram-qt
+VERSION=${VERSION:-"0.1.0"}
+BUILD=${BUILD:-2}
+
+NUMJOBS=${NUMJOBS:--j7}
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$(uname -m)" in
+ i?86) ARCH=i586 ;;
+ arm*) readelf /usr/bin/file -A | egrep -q "Tag_CPU.*[4,5]" && ARCH=arm || ARCH=armv7hl ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) ARCH=$(uname -m) ;;
+ esac
+ export ARCH
+fi
+
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "s390" ]; then
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+elif [ "$ARCH" = "armv7hl" ]; then
+ SLKCFLAGS="-O2 -march=armv7-a -mfpu=vfpv3-d16"
+ LIBDIRSUFFIX=""
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+fi
+
+case "$ARCH" in
+ arm*) TARGET=$ARCH-slackware-linux-gnueabi ;;
+ *) TARGET=$ARCH-slackware-linux ;;
+esac
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+PKG=$TMP/package-$PKGNAM
+
+rm -rf $PKG
+mkdir -p $TMP $PKG
+cd $TMP
+rm -rf ${PKGNAM}*-${VERSION}
+tar xvf $CWD/${PKGNAM}*-${VERSION}.tar.?z* || exit 1
+cd ${PKGNAM}*-${VERSION} || exit 1
+
+chown -R root:root .
+find . \
+ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \;
+
+mkdir -p build
+cd build
+ QTDIR=/usr/lib${LIBDIRSUFFIX}/qt5 \
+ PATH=$QTDIR/bin:$PATH \
+ cmake \
+ -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \
+ -DCMAKE_C_FLAGS_RELEASE:STRING="$SLKCFLAGS" \
+ -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
+ -DCMAKE_CXX_FLAGS_RELEASE:STRING="$SLKCFLAGS" \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DLIB_SUFFIX=${LIBDIRSUFFIX} \
+ -DENABLE_EXAMPLES=OFF \
+ -DENABLE_TESTS=OFF \
+ ..
+ make $NUMJOBS || make || exit 1
+ make install DESTDIR=$PKG || exit 1
+cd ..
+
+find $PKG | xargs file | grep -e "executable" -e "shared object" \
+ | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+
+# Compress man pages (if any):
+find $PKG/usr/man -type f -exec gzip -9 {} \;
+for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
+
+mkdir -p $PKG/usr/doc/$PKGNAM-$VERSION
+cp -a \
+ AUTHORS COPYING ChangeLog NEWS README \
+ $PKG/usr/doc/$PKGNAM-$VERSION
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+cd $PKG
+/sbin/makepkg -l y -c n $TMP/$PKGNAM-$VERSION-$ARCH-$BUILD.txz
+
diff --git a/deps/telepathy/telepathy-accounts-signon/telepathy-accounts-signon.url b/deps/telepathy/telepathy-accounts-signon/.url
index 9a0c0e1..9a0c0e1 100644
--- a/deps/telepathy/telepathy-accounts-signon/telepathy-accounts-signon.url
+++ b/deps/telepathy/telepathy-accounts-signon/.url
diff --git a/deps/telepathy/telepathy-accounts-signon/telepathy-accounts-signon.SlackBuild b/deps/telepathy/telepathy-accounts-signon/telepathy-accounts-signon.SlackBuild
index 551a776..7c88c6c 100755
--- a/deps/telepathy/telepathy-accounts-signon/telepathy-accounts-signon.SlackBuild
+++ b/deps/telepathy/telepathy-accounts-signon/telepathy-accounts-signon.SlackBuild
@@ -1,6 +1,6 @@
#!/bin/sh
-# Copyright 2015, 2016 Eric Hameleers, Eindhoven, NL
+# Copyright 2015, 2016, 2017 Eric Hameleers, Eindhoven, NL
# Copyright 2015 Patrick J. Volkerding, Sebeka, MN, USA
# All rights reserved.
#
@@ -24,24 +24,23 @@
PKGNAM=telepathy-accounts-signon
VERSION=${VERSION:-"1.0"}
-BUILD=${BUILD:-3}
+BUILD=${BUILD:-4}
NUMJOBS=${NUMJOBS:--j7}
# Automatically determine the architecture we're building on:
-MARCH=$( uname -m )
if [ -z "$ARCH" ]; then
- case "$MARCH" in
- i?86) export ARCH=i486 ;;
- armv7hl) export ARCH=$MARCH ;;
- arm*) export ARCH=arm ;;
+ case "$(uname -m)" in
+ i?86) ARCH=i586 ;;
+ arm*) readelf /usr/bin/file -A | egrep -q "Tag_CPU.*[4,5]" && ARCH=arm || ARCH=armv7hl ;;
# Unless $ARCH is already set, use uname -m for all other archs:
- *) export ARCH=$MARCH ;;
+ *) ARCH=$(uname -m) ;;
esac
+ export ARCH
fi
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "s390" ]; then
SLKCFLAGS="-O2"
diff --git a/deps/telepathy/telepathy-farstream/telepathy-farstream.url b/deps/telepathy/telepathy-farstream/.url
index 948ff63..948ff63 100644
--- a/deps/telepathy/telepathy-farstream/telepathy-farstream.url
+++ b/deps/telepathy/telepathy-farstream/.url
diff --git a/deps/telepathy/telepathy-gabble/telepathy-gabble.url b/deps/telepathy/telepathy-gabble/.url
index 9094aa8..d5aa873 100644
--- a/deps/telepathy/telepathy-gabble/telepathy-gabble.url
+++ b/deps/telepathy/telepathy-gabble/.url
@@ -1 +1 @@
-http://telepathy.freedesktop.org/releases/telepathy-gabble/telepathy-gabble-0.18.3.tar.gz
+http://telepathy.freedesktop.org/releases/telepathy-gabble/telepathy-gabble-0.18.4.tar.gz
diff --git a/deps/telepathy/telepathy-gabble/telepathy-gabble.SlackBuild b/deps/telepathy/telepathy-gabble/telepathy-gabble.SlackBuild
index 923c085..b2977cf 100755
--- a/deps/telepathy/telepathy-gabble/telepathy-gabble.SlackBuild
+++ b/deps/telepathy/telepathy-gabble/telepathy-gabble.SlackBuild
@@ -1,6 +1,6 @@
#!/bin/sh
-# Copyright 2015, 2016 Eric Hameleers, Eindhoven, NL
+# Copyright 2015, 2016, 2017 Eric Hameleers, Eindhoven, NL
# Copyright 2015 Patrick J. Volkerding, Sebeka, MN, USA
# All rights reserved.
#
@@ -23,25 +23,24 @@
PKGNAM=telepathy-gabble
-VERSION=${VERSION:-"0.18.3"}
-BUILD=${BUILD:-3}
+VERSION=${VERSION:-"0.18.4"}
+BUILD=${BUILD:-2}
NUMJOBS=${NUMJOBS:--j7}
# Automatically determine the architecture we're building on:
-MARCH=$( uname -m )
if [ -z "$ARCH" ]; then
- case "$MARCH" in
- i?86) export ARCH=i486 ;;
- armv7hl) export ARCH=$MARCH ;;
- arm*) export ARCH=arm ;;
+ case "$(uname -m)" in
+ i?86) ARCH=i586 ;;
+ arm*) readelf /usr/bin/file -A | egrep -q "Tag_CPU.*[4,5]" && ARCH=arm || ARCH=armv7hl ;;
# Unless $ARCH is already set, use uname -m for all other archs:
- *) export ARCH=$MARCH ;;
+ *) ARCH=$(uname -m) ;;
esac
+ export ARCH
fi
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "s390" ]; then
SLKCFLAGS="-O2"
diff --git a/deps/telepathy/telepathy-glib/telepathy-glib.url b/deps/telepathy/telepathy-glib/.url
index 1c9d8f1..1c9d8f1 100644
--- a/deps/telepathy/telepathy-glib/telepathy-glib.url
+++ b/deps/telepathy/telepathy-glib/.url
diff --git a/deps/telepathy/telepathy-glib/telepathy-glib.SlackBuild b/deps/telepathy/telepathy-glib/telepathy-glib.SlackBuild
index bfc748f..a176de3 100755
--- a/deps/telepathy/telepathy-glib/telepathy-glib.SlackBuild
+++ b/deps/telepathy/telepathy-glib/telepathy-glib.SlackBuild
@@ -1,6 +1,6 @@
#!/bin/sh
-# Copyright 2015, 2016 Eric Hameleers, Eindhoven, NL
+# Copyright 2015, 2016, 2017 Eric Hameleers, Eindhoven, NL
# Copyright 2015 Patrick J. Volkerding, Sebeka, MN, USA
# All rights reserved.
#
@@ -24,24 +24,23 @@
PKGNAM=telepathy-glib
VERSION=${VERSION:-"0.24.1"}
-BUILD=${BUILD:-3}
+BUILD=${BUILD:-4}
NUMJOBS=${NUMJOBS:--j7}
# Automatically determine the architecture we're building on:
-MARCH=$( uname -m )
if [ -z "$ARCH" ]; then
- case "$MARCH" in
- i?86) export ARCH=i486 ;;
- armv7hl) export ARCH=$MARCH ;;
- arm*) export ARCH=arm ;;
+ case "$(uname -m)" in
+ i?86) ARCH=i586 ;;
+ arm*) readelf /usr/bin/file -A | egrep -q "Tag_CPU.*[4,5]" && ARCH=arm || ARCH=armv7hl ;;
# Unless $ARCH is already set, use uname -m for all other archs:
- *) export ARCH=$MARCH ;;
+ *) ARCH=$(uname -m) ;;
esac
+ export ARCH
fi
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "s390" ]; then
SLKCFLAGS="-O2"
diff --git a/deps/telepathy/telepathy-haze/telepathy-haze.url b/deps/telepathy/telepathy-haze/.url
index efb0535..efb0535 100644
--- a/deps/telepathy/telepathy-haze/telepathy-haze.url
+++ b/deps/telepathy/telepathy-haze/.url
diff --git a/deps/telepathy/telepathy-logger-qt5/.url b/deps/telepathy/telepathy-logger-qt5/.url
new file mode 100644
index 0000000..89f5718
--- /dev/null
+++ b/deps/telepathy/telepathy-logger-qt5/.url
@@ -0,0 +1 @@
+https://download.kde.org/stable/telepathy-logger-qt/17.08/src/telepathy-logger-qt-17.08.0.tar.xz
diff --git a/deps/telepathy/telepathy-logger-qt5/telepathy-logger-qt5.SlackBuild b/deps/telepathy/telepathy-logger-qt5/telepathy-logger-qt5.SlackBuild
index 9de0fab..eddef2d 100755
--- a/deps/telepathy/telepathy-logger-qt5/telepathy-logger-qt5.SlackBuild
+++ b/deps/telepathy/telepathy-logger-qt5/telepathy-logger-qt5.SlackBuild
@@ -21,20 +21,20 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-# Modified 2015, 2016 by Eric Hameleers <alien@slackware.com>
+# Modified 2015, 2016, 2017 by Eric Hameleers <alien@slackware.com>
PKGNAM=telepathy-logger-qt5
SRCNAM=telepathy-logger-qt
-VERSION=${VERSION:-15.04.0}
-BUILD=${BUILD:-3}
+VERSION=${VERSION:-17.08.0}
+BUILD=${BUILD:-1}
NUMJOBS=${NUMJOBS:--j7}
# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
case "$(uname -m)" in
- i?86) ARCH=i486 ;;
+ i?86) ARCH=i586 ;;
arm*) readelf /usr/bin/file -A | egrep -q "Tag_CPU.*[4,5]" && ARCH=arm || ARCH=armv7hl ;;
# Unless $ARCH is already set, use uname -m for all other archs:
*) ARCH=$(uname -m) ;;
@@ -42,8 +42,8 @@ if [ -z "$ARCH" ]; then
export ARCH
fi
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
SLKLDFLAGS=""
LIBDIRSUFFIX=""
elif [ "$ARCH" = "x86_64" ]; then
diff --git a/deps/telepathy/telepathy-logger-qt5/telepathy-logger-qt5.url b/deps/telepathy/telepathy-logger-qt5/telepathy-logger-qt5.url
deleted file mode 100644
index 377fe07..0000000
--- a/deps/telepathy/telepathy-logger-qt5/telepathy-logger-qt5.url
+++ /dev/null
@@ -1 +0,0 @@
-http://download.kde.org/stable/telepathy-logger-qt/15.04/src/telepathy-logger-qt-15.04.0.tar.xz
diff --git a/deps/telepathy/telepathy-logger/telepathy-logger.url b/deps/telepathy/telepathy-logger/.url
index e729ead..e729ead 100644
--- a/deps/telepathy/telepathy-logger/telepathy-logger.url
+++ b/deps/telepathy/telepathy-logger/.url
diff --git a/deps/telepathy/telepathy-logger/telepathy-logger.SlackBuild b/deps/telepathy/telepathy-logger/telepathy-logger.SlackBuild
index f43b321..013b627 100755
--- a/deps/telepathy/telepathy-logger/telepathy-logger.SlackBuild
+++ b/deps/telepathy/telepathy-logger/telepathy-logger.SlackBuild
@@ -21,19 +21,19 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-# Modified 2015, 2016 by Eric Hameleers <alien@slackware.com>
+# Modified 2015, 2016, 2017 by Eric Hameleers <alien@slackware.com>
PKGNAM=telepathy-logger
VERSION=${VERSION:-0.8.2}
-BUILD=${BUILD:-3}
+BUILD=${BUILD:-5}
NUMJOBS=${NUMJOBS:--j7}
# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
case "$(uname -m)" in
- i?86) ARCH=i486 ;;
+ i?86) ARCH=i586 ;;
arm*) readelf /usr/bin/file -A | egrep -q "Tag_CPU.*[4,5]" && ARCH=arm || ARCH=armv7hl ;;
# Unless $ARCH is already set, use uname -m for all other archs:
*) ARCH=$(uname -m) ;;
@@ -41,8 +41,8 @@ if [ -z "$ARCH" ]; then
export ARCH
fi
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "s390" ]; then
SLKCFLAGS="-O2"
diff --git a/deps/telepathy/telepathy-mission-control/telepathy-mission-control.url b/deps/telepathy/telepathy-mission-control/.url
index f466165..802a652 100644
--- a/deps/telepathy/telepathy-mission-control/telepathy-mission-control.url
+++ b/deps/telepathy/telepathy-mission-control/.url
@@ -1 +1 @@
-http://telepathy.freedesktop.org/releases/telepathy-mission-control/telepathy-mission-control-5.16.3.tar.gz
+http://telepathy.freedesktop.org/releases/telepathy-mission-control/telepathy-mission-control-5.16.4.tar.gz
diff --git a/deps/telepathy/telepathy-mission-control/telepathy-mission-control.SlackBuild b/deps/telepathy/telepathy-mission-control/telepathy-mission-control.SlackBuild
index 260ff63..9fb5b5d 100755
--- a/deps/telepathy/telepathy-mission-control/telepathy-mission-control.SlackBuild
+++ b/deps/telepathy/telepathy-mission-control/telepathy-mission-control.SlackBuild
@@ -1,6 +1,6 @@
#!/bin/sh
-# Copyright 2015, 2016 Eric Hameleers, Eindhoven, NL
+# Copyright 2015, 2016, 2017, 2018 Eric Hameleers, Eindhoven, NL
# Copyright 2015 Patrick J. Volkerding, Sebeka, MN, USA
# All rights reserved.
#
@@ -23,25 +23,25 @@
PKGNAM=telepathy-mission-control
-VERSION=${VERSION:-"5.16.3"}
-BUILD=${BUILD:-3}
+VERSION=${VERSION:-"5.16.4"}
+BUILD=${BUILD:-2}
NUMJOBS=${NUMJOBS:--j7}
# Automatically determine the architecture we're building on:
-MARCH=$( uname -m )
if [ -z "$ARCH" ]; then
- case "$MARCH" in
- i?86) export ARCH=i486 ;;
- armv7hl) export ARCH=$MARCH ;;
- arm*) export ARCH=arm ;;
+ case "$(uname -m)" in
+ i?86) ARCH=i586 ;;
+ arm*) readelf /usr/bin/file -A | egrep -q "Tag_CPU.*[4,5]" && ARCH=arm || AR
+CH=armv7hl ;;
# Unless $ARCH is already set, use uname -m for all other archs:
- *) export ARCH=$MARCH ;;
+ *) ARCH=$(uname -m) ;;
esac
+ export ARCH
fi
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "s390" ]; then
SLKCFLAGS="-O2"
diff --git a/deps/telepathy/telepathy-morse/.url b/deps/telepathy/telepathy-morse/.url
new file mode 100644
index 0000000..224a0b2
--- /dev/null
+++ b/deps/telepathy/telepathy-morse/.url
@@ -0,0 +1 @@
+https://github.com/TelepathyIM/telepathy-morse.git
diff --git a/deps/telepathy/telepathy-morse/doinst.sh b/deps/telepathy/telepathy-morse/doinst.sh
new file mode 100644
index 0000000..6f09c59
--- /dev/null
+++ b/deps/telepathy/telepathy-morse/doinst.sh
@@ -0,0 +1,3 @@
+# Flush D-Bus user/group information caches and trigger policy changes:
+killall -HUP dbus-daemon 2>&1
+
diff --git a/deps/telepathy/telepathy-morse/slack-desc b/deps/telepathy/telepathy-morse/slack-desc
new file mode 100644
index 0000000..3c1d22b
--- /dev/null
+++ b/deps/telepathy/telepathy-morse/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|'
+# on the right side marks the last column you can put a character in. You must
+# make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':'.
+
+ |-----handy-ruler-------------------------------------------------------|
+telepathy-morse: telepathy-morse (Telegram connection manager for Telepathy)
+telepathy-morse:
+telepathy-morse: Morse is a Qt-based Telegram connection manager for
+telepathy-morse: the Telepathy framework.
+telepathy-morse:
+telepathy-morse:
+telepathy-morse:
+telepathy-morse:
+telepathy-morse:
+telepathy-morse: Homepage: http://telepathy.freedesktop.org/
+telepathy-morse:
diff --git a/deps/telepathy/telepathy-morse/telepathy-morse.SlackBuild b/deps/telepathy/telepathy-morse/telepathy-morse.SlackBuild
new file mode 100755
index 0000000..8e4d234
--- /dev/null
+++ b/deps/telepathy/telepathy-morse/telepathy-morse.SlackBuild
@@ -0,0 +1,118 @@
+#!/bin/sh
+
+# Copyright 2016, 2017 Eric Hameleers, Eindhoven, NL
+# Copyright 2016 Patrick J. Volkerding, Sebeka, MN, USA
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ''AS IS'' AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+PKGNAM=telepathy-morse
+VERSION=${VERSION:-"9429155_20161107git"}
+BUILD=${BUILD:-2}
+
+NUMJOBS=${NUMJOBS:--j7}
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$(uname -m)" in
+ i?86) ARCH=i586 ;;
+ arm*) readelf /usr/bin/file -A | egrep -q "Tag_CPU.*[4,5]" && ARCH=arm || ARCH=armv7hl ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) ARCH=$(uname -m) ;;
+ esac
+ export ARCH
+fi
+
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "s390" ]; then
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+elif [ "$ARCH" = "armv7hl" ]; then
+ SLKCFLAGS="-O2 -march=armv7-a -mfpu=vfpv3-d16"
+ LIBDIRSUFFIX=""
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+fi
+
+case "$ARCH" in
+ arm*) TARGET=$ARCH-slackware-linux-gnueabi ;;
+ *) TARGET=$ARCH-slackware-linux ;;
+esac
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+PKG=$TMP/package-$PKGNAM
+
+rm -rf $PKG
+mkdir -p $TMP $PKG
+cd $TMP
+rm -rf $PKGNAM-$VERSION
+tar xvf $CWD/$PKGNAM-$VERSION.tar.?z* || exit 1
+cd $PKGNAM-$VERSION || exit 1
+
+chown -R root:root .
+find . \
+ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \;
+
+mkdir -p build
+cd build
+ QTDIR=/usr/lib${LIBDIRSUFFIX}/qt5 \
+ PATH=$QTDIR/bin:$PATH \
+ cmake \
+ -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \
+ -DCMAKE_C_FLAGS_RELEASE:STRING="$SLKCFLAGS" \
+ -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
+ -DCMAKE_CXX_FLAGS_RELEASE:STRING="$SLKCFLAGS" \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DLIB_SUFFIX=${LIBDIRSUFFIX} \
+ -DENABLE_EXAMPLES=OFF \
+ -DENABLE_TESTS=OFF \
+ ..
+ make $NUMJOBS || make || exit 1
+ make install DESTDIR=$PKG || exit 1
+cd ..
+
+find $PKG | xargs file | grep -e "executable" -e "shared object" \
+ | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+
+# Compress man pages (if any):
+find $PKG/usr/man -type f -exec gzip -9 {} \;
+for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
+
+mkdir -p $PKG/usr/doc/$PKGNAM-$VERSION
+cp -a \
+ AUTHORS COPYING ChangeLog NEWS README \
+ $PKG/usr/doc/$PKGNAM-$VERSION
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+cd $PKG
+/sbin/makepkg -l y -c n $TMP/$PKGNAM-$VERSION-$ARCH-$BUILD.txz
+
diff --git a/deps/telepathy/telepathy-qt5/telepathy-qt5.url b/deps/telepathy/telepathy-qt5/.url
index ac56368..fbfa203 100644
--- a/deps/telepathy/telepathy-qt5/telepathy-qt5.url
+++ b/deps/telepathy/telepathy-qt5/.url
@@ -1 +1 @@
-http://telepathy.freedesktop.org/releases/telepathy-qt/telepathy-qt-0.9.6.1.tar.gz
+http://telepathy.freedesktop.org/releases/telepathy-qt/telepathy-qt-0.9.7.tar.gz
diff --git a/deps/telepathy/telepathy-qt5/telepathy-qt5.SlackBuild b/deps/telepathy/telepathy-qt5/telepathy-qt5.SlackBuild
index 4002753..f8bd93f 100755
--- a/deps/telepathy/telepathy-qt5/telepathy-qt5.SlackBuild
+++ b/deps/telepathy/telepathy-qt5/telepathy-qt5.SlackBuild
@@ -1,6 +1,6 @@
#!/bin/sh
-# Copyright 2015, 2016 Eric Hameleers, Eindhoven, NL
+# Copyright 2015, 2016, 2017 Eric Hameleers, Eindhoven, NL
# Copyright 2015 Patrick J. Volkerding, Sebeka, MN, USA
# All rights reserved.
#
@@ -24,15 +24,15 @@
PKGNAM=telepathy-qt5
SRCNAM=telepathy-qt
-VERSION=${VERSION:-0.9.6.1}
-BUILD=${BUILD:-3}
+VERSION=${VERSION:-0.9.7}
+BUILD=${BUILD:-2}
NUMJOBS=${NUMJOBS:--j7}
# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
case "$(uname -m)" in
- i?86) ARCH=i486 ;;
+ i?86) ARCH=i586 ;;
arm*) readelf /usr/bin/file -A | egrep -q "Tag_CPU.*[4,5]" && ARCH=arm || ARCH=armv7hl ;;
# Unless $ARCH is already set, use uname -m for all other archs:
*) ARCH=$(uname -m) ;;
@@ -40,8 +40,8 @@ if [ -z "$ARCH" ]; then
export ARCH
fi
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
SLKLDFLAGS=""
LIBDIRSUFFIX=""
elif [ "$ARCH" = "x86_64" ]; then
@@ -70,10 +70,10 @@ rm -rf $SRCNAM-$VERSION
tar xvf $CWD/$SRCNAM-$VERSION.tar.?z* || exit 1
cd $SRCNAM-$VERSION || exit 1
-# Compensate for the new glibc:
-cat $CWD/patches/glibc-2.20.patch | patch -p1 --verbose || exit 1
-# Compensate for the new gstreamer-1.0:
-cat $CWD/patches/gstreamer-1.0.patch | patch -p1 --verbose || exit 1
+## Compensate for the new glibc:
+#cat $CWD/patches/glibc-2.20.patch | patch -p1 --verbose || exit 1
+## Compensate for the new gstreamer-1.0:
+#cat $CWD/patches/gstreamer-1.0.patch | patch -p1 --verbose || exit 1
chown -R root:root .
find . \
diff --git a/deps/telepathy/telepathy.SlackBuild b/deps/telepathy/telepathy.SlackBuild
index f80ab27..21831ce 100755
--- a/deps/telepathy/telepathy.SlackBuild
+++ b/deps/telepathy/telepathy.SlackBuild
@@ -28,6 +28,8 @@ ALLDEPS=" \
telepathy-haze \
telepathy-gabble \
telepathy-qt5 \
+ telegram-qt \
+ telepathy-morse \
telepathy-logger \
telepathy-logger-qt5 \
telepathy-mission-control \
diff --git a/deps/updates.SlackBuild b/deps/updates.SlackBuild
index 97def37..380d529 100755
--- a/deps/updates.SlackBuild
+++ b/deps/updates.SlackBuild
@@ -18,6 +18,7 @@ ALLDEPS=" \
ninja \
sni-qt \
OpenAL \
+ libwacom \
libinput \
libxkbcommon \
wayland \
@@ -28,7 +29,10 @@ ALLDEPS=" \
qt-gstreamer \
phonon \
phonon-gstreamer \
+ sip \
+ PyQt \
PyQt5 \
+ QScintilla \
polkit-qt5-1 \
grantlee \
grantlee-qt4 \
@@ -39,13 +43,32 @@ ALLDEPS=" \
libappindicator \
cfitsio \
lmdb \
+ libdmtx \
+ qrencode \
libproxy \
telepathy \
hack-font-ttf \
noto-font-ttf \
noto-cjk-font-ttf \
- elogind \
+ gpgme \
+ lensfun \
+ opencv \
+ dvdauthor \
+ vid.stab \
+ frei0r-plugins \
+ mlt \
+ cracklib \
+ libpwquality \
+ accountsservice \
+ libburn \
+ qtav \
+ ddcutil \
+ id3lib \
+ cryptopp \
+ cryfs \
"
+ # Only needed when adding support for Wayland:
+ #elogind \
# Not needed, conflicts with qt-gstreamer files
#qt-gstreamer0 \
diff --git a/deps/vid.stab/.url b/deps/vid.stab/.url
new file mode 100644
index 0000000..b98ec60
--- /dev/null
+++ b/deps/vid.stab/.url
@@ -0,0 +1 @@
+https://github.com/georgmartius/vid.stab.git
diff --git a/deps/vid.stab/slack-desc b/deps/vid.stab/slack-desc
new file mode 100644
index 0000000..8e056b5
--- /dev/null
+++ b/deps/vid.stab/slack-desc
@@ -0,0 +1,20 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|'
+# on the right side marks the last column you can put a character in. You must
+# make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+vid.stab: vid.stab (video stabilization library)
+vid.stab:
+vid.stab: Vidstab is a video stabilization library which can be plugged-in
+vid.stab: with FFmpeg and Kdenlive.
+vid.stab:
+vid.stab:
+vid.stab:
+vid.stab:
+vid.stab:
+vid.stab: See also: http://public.hronopik.de/vid.stab/
+vid.stab:
+
diff --git a/deps/vid.stab/vid.stab.SlackBuild b/deps/vid.stab/vid.stab.SlackBuild
new file mode 100755
index 0000000..61cd0ce
--- /dev/null
+++ b/deps/vid.stab/vid.stab.SlackBuild
@@ -0,0 +1,118 @@
+#!/bin/sh
+
+# Copyright 2017 Eric Hameleers, Eindhoven, NL
+# Copyright 2017 Patrick J. Volkerding, Sebeka, MN, USA
+# All rights reserved.
+#
+# Permission to use, copy, modify, and distribute this software for
+# any purpose with or without fee is hereby granted, provided that
+# the above copyright notice and this permission notice appear in all
+# copies.
+#
+# THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+# IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
+# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+# USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+# OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+# SUCH DAMAGE.
+# -----------------------------------------------------------------------------
+
+
+PKGNAM=vid.stab
+VERSION=${VERSION:-97c6ae2_20150529git}
+BUILD=${BUILD:-1}
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+PKG=$TMP/package-$PKGNAM
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$(uname -m)" in
+ i?86) ARCH=i486 ;;
+ arm*) readelf /usr/bin/file -A | egrep -q "Tag_CPU.*[4,5]" && ARCH=arm || ARCH=armv7hl ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) ARCH=$(uname -m) ;;
+ esac
+ export ARCH
+fi
+
+if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+ SLKLDFLAGS=""
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ SLKLDFLAGS="-L/usr/lib64"
+ LIBDIRSUFFIX="64"
+elif [ "$ARCH" = "armv7hl" ]; then
+ SLKCFLAGS="-O3 -march=armv7-a -mfpu=vfpv3-d16"
+ SLKLDFLAGS=""
+ LIBDIRSUFFIX=""
+else
+ SLKCFLAGS="-O2"
+ SLKLDFLAGS=""
+ LIBDIRSUFFIX=""
+fi
+
+case "$ARCH" in
+ arm*) TARGET=$ARCH-slackware-linux-gnueabi ;;
+ *) TARGET=$ARCH-slackware-linux ;;
+esac
+
+rm -rf $PKG
+mkdir -p $TMP $PKG
+cd $TMP
+rm -rf $PKGNAM-$VERSION
+tar xvf $CWD/$PKGNAM-$VERSION.tar.?z* || exit 1
+cd $PKGNAM-$VERSION || exit 1
+
+# Fix bogus permissions:
+chown -R root:root .
+find . \
+ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \;
+
+# Configure and compile:
+mkdir -p build
+cd build
+ cmake \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \
+ -DCMAKE_C_FLAGS_RELEASE:STRING="$SLKCFLAGS" \
+ -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
+ -DCMAKE_CXX_FLAGS_RELEASE:STRING="$SLKCFLAGS" \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DLIB_SUFFIX=${LIBDIRSUFFIX} \
+ -DUSE_OMP=OFF \
+ ..
+ make
+ make install DESTDIR=$PKG
+cd ..
+
+# Add documentation:
+mkdir -p $PKG/usr/doc/$PKGNAM-$VERSION
+cp -a \
+ Changelog LICENSE README.md Todo \
+ $PKG/usr/doc/$PKGNAM-$VERSION
+
+# Strip binaries:
+find $PKG | xargs file | grep -e "executable" -e "shared object" \
+ | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+
+# Add a package description:
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+# Build the package:
+cd $PKG
+makepkg -l y -c n $TMP/${PKGNAM}-${VERSION}-${ARCH}-${BUILD}.txz
+
diff --git a/deps/wayland-protocols/.url b/deps/wayland-protocols/.url
new file mode 100644
index 0000000..45e2e88
--- /dev/null
+++ b/deps/wayland-protocols/.url
@@ -0,0 +1,3 @@
+https://wayland.freedesktop.org/releases/wayland-protocols-1.12.tar.xz
+https://wayland.freedesktop.org/releases/wayland-protocols-1.12.tar.xz.sig
+
diff --git a/deps/wayland-protocols/slack-desc b/deps/wayland-protocols/slack-desc
new file mode 100644
index 0000000..d2fd941
--- /dev/null
+++ b/deps/wayland-protocols/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description.
+# Line up the first '|' above the ':' following the base package name, and
+# the '|' on the right side marks the last column you can put a character in.
+# You must make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':' except on otherwise blank lines.
+
+ |-----handy-ruler------------------------------------------------------|
+wayland-protocols: wayland-protocols (specs of extended wayland protocols)
+wayland-protocols:
+wayland-protocols: wayland-protocols contains Wayland protocols that add functionality
+wayland-protocols: not available in the Wayland core protocol.
+wayland-protocols: Such protocols either add completely new functionality, or extend the
+wayland-protocols: functionality of some other protocol either in Wayland core, or
+wayland-protocols: some other protocol in wayland-protocols.
+wayland-protocols: Protocols may be 'stable', 'unstable' or 'deprecated'.
+wayland-protocols:
+wayland-protocols: Homepage: http://wayland.freedesktop.org/
+wayland-protocols:
diff --git a/deps/wayland-protocols/wayland-protocols.SlackBuild b/deps/wayland-protocols/wayland-protocols.SlackBuild
new file mode 100755
index 0000000..9e94b93
--- /dev/null
+++ b/deps/wayland-protocols/wayland-protocols.SlackBuild
@@ -0,0 +1,137 @@
+#!/bin/sh
+# Copyright 2017 Patrick J. Volkerding, Sebeka, MN, USA
+# Copyright 2017 Eric Hameleers, Eindhoven, NL
+# All rights reserved.
+#
+# Permission to use, copy, modify, and distribute this software for
+# any purpose with or without fee is hereby granted, provided that
+# the above copyright notice and this permission notice appear in all
+# copies.
+#
+# THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+# IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
+# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+# USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+# OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+# SUCH DAMAGE.
+# -----------------------------------------------------------------------------
+
+
+PKGNAM=wayland-protocols
+VERSION=${VERSION:-1.12}
+BUILD=${BUILD:-1}
+
+NUMJOBS=${NUMJOBS:-" -j7 "}
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+PKG=$TMP/package-$PKGNAM
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$(uname -m)" in
+ i?86) ARCH=i586 ;;
+ arm*) readelf /usr/bin/file -A | egrep -q "Tag_CPU.*[4,5]" && ARCH=arm || ARCH=armv7hl ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) ARCH=$(uname -m) ;;
+ esac
+ export ARCH
+fi
+
+# Set CFLAGS/CXXFLAGS and LIBDIRSUFFIX:
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "s390" ]; then
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+elif [ "$ARCH" = "arm" ]; then
+ SLKCFLAGS="-O2 -march=armv5te"
+ LIBDIRSUFFIX=""
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+fi
+
+case "$ARCH" in
+ arm*) TARGET=$ARCH-slackware-linux-gnueabi ;;
+ *) TARGET=$ARCH-slackware-linux ;;
+esac
+
+rm -rf $PKG
+mkdir -p $TMP $PKG
+cd $TMP
+rm -rf $PKGNAM-$VERSION
+tar xvf $CWD/$PKGNAM-$VERSION.tar.xz || exit 1
+cd $PKGNAM-$VERSION || exit 1
+
+# Make sure ownerships and permissions are sane:
+chown -R root:root .
+find . \
+ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \;
+
+# Configure:
+CFLAGS="$SLKCFLAGS" \
+CXXFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --sysconfdir=/etc \
+ --localstatedir=/var \
+ --mandir=/usr/man \
+ --docdir=/usr/doc/$PKGNAM-$VERSION \
+ --enable-static=no \
+ --build=$TARGET
+
+# Build and install:
+make $NUMJOBS || make || exit 1
+make install DESTDIR=$PKG || exit 1
+
+# Strip binaries:
+find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | \
+ grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
+
+# Compress and link manpages, if any:
+if [ -d $PKG/usr/man ]; then
+ ( cd $PKG/usr/man
+ for manpagedir in $(find . -type d -name "man*") ; do
+ ( cd $manpagedir
+ for eachpage in $( find . -type l -maxdepth 1) ; do
+ ln -s $( readlink $eachpage ).gz $eachpage.gz
+ rm $eachpage
+ done
+ gzip -9 *.?
+ )
+ done
+ )
+fi
+
+# Add documentation:
+mkdir -p $PKG/usr/doc/$PKGNAM-$VERSION
+cp -a \
+ COPYING README \
+ $PKG/usr/doc/$PKGNAM-$VERSION
+
+# Add a description:
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+# Create the package:
+cd $PKG
+/sbin/makepkg -l y -c n $TMP/$PKGNAM-$VERSION-$ARCH-$BUILD.txz
+
diff --git a/deps/wayland/.url b/deps/wayland/.url
new file mode 100644
index 0000000..f32621e
--- /dev/null
+++ b/deps/wayland/.url
@@ -0,0 +1,2 @@
+https://wayland.freedesktop.org/releases/wayland-1.14.0.tar.xz
+
diff --git a/deps/wayland/wayland.SlackBuild b/deps/wayland/wayland.SlackBuild
index cc574da..2563450 100755
--- a/deps/wayland/wayland.SlackBuild
+++ b/deps/wayland/wayland.SlackBuild
@@ -1,6 +1,6 @@
#!/bin/sh
# Copyright 2015 Patrick J. Volkerding, Sebeka, MN, USA
-# Copyright 2015 Eric Hameleers, Eindhoven, NL
+# Copyright 2015, 2017 Eric Hameleers, Eindhoven, NL
# All rights reserved.
#
# Permission to use, copy, modify, and distribute this software for
@@ -24,47 +24,45 @@
PKGNAM=wayland
-VERSION=${VERSION:-1.9.0}
+VERSION=${VERSION:-1.14.0}
BUILD=${BUILD:-1}
-NUMJOBS=${NUMJOBS:" -j4 "}
+NUMJOBS=${NUMJOBS:-" -j4 "}
CWD=$(pwd)
TMP=${TMP:-/tmp}
PKG=$TMP/package-$PKGNAM
-if [ -e $CWD/machine.conf ]; then
- . $CWD/machine.conf ]
-elif [ -e /etc/slackbuild/machine.conf ]; then
- . /etc/slackbuild/machine.conf ]
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$(uname -m)" in
+ i?86) ARCH=i486 ;;
+ arm*) readelf /usr/bin/file -A | egrep -q "Tag_CPU.*[4,5]" && ARCH=arm || ARCH=armv7hl ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) ARCH=$(uname -m) ;;
+ esac
+ export ARCH
+fi
+
+# Set CFLAGS/CXXFLAGS and LIBDIRSUFFIX:
+if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "s390" ]; then
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+elif [ "$ARCH" = "arm" ]; then
+ SLKCFLAGS="-O2 -march=armv5te"
+ LIBDIRSUFFIX=""
else
- # Automatically determine the architecture we're building on:
- MARCH=$( uname -m )
- if [ -z "$ARCH" ]; then
- case "$MARCH" in
- i?86) export ARCH=i486 ;;
- arm*) export ARCH=arm ;;
- # Unless $ARCH is already set, use uname -m for all other archs:
- *) export ARCH=$MARCH ;;
- esac
- fi
- # Set CFLAGS/CXXFLAGS and LIBDIRSUFFIX:
- if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
- LIBDIRSUFFIX=""
- elif [ "$ARCH" = "s390" ]; then
- SLKCFLAGS="-O2"
- LIBDIRSUFFIX=""
- elif [ "$ARCH" = "x86_64" ]; then
- SLKCFLAGS="-O2 -fPIC"
- LIBDIRSUFFIX="64"
- elif [ "$ARCH" = "arm" ]; then
- SLKCFLAGS="-O2 -march=armv5te"
- LIBDIRSUFFIX=""
- else
- SLKCFLAGS="-O2"
- LIBDIRSUFFIX=""
- fi
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
fi
case "$ARCH" in
diff --git a/deps/wayland_updates b/deps/wayland_updates
new file mode 100644
index 0000000..058535e
--- /dev/null
+++ b/deps/wayland_updates
@@ -0,0 +1,2 @@
+deps: mesa xorg-server libxkbcommon qt5
+frameworks:kwayland
diff --git a/deps/xorg-server/xorg-server.SlackBuild b/deps/xorg-server/xorg-server.SlackBuild
index 93390c3..dc96755 100755
--- a/deps/xorg-server/xorg-server.SlackBuild
+++ b/deps/xorg-server/xorg-server.SlackBuild
@@ -1,5 +1,5 @@
#!/bin/sh
-# Copyright 2007-2016 Patrick J. Volkerding, Sebeka, MN, USA
+# Copyright 2007-2018 Patrick J. Volkerding, Sebeka, MN, USA
# All rights reserved.
#
# Permission to use, copy, modify, and distribute this software for
@@ -22,53 +22,55 @@
# -----------------------------------------------------------------------------
# Condensed from the modular x11.SlackBuild
-# 2016 by Eric Hameleers <alien@slackware.com>
+# 2016, 2017, 2018 by Eric Hameleers <alien@slackware.com>
# Note: this package contains _all_ X servers. Not just Xorg, but also:
# Xnest, Xephyr, Xvfb, Xwayland.
PKGNAM=xorg-server
-VERSION=${VERSION:-1.18.4}
-BUILD=${BUILD:-1}
+VERSION=${VERSION:-1.19.6}
+BUILD=${BUILD:-2}
-CWD=$(pwd)
+cd $(dirname $0) ; CWD=$(pwd)
TMP=${TMP:-/tmp}
PKG=$TMP/package-$PKGNAM
-if [ -e $CWD/machine.conf ]; then
- . $CWD/machine.conf ]
-elif [ -e /etc/slackbuild/machine.conf ]; then
- . /etc/slackbuild/machine.conf ]
+# Automatically determine the architecture we're building on:
+MARCH=$( uname -m )
+if [ -z "$ARCH" ]; then
+ case "$MARCH" in
+ i?86) export ARCH=i586 ;;
+ arm*) readelf /usr/bin/file -A | egrep -q "Tag_CPU.*[4,5]" && ARCH=arm || ARCH=armv7hl ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$MARCH ;;
+ esac
+fi
+
+# If this variable is passed to the script, nothing will be built.
+# Instead, a list of packages to be built will be output.
+if [ ! -z "$PRINT_PACKAGE_NAME" ]; then
+ echo "${PKGNAME}-${VERSION}-${ARCH}-${BUILD}.txz"
+ exit 0
+fi
+
+# Set CFLAGS/CXXFLAGS and LIBDIRSUFFIX:
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "s390" ]; then
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+elif [ "$ARCH" = "armv7hl" ]; then
+ SLKCFLAGS="-O3 -march=armv7-a -mfpu=vfpv3-d16"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "arm" ]; then
+ SLKCFLAGS="-O2 -march=armv5te"
+ LIBDIRSUFFIX=""
else
- # Automatically determine the architecture we're building on:
- MARCH=$( uname -m )
- if [ -z "$ARCH" ]; then
- case "$MARCH" in
- i?86) export ARCH=i486 ;;
- arm*) readelf /usr/bin/file -A | egrep -q "Tag_CPU.*[4,5]" && ARCH=arm || ARCH=armv7hl ;;
- # Unless $ARCH is already set, use uname -m for all other archs:
- *) export ARCH=$MARCH ;;
- esac
- fi
- # Set CFLAGS/CXXFLAGS and LIBDIRSUFFIX:
- if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
- LIBDIRSUFFIX=""
- elif [ "$ARCH" = "s390" ]; then
- SLKCFLAGS="-O2"
- LIBDIRSUFFIX=""
- elif [ "$ARCH" = "x86_64" ]; then
- SLKCFLAGS="-O2 -fPIC"
- LIBDIRSUFFIX="64"
- elif [ "$ARCH" = "armv7hl" ]; then
- SLKCFLAGS="-O3 -march=armv7-a -mfpu=vfpv3-d16"
- LIBDIRSUFFIX=""
- elif [ "$ARCH" = "arm" ]; then
- SLKCFLAGS="-O2 -march=armv5te"
- LIBDIRSUFFIX=""
- else
- SLKCFLAGS="-O2"
- LIBDIRSUFFIX=""
- fi
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
fi
case "$ARCH" in
@@ -135,7 +137,7 @@ CFLAGS="$SLKCFLAGS" \
--with-int10=x86emu \
--with-default-font-path="${DEF_FONTPATH}" \
--with-module-dir=/usr/lib${LIBDIRSUFFIX}/xorg/modules \
- --with-os-name="Slackware 14.2 current" \
+ --with-os-name="Slackware 15.0" \
--with-os-vendor="Slackware Linux Project" \
--with-xkb-path=/etc/X11/xkb \
--with-xkb-output=/var/lib/xkb \
@@ -162,7 +164,7 @@ mkdir -p $PKG/etc/X11/xorg.conf.d $PKG/usr/share/X11/xorg.conf.d
# Create a sample keyboard layout
# Enable zapping by default
-cat << EOF > $PKG/usr/share/X11/xorg.conf.d/90-keyboard-layout.conf
+cat << EOF > $PKG/usr/share/X11/xorg.conf.d/90-keyboard-layout-evdev.conf
Section "InputClass"
Identifier "keyboard-all"
MatchIsKeyboard "on"
@@ -206,6 +208,17 @@ EndSection
EOF
+## Nope, we will not include 91-keyboard-layout-libinput.conf in the
+## xorg-server package. It is better to put it into the xf86-input-libinput
+## package so that if that driver is removed, then X.Org will fall back to
+## using evdev. Perhaps we'll revisit this arrangement when evdev is a little
+## bit more obsolete. :-)
+##
+#sed -e 's,Identifier "keyboard-all",Identifier "libinput keyboard catchall",g' \
+# -e 's,Driver "evdev",Driver "libinput",g' \
+# $PKG/usr/share/X11/xorg.conf.d/90-keyboard-layout-evdev.conf > \
+# $PKG/usr/share/X11/xorg.conf.d/91-keyboard-layout-libinput.conf
+
# Don't mess with my /var/log/ permissions:
rmdir $PKG/var/log 2>/dev/null
rmdir $PKG/var 2>/dev/null
@@ -224,6 +237,9 @@ rmdir $PKG/var 2>/dev/null
find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | \
grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
+# Don't ship .la files:
+rm -f $PKG/{,usr/}lib${LIBDIRSUFFIX}/*.la
+
# Compress and link manpages, if any:
if [ -d $PKG/usr/man ]; then
( cd $PKG/usr/man
diff --git a/kde/build/baloo b/kde/build/baloo
deleted file mode 100644
index b8626c4..0000000
--- a/kde/build/baloo
+++ /dev/null
@@ -1 +0,0 @@
-4
diff --git a/kde/build/calligra b/kde/build/calligra
index 0cfbf08..7ed6ff8 100644
--- a/kde/build/calligra
+++ b/kde/build/calligra
@@ -1 +1 @@
-2
+5
diff --git a/kde/build/akonadi4 b/kde/build/digikam
index 0cfbf08..0cfbf08 100644
--- a/kde/build/akonadi4
+++ b/kde/build/digikam
diff --git a/kde/build/kactivities b/kde/build/kactivities
deleted file mode 100644
index b8626c4..0000000
--- a/kde/build/kactivities
+++ /dev/null
@@ -1 +0,0 @@
-4
diff --git a/kde/build/kdepimlibs4 b/kde/build/kdepimlibs4
deleted file mode 100644
index 00750ed..0000000
--- a/kde/build/kdepimlibs4
+++ /dev/null
@@ -1 +0,0 @@
-3
diff --git a/kde/build/k3b b/kde/build/kdevelop
index 0cfbf08..0cfbf08 100644
--- a/kde/build/k3b
+++ b/kde/build/kdevelop
diff --git a/kde/build/kdevelop-pg-qt b/kde/build/kdevelop-pg-qt
deleted file mode 100644
index 0cfbf08..0000000
--- a/kde/build/kdevelop-pg-qt
+++ /dev/null
@@ -1 +0,0 @@
-2
diff --git a/kde/build/baloo-widgets b/kde/build/kjots
index 00750ed..00750ed 100644
--- a/kde/build/baloo-widgets
+++ b/kde/build/kjots
diff --git a/kde/build/konsolepart4 b/kde/build/konsolepart4
deleted file mode 100644
index 0cfbf08..0000000
--- a/kde/build/konsolepart4
+++ /dev/null
@@ -1 +0,0 @@
-2
diff --git a/kde/build/korundum b/kde/build/korundum
deleted file mode 100644
index b8626c4..0000000
--- a/kde/build/korundum
+++ /dev/null
@@ -1 +0,0 @@
-4
diff --git a/kde/build/kross-interpreters b/kde/build/kross-interpreters
deleted file mode 100644
index 00750ed..0000000
--- a/kde/build/kross-interpreters
+++ /dev/null
@@ -1 +0,0 @@
-3
diff --git a/kde/build/nepomuk-core b/kde/build/nepomuk-core
deleted file mode 100644
index b8626c4..0000000
--- a/kde/build/nepomuk-core
+++ /dev/null
@@ -1 +0,0 @@
-4
diff --git a/kde/build/nepomuk-widgets b/kde/build/nepomuk-widgets
deleted file mode 100644
index 00750ed..0000000
--- a/kde/build/nepomuk-widgets
+++ /dev/null
@@ -1 +0,0 @@
-3
diff --git a/kde/build/partitionmanager b/kde/build/partitionmanager
deleted file mode 100644
index 0cfbf08..0000000
--- a/kde/build/partitionmanager
+++ /dev/null
@@ -1 +0,0 @@
-2
diff --git a/kde/build/perlkde b/kde/build/perlkde
deleted file mode 100644
index 00750ed..0000000
--- a/kde/build/perlkde
+++ /dev/null
@@ -1 +0,0 @@
-3
diff --git a/kde/build/perlqt b/kde/build/perlqt
deleted file mode 100644
index 7ed6ff8..0000000
--- a/kde/build/perlqt
+++ /dev/null
@@ -1 +0,0 @@
-5
diff --git a/kde/build/phonon-vlc b/kde/build/phonon-vlc
deleted file mode 100644
index 0cfbf08..0000000
--- a/kde/build/phonon-vlc
+++ /dev/null
@@ -1 +0,0 @@
-2
diff --git a/kde/build/pykde4 b/kde/build/pykde4
deleted file mode 100644
index b8626c4..0000000
--- a/kde/build/pykde4
+++ /dev/null
@@ -1 +0,0 @@
-4
diff --git a/kde/build/qtruby b/kde/build/qtruby
deleted file mode 100644
index b8626c4..0000000
--- a/kde/build/qtruby
+++ /dev/null
@@ -1 +0,0 @@
-4
diff --git a/kde/build/katepart4 b/kde/build/sddm-kcm
index 0cfbf08..0cfbf08 100644
--- a/kde/build/katepart4
+++ b/kde/build/sddm-kcm
diff --git a/kde/build/sddm-qt5 b/kde/build/sddm-qt5
deleted file mode 100644
index 00750ed..0000000
--- a/kde/build/sddm-qt5
+++ /dev/null
@@ -1 +0,0 @@
-3
diff --git a/kde/build/smokegen b/kde/build/smokegen
deleted file mode 100644
index 00750ed..0000000
--- a/kde/build/smokegen
+++ /dev/null
@@ -1 +0,0 @@
-3
diff --git a/kde/build/smokekde b/kde/build/smokekde
deleted file mode 100644
index 7ed6ff8..0000000
--- a/kde/build/smokekde
+++ /dev/null
@@ -1 +0,0 @@
-5
diff --git a/kde/build/smokeq b/kde/build/smokeq
deleted file mode 100644
index 0cfbf08..0000000
--- a/kde/build/smokeq
+++ /dev/null
@@ -1 +0,0 @@
-2
diff --git a/kde/build/smokeqt b/kde/build/smokeqt
deleted file mode 100644
index 00750ed..0000000
--- a/kde/build/smokeqt
+++ /dev/null
@@ -1 +0,0 @@
-3
diff --git a/kde/cmake/akonadi b/kde/cmake/akonadi
deleted file mode 120000
index ab12832..0000000
--- a/kde/cmake/akonadi
+++ /dev/null
@@ -1 +0,0 @@
-applications5 \ No newline at end of file
diff --git a/kde/cmake/akonadi-calendar b/kde/cmake/akonadi-calendar
deleted file mode 120000
index ab12832..0000000
--- a/kde/cmake/akonadi-calendar
+++ /dev/null
@@ -1 +0,0 @@
-applications5 \ No newline at end of file
diff --git a/kde/cmake/akonadi-contacts b/kde/cmake/akonadi-contacts
deleted file mode 120000
index ab12832..0000000
--- a/kde/cmake/akonadi-contacts
+++ /dev/null
@@ -1 +0,0 @@
-applications5 \ No newline at end of file
diff --git a/kde/cmake/akonadi-mime b/kde/cmake/akonadi-mime
deleted file mode 120000
index ab12832..0000000
--- a/kde/cmake/akonadi-mime
+++ /dev/null
@@ -1 +0,0 @@
-applications5 \ No newline at end of file
diff --git a/kde/cmake/akonadi-notes b/kde/cmake/akonadi-notes
deleted file mode 120000
index ab12832..0000000
--- a/kde/cmake/akonadi-notes
+++ /dev/null
@@ -1 +0,0 @@
-applications5 \ No newline at end of file
diff --git a/kde/cmake/akonadi-search b/kde/cmake/akonadi-search
deleted file mode 120000
index ab12832..0000000
--- a/kde/cmake/akonadi-search
+++ /dev/null
@@ -1 +0,0 @@
-applications5 \ No newline at end of file
diff --git a/kde/cmake/akonadi4 b/kde/cmake/akonadi4
deleted file mode 100644
index f47f241..0000000
--- a/kde/cmake/akonadi4
+++ /dev/null
@@ -1,16 +0,0 @@
-# If we do not specify the correct QT_PLUGINS_DIR, then the application
-# decides on using $QT4DIR/qt4/plugins instead.
-mkdir -p build
-cd build
- cmake \
- -DCMAKE_BUILD_TYPE=Release \
- -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \
- -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
- -DLIB_SUFFIX=${LIBDIRSUFFIX} \
- -DCMAKE_INSTALL_PREFIX=/usr \
- -DMAN_INSTALL_DIR=/usr/man \
- -DMAN_INSTALL_DIR=/usr/man \
- -DINSTALL_QSQLITE_IN_QT_PREFIX:BOOL=ON \
- -DQT_PLUGINS_DIR=/usr/lib$LIBDIRSUFFIX/qt/plugins \
- ..
-
diff --git a/kde/cmake/amarok b/kde/cmake/amarok
deleted file mode 100644
index 9cf5a28..0000000
--- a/kde/cmake/amarok
+++ /dev/null
@@ -1,22 +0,0 @@
-# NOTE: if cmake complains that it can not find qscript-qt when in fact you
-# have it installed, this is likely because you are building inside a chroot.
-# To remedy the error, run the command "dbus-uuidgen --ensure"
-# and then re-start this SlackBuild :
-
-export QTSCRIPTS=/usr/lib${LIBDIRSUFFIX}/qt4/plugins/script
-
-mkdir -p build
-cd build
- cmake \
- $KDE_OPT_ARGS \
- -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \
- -DCMAKE_C_FLAGS_RELEASE:STRING="$SLKCFLAGS" \
- -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
- -DCMAKE_CXX_FLAGS_RELEASE:STRING="$SLKCFLAGS" \
- -DCMAKE_BUILD_TYPE=Release \
- -DCMAKE_INSTALL_PREFIX=/usr \
- -DMAN_INSTALL_DIR=/usr/man \
- -DSYSCONF_INSTALL_DIR=/etc/kde \
- -DLIB_SUFFIX=${LIBDIRSUFFIX} \
- ..
-
diff --git a/kde/cmake/applications b/kde/cmake/applications
index 05e5634..626e05d 100644
--- a/kde/cmake/applications
+++ b/kde/cmake/applications
@@ -1,31 +1,3 @@
-# Temporary cludge to fix badly ported applications:
-for APP in \
-libkexiv2 \
-libkdcraw \
-kde-baseapps \
-kde-runtime \
-okular \
-kdegraphics-thumbnailers \
-kolourpaint \
-kopete \
-ksnapshot \
-superkaramba \
-libkcddb \
-kget \
-kdeartwork \
-kajongg \
-ksirk \
-kalzium \
-; do
- if [ "$APP" = "$PKGNAME" ]; then
- if ! grep -q 'cmake_minimum_required' CMakeLists.txt ; then
- # Prepend a cmake_minimum_required stanza at the top, which enables
- # newer cmake features which the build needs:
- sed -i -e '1icmake_minimum_required(VERSION 2.8.9)\' CMakeLists.txt
- fi
- fi
-done
-
mkdir build
cd build
cmake \
@@ -40,8 +12,12 @@ cd build
-DMAN_INSTALL_DIR=/usr/man \
-DSYSCONF_INSTALL_DIR=/etc/kde \
-DLIB_SUFFIX=${LIBDIRSUFFIX} \
- -DLIB_INSTALL_DIR=/usr/lib$LIBDIRSUFFIX \
- -DLIBEXEC_INSTALL_DIR=/usr/lib$LIBDIRSUFFIX \
- -DKDE4_BUILD_TESTS=OFF \
+ -DLIB_INSTALL_DIR=lib$LIBDIRSUFFIX \
+ -DLIBEXEC_INSTALL_DIR=lib$LIBDIRSUFFIX \
+ -DQT_PLUGIN_INSTALL_DIR=lib$LIBDIRSUFFIX/qt5/plugins \
+ -DQML_INSTALL_DIR=lib$LIBDIRSUFFIX/qt5/qml \
+ -DKDE_INSTALL_USE_QT_SYS_PATHS=ON \
+ -DBUILD_TESTING=OFF \
+ -DQca-qt5_DIR=/usr/lib${LIBDIRSUFFIX}/cmake/Qca \
..
diff --git a/kde/cmake/ark b/kde/cmake/ark
deleted file mode 120000
index ab12832..0000000
--- a/kde/cmake/ark
+++ /dev/null
@@ -1 +0,0 @@
-applications5 \ No newline at end of file
diff --git a/kde/cmake/artikulate b/kde/cmake/artikulate
deleted file mode 120000
index ab12832..0000000
--- a/kde/cmake/artikulate
+++ /dev/null
@@ -1 +0,0 @@
-applications5 \ No newline at end of file
diff --git a/kde/cmake/attica-framework b/kde/cmake/attica-framework
deleted file mode 120000
index ec699d7..0000000
--- a/kde/cmake/attica-framework
+++ /dev/null
@@ -1 +0,0 @@
-frameworks \ No newline at end of file
diff --git a/kde/cmake/baloo-widgets b/kde/cmake/baloo-widgets
deleted file mode 120000
index ab12832..0000000
--- a/kde/cmake/baloo-widgets
+++ /dev/null
@@ -1 +0,0 @@
-applications5 \ No newline at end of file
diff --git a/kde/cmake/blinken b/kde/cmake/blinken
deleted file mode 120000
index ab12832..0000000
--- a/kde/cmake/blinken
+++ /dev/null
@@ -1 +0,0 @@
-applications5 \ No newline at end of file
diff --git a/kde/cmake/bluedevil b/kde/cmake/bluedevil
deleted file mode 120000
index eff359e..0000000
--- a/kde/cmake/bluedevil
+++ /dev/null
@@ -1 +0,0 @@
-plasma \ No newline at end of file
diff --git a/kde/cmake/bomber b/kde/cmake/bomber
deleted file mode 120000
index ab12832..0000000
--- a/kde/cmake/bomber
+++ /dev/null
@@ -1 +0,0 @@
-applications5 \ No newline at end of file
diff --git a/kde/cmake/bovo b/kde/cmake/bovo
deleted file mode 120000
index ab12832..0000000
--- a/kde/cmake/bovo
+++ /dev/null
@@ -1 +0,0 @@
-applications5 \ No newline at end of file
diff --git a/kde/cmake/breeze-gtk b/kde/cmake/breeze-gtk
deleted file mode 120000
index eff359e..0000000
--- a/kde/cmake/breeze-gtk
+++ /dev/null
@@ -1 +0,0 @@
-plasma \ No newline at end of file
diff --git a/kde/cmake/breeze-icons b/kde/cmake/breeze-icons
deleted file mode 120000
index ec699d7..0000000
--- a/kde/cmake/breeze-icons
+++ /dev/null
@@ -1 +0,0 @@
-frameworks \ No newline at end of file
diff --git a/kde/cmake/calendarsupport b/kde/cmake/calendarsupport
deleted file mode 120000
index ab12832..0000000
--- a/kde/cmake/calendarsupport
+++ /dev/null
@@ -1 +0,0 @@
-applications5 \ No newline at end of file
diff --git a/kde/cmake/calligra b/kde/cmake/calligra
index adb281f..442a45b 100644
--- a/kde/cmake/calligra
+++ b/kde/cmake/calligra
@@ -13,5 +13,7 @@ cd build
-DSYSCONF_INSTALL_DIR=/etc/kde \
-DLIB_SUFFIX=${LIBDIRSUFFIX} \
-DIHAVEPATCHEDQT:BOOL=ON \
+ -DOPENJPEG_INCLUDE_DIR=/usr/include/openmj2-2.1 \
+ -DOPENJPEG_NAMES=openmj2 \
..
diff --git a/kde/cmake/cantor b/kde/cmake/cantor
deleted file mode 120000
index ab12832..0000000
--- a/kde/cmake/cantor
+++ /dev/null
@@ -1 +0,0 @@
-applications5 \ No newline at end of file
diff --git a/kde/cmake/cervisia b/kde/cmake/cervisia
deleted file mode 120000
index ab12832..0000000
--- a/kde/cmake/cervisia
+++ /dev/null
@@ -1 +0,0 @@
-applications5 \ No newline at end of file
diff --git a/kde/cmake/cmake b/kde/cmake/cmake
index 3a86efe..626e05d 100644
--- a/kde/cmake/cmake
+++ b/kde/cmake/cmake
@@ -11,8 +11,13 @@ cd build
-DCMAKE_INSTALL_PREFIX=/usr \
-DMAN_INSTALL_DIR=/usr/man \
-DSYSCONF_INSTALL_DIR=/etc/kde \
- -DLIB_INSTALL_DIR=/usr/lib$LIBDIRSUFFIX \
- -DLIBEXEC_INSTALL_DIR=/usr/lib$LIBDIRSUFFIX \
-DLIB_SUFFIX=${LIBDIRSUFFIX} \
+ -DLIB_INSTALL_DIR=lib$LIBDIRSUFFIX \
+ -DLIBEXEC_INSTALL_DIR=lib$LIBDIRSUFFIX \
+ -DQT_PLUGIN_INSTALL_DIR=lib$LIBDIRSUFFIX/qt5/plugins \
+ -DQML_INSTALL_DIR=lib$LIBDIRSUFFIX/qt5/qml \
+ -DKDE_INSTALL_USE_QT_SYS_PATHS=ON \
+ -DBUILD_TESTING=OFF \
+ -DQca-qt5_DIR=/usr/lib${LIBDIRSUFFIX}/cmake/Qca \
..
diff --git a/kde/cmake/debugsettings b/kde/cmake/debugsettings
deleted file mode 120000
index ab12832..0000000
--- a/kde/cmake/debugsettings
+++ /dev/null
@@ -1 +0,0 @@
-applications5 \ No newline at end of file
diff --git a/kde/cmake/digikam b/kde/cmake/digikam
new file mode 100644
index 0000000..23af279
--- /dev/null
+++ b/kde/cmake/digikam
@@ -0,0 +1,34 @@
+# https://bugs.kde.org/show_bug.cgi?id=377597 :
+# Don't try to compile documentation translations for the moment.
+# Only the English handbook compiles fine.
+# Use cmake option "-DDIGIKAMSC_COMPILE_DOC=OFF"
+
+mkdir build
+cd build
+ cmake \
+ $KDE_OPT_ARGS \
+ -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \
+ -DCMAKE_C_FLAGS_RELEASE:STRING="$SLKCFLAGS" \
+ -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS -std=c++11" \
+ -DCMAKE_CXX_FLAGS_RELEASE:STRING="$SLKCFLAGS -std=c++11" \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DMAN_INSTALL_DIR=/usr/man \
+ -DSYSCONF_INSTALL_DIR=/etc/kde \
+ -DLIB_SUFFIX=${LIBDIRSUFFIX} \
+ -DLIB_INSTALL_DIR=lib$LIBDIRSUFFIX \
+ -DLIBEXEC_INSTALL_DIR=lib$LIBDIRSUFFIX \
+ -DQT_PLUGIN_INSTALL_DIR=lib$LIBDIRSUFFIX/qt5/plugins \
+ -DQML_INSTALL_DIR=lib$LIBDIRSUFFIX/qt5/qml \
+ -DKDE_INSTALL_USE_QT_SYS_PATHS=ON \
+ -DBUILD_TESTING=OFF \
+ -DQca-qt5_DIR=/usr/lib${LIBDIRSUFFIX}/cmake/Qca \
+ -DENABLE_AKONADICONTACTSUPPORT=ON \
+ -DENABLE_APPSTYLES=ON \
+ -DENABLE_KFILEMETADATASUPPORT=ON \
+ -DENABLE_MEDIAPLAYER=ON \
+ -DENABLE_MYSQLSUPPORT=ON \
+ -DENABLE_OPENCV3=ON \
+ -DDIGIKAMSC_COMPILE_DOC=OFF \
+ ..
+
diff --git a/kde/cmake/discover b/kde/cmake/discover
deleted file mode 120000
index eff359e..0000000
--- a/kde/cmake/discover
+++ /dev/null
@@ -1 +0,0 @@
-plasma \ No newline at end of file
diff --git a/kde/cmake/dolphin b/kde/cmake/dolphin
deleted file mode 120000
index ab12832..0000000
--- a/kde/cmake/dolphin
+++ /dev/null
@@ -1 +0,0 @@
-applications5 \ No newline at end of file
diff --git a/kde/cmake/dolphin-plugins b/kde/cmake/dolphin-plugins
deleted file mode 120000
index ab12832..0000000
--- a/kde/cmake/dolphin-plugins
+++ /dev/null
@@ -1 +0,0 @@
-applications5 \ No newline at end of file
diff --git a/kde/cmake/dragon b/kde/cmake/dragon
deleted file mode 120000
index ab12832..0000000
--- a/kde/cmake/dragon
+++ /dev/null
@@ -1 +0,0 @@
-applications5 \ No newline at end of file
diff --git a/kde/cmake/eventviews b/kde/cmake/eventviews
deleted file mode 120000
index ab12832..0000000
--- a/kde/cmake/eventviews
+++ /dev/null
@@ -1 +0,0 @@
-applications5 \ No newline at end of file
diff --git a/kde/cmake/extra-cmake-modules b/kde/cmake/extra-cmake-modules
deleted file mode 120000
index ec699d7..0000000
--- a/kde/cmake/extra-cmake-modules
+++ /dev/null
@@ -1 +0,0 @@
-frameworks \ No newline at end of file
diff --git a/kde/cmake/filelight b/kde/cmake/filelight
deleted file mode 120000
index ab12832..0000000
--- a/kde/cmake/filelight
+++ /dev/null
@@ -1 +0,0 @@
-applications5 \ No newline at end of file
diff --git a/kde/cmake/gpgmepp b/kde/cmake/gpgmepp
deleted file mode 120000
index ab12832..0000000
--- a/kde/cmake/gpgmepp
+++ /dev/null
@@ -1 +0,0 @@
-applications5 \ No newline at end of file
diff --git a/kde/cmake/granatier b/kde/cmake/granatier
deleted file mode 120000
index ab12832..0000000
--- a/kde/cmake/granatier
+++ /dev/null
@@ -1 +0,0 @@
-applications5 \ No newline at end of file
diff --git a/kde/cmake/grantleetheme b/kde/cmake/grantleetheme
deleted file mode 120000
index ab12832..0000000
--- a/kde/cmake/grantleetheme
+++ /dev/null
@@ -1 +0,0 @@
-applications5 \ No newline at end of file
diff --git a/kde/cmake/gwenview b/kde/cmake/gwenview
index ab12832..7b74bdd 120000..100644
--- a/kde/cmake/gwenview
+++ b/kde/cmake/gwenview
@@ -1 +1,24 @@
-applications5 \ No newline at end of file
+mkdir build
+cd build
+ cmake \
+ $KDE_OPT_ARGS \
+ -DKDE_PLATFORM_FEATURE_DISABLE_DEPRECATED=TRUE \
+ -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \
+ -DCMAKE_C_FLAGS_RELEASE:STRING="$SLKCFLAGS" \
+ -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
+ -DCMAKE_CXX_FLAGS_RELEASE:STRING="$SLKCFLAGS" \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DMAN_INSTALL_DIR=/usr/man \
+ -DSYSCONF_INSTALL_DIR=/etc/kde \
+ -DLIB_SUFFIX=${LIBDIRSUFFIX} \
+ -DLIB_INSTALL_DIR=lib$LIBDIRSUFFIX \
+ -DLIBEXEC_INSTALL_DIR=lib$LIBDIRSUFFIX \
+ -DQT_PLUGIN_INSTALL_DIR=lib$LIBDIRSUFFIX/qt5/plugins \
+ -DQML_INSTALL_DIR=lib$LIBDIRSUFFIX/qt5/qml \
+ -DKDE_INSTALL_USE_QT_SYS_PATHS=ON \
+ -DBUILD_TESTING=OFF \
+ -DQca-qt5_DIR=/usr/lib${LIBDIRSUFFIX}/cmake/Qca \
+ -DGWENVIEW_SEMANTICINFO_BACKEND="Baloo" \
+ ..
+
diff --git a/kde/cmake/incidenceeditor b/kde/cmake/incidenceeditor
deleted file mode 120000
index ab12832..0000000
--- a/kde/cmake/incidenceeditor
+++ /dev/null
@@ -1 +0,0 @@
-applications5 \ No newline at end of file
diff --git a/kde/cmake/k3b b/kde/cmake/k3b
index 75a29ec..01164dd 100644
--- a/kde/cmake/k3b
+++ b/kde/cmake/k3b
@@ -11,7 +11,12 @@ cd build
-DMAN_INSTALL_DIR=/usr/man \
-DSYSCONF_INSTALL_DIR=/etc/kde \
-DLIB_SUFFIX=${LIBDIRSUFFIX} \
+ -DKDE_INSTALL_USE_QT_SYS_PATHS=ON \
+ -DQML_INSTALL_DIR=lib$LIBDIRSUFFIX/qt5/qml \
+ -DQT_PLUGIN_INSTALL_DIR=lib$LIBDIRSUFFIX/qt5/plugins \
+ -DBUILD_TESTING:BOOL=OFF \
-DK3B_ENABLE_HAL_SUPPORT:BOOL=OFF \
- -DKDE4_ENABLE_HTMLHANDBOOK:BOOL=ON \
+ -DK3B_ENABLE_PERMISSION_HELPER:BOOL=ON \
+ -DKDE_INSTALL_LIBEXECDIR=/usr/libexec \
..
diff --git a/kde/cmake/kaccounts-integration b/kde/cmake/kaccounts-integration
deleted file mode 120000
index ab12832..0000000
--- a/kde/cmake/kaccounts-integration
+++ /dev/null
@@ -1 +0,0 @@
-applications5 \ No newline at end of file
diff --git a/kde/cmake/kaccounts-providers b/kde/cmake/kaccounts-providers
deleted file mode 120000
index ab12832..0000000
--- a/kde/cmake/kaccounts-providers
+++ /dev/null
@@ -1 +0,0 @@
-applications5 \ No newline at end of file
diff --git a/kde/cmake/kactivities-framework b/kde/cmake/kactivities-framework
deleted file mode 120000
index ec699d7..0000000
--- a/kde/cmake/kactivities-framework
+++ /dev/null
@@ -1 +0,0 @@
-frameworks \ No newline at end of file
diff --git a/kde/cmake/kactivities-stats b/kde/cmake/kactivities-stats
deleted file mode 120000
index ec699d7..0000000
--- a/kde/cmake/kactivities-stats
+++ /dev/null
@@ -1 +0,0 @@
-frameworks \ No newline at end of file
diff --git a/kde/cmake/kactivities-workspace b/kde/cmake/kactivities-workspace
deleted file mode 120000
index eff359e..0000000
--- a/kde/cmake/kactivities-workspace
+++ /dev/null
@@ -1 +0,0 @@
-plasma \ No newline at end of file
diff --git a/kde/cmake/kactivitymanagerd b/kde/cmake/kactivitymanagerd
deleted file mode 120000
index eff359e..0000000
--- a/kde/cmake/kactivitymanagerd
+++ /dev/null
@@ -1 +0,0 @@
-plasma \ No newline at end of file
diff --git a/kde/cmake/kajongg b/kde/cmake/kajongg
index 83b8c47..32a909b 100644
--- a/kde/cmake/kajongg
+++ b/kde/cmake/kajongg
@@ -1,10 +1,3 @@
-# Temporary kludge to allow badly ported app to compile:
-if ! grep -q 'cmake_minimum_required' CMakeLists.txt ; then
- # Prepend a cmake_minimum_required stanza at the top, which enables
- # newer cmake features which the build needs:
- sed -i -e '1icmake_minimum_required(VERSION 2.8.9)\' CMakeLists.txt
-fi
-
mkdir build
cd build
cmake \
@@ -19,6 +12,13 @@ cd build
-DMAN_INSTALL_DIR=/usr/man \
-DSYSCONF_INSTALL_DIR=/etc/kde \
-DLIB_SUFFIX=${LIBDIRSUFFIX} \
+ -DLIB_INSTALL_DIR=lib$LIBDIRSUFFIX \
+ -DLIBEXEC_INSTALL_DIR=lib$LIBDIRSUFFIX \
+ -DQT_PLUGIN_INSTALL_DIR=lib$LIBDIRSUFFIX/qt5/plugins \
+ -DQML_INSTALL_DIR=lib$LIBDIRSUFFIX/qt5/qml \
+ -DKDE_INSTALL_USE_QT_SYS_PATHS=ON \
+ -DBUILD_TESTING=OFF \
+ -DQca-qt5_DIR=/usr/lib${LIBDIRSUFFIX}/cmake/Qca \
-DINSTALL_KAJONGG=TRUE \
..
diff --git a/kde/cmake/kalarmcal b/kde/cmake/kalarmcal
deleted file mode 120000
index ab12832..0000000
--- a/kde/cmake/kalarmcal
+++ /dev/null
@@ -1 +0,0 @@
-applications5 \ No newline at end of file
diff --git a/kde/cmake/kalgebra b/kde/cmake/kalgebra
deleted file mode 120000
index ab12832..0000000
--- a/kde/cmake/kalgebra
+++ /dev/null
@@ -1 +0,0 @@
-applications5 \ No newline at end of file
diff --git a/kde/cmake/kamera b/kde/cmake/kamera
deleted file mode 120000
index ab12832..0000000
--- a/kde/cmake/kamera
+++ /dev/null
@@ -1 +0,0 @@
-applications5 \ No newline at end of file
diff --git a/kde/cmake/kanagram b/kde/cmake/kanagram
deleted file mode 120000
index ab12832..0000000
--- a/kde/cmake/kanagram
+++ /dev/null
@@ -1 +0,0 @@
-applications5 \ No newline at end of file
diff --git a/kde/cmake/kapidox b/kde/cmake/kapidox
deleted file mode 120000
index ec699d7..0000000
--- a/kde/cmake/kapidox
+++ /dev/null
@@ -1 +0,0 @@
-frameworks \ No newline at end of file
diff --git a/kde/cmake/kapman b/kde/cmake/kapman
deleted file mode 120000
index ab12832..0000000
--- a/kde/cmake/kapman
+++ /dev/null
@@ -1 +0,0 @@
-applications5 \ No newline at end of file
diff --git a/kde/cmake/kapptemplate b/kde/cmake/kapptemplate
deleted file mode 120000
index ab12832..0000000
--- a/kde/cmake/kapptemplate
+++ /dev/null
@@ -1 +0,0 @@
-applications5 \ No newline at end of file
diff --git a/kde/cmake/karchive b/kde/cmake/karchive
deleted file mode 120000
index ec699d7..0000000
--- a/kde/cmake/karchive
+++ /dev/null
@@ -1 +0,0 @@
-frameworks \ No newline at end of file
diff --git a/kde/cmake/kate b/kde/cmake/kate
deleted file mode 120000
index ab12832..0000000
--- a/kde/cmake/kate
+++ /dev/null
@@ -1 +0,0 @@
-applications5 \ No newline at end of file
diff --git a/kde/cmake/katomic b/kde/cmake/katomic
deleted file mode 120000
index ab12832..0000000
--- a/kde/cmake/katomic
+++ /dev/null
@@ -1 +0,0 @@
-applications5 \ No newline at end of file
diff --git a/kde/cmake/kauth b/kde/cmake/kauth
deleted file mode 120000
index ec699d7..0000000
--- a/kde/cmake/kauth
+++ /dev/null
@@ -1 +0,0 @@
-frameworks \ No newline at end of file
diff --git a/kde/cmake/kblackbox b/kde/cmake/kblackbox
deleted file mode 120000
index ab12832..0000000
--- a/kde/cmake/kblackbox
+++ /dev/null
@@ -1 +0,0 @@
-applications5 \ No newline at end of file
diff --git a/kde/cmake/kblocks b/kde/cmake/kblocks
deleted file mode 120000
index ab12832..0000000
--- a/kde/cmake/kblocks
+++ /dev/null
@@ -1 +0,0 @@
-applications5 \ No newline at end of file
diff --git a/kde/cmake/kblog b/kde/cmake/kblog
deleted file mode 120000
index ab12832..0000000
--- a/kde/cmake/kblog
+++ /dev/null
@@ -1 +0,0 @@
-applications5 \ No newline at end of file
diff --git a/kde/cmake/kbookmarks b/kde/cmake/kbookmarks
deleted file mode 120000
index ec699d7..0000000
--- a/kde/cmake/kbookmarks
+++ /dev/null
@@ -1 +0,0 @@
-frameworks \ No newline at end of file
diff --git a/kde/cmake/kbounce b/kde/cmake/kbounce
deleted file mode 120000
index ab12832..0000000
--- a/kde/cmake/kbounce
+++ /dev/null
@@ -1 +0,0 @@
-applications5 \ No newline at end of file
diff --git a/kde/cmake/kbreakout b/kde/cmake/kbreakout
deleted file mode 120000
index ab12832..0000000
--- a/kde/cmake/kbreakout
+++ /dev/null
@@ -1 +0,0 @@
-applications5 \ No newline at end of file
diff --git a/kde/cmake/kbruch b/kde/cmake/kbruch
deleted file mode 120000
index ab12832..0000000
--- a/kde/cmake/kbruch
+++ /dev/null
@@ -1 +0,0 @@
-applications5 \ No newline at end of file
diff --git a/kde/cmake/kcalc b/kde/cmake/kcalc
deleted file mode 120000
index ab12832..0000000
--- a/kde/cmake/kcalc
+++ /dev/null
@@ -1 +0,0 @@
-applications5 \ No newline at end of file
diff --git a/kde/cmake/kcalcore b/kde/cmake/kcalcore
deleted file mode 120000
index ab12832..0000000
--- a/kde/cmake/kcalcore
+++ /dev/null
@@ -1 +0,0 @@
-applications5 \ No newline at end of file
diff --git a/kde/cmake/kcalutils b/kde/cmake/kcalutils
deleted file mode 120000
index ab12832..0000000
--- a/kde/cmake/kcalutils
+++ /dev/null
@@ -1 +0,0 @@
-applications5 \ No newline at end of file
diff --git a/kde/cmake/kcharselect b/kde/cmake/kcharselect
deleted file mode 120000
index ab12832..0000000
--- a/kde/cmake/kcharselect
+++ /dev/null
@@ -1 +0,0 @@
-applications5 \ No newline at end of file
diff --git a/kde/cmake/kcmutils b/kde/cmake/kcmutils
deleted file mode 120000
index ec699d7..0000000
--- a/kde/cmake/kcmutils
+++ /dev/null
@@ -1 +0,0 @@
-frameworks \ No newline at end of file
diff --git a/kde/cmake/kcodecs b/kde/cmake/kcodecs
deleted file mode 120000
index ec699d7..0000000
--- a/kde/cmake/kcodecs
+++ /dev/null
@@ -1 +0,0 @@
-frameworks \ No newline at end of file
diff --git a/kde/cmake/kcolorchooser b/kde/cmake/kcolorchooser
deleted file mode 120000
index ab12832..0000000
--- a/kde/cmake/kcolorchooser
+++ /dev/null
@@ -1 +0,0 @@
-applications5 \ No newline at end of file
diff --git a/kde/cmake/kcompletion b/kde/cmake/kcompletion
deleted file mode 120000
index ec699d7..0000000
--- a/kde/cmake/kcompletion
+++ /dev/null
@@ -1 +0,0 @@
-frameworks \ No newline at end of file
diff --git a/kde/cmake/kconfig b/kde/cmake/kconfig
deleted file mode 120000
index ec699d7..0000000
--- a/kde/cmake/kconfig
+++ /dev/null
@@ -1 +0,0 @@
-frameworks \ No newline at end of file
diff --git a/kde/cmake/kconfigwidgets b/kde/cmake/kconfigwidgets
deleted file mode 120000
index ec699d7..0000000
--- a/kde/cmake/kconfigwidgets
+++ /dev/null
@@ -1 +0,0 @@
-frameworks \ No newline at end of file
diff --git a/kde/cmake/kcontacts b/kde/cmake/kcontacts
deleted file mode 120000
index ab12832..0000000
--- a/kde/cmake/kcontacts
+++ /dev/null
@@ -1 +0,0 @@
-applications5 \ No newline at end of file
diff --git a/kde/cmake/kcoreaddons b/kde/cmake/kcoreaddons
deleted file mode 120000
index ec699d7..0000000
--- a/kde/cmake/kcoreaddons
+++ /dev/null
@@ -1 +0,0 @@
-frameworks \ No newline at end of file
diff --git a/kde/cmake/kcrash b/kde/cmake/kcrash
deleted file mode 120000
index ec699d7..0000000
--- a/kde/cmake/kcrash
+++ /dev/null
@@ -1 +0,0 @@
-frameworks \ No newline at end of file
diff --git a/kde/cmake/kcron b/kde/cmake/kcron
deleted file mode 120000
index ab12832..0000000
--- a/kde/cmake/kcron
+++ /dev/null
@@ -1 +0,0 @@
-applications5 \ No newline at end of file
diff --git a/kde/cmake/kdbusaddons b/kde/cmake/kdbusaddons
deleted file mode 120000
index ec699d7..0000000
--- a/kde/cmake/kdbusaddons
+++ /dev/null
@@ -1 +0,0 @@
-frameworks \ No newline at end of file
diff --git a/kde/cmake/kde-cli-tools b/kde/cmake/kde-cli-tools
deleted file mode 120000
index eff359e..0000000
--- a/kde/cmake/kde-cli-tools
+++ /dev/null
@@ -1 +0,0 @@
-plasma \ No newline at end of file
diff --git a/kde/cmake/kde-gtk-config b/kde/cmake/kde-gtk-config
deleted file mode 120000
index eff359e..0000000
--- a/kde/cmake/kde-gtk-config
+++ /dev/null
@@ -1 +0,0 @@
-plasma \ No newline at end of file
diff --git a/kde/cmake/kde-runtime b/kde/cmake/kde-runtime
deleted file mode 100644
index 5162bf9..0000000
--- a/kde/cmake/kde-runtime
+++ /dev/null
@@ -1,27 +0,0 @@
-# Temporary kludge to allow badly ported app to compile:
-if ! grep -q 'cmake_minimum_required' CMakeLists.txt ; then
- # Prepend a cmake_minimum_required stanza at the top, which enables
- # newer cmake features which the build needs:
- sed -i -e '1icmake_minimum_required(VERSION 2.8.9)\' CMakeLists.txt
-fi
-
-mkdir build
-cd build
- cmake \
- $KDE_OPT_ARGS \
- -DKDE_PLATFORM_FEATURE_DISABLE_DEPRECATED=TRUE \
- -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \
- -DCMAKE_C_FLAGS_RELEASE:STRING="$SLKCFLAGS" \
- -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
- -DCMAKE_CXX_FLAGS_RELEASE:STRING="$SLKCFLAGS" \
- -DCMAKE_BUILD_TYPE=Release \
- -DCMAKE_INSTALL_PREFIX=/usr \
- -DMAN_INSTALL_DIR=/usr/man \
- -DSYSCONF_INSTALL_DIR=/etc/kde \
- -DLIB_SUFFIX=${LIBDIRSUFFIX} \
- -DSAMBA_INCLUDE_DIR=/usr/include/samba-4.0 \
- -DBUILD_khelpcenter=OFF \
- -DBUILD_kglobalaccel=OFF \
- -DBUILD_kuiserver=OFF \
- ..
-
diff --git a/kde/cmake/kde-workspace b/kde/cmake/kde-workspace
deleted file mode 100644
index 0cf312c..0000000
--- a/kde/cmake/kde-workspace
+++ /dev/null
@@ -1,54 +0,0 @@
-mkdir build
-cd build
- cmake \
- $KDE_OPT_ARGS \
- -DKDE4_BUILD_TESTS=OFF \
- -DKDE_PLATFORM_FEATURE_DISABLE_DEPRECATED=TRUE \
- -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \
- -DCMAKE_C_FLAGS_RELEASE:STRING="$SLKCFLAGS" \
- -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
- -DCMAKE_CXX_FLAGS_RELEASE:STRING="$SLKCFLAGS" \
- -DCMAKE_BUILD_TYPE=Release \
- -DCMAKE_INSTALL_PREFIX=/usr \
- -DMAN_INSTALL_DIR=/usr/man \
- -DSYSCONF_INSTALL_DIR=/etc/kde \
- -DLIB_INSTALL_DIR=/usr/lib$LIBDIRSUFFIX \
- -DLIBEXEC_INSTALL_DIR=/usr/lib$LIBDIRSUFFIX \
- -DLIB_SUFFIX=${LIBDIRSUFFIX} \
- -DBUILD_appmenu:BOOL=OFF \
- -DBUILD_cursors:BOOL=OFF \
- -DBUILD_doc:BOOL=OFF \
- -DBUILD_freespacenotifier:BOOL=OFF \
- -DBUILD_kcheckpass:BOOL=OFF \
- -DBUILD_kcminit:BOOL=OFF \
- -DBUILD_kcontrol:BOOL=OFF \
- -DBUILD_kdm:BOOL=OFF \
- -DBUILD_khotkeys:BOOL=OFF \
- -DBUILD_kinfocenter:BOOL=OFF \
- -DBUILD_klipper:BOOL=OFF \
- -DBUILD_kmenuedit:BOOL=OFF \
- -DBUILD_krunner:BOOL=OFF \
- -DBUILD_kscreensaver:BOOL=ON \
- -DBUILD_ksmserver:BOOL=OFF \
- -DBUILD_ksplash:BOOL=OFF \
- -DBUILD_kstartupconfig:BOOL=OFF \
- -DBUILD_kstyles:BOOL=ON \
- -DBUILD_ksysguard:BOOL=OFF \
- -DBUILD_ksystraycmd:BOOL=OFF \
- -DBUILD_ktouchpadenabler:BOOL=ON \
- -DBUILD_kwin:BOOL=OFF \
- -DBUILD_kwrited:BOOL=OFF \
- -DBUILD_module:BOOL=OFF \
- -DBUILD_plasma:BOOL=OFF \
- -DBUILD_powerdevil:BOOL=OFF \
- -DBUILD_python:BOOL=OFF \
- -DBUILD_qguiplatformplugin_kde:BOOL=OFF \
- -DBUILD_ruby:BOOL=OFF \
- -DBUILD_screenlocker:BOOL=OFF \
- -DBUILD_solid-actions-kcm:BOOL=OFF \
- -DBUILD_statusnotifierwatcher:BOOL=OFF \
- -DBUILD_systemsettings:BOOL=OFF \
- -DBUILD_webkit:BOOL=OFF \
- -Wno-dev \
- ..
-
diff --git a/kde/cmake/kdevelop b/kde/cmake/kde4
index d8e7e64..32eea71 100644
--- a/kde/cmake/kdevelop
+++ b/kde/cmake/kde4
@@ -2,6 +2,8 @@ mkdir build
cd build
cmake \
$KDE_OPT_ARGS \
+ -DKDE4_ENABLE_FINAL="ON" \
+ -DKDE4_BUILD_TESTS=OFF \
-DKDE_PLATFORM_FEATURE_DISABLE_DEPRECATED=TRUE \
-DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \
-DCMAKE_C_FLAGS_RELEASE:STRING="$SLKCFLAGS" \
@@ -11,9 +13,8 @@ cd build
-DCMAKE_INSTALL_PREFIX=/usr \
-DMAN_INSTALL_DIR=/usr/man \
-DSYSCONF_INSTALL_DIR=/etc/kde \
+ -DLIB_SUFFIX=${LIBDIRSUFFIX} \
-DLIB_INSTALL_DIR=/usr/lib$LIBDIRSUFFIX \
-DLIBEXEC_INSTALL_DIR=/usr/lib$LIBDIRSUFFIX \
- -DLIB_SUFFIX=${LIBDIRSUFFIX} \
- -DWITH_KDE4Workspace=OFF \
..
diff --git a/kde/cmake/kdeaccessibility b/kde/cmake/kdeaccessibility
deleted file mode 100644
index 3fc784c..0000000
--- a/kde/cmake/kdeaccessibility
+++ /dev/null
@@ -1,17 +0,0 @@
-mkdir -p build
-cd build
- cmake \
- $KDE_OPT_ARGS \
- -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \
- -DCMAKE_C_FLAGS_RELEASE:STRING="$SLKCFLAGS" \
- -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
- -DCMAKE_CXX_FLAGS_RELEASE:STRING="$SLKCFLAGS" \
- -DCMAKE_BUILD_TYPE=Release \
- -DCMAKE_INSTALL_PREFIX=/usr \
- -DMAN_INSTALL_DIR=/usr/man \
- -DSYSCONF_INSTALL_DIR=/etc/kde \
- -DLIB_SUFFIX=${LIBDIRSUFFIX} \
- -DBUILD_jovie:BOOL=OFF \
- -DWITH_Speechd:BOOL=OFF \
- ..
-
diff --git a/kde/cmake/kdeadmin b/kde/cmake/kdeadmin
deleted file mode 100644
index 863974d..0000000
--- a/kde/cmake/kdeadmin
+++ /dev/null
@@ -1,18 +0,0 @@
-mkdir -p build
-cd build
- cmake \
- $KDE_OPT_ARGS \
- -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \
- -DCMAKE_C_FLAGS_RELEASE:STRING="$SLKCFLAGS" \
- -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
- -DCMAKE_CXX_FLAGS_RELEASE:STRING="$SLKCFLAGS" \
- -DCMAKE_BUILD_TYPE=Release \
- -DCMAKE_INSTALL_PREFIX=/usr \
- -DMAN_INSTALL_DIR=/usr/man \
- -DSYSCONF_INSTALL_DIR=/etc/kde \
- -DLIB_SUFFIX=${LIBDIRSUFFIX} \
- -DKU_FIRSTGID=1000 \
- -DKU_FIRSTUID=1000 \
- --with-shadow \
- ..
-
diff --git a/kde/cmake/kdeartwork b/kde/cmake/kdeartwork
deleted file mode 100644
index e6970bd..0000000
--- a/kde/cmake/kdeartwork
+++ /dev/null
@@ -1,24 +0,0 @@
-# Temporary kludge to allow badly ported app to compile:
-if ! grep -q 'cmake_minimum_required' CMakeLists.txt ; then
- # Prepend a cmake_minimum_required stanza at the top, which enables
- # newer cmake features which the build needs:
- sed -i -e '1icmake_minimum_required(VERSION 2.8.9)\' CMakeLists.txt
-fi
-
-mkdir -p build
-cd build
- cmake \
- $KDE_OPT_ARGS \
- -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \
- -DCMAKE_C_FLAGS_RELEASE:STRING="$SLKCFLAGS" \
- -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
- -DCMAKE_CXX_FLAGS_RELEASE:STRING="$SLKCFLAGS" \
- -DCMAKE_BUILD_TYPE=Release \
- -DCMAKE_INSTALL_PREFIX=/usr \
- -DMAN_INSTALL_DIR=/usr/man \
- -DSYSCONF_INSTALL_DIR=/etc/kde \
- -DLIB_SUFFIX=${LIBDIRSUFFIX} \
- -DKSCREENSAVER_SOUND_SUPPORT=ON \
- -DBUILD_kwin-styles=OFF \
- ..
-
diff --git a/kde/cmake/kdebase b/kde/cmake/kdebase
deleted file mode 100644
index c1835c3..0000000
--- a/kde/cmake/kdebase
+++ /dev/null
@@ -1,16 +0,0 @@
-mkdir -p build
-cd build
- cmake \
- $KDE_OPT_ARGS \
- -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \
- -DCMAKE_C_FLAGS_RELEASE:STRING="$SLKCFLAGS" \
- -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
- -DCMAKE_CXX_FLAGS_RELEASE:STRING="$SLKCFLAGS" \
- -DCMAKE_BUILD_TYPE=Release \
- -DCMAKE_INSTALL_PREFIX=/usr \
- -DMAN_INSTALL_DIR=/usr/man \
- -DSYSCONF_INSTALL_DIR=/etc/kde \
- -DLIB_SUFFIX=${LIBDIRSUFFIX} \
- -DRUN_KAPPFINDER=ON \
- ..
-
diff --git a/kde/cmake/kdebindings b/kde/cmake/kdebindings
deleted file mode 100644
index 086f962..0000000
--- a/kde/cmake/kdebindings
+++ /dev/null
@@ -1,31 +0,0 @@
-# Set 'vendorarch' (install location for vendor shipped
-# architecture dependent perl modules):
-eval $(perl '-V:vendorarch')
-
-# Likewise for Ruby (note that our "vendordir" is empty, so we use sitedir):
-ruby_vendorlibdir=$(ruby -rrbconfig -e 'puts Config::CONFIG["sitelibdir"]')
-ruby_vendorarchdir=$(ruby -rrbconfig -e 'puts Config::CONFIG["sitearchdir"]')
-
-mkdir -p build
-cd build
- #-DCMAKE_BACKWARDS_COMPATIBILITY:STRING="2.2" \
- cmake \
- $KDE_OPT_ARGS \
- -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \
- -DCMAKE_C_FLAGS_RELEASE:STRING="$SLKCFLAGS" \
- -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
- -DCMAKE_CXX_FLAGS_RELEASE:STRING="$SLKCFLAGS" \
- -DCMAKE_BUILD_TYPE=Release \
- -DCMAKE_INSTALL_PREFIX=/usr \
- -DMAN_INSTALL_DIR=/usr/man \
- -DCUSTOM_PERL_SITE_ARCH_DIR=${vendorarch} \
- -DRUBY_VENDORARCH_DIR:PATH=${ruby_vendorarchdir} \
- -DRUBY_VENDORLIB_DIR:PATH=${ruby_vendorlibdir} \
- -DSYSCONF_INSTALL_DIR=/etc/kde \
- -DLIB_SUFFIX=${LIBDIRSUFFIX} \
- -DENABLE_QYOTO:BOOL=OFF \
- -DENABLE_QSCINTILLA_SHARP:BOOL=OFF \
- -DENABLE_KIMONO:BOOL=OFF \
- -DBUILD_csharp:BOOL=OFF \
- ..
-
diff --git a/kde/cmake/kdebugsettings b/kde/cmake/kdebugsettings
deleted file mode 120000
index ab12832..0000000
--- a/kde/cmake/kdebugsettings
+++ /dev/null
@@ -1 +0,0 @@
-applications5 \ No newline at end of file
diff --git a/kde/cmake/kdeclarative b/kde/cmake/kdeclarative
deleted file mode 120000
index ec699d7..0000000
--- a/kde/cmake/kdeclarative
+++ /dev/null
@@ -1 +0,0 @@
-frameworks \ No newline at end of file
diff --git a/kde/cmake/kdeconnect-framework b/kde/cmake/kdeconnect-framework
deleted file mode 120000
index eff359e..0000000
--- a/kde/cmake/kdeconnect-framework
+++ /dev/null
@@ -1 +0,0 @@
-plasma \ No newline at end of file
diff --git a/kde/cmake/kdecoration b/kde/cmake/kdecoration
deleted file mode 120000
index eff359e..0000000
--- a/kde/cmake/kdecoration
+++ /dev/null
@@ -1 +0,0 @@
-plasma \ No newline at end of file
diff --git a/kde/cmake/kded b/kde/cmake/kded
deleted file mode 120000
index ec699d7..0000000
--- a/kde/cmake/kded
+++ /dev/null
@@ -1 +0,0 @@
-frameworks \ No newline at end of file
diff --git a/kde/cmake/kdegraphics-thumbnailers b/kde/cmake/kdegraphics-thumbnailers
deleted file mode 120000
index ab12832..0000000
--- a/kde/cmake/kdegraphics-thumbnailers
+++ /dev/null
@@ -1 +0,0 @@
-applications5 \ No newline at end of file
diff --git a/kde/cmake/kdelibs b/kde/cmake/kdelibs
index 92015a9..08add25 100644
--- a/kde/cmake/kdelibs
+++ b/kde/cmake/kdelibs
@@ -13,5 +13,6 @@ cd build
-DSYSCONF_INSTALL_DIR=/etc/kde \
-DLIB_SUFFIX=${LIBDIRSUFFIX} \
-DKDE_DISTRIBUTION_TEXT="volkerdi@slackware.com" \
+ -DWITH_SOLID_UDISKS2=ON \
..
diff --git a/kde/cmake/kdelibs4support b/kde/cmake/kdelibs4support
deleted file mode 120000
index ec699d7..0000000
--- a/kde/cmake/kdelibs4support
+++ /dev/null
@@ -1 +0,0 @@
-frameworks \ No newline at end of file
diff --git a/kde/cmake/kdenetwork b/kde/cmake/kdenetwork
deleted file mode 100644
index eeb6206..0000000
--- a/kde/cmake/kdenetwork
+++ /dev/null
@@ -1,16 +0,0 @@
-mkdir -p build
-cd build
- cmake \
- $KDE_OPT_ARGS \
- -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \
- -DCMAKE_C_FLAGS_RELEASE:STRING="$SLKCFLAGS" \
- -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
- -DCMAKE_CXX_FLAGS_RELEASE:STRING="$SLKCFLAGS" \
- -DCMAKE_BUILD_TYPE=Release \
- -DCMAKE_INSTALL_PREFIX=/usr \
- -DMAN_INSTALL_DIR=/usr/man \
- -DSYSCONF_INSTALL_DIR=/etc/kde \
- -DLIB_SUFFIX=${LIBDIRSUFFIX} \
- -DWITH_irc=ON \
- ..
-
diff --git a/kde/cmake/kdenetwork-filesharing b/kde/cmake/kdenetwork-filesharing
deleted file mode 120000
index ab12832..0000000
--- a/kde/cmake/kdenetwork-filesharing
+++ /dev/null
@@ -1 +0,0 @@
-applications5 \ No newline at end of file
diff --git a/kde/cmake/kdenlive b/kde/cmake/kdenlive
deleted file mode 120000
index ab12832..0000000
--- a/kde/cmake/kdenlive
+++ /dev/null
@@ -1 +0,0 @@
-applications5 \ No newline at end of file
diff --git a/kde/cmake/kdepim-addons b/kde/cmake/kdepim-addons
deleted file mode 120000
index ab12832..0000000
--- a/kde/cmake/kdepim-addons
+++ /dev/null
@@ -1 +0,0 @@
-applications5 \ No newline at end of file
diff --git a/kde/cmake/kdepim-apps-libs b/kde/cmake/kdepim-apps-libs
deleted file mode 120000
index ab12832..0000000
--- a/kde/cmake/kdepim-apps-libs
+++ /dev/null
@@ -1 +0,0 @@
-applications5 \ No newline at end of file
diff --git a/kde/cmake/kdepim-runtime b/kde/cmake/kdepim-runtime
deleted file mode 120000
index ab12832..0000000
--- a/kde/cmake/kdepim-runtime
+++ /dev/null
@@ -1 +0,0 @@
-applications5 \ No newline at end of file
diff --git a/kde/cmake/kdepimlibs b/kde/cmake/kdepimlibs
deleted file mode 120000
index ab12832..0000000
--- a/kde/cmake/kdepimlibs
+++ /dev/null
@@ -1 +0,0 @@
-applications5 \ No newline at end of file
diff --git a/kde/cmake/kdeplasma-addons b/kde/cmake/kdeplasma-addons
deleted file mode 120000
index eff359e..0000000
--- a/kde/cmake/kdeplasma-addons
+++ /dev/null
@@ -1 +0,0 @@
-plasma \ No newline at end of file
diff --git a/kde/cmake/kdesdk-thumbnailers b/kde/cmake/kdesdk-thumbnailers
deleted file mode 120000
index ab12832..0000000
--- a/kde/cmake/kdesdk-thumbnailers
+++ /dev/null
@@ -1 +0,0 @@
-applications5 \ No newline at end of file
diff --git a/kde/cmake/kdesignerplugin b/kde/cmake/kdesignerplugin
deleted file mode 120000
index ec699d7..0000000
--- a/kde/cmake/kdesignerplugin
+++ /dev/null
@@ -1 +0,0 @@
-frameworks \ No newline at end of file
diff --git a/kde/cmake/kdesu b/kde/cmake/kdesu
deleted file mode 120000
index ec699d7..0000000
--- a/kde/cmake/kdesu
+++ /dev/null
@@ -1 +0,0 @@
-frameworks \ No newline at end of file
diff --git a/kde/cmake/kdewebdev b/kde/cmake/kdewebdev
deleted file mode 100644
index 1e309b8..0000000
--- a/kde/cmake/kdewebdev
+++ /dev/null
@@ -1,17 +0,0 @@
-mkdir -p build
-cd build
- cmake \
- $KDE_OPT_ARGS \
- -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \
- -DCMAKE_C_FLAGS_RELEASE:STRING="$SLKCFLAGS" \
- -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
- -DCMAKE_CXX_FLAGS_RELEASE:STRING="$SLKCFLAGS" \
- -DCMAKE_BUILD_TYPE=Release \
- -DCMAKE_INSTALL_PREFIX=/usr \
- -DMAN_INSTALL_DIR=/usr/man \
- -DSYSCONF_INSTALL_DIR=/etc/kde \
- -DLIB_SUFFIX=${LIBDIRSUFFIX} \
- -DLIBTIDY_INCLUDE_DIR=$PKG/usr/include \
- -DLIBTIDY_LIBRARIES=$PKG/usr/lib${LIBDIRSUFFIX}/libtidy.so \
- ..
-
diff --git a/kde/cmake/kdewebkit b/kde/cmake/kdewebkit
deleted file mode 120000
index ec699d7..0000000
--- a/kde/cmake/kdewebkit
+++ /dev/null
@@ -1 +0,0 @@
-frameworks \ No newline at end of file
diff --git a/kde/cmake/kdgantt2 b/kde/cmake/kdgantt2
deleted file mode 120000
index ab12832..0000000
--- a/kde/cmake/kdgantt2
+++ /dev/null
@@ -1 +0,0 @@
-applications5 \ No newline at end of file
diff --git a/kde/cmake/kdiamond b/kde/cmake/kdiamond
deleted file mode 120000
index ab12832..0000000
--- a/kde/cmake/kdiamond
+++ /dev/null
@@ -1 +0,0 @@
-applications5 \ No newline at end of file
diff --git a/kde/cmake/kdnssd b/kde/cmake/kdnssd
deleted file mode 120000
index ec699d7..0000000
--- a/kde/cmake/kdnssd
+++ /dev/null
@@ -1 +0,0 @@
-frameworks \ No newline at end of file
diff --git a/kde/cmake/kdoctools b/kde/cmake/kdoctools
deleted file mode 120000
index ec699d7..0000000
--- a/kde/cmake/kdoctools
+++ /dev/null
@@ -1 +0,0 @@
-frameworks \ No newline at end of file
diff --git a/kde/cmake/kemoticons b/kde/cmake/kemoticons
deleted file mode 120000
index ec699d7..0000000
--- a/kde/cmake/kemoticons
+++ /dev/null
@@ -1 +0,0 @@
-frameworks \ No newline at end of file
diff --git a/kde/cmake/kfileaudiopreview b/kde/cmake/kfileaudiopreview
deleted file mode 120000
index ec699d7..0000000
--- a/kde/cmake/kfileaudiopreview
+++ /dev/null
@@ -1 +0,0 @@
-frameworks \ No newline at end of file
diff --git a/kde/cmake/kfilemetadata5 b/kde/cmake/kfilemetadata5
deleted file mode 120000
index eff359e..0000000
--- a/kde/cmake/kfilemetadata5
+++ /dev/null
@@ -1 +0,0 @@
-plasma \ No newline at end of file
diff --git a/kde/cmake/kfloppy b/kde/cmake/kfloppy
deleted file mode 120000
index ab12832..0000000
--- a/kde/cmake/kfloppy
+++ /dev/null
@@ -1 +0,0 @@
-applications5 \ No newline at end of file
diff --git a/kde/cmake/kfourinline b/kde/cmake/kfourinline
deleted file mode 120000
index ab12832..0000000
--- a/kde/cmake/kfourinline
+++ /dev/null
@@ -1 +0,0 @@
-applications5 \ No newline at end of file
diff --git a/kde/cmake/kgamma5 b/kde/cmake/kgamma5
deleted file mode 120000
index eff359e..0000000
--- a/kde/cmake/kgamma5
+++ /dev/null
@@ -1 +0,0 @@
-plasma \ No newline at end of file
diff --git a/kde/cmake/kgeography b/kde/cmake/kgeography
deleted file mode 120000
index ab12832..0000000
--- a/kde/cmake/kgeography
+++ /dev/null
@@ -1 +0,0 @@
-applications5 \ No newline at end of file
diff --git a/kde/cmake/networkmanagement b/kde/cmake/kget
index 81964f4..c7f0e45 100644
--- a/kde/cmake/networkmanagement
+++ b/kde/cmake/kget
@@ -11,7 +11,13 @@ cd build
-DCMAKE_INSTALL_PREFIX=/usr \
-DMAN_INSTALL_DIR=/usr/man \
-DSYSCONF_INSTALL_DIR=/etc/kde \
- -DDBUS_SYSTEM_POLICY_DIR=/etc/dbus-1/system.d \
-DLIB_SUFFIX=${LIBDIRSUFFIX} \
+ -DLIB_INSTALL_DIR=/usr/lib$LIBDIRSUFFIX \
+ -DLIBEXEC_INSTALL_DIR=/usr/lib$LIBDIRSUFFIX \
+ -DKDE4_BUILD_TESTS=OFF \
+ -DWITH_NepomukCore=OFF \
+ -DWITH_NepomukWidgets=OFF \
+ -DWITH_KDE4Workspace=OFF \
+ -DWITH_QGpgme=OFF \
..
diff --git a/kde/cmake/kglobalaccel b/kde/cmake/kglobalaccel
deleted file mode 120000
index ec699d7..0000000
--- a/kde/cmake/kglobalaccel
+++ /dev/null
@@ -1 +0,0 @@
-frameworks \ No newline at end of file
diff --git a/kde/cmake/kguiaddons b/kde/cmake/kguiaddons
deleted file mode 120000
index ec699d7..0000000
--- a/kde/cmake/kguiaddons
+++ /dev/null
@@ -1 +0,0 @@
-frameworks \ No newline at end of file
diff --git a/kde/cmake/khangman b/kde/cmake/khangman
deleted file mode 120000
index ab12832..0000000
--- a/kde/cmake/khangman
+++ /dev/null
@@ -1 +0,0 @@
-applications5 \ No newline at end of file
diff --git a/kde/cmake/khelpcenter b/kde/cmake/khelpcenter
deleted file mode 120000
index eff359e..0000000
--- a/kde/cmake/khelpcenter
+++ /dev/null
@@ -1 +0,0 @@
-plasma \ No newline at end of file
diff --git a/kde/cmake/kholidays b/kde/cmake/kholidays
deleted file mode 120000
index ab12832..0000000
--- a/kde/cmake/kholidays
+++ /dev/null
@@ -1 +0,0 @@
-applications5 \ No newline at end of file
diff --git a/kde/cmake/khotkeys b/kde/cmake/khotkeys
deleted file mode 120000
index eff359e..0000000
--- a/kde/cmake/khotkeys
+++ /dev/null
@@ -1 +0,0 @@
-plasma \ No newline at end of file
diff --git a/kde/cmake/khtml b/kde/cmake/khtml
deleted file mode 120000
index ec699d7..0000000
--- a/kde/cmake/khtml
+++ /dev/null
@@ -1 +0,0 @@
-frameworks \ No newline at end of file
diff --git a/kde/cmake/ki18n b/kde/cmake/ki18n
deleted file mode 120000
index ec699d7..0000000
--- a/kde/cmake/ki18n
+++ /dev/null
@@ -1 +0,0 @@
-frameworks \ No newline at end of file
diff --git a/kde/cmake/kiconthemes b/kde/cmake/kiconthemes
deleted file mode 120000
index ec699d7..0000000
--- a/kde/cmake/kiconthemes
+++ /dev/null
@@ -1 +0,0 @@
-frameworks \ No newline at end of file
diff --git a/kde/cmake/kidentitymanagement b/kde/cmake/kidentitymanagement
deleted file mode 120000
index ab12832..0000000
--- a/kde/cmake/kidentitymanagement
+++ /dev/null
@@ -1 +0,0 @@
-applications5 \ No newline at end of file
diff --git a/kde/cmake/kidletime b/kde/cmake/kidletime
deleted file mode 120000
index ec699d7..0000000
--- a/kde/cmake/kidletime
+++ /dev/null
@@ -1 +0,0 @@
-frameworks \ No newline at end of file
diff --git a/kde/cmake/kig b/kde/cmake/kig
deleted file mode 120000
index ab12832..0000000
--- a/kde/cmake/kig
+++ /dev/null
@@ -1 +0,0 @@
-applications5 \ No newline at end of file
diff --git a/kde/cmake/killbots b/kde/cmake/killbots
deleted file mode 120000
index ab12832..0000000
--- a/kde/cmake/killbots
+++ /dev/null
@@ -1 +0,0 @@
-applications5 \ No newline at end of file
diff --git a/kde/cmake/kimageformats b/kde/cmake/kimageformats
deleted file mode 120000
index ec699d7..0000000
--- a/kde/cmake/kimageformats
+++ /dev/null
@@ -1 +0,0 @@
-frameworks \ No newline at end of file
diff --git a/kde/cmake/kimap b/kde/cmake/kimap
deleted file mode 120000
index ab12832..0000000
--- a/kde/cmake/kimap
+++ /dev/null
@@ -1 +0,0 @@
-applications5 \ No newline at end of file
diff --git a/kde/cmake/kinfocenter b/kde/cmake/kinfocenter
deleted file mode 120000
index eff359e..0000000
--- a/kde/cmake/kinfocenter
+++ /dev/null
@@ -1 +0,0 @@
-plasma \ No newline at end of file
diff --git a/kde/cmake/kinit b/kde/cmake/kinit
deleted file mode 120000
index ec699d7..0000000
--- a/kde/cmake/kinit
+++ /dev/null
@@ -1 +0,0 @@
-frameworks \ No newline at end of file
diff --git a/kde/cmake/kio b/kde/cmake/kio
deleted file mode 120000
index ec699d7..0000000
--- a/kde/cmake/kio
+++ /dev/null
@@ -1 +0,0 @@
-frameworks \ No newline at end of file
diff --git a/kde/cmake/kio-extras b/kde/cmake/kio-extras
deleted file mode 120000
index ab12832..0000000
--- a/kde/cmake/kio-extras
+++ /dev/null
@@ -1 +0,0 @@
-applications5 \ No newline at end of file
diff --git a/kde/cmake/kiriki b/kde/cmake/kiriki
deleted file mode 120000
index ab12832..0000000
--- a/kde/cmake/kiriki
+++ /dev/null
@@ -1 +0,0 @@
-applications5 \ No newline at end of file
diff --git a/kde/cmake/kitemmodels b/kde/cmake/kitemmodels
deleted file mode 120000
index ec699d7..0000000
--- a/kde/cmake/kitemmodels
+++ /dev/null
@@ -1 +0,0 @@
-frameworks \ No newline at end of file
diff --git a/kde/cmake/kitemviews b/kde/cmake/kitemviews
deleted file mode 120000
index ec699d7..0000000
--- a/kde/cmake/kitemviews
+++ /dev/null
@@ -1 +0,0 @@
-frameworks \ No newline at end of file
diff --git a/kde/cmake/kiten b/kde/cmake/kiten
deleted file mode 120000
index ab12832..0000000
--- a/kde/cmake/kiten
+++ /dev/null
@@ -1 +0,0 @@
-applications5 \ No newline at end of file
diff --git a/kde/cmake/kjobwidgets b/kde/cmake/kjobwidgets
deleted file mode 120000
index ec699d7..0000000
--- a/kde/cmake/kjobwidgets
+++ /dev/null
@@ -1 +0,0 @@
-frameworks \ No newline at end of file
diff --git a/kde/cmake/kjs b/kde/cmake/kjs
deleted file mode 120000
index ec699d7..0000000
--- a/kde/cmake/kjs
+++ /dev/null
@@ -1 +0,0 @@
-frameworks \ No newline at end of file
diff --git a/kde/cmake/kjsembed b/kde/cmake/kjsembed
deleted file mode 120000
index ec699d7..0000000
--- a/kde/cmake/kjsembed
+++ /dev/null
@@ -1 +0,0 @@
-frameworks \ No newline at end of file
diff --git a/kde/cmake/kjumpingcube b/kde/cmake/kjumpingcube
deleted file mode 120000
index ab12832..0000000
--- a/kde/cmake/kjumpingcube
+++ /dev/null
@@ -1 +0,0 @@
-applications5 \ No newline at end of file
diff --git a/kde/cmake/kldap b/kde/cmake/kldap
deleted file mode 120000
index ab12832..0000000
--- a/kde/cmake/kldap
+++ /dev/null
@@ -1 +0,0 @@
-applications5 \ No newline at end of file
diff --git a/kde/cmake/kleopatra b/kde/cmake/kleopatra
deleted file mode 120000
index ab12832..0000000
--- a/kde/cmake/kleopatra
+++ /dev/null
@@ -1 +0,0 @@
-applications5 \ No newline at end of file
diff --git a/kde/cmake/klettres b/kde/cmake/klettres
deleted file mode 120000
index ab12832..0000000
--- a/kde/cmake/klettres
+++ /dev/null
@@ -1 +0,0 @@
-applications5 \ No newline at end of file
diff --git a/kde/cmake/klines b/kde/cmake/klines
deleted file mode 120000
index ab12832..0000000
--- a/kde/cmake/klines
+++ /dev/null
@@ -1 +0,0 @@
-applications5 \ No newline at end of file
diff --git a/kde/cmake/kmahjongg b/kde/cmake/kmahjongg
deleted file mode 120000
index ab12832..0000000
--- a/kde/cmake/kmahjongg
+++ /dev/null
@@ -1 +0,0 @@
-applications5 \ No newline at end of file
diff --git a/kde/cmake/kmailtransport b/kde/cmake/kmailtransport
deleted file mode 120000
index ab12832..0000000
--- a/kde/cmake/kmailtransport
+++ /dev/null
@@ -1 +0,0 @@
-applications5 \ No newline at end of file
diff --git a/kde/cmake/kmbox b/kde/cmake/kmbox
deleted file mode 120000
index ab12832..0000000
--- a/kde/cmake/kmbox
+++ /dev/null
@@ -1 +0,0 @@
-applications5 \ No newline at end of file
diff --git a/kde/cmake/kmediaplayer b/kde/cmake/kmediaplayer
deleted file mode 120000
index ec699d7..0000000
--- a/kde/cmake/kmediaplayer
+++ /dev/null
@@ -1 +0,0 @@
-frameworks \ No newline at end of file
diff --git a/kde/cmake/kmenuedit b/kde/cmake/kmenuedit
deleted file mode 120000
index eff359e..0000000
--- a/kde/cmake/kmenuedit
+++ /dev/null
@@ -1 +0,0 @@
-plasma \ No newline at end of file
diff --git a/kde/cmake/kmime b/kde/cmake/kmime
deleted file mode 120000
index ab12832..0000000
--- a/kde/cmake/kmime
+++ /dev/null
@@ -1 +0,0 @@
-applications5 \ No newline at end of file
diff --git a/kde/cmake/kmines b/kde/cmake/kmines
deleted file mode 120000
index ab12832..0000000
--- a/kde/cmake/kmines
+++ /dev/null
@@ -1 +0,0 @@
-applications5 \ No newline at end of file
diff --git a/kde/cmake/kmplot b/kde/cmake/kmplot
deleted file mode 120000
index ab12832..0000000
--- a/kde/cmake/kmplot
+++ /dev/null
@@ -1 +0,0 @@
-applications5 \ No newline at end of file
diff --git a/kde/cmake/knetwalk b/kde/cmake/knetwalk
deleted file mode 120000
index ab12832..0000000
--- a/kde/cmake/knetwalk
+++ /dev/null
@@ -1 +0,0 @@
-applications5 \ No newline at end of file
diff --git a/kde/cmake/knewstuff b/kde/cmake/knewstuff
deleted file mode 120000
index ec699d7..0000000
--- a/kde/cmake/knewstuff
+++ /dev/null
@@ -1 +0,0 @@
-frameworks \ No newline at end of file
diff --git a/kde/cmake/knotifications b/kde/cmake/knotifications
deleted file mode 120000
index ec699d7..0000000
--- a/kde/cmake/knotifications
+++ /dev/null
@@ -1 +0,0 @@
-frameworks \ No newline at end of file
diff --git a/kde/cmake/knotifyconfig b/kde/cmake/knotifyconfig
deleted file mode 120000
index ec699d7..0000000
--- a/kde/cmake/knotifyconfig
+++ /dev/null
@@ -1 +0,0 @@
-frameworks \ No newline at end of file
diff --git a/kde/cmake/kollision b/kde/cmake/kollision
deleted file mode 120000
index ab12832..0000000
--- a/kde/cmake/kollision
+++ /dev/null
@@ -1 +0,0 @@
-applications5 \ No newline at end of file
diff --git a/kde/cmake/kolourpaint b/kde/cmake/kolourpaint
deleted file mode 120000
index ab12832..0000000
--- a/kde/cmake/kolourpaint
+++ /dev/null
@@ -1 +0,0 @@
-applications5 \ No newline at end of file
diff --git a/kde/cmake/kompare b/kde/cmake/kompare
deleted file mode 120000
index ab12832..0000000
--- a/kde/cmake/kompare
+++ /dev/null
@@ -1 +0,0 @@
-applications5 \ No newline at end of file
diff --git a/kde/cmake/konsole b/kde/cmake/konsole
deleted file mode 120000
index ab12832..0000000
--- a/kde/cmake/konsole
+++ /dev/null
@@ -1 +0,0 @@
-applications5 \ No newline at end of file
diff --git a/kde/cmake/kontactinterface b/kde/cmake/kontactinterface
deleted file mode 120000
index ab12832..0000000
--- a/kde/cmake/kontactinterface
+++ /dev/null
@@ -1 +0,0 @@
-applications5 \ No newline at end of file
diff --git a/kde/cmake/kde-baseapps b/kde/cmake/kopete
index 0bb9786..f25d089 100644
--- a/kde/cmake/kde-baseapps
+++ b/kde/cmake/kopete
@@ -12,14 +12,13 @@ cd build
-DMAN_INSTALL_DIR=/usr/man \
-DSYSCONF_INSTALL_DIR=/etc/kde \
-DLIB_SUFFIX=${LIBDIRSUFFIX} \
- -DLIB_INSTALL_DIR=/usr/lib$LIBDIRSUFFIX \
- -DLIBEXEC_INSTALL_DIR=/usr/lib$LIBDIRSUFFIX \
- -DQT_PLUGIN_INSTALL_DIR=/usr/lib$LIBDIRSUFFIX/qt5/plugins \
- -DQML_INSTALL_DIR=/usr/lib$LIBDIRSUFFIX/qt5/qml \
+ -DLIB_INSTALL_DIR=lib$LIBDIRSUFFIX \
+ -DLIBEXEC_INSTALL_DIR=lib$LIBDIRSUFFIX \
+ -DQT_PLUGIN_INSTALL_DIR=lib$LIBDIRSUFFIX/qt5/plugins \
+ -DQML_INSTALL_DIR=lib$LIBDIRSUFFIX/qt5/qml \
-DKDE_INSTALL_USE_QT_SYS_PATHS=ON \
-DBUILD_TESTING=OFF \
-DQca-qt5_DIR=/usr/lib${LIBDIRSUFFIX}/cmake/Qca \
- -DBalooWidgets_DIR=/usr/lib${LIBDIRSUFFIX}/cmake/KF5BalooWidgets \
- -DBaloo_DIR=/usr/lib${LIBDIRSUFFIX}/cmake/KF5Baloo \
+ -DWITH_wlm:BOOL=OFF \
..
diff --git a/kde/cmake/kpackage b/kde/cmake/kpackage
deleted file mode 120000
index ec699d7..0000000
--- a/kde/cmake/kpackage
+++ /dev/null
@@ -1 +0,0 @@
-frameworks \ No newline at end of file
diff --git a/kde/cmake/kparts b/kde/cmake/kparts
deleted file mode 120000
index ec699d7..0000000
--- a/kde/cmake/kparts
+++ /dev/null
@@ -1 +0,0 @@
-frameworks \ No newline at end of file
diff --git a/kde/cmake/kpat b/kde/cmake/kpat
deleted file mode 120000
index ab12832..0000000
--- a/kde/cmake/kpat
+++ /dev/null
@@ -1 +0,0 @@
-applications5 \ No newline at end of file
diff --git a/kde/cmake/kpeople b/kde/cmake/kpeople
deleted file mode 120000
index ec699d7..0000000
--- a/kde/cmake/kpeople
+++ /dev/null
@@ -1 +0,0 @@
-frameworks \ No newline at end of file
diff --git a/kde/cmake/kpimtextedit b/kde/cmake/kpimtextedit
deleted file mode 120000
index ab12832..0000000
--- a/kde/cmake/kpimtextedit
+++ /dev/null
@@ -1 +0,0 @@
-applications5 \ No newline at end of file
diff --git a/kde/cmake/kplotting b/kde/cmake/kplotting
deleted file mode 120000
index ec699d7..0000000
--- a/kde/cmake/kplotting
+++ /dev/null
@@ -1 +0,0 @@
-frameworks \ No newline at end of file
diff --git a/kde/cmake/kpty b/kde/cmake/kpty
deleted file mode 120000
index ec699d7..0000000
--- a/kde/cmake/kpty
+++ /dev/null
@@ -1 +0,0 @@
-frameworks \ No newline at end of file
diff --git a/kde/cmake/krfb b/kde/cmake/krfb
deleted file mode 120000
index ab12832..0000000
--- a/kde/cmake/krfb
+++ /dev/null
@@ -1 +0,0 @@
-applications5 \ No newline at end of file
diff --git a/kde/cmake/applications5 b/kde/cmake/krita
index 57353de..f559c24 100644
--- a/kde/cmake/applications5
+++ b/kde/cmake/krita
@@ -1,31 +1,3 @@
-# Temporary cludge to fix badly ported apps:
-for APP in \
-libkexiv2 \
-libkdcraw \
-kde-baseapps \
-kde-runtime \
-okular \
-kdegraphics-thumbnailers \
-kolourpaint \
-kopete \
-ksnapshot \
-superkaramba \
-libkcddb \
-kget \
-kdeartwork \
-kajongg \
-ksirk \
-kalzium \
-; do
- if [ "$APP" = "$PKGNAME" ]; then
- if ! grep -q 'cmake_minimum_required' CMakeLists.txt ; then
- # Prepend a cmake_minimum_required stanza at the top, which enables
- # newer cmake features which the build needs:
- sed -i -e '1icmake_minimum_required(VERSION 2.8.9)\' CMakeLists.txt
- fi
- fi
-done
-
mkdir build
cd build
cmake \
@@ -47,5 +19,6 @@ cd build
-DKDE_INSTALL_USE_QT_SYS_PATHS=ON \
-DBUILD_TESTING=OFF \
-DQca-qt5_DIR=/usr/lib${LIBDIRSUFFIX}/cmake/Qca \
+ -DPACKAGERS_BUILD=ON \
..
diff --git a/kde/cmake/kross b/kde/cmake/kross
deleted file mode 120000
index ec699d7..0000000
--- a/kde/cmake/kross
+++ /dev/null
@@ -1 +0,0 @@
-frameworks \ No newline at end of file
diff --git a/kde/cmake/kruler b/kde/cmake/kruler
deleted file mode 120000
index ab12832..0000000
--- a/kde/cmake/kruler
+++ /dev/null
@@ -1 +0,0 @@
-applications5 \ No newline at end of file
diff --git a/kde/cmake/krunner b/kde/cmake/krunner
deleted file mode 120000
index ec699d7..0000000
--- a/kde/cmake/krunner
+++ /dev/null
@@ -1 +0,0 @@
-frameworks \ No newline at end of file
diff --git a/kde/cmake/krusader b/kde/cmake/krusader
new file mode 100644
index 0000000..c0ff58c
--- /dev/null
+++ b/kde/cmake/krusader
@@ -0,0 +1,24 @@
+mkdir build
+cd build
+ cmake \
+ $KDE_OPT_ARGS \
+ -DKDE_PLATFORM_FEATURE_DISABLE_DEPRECATED=TRUE \
+ -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \
+ -DCMAKE_C_FLAGS_RELEASE:STRING="$SLKCFLAGS" \
+ -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
+ -DCMAKE_CXX_FLAGS_RELEASE:STRING="$SLKCFLAGS" \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DMAN_INSTALL_DIR=/usr/man \
+ -DSYSCONF_INSTALL_DIR=/etc/kde \
+ -DLIB_SUFFIX=${LIBDIRSUFFIX} \
+ -DLIB_INSTALL_DIR=lib$LIBDIRSUFFIX \
+ -DLIBEXEC_INSTALL_DIR=lib$LIBDIRSUFFIX \
+ -DQT_PLUGIN_INSTALL_DIR=lib$LIBDIRSUFFIX/qt5/plugins \
+ -DQML_INSTALL_DIR=lib$LIBDIRSUFFIX/qt5/qml \
+ -DKDE_INSTALL_USE_QT_SYS_PATHS=ON \
+ -DBUILD_TESTING=OFF \
+ -DQca-qt5_DIR=/usr/lib${LIBDIRSUFFIX}/cmake/Qca \
+ -DKDESU_PATH=/usr/lib${LIBDIRSUFFIX}/kf5/kdesu \
+ ..
+
diff --git a/kde/cmake/kscreen2 b/kde/cmake/kscreen2
deleted file mode 120000
index eff359e..0000000
--- a/kde/cmake/kscreen2
+++ /dev/null
@@ -1 +0,0 @@
-plasma \ No newline at end of file
diff --git a/kde/cmake/kscreenlocker b/kde/cmake/kscreenlocker
index eff359e..943d246 120000..100644
--- a/kde/cmake/kscreenlocker
+++ b/kde/cmake/kscreenlocker
@@ -1 +1,25 @@
-plasma \ No newline at end of file
+mkdir build
+cd build
+ cmake \
+ $KDE_OPT_ARGS \
+ -DKDE_PLATFORM_FEATURE_DISABLE_DEPRECATED=TRUE \
+ -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \
+ -DCMAKE_C_FLAGS_RELEASE:STRING="$SLKCFLAGS" \
+ -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
+ -DCMAKE_CXX_FLAGS_RELEASE:STRING="$SLKCFLAGS" \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DMAN_INSTALL_DIR=/usr/man \
+ -DSYSCONF_INSTALL_DIR=/etc/kde \
+ -DLIB_INSTALL_DIR=lib$LIBDIRSUFFIX \
+ -DLIB_SUFFIX=${LIBDIRSUFFIX} \
+ -DLIBEXEC_INSTALL_DIR=lib$LIBDIRSUFFIX \
+ -DQT_PLUGIN_INSTALL_DIR=lib$LIBDIRSUFFIX/qt5/plugins \
+ -DQML_INSTALL_DIR=lib$LIBDIRSUFFIX/qt5/qml \
+ -DKDE_INSTALL_USE_QT_SYS_PATHS=ON \
+ -DBUILD_TESTING=OFF \
+ -DHAVE_SHADOW=TRUE \
+ -DPAM_REQUIRED=OFF \
+ -DQca-qt5_DIR=/usr/lib${LIBDIRSUFFIX}/cmake/Qca \
+ ..
+
diff --git a/kde/cmake/kservice b/kde/cmake/kservice
index b33652b..86b95bb 100644
--- a/kde/cmake/kservice
+++ b/kde/cmake/kservice
@@ -1,10 +1,15 @@
+#
+# Need to append "-std=c99" to the # CMAKE_C_FLAGS, because of a bug in
+# flex-2.6.0 which generates a C code # with C++-style comments.
+# The bug has been fixed in flex 2.6.1 which is not part of Slackware.
+#
mkdir build
cd build
cmake \
$KDE_OPT_ARGS \
-DKDE_PLATFORM_FEATURE_DISABLE_DEPRECATED=TRUE \
- -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \
- -DCMAKE_C_FLAGS_RELEASE:STRING="$SLKCFLAGS" \
+ -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS -std=c99" \
+ -DCMAKE_C_FLAGS_RELEASE:STRING="$SLKCFLAGS -std=c99" \
-DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
-DCMAKE_CXX_FLAGS_RELEASE:STRING="$SLKCFLAGS" \
-DCMAKE_BUILD_TYPE=Release \
diff --git a/kde/cmake/kshisen b/kde/cmake/kshisen
deleted file mode 120000
index ab12832..0000000
--- a/kde/cmake/kshisen
+++ /dev/null
@@ -1 +0,0 @@
-applications5 \ No newline at end of file
diff --git a/kde/cmake/ksquares b/kde/cmake/ksquares
deleted file mode 120000
index ab12832..0000000
--- a/kde/cmake/ksquares
+++ /dev/null
@@ -1 +0,0 @@
-applications5 \ No newline at end of file
diff --git a/kde/cmake/ksshaskpass b/kde/cmake/ksshaskpass
deleted file mode 120000
index eff359e..0000000
--- a/kde/cmake/ksshaskpass
+++ /dev/null
@@ -1 +0,0 @@
-plasma \ No newline at end of file
diff --git a/kde/cmake/kstars b/kde/cmake/kstars
deleted file mode 120000
index ab12832..0000000
--- a/kde/cmake/kstars
+++ /dev/null
@@ -1 +0,0 @@
-applications5 \ No newline at end of file
diff --git a/kde/cmake/ksysguard b/kde/cmake/ksysguard
deleted file mode 120000
index eff359e..0000000
--- a/kde/cmake/ksysguard
+++ /dev/null
@@ -1 +0,0 @@
-plasma \ No newline at end of file
diff --git a/kde/cmake/kteatime b/kde/cmake/kteatime
deleted file mode 120000
index ab12832..0000000
--- a/kde/cmake/kteatime
+++ /dev/null
@@ -1 +0,0 @@
-applications5 \ No newline at end of file
diff --git a/kde/cmake/ktexteditor b/kde/cmake/ktexteditor
deleted file mode 120000
index ec699d7..0000000
--- a/kde/cmake/ktexteditor
+++ /dev/null
@@ -1 +0,0 @@
-frameworks \ No newline at end of file
diff --git a/kde/cmake/ktextwidgets b/kde/cmake/ktextwidgets
deleted file mode 120000
index ec699d7..0000000
--- a/kde/cmake/ktextwidgets
+++ /dev/null
@@ -1 +0,0 @@
-frameworks \ No newline at end of file
diff --git a/kde/cmake/ktimer b/kde/cmake/ktimer
deleted file mode 120000
index ab12832..0000000
--- a/kde/cmake/ktimer
+++ /dev/null
@@ -1 +0,0 @@
-applications5 \ No newline at end of file
diff --git a/kde/cmake/ktnef b/kde/cmake/ktnef
deleted file mode 120000
index ab12832..0000000
--- a/kde/cmake/ktnef
+++ /dev/null
@@ -1 +0,0 @@
-applications5 \ No newline at end of file
diff --git a/kde/cmake/ktorrent b/kde/cmake/ktorrent
deleted file mode 120000
index ab12832..0000000
--- a/kde/cmake/ktorrent
+++ /dev/null
@@ -1 +0,0 @@
-applications5 \ No newline at end of file
diff --git a/kde/cmake/ktp-accounts-kcm b/kde/cmake/ktp-accounts-kcm
deleted file mode 120000
index ab12832..0000000
--- a/kde/cmake/ktp-accounts-kcm
+++ /dev/null
@@ -1 +0,0 @@
-applications5 \ No newline at end of file
diff --git a/kde/cmake/ktp-approver b/kde/cmake/ktp-approver
deleted file mode 120000
index ab12832..0000000
--- a/kde/cmake/ktp-approver
+++ /dev/null
@@ -1 +0,0 @@
-applications5 \ No newline at end of file
diff --git a/kde/cmake/ktp-auth-handler b/kde/cmake/ktp-auth-handler
deleted file mode 120000
index ab12832..0000000
--- a/kde/cmake/ktp-auth-handler
+++ /dev/null
@@ -1 +0,0 @@
-applications5 \ No newline at end of file
diff --git a/kde/cmake/ktp-call-ui b/kde/cmake/ktp-call-ui
deleted file mode 120000
index ab12832..0000000
--- a/kde/cmake/ktp-call-ui
+++ /dev/null
@@ -1 +0,0 @@
-applications5 \ No newline at end of file
diff --git a/kde/cmake/ktp-common-internals b/kde/cmake/ktp-common-internals
deleted file mode 120000
index ab12832..0000000
--- a/kde/cmake/ktp-common-internals
+++ /dev/null
@@ -1 +0,0 @@
-applications5 \ No newline at end of file
diff --git a/kde/cmake/ktp-contact-list b/kde/cmake/ktp-contact-list
deleted file mode 120000
index ab12832..0000000
--- a/kde/cmake/ktp-contact-list
+++ /dev/null
@@ -1 +0,0 @@
-applications5 \ No newline at end of file
diff --git a/kde/cmake/ktp-contact-runner b/kde/cmake/ktp-contact-runner
deleted file mode 120000
index ab12832..0000000
--- a/kde/cmake/ktp-contact-runner
+++ /dev/null
@@ -1 +0,0 @@
-applications5 \ No newline at end of file
diff --git a/kde/cmake/ktp-desktop-applets b/kde/cmake/ktp-desktop-applets
deleted file mode 120000
index ab12832..0000000
--- a/kde/cmake/ktp-desktop-applets
+++ /dev/null
@@ -1 +0,0 @@
-applications5 \ No newline at end of file
diff --git a/kde/cmake/ktp-filetransfer-handler b/kde/cmake/ktp-filetransfer-handler
deleted file mode 120000
index ab12832..0000000
--- a/kde/cmake/ktp-filetransfer-handler
+++ /dev/null
@@ -1 +0,0 @@
-applications5 \ No newline at end of file
diff --git a/kde/cmake/ktp-kded-module b/kde/cmake/ktp-kded-module
deleted file mode 120000
index ab12832..0000000
--- a/kde/cmake/ktp-kded-module
+++ /dev/null
@@ -1 +0,0 @@
-applications5 \ No newline at end of file
diff --git a/kde/cmake/ktp-send-file b/kde/cmake/ktp-send-file
deleted file mode 120000
index ab12832..0000000
--- a/kde/cmake/ktp-send-file
+++ /dev/null
@@ -1 +0,0 @@
-applications5 \ No newline at end of file
diff --git a/kde/cmake/ktp-text-ui b/kde/cmake/ktp-text-ui
deleted file mode 120000
index ab12832..0000000
--- a/kde/cmake/ktp-text-ui
+++ /dev/null
@@ -1 +0,0 @@
-applications5 \ No newline at end of file
diff --git a/kde/cmake/kturtle b/kde/cmake/kturtle
deleted file mode 120000
index ab12832..0000000
--- a/kde/cmake/kturtle
+++ /dev/null
@@ -1 +0,0 @@
-applications5 \ No newline at end of file
diff --git a/kde/cmake/kunitconversion b/kde/cmake/kunitconversion
deleted file mode 120000
index ec699d7..0000000
--- a/kde/cmake/kunitconversion
+++ /dev/null
@@ -1 +0,0 @@
-frameworks \ No newline at end of file
diff --git a/kde/cmake/kwallet b/kde/cmake/kwallet
deleted file mode 120000
index ec699d7..0000000
--- a/kde/cmake/kwallet
+++ /dev/null
@@ -1 +0,0 @@
-frameworks \ No newline at end of file
diff --git a/kde/cmake/kwallet-pam b/kde/cmake/kwallet-pam
deleted file mode 120000
index eff359e..0000000
--- a/kde/cmake/kwallet-pam
+++ /dev/null
@@ -1 +0,0 @@
-plasma \ No newline at end of file
diff --git a/kde/cmake/kwalletmanager b/kde/cmake/kwalletmanager
deleted file mode 120000
index ab12832..0000000
--- a/kde/cmake/kwalletmanager
+++ /dev/null
@@ -1 +0,0 @@
-applications5 \ No newline at end of file
diff --git a/kde/cmake/kwave b/kde/cmake/kwave
new file mode 100644
index 0000000..38598b2
--- /dev/null
+++ b/kde/cmake/kwave
@@ -0,0 +1,25 @@
+mkdir build
+cd build
+ cmake \
+ $KDE_OPT_ARGS \
+ -DKDE_PLATFORM_FEATURE_DISABLE_DEPRECATED=TRUE \
+ -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \
+ -DCMAKE_C_FLAGS_RELEASE:STRING="$SLKCFLAGS" \
+ -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
+ -DCMAKE_CXX_FLAGS_RELEASE:STRING="$SLKCFLAGS" \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DMAN_INSTALL_DIR=/usr/man \
+ -DSYSCONF_INSTALL_DIR=/etc/kde \
+ -DLIB_SUFFIX=${LIBDIRSUFFIX} \
+ -DLIB_INSTALL_DIR=lib$LIBDIRSUFFIX \
+ -DLIBEXEC_INSTALL_DIR=lib$LIBDIRSUFFIX \
+ -DQT_PLUGIN_INSTALL_DIR=lib$LIBDIRSUFFIX/qt5/plugins \
+ -DQML_INSTALL_DIR=lib$LIBDIRSUFFIX/qt5/qml \
+ -DKDE_INSTALL_USE_QT_SYS_PATHS=ON \
+ -DBUILD_TESTING=OFF \
+ -DQca-qt5_DIR=/usr/lib${LIBDIRSUFFIX}/cmake/Qca \
+ -DWITH_MP3=ON \
+ -DWITH_OGG_OPUS=OFF \
+ ..
+
diff --git a/kde/cmake/kwayland b/kde/cmake/kwayland
deleted file mode 120000
index eff359e..0000000
--- a/kde/cmake/kwayland
+++ /dev/null
@@ -1 +0,0 @@
-plasma \ No newline at end of file
diff --git a/kde/cmake/kwayland-integration b/kde/cmake/kwayland-integration
deleted file mode 120000
index eff359e..0000000
--- a/kde/cmake/kwayland-integration
+++ /dev/null
@@ -1 +0,0 @@
-plasma \ No newline at end of file
diff --git a/kde/cmake/kwebkitpart b/kde/cmake/kwebkitpart
deleted file mode 100644
index ca8ac5d..0000000
--- a/kde/cmake/kwebkitpart
+++ /dev/null
@@ -1,11 +0,0 @@
-mkdir -p build
-cd build
- QTDIR=/usr/lib${LIBDIRSUFFIX}/qt \
- PATH=$QTDIR/bin:$PATH \
- cmake \
- -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \
- -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
- -DCMAKE_INSTALL_PREFIX=/usr \
- -DLIB_SUFFIX=${LIBDIRSUFFIX} \
- ..
-
diff --git a/kde/cmake/kwidgetsaddons b/kde/cmake/kwidgetsaddons
deleted file mode 120000
index ec699d7..0000000
--- a/kde/cmake/kwidgetsaddons
+++ /dev/null
@@ -1 +0,0 @@
-frameworks \ No newline at end of file
diff --git a/kde/cmake/kwin b/kde/cmake/kwin
deleted file mode 120000
index eff359e..0000000
--- a/kde/cmake/kwin
+++ /dev/null
@@ -1 +0,0 @@
-plasma \ No newline at end of file
diff --git a/kde/cmake/kwindowsystem b/kde/cmake/kwindowsystem
deleted file mode 120000
index ec699d7..0000000
--- a/kde/cmake/kwindowsystem
+++ /dev/null
@@ -1 +0,0 @@
-frameworks \ No newline at end of file
diff --git a/kde/cmake/kwordquiz b/kde/cmake/kwordquiz
deleted file mode 120000
index ab12832..0000000
--- a/kde/cmake/kwordquiz
+++ /dev/null
@@ -1 +0,0 @@
-applications5 \ No newline at end of file
diff --git a/kde/cmake/kwrited b/kde/cmake/kwrited
deleted file mode 120000
index eff359e..0000000
--- a/kde/cmake/kwrited
+++ /dev/null
@@ -1 +0,0 @@
-plasma \ No newline at end of file
diff --git a/kde/cmake/kxmlgui b/kde/cmake/kxmlgui
deleted file mode 120000
index ec699d7..0000000
--- a/kde/cmake/kxmlgui
+++ /dev/null
@@ -1 +0,0 @@
-frameworks \ No newline at end of file
diff --git a/kde/cmake/kxmlrpcclient b/kde/cmake/kxmlrpcclient
deleted file mode 120000
index ec699d7..0000000
--- a/kde/cmake/kxmlrpcclient
+++ /dev/null
@@ -1 +0,0 @@
-frameworks \ No newline at end of file
diff --git a/kde/cmake/libbluedevil b/kde/cmake/libbluedevil
deleted file mode 120000
index eff359e..0000000
--- a/kde/cmake/libbluedevil
+++ /dev/null
@@ -1 +0,0 @@
-plasma \ No newline at end of file
diff --git a/kde/cmake/libgravatar b/kde/cmake/libgravatar
deleted file mode 120000
index ab12832..0000000
--- a/kde/cmake/libgravatar
+++ /dev/null
@@ -1 +0,0 @@
-applications5 \ No newline at end of file
diff --git a/kde/cmake/libkdegames b/kde/cmake/libkdegames
deleted file mode 120000
index ab12832..0000000
--- a/kde/cmake/libkdegames
+++ /dev/null
@@ -1 +0,0 @@
-applications5 \ No newline at end of file
diff --git a/kde/cmake/libkdepim b/kde/cmake/libkdepim
deleted file mode 120000
index ab12832..0000000
--- a/kde/cmake/libkdepim
+++ /dev/null
@@ -1 +0,0 @@
-applications5 \ No newline at end of file
diff --git a/kde/cmake/libkeduvocdocument b/kde/cmake/libkeduvocdocument
deleted file mode 120000
index ab12832..0000000
--- a/kde/cmake/libkeduvocdocument
+++ /dev/null
@@ -1 +0,0 @@
-applications5 \ No newline at end of file
diff --git a/kde/cmake/libkleo b/kde/cmake/libkleo
deleted file mode 120000
index ab12832..0000000
--- a/kde/cmake/libkleo
+++ /dev/null
@@ -1 +0,0 @@
-applications5 \ No newline at end of file
diff --git a/kde/cmake/libkmahjongg b/kde/cmake/libkmahjongg
deleted file mode 120000
index ab12832..0000000
--- a/kde/cmake/libkmahjongg
+++ /dev/null
@@ -1 +0,0 @@
-applications5 \ No newline at end of file
diff --git a/kde/cmake/libkomparediff2 b/kde/cmake/libkomparediff2
deleted file mode 120000
index ab12832..0000000
--- a/kde/cmake/libkomparediff2
+++ /dev/null
@@ -1 +0,0 @@
-applications5 \ No newline at end of file
diff --git a/kde/cmake/libksane b/kde/cmake/libksane
deleted file mode 120000
index ab12832..0000000
--- a/kde/cmake/libksane
+++ /dev/null
@@ -1 +0,0 @@
-applications5 \ No newline at end of file
diff --git a/kde/cmake/libkscreen2 b/kde/cmake/libkscreen2
deleted file mode 120000
index eff359e..0000000
--- a/kde/cmake/libkscreen2
+++ /dev/null
@@ -1 +0,0 @@
-plasma \ No newline at end of file
diff --git a/kde/cmake/libksieve b/kde/cmake/libksieve
deleted file mode 120000
index ab12832..0000000
--- a/kde/cmake/libksieve
+++ /dev/null
@@ -1 +0,0 @@
-applications5 \ No newline at end of file
diff --git a/kde/cmake/libksysguard b/kde/cmake/libksysguard
deleted file mode 120000
index eff359e..0000000
--- a/kde/cmake/libksysguard
+++ /dev/null
@@ -1 +0,0 @@
-plasma \ No newline at end of file
diff --git a/kde/cmake/libktorrent b/kde/cmake/libktorrent
deleted file mode 120000
index ab12832..0000000
--- a/kde/cmake/libktorrent
+++ /dev/null
@@ -1 +0,0 @@
-applications5 \ No newline at end of file
diff --git a/kde/cmake/libmm-qt5 b/kde/cmake/libmm-qt5
deleted file mode 120000
index eff359e..0000000
--- a/kde/cmake/libmm-qt5
+++ /dev/null
@@ -1 +0,0 @@
-plasma \ No newline at end of file
diff --git a/kde/cmake/libnm-qt5 b/kde/cmake/libnm-qt5
deleted file mode 120000
index eff359e..0000000
--- a/kde/cmake/libnm-qt5
+++ /dev/null
@@ -1 +0,0 @@
-plasma \ No newline at end of file
diff --git a/kde/cmake/lokalize b/kde/cmake/lokalize
deleted file mode 120000
index ab12832..0000000
--- a/kde/cmake/lokalize
+++ /dev/null
@@ -1 +0,0 @@
-applications5 \ No newline at end of file
diff --git a/kde/cmake/mailcommon b/kde/cmake/mailcommon
deleted file mode 120000
index ab12832..0000000
--- a/kde/cmake/mailcommon
+++ /dev/null
@@ -1 +0,0 @@
-applications5 \ No newline at end of file
diff --git a/kde/cmake/mailimporter b/kde/cmake/mailimporter
deleted file mode 120000
index ab12832..0000000
--- a/kde/cmake/mailimporter
+++ /dev/null
@@ -1 +0,0 @@
-applications5 \ No newline at end of file
diff --git a/kde/cmake/marble b/kde/cmake/marble
index afeab28..f47a2f0 100644
--- a/kde/cmake/marble
+++ b/kde/cmake/marble
@@ -11,6 +11,7 @@ function marble_configure()
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=/usr \
-DMAN_INSTALL_DIR=/usr/man \
+ -DKDE_INSTALL_SYSCONFDIR=/etc/kde \
-DSYSCONF_INSTALL_DIR=/etc/kde \
-DLIB_SUFFIX=${LIBDIRSUFFIX} \
-DLIB_INSTALL_DIR=lib$LIBDIRSUFFIX \
@@ -28,23 +29,26 @@ marble_configure \
-DQML_INSTALL_DIR=lib$LIBDIRSUFFIX/qt5/qml \
-DKDE_INSTALL_USE_QT_SYS_PATHS=ON \
-DQca-qt5_DIR=/usr/lib${LIBDIRSUFFIX}/cmake/Qca
-cd -
-# Add Qt4 support (needed by libkgeomap):
-mkdir build_qt4
-cd build_qt4
-QT5DIR="" \
-QTDIR=/usr/lib${LIBDIRSUFFIX}/qt \
-marble_configure \
- -DQT_MOC_EXECUTABLE=/usr/lib${LIBDIRSUFFIX}/qt/bin/moc \
- -DQT_QMAKE_EXECUTABLE=/usr/lib${LIBDIRSUFFIX}/qt/bin/qmake \
- -DQT_PLUGIN_INSTALL_DIR=lib$LIBDIRSUFFIX/qt/plugins \
- -DQT_PLUGINS_DIR=lib$LIBDIRSUFFIX/qt/plugins \
- -DMARBLE_PLUGIN_PATH=/usr/lib${LIBDIRSUFFIX}/marble4/plugins \
- -DQT5BUILD=OFF \
- -DCMAKE_DISABLE_FIND_PACKAGE_Qt5=ON \
- -DCMAKE_DISABLE_FIND_PACKAGE_KF5=ON \
- -DBUILD_MARBLE_TESTS=OFF \
- -DBUILD_MARBLE_APPS=OFF
-
-# make can pick up from here, and first build the Qt4, then Qt5 stuff.
+#
+#cd -
+#
+## Add Qt4 support (needed by libkgeomap):
+#mkdir build_qt4
+#cd build_qt4
+#QT5DIR="" \
+#QTDIR=/usr/lib${LIBDIRSUFFIX}/qt \
+#marble_configure \
+# -DQT_MOC_EXECUTABLE=/usr/lib${LIBDIRSUFFIX}/qt/bin/moc \
+# -DQT_QMAKE_EXECUTABLE=/usr/lib${LIBDIRSUFFIX}/qt/bin/qmake \
+# -DQT_PLUGIN_INSTALL_DIR=lib$LIBDIRSUFFIX/qt/plugins \
+# -DQT_PLUGINS_DIR=lib$LIBDIRSUFFIX/qt/plugins \
+# -DMARBLE_PLUGIN_PATH=/usr/lib${LIBDIRSUFFIX}/marble4/plugins \
+# -DQT5BUILD=OFF \
+# -DCMAKE_DISABLE_FIND_PACKAGE_Qt5=ON \
+# -DCMAKE_DISABLE_FIND_PACKAGE_KF5=ON \
+# -DBUILD_MARBLE_TESTS=OFF \
+# -DBUILD_MARBLE_APPS=OFF
+#
+## make can pick up from here, and first build the Qt4, then Qt5 stuff.
+#
diff --git a/kde/cmake/messagelib b/kde/cmake/messagelib
index ab12832..defd50e 120000..100644
--- a/kde/cmake/messagelib
+++ b/kde/cmake/messagelib
@@ -1 +1,23 @@
-applications5 \ No newline at end of file
+mkdir build
+cd build
+ cmake \
+ $KDE_OPT_ARGS \
+ -DKDE_PLATFORM_FEATURE_DISABLE_DEPRECATED=TRUE \
+ -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \
+ -DCMAKE_C_FLAGS_RELEASE:STRING="$SLKCFLAGS" \
+ -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS -std=c++11" \
+ -DCMAKE_CXX_FLAGS_RELEASE:STRING="$SLKCFLAGS -std=c++11" \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DMAN_INSTALL_DIR=/usr/man \
+ -DSYSCONF_INSTALL_DIR=/etc/kde \
+ -DLIB_SUFFIX=${LIBDIRSUFFIX} \
+ -DLIB_INSTALL_DIR=lib$LIBDIRSUFFIX \
+ -DLIBEXEC_INSTALL_DIR=lib$LIBDIRSUFFIX \
+ -DQT_PLUGIN_INSTALL_DIR=lib$LIBDIRSUFFIX/qt5/plugins \
+ -DQML_INSTALL_DIR=lib$LIBDIRSUFFIX/qt5/qml \
+ -DKDE_INSTALL_USE_QT_SYS_PATHS=ON \
+ -DBUILD_TESTING=OFF \
+ -DQca-qt5_DIR=/usr/lib${LIBDIRSUFFIX}/cmake/Qca \
+ ..
+
diff --git a/kde/cmake/milou b/kde/cmake/milou
deleted file mode 120000
index eff359e..0000000
--- a/kde/cmake/milou
+++ /dev/null
@@ -1 +0,0 @@
-plasma \ No newline at end of file
diff --git a/kde/cmake/minuet b/kde/cmake/minuet
deleted file mode 120000
index ab12832..0000000
--- a/kde/cmake/minuet
+++ /dev/null
@@ -1 +0,0 @@
-applications5 \ No newline at end of file
diff --git a/kde/cmake/modemmanager-qt b/kde/cmake/modemmanager-qt
deleted file mode 120000
index ec699d7..0000000
--- a/kde/cmake/modemmanager-qt
+++ /dev/null
@@ -1 +0,0 @@
-frameworks \ No newline at end of file
diff --git a/kde/cmake/muon b/kde/cmake/muon
deleted file mode 120000
index eff359e..0000000
--- a/kde/cmake/muon
+++ /dev/null
@@ -1 +0,0 @@
-plasma \ No newline at end of file
diff --git a/kde/cmake/networkmanager-qt b/kde/cmake/networkmanager-qt
deleted file mode 120000
index ec699d7..0000000
--- a/kde/cmake/networkmanager-qt
+++ /dev/null
@@ -1 +0,0 @@
-frameworks \ No newline at end of file
diff --git a/kde/cmake/okteta b/kde/cmake/okteta
deleted file mode 120000
index ab12832..0000000
--- a/kde/cmake/okteta
+++ /dev/null
@@ -1 +0,0 @@
-applications5 \ No newline at end of file
diff --git a/kde/cmake/oxygen b/kde/cmake/oxygen
index eff359e..bf73c11 120000..100644
--- a/kde/cmake/oxygen
+++ b/kde/cmake/oxygen
@@ -1 +1,35 @@
-plasma \ No newline at end of file
+function configure_oxygen()
+{
+ cmake \
+ $* \
+ -DKDE_PLATFORM_FEATURE_DISABLE_DEPRECATED=TRUE \
+ -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \
+ -DCMAKE_C_FLAGS_RELEASE:STRING="$SLKCFLAGS" \
+ -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
+ -DCMAKE_CXX_FLAGS_RELEASE:STRING="$SLKCFLAGS" \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DMAN_INSTALL_DIR=/usr/man \
+ -DSYSCONF_INSTALL_DIR=/etc/kde \
+ -DLIB_SUFFIX=${LIBDIRSUFFIX} \
+ -DLIBEXEC_INSTALL_DIR=lib$LIBDIRSUFFIX \
+ -DBUILD_TESTING=OFF \
+ ..
+}
+
+# First configure the Qt5 support:
+mkdir build_qt5
+cd build_qt5
+configure_oxygen \
+ -DLIB_INSTALL_DIR=lib$LIBDIRSUFFIX \
+ -DQT_PLUGIN_INSTALL_DIR=lib$LIBDIRSUFFIX/qt5/plugins \
+ -DQML_INSTALL_DIR=lib$LIBDIRSUFFIX/qt5/qml \
+ -DKDE_INSTALL_USE_QT_SYS_PATHS=ON
+cd -
+
+# Next, the Qt4 integration:
+mkdir build_qt4
+cd build_qt4
+configure_oxygen \
+ -DUSE_KDE4=ON
+
diff --git a/kde/cmake/parley b/kde/cmake/parley
deleted file mode 120000
index ab12832..0000000
--- a/kde/cmake/parley
+++ /dev/null
@@ -1 +0,0 @@
-applications5 \ No newline at end of file
diff --git a/kde/cmake/partitionmanager b/kde/cmake/partitionmanager
index b24718e..38af6ac 100644
--- a/kde/cmake/partitionmanager
+++ b/kde/cmake/partitionmanager
@@ -12,6 +12,13 @@ cd build
-DMAN_INSTALL_DIR=/usr/man \
-DSYSCONF_INSTALL_DIR=/etc/kde \
-DLIB_SUFFIX=${LIBDIRSUFFIX} \
+ -DLIB_INSTALL_DIR=lib$LIBDIRSUFFIX \
+ -DLIBEXEC_INSTALL_DIR=lib$LIBDIRSUFFIX \
+ -DQT_PLUGIN_INSTALL_DIR=lib$LIBDIRSUFFIX/qt5/plugins \
+ -DQML_INSTALL_DIR=lib$LIBDIRSUFFIX/qt5/qml \
+ -DKDE_INSTALL_USE_QT_SYS_PATHS=ON \
+ -DBUILD_TESTING=OFF \
+ -DQca-qt5_DIR=/usr/lib${LIBDIRSUFFIX}/cmake/Qca \
-DENABLE_UDISKS2=ON \
..
diff --git a/kde/cmake/perlkde b/kde/cmake/perlkde
deleted file mode 100644
index 670c028..0000000
--- a/kde/cmake/perlkde
+++ /dev/null
@@ -1,20 +0,0 @@
-# Set 'vendorarch' (install location for vendor shipped
-# architecture dependent perl modules):
-eval $(perl '-V:vendorarch')
-
-mkdir -p build
-cd build
- cmake \
- $KDE_OPT_ARGS \
- -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \
- -DCMAKE_C_FLAGS_RELEASE:STRING="$SLKCFLAGS" \
- -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
- -DCMAKE_CXX_FLAGS_RELEASE:STRING="$SLKCFLAGS" \
- -DCMAKE_BUILD_TYPE=Release \
- -DCMAKE_INSTALL_PREFIX=/usr \
- -DMAN_INSTALL_DIR=/usr/man \
- -DCUSTOM_PERL_SITE_ARCH_DIR=$vendorarch \
- -DSYSCONF_INSTALL_DIR=/etc/kde \
- -DLIB_SUFFIX=${LIBDIRSUFFIX} \
- ..
-
diff --git a/kde/cmake/perlqt b/kde/cmake/perlqt
deleted file mode 100644
index 670c028..0000000
--- a/kde/cmake/perlqt
+++ /dev/null
@@ -1,20 +0,0 @@
-# Set 'vendorarch' (install location for vendor shipped
-# architecture dependent perl modules):
-eval $(perl '-V:vendorarch')
-
-mkdir -p build
-cd build
- cmake \
- $KDE_OPT_ARGS \
- -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \
- -DCMAKE_C_FLAGS_RELEASE:STRING="$SLKCFLAGS" \
- -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
- -DCMAKE_CXX_FLAGS_RELEASE:STRING="$SLKCFLAGS" \
- -DCMAKE_BUILD_TYPE=Release \
- -DCMAKE_INSTALL_PREFIX=/usr \
- -DMAN_INSTALL_DIR=/usr/man \
- -DCUSTOM_PERL_SITE_ARCH_DIR=$vendorarch \
- -DSYSCONF_INSTALL_DIR=/etc/kde \
- -DLIB_SUFFIX=${LIBDIRSUFFIX} \
- ..
-
diff --git a/kde/cmake/picmi b/kde/cmake/picmi
deleted file mode 120000
index ab12832..0000000
--- a/kde/cmake/picmi
+++ /dev/null
@@ -1 +0,0 @@
-applications5 \ No newline at end of file
diff --git a/kde/cmake/pimcommon b/kde/cmake/pimcommon
deleted file mode 120000
index ab12832..0000000
--- a/kde/cmake/pimcommon
+++ /dev/null
@@ -1 +0,0 @@
-applications5 \ No newline at end of file
diff --git a/kde/cmake/plasma b/kde/cmake/plasma
index 38ab64d..db1744a 100644
--- a/kde/cmake/plasma
+++ b/kde/cmake/plasma
@@ -9,13 +9,13 @@ cd build
-DCMAKE_CXX_FLAGS_RELEASE:STRING="$SLKCFLAGS" \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=/usr \
- -DMAN_INSTALL_DIR=/usr/man \
- -DSYSCONF_INSTALL_DIR=/etc/kde \
- -DLIB_INSTALL_DIR=lib$LIBDIRSUFFIX \
-DLIB_SUFFIX=${LIBDIRSUFFIX} \
- -DLIBEXEC_INSTALL_DIR=lib$LIBDIRSUFFIX \
- -DQT_PLUGIN_INSTALL_DIR=lib$LIBDIRSUFFIX/qt5/plugins \
- -DQML_INSTALL_DIR=lib$LIBDIRSUFFIX/qt5/qml \
+ -DKDE_INSTALL_LIBDIR=lib$LIBDIRSUFFIX \
+ -DKDE_INSTALL_LIBEXECDIR=lib$LIBDIRSUFFIX \
+ -DKDE_INSTALL_MANDIR=/usr/man \
+ -DKDE_INSTALL_QTPLUGINDIR=lib$LIBDIRSUFFIX/qt5/plugins \
+ -DKDE_INSTALL_QMLDIR=lib$LIBDIRSUFFIX/qt5/qml \
+ -DKDE_INSTALL_SYSCONFDIR=/etc/kde \
-DKDE_INSTALL_USE_QT_SYS_PATHS=ON \
-DBUILD_TESTING=OFF \
-DHAVE_SHADOW=TRUE \
diff --git a/kde/cmake/plasma-browser-integration b/kde/cmake/plasma-browser-integration
new file mode 100644
index 0000000..7e9e3b2
--- /dev/null
+++ b/kde/cmake/plasma-browser-integration
@@ -0,0 +1,25 @@
+mkdir build
+cd build
+ cmake \
+ $KDE_OPT_ARGS \
+ -DKDE_PLATFORM_FEATURE_DISABLE_DEPRECATED=TRUE \
+ -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \
+ -DCMAKE_C_FLAGS_RELEASE:STRING="$SLKCFLAGS" \
+ -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
+ -DCMAKE_CXX_FLAGS_RELEASE:STRING="$SLKCFLAGS" \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DLIB_SUFFIX=${LIBDIRSUFFIX} \
+ -DKDE_INSTALL_LIBDIR=lib$LIBDIRSUFFIX \
+ -DKDE_INSTALL_LIBEXECDIR=lib$LIBDIRSUFFIX \
+ -DKDE_INSTALL_MANDIR=/usr/man \
+ -DKDE_INSTALL_QTPLUGINDIR=lib$LIBDIRSUFFIX/qt5/plugins \
+ -DKDE_INSTALL_QMLDIR=lib$LIBDIRSUFFIX/qt5/qml \
+ -DKDE_INSTALL_SYSCONFDIR=/etc/kde \
+ -DKDE_INSTALL_USE_QT_SYS_PATHS=ON \
+ -DBUILD_TESTING=OFF \
+ -DHAVE_SHADOW=TRUE \
+ -DQca-qt5_DIR=/usr/lib${LIBDIRSUFFIX}/cmake/Qca \
+ -DINSTALL_CHROME_MANIFEST=ON \
+ ..
+
diff --git a/kde/cmake/plasma-desktop b/kde/cmake/plasma-desktop
deleted file mode 120000
index eff359e..0000000
--- a/kde/cmake/plasma-desktop
+++ /dev/null
@@ -1 +0,0 @@
-plasma \ No newline at end of file
diff --git a/kde/cmake/plasma-framework b/kde/cmake/plasma-framework
deleted file mode 120000
index ec699d7..0000000
--- a/kde/cmake/plasma-framework
+++ /dev/null
@@ -1 +0,0 @@
-frameworks \ No newline at end of file
diff --git a/kde/cmake/plasma-integration b/kde/cmake/plasma-integration
deleted file mode 120000
index eff359e..0000000
--- a/kde/cmake/plasma-integration
+++ /dev/null
@@ -1 +0,0 @@
-plasma \ No newline at end of file
diff --git a/kde/cmake/plasma-mediacenter b/kde/cmake/plasma-mediacenter
deleted file mode 120000
index eff359e..0000000
--- a/kde/cmake/plasma-mediacenter
+++ /dev/null
@@ -1 +0,0 @@
-plasma \ No newline at end of file
diff --git a/kde/cmake/plasma-pa b/kde/cmake/plasma-pa
deleted file mode 120000
index eff359e..0000000
--- a/kde/cmake/plasma-pa
+++ /dev/null
@@ -1 +0,0 @@
-plasma \ No newline at end of file
diff --git a/kde/cmake/plasma-sdk b/kde/cmake/plasma-sdk
deleted file mode 120000
index eff359e..0000000
--- a/kde/cmake/plasma-sdk
+++ /dev/null
@@ -1 +0,0 @@
-plasma \ No newline at end of file
diff --git a/kde/cmake/plasma-workspace b/kde/cmake/plasma-workspace
deleted file mode 120000
index eff359e..0000000
--- a/kde/cmake/plasma-workspace
+++ /dev/null
@@ -1 +0,0 @@
-plasma \ No newline at end of file
diff --git a/kde/cmake/plasma-workspace-wallpapers b/kde/cmake/plasma-workspace-wallpapers
deleted file mode 120000
index eff359e..0000000
--- a/kde/cmake/plasma-workspace-wallpapers
+++ /dev/null
@@ -1 +0,0 @@
-plasma \ No newline at end of file
diff --git a/kde/cmake/plasma5-nm b/kde/cmake/plasma5-nm
deleted file mode 120000
index eff359e..0000000
--- a/kde/cmake/plasma5-nm
+++ /dev/null
@@ -1 +0,0 @@
-plasma \ No newline at end of file
diff --git a/kde/cmake/polkit-kde-agent-1 b/kde/cmake/polkit-kde-agent-1
deleted file mode 100644
index 7c98736..0000000
--- a/kde/cmake/polkit-kde-agent-1
+++ /dev/null
@@ -1,15 +0,0 @@
-mkdir -p build
-cd build
- cmake \
- $KDE_OPT_ARGS \
- -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \
- -DCMAKE_C_FLAGS_RELEASE:STRING="$SLKCFLAGS" \
- -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
- -DCMAKE_CXX_FLAGS_RELEASE:STRING="$SLKCFLAGS" \
- -DCMAKE_BUILD_TYPE=Release \
- -DCMAKE_INSTALL_PREFIX=/usr \
- -DMAN_INSTALL_DIR=/usr/man \
- -DSYSCONF_INSTALL_DIR=/etc \
- -DLIB_SUFFIX=${LIBDIRSUFFIX} \
- ..
-
diff --git a/kde/cmake/polkit-kde-framework b/kde/cmake/polkit-kde-framework
deleted file mode 120000
index eff359e..0000000
--- a/kde/cmake/polkit-kde-framework
+++ /dev/null
@@ -1 +0,0 @@
-plasma \ No newline at end of file
diff --git a/kde/cmake/polkit-kde-kcmodules-1 b/kde/cmake/polkit-kde-kcmodules-1
deleted file mode 100644
index 7c98736..0000000
--- a/kde/cmake/polkit-kde-kcmodules-1
+++ /dev/null
@@ -1,15 +0,0 @@
-mkdir -p build
-cd build
- cmake \
- $KDE_OPT_ARGS \
- -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \
- -DCMAKE_C_FLAGS_RELEASE:STRING="$SLKCFLAGS" \
- -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
- -DCMAKE_CXX_FLAGS_RELEASE:STRING="$SLKCFLAGS" \
- -DCMAKE_BUILD_TYPE=Release \
- -DCMAKE_INSTALL_PREFIX=/usr \
- -DMAN_INSTALL_DIR=/usr/man \
- -DSYSCONF_INSTALL_DIR=/etc \
- -DLIB_SUFFIX=${LIBDIRSUFFIX} \
- ..
-
diff --git a/kde/cmake/powerdevil b/kde/cmake/powerdevil
deleted file mode 120000
index eff359e..0000000
--- a/kde/cmake/powerdevil
+++ /dev/null
@@ -1 +0,0 @@
-plasma \ No newline at end of file
diff --git a/kde/cmake/print-manager b/kde/cmake/print-manager
deleted file mode 120000
index ab12832..0000000
--- a/kde/cmake/print-manager
+++ /dev/null
@@ -1 +0,0 @@
-applications5 \ No newline at end of file
diff --git a/kde/cmake/rocs b/kde/cmake/rocs
deleted file mode 120000
index ab12832..0000000
--- a/kde/cmake/rocs
+++ /dev/null
@@ -1 +0,0 @@
-applications5 \ No newline at end of file
diff --git a/kde/cmake/sddm-kcm b/kde/cmake/sddm-kcm
index eff359e..c6a7f9b 120000..100644
--- a/kde/cmake/sddm-kcm
+++ b/kde/cmake/sddm-kcm
@@ -1 +1,26 @@
-plasma \ No newline at end of file
+mkdir build
+cd build
+ cmake \
+ $KDE_OPT_ARGS \
+ -DKDE_PLATFORM_FEATURE_DISABLE_DEPRECATED=TRUE \
+ -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \
+ -DCMAKE_C_FLAGS_RELEASE:STRING="$SLKCFLAGS" \
+ -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
+ -DCMAKE_CXX_FLAGS_RELEASE:STRING="$SLKCFLAGS" \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DLIB_SUFFIX=${LIBDIRSUFFIX} \
+ -DKDE_INSTALL_LIBDIR=lib$LIBDIRSUFFIX \
+ -DKDE_INSTALL_LIBEXECDIR=lib$LIBDIRSUFFIX \
+ -DKDE_INSTALL_MANDIR=/usr/man \
+ -DKDE_INSTALL_QTPLUGINDIR=lib$LIBDIRSUFFIX/qt5/plugins \
+ -DKDE_INSTALL_QMLDIR=lib$LIBDIRSUFFIX/qt5/qml \
+ -DKDE_INSTALL_SYSCONFDIR=/etc/kde \
+ -DKDE_INSTALL_USE_QT_SYS_PATHS=ON \
+ -DBUILD_TESTING=OFF \
+ -DHAVE_SHADOW=TRUE \
+ -DQca-qt5_DIR=/usr/lib${LIBDIRSUFFIX}/cmake/Qca \
+ -DSDDM_CONFIG_DIR=/etc/sddm.conf.d \
+ -DSDDM_CONFIG_FILE=/etc/sddm.conf \
+ ..
+
diff --git a/kde/cmake/signon-kwallet-extension b/kde/cmake/signon-kwallet-extension
deleted file mode 120000
index ab12832..0000000
--- a/kde/cmake/signon-kwallet-extension
+++ /dev/null
@@ -1 +0,0 @@
-applications5 \ No newline at end of file
diff --git a/kde/cmake/skanlite b/kde/cmake/skanlite
deleted file mode 120000
index ab12832..0000000
--- a/kde/cmake/skanlite
+++ /dev/null
@@ -1 +0,0 @@
-applications5 \ No newline at end of file
diff --git a/kde/cmake/sonnet b/kde/cmake/sonnet
deleted file mode 120000
index ec699d7..0000000
--- a/kde/cmake/sonnet
+++ /dev/null
@@ -1 +0,0 @@
-frameworks \ No newline at end of file
diff --git a/kde/cmake/spectacle b/kde/cmake/spectacle
deleted file mode 120000
index ab12832..0000000
--- a/kde/cmake/spectacle
+++ /dev/null
@@ -1 +0,0 @@
-applications5 \ No newline at end of file
diff --git a/kde/cmake/step b/kde/cmake/step
deleted file mode 120000
index ab12832..0000000
--- a/kde/cmake/step
+++ /dev/null
@@ -1 +0,0 @@
-applications5 \ No newline at end of file
diff --git a/kde/cmake/syndication b/kde/cmake/syndication
deleted file mode 120000
index ab12832..0000000
--- a/kde/cmake/syndication
+++ /dev/null
@@ -1 +0,0 @@
-applications5 \ No newline at end of file
diff --git a/kde/cmake/systemsettings b/kde/cmake/systemsettings
deleted file mode 120000
index eff359e..0000000
--- a/kde/cmake/systemsettings
+++ /dev/null
@@ -1 +0,0 @@
-plasma \ No newline at end of file
diff --git a/kde/cmake/threadweaver b/kde/cmake/threadweaver
deleted file mode 120000
index ec699d7..0000000
--- a/kde/cmake/threadweaver
+++ /dev/null
@@ -1 +0,0 @@
-frameworks \ No newline at end of file
diff --git a/kde/cmake/user-manager b/kde/cmake/user-manager
deleted file mode 120000
index eff359e..0000000
--- a/kde/cmake/user-manager
+++ /dev/null
@@ -1 +0,0 @@
-plasma \ No newline at end of file
diff --git a/kde/cmake/xembed-sni-proxy b/kde/cmake/xembed-sni-proxy
deleted file mode 120000
index eff359e..0000000
--- a/kde/cmake/xembed-sni-proxy
+++ /dev/null
@@ -1 +0,0 @@
-plasma \ No newline at end of file
diff --git a/kde/doinst.sh/amarok b/kde/doinst.sh/amarok
deleted file mode 100644
index e376b59..0000000
--- a/kde/doinst.sh/amarok
+++ /dev/null
@@ -1,5 +0,0 @@
-
-if [ -x /usr/bin/update-desktop-database ]; then
- /usr/bin/update-desktop-database /usr/share/applications >/dev/null 2>&1
-fi
-
diff --git a/kde/doinst.sh/jovie b/kde/doinst.sh/jovie
deleted file mode 100644
index e376b59..0000000
--- a/kde/doinst.sh/jovie
+++ /dev/null
@@ -1,5 +0,0 @@
-
-if [ -x /usr/bin/update-desktop-database ]; then
- /usr/bin/update-desktop-database /usr/share/applications >/dev/null 2>&1
-fi
-
diff --git a/kde/doinst.sh/kde-applications b/kde/doinst.sh/kde-applications
deleted file mode 100644
index e376b59..0000000
--- a/kde/doinst.sh/kde-applications
+++ /dev/null
@@ -1,5 +0,0 @@
-
-if [ -x /usr/bin/update-desktop-database ]; then
- /usr/bin/update-desktop-database /usr/share/applications >/dev/null 2>&1
-fi
-
diff --git a/kde/doinst.sh/kde-baseapps b/kde/doinst.sh/kde-baseapps
deleted file mode 100644
index 85ff4d8..0000000
--- a/kde/doinst.sh/kde-baseapps
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/bin/sh
-if [ -x /usr/bin/update-desktop-database ]; then
- /usr/bin/update-desktop-database /usr/share/applications >/dev/null 2>&1
-fi
diff --git a/kde/doinst.sh/kde-runtime b/kde/doinst.sh/kde-runtime
deleted file mode 100644
index 22d4849..0000000
--- a/kde/doinst.sh/kde-runtime
+++ /dev/null
@@ -1,5 +0,0 @@
-
-if [ -x usr/bin/update-desktop-database ]; then
- usr/bin/update-desktop-database usr/share/applications >/dev/null 2>&1
-fi
-
diff --git a/kde/doinst.sh/kde-workspace b/kde/doinst.sh/kde-workspace
deleted file mode 100644
index e01f8b8..0000000
--- a/kde/doinst.sh/kde-workspace
+++ /dev/null
@@ -1,10 +0,0 @@
-#!/bin/sh
-
-if [ -x usr/bin/update-desktop-database ]; then
- usr/bin/update-desktop-database usr/share/applications >/dev/null 2>&1
-fi
-
-if [ -x usr/bin/update-mime-database ]; then
- usr/bin/update-mime-database usr/share/mime >/dev/null 2>&1
-fi
-
diff --git a/kde/doinst.sh/kdeartwork b/kde/doinst.sh/kdeartwork
deleted file mode 100644
index e376b59..0000000
--- a/kde/doinst.sh/kdeartwork
+++ /dev/null
@@ -1,5 +0,0 @@
-
-if [ -x /usr/bin/update-desktop-database ]; then
- /usr/bin/update-desktop-database /usr/share/applications >/dev/null 2>&1
-fi
-
diff --git a/kde/doinst.sh/kgamma b/kde/doinst.sh/kgamma
deleted file mode 100644
index e376b59..0000000
--- a/kde/doinst.sh/kgamma
+++ /dev/null
@@ -1,5 +0,0 @@
-
-if [ -x /usr/bin/update-desktop-database ]; then
- /usr/bin/update-desktop-database /usr/share/applications >/dev/null 2>&1
-fi
-
diff --git a/kde/doinst.sh/kinit b/kde/doinst.sh/kinit
new file mode 100644
index 0000000..27e1800
--- /dev/null
+++ b/kde/doinst.sh/kinit
@@ -0,0 +1,7 @@
+# Re-run the 'setcap' command which fails during package buikding
+# (because of a mising DESTDIR?):
+if [ -f usr/lib64/kf5/start_kdeinit ]; then
+ /sbin/setcap CAP_SYS_RESOURCE=+ep usr/lib64/kf5/start_kdeinit
+elif [ -f usr/lib/kf5/start_kdeinit ]; then
+ /sbin/setcap CAP_SYS_RESOURCE=+ep usr/lib/kf5/start_kdeinit
+fi
diff --git a/kde/doinst.sh/koffice b/kde/doinst.sh/koffice
deleted file mode 100644
index e376b59..0000000
--- a/kde/doinst.sh/koffice
+++ /dev/null
@@ -1,5 +0,0 @@
-
-if [ -x /usr/bin/update-desktop-database ]; then
- /usr/bin/update-desktop-database /usr/share/applications >/dev/null 2>&1
-fi
-
diff --git a/kde/doinst.sh/kopete-cryptography b/kde/doinst.sh/kopete-cryptography
deleted file mode 100644
index 22d4849..0000000
--- a/kde/doinst.sh/kopete-cryptography
+++ /dev/null
@@ -1,5 +0,0 @@
-
-if [ -x usr/bin/update-desktop-database ]; then
- usr/bin/update-desktop-database usr/share/applications >/dev/null 2>&1
-fi
-
diff --git a/kde/doinst.sh/ksaneplugin b/kde/doinst.sh/ksaneplugin
deleted file mode 100644
index e376b59..0000000
--- a/kde/doinst.sh/ksaneplugin
+++ /dev/null
@@ -1,5 +0,0 @@
-
-if [ -x /usr/bin/update-desktop-database ]; then
- /usr/bin/update-desktop-database /usr/share/applications >/dev/null 2>&1
-fi
-
diff --git a/kde/doinst.sh/kscreenlocker b/kde/doinst.sh/kscreenlocker
new file mode 100644
index 0000000..77beeaf
--- /dev/null
+++ b/kde/doinst.sh/kscreenlocker
@@ -0,0 +1,5 @@
+# Send SIGTERM to any running kscreenlocker_greet after installing
+# kcheckpass. This will trigger a restart of kscreenlocker_greet
+# which prevents deadlock when migrating Plasma 5.9 -> 5.10.
+# See email to distributions@kde.org by Martin Graesslin on Wed, 08 Mar 2017.
+killall -TERM kscreenlocker_greet 1>/dev/null 2>/dev/null
diff --git a/kde/doinst.sh/ksnapshot b/kde/doinst.sh/ksnapshot
deleted file mode 100644
index e376b59..0000000
--- a/kde/doinst.sh/ksnapshot
+++ /dev/null
@@ -1,5 +0,0 @@
-
-if [ -x /usr/bin/update-desktop-database ]; then
- /usr/bin/update-desktop-database /usr/share/applications >/dev/null 2>&1
-fi
-
diff --git a/kde/doinst.sh/sddm-qt5 b/kde/doinst.sh/sddm-qt5
index c1364e2..d747215 100644
--- a/kde/doinst.sh/sddm-qt5
+++ b/kde/doinst.sh/sddm-qt5
@@ -78,4 +78,5 @@ fi
if [ -f etc/sddm.conf.new ]; then
config etc/sddm.conf.new
fi
-
+# And our defaults file:
+config etc/default/sddm.new
diff --git a/kde/doinst.sh/wicd-kde b/kde/doinst.sh/wicd-kde
deleted file mode 100644
index 22d4849..0000000
--- a/kde/doinst.sh/wicd-kde
+++ /dev/null
@@ -1,5 +0,0 @@
-
-if [ -x usr/bin/update-desktop-database ]; then
- usr/bin/update-desktop-database usr/share/applications >/dev/null 2>&1
-fi
-
diff --git a/kde/KDE.SlackBuild b/kde/kde.SlackBuild
index 5238b94..8cf3476 100755
--- a/kde/KDE.SlackBuild
+++ b/kde/kde.SlackBuild
@@ -22,21 +22,23 @@
# Adapted by Eric Hameleers <alien@slackware.com> from the modular x.org build.
# To build only a single package group, specify it as $1, like:
-# ./KDE.SlackBuild kdeedu
+# ./kde.SlackBuild frameworks
# To build only a single package, specify both the group name
# and the name of the package, like:
-# ./KDE.SlackBuild kdeedu:marble
+# ./kde.SlackBuild applications:dolphin
# To build multiple packages in a module, separate the package names with comma:
-# ./KDE.SlackBuild kdebindings:perlqt,perlkde
+# ./kde.SlackBuild plasma:powerdevil,bluedevil
# To build a package *and* all the remaining packages following it
# in the modules file, end the package name with a comma:
-# ./KDE.SlackBuild plasma:kio-extras,kwin,
+# ./kde.SlackBuild plasma:breeze,kwin,
# ----------------------------------------------------------------------------
CLEANUP=${CLEANUP:-"yes"} # clean up build directory after successful build.
+UPGRADE=${UPGRADE:-"yes"} # upgrade package after successful build.
PRECHECK=${PRECHECK:-"no"} # don't let the script check the available sources.
CHECKOUT=${CHECKOUT:-"no"} # don't let the script checkout missing sources.
+GRACETME=${GRACETME:-"10"} # grace time to change your mind before build starts
KDEGITURI="git://anongit.kde.org"
@@ -63,7 +65,7 @@ pkgbase() {
}
# Set initial variables:
-CWD=$(pwd)
+cd $(dirname $0) ; CWD=$(pwd)
TMP=${TMP:-/tmp}
# Set up a few useful functions:
@@ -106,6 +108,12 @@ strip_binaries() {
find $target_dir | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
find $target_dir | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
find $target_dir | xargs file | grep "current ar archive" | grep ELF | cut -f 1 -d : | xargs strip -g 2> /dev/null
+ # Also strip rpaths:
+ for file in $(find $target_dir | xargs file | grep -e "executable" -e "shared object" | grep ELF | cut -f 1 -d : 2> /dev/null) ; do
+ if [ ! "$(patchelf --print-rpath $file 2> /dev/null)" = "" ]; then
+ patchelf --remove-rpath $file
+ fi
+ done
}
process_man_pages() {
@@ -176,57 +184,47 @@ precheck() {
fi
unset PKGDUP
- # Any source not being built modular (i.e. forgotten to add to modularize)?
- for PSRC in $(cat modules/* | grep -v "^ *#" | grep -v "^$"); do
- if ! grep -wq "^${PSRC}$" modularize ; then
- echo "Not built modular: $PSRC"
- RETVAL=1
- fi
- done
- unset PSRC
-
- for MODULE in $(cat $CWD/modules/* | grep -v "^ *#") ; do
+ for MODPKG in $(cat $CWD/modules/* | grep -v "^ *#") ; do
# First find out if the pkg source is different from the actual pkg name:
- if [ -f $CWD/pkgsrc/$MODULE ]; then
- MODBASE=$(basename $(cat $CWD/pkgsrc/$MODULE))
- MODLOC=$(dirname $(cat $CWD/pkgsrc/$MODULE))/
+ if [ -f $CWD/pkgsrc/$MODPKG ]; then
+ MODBASE=$(basename $(cat $CWD/pkgsrc/$MODPKG))
+ MODLOC=$(dirname $(cat $CWD/pkgsrc/$MODPKG))/
else
- MODBASE=$MODULE
+ MODBASE=$MODPKG
MODLOC=""
fi
MODSRC="$(find $CWD/src/$MODLOC -name $MODBASE-*.tar.* |grep -vE ".asc$|.sig$" |grep -E "$MODBASE-[^-]+.tar.*$|$MODBASE-[0-9].+.tar.*$")"
if [ -z "$MODSRC" ] ; then
- echo "Module '$MODULE' does not have a matching source tarball ($MODLOC$MODBASE)!"
+ echo "Module '$MODPKG' does not have a matching source tarball ($MODLOC$MODBASE)!"
if [ "$CHECKOUT" = "yes" -o "$CHECKOUT" = "YES" ]; then
echo "Checking out KDE component at branch '$VERSION'."
git archive --format=tar --prefix ${MODBASE}-${VERSION}/ --remote ${KDEGITURI}/${MODBASE}.git v${VERSION} | xz -c > $CWD/src/${MODLOC}/${MODBASE}-${VERSION}.tar.xz
RETVAL=$?
if [ $RETVAL -ne 0 ]; then
- echo "Error while checking out '$MODULE' ($MODLOC/$MODBASE) !"
+ echo "Error while checking out '$MODPKG' ($MODLOC/$MODBASE) !"
mv $CWD/src/$MODLOC/${MODBASE}-${VERSION}.tar.xz $CWD/src/$MODLOC/${MODBASE}-${VERSION}.tar.xz.failed
fi
else
RETVAL=1
fi
fi
- # A missing slack-desc counts as fatal even if the program may end up
- # inside the big meta-package.
- if [ -z "$(find $CWD/slack-desc -name ${MODULE})" ] ; then
- echo "Module '$MODULE' does not have a slack-desc file !"
+ # A missing slack-desc counts as fatal:
+ if [ -z "$(find $CWD/slack-desc -name ${MODPKG})" ] ; then
+ echo "Module '$MODPKG' does not have a slack-desc file !"
RETVAL=1
fi
done
if [ $RETVAL -eq 0 ]; then
- echo "Check complete, build starts in 5 seconds.."
- sleep 5
+ echo "Check complete, build starts in ${GRACETME} seconds.."
+ sleep ${GRACETME}
else
echo "Precheck failed with error code '$RETVAL'."
exit 1
fi
}
-# Support function builds one complete module (like 'kdelibs'), or
+# Support function builds one complete module (like 'frameworks'), or
# exactly one package which is part of a module (like 'okular'):
build_mod_pkg () {
kde_module=$1
@@ -234,9 +232,10 @@ build_mod_pkg () {
cd $CWD/modules
- # See if $kde_module is a module name like "kdeadmin":
+ # See if $kde_module is a module name like "frameworks":
if [ ! -z "$kde_module" ]; then
if [ ! -f "$kde_module" ]; then
+ echo "** '${kde_module}' is not an existing module."
return
fi
fi
@@ -245,6 +244,9 @@ build_mod_pkg () {
mkdir -p $PKG
( for PKGNAME in $(cat $kde_module |grep -v "^$" |grep -v "^ *#") ; do
if grep -wq "^${PKGNAME}$" ${CWD}/package-blacklist ; then
+ if [ -z "$PRINT_PACKAGE_NAME" ]; then
+ echo "** '${PKGNAME}' is on the package blacklist."
+ fi
continue
fi
# Find the full source filename - yeah ugly, but I had two goals:
@@ -259,7 +261,9 @@ build_mod_pkg () {
fi
kde_src=$(basename $(find $CWD/src/$PKGLOC -name "$PKGSRC-*.tar.?z*" |grep -vE ".asc$|.sig$" |grep -E "$PKGSRC-[^-]+.tar.*$|$PKGSRC-[0-9].+.tar.*$") 2>/dev/null)
if [ "x$kde_src" = "x" ]; then
- echo "** Did not find '$PKGSRC' in src"
+ if [ -z "$PRINT_PACKAGE_NAME" ]; then
+ echo "** Did not find '$PKGSRC' in src"
+ fi
continue
fi
# Reset $PKGARCH to its initial value:
@@ -280,20 +284,33 @@ build_mod_pkg () {
continue
fi
else
- echo
- echo "Building from source ${kde_src}"
- echo
- fi
- if grep -wq "^${PKGNAME}$" ${CWD}/modularize ; then
- # Set $PKG to a private dir for the modular package build:
- PKG=$SLACK_KDE_BUILD_DIR/${kde_module}/package-$PKGNAME
- rm -rf $PKG
- mkdir -p $PKG
+ if [ -z "$PRINT_PACKAGE_NAME" ]; then
+ echo
+ echo "Building from source ${kde_src}"
+ echo
+ fi
fi
+ # Set $PKG to a private dir for the modular package build:
+ PKG=$SLACK_KDE_BUILD_DIR/${kde_module}/package-$PKGNAME
+ rm -rf $PKG
+ mkdir -p $PKG
+
# Let's figure out the version number on the modular package:
MODULAR_PACKAGE_VERSION=$(echo $kde_src | rev | cut -f 3- -d . | cut -f 1 -d - | rev)
+ # If this variable is passed to the script, nothing will be built.
+ # Instead, a list of packages to be built will be output.
+ if [ ! -z "$PRINT_PACKAGE_NAME" ]; then
+ if [ -r $CWD/build/${PKGNAME} ]; then
+ MODBUILD=$(cat $CWD/build/${PKGNAME})
+ else
+ MODBUILD=$BUILD
+ fi
+ echo "${PKGNAME}-${MODULAR_PACKAGE_VERSION}-${PKGARCH}-${MODBUILD}.txz"
+ continue
+ fi
+
rm -rf $(pkgbase $kde_src)
extract_archive $kde_src || exit 1
cd $(pkgbase $kde_src) || exit 1
@@ -359,8 +376,10 @@ build_mod_pkg () {
find $PKG/usr/doc/${PKGNAME}-$MODULAR_PACKAGE_VERSION -type f -size 0 -exec rm --verbose "{}" \;
rmdir --verbose $PKG/usr/doc/${PKGNAME}-$MODULAR_PACKAGE_VERSION 2> /dev/null
- # Strip binaries:
- strip_binaries $PKG
+ # Strip binaries if needed:
+ if [ ! -r $CWD/nostrip/${PKGNAME} ]; then
+ strip_binaries $PKG
+ fi
# If there's any special post-install things to do, do them:
if [ -r $CWD/post-install/${PKGNAME}.post-install ]; then
@@ -398,102 +417,15 @@ build_mod_pkg () {
/sbin/makepkg -l y -c n ${SLACK_KDE_BUILD_DIR}/${kde_module}/${PKGNAME}-$(echo $MODULAR_PACKAGE_VERSION |tr - _)-${PKGARCH}-${MODBUILD}.txz
fi
# We will continue with the fresh packages installed:
- upgradepkg --install-new --reinstall ${SLACK_KDE_BUILD_DIR}/${kde_module}/${PKGNAME}-${MODULAR_PACKAGE_VERSION}-${PKGARCH}-${MODBUILD}.txz
- # Keep MIME database current:
- /usr/bin/update-mime-database /usr/share/mime 1>/dev/null 2>/dev/null &
+ if [ "$UPGRADE" = "yes" -o "$UPGRADE" = "YES" ]; then
+ upgradepkg --install-new --reinstall ${SLACK_KDE_BUILD_DIR}/${kde_module}/${PKGNAME}-${MODULAR_PACKAGE_VERSION}-${PKGARCH}-${MODBUILD}.txz
+ # Keep MIME database current:
+ /usr/bin/update-mime-database /usr/share/mime 1>/dev/null 2>/dev/null &
+ fi
fi
- # Reset $PKG to assume we're building the whole source dir:
- PKG=${SLACK_KDE_BUILD_DIR}/${kde_module}/package-${kde_module}
-
- done
-
- # At this point, we have left the loop to build modular packages.
- # We might need to build a package for the "<kde_module>", but to
- # avoid needlessly repacking if there happens to be a package with
- # the same name as "<kde_module>", we'll do some checks first.
-
- # If every package listed in modules/"<kde_module>" is also listed
- # in the modularize file, then there's no need to make a package
- # for "<kde_module>":
- echo
- echo "Searching for packages in ${kde_module} that were not built modular:"
- cat $CWD/modules/${kde_module} | grep -v "^ *#" | grep -v -w "^" | while read checkpackage ; do
- if ! grep -wq "^${checkpackage}$" ${CWD}/modularize ; then
- # Non-modular package found, so we'll have to build the package below.
- # It might already have been built once, but in that case it is likely
- # that more things have been added to the package directory since then.
- echo "Found non-modular package $checkpackage."
- exit 99
- fi
done
- # Exit if everything in "<kde_module>" was built modular:
- if [ ! $? = 99 ]; then
- echo "No non-modular components found in ${kde_module}."
- echo "Not building catch-all package for ${kde_module}."
- echo
- return
- fi
-
- # If there's no /usr directory in the "<kde_module>" package directory,
- # then skip it. There's nothing present worth packing up.
- if [ ! -d ${SLACK_KDE_BUILD_DIR}/${kde_module}/package-${kde_module}/usr ]; then
- echo "No /usr directory found in package-${kde_module}."
- echo "Not building catch-all package for ${kde_module}."
- echo
- return
- fi
-
- # Build a "<kde_module>" package for anything that wasn't built modular:
- # It's safer to consider these to have binaries in them. ;-)
-
- # Put up a bit of a black-box warning, in case this was a mistake where
- # something was meant to be listed in the modularize file and wasn't:
- echo
- echo "**************************************************************************"
- echo "* Building combined package for non-modular parts of ${kde_module}"
- echo "**************************************************************************"
- echo
-
- PKGARCH=$ARCH
- cd $PKG
-
- process_man_pages
- process_info_pages
- no_usr_share_doc
-
- # If there are post-install things to do for the combined package,
- # we do them here. This could be used for things like making a
- # VERSION number for a combined package. :-)
- if [ -r $CWD/post-install/${kde_module}.post-install ]; then
- . $CWD/post-install/${kde_module}.post-install
- fi
- mkdir -p $PKG/install
- if [ -r $CWD/slack-desc/${kde_module} ]; then
- cat $CWD/slack-desc/${kde_module} > $PKG/install/slack-desc
- else
- touch $PKG/install/slack-desc-missing
- fi
- if [ -r $CWD/doinst.sh/${kde_module} ]; then
- cat $CWD/doinst.sh/${kde_module} \
- | sed -e "s#usr/lib#usr/lib${LIBDIRSUFFIX}#g" \
- >> $PKG/install/doinst.sh
- fi
- if [ -r $CWD/build/${kde_module} ]; then
- SRCDIRBUILD=$(cat $CWD/build/${kde_module})
- else
- SRCDIRBUILD=$BUILD
- fi
- if [ -r $CWD/makepkg/${kde_module} ]; then
- BUILD=$SRCDIRBUILD . $CWD/makepkg/${kde_module}
- else
- /sbin/makepkg -l y -c n ${SLACK_KDE_BUILD_DIR}/${kde_module}/${kde_module}-$(echo $VERSION |tr - _)-${PKGARCH}-${SRCDIRBUILD}.txz
- fi
- # We will continue with the fresh packages installed:
- upgradepkg --install-new --reinstall ${SLACK_KDE_BUILD_DIR}/${kde_module}/${kde_module}-${VERSION}-${PKGARCH}-${SRCDIRBUILD}.txz
- # Keep MIME database current:
- /usr/bin/update-mime-database /usr/share/mime 1>/dev/null 2>/dev/null &
)
}
@@ -505,7 +437,9 @@ deterministic_build() {
KDE_MOD=$(echo "$ENTRY": | cut -f1 -d:)
KDE_PKGS=$(echo "$ENTRY": | cut -f2 -d:)
if [ -z "$KDE_PKGS" ]; then
- echo "** SlackBuild building '$KDE_MOD'"
+ if [ -z "$PRINT_PACKAGE_NAME" ]; then
+ echo "** SlackBuild building '$KDE_MOD'"
+ fi
build_mod_pkg $KDE_MOD
let RET=$RET+$?
else
@@ -514,10 +448,14 @@ deterministic_build() {
START_PKG=$(echo $KDE_PKGS |rev |cut -d, -f2 |rev)
MOD_LIST=$(cat modules/$KDE_MOD |grep -v "^ *#" |grep -v "^$" |tr '\n' ',')
KDE_PKGS="${KDE_PKGS}${MOD_LIST/#?*,${START_PKG},/}"
- echo "** SlackBuild expanding '$ENTRY' to '$KDE_MOD:$KDE_PKGS'"
+ if [ -z "$PRINT_PACKAGE_NAME" ]; then
+ echo "** SlackBuild expanding '$ENTRY' to '$KDE_MOD:$KDE_PKGS'"
+ fi
fi
for KDE_PKG in $(echo $KDE_PKGS |tr ',' ' ') ; do
- echo "** SlackBuild building '$KDE_MOD:$KDE_PKG'"
+ if [ -z "$PRINT_PACKAGE_NAME" ]; then
+ echo "** SlackBuild building '$KDE_MOD:$KDE_PKG'"
+ fi
build_mod_pkg $KDE_MOD $KDE_PKG
let RET=$RET+$?
done
@@ -530,30 +468,30 @@ deterministic_build() {
# MAIN PART #
# Import the build configuration options for as far as they are not already set:
-[ -r ./KDE.options ] && . ./KDE.options
+[ -r ./kde.options ] && . ./kde.options
# This avoids compiling a version number into KDE's .la files:
-QTDIR=/usr/lib${LIBDIRSUFFIX}/qt ; export QTDIR
+QTDIR=/usr/lib${LIBDIRSUFFIX}/qt5 ; export QTDIR
-# Get the kde environment variables
-[ -d post-install/kdebase ] && eval $(sed -e "s#/lib#/lib${LIBDIRSUFFIX}#" ./post-install/kdebase/profile.d/kde.sh)
+# Get the KDE environment variables:
+[ -d post-install/kservice ] && eval $(sed -e "s#/lib#/lib${LIBDIRSUFFIX}#" ./post-install/kservice/profile.d/kde.sh)
# Where we are going to do all the hard labour:
-SLACK_KDE_BUILD_DIR=$TMP/kde-build
+SLACK_KDE_BUILD_DIR=$TMP/kde_build
mkdir -p $SLACK_KDE_BUILD_DIR
-# kwallet is built again after kdepim,
-# so that it can pick up support for gpgmepp.
+# Build/install libkdiagram before compiling kdepim:
+# Build/install libktorrent before compiling kget:
KDEMODS=" \
kde4 \
- kde4-extragear \
frameworks \
+ applications-extra:kdiagram \
kdepim \
- frameworks:kwallet \
plasma \
plasma-extra \
- applications-extra \
+ applications-extra:libktorrent \
applications \
+ applications-extra \
telepathy \
"
@@ -574,20 +512,24 @@ fi
for module in \
$MODQUEUE ;
do
- echo "SlackBuild processing module '$module'"
+ if [ -z "$PRINT_PACKAGE_NAME" ]; then
+ echo "SlackBuild processing module '$module'"
+ fi
deterministic_build $module
if [ $? = 0 ]; then
# Move the created packages up into the KDE build directory:
- mv ${SLACK_KDE_BUILD_DIR}/$(echo $module |cut -f1 -d:)/*.t?z ${SLACK_KDE_BUILD_DIR}/
+ mv ${SLACK_KDE_BUILD_DIR}/$(echo $module |cut -f1 -d:)/*.t?z ${SLACK_KDE_BUILD_DIR}/ 2> /dev/null
if [ "$CLEANUP" = "yes" -o "$CLEANUP" = "YES" ]; then
# Clean out package and build directories:
rm -rf ${SLACK_KDE_BUILD_DIR}/$(echo $module |cut -f1 -d:)
fi
else
- echo "${module} failed to build."
+ if [ -z "$PRINT_PACKAGE_NAME" ]; then
+ echo "${module} failed to build."
+ fi
exit 1
fi
- cd - ;
+ cd - > /dev/null
done
exit 0
diff --git a/kde/KDE.options b/kde/kde.options
index b484074..1125561 100644
--- a/kde/KDE.options
+++ b/kde/kde.options
@@ -1,21 +1,17 @@
-# Set default version/arch/build. You can override these settings
-# in the SlackBuild scripts for each package (koffice, for example,
-# usually has a different version number), or by setting your own
-# environment variables.
+# Set default arch/build. A default version is not needed since
+# package versions are determined by their source tarvall.
-[ -z $VERSION ] && export VERSION=5.7.2
[ -z $BUILD ] && export BUILD=1
# Automatically determine the architecture we're building on:
-MARCH=$( uname -m )
if [ -z "$ARCH" ]; then
- case "$MARCH" in
- i?86) export ARCH=i486 ;;
- armv7hl) export ARCH=$MARCH ;;
- arm*) export ARCH=arm ;;
+ case "$(uname -m)" in
+ i?86) ARCH=i586 ;;
+ arm*) readelf /usr/bin/file -A | egrep -q "Tag_CPU.*[4,5]" && ARCH=arm || ARCH=armv7hl ;;
# Unless $ARCH is already set, use uname -m for all other archs:
- *) export ARCH=$MARCH ;;
+ *) ARCH=$(uname -m) ;;
esac
+ export ARCH
fi
[ -z $PKGARCH ] && export PKGARCH=$ARCH
@@ -25,6 +21,9 @@ if [ -z "$SLKCFLAGS" ]; then
if [ "$ARCH" = "i486" ]; then
export SLKCFLAGS="-O2 -march=i486 -mtune=i686"
export LIBDIRSUFFIX=""
+ elif [ "$ARCH" = "i586" ]; then
+ export SLKCFLAGS="-O2 -march=i586 -mtune=i686"
+ export LIBDIRSUFFIX=""
elif [ "$ARCH" = "s390" ]; then
export SLKCFLAGS="-O2"
export LIBDIRSUFFIX=""
@@ -46,9 +45,6 @@ if [ -z "$SLKCFLAGS" ]; then
fi
fi
-# For KF5 beta builds (not co-installable with KDE4):
-export SLKCFLAGS="-I/opt/kf5/include $SLKCFLAGS"
-
# Use this to set the number of parallel make jobs:
if [ -z "$NUMJOBS" ]; then
export NUMJOBS="-j7"
@@ -56,6 +52,5 @@ fi
# Additional cmake flags that are spanned across the KDE modules
# Do not use "final build" unless we build an actual release.
-#export KDE_OPT_ARGS=" -DKDE4_ENABLE_FINAL=\"ON\" -DSITE=\"slackware.com\" "
export KDE_OPT_ARGS=" -Wno-dev -DBUILD_TESTING=OFF -DKDE4_BUILD_TESTS=OFF -DSITE=\"slackware.com\" -DKDE_DISTRIBUTION_TEXT=\"volkerdi@slackware.com\" "
diff --git a/kde/make/marble b/kde/make/marble
index 2f12213..95ba2b1 100644
--- a/kde/make/marble
+++ b/kde/make/marble
@@ -1,23 +1,29 @@
-# Marble's cmake left us in build_qt4,
-# so we build and install Qt4 support first:
-make $NUMJOBS || make || exit 1
-make install DESTDIR=$PKG || exit 1
-# Move the marble4 cmake file so that it will be found:
-mkdir -p $PKG/usr/share/apps/cmake/modules
-mv $PKG/usr/share/marble/cmake/FindMarble.cmake \
- $PKG/usr/share/apps/cmake/modules/FindMarble.cmake
-# Rename the marble4 include dir to avoid a conflict with marble:
-mv $PKG/usr/include/marble{,4}
-# And fix that include path in the cmake file too:
-sed -i $PKG/usr/share/apps/cmake/modules/FindMarble.cmake \
- -e 's,marble/MarbleModel.h,marble4/MarbleModel.h,'
+#
+## Marble's cmake left us in build_qt4,
+## so we build and install Qt4 support first:
+#make $NUMJOBS || make || exit 1
+#make install DESTDIR=$PKG || exit 1
+## Move the marble4 cmake file so that it will be found:
+#mkdir -p $PKG/usr/share/apps/cmake/modules
+#mv $PKG/usr/share/marble/cmake/FindMarble.cmake \
+# $PKG/usr/share/apps/cmake/modules/FindMarble.cmake
+## Rename the marble4 include dir to avoid a conflict with marble:
+#mv $PKG/usr/include/marble{,4}
+## And fix that include path in the cmake file too:
+#sed -i $PKG/usr/share/apps/cmake/modules/FindMarble.cmake \
+# -e 's,marble/MarbleModel.h,marble4/MarbleModel.h,'
+#
+## Go back to build_qt5 and build/install the Qt5 support:
+#cd ..
+## Fix installation of the designer plugins - only a problem for the Qt5 libs:
+#sed -i CMakeLists.txt \
+# -e 's,LIB_SUFFIX}/plugins,LIB_SUFFIX}/qt5/plugins,g'
+#cd build_qt5
+#
-# Go back to build_qt5 and build/install the Qt5 support:
-cd ..
-# Fix installation of the designer plugins - only a problem for the Qt5 libs:
-sed -i CMakeLists.txt \
+# Fix installation of the designer plugins:
+sed -i ../CMakeLists.txt \
-e 's,LIB_SUFFIX}/plugins,LIB_SUFFIX}/qt5/plugins,g'
-cd build_qt5
make $NUMJOBS || make || exit 1
make install DESTDIR=$PKG || exit 1
diff --git a/kde/make/oxygen b/kde/make/oxygen
new file mode 100644
index 0000000..cd5b182
--- /dev/null
+++ b/kde/make/oxygen
@@ -0,0 +1,10 @@
+# Oxygen's cmake left us in build_qt4,
+# so we build and install Qt4 support first:
+make $NUMJOBS || make || exit 1
+make install DESTDIR=$PKG || exit 1
+
+# Go back to build_qt5 and build/install the Qt5 support:
+cd ../build_qt5
+make $NUMJOBS || make || exit 1
+make install DESTDIR=$PKG || exit 1
+
diff --git a/kde/modularize b/kde/modularize
deleted file mode 100644
index 2a99fea..0000000
--- a/kde/modularize
+++ /dev/null
@@ -1,453 +0,0 @@
-# If a package is listed here, it will be built apart from the
-# usual "grab bag" package that's made from each source directory.
-#
-# Things to note:
-#
-# Listing a package here will not cause it to be built. To do that,
-# make sure it is added to one of the files in the modules/ directory
-# that is built by the main KDE.SlackBuild script.
-#
-# If a subpackage name happens to be the same as the "grab bag" package
-# that contains it, you need to be a bit careful. Unless everything
-# in that collection will be built modular, *do not* list that name
-# here! If you do, first the module by that name will be built, and
-# then everything that's not modular in that collection will be built
-# into a "grab bag" that will replace that first package.
-#
-# If the goal is to build the most combined packages possible, the
-# easiest way to accomplish that is just to move this file out of the
-# way and replace it with an empty one before building.
-
-#
-# The Frameworks 5, Plasma 5 and Applications:
-#
-
-# frameworks
-# Tier 1, depends on Qt5, system libraries:
-extra-cmake-modules
-attica-framework
-kitemmodels
-kitemviews
-kplotting
-threadweaver
-kcodecs
-kguiaddons
-kidletime
-kwidgetsaddons
-sonnet
-kconfig
-kwindowsystem
-solid
-karchive
-kdbusaddons
-kcoreaddons
-kimageformats
-ki18n
-networkmanager-qt
-modemmanager-qt
-bluez-qt
-# Tier 2, depends on Tier 1, Qt5, system libraries:
-kauth
-kcrash
-kglobalaccel
-kjobwidgets
-kcompletion
-kdoctools
-kpackage
-kdnssd
-knotifications
-kunitconversion
-kpty
-kfilemetadata5
-# Tier 3, depends on Tier 1 and 2, Qt5, system libraries:
-kconfigwidgets
-kservice
-kiconthemes
-kwallet
-kemoticons
-kdesu
-ktextwidgets
-kxmlgui
-kbookmarks
-kio
-knewstuff
-kparts
-kdewebkit
-kdesignerplugin
-kdeclarative
-kcmutils
-kinit
-kded
-knotifyconfig
-ktexteditor
-kactivities-framework
-kactivities-stats
-plasma-framework
-kpeople
-kxmlrpcclient
-baloo5
-# Tier 4, depends on Tier 1, 2 and 3, Qt5, system libraries:
-kjsembed
-kross
-kmediaplayer
-krunner
-kjs
-kapidox
-frameworkintegration
-kdelibs4support
-khtml
-breeze-icons
-oxygen-icons5
-
-# plasma
-kgamma5
-kdecoration
-breeze
-breeze-gtk
-breeze-grub
-breeze-plymouth
-kde-cli-tools
-kinfocenter
-libksysguard
-ksysguard
-kscreenlocker
-kwin
-kwrited
-libkscreen2
-milou
-oxygen
-systemsettings
-kwayland
-kwayland-integration
-plasma-integration
-plasma-desktop
-plasma-workspace
-kdeplasma-addons
-plasma-workspace-wallpapers
-plasma5-nm
-powerdevil
-bluedevil
-khotkeys
-kmenuedit
-polkit-kde-framework
-kscreen2
-sddm-kcm
-kde-gtk-config
-muon
-ksshaskpass
-plasma-sdk
-plasma-mediacenter
-kactivitymanagerd
-kwallet-pam
-plasma-pa
-user-manager
-discover
-
-# plasma-extra
-sddm-qt5
-kdeconnect-framework
-polkit-kde-kcmodules-framework
-kde-wallpapers
-oxygen-fonts
-
-# applications
-# kdebase:
-kio-extras
-kdebugsettings
-kate
-konsole
-kde-baseapps
-kde-workspace
-kde-runtime
-kde-base-artwork
-dolphin
-# kdesdk:
-kapptemplate
-okteta
-cervisia
-dolphin-plugins
-kcachegrind
-kde-dev-scripts
-kde-dev-utils
-kdesdk-kioslaves
-kdesdk-strigi-analyzers
-kdesdk-thumbnailers
-libkomparediff2
-kompare
-lokalize
-poxml
-umbrello
-# kdegraphics:
-libkipi
-libkexiv2
-libkdcraw
-libksane
-gwenview
-kdegraphics-mobipocket
-kdegraphics-strigi-analyzer
-okular
-kdegraphics-thumbnailers
-kamera
-kcolorchooser
-kolourpaint
-kruler
-ksaneplugin
-ksnapshot
-spectacle
-svgpart
-libkface
-# kdeaccessibility:
-jovie
-kaccessible
-kmouth
-kmousetool
-kmag
-# kdeutils:
-ark
-baloo5-widgets
-filelight
-kcalc
-kcharselect
-kdf
-kfloppy
-kgpg
-print-manager
-kremotecontrol
-ktimer
-khelpcenter
-kwalletmanager
-superkaramba
-sweeper
-# kdemultimedia:
-libkcddb
-libkcompactdisc
-audiocd-kio
-dragon
-ffmpegthumbs
-mplayerthumbs
-juk
-kmix
-kscd
-# oxygen icon set:
-oxygen-icons
-# kdenetwork:
-kdenetwork-filesharing
-kdenetwork-strigi-analyzers
-zeroconf-ioslave
-kget
-kopete
-kppp
-krdc
-krfb
-# kdeadmin:
-kcron
-ksystemlog
-kuser
-# kdeartwork:
-kdeartwork
-# kdegames:
-libkdegames
-libkmahjongg
-klickety
-ksudoku
-ksquares
-kpat
-klines
-ksnakeduel
-kollision
-kshisen
-kblocks
-lskat
-kreversi
-bovo
-kajongg
-granatier
-kmines
-kiriki
-kigo
-bomber
-kolf
-kdiamond
-kbounce
-konquest
-kapman
-knavalbattle
-killbots
-kubrick
-kgoldrunner
-knetwalk
-kbreakout
-ksirk
-kfourinline
-picmi
-kblackbox
-palapeli
-katomic
-ktuberling
-kjumpingcube
-kmahjongg
-kspaceduel
-# kdetoys:
-amor
-kteatime
-ktux
-# kdeedu:
-libkdeedu
-kdeedu-data
-libkeduvocdocument
-analitza
-kalgebra
-kanagram
-khangman
-kig
-parley
-artikulate
-blinken
-cantor
-kalzium
-kbruch
-kgeography
-kiten
-klettres
-kmplot
-kstars
-kqtquickcharts
-ktouch
-kturtle
-kwordquiz
-marble
-pairs
-rocs
-step
-minuet
-# After marble:
-libkgeomap
-kdenlive
-# kdewebdev:
-kdewebdev
-# KDE Telepathy:
-signon-kwallet-extension
-kaccounts-providers
-kaccounts-integration
-ktp-common-internals
-ktp-accounts-kcm
-ktp-contact-list
-ktp-contact-runner
-ktp-text-ui
-ktp-approver
-ktp-kded-module
-ktp-auth-handler
-ktp-filetransfer-handler
-ktp-send-file
-ktp-call-ui
-ktp-desktop-applets
-# KDE PIM
-gpgmepp
-kcalcore
-akonadi
-akonadi-mime
-akonadi-contacts
-akonadi-notes
-akonadi-search
-kholidays
-kpimtextedit
-kidentitymanagement
-kalarmcal
-kcalutils
-syndication
-kblog
-kcontacts
-kmime
-kimap
-kldap
-kmbox
-kontactinterface
-ktnef
-kdepim
-kdepimlibs
-kdepim-runtime
-kmailtransport
-akonadi-calendar
-kjots
-libkleo
-grantleetheme
-libkdepim
-pimcommon
-libgravatar
-libksieve
-kdgantt2
-mailimporter
-kdepim-apps-libs
-calendarsupport
-eventviews
-incidenceeditor
-messagelib
-mailcommon
-kleopatra
-kdepim-addons
-
-#
-# The old KDE 4 stuff which has not been migrated yet. or is still needed
-# by un-migrated applications:
-#
-
-# kdelibs:
-kdelibs
-
-# kdebase:
-akonadi4
-baloo
-baloo-widgets
-nepomuk-core
-kdepimlibs4
-nepomuk-widgets
-kfilemetadata
-kactivities
-katepart4
-konsolepart4
-
-# kdebindings:
-smokegen
-smokeqt
-qtruby
-perlqt
-smokekde
-korundum
-perlkde
-pykde4
-kross-interpreters
-kimono
-qyoto
-
-# kdegames:
-libkdegames4
-libkmahjongg4
-
-# kdesdk:
-oktetapart4
-
-# kdegraphics:
-libksane4
-libkexiv2_4
-
-# extragear
-calligra
-k3b
-kaudiocreator
-kplayer
-kwebkitpart
-oxygen-gtk2
-kdevplatform
-kdevelop-pg-qt
-kdevelop
-kdev-python
-kdevelop-php
-kdevelop-php-docs
-skanlite
-kio-mtp
-partitionmanager
-kdeconnect4
-
-# applications extra
-libktorrent
-ktorrent
diff --git a/kde/modules/applications b/kde/modules/applications
index a22905c..31ea53d 100644
--- a/kde/modules/applications
+++ b/kde/modules/applications
@@ -1,4 +1,4 @@
-# https://community.kde.org/Applications/15.12_Release_Notes
+# https://community.kde.org/Applications/17.12_Release_Notes
#
# Some of the kdegraphics needs to be compiled first:
libkipi
@@ -7,27 +7,37 @@ libkdcraw
libksane
gwenview
-# KDE PIM: split out to modules/kdepim
-
-# Used to be part of PIM in KDE4:
-kjots
-
-# KDE Telepathy: split out to modules/telepathy
-
# kdebase:
kio-extras
kate
konsole
-kde-baseapps
-#kde-workspace
-kde-runtime
-#kde-base-artwork
+kdialog
+keditbookmarks
+kfind
+konqueror
+
+# kdeutils:
+ark
+baloo5-widgets
+filelight
+kcalc
+kcharselect
+kdf
+kfloppy
+kgpg
+print-manager
+kbackup
+ktimer
+khelpcenter
+kwalletmanager
+sweeper
+
+# dolphin needs to pick up baloo5-widgets:
dolphin
# kdesdk:
kdebugsettings
kapptemplate
-okteta
cervisia
dolphin-plugins
kcachegrind
@@ -35,6 +45,7 @@ kde-dev-scripts
kde-dev-utils
kdesdk-kioslaves
kdesdk-thumbnailers
+kross-interpreters
libkomparediff2
kompare
lokalize
@@ -49,37 +60,14 @@ kamera
kcolorchooser
kolourpaint
kruler
-ksaneplugin
-#ksnapshot
spectacle
svgpart
-# needs opencv:
-#libkface
# kdeaccessibility:
-#jovie
-kaccessible
kmouth
kmousetool
kmag
-# kdeutils:
-ark
-baloo5-widgets
-filelight
-kcalc
-kcharselect
-kdf
-kfloppy
-kgpg
-print-manager
-kremotecontrol
-ktimer
-khelpcenter
-kwalletmanager
-#superkaramba
-sweeper
-
# kdemultimedia:
libkcddb
libkcompactdisc
@@ -87,27 +75,22 @@ audiocd-kio
dragon
juk
kmix
-#kscd
-
-# The oxygen icon set:
-#oxygen-icons
+ffmpegthumbs
+kwave
+k3b
+kamoso
# kdenetwork:
kdenetwork-filesharing
zeroconf-ioslave
kget
kopete
-kppp
krdc
krfb
# kdeadmin:
kcron
ksystemlog
-kuser
-
-# kdeartwork:
-#kdeartwork
# kdegames:
libkdegames
@@ -124,7 +107,7 @@ kblocks
lskat
kreversi
bovo
-kajongg
+#kajongg
granatier
kmines
kiriki
@@ -153,9 +136,7 @@ kmahjongg
kspaceduel
# kdetoys:
-#amor
kteatime
-#ktux
# kdeedu:
kdeedu-data
@@ -175,13 +156,11 @@ kgeography
kiten
klettres
kmplot
-kstars
kqtquickcharts
ktouch
kturtle
kwordquiz
marble
-#pairs
rocs
step
# Needs http://drumstick.sourceforge.net/
@@ -191,8 +170,8 @@ step
libkgeomap
# Needs ffmpeg and dvdauthor to be really useful:
-#kdenlive
+kdenlive
-# kdewebdev:
-kdewebdev
+# kdewebdev remnant:
+kimagemapeditor
diff --git a/kde/modules/applications-extra b/kde/modules/applications-extra
index fac9822..9308d72 100644
--- a/kde/modules/applications-extra
+++ b/kde/modules/applications-extra
@@ -1,4 +1,31 @@
+# applications-extra
+calligra
+calligraplan
+digikam
+krita
libktorrent
ktorrent
+kpmcore
+partitionmanager
+falkon
skanlite
-
+#kdevplatform
+kdevelop-pg-qt
+kdevelop
+kdev-php
+kdiagram
+kjots
+kstars
+#kuser
+krusader
+kile
+kaudiocreator
+kwebkitpart
+oxygen-gtk2
+# kdev-python requires python3:
+kdev-python
+yakuake
+alkimia
+kmymoney
+okteta
+krename
diff --git a/kde/modules/frameworks b/kde/modules/frameworks
index 59431fb..1d019d7 100644
--- a/kde/modules/frameworks
+++ b/kde/modules/frameworks
@@ -1,6 +1,6 @@
# KDE Frameworks.
#
-# http://api.kde.org/frameworks-api/frameworks5-apidocs/
+# https://api.kde.org/frameworks/index.html
#
# Tier 1, depends on Qt5, system libraries:
extra-cmake-modules
@@ -20,28 +20,35 @@ solid
karchive
kdbusaddons
kcoreaddons
-kimageformats
ki18n
networkmanager-qt
modemmanager-qt
bluez-qt
kwayland
+prison
+kirigami2
+syntax-highlighting
+kholidays
# Tier 2, depends on Tier 1, Qt5, system libraries:
+breeze-icons
+kapidox
+kdnssd
+oxygen-icons5
kauth
kcrash
-kglobalaccel
kjobwidgets
kcompletion
kdoctools
kpackage
-kdnssd
knotifications
kunitconversion
kpty
+kimageformats
kfilemetadata5
# Tier 3, depends on Tier 1 and 2, Qt5, system libraries:
kconfigwidgets
kservice
+kglobalaccel
kiconthemes
kwallet
kemoticons
@@ -66,15 +73,14 @@ plasma-framework
kpeople
kxmlrpcclient
baloo5
+qqc2-desktop-style
+purpose
# Tier 4, depends on Tier 1, 2 and 3, Qt5, system libraries:
kjs
kjsembed
kross
kmediaplayer
krunner
-kapidox
frameworkintegration
kdelibs4support
khtml
-breeze-icons
-oxygen-icons5
diff --git a/kde/modules/kde4 b/kde/modules/kde4
index 0ed060e..4731597 100644
--- a/kde/modules/kde4
+++ b/kde/modules/kde4
@@ -1,39 +1 @@
-# Pre-requisite for the old KDE4 PIM applications:
-akonadi4
-# kdelibs:
-# -- NOTE:
-# -- kdelibs is part of KDE Applications and therefore needs to be rebuilt
-# -- at every release of KDE Applications.
kdelibs
-# Taken from kdebase, needed for kdepimlibs:
-nepomuk-core
-# kdepimlibs for KDE4 based PIM applications:
-kdepimlibs4
-# kdebase:
-kfilemetadata
-baloo
-baloo-widgets
-nepomuk-widgets
-kactivities
-katepart4
-konsolepart4
-# kdebindings:
-smokegen
-smokeqt
-qtruby
-perlqt
-smokekde
-korundum
-perlkde
-pykde4
-kross-interpreters
-#kimono
-#qyoto
-# kdegames:
-libkdegames4
-libkmahjongg4
-# kdesdk:
-oktetapart4
-# kdegraphics:
-libksane4
-libkexiv2_4
diff --git a/kde/modules/kde4-extragear b/kde/modules/kde4-extragear
deleted file mode 100644
index fe0527e..0000000
--- a/kde/modules/kde4-extragear
+++ /dev/null
@@ -1,16 +0,0 @@
-calligra
-k3b
-#kaudiocreator
-#kplayer
-kwebkitpart
-oxygen-gtk2
-kdevplatform
-#kdevelop-pg-qt
-kdevelop
-kdev-python
-kdevelop-php
-kdevelop-php-docs
-kio-mtp
-partitionmanager
-#kdeconnect4
-
diff --git a/kde/modules/kdepim b/kde/modules/kdepim
index 9ff3e01..edb8810 100644
--- a/kde/modules/kdepim
+++ b/kde/modules/kdepim
@@ -1,14 +1,17 @@
-gpgmepp
+# kdepim
kcalcore
akonadi
-kholidays
+# Moved to Frameworks:
+#kholidays
kpimtextedit
kidentitymanagement
kcalutils
syndication
kblog
kcontacts
+libkgapi
kmime
+ksmtp
kimap
kmbox
kldap
@@ -27,7 +30,6 @@ libkdepim
pimcommon
libgravatar
libksieve
-kdgantt2
mailimporter
kdepim-apps-libs
calendarsupport
@@ -36,6 +38,22 @@ incidenceeditor
messagelib
mailcommon
kleopatra
+kdav
kdepim-addons
kdepim-runtime
-kdepim
+akonadi-calendar-tools
+akonadiconsole
+akonadi-import-wizard
+akregator
+grantlee-editor
+kaddressbook
+kalarm
+kmail
+kmail-account-wizard
+knotes
+kontact
+korganizer
+mbox-importer
+pim-data-exporter
+pim-sieve-editor
+
diff --git a/kde/modules/plasma b/kde/modules/plasma
index 29a4841..cc45b78 100644
--- a/kde/modules/plasma
+++ b/kde/modules/plasma
@@ -1,11 +1,10 @@
-# plasma:
+# plasma
kgamma5
kdecoration
breeze
breeze-gtk
-#breeze-grub
+breeze-grub
#breeze-plymouth
-kde-cli-tools
kwayland-integration
plasma-integration
kinfocenter
@@ -17,8 +16,11 @@ kwrited
libkscreen2
milou
oxygen
-systemsettings
plasma-workspace
+kde-cli-tools
+# Circular dependenvy between plasma-workspace and kde-cli-tools
+plasma-workspace
+systemsettings
plasma-desktop
kdeplasma-addons
plasma-workspace-wallpapers
@@ -33,11 +35,15 @@ sddm-kcm
kde-gtk-config
ksshaskpass
plasma-sdk
-plasma-mediacenter
plasma-pa
+#plasma-tests
kactivitymanagerd
-#muon
+user-manager
+xdg-desktop-portal-kde
+drkonqi
+plasma-vault
+plasma-browser-integration
+#plymouth-kcm
#kwallet-pam
-#user-manager
#discover
diff --git a/kde/modules/plasma-extra b/kde/modules/plasma-extra
index de083fb..bf4ffe3 100644
--- a/kde/modules/plasma-extra
+++ b/kde/modules/plasma-extra
@@ -3,3 +3,4 @@ kdeconnect-framework
polkit-kde-kcmodules-framework
kde-wallpapers
oxygen-fonts
+wacomtablet
diff --git a/kde/modules/telepathy b/kde/modules/telepathy
index 4ac557c..2d4bd47 100644
--- a/kde/modules/telepathy
+++ b/kde/modules/telepathy
@@ -1,4 +1,4 @@
-# KDE Telepathy:
+# KDE Telepathy
# https://community.kde.org/KTp/Setting_up_KAccounts
signon-kwallet-extension
kaccounts-integration
diff --git a/kde/patch/akonadi.patch b/kde/patch/akonadi.patch
new file mode 100644
index 0000000..ddab2a8
--- /dev/null
+++ b/kde/patch/akonadi.patch
@@ -0,0 +1,12 @@
+# Remove hardcoded absolute path to stdlib header.
+# This is Windows-centric and breaks on any linux GCC upgrade.
+# Thanks to Gentoo where I found the following two patches at
+# https://packages.gentoo.org/packages/kde-apps/akonadi
+# No longer needed since 17.04.0.
+#cat $CWD/patch/akonadi/akonadi_revert-abs-path.patch | patch -p1 --verbose || { touch ${SLACK_KDE_BUILD_DIR}/${PKGNAME}.failed ; continue ; }
+#cat $CWD/patch/akonadi/akonadi_rename-header.patch | patch -p1 --verbose || { touch ${SLACK_KDE_BUILD_DIR}/${PKGNAME}.failed ; continue ; }
+
+# Temporary fix for non-working Akonadi in combination with mariadb 10.2.8
+# (actually this is a bug in qtsql, not in akonadi or mariadb):
+#cat $CWD/patch/akonadi/akonadi_mariadb_qtsql.patch | patch -p1 --verbose || { touch ${SLACK_KDE_BUILD_DIR}/${PKGNAME}.failed ; continue ; }
+
diff --git a/kde/patch/akonadi/akonadi_mariadb_qtsql.patch b/kde/patch/akonadi/akonadi_mariadb_qtsql.patch
new file mode 100644
index 0000000..7ec6d7c
--- /dev/null
+++ b/kde/patch/akonadi/akonadi_mariadb_qtsql.patch
@@ -0,0 +1,91 @@
+Patch taken from https://cgit.kde.org/akonadi.git/patch/?id=b145f47f000978b9d39edc1882849ec7f6b3ef79
+
+Upstream bug reports:
+https://bugs.kde.org/show_bug.cgi?id=383991
+https://bugreports.qt.io/browse/QTBUG-63108
+
+From b145f47f000978b9d39edc1882849ec7f6b3ef79 Mon Sep 17 00:00:00 2001
+From: Heinz Wiesinger <pprkut@liwjatan.at>
+Date: Sun, 17 Sep 2017 10:56:44 +0200
+Subject: Only remove init connections to the database on server shutdown.
+
+Summary:
+With MariaDB 10.2 libmysqlclient was replaced with libmariadb that
+changed how establishing database connections behaves. The MySQL
+QSQL driver calls mysql_server_end() on QSqlDatabase::removeDatabase()
+if the overall connection count dropped to 0 (which it does when
+the init connection is removed).
+A future QSqlDatabase:addDatabase() would call mysql_server_init()
+again, but this no longer works with libmariadb as that one only
+allows calling mysql_server_init() once. Future calls are simply
+ignored.
+
+In order to prevent this from happening we have to keep the
+init connection open until the server shuts down, so the connection
+count only drops to 0 at shutdown and mysql_server_end() isn't
+called before.
+
+This is a workaround for QTBUG-63108
+
+CCBUG: 383991
+
+Reviewers: dvratil, mlaurent
+
+Reviewed By: dvratil
+
+Subscribers: #kde_pim
+
+Tags: #kde_pim
+
+Differential Revision: https://phabricator.kde.org/D7858
+---
+ src/server/akonadi.cpp | 3 ++-
+ src/server/storage/dbconfigmysql.cpp | 4 +++-
+ 2 files changed, 5 insertions(+), 2 deletions(-)
+
+diff --git a/src/server/akonadi.cpp b/src/server/akonadi.cpp
+index 4364e63..bcb7e88 100644
+--- a/src/server/akonadi.cpp
++++ b/src/server/akonadi.cpp
+@@ -423,13 +423,14 @@ bool AkonadiServer::createDatabase()
+ success = false;
+ }
+ }
+- QSqlDatabase::removeDatabase(initCon);
+ return success;
+ }
+
+ void AkonadiServer::stopDatabaseProcess()
+ {
+ if (!DbConfig::configuredDatabase()->useInternalServer()) {
++ // closing initConnection this late to work around QTBUG-63108
++ QSqlDatabase::removeDatabase(QStringLiteral("initConnection"));
+ return;
+ }
+
+diff --git a/src/server/storage/dbconfigmysql.cpp b/src/server/storage/dbconfigmysql.cpp
+index 2bd231d..d565706 100644
+--- a/src/server/storage/dbconfigmysql.cpp
++++ b/src/server/storage/dbconfigmysql.cpp
+@@ -492,7 +492,6 @@ bool DbConfigMysql::startInternalServer()
+ }
+ }
+
+- QSqlDatabase::removeDatabase(initCon);
+ return success;
+ }
+
+@@ -520,6 +519,9 @@ void DbConfigMysql::stopInternalServer()
+ return;
+ }
+
++ // closing initConnection this late to work around QTBUG-63108
++ QSqlDatabase::removeDatabase(QStringLiteral("initConnection"));
++
+ disconnect(mDatabaseProcess, static_cast<void(QProcess::*)(int,QProcess::ExitStatus)>(&QProcess::finished),
+ this, &DbConfigMysql::processFinished);
+
+--
+cgit v0.11.2
+
+
diff --git a/kde/patch/akonadi/akonadi_rename-header.patch b/kde/patch/akonadi/akonadi_rename-header.patch
new file mode 100644
index 0000000..73347f0
--- /dev/null
+++ b/kde/patch/akonadi/akonadi_rename-header.patch
@@ -0,0 +1,77 @@
+commit 248671e8200ff0883877b6d0e56700ef99ff3b51
+Author: Andreas Sturmlechner <andreas.sturmlechner@gmail.com>
+Date: Sat Jan 7 14:38:17 2017 +0100
+
+ Rename exception.h to exceptionbase.h
+
+ REVIEW: 129788
+
+diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt
+index 6ac851e..fa996b9 100644
+--- a/src/core/CMakeLists.txt
++++ b/src/core/CMakeLists.txt
+@@ -95,7 +95,7 @@ ecm_generate_headers(AkonadiCore_base_HEADERS
+ EntityDeletedAttribute
+ EntityDisplayAttribute
+ EntityHiddenAttribute
+- Exception
++ ExceptionBase
+ GidExtractorInterface
+ IndexPolicyAttribute
+ Item
+diff --git a/src/core/exception.cpp b/src/core/exception.cpp
+index f229c1a..14f7330 100644
+--- a/src/core/exception.cpp
++++ b/src/core/exception.cpp
+@@ -17,7 +17,7 @@
+ 02110-1301, USA.
+ */
+
+-#include "exception.h"
++#include "exceptionbase.h"
+
+ #include <QString>
+
+diff --git a/src/core/exception.h b/src/core/exceptionbase.h
+similarity index 100%
+rename from src/core/exception.h
+rename to src/core/exceptionbase.h
+diff --git a/src/core/item.h b/src/core/item.h
+index de71cad..5ec62c8 100644
+--- a/src/core/item.h
++++ b/src/core/item.h
+@@ -23,7 +23,7 @@
+
+ #include "akonadicore_export.h"
+ #include "attribute.h"
+-#include "exception.h"
++#include "exceptionbase.h"
+ #include "tag.h"
+ #include "collection.h"
+ #include "relation.h"
+diff --git a/src/core/itempayloadinternals_p.h b/src/core/itempayloadinternals_p.h
+index 0a4de3c..1626f10 100644
+--- a/src/core/itempayloadinternals_p.h
++++ b/src/core/itempayloadinternals_p.h
+@@ -32,7 +32,7 @@
+
+ #include <boost/shared_ptr.hpp>
+
+-#include "exception.h"
++#include "exceptionbase.h"
+
+ //@cond PRIVATE Doxygen 1.7.1 hangs processing this file. so skip it.
+ //for more info, see https://bugzilla.gnome.org/show_bug.cgi?id=531637
+diff --git a/src/core/protocolhelper.cpp b/src/core/protocolhelper.cpp
+index f740e9d..c218f0c 100644
+--- a/src/core/protocolhelper.cpp
++++ b/src/core/protocolhelper.cpp
+@@ -23,7 +23,7 @@
+ #include "collectionstatistics.h"
+ #include "item_p.h"
+ #include "collection_p.h"
+-#include "exception.h"
++#include "exceptionbase.h"
+ #include "itemserializer_p.h"
+ #include "itemserializerplugin.h"
+ #include "servermanager.h"
diff --git a/kde/patch/akonadi/akonadi_revert-abs-path.patch b/kde/patch/akonadi/akonadi_revert-abs-path.patch
new file mode 100644
index 0000000..3b48253
--- /dev/null
+++ b/kde/patch/akonadi/akonadi_revert-abs-path.patch
@@ -0,0 +1,70 @@
+commit d98e29a07f4acc3bf01f06f25b3eef5522397e2e
+Author: Andreas Sturmlechner <andreas.sturmlechner@gmail.com>
+Date: Thu Jan 5 22:41:02 2017 +0100
+
+ Revert "Workaround an include loop on case-insensitive systems"
+
+ Do not hardcode absolute patchs to GCC headers.
+
+ This reverts commit 59b9d6b79425c9ec1e5df059a2593580048c4adf.
+
+ REVIEW: 129788
+
+diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt
+index 72589cd..6ac851e 100644
+--- a/src/core/CMakeLists.txt
++++ b/src/core/CMakeLists.txt
+@@ -257,21 +257,6 @@ ecm_generate_headers(AkonadiCore_jobs_HEADERS
+ RELATIVE jobs
+ )
+
+-# This is a workaround for conflict between our "Exception" fancy header and
+-# C++ stdlib's "exception" header which occurs in case-insensitive systems.
+-# For that reason we generate std_exception.h file, which contains an absolute
+-# path to the stdlib's exception header file, which resolves the ambiguity
+-# when including <exception> from within Akonadi.
+-include(FindStdlibInclude)
+-findStdlibInclude("exception" std_exception_file)
+-if (NOT "${std_exception_file}" STREQUAL "")
+- configure_file(${CMAKE_CURRENT_SOURCE_DIR}/std_exception.h.in
+- ${CMAKE_CURRENT_BINARY_DIR}/std_exception.h
+- )
+-else()
+- message(FATAL_ERROR "stdlib <exception> include absolute path not found")
+-endif()
+-
+ set(akonadicore_dbus_xml ${Akonadi_SOURCE_DIR}/src/interfaces/org.freedesktop.Akonadi.NotificationManager.xml)
+ qt5_add_dbus_interface(akonadicore_dbus_SRCS ${akonadicore_dbus_xml} notificationmanagerinterface)
+
+@@ -338,7 +323,6 @@ install(TARGETS
+
+ install(FILES
+ ${CMAKE_CURRENT_BINARY_DIR}/akonadicore_export.h
+- ${CMAKE_CURRENT_BINARY_DIR}/std_exception.h
+ ${AkonadiCore_base_HEADERS}
+ ${AkonadiCore_models_HEADERS}
+ ${AkonadiCore_jobs_HEADERS}
+diff --git a/src/core/exception.h b/src/core/exception.h
+index d07ca71..2a376df 100644
+--- a/src/core/exception.h
++++ b/src/core/exception.h
+@@ -20,16 +20,11 @@
+ #ifndef AKONADI_EXCEPTION_H
+ #define AKONADI_EXCEPTION_H
+
+-// The std_exception.h file is generated at build-time and #includes C++ stdlib
+-// header "exception" by aboslute path. This is to workaround an include loop on
+-// case-insensitive systems, where #include <exception> includes our "Exception"
+-// fancy header instead of stdlib's exception, causing an endless loop of
+-// includes between "Exception" and "exception.h".
+-#include "std_exception.h"
+-
+ #include "akonadicore_export.h"
++#include <QObject>
++#include <QByteArray>
++#include <exception>
+
+-class QByteArray;
+ class QString;
+
+ namespace Akonadi
diff --git a/kde/patch/ark.patch b/kde/patch/ark.patch
index 5018ca4..35ac2d3 100644
--- a/kde/patch/ark.patch
+++ b/kde/patch/ark.patch
@@ -2,3 +2,6 @@
# KDEBUG #357057 is fixed in 15.12.1; still needs unrar.
#cat $CWD/patch/ark/ark_kdebug357057.patch | patch -p1 --verbose || { touch ${SLACK_KDE_BUILD_DIR}/${PKGNAME}.failed ; continue ; }
+# Fix a compilation issue in 18.04.0:
+cat $CWD/patch/ark/ark_include_memory.patch | patch -p1 --verbose || { touch ${SLACK_KDE_BUILD_DIR}/${PKGNAME}.failed ; continue ; }
+
diff --git a/kde/patch/ark/ark_include_memory.patch b/kde/patch/ark/ark_include_memory.patch
new file mode 100644
index 0000000..235436e
--- /dev/null
+++ b/kde/patch/ark/ark_include_memory.patch
@@ -0,0 +1,15 @@
+#To overcome compilation issues like:
+# error: 'unique_ptr' is not a member of 'std'
+# error: expected primary-expression before '[' token
+
+--- ark-18.04.0/plugins/libzipplugin/libzipplugin.cpp.orig 2018-04-09 22:42:03.000000000 +0200
++++ ark-18.04.0/plugins/libzipplugin/libzipplugin.cpp 2018-04-15 12:41:56.490025275 +0200
+@@ -39,6 +39,8 @@
+ #include <qplatformdefs.h>
+ #include <QThread>
+
++#include <memory>
++
+ #include <utime.h>
+ #include <zlib.h>
+
diff --git a/kde/patch/cantor.patch b/kde/patch/cantor.patch
new file mode 100644
index 0000000..54f2b47
--- /dev/null
+++ b/kde/patch/cantor.patch
@@ -0,0 +1,4 @@
+# Fix build against KF 5.31.0 (repaired in 16.12.3):
+#cat $CWD/patch/cantor/cantor_python.patch | patch -p1 --verbose || { touch ${SLACK_KDE_BUILD_DIR}/${PKGNAME}.failed ; continue ; }
+#cat $CWD/patch/cantor/cantor_julia.patch | patch -p1 --verbose || { touch ${SLACK_KDE_BUILD_DIR}/${PKGNAME}.failed ; continue ; }
+
diff --git a/kde/patch/cantor/cantor_julia.patch b/kde/patch/cantor/cantor_julia.patch
new file mode 100644
index 0000000..5c381ca
--- /dev/null
+++ b/kde/patch/cantor/cantor_julia.patch
@@ -0,0 +1,193 @@
+Patch taken from:
+https://gitweb.gentoo.org/repo/gentoo.git/plain/kde-apps/cantor/files/cantor-16.12.2-julia-kf-5.31.patch
+
+From 45322d9f58f50df3d4d5755d4199e579f6fd8646 Mon Sep 17 00:00:00 2001
+From: Andreas Sturmlechner <andreas.sturmlechner@gmail.com>
+Date: Sat, 11 Feb 2017 22:46:35 +0100
+Subject: [PATCH] [julia] Fix build with -fno-operator-names
+
+REVIEW: 129942
+---
+ src/backends/julia/juliaexpression.cpp | 6 +++---
+ src/backends/julia/juliaextensions.cpp | 4 ++--
+ src/backends/julia/juliahighlighter.cpp | 4 ++--
+ src/backends/julia/juliakeywords.cpp | 10 +++++-----
+ src/backends/julia/juliaserver/juliaserver.cpp | 4 ++--
+ src/backends/julia/juliaserver/main.cpp | 4 ++--
+ src/backends/julia/juliasession.cpp | 4 ++--
+ 7 files changed, 18 insertions(+), 18 deletions(-)
+
+diff --git a/src/backends/julia/juliaexpression.cpp b/src/backends/julia/juliaexpression.cpp
+index 27cdd85..618200d 100644
+--- a/src/backends/julia/juliaexpression.cpp
++++ b/src/backends/julia/juliaexpression.cpp
+@@ -40,7 +40,7 @@ void JuliaExpression::evaluate()
+
+ // Plots integration
+ m_plot_filename.clear();
+- if (juliaSession->integratePlots() and checkPlotShowingCommands()) {
++ if (juliaSession->integratePlots() && checkPlotShowingCommands()) {
+ // Simply add plot saving command to the end of execution
+ QStringList inlinePlotFormats;
+ inlinePlotFormats << QLatin1String("svg");
+@@ -73,8 +73,8 @@ void JuliaExpression::finalize()
+ setResult(new Cantor::TextResult(juliaSession->getOutput()));
+ setStatus(Cantor::Expression::Error);
+ } else {
+- if (not m_plot_filename.isEmpty()
+- and QFileInfo(m_plot_filename).exists()) {
++ if (!m_plot_filename.isEmpty()
++ && QFileInfo(m_plot_filename).exists()) {
+ // If we have plot in result, show it
+ setResult(
+ new Cantor::ImageResult(QUrl::fromLocalFile(m_plot_filename)));
+diff --git a/src/backends/julia/juliaextensions.cpp b/src/backends/julia/juliaextensions.cpp
+index 4585c6f..ad5e3a9 100644
+--- a/src/backends/julia/juliaextensions.cpp
++++ b/src/backends/julia/juliaextensions.cpp
+@@ -138,7 +138,7 @@ QString JuliaPlotExtension::plotFunction2d(
+ {
+ auto new_left = left;
+ auto new_right = right;
+- if (new_left.isEmpty() and new_right.isEmpty()) {
++ if (new_left.isEmpty() && new_right.isEmpty()) {
+ new_left = QLatin1String("-1");
+ new_right = QLatin1String("1");
+ } else if (new_left.isEmpty()) {
+@@ -165,7 +165,7 @@ QString JuliaPlotExtension::plotFunction3d(
+ {
+
+ auto update_interval = [](Interval &interval) {
+- if (interval.first.isEmpty() and interval.second.isEmpty()) {
++ if (interval.first.isEmpty() && interval.second.isEmpty()) {
+ interval.first = QLatin1String("-1");
+ interval.second = QLatin1String("1");
+ } else if (interval.first.isEmpty()) {
+diff --git a/src/backends/julia/juliahighlighter.cpp b/src/backends/julia/juliahighlighter.cpp
+index 4795361..f7d3622 100644
+--- a/src/backends/julia/juliahighlighter.cpp
++++ b/src/backends/julia/juliahighlighter.cpp
+@@ -98,7 +98,7 @@ void JuliaHighlighter::highlightBlock(const QString &text)
+ while (pos < text.length()) {
+ // Trying to close current environments
+ bool triggered = false;
+- for (int i = 0; i < flags.size() and not triggered; i++) {
++ for (int i = 0; i < flags.size() && !triggered; i++) {
+ int flag = flags[i];
+ QRegExp &regexp = regexps_ends[i];
+ QTextCharFormat &format = formats[i];
+@@ -144,7 +144,7 @@ void JuliaHighlighter::highlightBlock(const QString &text)
+ singleLineCommentStart.indexIn(text, pos);
+
+ if (singleLineCommentStartPos != -1
+- and singleLineCommentStartPos < minPos) {
++ && singleLineCommentStartPos < minPos) {
+ // single line comment starts earlier
+ setFormat(pos, text.length() - pos, commentFormat());
+ break;
+diff --git a/src/backends/julia/juliakeywords.cpp b/src/backends/julia/juliakeywords.cpp
+index f0a5846..8a0efec 100644
+--- a/src/backends/julia/juliakeywords.cpp
++++ b/src/backends/julia/juliakeywords.cpp
+@@ -62,11 +62,11 @@ void JuliaKeywords::loadFromFile()
+ const QStringRef name = xml.name();
+
+ if (name == QLatin1String("keywords")
+- or name == QLatin1String("variables")
+- or name == QLatin1String("plot_showing_commands")) {
++ || name == QLatin1String("variables")
++ || name == QLatin1String("plot_showing_commands")) {
+ while (xml.readNextStartElement()) {
+ Q_ASSERT(
+- xml.isStartElement() and xml.name() == QLatin1String("word")
++ xml.isStartElement() && xml.name() == QLatin1String("word")
+ );
+
+ const QString text = xml.readElementText();
+@@ -91,7 +91,7 @@ void JuliaKeywords::loadFromFile()
+
+ void JuliaKeywords::addVariable(const QString &variable)
+ {
+- if (not m_variables.contains(variable)) {
++ if (!m_variables.contains(variable)) {
+ m_variables << variable;
+ }
+ }
+@@ -104,7 +104,7 @@ void JuliaKeywords::clearVariables()
+
+ void JuliaKeywords::addFunction(const QString &function)
+ {
+- if (not m_functions.contains(function)) {
++ if (!m_functions.contains(function)) {
+ m_functions << function;
+ }
+ }
+diff --git a/src/backends/julia/juliaserver/juliaserver.cpp b/src/backends/julia/juliaserver/juliaserver.cpp
+index c9beb4c..91585cf 100644
+--- a/src/backends/julia/juliaserver/juliaserver.cpp
++++ b/src/backends/julia/juliaserver/juliaserver.cpp
+@@ -47,7 +47,7 @@ void JuliaServer::runJuliaCommand(const QString &command)
+ {
+ // Redirect stdout, stderr to temprorary files
+ QTemporaryFile output, error;
+- if (not output.open() or not error.open()) {
++ if (!output.open() || !error.open()) {
+ qFatal("Unable to create temprorary files for stdout/stderr");
+ return;
+ }
+@@ -90,7 +90,7 @@ void JuliaServer::runJuliaCommand(const QString &command)
+ bool is_nothing = jl_unbox_bool(
+ static_cast<jl_value_t *>(jl_call2(equality, nothing, val))
+ );
+- if (not is_nothing) {
++ if (!is_nothing) {
+ jl_static_show(JL_STDOUT, val);
+ }
+ m_was_exception = false;
+diff --git a/src/backends/julia/juliaserver/main.cpp b/src/backends/julia/juliaserver/main.cpp
+index ad7e4d9..11687ec 100644
+--- a/src/backends/julia/juliaserver/main.cpp
++++ b/src/backends/julia/juliaserver/main.cpp
+@@ -30,7 +30,7 @@ int main(int argc, char *argv[])
+ {
+ QCoreApplication app(argc, argv);
+
+- if (not QDBusConnection::sessionBus().isConnected()) {
++ if (!QDBusConnection::sessionBus().isConnected()) {
+ qWarning() << "Can't connect to the D-Bus session bus.\n"
+ "To start it, run: eval `dbus-launch --auto-syntax`";
+ return 1;
+@@ -39,7 +39,7 @@ int main(int argc, char *argv[])
+ const QString &serviceName =
+ QString::fromLatin1("org.kde.Cantor.Julia-%1").arg(app.applicationPid());
+
+- if (not QDBusConnection::sessionBus().registerService(serviceName)) {
++ if (!QDBusConnection::sessionBus().registerService(serviceName)) {
+ qWarning() << QDBusConnection::sessionBus().lastError().message();
+ return 2;
+ }
+diff --git a/src/backends/julia/juliasession.cpp b/src/backends/julia/juliasession.cpp
+index 425e6cb..9183e11 100644
+--- a/src/backends/julia/juliasession.cpp
++++ b/src/backends/julia/juliasession.cpp
+@@ -86,7 +86,7 @@ void JuliaSession::login()
+ QDBusConnection::sessionBus()
+ );
+
+- if (not m_interface->isValid()) {
++ if (!m_interface->isValid()) {
+ qWarning() << QDBusConnection::sessionBus().lastError().message();
+ return;
+ }
+@@ -213,7 +213,7 @@ bool JuliaSession::getWasException()
+ {
+ const QDBusReply<bool> &reply =
+ m_interface->call(QLatin1String("getWasException"));
+- return reply.isValid() and reply.value();
++ return reply.isValid() && reply.value();
+ }
+
+ void JuliaSession::listVariables()
+--
+2.10.2
+
diff --git a/kde/patch/cantor/cantor_python.patch b/kde/patch/cantor/cantor_python.patch
new file mode 100644
index 0000000..aa2b398
--- /dev/null
+++ b/kde/patch/cantor/cantor_python.patch
@@ -0,0 +1,31 @@
+Patch taken from:
+https://gitweb.gentoo.org/repo/gentoo.git/plain/kde-apps/cantor/files/cantor-16.12.2-python-kf-5.31.patch
+
+commit 4b8ef6bed62daced90c7826985650c2a813d2996
+Author: Jonathan Riddell <jr@jriddell.org>
+Date: Wed Feb 8 14:56:48 2017 +0000
+
+ remove modern C++ use to fix compile with current KDE policy
+
+diff --git a/src/backends/python/pythonhighlighter.cpp b/src/backends/python/pythonhighlighter.cpp
+index 4064524..87b10dd 100644
+--- a/src/backends/python/pythonhighlighter.cpp
++++ b/src/backends/python/pythonhighlighter.cpp
+@@ -87,7 +87,7 @@ void PythonHighlighter::highlightBlock(const QString &text)
+ while (pos < text.length()) {
+ // Trying to close current environments
+ bool triggered = false;
+- for (int i = 0; i < flags.size() and not triggered; i++) {
++ for (int i = 0; i < flags.size() && !triggered; i++) {
+ int flag = flags[i];
+ QRegExp &regexp = regexps[i];
+ QTextCharFormat &format = formats[i];
+@@ -126,7 +126,7 @@ void PythonHighlighter::highlightBlock(const QString &text)
+ singleLineCommentStart.indexIn(text, pos);
+
+ if (singleLineCommentStartPos != -1
+- and singleLineCommentStartPos < minPos) {
++ && singleLineCommentStartPos < minPos) {
+ setFormat(pos, text.length() - pos, commentFormat());
+ break;
+ } else if (minRegexp) {
diff --git a/kde/patch/digikam.patch b/kde/patch/digikam.patch
new file mode 100644
index 0000000..ec056c9
--- /dev/null
+++ b/kde/patch/digikam.patch
@@ -0,0 +1,9 @@
+# Fix compilation with clang.
+# Fixed in digikam 5.5.0.
+#cat $CWD/patch/digikam/digikam_clang_fix.patch | patch -p1 --verbose || { touch ${SLACK_KDE_BUILD_DIR}/${PKGNAME}.failed ; continue ; }
+
+# Fix linking issue, backport from git master:
+#cd core
+# cat $CWD/patch/digikam/digikam_databasemodel.patch | patch -p1 --verbose || { touch ${SLACK_KDE_BUILD_DIR}/${PKGNAME}.failed ; continue ; }
+#cd -
+
diff --git a/kde/patch/digikam/digikam_clang_fix.patch b/kde/patch/digikam/digikam_clang_fix.patch
new file mode 100644
index 0000000..a4d77b0
--- /dev/null
+++ b/kde/patch/digikam/digikam_clang_fix.patch
@@ -0,0 +1,38 @@
+Taken from:
+http://pkgs.fedoraproject.org/cgit/rpms/digikam.git/
+And added and extra '/core/' path componenent.
+
+From 86cd0d1d89c8b4d13f06dc8a353bdd99f13c4758 Mon Sep 17 00:00:00 2001
+From: Gilles Caulier <caulier.gilles@gmail.com>
+Date: Wed, 18 Jan 2017 10:13:20 +0100
+Subject: [PATCH 2/2] Fix compilation with clang
+
+---
+ libs/dmetadata/metaengine_p.cpp | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/core/libs/dmetadata/metaengine_p.cpp b/core/libs/dmetadata/metaengine_p.cpp
+index 2c83b58..2b44e06 100644
+--- a/core/libs/dmetadata/metaengine_p.cpp
++++ b/core/libs/dmetadata/metaengine_p.cpp
+@@ -49,7 +49,7 @@ extern "C"
+ #include "digikam_debug.h"
+
+ // Pragma directives to reduce warnings from Exiv2.
+-#if not defined(__APPLE__) && defined(__GNUC__)
++#if !defined(__APPLE__) && defined(__GNUC__)
+ #pragma GCC diagnostic push
+ #pragma GCC diagnostic ignored "-Wdeprecated-declarations"
+ #endif
+@@ -723,7 +723,7 @@ void MetaEngine::Private::loadSidecarData(Exiv2::Image::AutoPtr xmpsidecar)
+ } // namespace Digikam
+
+ // Restore warnings
+-#if not defined(__APPLE__) && defined(__GNUC__)
++#if !defined(__APPLE__) && defined(__GNUC__)
+ #pragma GCC diagnostic pop
+ #endif
+
+--
+2.9.3
+
diff --git a/kde/patch/digikam/digikam_databasemodel.patch b/kde/patch/digikam/digikam_databasemodel.patch
new file mode 100644
index 0000000..8b2fff7
--- /dev/null
+++ b/kde/patch/digikam/digikam_databasemodel.patch
@@ -0,0 +1,13337 @@
+From 7e00441c257e7e9e5dc5ab983fc06046fb72b0c5 Mon Sep 17 00:00:00 2001
+From: Gilles Caulier <caulier.gilles@gmail.com>
+Date: Sat, 22 Jul 2017 15:46:08 +0200
+Subject: fix broken linking stage under MacOS with macports. move database
+ models into libdigikamdatabase. Let's others model in place to be included
+ into libdigikamcore
+
+---
+ libs/database/CMakeLists.txt | 16 +-
+ libs/database/models/imagefiltermodel.cpp | 1116 ++++++++++++++++++
+ libs/database/models/imagefiltermodel.h | 299 +++++
+ libs/database/models/imagefiltermodelpriv.cpp | 258 ++++
+ libs/database/models/imagefiltermodelpriv.h | 159 +++
+ libs/database/models/imagefiltermodelthreads.cpp | 40 +
+ libs/database/models/imagefiltermodelthreads.h | 100 ++
+ libs/database/models/imagefiltersettings.cpp | 952 +++++++++++++++
+ libs/database/models/imagefiltersettings.h | 349 ++++++
+ libs/database/models/imagelistmodel.cpp | 70 ++
+ libs/database/models/imagelistmodel.h | 63 +
+ libs/database/models/imagemodel.cpp | 1368 ++++++++++++++++++++++
+ libs/database/models/imagemodel.h | 364 ++++++
+ libs/database/models/imagesortsettings.cpp | 400 +++++++
+ libs/database/models/imagesortsettings.h | 225 ++++
+ libs/database/models/imagethumbnailmodel.cpp | 323 +++++
+ libs/database/models/imagethumbnailmodel.h | 140 +++
+ libs/database/models/imageversionsmodel.cpp | 183 +++
+ libs/database/models/imageversionsmodel.h | 75 ++
+ libs/models/CMakeLists.txt | 15 +-
+ libs/models/imagefiltermodel.cpp | 1116 ------------------
+ libs/models/imagefiltermodel.h | 299 -----
+ libs/models/imagefiltermodelpriv.cpp | 258 ----
+ libs/models/imagefiltermodelpriv.h | 159 ---
+ libs/models/imagefiltermodelthreads.cpp | 40 -
+ libs/models/imagefiltermodelthreads.h | 100 --
+ libs/models/imagefiltersettings.cpp | 952 ---------------
+ libs/models/imagefiltersettings.h | 349 ------
+ libs/models/imagelistmodel.cpp | 70 --
+ libs/models/imagelistmodel.h | 63 -
+ libs/models/imagemodel.cpp | 1368 ----------------------
+ libs/models/imagemodel.h | 364 ------
+ libs/models/imagesortsettings.cpp | 400 -------
+ libs/models/imagesortsettings.h | 225 ----
+ libs/models/imagethumbnailmodel.cpp | 323 -----
+ libs/models/imagethumbnailmodel.h | 140 ---
+ libs/models/imageversionsmodel.cpp | 183 ---
+ libs/models/imageversionsmodel.h | 75 --
+ 38 files changed, 6499 insertions(+), 6500 deletions(-)
+ create mode 100644 libs/database/models/imagefiltermodel.cpp
+ create mode 100644 libs/database/models/imagefiltermodel.h
+ create mode 100644 libs/database/models/imagefiltermodelpriv.cpp
+ create mode 100644 libs/database/models/imagefiltermodelpriv.h
+ create mode 100644 libs/database/models/imagefiltermodelthreads.cpp
+ create mode 100644 libs/database/models/imagefiltermodelthreads.h
+ create mode 100644 libs/database/models/imagefiltersettings.cpp
+ create mode 100644 libs/database/models/imagefiltersettings.h
+ create mode 100644 libs/database/models/imagelistmodel.cpp
+ create mode 100644 libs/database/models/imagelistmodel.h
+ create mode 100644 libs/database/models/imagemodel.cpp
+ create mode 100644 libs/database/models/imagemodel.h
+ create mode 100644 libs/database/models/imagesortsettings.cpp
+ create mode 100644 libs/database/models/imagesortsettings.h
+ create mode 100644 libs/database/models/imagethumbnailmodel.cpp
+ create mode 100644 libs/database/models/imagethumbnailmodel.h
+ create mode 100644 libs/database/models/imageversionsmodel.cpp
+ create mode 100644 libs/database/models/imageversionsmodel.h
+ delete mode 100644 libs/models/imagefiltermodel.cpp
+ delete mode 100644 libs/models/imagefiltermodel.h
+ delete mode 100644 libs/models/imagefiltermodelpriv.cpp
+ delete mode 100644 libs/models/imagefiltermodelpriv.h
+ delete mode 100644 libs/models/imagefiltermodelthreads.cpp
+ delete mode 100644 libs/models/imagefiltermodelthreads.h
+ delete mode 100644 libs/models/imagefiltersettings.cpp
+ delete mode 100644 libs/models/imagefiltersettings.h
+ delete mode 100644 libs/models/imagelistmodel.cpp
+ delete mode 100644 libs/models/imagelistmodel.h
+ delete mode 100644 libs/models/imagemodel.cpp
+ delete mode 100644 libs/models/imagemodel.h
+ delete mode 100644 libs/models/imagesortsettings.cpp
+ delete mode 100644 libs/models/imagesortsettings.h
+ delete mode 100644 libs/models/imagethumbnailmodel.cpp
+ delete mode 100644 libs/models/imagethumbnailmodel.h
+ delete mode 100644 libs/models/imageversionsmodel.cpp
+ delete mode 100644 libs/models/imageversionsmodel.h
+
+diff --git a/libs/database/CMakeLists.txt b/libs/database/CMakeLists.txt
+index 7d05536..a431a36 100644
+--- a/libs/database/CMakeLists.txt
++++ b/libs/database/CMakeLists.txt
+@@ -13,6 +13,18 @@ endif (POLICY CMP0063)
+ # Boost uses operator names (and, not, ...)
+ string(REPLACE "-fno-operator-names" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
+
++set(libdatabasemodels_SRCS
++ models/imagemodel.cpp
++ models/imagefiltermodel.cpp
++ models/imagefiltermodelpriv.cpp
++ models/imagefiltermodelthreads.cpp
++ models/imagefiltersettings.cpp
++ models/imagelistmodel.cpp
++ models/imagesortsettings.cpp
++ models/imagethumbnailmodel.cpp
++ models/imageversionsmodel.cpp
++)
++
+ set(libdatabasecore_SRCS
+ server/databaseserverstarter.cpp
+ server/databaseservererror.cpp
+@@ -152,10 +164,10 @@ if(ENABLE_DBUS)
+ include_directories($<TARGET_PROPERTY:Qt5::DBus,INTERFACE_INCLUDE_DIRECTORIES>)
+ endif()
+
+-add_library(digikamdatabase_src OBJECT ${digikamdatabase_LIB_SRCS})
++add_library(digikamdatabase_src OBJECT ${digikamdatabase_LIB_SRCS} ${libdatabasemodels_SRCS})
+ add_library(digikamdatabasemain_src OBJECT ${libdatabaseutils_SRCS} ${libimgqsort_SRCS})
+ add_library(digikamdatabasecore_src OBJECT ${libdatabasecore_SRCS})
+-add_library(digikamdatabase SHARED $<TARGET_OBJECTS:digikamdatabase_src> $<TARGET_OBJECTS:digikamdatabasemodels_src>)
++add_library(digikamdatabase $<TARGET_OBJECTS:digikamdatabase_src>)
+
+ generate_export_header(digikamdatabase
+ BASE_NAME digikam_database
+diff --git a/libs/database/models/imagefiltermodel.cpp b/libs/database/models/imagefiltermodel.cpp
+new file mode 100644
+index 0000000..3d57e05
+--- /dev/null
++++ b/libs/database/models/imagefiltermodel.cpp
+@@ -0,0 +1,1116 @@
++/* ============================================================
++ *
++ * This file is a part of digiKam project
++ * http://www.digikam.org
++ *
++ * Date : 2009-03-05
++ * Description : Qt item model for database entries
++ *
++ * Copyright (C) 2009-2011 by Marcel Wiesweg <marcel dot wiesweg at gmx dot de>
++ * Copyright (C) 2011-2017 by Gilles Caulier <caulier dot gilles at gmail dot com>
++ * Copyright (C) 2010 by Andi Clemens <andi dot clemens at gmail dot com>
++ * Copyright (C) 2011 by Michael G. Hansen <mike at mghansen dot de>
++ * Copyright (C) 2014 by Mohamed Anwer <m dot anwer at gmx dot com>
++ *
++ * This program is free software; you can redistribute it
++ * and/or modify it under the terms of the GNU General
++ * Public License as published by the Free Software Foundation;
++ * either version 2, or (at your option)
++ * any later version.
++ *
++ * This program is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++ * GNU General Public License for more details.
++ *
++ * ============================================================ */
++
++#include "imagefiltermodel.h"
++#include "imagefiltermodelpriv.h"
++#include "imagefiltermodelthreads.h"
++
++// Local includes
++
++#include "digikam_debug.h"
++#include "coredbaccess.h"
++#include "coredbchangesets.h"
++#include "coredbwatch.h"
++#include "imageinfolist.h"
++#include "imagemodel.h"
++
++namespace Digikam
++{
++
++ImageSortFilterModel::ImageSortFilterModel(QObject* parent)
++ : DCategorizedSortFilterProxyModel(parent), m_chainedModel(0)
++{
++}
++
++void ImageSortFilterModel::setSourceImageModel(ImageModel* source)
++{
++ if (m_chainedModel)
++ {
++ m_chainedModel->setSourceImageModel(source);
++ }
++ else
++ {
++ setDirectSourceImageModel(source);
++ }
++}
++
++void ImageSortFilterModel::setSourceFilterModel(ImageSortFilterModel* source)
++{
++ if (source)
++ {
++ ImageModel* const model = sourceImageModel();
++
++ if (model)
++ {
++ source->setSourceImageModel(model);
++ }
++ }
++
++ m_chainedModel = source;
++ setSourceModel(source);
++}
++
++void ImageSortFilterModel::setDirectSourceImageModel(ImageModel* model)
++{
++ setSourceModel(model);
++}
++
++void ImageSortFilterModel::setSourceModel(QAbstractItemModel* model)
++{
++ // made it protected, only setSourceImageModel is public
++ DCategorizedSortFilterProxyModel::setSourceModel(model);
++}
++
++ImageModel* ImageSortFilterModel::sourceImageModel() const
++{
++ if (m_chainedModel)
++ {
++ return m_chainedModel->sourceImageModel();
++ }
++
++ return static_cast<ImageModel*>(sourceModel());
++}
++
++ImageSortFilterModel* ImageSortFilterModel::sourceFilterModel() const
++{
++ return m_chainedModel;
++}
++
++ImageFilterModel* ImageSortFilterModel::imageFilterModel() const
++{
++ // reimplemented in ImageFilterModel
++ if (m_chainedModel)
++ {
++ return m_chainedModel->imageFilterModel();
++ }
++
++ return 0;
++}
++
++QModelIndex ImageSortFilterModel::mapToSourceImageModel(const QModelIndex& index) const
++{
++ if (m_chainedModel)
++ {
++ return m_chainedModel->mapToSourceImageModel(mapToSource(index));
++ }
++
++ return mapToSource(index);
++}
++
++QModelIndex ImageSortFilterModel::mapFromSourceImageModel(const QModelIndex& albummodel_index) const
++{
++ if (m_chainedModel)
++ {
++ return mapFromSource(m_chainedModel->mapFromSourceImageModel(albummodel_index));
++ }
++
++ return mapFromSource(albummodel_index);
++}
++
++
++QModelIndex ImageSortFilterModel::mapFromDirectSourceToSourceImageModel(const QModelIndex& sourceModel_index) const
++{
++ if (m_chainedModel)
++ {
++ return m_chainedModel->mapToSourceImageModel(sourceModel_index);
++ }
++ return sourceModel_index;
++}
++
++// -------------- Convenience mappers -------------------------------------------------------------------
++
++QList<QModelIndex> ImageSortFilterModel::mapListToSource(const QList<QModelIndex>& indexes) const
++{
++ QList<QModelIndex> sourceIndexes;
++ foreach(const QModelIndex& index, indexes)
++ {
++ sourceIndexes << mapToSourceImageModel(index);
++ }
++ return sourceIndexes;
++}
++
++QList<QModelIndex> ImageSortFilterModel::mapListFromSource(const QList<QModelIndex>& sourceIndexes) const
++{
++ QList<QModelIndex> indexes;
++ foreach(const QModelIndex& index, sourceIndexes)
++ {
++ indexes << mapFromSourceImageModel(index);
++ }
++ return indexes;
++}
++
++ImageInfo ImageSortFilterModel::imageInfo(const QModelIndex& index) const
++{
++ return sourceImageModel()->imageInfo(mapToSourceImageModel(index));
++}
++
++qlonglong ImageSortFilterModel::imageId(const QModelIndex& index) const
++{
++ return sourceImageModel()->imageId(mapToSourceImageModel(index));
++}
++
++QList<ImageInfo> ImageSortFilterModel::imageInfos(const QList<QModelIndex>& indexes) const
++{
++ QList<ImageInfo> infos;
++ ImageModel* const model = sourceImageModel();
++
++ foreach(const QModelIndex& index, indexes)
++ {
++ infos << model->imageInfo(mapToSourceImageModel(index));
++ }
++
++ return infos;
++}
++
++QList<qlonglong> ImageSortFilterModel::imageIds(const QList<QModelIndex>& indexes) const
++{
++ QList<qlonglong> ids;
++ ImageModel* const model = sourceImageModel();
++
++ foreach(const QModelIndex& index, indexes)
++ {
++ ids << model->imageId(mapToSourceImageModel(index));
++ }
++
++ return ids;
++}
++
++QModelIndex ImageSortFilterModel::indexForPath(const QString& filePath) const
++{
++ return mapFromSourceImageModel(sourceImageModel()->indexForPath(filePath));
++}
++
++QModelIndex ImageSortFilterModel::indexForImageInfo(const ImageInfo& info) const
++{
++ return mapFromSourceImageModel(sourceImageModel()->indexForImageInfo(info));
++}
++
++QModelIndex ImageSortFilterModel::indexForImageId(qlonglong id) const
++{
++ return mapFromSourceImageModel(sourceImageModel()->indexForImageId(id));
++}
++
++QList<ImageInfo> ImageSortFilterModel::imageInfosSorted() const
++{
++ QList<ImageInfo> infos;
++ const int size = rowCount();
++ ImageModel* const model = sourceImageModel();
++
++ for (int i=0; i<size; ++i)
++ {
++ infos << model->imageInfo(mapToSourceImageModel(index(i, 0)));
++ }
++
++ return infos;
++}
++
++// --------------------------------------------------------------------------------------------
++
++ImageFilterModel::ImageFilterModel(QObject* parent)
++ : ImageSortFilterModel(parent),
++ d_ptr(new ImageFilterModelPrivate)
++{
++ d_ptr->init(this);
++}
++
++ImageFilterModel::ImageFilterModel(ImageFilterModelPrivate& dd, QObject* parent)
++ : ImageSortFilterModel(parent),
++ d_ptr(&dd)
++{
++ d_ptr->init(this);
++}
++
++ImageFilterModel::~ImageFilterModel()
++{
++ Q_D(ImageFilterModel);
++ delete d;
++}
++
++void ImageFilterModel::setDirectSourceImageModel(ImageModel* sourceModel)
++{
++ Q_D(ImageFilterModel);
++
++ if (d->imageModel)
++ {
++ d->imageModel->unsetPreprocessor(d);
++ disconnect(d->imageModel, SIGNAL(modelReset()),
++ this, SLOT(slotModelReset()));
++ slotModelReset();
++ }
++
++ d->imageModel = sourceModel;
++
++ if (d->imageModel)
++ {
++ d->imageModel->setPreprocessor(d);
++
++ connect(d->imageModel, SIGNAL(preprocess(QList<ImageInfo>,QList<QVariant>)),
++ d, SLOT(preprocessInfos(QList<ImageInfo>,QList<QVariant>)));
++
++ connect(d->imageModel, SIGNAL(processAdded(QList<ImageInfo>,QList<QVariant>)),
++ d, SLOT(processAddedInfos(QList<ImageInfo>,QList<QVariant>)));
++
++ connect(d, SIGNAL(reAddImageInfos(QList<ImageInfo>,QList<QVariant>)),
++ d->imageModel, SLOT(reAddImageInfos(QList<ImageInfo>,QList<QVariant>)));
++
++ connect(d, SIGNAL(reAddingFinished()),
++ d->imageModel, SLOT(reAddingFinished()));
++
++ connect(d->imageModel, SIGNAL(modelReset()),
++ this, SLOT(slotModelReset()));
++
++ connect(d->imageModel, SIGNAL(imageChange(ImageChangeset,QItemSelection)),
++ this, SLOT(slotImageChange(ImageChangeset)));
++
++ connect(d->imageModel, SIGNAL(imageTagChange(ImageTagChangeset,QItemSelection)),
++ this, SLOT(slotImageTagChange(ImageTagChangeset)));
++ }
++
++ setSourceModel(d->imageModel);
++}
++
++QVariant ImageFilterModel::data(const QModelIndex& index, int role) const
++{
++ Q_D(const ImageFilterModel);
++
++ if (!index.isValid())
++ {
++ return QVariant();
++ }
++
++ switch (role)
++ {
++ // Attention: This breaks should there ever be another filter model between this and the ImageModel
++
++ case DCategorizedSortFilterProxyModel::CategoryDisplayRole:
++ return categoryIdentifier(d->imageModel->imageInfoRef(mapToSource(index)));
++ case CategorizationModeRole:
++ return d->sorter.categorizationMode;
++ case SortOrderRole:
++ return d->sorter.sortRole;
++ //case CategoryCountRole:
++ // return categoryCount(d->imageModel->imageInfoRef(mapToSource(index)));
++ case CategoryAlbumIdRole:
++ return d->imageModel->imageInfoRef(mapToSource(index)).albumId();
++ case CategoryFormatRole:
++ return d->imageModel->imageInfoRef(mapToSource(index)).format();
++ case GroupIsOpenRole:
++ return d->groupFilter.isAllOpen() ||
++ d->groupFilter.isOpen(d->imageModel->imageInfoRef(mapToSource(index)).id());
++ case ImageFilterModelPointerRole:
++ return QVariant::fromValue(const_cast<ImageFilterModel*>(this));
++ }
++
++ return DCategorizedSortFilterProxyModel::data(index, role);
++}
++
++ImageFilterModel* ImageFilterModel::imageFilterModel() const
++{
++ return const_cast<ImageFilterModel*>(this);
++}
++
++DatabaseFields::Set ImageFilterModel::suggestedWatchFlags() const
++{
++ DatabaseFields::Set watchFlags;
++ watchFlags |= DatabaseFields::Name | DatabaseFields::FileSize | DatabaseFields::ModificationDate;
++ watchFlags |= DatabaseFields::Rating | DatabaseFields::CreationDate | DatabaseFields::Orientation |
++ DatabaseFields::Width | DatabaseFields::Height;
++ watchFlags |= DatabaseFields::Comment;
++ watchFlags |= DatabaseFields::ImageRelations;
++ return watchFlags;
++}
++
++// -------------- Filter settings --------------
++
++void ImageFilterModel::setDayFilter(const QList<QDateTime>& days)
++{
++ Q_D(ImageFilterModel);
++ d->filter.setDayFilter(days);
++ setImageFilterSettings(d->filter);
++}
++
++void ImageFilterModel::setTagFilter(const QList<int>& includedTags, const QList<int>& excludedTags,
++ ImageFilterSettings::MatchingCondition matchingCond,
++ bool showUnTagged, const QList<int>& clTagIds, const QList<int>& plTagIds)
++{
++ Q_D(ImageFilterModel);
++ d->filter.setTagFilter(includedTags, excludedTags, matchingCond, showUnTagged, clTagIds, plTagIds);
++ setImageFilterSettings(d->filter);
++}
++
++void ImageFilterModel::setRatingFilter(int rating, ImageFilterSettings::RatingCondition ratingCond, bool isUnratedExcluded)
++{
++ Q_D(ImageFilterModel);
++ d->filter.setRatingFilter(rating, ratingCond, isUnratedExcluded);
++ setImageFilterSettings(d->filter);
++}
++
++void ImageFilterModel::setUrlWhitelist(const QList<QUrl> urlList, const QString& id)
++{
++ Q_D(ImageFilterModel);
++ d->filter.setUrlWhitelist(urlList, id);
++ setImageFilterSettings(d->filter);
++}
++
++void ImageFilterModel::setIdWhitelist(const QList<qlonglong>& idList, const QString& id)
++{
++ Q_D(ImageFilterModel);
++ d->filter.setIdWhitelist(idList, id);
++ setImageFilterSettings(d->filter);
++}
++
++void ImageFilterModel::setMimeTypeFilter(int mimeTypeFilter)
++{
++ Q_D(ImageFilterModel);
++ d->filter.setMimeTypeFilter(mimeTypeFilter);
++ setImageFilterSettings(d->filter);
++}
++
++void ImageFilterModel::setGeolocationFilter(const ImageFilterSettings::GeolocationCondition& condition)
++{
++ Q_D(ImageFilterModel);
++ d->filter.setGeolocationFilter(condition);
++ setImageFilterSettings(d->filter);
++}
++
++void ImageFilterModel::setTextFilter(const SearchTextFilterSettings& settings)
++{
++ Q_D(ImageFilterModel);
++ d->filter.setTextFilter(settings);
++ setImageFilterSettings(d->filter);
++}
++
++void ImageFilterModel::setImageFilterSettings(const ImageFilterSettings& settings)
++{
++ Q_D(ImageFilterModel);
++
++ {
++ QMutexLocker lock(&d->mutex);
++ d->version++;
++ d->filter = settings;
++ d->filterCopy = settings;
++ d->versionFilterCopy = d->versionFilter;
++ d->groupFilterCopy = d->groupFilter;
++
++ d->needPrepareComments = settings.isFilteringByText();
++ d->needPrepareTags = settings.isFilteringByTags();
++ d->needPrepareGroups = true;
++ d->needPrepare = d->needPrepareComments || d->needPrepareTags || d->needPrepareGroups;
++
++ d->hasOneMatch = false;
++ d->hasOneMatchForText = false;
++ }
++
++ d->filterResults.clear();
++
++ //d->categoryCountHashInt.clear();
++ //d->categoryCountHashString.clear();
++ if (d->imageModel)
++ {
++ d->infosToProcess(d->imageModel->imageInfos());
++ }
++
++ emit filterSettingsChanged(settings);
++}
++
++void ImageFilterModel::setVersionManagerSettings(const VersionManagerSettings& settings)
++{
++ Q_D(ImageFilterModel);
++ d->versionFilter.setVersionManagerSettings(settings);
++ setVersionImageFilterSettings(d->versionFilter);
++}
++
++void ImageFilterModel::setExceptionList(const QList<qlonglong>& idList, const QString& id)
++{
++ Q_D(ImageFilterModel);
++ d->versionFilter.setExceptionList(idList, id);
++ setVersionImageFilterSettings(d->versionFilter);
++}
++
++void ImageFilterModel::setVersionImageFilterSettings(const VersionImageFilterSettings& settings)
++{
++ Q_D(ImageFilterModel);
++ d->versionFilter = settings;
++ slotUpdateFilter();
++}
++
++bool ImageFilterModel::isGroupOpen(qlonglong group) const
++{
++ Q_D(const ImageFilterModel);
++ return d->groupFilter.isOpen(group);
++}
++
++bool ImageFilterModel::isAllGroupsOpen() const
++{
++ Q_D(const ImageFilterModel);
++ return d->groupFilter.isAllOpen();
++}
++
++void ImageFilterModel::setGroupOpen(qlonglong group, bool open)
++{
++ Q_D(ImageFilterModel);
++ d->groupFilter.setOpen(group, open);
++ setGroupImageFilterSettings(d->groupFilter);
++}
++
++void ImageFilterModel::toggleGroupOpen(qlonglong group)
++{
++ setGroupOpen(group, !isGroupOpen(group));
++}
++
++void ImageFilterModel::setAllGroupsOpen(bool open)
++{
++ Q_D(ImageFilterModel);
++ d->groupFilter.setAllOpen(open);
++ setGroupImageFilterSettings(d->groupFilter);
++}
++
++void ImageFilterModel::setGroupImageFilterSettings(const GroupImageFilterSettings& settings)
++{
++ Q_D(ImageFilterModel);
++ d->groupFilter = settings;
++ slotUpdateFilter();
++}
++
++void ImageFilterModel::slotUpdateFilter()
++{
++ Q_D(ImageFilterModel);
++ setImageFilterSettings(d->filter);
++}
++
++ImageFilterSettings ImageFilterModel::imageFilterSettings() const
++{
++ Q_D(const ImageFilterModel);
++ return d->filter;
++}
++
++ImageSortSettings ImageFilterModel::imageSortSettings() const
++{
++ Q_D(const ImageFilterModel);
++ return d->sorter;
++}
++
++VersionImageFilterSettings ImageFilterModel::versionImageFilterSettings() const
++{
++ Q_D(const ImageFilterModel);
++ return d->versionFilter;
++}
++
++GroupImageFilterSettings ImageFilterModel::groupImageFilterSettings() const
++{
++ Q_D(const ImageFilterModel);
++ return d->groupFilter;
++}
++
++void ImageFilterModel::slotModelReset()
++{
++ Q_D(ImageFilterModel);
++ {
++ QMutexLocker lock(&d->mutex);
++ // discard all packages on the way that are marked as send out for re-add
++ d->lastDiscardVersion = d->version;
++ d->sentOutForReAdd = 0;
++ // discard all packages on the way
++ d->version++;
++ d->sentOut = 0;
++
++ d->hasOneMatch = false;
++ d->hasOneMatchForText = false;
++ }
++ d->filterResults.clear();
++}
++
++bool ImageFilterModel::filterAcceptsRow(int source_row, const QModelIndex& source_parent) const
++{
++ Q_D(const ImageFilterModel);
++
++ if (source_parent.isValid())
++ {
++ return false;
++ }
++
++ qlonglong id = d->imageModel->imageId(source_row);
++ QHash<qlonglong, bool>::const_iterator it = d->filterResults.constFind(id);
++
++ if (it != d->filterResults.constEnd())
++ {
++ return it.value();
++ }
++
++ // usually done in thread and cache, unless source model changed
++ ImageInfo info = d->imageModel->imageInfo(source_row);
++ bool match = d->filter.matches(info);
++ match = match ? d->versionFilter.matches(info) : false;
++
++ return match ? d->groupFilter.matches(info) : false;
++}
++
++void ImageFilterModel::setSendImageInfoSignals(bool sendSignals)
++{
++ if (sendSignals)
++ {
++ connect(this, SIGNAL(rowsInserted(QModelIndex,int,int)),
++ this, SLOT(slotRowsInserted(QModelIndex,int,int)));
++
++ connect(this, SIGNAL(rowsAboutToBeRemoved(QModelIndex,int,int)),
++ this, SLOT(slotRowsAboutToBeRemoved(QModelIndex,int,int)));
++ }
++ else
++ {
++ disconnect(this, SIGNAL(rowsInserted(QModelIndex,int,int)),
++ this, SLOT(slotRowsInserted(QModelIndex,int,int)));
++
++ disconnect(this, SIGNAL(rowsAboutToBeRemoved(QModelIndex,int,int)),
++ this, SLOT(slotRowsAboutToBeRemoved(QModelIndex,int,int)));
++ }
++}
++
++void ImageFilterModel::slotRowsInserted(const QModelIndex& /*parent*/, int start, int end)
++{
++ QList<ImageInfo> infos;
++
++ for (int i=start; i<=end; ++i)
++ {
++ infos << imageInfo(index(i, 0));
++ }
++
++ emit imageInfosAdded(infos);
++}
++
++void ImageFilterModel::slotRowsAboutToBeRemoved(const QModelIndex& /*parent*/, int start, int end)
++{
++ QList<ImageInfo> infos;
++
++ for (int i=start; i<=end; ++i)
++ {
++ infos << imageInfo(index(i, 0));
++ }
++
++ emit imageInfosAboutToBeRemoved(infos);
++}
++
++// -------------- Threaded preparation & filtering --------------
++
++void ImageFilterModel::addPrepareHook(ImageFilterModelPrepareHook* hook)
++{
++ Q_D(ImageFilterModel);
++ QMutexLocker lock(&d->mutex);
++ d->prepareHooks << hook;
++}
++
++void ImageFilterModel::removePrepareHook(ImageFilterModelPrepareHook* hook)
++{
++ Q_D(ImageFilterModel);
++ QMutexLocker lock(&d->mutex);
++ d->prepareHooks.removeAll(hook);
++}
++
++void ImageFilterModelPreparer::process(ImageFilterModelTodoPackage package)
++{
++ if (!checkVersion(package))
++ {
++ emit discarded(package);
++ return;
++ }
++
++ // get thread-local copy
++ bool needPrepareTags, needPrepareComments, needPrepareGroups;
++ QList<ImageFilterModelPrepareHook*> prepareHooks;
++ {
++ QMutexLocker lock(&d->mutex);
++ needPrepareTags = d->needPrepareTags;
++ needPrepareComments = d->needPrepareComments;
++ needPrepareGroups = d->needPrepareGroups;
++ prepareHooks = d->prepareHooks;
++ }
++
++ //TODO: Make efficient!!
++ if (needPrepareComments)
++ {
++ foreach(const ImageInfo& info, package.infos)
++ {
++ info.comment();
++ }
++ }
++
++ if (!checkVersion(package))
++ {
++ emit discarded(package);
++ return;
++ }
++
++ // The downside of QVector: At some point, we may need a QList for an API.
++ // Nonetheless, QList and ImageInfo is fast. We could as well
++ // reimplement ImageInfoList to ImageInfoVector (internally with templates?)
++ ImageInfoList infoList;
++
++ if (needPrepareTags || needPrepareGroups)
++ {
++ infoList = package.infos.toList();
++ }
++
++ if (needPrepareTags)
++ {
++ infoList.loadTagIds();
++ }
++
++ if (needPrepareGroups)
++ {
++ infoList.loadGroupImageIds();
++ }
++
++ foreach(ImageFilterModelPrepareHook* hook, prepareHooks)
++ {
++ hook->prepare(package.infos);
++ }
++
++ emit processed(package);
++}
++
++void ImageFilterModelFilterer::process(ImageFilterModelTodoPackage package)
++{
++ if (!checkVersion(package))
++ {
++ emit discarded(package);
++ return;
++ }
++
++ // get thread-local copy
++ ImageFilterSettings localFilter;
++ VersionImageFilterSettings localVersionFilter;
++ GroupImageFilterSettings localGroupFilter;
++ bool hasOneMatch;
++ bool hasOneMatchForText;
++ {
++ QMutexLocker lock(&d->mutex);
++ localFilter = d->filterCopy;
++ localVersionFilter = d->versionFilterCopy;
++ localGroupFilter = d->groupFilterCopy;
++ hasOneMatch = d->hasOneMatch;
++ hasOneMatchForText = d->hasOneMatchForText;
++ }
++
++ // Actual filtering. The variants to spare checking hasOneMatch over and over again.
++ if (hasOneMatch && hasOneMatchForText)
++ {
++ foreach(const ImageInfo& info, package.infos)
++ {
++ package.filterResults[info.id()] = localFilter.matches(info) &&
++ localVersionFilter.matches(info) &&
++ localGroupFilter.matches(info);
++ }
++ }
++ else if (hasOneMatch)
++ {
++ bool matchForText;
++
++ foreach(const ImageInfo& info, package.infos)
++ {
++ package.filterResults[info.id()] = localFilter.matches(info, &matchForText) &&
++ localVersionFilter.matches(info) &&
++ localGroupFilter.matches(info);
++
++ if (matchForText)
++ {
++ hasOneMatchForText = true;
++ }
++ }
++ }
++ else
++ {
++ bool result, matchForText;
++
++ foreach(const ImageInfo& info, package.infos)
++ {
++ result = localFilter.matches(info, &matchForText) &&
++ localVersionFilter.matches(info) &&
++ localGroupFilter.matches(info);
++ package.filterResults[info.id()] = result;
++
++ if (result)
++ {
++ hasOneMatch = true;
++ }
++
++ if (matchForText)
++ {
++ hasOneMatchForText = true;
++ }
++ }
++ }
++
++ if (checkVersion(package))
++ {
++ QMutexLocker lock(&d->mutex);
++ d->hasOneMatch = hasOneMatch;
++ d->hasOneMatchForText = hasOneMatchForText;
++ }
++
++ emit processed(package);
++}
++
++// -------------- Sorting and Categorization -------------------------------------------------------
++
++void ImageFilterModel::setImageSortSettings(const ImageSortSettings& sorter)
++{
++ Q_D(ImageFilterModel);
++ d->sorter = sorter;
++ setCategorizedModel(d->sorter.categorizationMode != ImageSortSettings::NoCategories);
++ invalidate();
++}
++
++void ImageFilterModel::setCategorizationMode(ImageSortSettings::CategorizationMode mode)
++{
++ Q_D(ImageFilterModel);
++ d->sorter.setCategorizationMode(mode);
++ setImageSortSettings(d->sorter);
++}
++
++void ImageFilterModel::setCategorizationSortOrder(ImageSortSettings::SortOrder order)
++{
++ Q_D(ImageFilterModel);
++ d->sorter.setCategorizationSortOrder(order);
++ setImageSortSettings(d->sorter);
++}
++
++void ImageFilterModel::setSortRole(ImageSortSettings::SortRole role)
++{
++ Q_D(ImageFilterModel);
++ d->sorter.setSortRole(role);
++ setImageSortSettings(d->sorter);
++}
++
++void ImageFilterModel::setSortOrder(ImageSortSettings::SortOrder order)
++{
++ Q_D(ImageFilterModel);
++ d->sorter.setSortOrder(order);
++ setImageSortSettings(d->sorter);
++}
++
++void ImageFilterModel::setStringTypeNatural(bool natural)
++{
++ Q_D(ImageFilterModel);
++ d->sorter.setStringTypeNatural(natural);
++ setImageSortSettings(d->sorter);
++}
++
++int ImageFilterModel::compareCategories(const QModelIndex& left, const QModelIndex& right) const
++{
++ // source indexes
++ Q_D(const ImageFilterModel);
++
++ if (!d->sorter.isCategorized())
++ {
++ return 0;
++ }
++
++ if (!left.isValid() || !right.isValid())
++ {
++ return -1;
++ }
++
++ const ImageInfo& leftInfo = d->imageModel->imageInfoRef(left);
++ const ImageInfo& rightInfo = d->imageModel->imageInfoRef(right);
++
++ // Check grouping
++ qlonglong leftGroupImageId = leftInfo.groupImageId();
++ qlonglong rightGroupImageId = rightInfo.groupImageId();
++
++ return compareInfosCategories(leftGroupImageId == -1 ? leftInfo : ImageInfo(leftGroupImageId),
++ rightGroupImageId == -1 ? rightInfo : ImageInfo(rightGroupImageId));
++}
++
++bool ImageFilterModel::subSortLessThan(const QModelIndex& left, const QModelIndex& right) const
++{
++ // source indexes
++ Q_D(const ImageFilterModel);
++
++ if (!left.isValid() || !right.isValid())
++ {
++ return true;
++ }
++
++ if (left == right)
++ {
++ return false;
++ }
++
++ const ImageInfo& leftInfo = d->imageModel->imageInfoRef(left);
++ const ImageInfo& rightInfo = d->imageModel->imageInfoRef(right);
++
++ if (leftInfo == rightInfo)
++ {
++ return d->sorter.lessThan(left.data(ImageModel::ExtraDataRole), right.data(ImageModel::ExtraDataRole));
++ }
++
++ // Check grouping
++ qlonglong leftGroupImageId = leftInfo.groupImageId();
++ qlonglong rightGroupImageId = rightInfo.groupImageId();
++
++ // Either no grouping (-1), or same group image, or same image
++ if (leftGroupImageId == rightGroupImageId)
++ {
++ return infosLessThan(leftInfo, rightInfo);
++ }
++
++ // We have grouping to handle
++
++ // Is one grouped on the other? Sort behind leader.
++ if (leftGroupImageId == rightInfo.id())
++ {
++ return false;
++ }
++ if (rightGroupImageId == leftInfo.id())
++ {
++ return true;
++ }
++
++ // Use the group leader for sorting
++ return infosLessThan(leftGroupImageId == -1 ? leftInfo : ImageInfo(leftGroupImageId),
++ rightGroupImageId == -1 ? rightInfo : ImageInfo(rightGroupImageId));
++}
++
++int ImageFilterModel::compareInfosCategories(const ImageInfo& left, const ImageInfo& right) const
++{
++ // Note: reimplemented in ImageAlbumFilterModel
++ Q_D(const ImageFilterModel);
++ return d->sorter.compareCategories(left, right);
++}
++
++// Feel free to optimize. QString::number is 3x slower.
++static inline QString fastNumberToString(int id)
++{
++ const int size = sizeof(int) * 2;
++ char c[size+1];
++ c[size] = '\0';
++ char* p = c;
++ int number = id;
++
++ for (int i=0; i<size; ++i)
++ {
++ *p = 'a' + (number & 0xF);
++ number >>= 4;
++ ++p;
++ }
++
++ return QString::fromLatin1(c);
++}
++
++QString ImageFilterModel::categoryIdentifier(const ImageInfo& i) const
++{
++ Q_D(const ImageFilterModel);
++
++ if (!d->sorter.isCategorized())
++ {
++ return QString();
++ }
++
++ qlonglong groupedImageId = i.groupImageId();
++ ImageInfo info = groupedImageId == -1 ? i : ImageInfo(groupedImageId);
++
++ switch (d->sorter.categorizationMode)
++ {
++ case ImageSortSettings::NoCategories:
++ return QString();
++ case ImageSortSettings::OneCategory:
++ return QString();
++ case ImageSortSettings::CategoryByAlbum:
++ return fastNumberToString(info.albumId());
++ case ImageSortSettings::CategoryByFormat:
++ return info.format();
++ default:
++ return QString();
++ }
++}
++
++bool ImageFilterModel::infosLessThan(const ImageInfo& left, const ImageInfo& right) const
++{
++ Q_D(const ImageFilterModel);
++ return d->sorter.lessThan(left, right);
++}
++
++// -------------- Watching changes -----------------------------------------------------------------
++
++void ImageFilterModel::slotImageTagChange(const ImageTagChangeset& changeset)
++{
++ Q_D(ImageFilterModel);
++
++ if (!d->imageModel || d->imageModel->isEmpty())
++ {
++ return;
++ }
++
++ // already scheduled to re-filter?
++ if (d->updateFilterTimer->isActive())
++ {
++ return;
++ }
++
++ // do we filter at all?
++ if (!d->versionFilter.isFilteringByTags() &&
++ !d->filter.isFilteringByTags() &&
++ !d->filter.isFilteringByText())
++ {
++ return;
++ }
++
++ // is one of our images affected?
++ foreach(const qlonglong& id, changeset.ids())
++ {
++ // if one matching image id is found, trigger a refresh
++ if (d->imageModel->hasImage(id))
++ {
++ d->updateFilterTimer->start();
++ return;
++ }
++ }
++}
++
++void ImageFilterModel::slotImageChange(const ImageChangeset& changeset)
++{
++ Q_D(ImageFilterModel);
++
++ if (!d->imageModel || d->imageModel->isEmpty())
++ {
++ return;
++ }
++
++ // already scheduled to re-filter?
++ if (d->updateFilterTimer->isActive())
++ {
++ return;
++ }
++
++ // is one of the values affected that we filter or sort by?
++ DatabaseFields::Set set = changeset.changes();
++ bool sortAffected = (set & d->sorter.watchFlags());
++ bool filterAffected = (set & d->filter.watchFlags()) || (set & d->groupFilter.watchFlags());
++
++ if (!sortAffected && !filterAffected)
++ {
++ return;
++ }
++
++ // is one of our images affected?
++ bool imageAffected = false;
++
++ foreach(const qlonglong& id, changeset.ids())
++ {
++ // if one matching image id is found, trigger a refresh
++ if (d->imageModel->hasImage(id))
++ {
++ imageAffected = true;
++ break;
++ }
++ }
++
++ if (!imageAffected)
++ {
++ return;
++ }
++
++ if (filterAffected)
++ {
++ d->updateFilterTimer->start();
++ }
++ else
++ {
++ invalidate(); // just resort, reuse filter results
++ }
++}
++
++// -------------------------------------------------------------------------------------------------------
++
++NoDuplicatesImageFilterModel::NoDuplicatesImageFilterModel(QObject* parent)
++ : ImageSortFilterModel(parent)
++{
++}
++
++bool NoDuplicatesImageFilterModel::filterAcceptsRow(int source_row, const QModelIndex& source_parent) const
++{
++ QModelIndex index = sourceModel()->index(source_row, 0, source_parent);
++
++ if (index.data(ImageModel::ExtraDataDuplicateCount).toInt() <= 1)
++ {
++ return true;
++ }
++
++ QModelIndex previousIndex = sourceModel()->index(source_row - 1, 0, source_parent);
++
++ if (!previousIndex.isValid())
++ {
++ return true;
++ }
++
++ if (sourceImageModel()->imageId(mapFromDirectSourceToSourceImageModel(index)) == sourceImageModel()->imageId(mapFromDirectSourceToSourceImageModel(previousIndex)))
++ {
++ return false;
++ }
++ return true;
++}
++
++/*
++void NoDuplicatesImageFilterModel::setSourceModel(QAbstractItemModel* model)
++{
++ if (sourceModel())
++ {
++ }
++
++ ImageSortFilterModel::setSourceModel(model);
++
++ if (sourceModel())
++ {
++ connect(sourceModel(), SIGNAL(rowsAboutToBeRemoved(QModelIndex,int,int)),
++ this, SLOT(slotRowsAboutToBeRemoved(QModelIndex,int,int)));
++ }
++}
++
++void NoDuplicatesImageFilterModel::slotRowsAboutToBeRemoved(const QModelIndex& parent, int begin, int end)
++{
++ bool needInvalidate = false;
++
++ for (int i = begin; i<=end; ++i)
++ {
++ QModelIndex index = sourceModel()->index(i, 0, parent);
++
++ // filtered out by us?
++ if (!mapFromSource(index).isValid())
++ {
++ continue;
++ }
++
++ QModelIndex sourceIndex = mapFromDirectSourceToSourceImageModel(index);
++ qlonglong id = sourceImageModel()->imageId(sourceIndex);
++
++ if (sourceImageModel()->numberOfIndexesForImageId(id) > 1)
++ {
++ needInvalidate = true;
++ }
++ }
++}*/
++
++} // namespace Digikam
+diff --git a/libs/database/models/imagefiltermodel.h b/libs/database/models/imagefiltermodel.h
+new file mode 100644
+index 0000000..d131b3e
+--- /dev/null
++++ b/libs/database/models/imagefiltermodel.h
+@@ -0,0 +1,299 @@
++/* ============================================================
++ *
++ * This file is a part of digiKam project
++ * http://www.digikam.org
++ *
++ * Date : 2009-03-05
++ * Description : Qt item model for database entries
++ *
++ * Copyright (C) 2009-2011 by Marcel Wiesweg <marcel dot wiesweg at gmx dot de>
++ * Copyright (C) 2011 by Gilles Caulier <caulier dot gilles at gmail dot com>
++ * Copyright (C) 2010 by Andi Clemens <andi dot clemens at gmail dot com>
++ * Copyright (C) 2011 by Michael G. Hansen <mike at mghansen dot de>
++ * Copyright (C) 2014 by Mohamed Anwer <m dot anwer at gmx dot com>
++ *
++ * This program is free software; you can redistribute it
++ * and/or modify it under the terms of the GNU General
++ * Public License as published by the Free Software Foundation;
++ * either version 2, or (at your option)
++ * any later version.
++ *
++ * This program is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++ * GNU General Public License for more details.
++ *
++ * ============================================================ */
++
++#ifndef IMAGEFILTERMODEL_H
++#define IMAGEFILTERMODEL_H
++
++// Local includes
++
++#include "dcategorizedsortfilterproxymodel.h"
++#include "textfilter.h"
++#include "imagefiltersettings.h"
++#include "imagemodel.h"
++#include "imagesortsettings.h"
++#include "digikam_export.h"
++
++namespace Digikam
++{
++
++class ImageChangeset;
++class ImageFilterModel;
++class ImageTagChangeset;
++
++class DIGIKAM_DATABASE_EXPORT ImageFilterModelPrepareHook
++{
++public:
++
++ virtual ~ImageFilterModelPrepareHook() {};
++ virtual void prepare(const QVector<ImageInfo>& infos) = 0;
++};
++
++// -----------------------------------------------------------------------------------------------
++
++class DIGIKAM_DATABASE_EXPORT ImageSortFilterModel : public DCategorizedSortFilterProxyModel
++{
++ Q_OBJECT
++
++public:
++
++ explicit ImageSortFilterModel(QObject* parent = 0);
++
++ void setSourceImageModel(ImageModel* model);
++ ImageModel* sourceImageModel() const;
++
++ void setSourceFilterModel(ImageSortFilterModel* model);
++ ImageSortFilterModel* sourceFilterModel() const;
++
++ QModelIndex mapToSourceImageModel(const QModelIndex& index) const;
++ QModelIndex mapFromSourceImageModel(const QModelIndex& imagemodel_index) const;
++ QModelIndex mapFromDirectSourceToSourceImageModel(const QModelIndex& sourceModel_index) const;
++
++ /// Convenience methods mapped to ImageModel.
++ /// Mentioned indexes returned come from the source image model.
++ QList<QModelIndex> mapListToSource(const QList<QModelIndex>& indexes) const;
++ QList<QModelIndex> mapListFromSource(const QList<QModelIndex>& sourceIndexes) const;
++
++ ImageInfo imageInfo(const QModelIndex& index) const;
++ qlonglong imageId(const QModelIndex& index) const;
++ QList<ImageInfo> imageInfos(const QList<QModelIndex>& indexes) const;
++ QList<qlonglong> imageIds(const QList<QModelIndex>& indexes) const;
++
++ QModelIndex indexForPath(const QString& filePath) const;
++ QModelIndex indexForImageInfo(const ImageInfo& info) const;
++ QModelIndex indexForImageId(qlonglong id) const;
++
++ /** Returns a list of all image infos, sorted according to this model.
++ * If you do not need a sorted list, use ImageModel's imageInfos() method.
++ */
++ QList<ImageInfo> imageInfosSorted() const;
++
++ /// Returns this, any chained ImageFilterModel, or 0.
++ virtual ImageFilterModel* imageFilterModel() const;
++
++protected:
++
++ /// Reimplement if needed. Called only when model shall be set as (direct) sourceModel.
++ virtual void setDirectSourceImageModel(ImageModel* model);
++
++ // made protected
++ virtual void setSourceModel(QAbstractItemModel* model);
++
++protected:
++
++ ImageSortFilterModel* m_chainedModel;
++};
++
++// -----------------------------------------------------------------------------------------------
++
++class DIGIKAM_DATABASE_EXPORT ImageFilterModel : public ImageSortFilterModel
++{
++ Q_OBJECT
++
++public:
++
++ enum ImageFilterModelRoles
++ {
++ /// Returns the current categorization mode
++ CategorizationModeRole = ImageModel::FilterModelRoles + 1,
++ /// Returns the current sort order
++ SortOrderRole = ImageModel::FilterModelRoles + 2,
++ // / Returns the number of items in the index' category
++ //CategoryCountRole = ImageModel::FilterModelRoles + 3,
++ /// Returns the id of the PAlbum of the index which is used for category
++ CategoryAlbumIdRole = ImageModel::FilterModelRoles + 3,
++ /// Returns the format of the index which is used for category
++ CategoryFormatRole = ImageModel::FilterModelRoles + 4,
++ /// Returns true if the given image is a group leader, and the group is opened
++ GroupIsOpenRole = ImageModel::FilterModelRoles + 5,
++ ImageFilterModelPointerRole = ImageModel::FilterModelRoles + 50
++ };
++
++public:
++
++ explicit ImageFilterModel(QObject* parent = 0);
++ ~ImageFilterModel();
++
++ /** Add a hook to get added images for preparation tasks before they are added in the model */
++ void addPrepareHook(ImageFilterModelPrepareHook* hook);
++ void removePrepareHook(ImageFilterModelPrepareHook* hook);
++
++ /** Returns a set of DatabaseFields suggested to set as watch flags on the source ImageModel.
++ * The contained flags will be those that this model can sort or filter by. */
++ DatabaseFields::Set suggestedWatchFlags() const;
++
++ ImageFilterSettings imageFilterSettings() const;
++ VersionImageFilterSettings versionImageFilterSettings() const;
++ GroupImageFilterSettings groupImageFilterSettings() const;
++ ImageSortSettings imageSortSettings() const;
++
++ // group is identified by the id of its group leader
++ bool isGroupOpen(qlonglong group) const;
++ bool isAllGroupsOpen() const;
++
++ /// Enables sending imageInfosAdded and imageInfosAboutToBeRemoved
++ void setSendImageInfoSignals(bool sendSignals);
++
++ virtual QVariant data(const QModelIndex& index, int role = Qt::DisplayRole) const;
++ virtual ImageFilterModel* imageFilterModel() const;
++
++public Q_SLOTS:
++
++ /** Changes the current version image filter settings and refilters. */
++ void setVersionImageFilterSettings(const VersionImageFilterSettings& settings);
++
++ /** Changes the current version image filter settings and refilters. */
++ void setGroupImageFilterSettings(const GroupImageFilterSettings& settings);
++
++ /** Adjust the current ImageFilterSettings.
++ * Equivalent to retrieving the current filter settings, adjusting the parameter
++ * and calling setImageFilterSettings.
++ * Provided for convenience.
++ * It is encouraged to use setImageFilterSettings if you change more than one
++ * parameter at a time.
++ */
++ void setDayFilter(const QList<QDateTime>& days);
++ void setTagFilter(const QList<int>& includedTags, const QList<int>& excludedTags,
++ ImageFilterSettings::MatchingCondition matchingCond, bool showUnTagged,
++ const QList<int>& clTagIds, const QList<int>& plTagIds);
++ void setRatingFilter(int rating, ImageFilterSettings::RatingCondition ratingCond, bool isUnratedExcluded);
++ void setMimeTypeFilter(int mimeTypeFilter);
++ void setGeolocationFilter(const ImageFilterSettings::GeolocationCondition& condition);
++ void setTextFilter(const SearchTextFilterSettings& settings);
++
++ void setCategorizationMode(ImageSortSettings::CategorizationMode mode);
++ void setCategorizationSortOrder(ImageSortSettings::SortOrder order);
++ void setSortRole(ImageSortSettings::SortRole role);
++ void setSortOrder(ImageSortSettings::SortOrder order);
++ void setStringTypeNatural(bool natural);
++ void setUrlWhitelist(const QList<QUrl> urlList, const QString& id);
++ void setIdWhitelist(const QList<qlonglong>& idList, const QString& id);
++
++ void setVersionManagerSettings(const VersionManagerSettings& settings);
++ void setExceptionList(const QList<qlonglong>& idlist, const QString& id);
++
++ void setGroupOpen(qlonglong group, bool open);
++ void toggleGroupOpen(qlonglong group);
++ void setAllGroupsOpen(bool open);
++
++ /** Changes the current image filter settings and refilters. */
++ virtual void setImageFilterSettings(const ImageFilterSettings& settings);
++
++ /** Changes the current image sort settings and resorts. */
++ virtual void setImageSortSettings(const ImageSortSettings& settings);
++
++Q_SIGNALS:
++
++ /// Signals that the set filter matches at least one index
++ void filterMatches(bool matches);
++
++ /** Signals that the set text filter matches at least one entry.
++ If no text filter is set, this signal is emitted
++ with 'false' when filterMatches() is emitted.
++ */
++ void filterMatchesForText(bool matchesByText);
++
++ /** Emitted when the filter settings have been changed
++ (the model may not yet have been updated)
++ */
++ void filterSettingsChanged(const ImageFilterSettings& settings);
++
++ /** These signals need to be explicitly enabled with setSendImageInfoSignals()
++ */
++ void imageInfosAdded(const QList<ImageInfo>& infos);
++ void imageInfosAboutToBeRemoved(const QList<ImageInfo>& infos);
++
++public:
++
++ // Declared as public because of use in sub-classes.
++ class ImageFilterModelPrivate;
++
++protected:
++
++ ImageFilterModelPrivate* const d_ptr;
++
++protected:
++
++ ImageFilterModel(ImageFilterModelPrivate& dd, QObject* parent);
++
++ virtual void setDirectSourceImageModel(ImageModel* model);
++
++ virtual bool filterAcceptsRow(int source_row, const QModelIndex& source_parent) const;
++
++ virtual int compareCategories(const QModelIndex& left, const QModelIndex& right) const;
++ virtual bool subSortLessThan(const QModelIndex& left, const QModelIndex& right) const;
++ //virtual int categoryCount(const ImageInfo& info) const;
++
++ /** Reimplement to customize category sorting,
++ * Return negative if category of left < category right,
++ * Return 0 if left and right are in the same category, else return positive.
++ */
++ virtual int compareInfosCategories(const ImageInfo& left, const ImageInfo& right) const;
++
++ /** Reimplement to customize sorting. Do not take categories into account here.
++ */
++ virtual bool infosLessThan(const ImageInfo& left, const ImageInfo& right) const;
++
++ /** Returns a unique identifier for the category if info. The string need not be for user display.
++ */
++ virtual QString categoryIdentifier(const ImageInfo& info) const;
++
++protected Q_SLOTS:
++
++ void slotModelReset();
++ void slotUpdateFilter();
++
++ void slotImageTagChange(const ImageTagChangeset& changeset);
++ void slotImageChange(const ImageChangeset& changeset);
++
++ void slotRowsInserted(const QModelIndex& parent, int start, int end);
++ void slotRowsAboutToBeRemoved(const QModelIndex& parent, int start, int end);
++
++private:
++
++ Q_DECLARE_PRIVATE(ImageFilterModel)
++};
++
++// -----------------------------------------------------------------------------------------------------
++
++class DIGIKAM_DATABASE_EXPORT NoDuplicatesImageFilterModel : public ImageSortFilterModel
++{
++ Q_OBJECT
++
++public:
++
++ explicit NoDuplicatesImageFilterModel(QObject* parent = 0);
++
++protected:
++
++ virtual bool filterAcceptsRow(int source_row, const QModelIndex& source_parent) const;
++};
++
++} // namespace Digikam
++
++Q_DECLARE_METATYPE(Digikam::ImageFilterModel*)
++
++#endif // IMAGEMODEL_H
+diff --git a/libs/database/models/imagefiltermodelpriv.cpp b/libs/database/models/imagefiltermodelpriv.cpp
+new file mode 100644
+index 0000000..07d9e79
+--- /dev/null
++++ b/libs/database/models/imagefiltermodelpriv.cpp
+@@ -0,0 +1,258 @@
++/* ============================================================
++ *
++ * This file is a part of digiKam project
++ * http://www.digikam.org
++ *
++ * Date : 2009-03-05
++ * Description : Qt item model for database entries
++ *
++ * Copyright (C) 2009-2011 by Marcel Wiesweg <marcel dot wiesweg at gmx dot de>
++ * Copyright (C) 2011-2017 by Gilles Caulier <caulier dot gilles at gmail dot com>
++ * Copyright (C) 2010 by Andi Clemens <andi dot clemens at gmail dot com>
++ * Copyright (C) 2011 by Michael G. Hansen <mike at mghansen dot de>
++ * Copyright (C) 2014 by Mohamed Anwer <m dot anwer at gmx dot com>
++ *
++ * This program is free software; you can redistribute it
++ * and/or modify it under the terms of the GNU General
++ * Public License as published by the Free Software Foundation;
++ * either version 2, or (at your option)
++ * any later version.
++ *
++ * This program is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++ * GNU General Public License for more details.
++ *
++ * ============================================================ */
++
++#include "imagefiltermodelpriv.h"
++
++// Local includes
++
++#include "digikam_debug.h"
++#include "imagefiltermodelthreads.h"
++
++namespace Digikam
++{
++
++ImageFilterModel::ImageFilterModelPrivate::ImageFilterModelPrivate()
++{
++ imageModel = 0;
++ version = 0;
++ lastDiscardVersion = 0;
++ sentOut = 0;
++ sentOutForReAdd = 0;
++ updateFilterTimer = 0;
++ needPrepare = false;
++ needPrepareComments = false;
++ needPrepareTags = false;
++ needPrepareGroups = false;
++ preparer = 0;
++ filterer = 0;
++ hasOneMatch = false;
++ hasOneMatchForText = false;
++
++ setupWorkers();
++}
++
++ImageFilterModel::ImageFilterModelPrivate::~ImageFilterModelPrivate()
++{
++ // facilitate thread stopping
++ ++version;
++ preparer->deactivate();
++ filterer->deactivate();
++ delete preparer;
++ delete filterer;
++}
++
++void ImageFilterModel::ImageFilterModelPrivate::init(ImageFilterModel* _q)
++{
++ q = _q;
++
++ updateFilterTimer = new QTimer(this);
++ updateFilterTimer->setSingleShot(true);
++ updateFilterTimer->setInterval(250);
++
++ connect(updateFilterTimer, SIGNAL(timeout()),
++ q, SLOT(slotUpdateFilter()));
++
++ // inter-thread redirection
++ qRegisterMetaType<ImageFilterModelTodoPackage>("ImageFilterModelTodoPackage");
++}
++
++void ImageFilterModel::ImageFilterModelPrivate::preprocessInfos(const QList<ImageInfo>& infos, const QList<QVariant>& extraValues)
++{
++ infosToProcess(infos, extraValues, true);
++}
++
++void ImageFilterModel::ImageFilterModelPrivate::processAddedInfos(const QList<ImageInfo>& infos, const QList<QVariant>& extraValues)
++{
++ // These have already been added, we just process them afterwards
++ infosToProcess(infos, extraValues, false);
++}
++
++void ImageFilterModel::ImageFilterModelPrivate::setupWorkers()
++{
++ preparer = new ImageFilterModelPreparer(this);
++ filterer = new ImageFilterModelFilterer(this);
++
++ // A package in constructed in infosToProcess.
++ // Normal flow is infosToProcess -> preparer::process -> filterer::process -> packageFinished.
++ // If no preparation is needed, the first step is skipped.
++ // If filter version changes, both will discard old package and send them to packageDiscarded.
++
++ connect(this, SIGNAL(packageToPrepare(ImageFilterModelTodoPackage)),
++ preparer, SLOT(process(ImageFilterModelTodoPackage)));
++
++ connect(this, SIGNAL(packageToFilter(ImageFilterModelTodoPackage)),
++ filterer, SLOT(process(ImageFilterModelTodoPackage)));
++
++ connect(preparer, SIGNAL(processed(ImageFilterModelTodoPackage)),
++ filterer, SLOT(process(ImageFilterModelTodoPackage)));
++
++ connect(filterer, SIGNAL(processed(ImageFilterModelTodoPackage)),
++ this, SLOT(packageFinished(ImageFilterModelTodoPackage)));
++
++ connect(preparer, SIGNAL(discarded(ImageFilterModelTodoPackage)),
++ this, SLOT(packageDiscarded(ImageFilterModelTodoPackage)));
++
++ connect(filterer, SIGNAL(discarded(ImageFilterModelTodoPackage)),
++ this, SLOT(packageDiscarded(ImageFilterModelTodoPackage)));
++}
++
++void ImageFilterModel::ImageFilterModelPrivate::infosToProcess(const QList<ImageInfo>& infos)
++{
++ infosToProcess(infos, QList<QVariant>(), false);
++}
++
++void ImageFilterModel::ImageFilterModelPrivate::infosToProcess(const QList<ImageInfo>& infos, const QList<QVariant>& extraValues, bool forReAdd)
++{
++ if (infos.isEmpty())
++ {
++ return;
++ }
++
++ filterer->schedule();
++
++ if (needPrepare)
++ {
++ preparer->schedule();
++ }
++
++ Q_ASSERT(extraValues.isEmpty() || infos.size() == extraValues.size());
++
++ // prepare and filter in chunks
++ const int size = infos.size();
++ const int maxChunkSize = needPrepare ? PrepareChunkSize : FilterChunkSize;
++ const bool hasExtraValues = !extraValues.isEmpty();
++ QList<ImageInfo>::const_iterator it = infos.constBegin(), end;
++ QList<QVariant>::const_iterator xit = extraValues.constBegin(), xend;
++ int index = 0;
++ QVector<ImageInfo> infoVector;
++ QVector<QVariant> extraValueVector;
++
++ while (it != infos.constEnd())
++ {
++ const int chunkSize = qMin(maxChunkSize, size - index);
++ infoVector.resize(chunkSize);
++ end = it + chunkSize;
++ qCopy(it, end, infoVector.begin());
++
++ if (hasExtraValues)
++ {
++ extraValueVector.resize(chunkSize);
++ xend = xit + chunkSize;
++ qCopy(xit, xend, extraValueVector.begin());
++ xit = xend;
++ }
++
++ it = end;
++ index += chunkSize;
++
++ ++sentOut;
++
++ if (forReAdd)
++ {
++ ++sentOutForReAdd;
++ }
++
++ if (needPrepare)
++ {
++ emit packageToPrepare(ImageFilterModelTodoPackage(infoVector, extraValueVector, version, forReAdd));
++ }
++ else
++ {
++ emit packageToFilter(ImageFilterModelTodoPackage(infoVector, extraValueVector, version, forReAdd));
++ }
++ }
++}
++
++void ImageFilterModel::ImageFilterModelPrivate::packageFinished(const ImageFilterModelTodoPackage& package)
++{
++ // check if it got discarded on the journey
++ if (package.version != version)
++ {
++ packageDiscarded(package);
++ return;
++ }
++
++ // incorporate result
++ QHash<qlonglong, bool>::const_iterator it = package.filterResults.constBegin();
++
++ for (; it != package.filterResults.constEnd(); ++it)
++ {
++ filterResults.insert(it.key(), it.value());
++ }
++
++ // re-add if necessary
++ if (package.isForReAdd)
++ {
++ emit reAddImageInfos(package.infos.toList(), package.extraValues.toList());
++
++ if (sentOutForReAdd == 1) // last package
++ {
++ emit reAddingFinished();
++ }
++ }
++
++ // decrement counters
++ --sentOut;
++
++ if (package.isForReAdd)
++ {
++ --sentOutForReAdd;
++ }
++
++ // If all packages have returned, filtered and readded, and no more are expected,
++ // and there is need to tell the filter result to the view, do that
++ if (sentOut == 0 && sentOutForReAdd == 0 && !imageModel->isRefreshing())
++ {
++ q->invalidate(); // use invalidate, not invalidateFilter only. Sorting may have changed as well.
++ emit (q->filterMatches(hasOneMatch));
++ emit (q->filterMatchesForText(hasOneMatchForText));
++ filterer->deactivate();
++ preparer->deactivate();
++ }
++}
++
++void ImageFilterModel::ImageFilterModelPrivate::packageDiscarded(const ImageFilterModelTodoPackage& package)
++{
++ // Either, the model was reset, or the filter changed
++ // In the former case throw all away, in the latter case, recycle
++ if (package.version > lastDiscardVersion)
++ {
++ // Recycle packages: Send again with current version
++ // Do not increment sentOut or sentOutForReAdd here: it was not decremented!
++
++ if (needPrepare)
++ {
++ emit packageToPrepare(ImageFilterModelTodoPackage(package.infos, package.extraValues, version, package.isForReAdd));
++ }
++ else
++ {
++ emit packageToFilter(ImageFilterModelTodoPackage(package.infos, package.extraValues, version, package.isForReAdd));
++ }
++ }
++}
++
++} // namespace Digikam
+diff --git a/libs/database/models/imagefiltermodelpriv.h b/libs/database/models/imagefiltermodelpriv.h
+new file mode 100644
+index 0000000..a9e3f22
+--- /dev/null
++++ b/libs/database/models/imagefiltermodelpriv.h
+@@ -0,0 +1,159 @@
++/* ============================================================
++ *
++ * This file is a part of digiKam project
++ * http://www.digikam.org
++ *
++ * Date : 2009-03-11
++ * Description : Qt item model for database entries - private shared header
++ *
++ * Copyright (C) 2009-2011 by Marcel Wiesweg <marcel dot wiesweg at gmx dot de>
++ *
++ * This program is free software; you can redistribute it
++ * and/or modify it under the terms of the GNU General
++ * Public License as published by the Free Software Foundation;
++ * either version 2, or (at your option)
++ * any later version.
++ *
++ * This program is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++ * GNU General Public License for more details.
++ *
++ * ============================================================ */
++
++#ifndef IMAGEFILTERMODELPRIV_H
++#define IMAGEFILTERMODELPRIV_H
++
++// Qt includes
++
++#include <QHash>
++#include <QMutex>
++#include <QMutexLocker>
++#include <QSet>
++#include <QThread>
++#include <QTimer>
++#include <QWaitCondition>
++
++// Local includes
++
++#include "imageinfo.h"
++#include "imagefiltermodel.h"
++
++#include "digikam_export.h"
++// Yes, we need the EXPORT macro in a private header because
++// this private header is shared across binary objects.
++// This does NOT make this classes here any more public!
++
++namespace Digikam
++{
++
++const int PrepareChunkSize = 101;
++const int FilterChunkSize = 2001;
++
++class ImageFilterModelTodoPackage
++{
++public:
++
++ ImageFilterModelTodoPackage()
++ : version(0), isForReAdd(false)
++ {
++ }
++
++ ImageFilterModelTodoPackage(const QVector<ImageInfo>& infos, const QVector<QVariant>& extraValues, int version, bool isForReAdd)
++ : infos(infos), extraValues(extraValues), version(version), isForReAdd(isForReAdd)
++ {
++ }
++
++ QVector<ImageInfo> infos;
++ QVector<QVariant> extraValues;
++ unsigned int version;
++ bool isForReAdd;
++ QHash<qlonglong, bool> filterResults;
++};
++
++// ------------------------------------------------------------------------------------------------
++
++class ImageFilterModelPreparer;
++class ImageFilterModelFilterer;
++
++class DIGIKAM_DATABASE_EXPORT ImageFilterModel::ImageFilterModelPrivate : public QObject
++{
++ Q_OBJECT
++
++public:
++
++ ImageFilterModelPrivate();
++ ~ImageFilterModelPrivate();
++
++ void init(ImageFilterModel* q);
++ void setupWorkers();
++ void infosToProcess(const QList<ImageInfo>& infos);
++ void infosToProcess(const QList<ImageInfo>& infos, const QList<QVariant>& extraValues, bool forReAdd = true);
++
++public:
++
++ ImageFilterModel* q;
++
++ ImageModel* imageModel;
++
++ ImageFilterSettings filter;
++ ImageSortSettings sorter;
++ VersionImageFilterSettings versionFilter;
++ GroupImageFilterSettings groupFilter;
++
++ volatile unsigned int version;
++ unsigned int lastDiscardVersion;
++ unsigned int lastFilteredVersion;
++ int sentOut;
++ int sentOutForReAdd;
++
++ QTimer* updateFilterTimer;
++
++ bool needPrepare;
++ bool needPrepareComments;
++ bool needPrepareTags;
++ bool needPrepareGroups;
++
++ QMutex mutex;
++ ImageFilterSettings filterCopy;
++ VersionImageFilterSettings versionFilterCopy;
++ GroupImageFilterSettings groupFilterCopy;
++ ImageFilterModelPreparer* preparer;
++ ImageFilterModelFilterer* filterer;
++
++ QHash<qlonglong, bool> filterResults;
++ bool hasOneMatch;
++ bool hasOneMatchForText;
++
++ QList<ImageFilterModelPrepareHook*> prepareHooks;
++
++/*
++ QHash<int, QSet<qlonglong> > categoryCountHashInt;
++ QHash<QString, QSet<qlonglong> > categoryCountHashString;
++
++public:
++
++ void cacheCategoryCount(int id, qlonglong imageid) const
++ { const_cast<ImageFilterModelPrivate*>(this)->categoryCountHashInt[id].insert(imageid); }
++ void cacheCategoryCount(const QString& id, qlonglong imageid) const
++ { const_cast<ImageFilterModelPrivate*>(this)->categoryCountHashString[id].insert(imageid); }
++*/
++
++public Q_SLOTS:
++
++ void preprocessInfos(const QList<ImageInfo>& infos, const QList<QVariant>& extraValues);
++ void processAddedInfos(const QList<ImageInfo>& infos, const QList<QVariant>& extraValues);
++ void packageFinished(const ImageFilterModelTodoPackage& package);
++ void packageDiscarded(const ImageFilterModelTodoPackage& package);
++
++Q_SIGNALS:
++
++ void packageToPrepare(const ImageFilterModelTodoPackage& package);
++ void packageToFilter(const ImageFilterModelTodoPackage& package);
++ void reAddImageInfos(const QList<ImageInfo>& infos, const QList<QVariant>& extraValues);
++ void reAddingFinished();
++};
++
++} // namespace Digikam
++
++#endif // IMAGEFILTERMODELPRIV_H
+diff --git a/libs/database/models/imagefiltermodelthreads.cpp b/libs/database/models/imagefiltermodelthreads.cpp
+new file mode 100644
+index 0000000..aa5c462
+--- /dev/null
++++ b/libs/database/models/imagefiltermodelthreads.cpp
+@@ -0,0 +1,40 @@
++/* ============================================================
++ *
++ * This file is a part of digiKam project
++ * http://www.digikam.org
++ *
++ * Date : 2009-03-05
++ * Description : Qt item model for database entries
++ *
++ * Copyright (C) 2009-2011 by Marcel Wiesweg <marcel dot wiesweg at gmx dot de>
++ * Copyright (C) 2011-2017 by Gilles Caulier <caulier dot gilles at gmail dot com>
++ * Copyright (C) 2010 by Andi Clemens <andi dot clemens at gmail dot com>
++ * Copyright (C) 2011 by Michael G. Hansen <mike at mghansen dot de>
++ * Copyright (C) 2014 by Mohamed Anwer <m dot anwer at gmx dot com>
++ *
++ * This program is free software; you can redistribute it
++ * and/or modify it under the terms of the GNU General
++ * Public License as published by the Free Software Foundation;
++ * either version 2, or (at your option)
++ * any later version.
++ *
++ * This program is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++ * GNU General Public License for more details.
++ *
++ * ============================================================ */
++
++#include "imagefiltermodel.h"
++#include "imagefiltermodelpriv.h"
++#include "imagefiltermodelthreads.h"
++
++namespace Digikam
++{
++
++ImageFilterModelWorker::ImageFilterModelWorker(ImageFilterModel::ImageFilterModelPrivate* const d)
++ : d(d)
++{
++}
++
++} // namespace Digikam
+diff --git a/libs/database/models/imagefiltermodelthreads.h b/libs/database/models/imagefiltermodelthreads.h
+new file mode 100644
+index 0000000..83fa987
+--- /dev/null
++++ b/libs/database/models/imagefiltermodelthreads.h
+@@ -0,0 +1,100 @@
++/* ============================================================
++ *
++ * This file is a part of digiKam project
++ * http://www.digikam.org
++ *
++ * Date : 2009-03-11
++ * Description : Qt item model for database entries - private header
++ *
++ * Copyright (C) 2009-2011 by Marcel Wiesweg <marcel dot wiesweg at gmx dot de>
++ *
++ * This program is free software; you can redistribute it
++ * and/or modify it under the terms of the GNU General
++ * Public License as published by the Free Software Foundation;
++ * either version 2, or (at your option)
++ * any later version.
++ *
++ * This program is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++ * GNU General Public License for more details.
++ *
++ * ============================================================ */
++
++#ifndef IMAGEFILTERMODELTHREADS_H
++#define IMAGEFILTERMODELTHREADS_H
++
++// Qt includes
++
++#include <QThread>
++
++// Local includes
++
++#include "digikam_export.h"
++#include "workerobject.h"
++
++namespace Digikam
++{
++
++class DIGIKAM_DATABASE_EXPORT ImageFilterModelWorker : public WorkerObject
++{
++ Q_OBJECT
++
++public:
++
++ explicit ImageFilterModelWorker(ImageFilterModel::ImageFilterModelPrivate* const d);
++
++ bool checkVersion(const ImageFilterModelTodoPackage& package)
++ {
++ return d->version == package.version;
++ }
++
++public Q_SLOTS:
++
++ virtual void process(ImageFilterModelTodoPackage package) = 0;
++
++Q_SIGNALS:
++
++ void processed(const ImageFilterModelTodoPackage& package);
++ void discarded(const ImageFilterModelTodoPackage& package);
++
++protected:
++
++ ImageFilterModel::ImageFilterModelPrivate* d;
++};
++
++// -----------------------------------------------------------------------------------------
++
++class DIGIKAM_DATABASE_EXPORT ImageFilterModelPreparer : public ImageFilterModelWorker
++{
++ Q_OBJECT
++
++public:
++
++ explicit ImageFilterModelPreparer(ImageFilterModel::ImageFilterModelPrivate* const d)
++ : ImageFilterModelWorker(d)
++ {
++ }
++
++ void process(ImageFilterModelTodoPackage package);
++};
++
++// ----------------------------------------------------------------------------------------
++
++class DIGIKAM_DATABASE_EXPORT ImageFilterModelFilterer : public ImageFilterModelWorker
++{
++ Q_OBJECT
++
++public:
++
++ explicit ImageFilterModelFilterer(ImageFilterModel::ImageFilterModelPrivate* const d)
++ : ImageFilterModelWorker(d)
++ {
++ }
++
++ void process(ImageFilterModelTodoPackage package);
++};
++
++} // namespace Digikam
++
++#endif // IMAGEFILTERMODELTHREADS_H
+diff --git a/libs/database/models/imagefiltersettings.cpp b/libs/database/models/imagefiltersettings.cpp
+new file mode 100644
+index 0000000..b61e7f9
+--- /dev/null
++++ b/libs/database/models/imagefiltersettings.cpp
+@@ -0,0 +1,952 @@
++/* ============================================================
++ *
++ * This file is a part of digiKam project
++ * http://www.digikam.org
++ *
++ * Date : 2009-03-05
++ * Description : Filter values for use with ImageFilterModel
++ *
++ * Copyright (C) 2009-2011 by Marcel Wiesweg <marcel dot wiesweg at gmx dot de>
++ * Copyright (C) 2011-2017 by Gilles Caulier <caulier dot gilles at gmail dot com>
++ * Copyright (C) 2010 by Andi Clemens <andi dot clemens at gmail dot com>
++ * Copyright (C) 2011 by Michael G. Hansen <mike at mghansen dot de>
++ * Copyright (C) 2014 by Mohamed Anwer <m dot anwer at gmx dot com>
++ *
++ * This program is free software; you can redistribute it
++ * and/or modify it under the terms of the GNU General
++ * Public License as published by the Free Software Foundation;
++ * either version 2, or (at your option)
++ * any later version.
++ *
++ * This program is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++ * GNU General Public License for more details.
++ *
++ * ============================================================ */
++
++#include "imagefiltersettings.h"
++
++// C++ includes
++
++#include <cmath>
++
++// Qt includes
++
++#include <QDateTime>
++
++// Local includes
++
++#include "digikam_debug.h"
++#include "coredbfields.h"
++#include "digikam_globals.h"
++#include "imageinfo.h"
++#include "tagscache.h"
++#include "versionmanagersettings.h"
++
++namespace Digikam
++{
++
++ImageFilterSettings::ImageFilterSettings()
++{
++ m_untaggedFilter = false;
++ m_isUnratedExcluded = false;
++ m_ratingFilter = 0;
++ m_mimeTypeFilter = MimeFilter::AllFiles;
++ m_ratingCond = GreaterEqualCondition;
++ m_matchingCond = OrCondition;
++ m_geolocationCondition = GeolocationNoFilter;
++}
++
++DatabaseFields::Set ImageFilterSettings::watchFlags() const
++{
++ DatabaseFields::Set set;
++
++ if (isFilteringByDay())
++ {
++ set |= DatabaseFields::CreationDate;
++ }
++
++ if (isFilteringByText())
++ {
++ set |= DatabaseFields::Name;
++ set |= DatabaseFields::Comment;
++ }
++
++ if (isFilteringByRating())
++ {
++ set |= DatabaseFields::Rating;
++ }
++
++ if (isFilteringByTypeMime())
++ {
++ set |= DatabaseFields::Category;
++ set |= DatabaseFields::Format;
++ }
++
++ if (isFilteringByGeolocation())
++ {
++ set |= DatabaseFields::ImagePositionsAll;
++ }
++
++ if (isFilteringByColorLabels())
++ {
++ set |= DatabaseFields::ColorLabel;
++ }
++
++ if (isFilteringByPickLabels())
++ {
++ set |= DatabaseFields::PickLabel;
++ }
++
++ return set;
++}
++
++bool ImageFilterSettings::isFilteringByDay() const
++{
++ if (!m_dayFilter.isEmpty())
++ {
++ return true;
++ }
++
++ return false;
++}
++
++bool ImageFilterSettings::isFilteringByTags() const
++{
++ if (!m_includeTagFilter.isEmpty() || !m_excludeTagFilter.isEmpty() || m_untaggedFilter)
++ {
++ return true;
++ }
++
++ return false;
++}
++
++bool ImageFilterSettings::isFilteringByColorLabels() const
++{
++ if (!m_colorLabelTagFilter.isEmpty())
++ {
++ return true;
++ }
++
++ return false;
++}
++
++bool ImageFilterSettings::isFilteringByPickLabels() const
++{
++ if (!m_pickLabelTagFilter.isEmpty())
++ {
++ return true;
++ }
++
++ return false;
++}
++
++bool ImageFilterSettings::isFilteringByText() const
++{
++ if (!m_textFilterSettings.text.isEmpty())
++ {
++ return true;
++ }
++
++ return false;
++}
++
++bool ImageFilterSettings::isFilteringByTypeMime() const
++{
++ if (m_mimeTypeFilter != MimeFilter::AllFiles)
++ {
++ return true;
++ }
++
++ return false;
++}
++
++bool ImageFilterSettings::isFilteringByGeolocation() const
++{
++ return (m_geolocationCondition != GeolocationNoFilter);
++}
++
++bool ImageFilterSettings::isFilteringByRating() const
++{
++ if (m_ratingFilter != 0 || m_ratingCond != GreaterEqualCondition || m_isUnratedExcluded)
++ {
++ return true;
++ }
++
++ return false;
++}
++
++bool ImageFilterSettings::isFilteringInternally() const
++{
++ return (isFiltering() || !m_urlWhitelists.isEmpty() || !m_idWhitelists.isEmpty());
++}
++
++bool ImageFilterSettings::isFiltering() const
++{
++ return isFilteringByDay() ||
++ isFilteringByTags() ||
++ isFilteringByText() ||
++ isFilteringByRating() ||
++ isFilteringByTypeMime() ||
++ isFilteringByColorLabels() ||
++ isFilteringByPickLabels() ||
++ isFilteringByGeolocation();
++}
++
++void ImageFilterSettings::setDayFilter(const QList<QDateTime>& days)
++{
++ m_dayFilter.clear();
++
++ for (QList<QDateTime>::const_iterator it = days.constBegin(); it != days.constEnd(); ++it)
++ {
++ m_dayFilter.insert(*it, true);
++ }
++}
++
++void ImageFilterSettings::setTagFilter(const QList<int>& includedTags,
++ const QList<int>& excludedTags,
++ MatchingCondition matchingCondition,
++ bool showUnTagged,
++ const QList<int>& clTagIds,
++ const QList<int>& plTagIds)
++{
++ m_includeTagFilter = includedTags;
++ m_excludeTagFilter = excludedTags;
++ m_matchingCond = matchingCondition;
++ m_untaggedFilter = showUnTagged;
++ m_colorLabelTagFilter = clTagIds;
++ m_pickLabelTagFilter = plTagIds;
++}
++
++void ImageFilterSettings::setRatingFilter(int rating, RatingCondition ratingCondition, bool isUnratedExcluded)
++{
++ m_ratingFilter = rating;
++ m_ratingCond = ratingCondition;
++ m_isUnratedExcluded = isUnratedExcluded;
++}
++
++void ImageFilterSettings::setMimeTypeFilter(int mime)
++{
++ m_mimeTypeFilter = (MimeFilter::TypeMimeFilter)mime;
++}
++
++void ImageFilterSettings::setGeolocationFilter(const GeolocationCondition& condition)
++{
++ m_geolocationCondition = condition;
++}
++
++void ImageFilterSettings::setTextFilter(const SearchTextFilterSettings& settings)
++{
++ m_textFilterSettings = settings;
++}
++
++void ImageFilterSettings::setTagNames(const QHash<int, QString>& hash)
++{
++ m_tagNameHash = hash;
++}
++
++void ImageFilterSettings::setAlbumNames(const QHash<int, QString>& hash)
++{
++ m_albumNameHash = hash;
++}
++
++void ImageFilterSettings::setUrlWhitelist(const QList<QUrl>& urlList, const QString& id)
++{
++ if (urlList.isEmpty())
++ {
++ m_urlWhitelists.remove(id);
++ }
++ else
++ {
++ m_urlWhitelists.insert(id, urlList);
++ }
++}
++
++void ImageFilterSettings::setIdWhitelist(const QList<qlonglong>& idList, const QString& id)
++{
++ if (idList.isEmpty())
++ {
++ m_idWhitelists.remove(id);
++ }
++ else
++ {
++ m_idWhitelists.insert(id, idList);
++ }
++}
++
++template <class ContainerA, class ContainerB>
++bool containsAnyOf(const ContainerA& listA, const ContainerB& listB)
++{
++ foreach (const typename ContainerA::value_type& a, listA)
++ {
++ if (listB.contains(a))
++ {
++ return true;
++ }
++ }
++ return false;
++}
++
++template <class ContainerA, typename Value, class ContainerB>
++bool containsNoneOfExcept(const ContainerA& list, const ContainerB& noneOfList, const Value& exception)
++{
++ foreach (const typename ContainerB::value_type& n, noneOfList)
++ {
++ if (n != exception && list.contains(n))
++ {
++ return false;
++ }
++ }
++ return true;
++}
++
++bool ImageFilterSettings::matches(const ImageInfo& info, bool* const foundText) const
++{
++ if (foundText)
++ {
++ *foundText = false;
++ }
++
++ if (!isFilteringInternally())
++ {
++ return true;
++ }
++
++ bool match = false;
++
++ if (!m_includeTagFilter.isEmpty() || !m_excludeTagFilter.isEmpty())
++ {
++ QList<int> tagIds = info.tagIds();
++ QList<int>::const_iterator it;
++
++ match = m_includeTagFilter.isEmpty();
++
++ if (m_matchingCond == OrCondition)
++ {
++ for (it = m_includeTagFilter.begin(); it != m_includeTagFilter.end(); ++it)
++ {
++ if (tagIds.contains(*it))
++ {
++ match = true;
++ break;
++ }
++ }
++
++ match |= (m_untaggedFilter && tagIds.isEmpty());
++ }
++ else // AND matching condition...
++ {
++ // m_untaggedFilter and non-empty tag filter, combined with AND, is logically no match
++ if (!m_untaggedFilter)
++ {
++ for (it = m_includeTagFilter.begin(); it != m_includeTagFilter.end(); ++it)
++ {
++ if (!tagIds.contains(*it))
++ {
++ break;
++ }
++ }
++
++ if (it == m_includeTagFilter.end())
++ {
++ match = true;
++ }
++ }
++ }
++
++ for (it = m_excludeTagFilter.begin(); it != m_excludeTagFilter.end(); ++it)
++ {
++ if (tagIds.contains(*it))
++ {
++ match = false;
++ break;
++ }
++ }
++ }
++ else if (m_untaggedFilter)
++ {
++ match = !TagsCache::instance()->containsPublicTags(info.tagIds());
++ }
++ else
++ {
++ match = true;
++ }
++
++ //-- Filter by pick labels ------------------------------------------------
++
++ if (!m_pickLabelTagFilter.isEmpty())
++ {
++ QList<int> tagIds = info.tagIds();
++ bool matchPL = false;
++
++ if (containsAnyOf(m_pickLabelTagFilter, tagIds))
++ {
++ matchPL = true;
++ }
++ else if (!matchPL)
++ {
++ int noPickLabelTagId = TagsCache::instance()->tagForPickLabel(NoPickLabel);
++
++ if (m_pickLabelTagFilter.contains(noPickLabelTagId))
++ {
++ // Searching for "has no ColorLabel" requires special handling:
++ // Scan that the tag ids contains none of the ColorLabel tags, except maybe the NoColorLabel tag
++ matchPL = containsNoneOfExcept(tagIds, TagsCache::instance()->pickLabelTags(), noPickLabelTagId);
++ }
++ }
++
++ match &= matchPL;
++ }
++
++ //-- Filter by color labels ------------------------------------------------
++
++ if (!m_colorLabelTagFilter.isEmpty())
++ {
++ QList<int> tagIds = info.tagIds();
++ bool matchCL = false;
++
++ if (containsAnyOf(m_colorLabelTagFilter, tagIds))
++ {
++ matchCL = true;
++ }
++ else if (!matchCL)
++ {
++ int noColorLabelTagId = TagsCache::instance()->tagForColorLabel(NoColorLabel);
++
++ if (m_colorLabelTagFilter.contains(noColorLabelTagId))
++ {
++ // Searching for "has no ColorLabel" requires special handling:
++ // Scan that the tag ids contains none of the ColorLabel tags, except maybe the NoColorLabel tag
++ matchCL = containsNoneOfExcept(tagIds, TagsCache::instance()->colorLabelTags(), noColorLabelTagId);
++ }
++ }
++
++ match &= matchCL;
++ }
++
++ //-- Filter by date -----------------------------------------------------------
++
++ if (!m_dayFilter.isEmpty())
++ {
++ match &= m_dayFilter.contains(QDateTime(info.dateTime().date(), QTime()));
++ }
++
++ //-- Filter by rating ---------------------------------------------------------
++
++ if (m_ratingFilter >= 0)
++ {
++ // for now we treat -1 (no rating) just like a rating of 0.
++ int rating = info.rating();
++
++ if (rating == -1)
++ {
++ rating = 0;
++ }
++
++ if(m_isUnratedExcluded && rating == 0)
++ {
++ match = false;
++ }
++ else
++ {
++ if (m_ratingCond == GreaterEqualCondition)
++ {
++ // If the rating is not >=, i.e it is <, then it does not match.
++ if (rating < m_ratingFilter)
++ {
++ match = false;
++ }
++ }
++ else if (m_ratingCond == EqualCondition)
++ {
++ // If the rating is not =, i.e it is !=, then it does not match.
++ if (rating != m_ratingFilter)
++ {
++ match = false;
++ }
++ }
++ else
++ {
++ // If the rating is not <=, i.e it is >, then it does not match.
++ if (rating > m_ratingFilter)
++ {
++ match = false;
++ }
++ }
++ }
++ }
++
++ // -- Filter by mime type -----------------------------------------------------
++
++ switch (m_mimeTypeFilter)
++ {
++ // info.format is a standardized string: Only one possibility per mime type
++ case MimeFilter::ImageFiles:
++ {
++ if (info.category() != DatabaseItem::Image)
++ {
++ match = false;
++ }
++
++ break;
++ }
++ case MimeFilter::JPGFiles:
++ {
++ if (info.format() != QLatin1String("JPG"))
++ {
++ match = false;
++ }
++
++ break;
++ }
++ case MimeFilter::PNGFiles:
++ {
++ if (info.format() != QLatin1String("PNG"))
++ {
++ match = false;
++ }
++
++ break;
++ }
++ case MimeFilter::TIFFiles:
++ {
++ if (info.format() != QLatin1String("TIFF"))
++ {
++ match = false;
++ }
++
++ break;
++ }
++ case MimeFilter::DNGFiles:
++ {
++ if (info.format() != QLatin1String("RAW-DNG"))
++ {
++ match = false;
++ }
++
++ break;
++ }
++ case MimeFilter::NoRAWFiles:
++ {
++ if (info.format().startsWith(QLatin1String("RAW")))
++ {
++ match = false;
++ }
++
++ break;
++ }
++ case MimeFilter::RAWFiles:
++ {
++ if (!info.format().startsWith(QLatin1String("RAW")))
++ {
++ match = false;
++ }
++
++ break;
++ }
++ case MimeFilter::MoviesFiles:
++ {
++ if (info.category() != DatabaseItem::Video)
++ {
++ match = false;
++ }
++
++ break;
++ }
++ case MimeFilter::AudioFiles:
++ {
++ if (info.category() != DatabaseItem::Audio)
++ {
++ match = false;
++ }
++
++ break;
++ }
++ case MimeFilter::RasterFiles:
++ {
++ if (info.format() != QLatin1String("PSD") && // Adobe Photoshop Document
++ info.format() != QLatin1String("PSB") && // Adobe Photoshop Big
++ info.format() != QLatin1String("XCF") && // Gimp
++ info.format() != QLatin1String("KRA") && // Krita
++ info.format() != QLatin1String("ORA") // Open Raster
++ )
++ {
++ match = false;
++ }
++
++ break;
++ }
++ default:
++ {
++ // All Files: do nothing...
++ break;
++ }
++ }
++
++ //-- Filter by geolocation ----------------------------------------------------
++
++ if (m_geolocationCondition!=GeolocationNoFilter)
++ {
++ if (m_geolocationCondition==GeolocationNoCoordinates)
++ {
++ if (info.hasCoordinates())
++ {
++ match = false;
++ }
++ }
++ else if (m_geolocationCondition==GeolocationHasCoordinates)
++ {
++ if (!info.hasCoordinates())
++ {
++ match = false;
++ }
++ }
++ }
++
++ //-- Filter by text -----------------------------------------------------------
++
++ if (!m_textFilterSettings.text.isEmpty())
++ {
++ bool textMatch = false;
++
++ // Image name
++ if (m_textFilterSettings.textFields & SearchTextFilterSettings::ImageName &&
++ info.name().contains(m_textFilterSettings.text, m_textFilterSettings.caseSensitive))
++ {
++ textMatch = true;
++ }
++
++ // Image title
++ if (m_textFilterSettings.textFields & SearchTextFilterSettings::ImageTitle &&
++ info.title().contains(m_textFilterSettings.text, m_textFilterSettings.caseSensitive))
++ {
++ textMatch = true;
++ }
++
++ // Image comment
++ if (m_textFilterSettings.textFields & SearchTextFilterSettings::ImageComment &&
++ info.comment().contains(m_textFilterSettings.text, m_textFilterSettings.caseSensitive))
++ {
++ textMatch = true;
++ }
++
++ // Tag names
++ foreach(int id, info.tagIds())
++ {
++ if (m_textFilterSettings.textFields & SearchTextFilterSettings::TagName &&
++ m_tagNameHash.value(id).contains(m_textFilterSettings.text, m_textFilterSettings.caseSensitive))
++ {
++ textMatch = true;
++ }
++ }
++
++ // Album names
++ if (m_textFilterSettings.textFields & SearchTextFilterSettings::AlbumName &&
++ m_albumNameHash.value(info.albumId()).contains(m_textFilterSettings.text, m_textFilterSettings.caseSensitive))
++ {
++ textMatch = true;
++ }
++
++ // Image Aspect Ratio
++ if (m_textFilterSettings.textFields & SearchTextFilterSettings::ImageAspectRatio)
++ {
++ QRegExp expRatio (QLatin1String("^\\d+:\\d+$"));
++ QRegExp expFloat (QLatin1String("^\\d+(.\\d+)?$"));
++
++ if (expRatio.indexIn(m_textFilterSettings.text) > -1 && m_textFilterSettings.text.contains(QRegExp(QLatin1String(":\\d+"))))
++ {
++ QString trimmedTextFilterSettingsText = m_textFilterSettings.text;
++ QStringList numberStringList = trimmedTextFilterSettingsText.split(QLatin1String(":"), QString::SkipEmptyParts);
++
++ if (numberStringList.length() == 2)
++ {
++ QString numString = (QString)numberStringList.at(0), denomString = (QString)numberStringList.at(1);
++ bool canConverseNum = false;
++ bool canConverseDenom = false;
++ int num = numString.toInt(&canConverseNum, 10), denom = denomString.toInt(&canConverseDenom, 10);
++
++ if (canConverseNum && canConverseDenom)
++ {
++ if (fabs(info.aspectRatio() - (double)num / denom) < 0.1)
++ textMatch = true;
++ }
++ }
++ }
++ else if (expFloat.indexIn(m_textFilterSettings.text) > -1)
++ {
++ QString trimmedTextFilterSettingsText = m_textFilterSettings.text;
++ bool canConverse = false;
++ double ratio = trimmedTextFilterSettingsText.toDouble(&canConverse);
++
++ if (canConverse)
++ {
++ if (fabs(info.aspectRatio() - ratio) < 0.1)
++ textMatch = true;
++ }
++ }
++ }
++
++ // Image Pixel Size
++ // See bug #341053 for details.
++
++ if (m_textFilterSettings.textFields & SearchTextFilterSettings::ImagePixelSize)
++ {
++ QSize size = info.dimensions();
++ int pixelSize = size.height()*size.width();
++ QString text = m_textFilterSettings.text;
++
++ if(text.contains(QRegExp(QLatin1String("^>\\d{1,15}$"))) && pixelSize > (text.remove(0,1)).toInt())
++ {
++ textMatch = true;
++ }
++ else if(text.contains(QRegExp(QLatin1String("^<\\d{1,15}$"))) && pixelSize < (text.remove(0,1)).toInt())
++ {
++ textMatch = true;
++ }
++ else if(text.contains(QRegExp(QLatin1String("^\\d+$"))) && pixelSize == text.toInt())
++ {
++ textMatch = true;
++ }
++ }
++
++ match &= textMatch;
++
++ if (foundText)
++ {
++ *foundText = textMatch;
++ }
++ }
++
++ // -- filter by URL-whitelists ------------------------------------------------
++ // NOTE: whitelists are always AND for now.
++
++ if (match)
++ {
++ const QUrl url = info.fileUrl();
++
++ for (QHash<QString, QList<QUrl>>::const_iterator it = m_urlWhitelists.constBegin();
++ it!=m_urlWhitelists.constEnd(); ++it)
++ {
++ match = it->contains(url);
++
++ if (!match)
++ {
++ break;
++ }
++ }
++ }
++
++ if (match)
++ {
++ const qlonglong id = info.id();
++
++ for (QHash<QString, QList<qlonglong> >::const_iterator it = m_idWhitelists.constBegin();
++ it!=m_idWhitelists.constEnd(); ++it)
++ {
++ match = it->contains(id);
++
++ if (!match)
++ {
++ break;
++ }
++ }
++ }
++
++ return match;
++}
++
++// -------------------------------------------------------------------------------------------------
++
++VersionImageFilterSettings::VersionImageFilterSettings()
++{
++ m_includeTagFilter = 0;
++ m_exceptionTagFilter = 0;
++}
++
++VersionImageFilterSettings::VersionImageFilterSettings(const VersionManagerSettings& settings)
++{
++ setVersionManagerSettings(settings);
++}
++
++bool VersionImageFilterSettings::operator==(const VersionImageFilterSettings& other) const
++{
++ return m_excludeTagFilter == other.m_excludeTagFilter &&
++ m_exceptionLists == other.m_exceptionLists;
++}
++
++bool VersionImageFilterSettings::matches(const ImageInfo& info) const
++{
++ if (!isFiltering())
++ {
++ return true;
++ }
++
++ const qlonglong id = info.id();
++
++ for (QHash<QString, QList<qlonglong> >::const_iterator it = m_exceptionLists.constBegin();
++ it != m_exceptionLists.constEnd(); ++it)
++ {
++ if (it->contains(id))
++ {
++ return true;
++ }
++ }
++
++ bool match = true;
++ QList<int> tagIds = info.tagIds();
++
++ if (!tagIds.contains(m_includeTagFilter))
++ {
++ for (QList<int>::const_iterator it = m_excludeTagFilter.begin();
++ it != m_excludeTagFilter.end(); ++it)
++ {
++ if (tagIds.contains(*it))
++ {
++ match = false;
++ break;
++ }
++ }
++ }
++
++ if (!match)
++ {
++ if (tagIds.contains(m_exceptionTagFilter))
++ {
++ match = true;
++ }
++ }
++
++ return match;
++}
++
++bool VersionImageFilterSettings::isHiddenBySettings(const ImageInfo& info) const
++{
++ QList<int> tagIds = info.tagIds();
++
++ foreach(int tagId, m_excludeTagFilter)
++ {
++ if (tagIds.contains(tagId))
++ {
++ return true;
++ }
++ }
++
++ return false;
++}
++
++bool VersionImageFilterSettings::isExemptedBySettings(const ImageInfo& info) const
++{
++ return info.tagIds().contains(m_exceptionTagFilter);
++}
++
++void VersionImageFilterSettings::setVersionManagerSettings(const VersionManagerSettings& settings)
++{
++ m_excludeTagFilter.clear();
++
++ if (!settings.enabled)
++ {
++ return;
++ }
++
++ if (!(settings.showInViewFlags & VersionManagerSettings::ShowOriginal))
++ {
++ m_excludeTagFilter << TagsCache::instance()->getOrCreateInternalTag(InternalTagName::originalVersion());
++ }
++
++ if (!(settings.showInViewFlags & VersionManagerSettings::ShowIntermediates))
++ {
++ m_excludeTagFilter << TagsCache::instance()->getOrCreateInternalTag(InternalTagName::intermediateVersion());
++ }
++
++ m_includeTagFilter = TagsCache::instance()->getOrCreateInternalTag(InternalTagName::currentVersion());
++ m_exceptionTagFilter = TagsCache::instance()->getOrCreateInternalTag(InternalTagName::versionAlwaysVisible());
++}
++
++void VersionImageFilterSettings::setExceptionList(const QList<qlonglong>& idList, const QString& id)
++{
++ if (idList.isEmpty())
++ {
++ m_exceptionLists.remove(id);
++ }
++ else
++ {
++ m_exceptionLists.insert(id, idList);
++ }
++}
++
++bool VersionImageFilterSettings::isFiltering() const
++{
++ return !m_excludeTagFilter.isEmpty();
++}
++
++bool VersionImageFilterSettings::isFilteringByTags() const
++{
++ return isFiltering();
++}
++
++// -------------------------------------------------------------------------------------------------
++
++GroupImageFilterSettings::GroupImageFilterSettings()
++ : m_allOpen(false)
++{
++}
++
++bool GroupImageFilterSettings::operator==(const GroupImageFilterSettings& other) const
++{
++ return (m_allOpen == other.m_allOpen &&
++ m_openGroups == other.m_openGroups);
++}
++
++bool GroupImageFilterSettings::matches(const ImageInfo& info) const
++{
++ if (m_allOpen)
++ {
++ return true;
++ }
++
++ if (info.isGrouped())
++ {
++ return m_openGroups.contains(info.groupImage().id());
++ }
++ return true;
++}
++
++void GroupImageFilterSettings::setOpen(qlonglong group, bool open)
++{
++ if (open)
++ {
++ m_openGroups << group;
++ }
++ else
++ {
++ m_openGroups.remove(group);
++ }
++}
++
++bool GroupImageFilterSettings::isOpen(qlonglong group) const
++{
++ return m_openGroups.contains(group);
++}
++
++void GroupImageFilterSettings::setAllOpen(bool open)
++{
++ m_allOpen = open;
++}
++
++bool GroupImageFilterSettings::isAllOpen() const
++{
++ return m_allOpen;
++}
++
++bool GroupImageFilterSettings::isFiltering() const
++{
++ return !m_allOpen;
++}
++
++DatabaseFields::Set GroupImageFilterSettings::watchFlags() const
++{
++ return DatabaseFields::ImageRelations;
++}
++
++} // namespace Digikam
+diff --git a/libs/database/models/imagefiltersettings.h b/libs/database/models/imagefiltersettings.h
+new file mode 100644
+index 0000000..0e7beae
+--- /dev/null
++++ b/libs/database/models/imagefiltersettings.h
+@@ -0,0 +1,349 @@
++/* ============================================================
++ *
++ * This file is a part of digiKam project
++ * http://www.digikam.org
++ *
++ * Date : 2009-03-05
++ * Description : Filter values for use with ImageFilterModel
++ *
++ * Copyright (C) 2009-2011 by Marcel Wiesweg <marcel dot wiesweg at gmx dot de>
++ * Copyright (C) 2011-2017 by Gilles Caulier <caulier dot gilles at gmail dot com>
++ * Copyright (C) 2010 by Andi Clemens <andi dot clemens at gmail dot com>
++ * Copyright (C) 2011 by Michael G. Hansen <mike at mghansen dot de>
++ * Copyright (C) 2014 by Mohamed Anwer <m dot anwer at gmx dot com>
++ *
++ * This program is free software; you can redistribute it
++ * and/or modify it under the terms of the GNU General
++ * Public License as published by the Free Software Foundation;
++ * either version 2, or (at your option)
++ * any later version.
++ *
++ * This program is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++ * GNU General Public License for more details.
++ *
++ * ============================================================ */
++
++#ifndef IMAGEFILTERSETTINGS_H
++#define IMAGEFILTERSETTINGS_H
++
++// Qt includes
++
++#include <QHash>
++#include <QList>
++#include <QMap>
++#include <QString>
++#include <QSet>
++#include <QUrl>
++
++// Local includes
++
++#include "searchtextbar.h"
++#include "mimefilter.h"
++#include "digikam_export.h"
++
++namespace Digikam
++{
++
++class ImageInfo;
++class VersionManagerSettings;
++
++namespace DatabaseFields
++{
++ class Set;
++}
++
++// ---------------------------------------------------------------------------------------
++
++class DIGIKAM_DATABASE_EXPORT SearchTextFilterSettings : public SearchTextSettings
++{
++
++public:
++
++ enum TextFilterFields
++ {
++ None = 0x00,
++ ImageName = 0x01,
++ ImageTitle = 0x02,
++ ImageComment = 0x04,
++ TagName = 0x08,
++ AlbumName = 0x10,
++ ImageAspectRatio = 0x20,
++ ImagePixelSize = 0x40,
++ All = ImageName | ImageTitle | ImageComment | TagName | AlbumName | ImageAspectRatio | ImagePixelSize
++ };
++
++public:
++
++ SearchTextFilterSettings()
++ {
++ textFields = None;
++ }
++
++ explicit SearchTextFilterSettings(const SearchTextSettings& settings)
++ {
++ caseSensitive = settings.caseSensitive;
++ text = settings.text;
++ textFields = None;
++ }
++
++ TextFilterFields textFields;
++};
++
++// ---------------------------------------------------------------------------------------
++
++class DIGIKAM_DATABASE_EXPORT ImageFilterSettings
++{
++public:
++
++ ImageFilterSettings();
++
++ /**
++ * Returns true if the given ImageInfo matches the filter criteria.
++ * Optionally, foundText is set to true if it matched by text search.
++ */
++ bool matches(const ImageInfo& info, bool* const foundText = 0) const;
++
++public:
++
++ /// --- Tags filter ---
++
++ /// Possible logical matching condition used to sort tags id.
++ enum MatchingCondition
++ {
++ OrCondition,
++ AndCondition
++ };
++
++ void setTagFilter(const QList<int>& includedTags,
++ const QList<int>& excludedTags,
++ MatchingCondition matchingCond,
++ bool showUnTagged,
++ const QList<int>& clTagIds,
++ const QList<int>& plTagIds);
++
++public:
++
++ /// --- Rating filter ---
++
++ /// Possible conditions used to filter rating: >=, =, <=
++ enum RatingCondition
++ {
++ GreaterEqualCondition,
++ EqualCondition,
++ LessEqualCondition
++ };
++
++ void setRatingFilter(int rating, RatingCondition ratingCond, bool isUnratedExcluded);
++
++public:
++
++ /// --- Date filter ---
++ void setDayFilter(const QList<QDateTime>& days);
++
++public:
++
++ /// --- Text filter ---
++ void setTextFilter(const SearchTextFilterSettings& settings);
++ void setTagNames(const QHash<int, QString>& tagNameHash);
++ void setAlbumNames(const QHash<int, QString>& albumNameHash);
++
++public:
++
++ /// --- Mime filter ---
++ void setMimeTypeFilter(int mimeTypeFilter);
++
++public:
++
++ /// --- Geolocation filter
++ enum GeolocationCondition
++ {
++ GeolocationNoFilter = 0,
++ GeolocationNoCoordinates = 1 << 1,
++ GeolocationHasCoordinates = 1 << 2
++ };
++
++ void setGeolocationFilter(const GeolocationCondition& condition);
++
++public:
++
++ /// Returns if the day is a filter criteria
++ bool isFilteringByDay() const;
++
++ /// Returns if the type mime is a filter criteria
++ bool isFilteringByTypeMime() const;
++
++ /// Returns whether geolocation is a filter criteria
++ bool isFilteringByGeolocation() const;
++
++ /// Returns if the rating is a filter criteria
++ bool isFilteringByRating() const;
++
++ /// Returns if the pick labels is a filter criteria
++ bool isFilteringByPickLabels() const;
++
++ /// Returns if the color labels is a filter criteria
++ bool isFilteringByColorLabels() const;
++
++ /// Returns if the tag is a filter criteria
++ bool isFilteringByTags() const;
++
++ /// Returns if the text (including comment) is a filter criteria
++ bool isFilteringByText() const;
++
++ /// Returns if images will be filtered by these criteria at all
++ bool isFiltering() const;
++
++public:
++
++ /// --- URL whitelist filter
++ void setUrlWhitelist(const QList<QUrl>& urlList, const QString& id);
++
++public:
++
++ /// --- ID whitelist filter
++ void setIdWhitelist(const QList<qlonglong>& idList, const QString& id);
++
++public:
++
++ /// --- Change notification ---
++
++ /** Returns database fields a change in which would affect the current filtering.
++ * To find out if an image tag change affects filtering, test isFilteringByTags().
++ * The text filter will also be affected by changes in tags and album names.
++ */
++ DatabaseFields::Set watchFlags() const;
++
++private:
++
++ /**
++ * @brief Returns whether some internal filtering (whitelist by id or URL) or normal filtering is going on
++ */
++ bool isFilteringInternally() const;
++
++private:
++
++ /// --- Tags filter ---
++ bool m_untaggedFilter;
++ QList<int> m_includeTagFilter;
++ QList<int> m_excludeTagFilter;
++ MatchingCondition m_matchingCond;
++ QList<int> m_colorLabelTagFilter;
++ QList<int> m_pickLabelTagFilter;
++
++ /// --- Rating filter ---
++ int m_ratingFilter;
++ RatingCondition m_ratingCond;
++ bool m_isUnratedExcluded;
++
++ /// --- Date filter ---
++ QMap<QDateTime, bool> m_dayFilter;
++
++ /// --- Text filter ---
++ SearchTextFilterSettings m_textFilterSettings;
++
++ /// Helpers for text search: Set these if you want to search album or tag names with text search
++ QHash<int, QString> m_tagNameHash;
++ QHash<int, QString> m_albumNameHash;
++
++ /// --- Mime filter ---
++ MimeFilter::TypeMimeFilter m_mimeTypeFilter;
++
++ /// --- Geolocation filter
++ GeolocationCondition m_geolocationCondition;
++
++ /// --- URL whitelist filter
++ QHash<QString,QList<QUrl>> m_urlWhitelists;
++
++ /// --- ID whitelist filter
++ QHash<QString,QList<qlonglong> > m_idWhitelists;
++};
++
++// ---------------------------------------------------------------------------------------
++
++class DIGIKAM_DATABASE_EXPORT VersionImageFilterSettings
++{
++public:
++
++ VersionImageFilterSettings();
++ explicit VersionImageFilterSettings(const VersionManagerSettings& settings);
++
++ bool operator==(const VersionImageFilterSettings& other) const;
++
++ /**
++ * Returns true if the given ImageInfo matches the filter criteria.
++ */
++ bool matches(const ImageInfo& info) const;
++
++ bool isHiddenBySettings(const ImageInfo& info) const;
++ bool isExemptedBySettings(const ImageInfo& info) const;
++
++ /// --- Tags filter ---
++
++ void setVersionManagerSettings(const VersionManagerSettings& settings);
++
++ /**
++ * Add list with exceptions: These images will be exempted from filtering by this filter
++ */
++ void setExceptionList(const QList<qlonglong>& idlist, const QString& id);
++
++ /// Returns if images will be filtered by these criteria at all
++ bool isFiltering() const;
++
++ /// Returns if the tag is a filter criteria
++ bool isFilteringByTags() const;
++
++ /// DatabaseFields::Set watchFlags() const: Would return 0
++
++protected:
++
++ QList<int> m_excludeTagFilter;
++ int m_includeTagFilter;
++ int m_exceptionTagFilter;
++ QHash<QString,QList<qlonglong> > m_exceptionLists;
++};
++
++// ---------------------------------------------------------------------------------------
++
++class DIGIKAM_DATABASE_EXPORT GroupImageFilterSettings
++{
++public:
++
++ GroupImageFilterSettings();
++
++ bool operator==(const GroupImageFilterSettings& other) const;
++
++ /**
++ * Returns true if the given ImageInfo matches the filter criteria.
++ */
++ bool matches(const ImageInfo& info) const;
++
++ /**
++ * Open or close a group.
++ */
++ void setOpen(qlonglong group, bool open);
++ bool isOpen(qlonglong group) const;
++
++ /**
++ * Open all groups
++ */
++ void setAllOpen(bool open);
++ bool isAllOpen() const;
++
++ /// Returns if images will be filtered by these criteria at all
++ bool isFiltering() const;
++
++ DatabaseFields::Set watchFlags() const;
++
++protected:
++
++ bool m_allOpen;
++ QSet<qlonglong> m_openGroups;
++};
++
++} // namespace Digikam
++
++Q_DECLARE_METATYPE(Digikam::ImageFilterSettings::GeolocationCondition)
++
++#endif // IMAGEFILTERSETTINGS_H
+diff --git a/libs/database/models/imagelistmodel.cpp b/libs/database/models/imagelistmodel.cpp
+new file mode 100644
+index 0000000..fafce34
+--- /dev/null
++++ b/libs/database/models/imagelistmodel.cpp
+@@ -0,0 +1,70 @@
++/* ============================================================
++ *
++ * This file is a part of digiKam project
++ * http://www.digikam.org
++ *
++ * Date : 2010-12-06
++ * Description : An image model based on a static list
++ *
++ * Copyright (C) 2010-2011 by Marcel Wiesweg <marcel dot wiesweg at gmx dot de>
++ *
++ * This program is free software; you can redistribute it
++ * and/or modify it under the terms of the GNU General
++ * Public License as published by the Free Software Foundation;
++ * either version 2, or (at your option)
++ * any later version.
++ *
++ * This program is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++ * GNU General Public License for more details.
++ *
++ * ============================================================ */
++
++#include "imagelistmodel.h"
++
++// Local includes
++
++#include "digikam_debug.h"
++#include "coredbaccess.h"
++#include "coredbchangesets.h"
++#include "coredbwatch.h"
++#include "imageinfo.h"
++#include "imageinfolist.h"
++
++namespace Digikam
++{
++
++ImageListModel::ImageListModel(QObject* parent)
++ : ImageThumbnailModel(parent)
++{
++ connect(CoreDbAccess::databaseWatch(), SIGNAL(collectionImageChange(CollectionImageChangeset)),
++ this, SLOT(slotCollectionImageChange(CollectionImageChangeset)));
++}
++
++ImageListModel::~ImageListModel()
++{
++}
++
++void ImageListModel::slotCollectionImageChange(const CollectionImageChangeset& changeset)
++{
++ if (isEmpty())
++ {
++ return;
++ }
++
++ switch (changeset.operation())
++ {
++ case CollectionImageChangeset::Added:
++ break;
++ case CollectionImageChangeset::Removed:
++ case CollectionImageChangeset::RemovedAll:
++ removeImageInfos(ImageInfoList(changeset.ids()));
++ break;
++
++ default:
++ break;
++ }
++}
++
++} // namespace Digikam
+diff --git a/libs/database/models/imagelistmodel.h b/libs/database/models/imagelistmodel.h
+new file mode 100644
+index 0000000..a225b1b
+--- /dev/null
++++ b/libs/database/models/imagelistmodel.h
+@@ -0,0 +1,63 @@
++/* ============================================================
++ *
++ * This file is a part of digiKam project
++ * http://www.digikam.org
++ *
++ * Date : 2010-12-06
++ * Description : An image model based on a static list
++ *
++ * Copyright (C) 2010-2011 by Marcel Wiesweg <marcel dot wiesweg at gmx dot de>
++ *
++ * This program is free software; you can redistribute it
++ * and/or modify it under the terms of the GNU General
++ * Public License as published by the Free Software Foundation;
++ * either version 2, or (at your option)
++ * any later version.
++ *
++ * This program is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++ * GNU General Public License for more details.
++ *
++ * ============================================================ */
++
++#ifndef IMAGELISTMODEL_H
++#define IMAGELISTMODEL_H
++
++// Local includes
++
++#include "imagethumbnailmodel.h"
++#include "digikam_export.h"
++
++namespace Digikam
++{
++
++class ImageChangeset;
++class CollectionImageChangeset;
++
++class DIGIKAM_DATABASE_EXPORT ImageListModel : public ImageThumbnailModel
++{
++ Q_OBJECT
++
++public:
++
++ explicit ImageListModel(QObject* parent = 0);
++ ~ImageListModel();
++
++ // NOTE: necessary methods to add and remove ImageInfos to the model are inherited from ImageModel
++
++Q_SIGNALS:
++
++ /**
++ * Emitted when images are removed from the model because they are removed in the database
++ */
++ void imageInfosRemoved(const QList<ImageInfo>& infos);
++
++protected Q_SLOTS:
++
++ void slotCollectionImageChange(const CollectionImageChangeset& changeset);
++};
++
++} // namespace Digikam
++
++#endif // IMAGELISTMODEL_H
+diff --git a/libs/database/models/imagemodel.cpp b/libs/database/models/imagemodel.cpp
+new file mode 100644
+index 0000000..41b43cf
+--- /dev/null
++++ b/libs/database/models/imagemodel.cpp
+@@ -0,0 +1,1368 @@
++/* ============================================================
++ *
++ * This file is a part of digiKam project
++ * http://www.digikam.org
++ *
++ * Date : 2009-03-05
++ * Description : Qt item model for database entries
++ *
++ * Copyright (C) 2009-2011 by Marcel Wiesweg <marcel dot wiesweg at gmx dot de>
++ *
++ * This program is free software; you can redistribute it
++ * and/or modify it under the terms of the GNU General
++ * Public License as published by the Free Software Foundation;
++ * either version 2, or (at your option)
++ * any later version.
++ *
++ * This program is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++ * GNU General Public License for more details.
++ *
++ * ============================================================ */
++
++#include "imagemodel.h"
++
++// Qt includes
++
++#include <QHash>
++#include <QItemSelection>
++
++// Local includes
++
++#include "digikam_debug.h"
++#include "coredbchangesets.h"
++#include "coredbfields.h"
++#include "coredbwatch.h"
++#include "imageinfo.h"
++#include "imageinfolist.h"
++#include "abstractitemdragdrophandler.h"
++
++namespace Digikam
++{
++
++class ImageModel::Private
++{
++public:
++
++ Private()
++ {
++ preprocessor = 0;
++ keepFilePathCache = false;
++ sendRemovalSignals = false;
++ incrementalUpdater = 0;
++ refreshing = false;
++ reAdding = false;
++ incrementalRefreshRequested = false;
++ }
++
++ ImageInfoList infos;
++ QList<QVariant> extraValues;
++ QHash<qlonglong, int> idHash;
++
++ bool keepFilePathCache;
++ QHash<QString, qlonglong> filePathHash;
++
++ bool sendRemovalSignals;
++
++ QObject* preprocessor;
++ bool refreshing;
++ bool reAdding;
++ bool incrementalRefreshRequested;
++
++ DatabaseFields::Set watchFlags;
++
++ class ImageModelIncrementalUpdater* incrementalUpdater;
++
++ ImageInfoList pendingInfos;
++ QList<QVariant> pendingExtraValues;
++
++ inline bool isValid(const QModelIndex& index)
++ {
++ if (!index.isValid())
++ {
++ return false;
++ }
++
++ if (index.row() < 0 || index.row() >= infos.size())
++ {
++ qCDebug(DIGIKAM_GENERAL_LOG) << "Invalid index" << index;
++ return false;
++ }
++
++ return true;
++ }
++ inline bool extraValueValid(const QModelIndex& index)
++ {
++ // we assume isValid() being called before, no duplicate checks
++ if (index.row() >= extraValues.size())
++ {
++ qCDebug(DIGIKAM_GENERAL_LOG) << "Invalid index for extraData" << index;
++ return false;
++ }
++
++ return true;
++ }
++};
++
++typedef QPair<int, int> IntPair; // to make foreach macro happy
++typedef QList<IntPair> IntPairList;
++
++class ImageModelIncrementalUpdater
++{
++public:
++
++ explicit ImageModelIncrementalUpdater(ImageModel::Private* d);
++
++ void appendInfos(const QList<ImageInfo>& infos, const QList<QVariant>& extraValues);
++ void aboutToBeRemovedInModel(const IntPairList& aboutToBeRemoved);
++ QList<IntPair> oldIndexes();
++
++ static QList<IntPair> toContiguousPairs(const QList<int>& ids);
++
++public:
++
++ QHash<qlonglong, int> oldIds;
++ QList<QVariant> oldExtraValues;
++ QList<ImageInfo> newInfos;
++ QList<QVariant> newExtraValues;
++ QList<IntPairList> modelRemovals;
++};
++
++ImageModel::ImageModel(QObject* parent)
++ : QAbstractListModel(parent),
++ d(new Private)
++{
++ connect(CoreDbAccess::databaseWatch(), SIGNAL(imageChange(ImageChangeset)),
++ this, SLOT(slotImageChange(ImageChangeset)));
++
++ connect(CoreDbAccess::databaseWatch(), SIGNAL(imageTagChange(ImageTagChangeset)),
++ this, SLOT(slotImageTagChange(ImageTagChangeset)));
++}
++
++ImageModel::~ImageModel()
++{
++ delete d->incrementalUpdater;
++ delete d;
++}
++
++// ------------ Access methods -------------
++
++void ImageModel::setKeepsFilePathCache(bool keepCache)
++{
++ d->keepFilePathCache = keepCache;
++}
++
++bool ImageModel::keepsFilePathCache() const
++{
++ return d->keepFilePathCache;
++}
++
++bool ImageModel::isEmpty() const
++{
++ return d->infos.isEmpty();
++}
++
++void ImageModel::setWatchFlags(const DatabaseFields::Set& set)
++{
++ d->watchFlags = set;
++}
++
++ImageInfo ImageModel::imageInfo(const QModelIndex& index) const
++{
++ if (!d->isValid(index))
++ {
++ return ImageInfo();
++ }
++
++ return d->infos.at(index.row());
++}
++
++ImageInfo& ImageModel::imageInfoRef(const QModelIndex& index) const
++{
++ return d->infos[index.row()];
++}
++
++qlonglong ImageModel::imageId(const QModelIndex& index) const
++{
++ if (!d->isValid(index))
++ {
++ return 0;
++ }
++
++ return d->infos.at(index.row()).id();
++}
++
++QList<ImageInfo> ImageModel::imageInfos(const QList<QModelIndex>& indexes) const
++{
++ QList<ImageInfo> infos;
++
++ foreach(const QModelIndex& index, indexes)
++ {
++ infos << imageInfo(index);
++ }
++
++ return infos;
++}
++
++QList<qlonglong> ImageModel::imageIds(const QList<QModelIndex>& indexes) const
++{
++ QList<qlonglong> ids;
++
++ foreach(const QModelIndex& index, indexes)
++ {
++ ids << imageId(index);
++ }
++
++ return ids;
++}
++
++ImageInfo ImageModel::imageInfo(int row) const
++{
++ if (row >= d->infos.size())
++ {
++ return ImageInfo();
++ }
++
++ return d->infos.at(row);
++}
++
++ImageInfo& ImageModel::imageInfoRef(int row) const
++{
++ return d->infos[row];
++}
++
++qlonglong ImageModel::imageId(int row) const
++{
++ if (row < 0 || row >= d->infos.size())
++ {
++ return -1;
++ }
++
++ return d->infos.at(row).id();
++}
++
++QModelIndex ImageModel::indexForImageInfo(const ImageInfo& info) const
++{
++ return indexForImageId(info.id());
++}
++
++QModelIndex ImageModel::indexForImageInfo(const ImageInfo& info, const QVariant& extraValue) const
++{
++ return indexForImageId(info.id(), extraValue);
++}
++
++QList<QModelIndex> ImageModel::indexesForImageInfo(const ImageInfo& info) const
++{
++ return indexesForImageId(info.id());
++}
++
++QModelIndex ImageModel::indexForImageId(qlonglong id) const
++{
++ int index = d->idHash.value(id, -1);
++
++ if (index != -1)
++ {
++ return createIndex(index, 0);
++ }
++
++ return QModelIndex();
++}
++
++QModelIndex ImageModel::indexForImageId(qlonglong id, const QVariant& extraValue) const
++{
++ if (d->extraValues.isEmpty())
++ return indexForImageId(id);
++
++ QHash<qlonglong, int>::const_iterator it;
++
++ for (it = d->idHash.constFind(id); it != d->idHash.constEnd() && it.key() == id; ++it)
++ {
++ if (d->extraValues.at(it.value()) == extraValue)
++ return createIndex(it.value(), 0);
++ }
++
++ return QModelIndex();
++}
++
++QList<QModelIndex> ImageModel::indexesForImageId(qlonglong id) const
++{
++ QList<QModelIndex> indexes;
++ QHash<qlonglong, int>::const_iterator it;
++
++ for (it = d->idHash.constFind(id); it != d->idHash.constEnd() && it.key() == id; ++it)
++ {
++ indexes << createIndex(it.value(), 0);
++ }
++
++ return indexes;
++}
++
++int ImageModel::numberOfIndexesForImageInfo(const ImageInfo& info) const
++{
++ return numberOfIndexesForImageId(info.id());
++}
++
++int ImageModel::numberOfIndexesForImageId(qlonglong id) const
++{
++ if (d->extraValues.isEmpty())
++ {
++ return 0;
++ }
++
++ int count = 0;
++ QHash<qlonglong,int>::const_iterator it;
++
++ for (it = d->idHash.constFind(id); it != d->idHash.constEnd() && it.key() == id; ++it)
++ {
++ ++count;
++ }
++
++ return count;
++}
++
++// static method
++ImageInfo ImageModel::retrieveImageInfo(const QModelIndex& index)
++{
++ if (!index.isValid())
++ {
++ return ImageInfo();
++ }
++
++ ImageModel* const model = index.data(ImageModelPointerRole).value<ImageModel*>();
++ int row = index.data(ImageModelInternalId).toInt();
++
++ if (!model)
++ {
++ return ImageInfo();
++ }
++
++ return model->imageInfo(row);
++}
++
++// static method
++qlonglong ImageModel::retrieveImageId(const QModelIndex& index)
++{
++ if (!index.isValid())
++ {
++ return 0;
++ }
++
++ ImageModel* const model = index.data(ImageModelPointerRole).value<ImageModel*>();
++ int row = index.data(ImageModelInternalId).toInt();
++
++ if (!model)
++ {
++ return 0;
++ }
++
++ return model->imageId(row);
++}
++
++QModelIndex ImageModel::indexForPath(const QString& filePath) const
++{
++ if (d->keepFilePathCache)
++ {
++ return indexForImageId(d->filePathHash.value(filePath));
++ }
++ else
++ {
++ const int size = d->infos.size();
++
++ for (int i=0; i<size; ++i)
++ {
++ if (d->infos.at(i).filePath() == filePath)
++ {
++ return createIndex(i, 0);
++ }
++ }
++ }
++
++ return QModelIndex();
++}
++
++QList<QModelIndex> ImageModel::indexesForPath(const QString& filePath) const
++{
++ if (d->keepFilePathCache)
++ {
++ return indexesForImageId(d->filePathHash.value(filePath));
++ }
++ else
++ {
++ QList<QModelIndex> indexes;
++ const int size = d->infos.size();
++
++ for (int i=0; i<size; ++i)
++ {
++ if (d->infos.at(i).filePath() == filePath)
++ {
++ indexes << createIndex(i, 0);
++ }
++ }
++
++ return indexes;
++ }
++}
++
++ImageInfo ImageModel::imageInfo(const QString& filePath) const
++{
++ if (d->keepFilePathCache)
++ {
++ qlonglong id = d->filePathHash.value(filePath);
++
++ if (id)
++ {
++ int index = d->idHash.value(id, -1);
++
++ if (index != -1)
++ {
++ return d->infos.at(index);
++ }
++ }
++ }
++ else
++ {
++ foreach(const ImageInfo& info, d->infos)
++ {
++ if (info.filePath() == filePath)
++ {
++ return info;
++ }
++ }
++ }
++
++ return ImageInfo();
++}
++
++QList<ImageInfo> ImageModel::imageInfos(const QString& filePath) const
++{
++ QList<ImageInfo> infos;
++
++ if (d->keepFilePathCache)
++ {
++ qlonglong id = d->filePathHash.value(filePath);
++
++ if (id)
++ {
++ foreach(int index, d->idHash.values(id))
++ {
++ infos << d->infos.at(index);
++ }
++ }
++ }
++ else
++ {
++ foreach(const ImageInfo& info, d->infos)
++ {
++ if (info.filePath() == filePath)
++ {
++ infos << info;
++ }
++ }
++ }
++
++ return infos;
++}
++
++void ImageModel::addImageInfo(const ImageInfo& info)
++{
++ addImageInfos(QList<ImageInfo>() << info, QList<QVariant>());
++}
++
++void ImageModel::addImageInfos(const QList<ImageInfo>& infos)
++{
++ addImageInfos(infos, QList<QVariant>());
++}
++
++void ImageModel::addImageInfos(const QList<ImageInfo>& infos, const QList<QVariant>& extraValues)
++{
++ if (infos.isEmpty())
++ {
++ return;
++ }
++
++ if (d->incrementalUpdater)
++ {
++ d->incrementalUpdater->appendInfos(infos, extraValues);
++ }
++ else
++ {
++ appendInfos(infos, extraValues);
++ }
++}
++
++void ImageModel::addImageInfoSynchronously(const ImageInfo& info)
++{
++ addImageInfosSynchronously(QList<ImageInfo>() << info, QList<QVariant>());
++}
++
++void ImageModel::addImageInfosSynchronously(const QList<ImageInfo>& infos)
++{
++ addImageInfos(infos, QList<QVariant>());
++}
++
++void ImageModel::addImageInfosSynchronously(const QList<ImageInfo>& infos, const QList<QVariant>& extraValues)
++{
++ if (infos.isEmpty())
++ {
++ return;
++ }
++
++ publiciseInfos(infos, extraValues);
++ emit processAdded(infos, extraValues);
++}
++
++void ImageModel::ensureHasImageInfo(const ImageInfo& info)
++{
++ ensureHasImageInfos(QList<ImageInfo>() << info, QList<QVariant>());
++}
++
++void ImageModel::ensureHasImageInfos(const QList<ImageInfo>& infos)
++{
++ ensureHasImageInfos(infos, QList<QVariant>());
++}
++
++void ImageModel::ensureHasImageInfos(const QList<ImageInfo>& infos, const QList<QVariant>& extraValues)
++{
++ if (extraValues.isEmpty())
++ {
++ if (!d->pendingExtraValues.isEmpty())
++ {
++ qCDebug(DIGIKAM_GENERAL_LOG) << "ExtraValue / No Extra Value mismatch. Ignoring added infos.";
++ return;
++ }
++ }
++ else
++ {
++ if (d->pendingInfos.size() != d->pendingExtraValues.size())
++ {
++ qCDebug(DIGIKAM_GENERAL_LOG) << "ExtraValue / No Extra Value mismatch. Ignoring added infos.";
++ return;
++ }
++ }
++
++ d->pendingInfos << infos;
++ d->pendingExtraValues << extraValues;
++ cleanSituationChecks();
++}
++
++void ImageModel::clearImageInfos()
++{
++ d->infos.clear();
++ d->extraValues.clear();
++ d->idHash.clear();
++ d->filePathHash.clear();
++ delete d->incrementalUpdater;
++ d->incrementalUpdater = 0;
++ d->pendingInfos.clear();
++ d->pendingExtraValues.clear();
++ d->refreshing = false;
++ d->reAdding = false;
++ d->incrementalRefreshRequested = false;
++
++ beginResetModel();
++ endResetModel();
++
++ imageInfosCleared();
++}
++
++void ImageModel::setImageInfos(const QList<ImageInfo>& infos)
++{
++ clearImageInfos();
++ addImageInfos(infos);
++}
++
++QList<ImageInfo> ImageModel::imageInfos() const
++{
++ return d->infos;
++}
++
++QList<qlonglong> ImageModel::imageIds() const
++{
++ return d->idHash.keys();
++}
++
++bool ImageModel::hasImage(qlonglong id) const
++{
++ return d->idHash.contains(id);
++}
++
++bool ImageModel::hasImage(const ImageInfo& info) const
++{
++ return d->idHash.contains(info.id());
++}
++
++bool ImageModel::hasImage(const ImageInfo& info, const QVariant& extraValue) const
++{
++ return hasImage(info.id(), extraValue);
++}
++
++bool ImageModel::hasImage(qlonglong id, const QVariant& extraValue) const
++{
++ if (d->extraValues.isEmpty())
++ return hasImage(id);
++
++ QHash<qlonglong, int>::const_iterator it;
++
++ for (it = d->idHash.constFind(id); it != d->idHash.constEnd() && it.key() == id; ++it)
++ {
++ if (d->extraValues.at(it.value()) == extraValue)
++ return true;
++ }
++
++ return false;;
++}
++
++QList<ImageInfo> ImageModel::uniqueImageInfos() const
++{
++ if (d->extraValues.isEmpty())
++ {
++ return d->infos;
++ }
++
++ QList<ImageInfo> uniqueInfos;
++ const int size = d->infos.size();
++
++ for (int i=0; i<size; ++i)
++ {
++ const ImageInfo& info = d->infos.at(i);
++
++ if (d->idHash.value(info.id()) == i)
++ {
++ uniqueInfos << info;
++ }
++ }
++
++ return uniqueInfos;
++}
++
++void ImageModel::emitDataChangedForAll()
++{
++ if (d->infos.isEmpty())
++ {
++ return;
++ }
++
++ QModelIndex first = createIndex(0, 0);
++ QModelIndex last = createIndex(d->infos.size() - 1, 0);
++ emit dataChanged(first, last);
++}
++
++void ImageModel::emitDataChangedForSelection(const QItemSelection& selection)
++{
++ if (!selection.isEmpty())
++ {
++ foreach(const QItemSelectionRange& range, selection)
++ {
++ emit dataChanged(range.topLeft(), range.bottomRight());
++ }
++ }
++}
++
++void ImageModel::ensureHasGroupedImages(const ImageInfo& groupLeader)
++{
++ ensureHasImageInfos(groupLeader.groupedImages());
++}
++
++// ------------ Preprocessing -------------
++
++void ImageModel::setPreprocessor(QObject* preprocessor)
++{
++ unsetPreprocessor(d->preprocessor);
++ d->preprocessor = preprocessor;
++}
++
++void ImageModel::unsetPreprocessor(QObject* preprocessor)
++{
++ if (preprocessor && d->preprocessor == preprocessor)
++ {
++ disconnect(this, SIGNAL(preprocess(QList<ImageInfo>,QList<QVariant>)), 0, 0);
++ disconnect(d->preprocessor, 0, this, SLOT(reAddImageInfos(QList<ImageInfo>,QList<QVariant>)));
++ disconnect(d->preprocessor, 0, this, SLOT(reAddingFinished()));
++ }
++}
++
++void ImageModel::appendInfos(const QList<ImageInfo>& infos, const QList<QVariant>& extraValues)
++{
++ if (infos.isEmpty())
++ {
++ return;
++ }
++
++ if (d->preprocessor)
++ {
++ d->reAdding = true;
++ emit preprocess(infos, extraValues);
++ }
++ else
++ {
++ publiciseInfos(infos, extraValues);
++ }
++}
++
++void ImageModel::appendInfosChecked(const QList<ImageInfo>& infos, const QList<QVariant>& extraValues)
++{
++ // This method does deduplication. It is private because in context of readding or refreshing it is of no use.
++
++ if (extraValues.isEmpty())
++ {
++ QList<ImageInfo> checkedInfos;
++
++ foreach (const ImageInfo& info, infos)
++ {
++ if (!hasImage(info))
++ {
++ checkedInfos << info;
++ }
++ }
++
++ appendInfos(checkedInfos, QList<QVariant>());
++ }
++ else
++ {
++ QList<ImageInfo> checkedInfos;
++ QList<QVariant> checkedExtraValues;
++ const int size = infos.size();
++
++ for (int i=0; i<size; i++)
++ {
++ if (!hasImage(infos[i], extraValues[i]))
++ {
++ checkedInfos << infos[i];
++ checkedExtraValues << extraValues[i];
++ }
++ }
++
++ appendInfos(checkedInfos, checkedExtraValues);
++ }
++}
++
++void ImageModel::reAddImageInfos(const QList<ImageInfo>& infos, const QList<QVariant>& extraValues)
++{
++ // addImageInfos -> appendInfos -> preprocessor -> reAddImageInfos
++ publiciseInfos(infos, extraValues);
++}
++
++void ImageModel::reAddingFinished()
++{
++ d->reAdding = false;
++ cleanSituationChecks();
++}
++
++void ImageModel::startRefresh()
++{
++ d->refreshing = true;
++}
++
++void ImageModel::finishRefresh()
++{
++ d->refreshing = false;
++ cleanSituationChecks();
++}
++
++bool ImageModel::isRefreshing() const
++{
++ return d->refreshing;
++}
++
++void ImageModel::cleanSituationChecks()
++{
++ // For starting an incremental refresh we want a clear situation:
++ // Any remaining batches from non-incremental refreshing subclasses have been received in appendInfos(),
++ // any batches sent to preprocessor for re-adding have been re-added.
++ if (d->refreshing || d->reAdding)
++ {
++ return;
++ }
++
++ if (!d->pendingInfos.isEmpty())
++ {
++ appendInfosChecked(d->pendingInfos, d->pendingExtraValues);
++ d->pendingInfos.clear();
++ d->pendingExtraValues.clear();
++ cleanSituationChecks();
++ return;
++ }
++
++ if (d->incrementalRefreshRequested)
++ {
++ d->incrementalRefreshRequested = false;
++ emit readyForIncrementalRefresh();
++ }
++ else
++ {
++ emit allRefreshingFinished();
++ }
++}
++
++void ImageModel::publiciseInfos(const QList<ImageInfo>& infos, const QList<QVariant>& extraValues)
++{
++ if (infos.isEmpty())
++ {
++ return;
++ }
++
++ Q_ASSERT(infos.size() == extraValues.size() || (extraValues.isEmpty() && d->extraValues.isEmpty()));
++
++ emit imageInfosAboutToBeAdded(infos);
++ const int firstNewIndex = d->infos.size();
++ const int lastNewIndex = d->infos.size() + infos.size() - 1;
++ beginInsertRows(QModelIndex(), firstNewIndex, lastNewIndex);
++ d->infos << infos;
++ d->extraValues << extraValues;
++
++ for (int i=firstNewIndex; i<=lastNewIndex; ++i)
++ {
++ const ImageInfo& info = d->infos.at(i);
++ qlonglong id = info.id();
++ d->idHash.insertMulti(id, i);
++
++ if (d->keepFilePathCache)
++ {
++ d->filePathHash[info.filePath()] = id;
++ }
++ }
++
++ endInsertRows();
++ emit imageInfosAdded(infos);
++}
++
++void ImageModel::requestIncrementalRefresh()
++{
++ if (d->reAdding)
++ {
++ d->incrementalRefreshRequested = true;
++ }
++ else
++ {
++ emit readyForIncrementalRefresh();
++ }
++}
++
++bool ImageModel::hasIncrementalRefreshPending() const
++{
++ return d->incrementalRefreshRequested;
++}
++
++void ImageModel::startIncrementalRefresh()
++{
++ delete d->incrementalUpdater;
++
++ d->incrementalUpdater = new ImageModelIncrementalUpdater(d);
++}
++
++void ImageModel::finishIncrementalRefresh()
++{
++ if (!d->incrementalUpdater)
++ {
++ return;
++ }
++
++ // remove old entries
++ QList<QPair<int, int> > pairs = d->incrementalUpdater->oldIndexes();
++ removeRowPairs(pairs);
++
++ // add new indexes
++ appendInfos(d->incrementalUpdater->newInfos, d->incrementalUpdater->newExtraValues);
++
++ delete d->incrementalUpdater;
++ d->incrementalUpdater = 0;
++}
++
++void ImageModel::removeIndex(const QModelIndex& index)
++{
++ removeIndexes(QList<QModelIndex>() << index);
++}
++
++void ImageModel::removeIndexes(const QList<QModelIndex>& indexes)
++{
++ QList<int> listIndexes;
++
++ foreach(const QModelIndex& index, indexes)
++ {
++ if (d->isValid(index))
++ {
++ listIndexes << index.row();
++ }
++ }
++
++ if (listIndexes.isEmpty())
++ {
++ return;
++ }
++
++ removeRowPairsWithCheck(ImageModelIncrementalUpdater::toContiguousPairs(listIndexes));
++}
++
++void ImageModel::removeImageInfo(const ImageInfo& info)
++{
++ removeImageInfos(QList<ImageInfo>() << info);
++}
++
++void ImageModel::removeImageInfos(const QList<ImageInfo>& infos)
++{
++ QList<int> listIndexes;
++
++ foreach(const ImageInfo& info, infos)
++ {
++ QModelIndex index = indexForImageId(info.id());
++
++ if (index.isValid())
++ {
++ listIndexes << index.row();
++ }
++ }
++ removeRowPairsWithCheck(ImageModelIncrementalUpdater::toContiguousPairs(listIndexes));
++}
++
++void ImageModel::removeImageInfos(const QList<ImageInfo>& infos, const QList<QVariant>& extraValues)
++{
++ if (extraValues.isEmpty())
++ {
++ removeImageInfos(infos);
++ return;
++ }
++
++ QList<int> listIndexes;
++
++ for (int i=0; i<infos.size(); ++i)
++ {
++ QModelIndex index = indexForImageId(infos.at(i).id(), extraValues.at(i));
++
++ if (index.isValid())
++ {
++ listIndexes << index.row();
++ }
++ }
++
++ removeRowPairsWithCheck(ImageModelIncrementalUpdater::toContiguousPairs(listIndexes));
++}
++
++void ImageModel::setSendRemovalSignals(bool send)
++{
++ d->sendRemovalSignals = send;
++}
++
++template <class List, typename T>
++static bool pairsContain(const List& list, T value)
++{
++ typename List::const_iterator middle;
++ typename List::const_iterator begin = list.begin();
++ typename List::const_iterator end = list.end();
++ int n = int(end - begin);
++ int half;
++
++ while (n > 0)
++ {
++ half = n >> 1;
++ middle = begin + half;
++
++ if (middle->first <= value && middle->second >= value)
++ {
++ return true;
++ }
++ else if (middle->second < value)
++ {
++ begin = middle + 1;
++ n -= half + 1;
++ }
++ else
++ {
++ n = half;
++ }
++ }
++
++ return false;
++}
++
++void ImageModel::removeRowPairsWithCheck(const QList<QPair<int, int> >& toRemove)
++{
++ if (d->incrementalUpdater)
++ {
++ d->incrementalUpdater->aboutToBeRemovedInModel(toRemove);
++ }
++
++ removeRowPairs(toRemove);
++}
++
++void ImageModel::removeRowPairs(const QList<QPair<int, int> >& toRemove)
++{
++ if (toRemove.isEmpty())
++ {
++ return;
++ }
++
++ // Remove old indexes
++ // Keep in mind that when calling beginRemoveRows all structures announced to be removed
++ // must still be valid, and this includes our hashes as well, which limits what we can optimize
++
++ int removedRows = 0, offset = 0;
++ typedef QPair<int, int> IntPair; // to make foreach macro happy
++
++ foreach(const IntPair& pair, toRemove)
++ {
++ const int begin = pair.first - offset;
++ const int end = pair.second - offset; // inclusive
++ removedRows = end - begin + 1;
++
++ // when removing from the list, all subsequent indexes are affected
++ offset += removedRows;
++
++ QList<ImageInfo> removedInfos;
++
++ if (d->sendRemovalSignals)
++ {
++ qCopy(d->infos.begin() + begin, d->infos.begin() + end, removedInfos.begin());
++ emit imageInfosAboutToBeRemoved(removedInfos);
++ }
++
++ imageInfosAboutToBeRemoved(begin, end);
++ beginRemoveRows(QModelIndex(), begin, end);
++
++ // update idHash - which points to indexes of d->infos, and these change now!
++ QHash<qlonglong, int>::iterator it;
++
++ for (it = d->idHash.begin(); it != d->idHash.end(); )
++ {
++ if (it.value() >= begin)
++ {
++ if (it.value() > end)
++ {
++ // after the removed interval: adjust index
++ it.value() -= removedRows;
++ }
++ else
++ {
++ // in the removed interval
++ it = d->idHash.erase(it);
++ continue;
++ }
++ }
++
++ ++it;
++ }
++
++ // remove from list
++ d->infos.erase(d->infos.begin() + begin, d->infos.begin() + (end + 1));
++
++ if (!d->extraValues.isEmpty())
++ {
++ d->extraValues.erase(d->extraValues.begin() + begin, d->extraValues.begin() + (end + 1));
++ }
++
++ endRemoveRows();
++
++ if (d->sendRemovalSignals)
++ {
++ emit imageInfosRemoved(removedInfos);
++ }
++ }
++
++ // tidy up: remove old indexes from file path hash now
++ if (d->keepFilePathCache)
++ {
++ QHash<QString, qlonglong>::iterator it;
++
++ for (it = d->filePathHash.begin(); it != d->filePathHash.end(); )
++ {
++ if (pairsContain(toRemove, it.value()))
++ {
++ it = d->filePathHash.erase(it);
++ }
++ else
++ {
++ ++it;
++ }
++ }
++ }
++}
++
++ImageModelIncrementalUpdater::ImageModelIncrementalUpdater(ImageModel::Private* d)
++{
++ oldIds = d->idHash;
++ oldExtraValues = d->extraValues;
++}
++
++void ImageModelIncrementalUpdater::appendInfos(const QList<ImageInfo>& infos, const QList<QVariant>& extraValues)
++{
++ if (extraValues.isEmpty())
++ {
++ foreach(const ImageInfo& info, infos)
++ {
++ QHash<qlonglong,int>::iterator it = oldIds.find(info.id());
++
++ if (it != oldIds.end())
++ {
++ oldIds.erase(it);
++ }
++ else
++ {
++ newInfos << info;
++ }
++ }
++ }
++ else
++ {
++ for (int i=0; i<infos.size(); ++i)
++ {
++ const ImageInfo& info = infos.at(i);
++ bool found = false;
++ QHash<qlonglong,int>::iterator it;
++
++ for (it = oldIds.find(info.id()); it != oldIds.end() && it.key() == info.id(); ++it)
++ {
++ // first check is for bug #262596. Not sure if needed.
++ if (it.value() < oldExtraValues.size() && extraValues.at(i) == oldExtraValues.at(it.value()))
++ {
++ found = true;
++ break;
++ }
++ }
++
++ if (found)
++ {
++ oldIds.erase(it);
++ // do not erase from oldExtraValues - oldIds is a hash id -> index.
++ }
++ else
++ {
++ newInfos << info;
++ newExtraValues << extraValues.at(i);
++ }
++ }
++ }
++}
++
++void ImageModelIncrementalUpdater::aboutToBeRemovedInModel(const IntPairList& toRemove)
++{
++ modelRemovals << toRemove;
++}
++
++QList<QPair<int, int> > ImageModelIncrementalUpdater::oldIndexes()
++{
++ // first, apply all changes to indexes by direct removal in model
++ // while the updater was active
++ foreach(const IntPairList& list, modelRemovals)
++ {
++ int removedRows = 0, offset = 0;
++
++ foreach(const IntPair& pair, list)
++ {
++ const int begin = pair.first - offset;
++ const int end = pair.second - offset; // inclusive
++ removedRows = end - begin + 1;
++
++ // when removing from the list, all subsequent indexes are affected
++ offset += removedRows;
++
++ // update idHash - which points to indexes of d->infos, and these change now!
++ QHash<qlonglong, int>::iterator it;
++
++ for (it = oldIds.begin(); it != oldIds.end(); )
++ {
++ if (it.value() >= begin)
++ {
++ if (it.value() > end)
++ {
++ // after the removed interval: adjust index
++ it.value() -= removedRows;
++ }
++ else
++ {
++ // in the removed interval
++ it = oldIds.erase(it);
++ continue;
++ }
++ }
++
++ ++it;
++ }
++ }
++ }
++
++ modelRemovals.clear();
++
++ return toContiguousPairs(oldIds.values());
++}
++
++QList<QPair<int, int> > ImageModelIncrementalUpdater::toContiguousPairs(const QList<int>& unsorted)
++{
++ // Take the given indices and return them as contiguous pairs [begin, end]
++
++ QList<QPair<int, int> > pairs;
++
++ if (unsorted.isEmpty())
++ {
++ return pairs;
++ }
++
++ QList<int> indices(unsorted);
++ qSort(indices);
++
++ QPair<int, int> pair(indices.first(), indices.first());
++
++ for (int i=1; i<indices.size(); ++i)
++ {
++ const int &index = indices.at(i);
++
++ if (index == pair.second + 1)
++ {
++ pair.second = index;
++ continue;
++ }
++
++ pairs << pair; // insert last pair
++ pair.first = index;
++ pair.second = index;
++ }
++
++ pairs << pair;
++
++ return pairs;
++}
++
++// ------------ QAbstractItemModel implementation -------------
++
++QVariant ImageModel::data(const QModelIndex& index, int role) const
++{
++ if (!d->isValid(index))
++ {
++ return QVariant();
++ }
++
++ switch (role)
++ {
++ case Qt::DisplayRole:
++ case Qt::ToolTipRole:
++ return d->infos.at(index.row()).name();
++
++ case ImageModelPointerRole:
++ return QVariant::fromValue(const_cast<ImageModel*>(this));
++
++ case ImageModelInternalId:
++ return index.row();
++
++ case CreationDateRole:
++ return d->infos.at(index.row()).dateTime();
++
++ case ExtraDataRole:
++
++ if (d->extraValueValid(index))
++ {
++ return d->extraValues.at(index.row());
++ }
++ else
++ {
++ return QVariant();
++ }
++
++ case ExtraDataDuplicateCount:
++ {
++ qlonglong id = d->infos.at(index.row()).id();
++ return numberOfIndexesForImageId(id);
++ }
++ }
++
++ return QVariant();
++}
++
++QVariant ImageModel::headerData(int section, Qt::Orientation orientation, int role) const
++{
++ Q_UNUSED(section)
++ Q_UNUSED(orientation)
++ Q_UNUSED(role)
++ return QVariant();
++}
++
++int ImageModel::rowCount(const QModelIndex& parent) const
++{
++ if (parent.isValid())
++ {
++ return 0;
++ }
++
++ return d->infos.size();
++}
++
++Qt::ItemFlags ImageModel::flags(const QModelIndex& index) const
++{
++ if (!d->isValid(index))
++ {
++ return 0;
++ }
++
++ Qt::ItemFlags f = Qt::ItemIsSelectable | Qt::ItemIsEnabled;
++
++ f |= dragDropFlags(index);
++
++ return f;
++}
++
++QModelIndex ImageModel::index(int row, int column, const QModelIndex& parent) const
++{
++ if (column != 0 || row < 0 || parent.isValid() || row >= d->infos.size())
++ {
++ return QModelIndex();
++ }
++
++ return createIndex(row, 0);
++}
++
++// ------------ Database watch -------------
++
++void ImageModel::slotImageChange(const ImageChangeset& changeset)
++{
++ if (d->infos.isEmpty())
++ {
++ return;
++ }
++
++ if (d->watchFlags & changeset.changes())
++ {
++ QItemSelection items;
++
++ foreach(const qlonglong& id, changeset.ids())
++ {
++ QModelIndex index = indexForImageId(id);
++
++ if (index.isValid())
++ {
++ items.select(index, index);
++ }
++ }
++
++ if (!items.isEmpty())
++ {
++ emitDataChangedForSelection(items);
++ emit imageChange(changeset, items);
++ }
++ }
++}
++
++void ImageModel::slotImageTagChange(const ImageTagChangeset& changeset)
++{
++ if (d->infos.isEmpty())
++ {
++ return;
++ }
++
++ QItemSelection items;
++
++ foreach(const qlonglong& id, changeset.ids())
++ {
++ QModelIndex index = indexForImageId(id);
++
++ if (index.isValid())
++ {
++ items.select(index, index);
++ }
++ }
++
++ if (!items.isEmpty())
++ {
++ emitDataChangedForSelection(items);
++ emit imageTagChange(changeset, items);
++ }
++}
++
++} // namespace Digikam
+diff --git a/libs/database/models/imagemodel.h b/libs/database/models/imagemodel.h
+new file mode 100644
+index 0000000..dcf94c2
+--- /dev/null
++++ b/libs/database/models/imagemodel.h
+@@ -0,0 +1,364 @@
++/* ============================================================
++ *
++ * This file is a part of digiKam project
++ * http://www.digikam.org
++ *
++ * Date : 2009-03-05
++ * Description : Qt item model for database entries
++ *
++ * Copyright (C) 2009-2011 by Marcel Wiesweg <marcel dot wiesweg at gmx dot de>
++ *
++ * This program is free software; you can redistribute it
++ * and/or modify it under the terms of the GNU General
++ * Public License as published by the Free Software Foundation;
++ * either version 2, or (at your option)
++ * any later version.
++ *
++ * This program is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++ * GNU General Public License for more details.
++ *
++ * ============================================================ */
++
++#ifndef IMAGEMODEL_H
++#define IMAGEMODEL_H
++
++// Qt includes
++
++#include <QAbstractListModel>
++
++// Local includes
++
++#include "dragdropimplementations.h"
++#include "imageinfo.h"
++#include "digikam_export.h"
++
++class QItemSelection;
++
++namespace Digikam
++{
++
++class ImageChangeset;
++class ImageTagChangeset;
++
++namespace DatabaseFields
++{
++class Set;
++}
++
++class DIGIKAM_DATABASE_EXPORT ImageModel : public QAbstractListModel, public DragDropModelImplementation
++{
++ Q_OBJECT
++
++public:
++
++ enum ImageModelRoles
++ {
++ /// An ImageModel* pointer to this model
++ ImageModelPointerRole = Qt::UserRole,
++ ImageModelInternalId = Qt::UserRole + 1,
++ /// Returns a thumbnail pixmap. May be implemented by subclasses.
++ /// Returns either a valid pixmap or a null QVariant.
++ ThumbnailRole = Qt::UserRole + 2,
++ /// Returns a QDateTime with the creation date
++ CreationDateRole = Qt::UserRole + 3,
++ /// Return (optional) extraData field
++ ExtraDataRole = Qt::UserRole + 5,
++ /// Returns the number of duplicate indexes for the same image id
++ ExtraDataDuplicateCount = Qt::UserRole + 6,
++
++ // Roles which are defined here but not implemented by ImageModel
++ /// Returns position of item in Left Light Table preview.
++ LTLeftPanelRole = Qt::UserRole + 50,
++ /// Returns position of item in Right Light Table preview.
++ LTRightPanelRole = Qt::UserRole + 51,
++
++ // For use by subclasses
++ SubclassRoles = Qt::UserRole + 100,
++ // For use by filter models
++ FilterModelRoles = Qt::UserRole + 500
++ };
++
++public:
++
++ explicit ImageModel(QObject* parent = 0);
++ ~ImageModel();
++
++ /** If a cache is kept, lookup by file path is fast,
++ * without a cache it is O(n). Default is false.
++ */
++ void setKeepsFilePathCache(bool keepCache);
++ bool keepsFilePathCache() const;
++
++ /** Set a set of database fields to watch.
++ * If either of these is changed, dataChanged() will be emitted.
++ * Default is no flag (no signal will be emitted).
++ */
++ void setWatchFlags(const DatabaseFields::Set& set);
++
++ /** Returns the ImageInfo object, reference or image id from the underlying data
++ * pointed to by the index.
++ * If the index is not valid, imageInfo will return a null ImageInfo, imageId will
++ * return 0, imageInfoRef must not be called with an invalid index.
++ */
++ ImageInfo imageInfo(const QModelIndex& index) const;
++ ImageInfo& imageInfoRef(const QModelIndex& index) const;
++ qlonglong imageId(const QModelIndex& index) const;
++ QList<ImageInfo> imageInfos(const QList<QModelIndex>& indexes) const;
++ QList<qlonglong> imageIds(const QList<QModelIndex>& indexes) const;
++
++ /** Returns the ImageInfo object, reference or image id from the underlying data
++ * of the given row (parent is the invalid QModelIndex, column is 0).
++ * Note that imageInfoRef will crash if index is invalid.
++ */
++ ImageInfo imageInfo(int row) const;
++ ImageInfo& imageInfoRef(int row) const;
++ qlonglong imageId(int row) const;
++
++ /** Return the index for the given ImageInfo or id, if contained in this model.
++ */
++ QModelIndex indexForImageInfo(const ImageInfo& info) const;
++ QModelIndex indexForImageInfo(const ImageInfo& info, const QVariant& extraValue) const;
++ QModelIndex indexForImageId(qlonglong id) const;
++ QModelIndex indexForImageId(qlonglong id, const QVariant& extraValue) const;
++ QList<QModelIndex> indexesForImageInfo(const ImageInfo& info) const;
++ QList<QModelIndex> indexesForImageId(qlonglong id) const;
++
++ int numberOfIndexesForImageInfo(const ImageInfo& info) const;
++ int numberOfIndexesForImageId(qlonglong id) const;
++
++ /** Returns the index or ImageInfo object from the underlying data
++ * for the given file path. This is fast if keepsFilePathCache is enabled.
++ * The file path is as returned by ImageInfo.filePath().
++ * In case of multiple occurrences of the same file, the simpler variants return
++ * any one found first, use the QList methods to retrieve all occurrences.
++ */
++ QModelIndex indexForPath(const QString& filePath) const;
++ ImageInfo imageInfo(const QString& filePath) const;
++ QList<QModelIndex> indexesForPath(const QString& filePath) const;
++ QList<ImageInfo> imageInfos(const QString& filePath) const;
++
++ /** Main entry point for subclasses adding image infos to the model.
++ * If you list entries not unique per image id, you must add an extraValue
++ * so that every entry is unique by imageId and extraValues.
++ * Please note that these methods do not prevent addition of duplicate entries.
++ */
++ void addImageInfo(const ImageInfo& info);
++ void addImageInfos(const QList<ImageInfo>& infos);
++ void addImageInfos(const QList<ImageInfo>& infos, const QList<QVariant>& extraValues);
++
++ /** Clears image infos and resets model.
++ */
++ void clearImageInfos();
++
++ /** Clears and adds the infos.
++ */
++ void setImageInfos(const QList<ImageInfo>& infos);
++
++ /**
++ * Directly remove the given indexes or infos from the model.
++ */
++ void removeIndex(const QModelIndex& indexes);
++ void removeIndexes(const QList<QModelIndex>& indexes);
++ void removeImageInfo(const ImageInfo& info);
++ void removeImageInfos(const QList<ImageInfo>& infos);
++ void removeImageInfos(const QList<ImageInfo>& infos, const QList<QVariant>& extraValues);
++
++ /**
++ * addImageInfo() is asynchronous if a prepocessor is set.
++ * This method first adds the info, synchronously.
++ * Only afterwards, the preprocessor will have the opportunity to process it.
++ * This method also bypasses any incremental updates.
++ * Please note that these methods do not prevent addition of duplicate entries.
++ */
++ void addImageInfoSynchronously(const ImageInfo& info);
++ void addImageInfosSynchronously(const QList<ImageInfo>& infos);
++ void addImageInfosSynchronously(const QList<ImageInfo>& infos, const QList<QVariant>& extraValues);
++
++ /**
++ * Add the given entries. Method returns immediately, the
++ * addition may happen later asynchronously.
++ * These methods prevent the addition of duplicate entries.
++ */
++ void ensureHasImageInfo(const ImageInfo& info);
++ void ensureHasImageInfos(const QList<ImageInfo>& infos);
++ void ensureHasImageInfos(const QList<ImageInfo>& infos, const QList<QVariant>& extraValues);
++
++ /**
++ * Ensure that all images grouped on the given leader are contained in the model.
++ */
++ void ensureHasGroupedImages(const ImageInfo& groupLeader);
++
++ QList<ImageInfo> imageInfos() const;
++ QList<qlonglong> imageIds() const;
++ QList<ImageInfo> uniqueImageInfos() const;
++
++ bool hasImage(qlonglong id) const;
++ bool hasImage(const ImageInfo& info) const;
++ bool hasImage(const ImageInfo& info, const QVariant& extraValue) const;
++ bool hasImage(qlonglong id, const QVariant& extraValue) const;
++
++ bool isEmpty() const;
++
++ // Drag and Drop
++ DECLARE_MODEL_DRAG_DROP_METHODS
++
++ /**
++ * Install an object as a preprocessor for ImageInfos added to this model.
++ * For every QList of ImageInfos added to addImageInfo, the signal preprocess()
++ * will be emitted. The preprocessor may process the items and shall then readd
++ * them by calling reAddImageInfos(). It may take some time to process.
++ * It shall discard any held infos when the modelReset() signal is sent.
++ * It shall call readdFinished() when no reset occurred and all infos on the way have been readded.
++ * This means that only after calling this method, you shall make three connections
++ * (preprocess -> your slot, your signal -> reAddImageInfos, your signal -> reAddingFinished)
++ * and make or already hold a connection modelReset() -> your slot.
++ * There is only one preprocessor at a time, a previously set object will be disconnected.
++ */
++ void setPreprocessor(QObject* processor);
++ void unsetPreprocessor(QObject* processor);
++
++ /**
++ * Returns true if this model is currently refreshing.
++ * For a preprocessor this means that, although the preprocessor may currently have
++ * processed all it got, more batches are to be expected.
++ */
++ bool isRefreshing() const;
++
++ /**
++ * Enable sending of imageInfosAboutToBeRemoved and imageInfosRemoved signals.
++ * Default: false
++ */
++ void setSendRemovalSignals(bool send);
++
++ virtual QVariant data(const QModelIndex& index, int role = Qt::DisplayRole) const;
++ virtual QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const;
++ virtual int rowCount(const QModelIndex& parent = QModelIndex()) const;
++ virtual Qt::ItemFlags flags(const QModelIndex& index) const;
++ virtual QModelIndex index(int row, int column = 0, const QModelIndex& parent = QModelIndex()) const;
++
++ /** Retrieves the imageInfo object from the data() method of the given index.
++ * The index may be from a QSortFilterProxyModel as long as an ImageModel is at the end. */
++ static ImageInfo retrieveImageInfo(const QModelIndex& index);
++ static qlonglong retrieveImageId(const QModelIndex& index);
++
++Q_SIGNALS:
++
++ /** Informs that ImageInfos will be added to the model.
++ * This signal is sent before the model data is changed and views are informed.
++ */
++ void imageInfosAboutToBeAdded(const QList<ImageInfo>& infos);
++
++ /** Informs that ImageInfos have been added to the model.
++ * This signal is sent after the model data is changed and views are informed.
++ */
++ void imageInfosAdded(const QList<ImageInfo>& infos);
++
++ /** Informs that ImageInfos will be removed from the model.
++ * This signal is sent before the model data is changed and views are informed.
++ * Note: You need to explicitly enable sending of this signal. It is not sent
++ * in clearImageInfos().
++ */
++ void imageInfosAboutToBeRemoved(const QList<ImageInfo>& infos);
++
++ /** Informs that ImageInfos have been removed from the model.
++ * This signal is sent after the model data is changed and views are informed. *
++ * Note: You need to explicitly enable sending of this signal. It is not sent
++ * in clearImageInfos().
++ */
++ void imageInfosRemoved(const QList<ImageInfo>& infos);
++
++ /** Connect to this signal only if you are the current preprocessor.
++ */
++ void preprocess(const QList<ImageInfo>& infos, const QList<QVariant>&);
++ void processAdded(const QList<ImageInfo>& infos, const QList<QVariant>&);
++
++ /** If an ImageChangeset affected indexes of this model with changes as set in watchFlags(),
++ * this signal contains the changeset and the affected indexes.
++ */
++ void imageChange(const ImageChangeset&, const QItemSelection&);
++
++ /** If an ImageTagChangeset affected indexes of this model,
++ * this signal contains the changeset and the affected indexes.
++ */
++ void imageTagChange(const ImageTagChangeset&, const QItemSelection&);
++
++ /** Signals that the model is right now ready to start an incremental refresh.
++ * This is guaranteed only for the scope of emitting this signal.
++ */
++ void readyForIncrementalRefresh();
++
++ /** Signals that the model has finished currently with all scheduled
++ * refreshing, full or incremental, and all preprocessing.
++ * The model is in polished, clean situation right now.
++ */
++ void allRefreshingFinished();
++
++public Q_SLOTS:
++
++ void reAddImageInfos(const QList<ImageInfo>& infos, const QList<QVariant>& extraValues);
++ void reAddingFinished();
++
++protected:
++
++ /** Subclasses that add ImageInfos in batches shall call startRefresh()
++ * when they start sending batches and finishRefresh() when they have finished.
++ * No incremental refreshes will be started while listing.
++ * A clearImageInfos() always stops listing, calling finishRefresh() is then not necessary.
++ */
++ void startRefresh();
++ void finishRefresh();
++
++ /** As soon as the model is ready to start an incremental refresh, the signal
++ * readyForIncrementalRefresh() will be emitted. The signal will be emitted inline
++ * if the model is ready right now.
++ */
++ void requestIncrementalRefresh();
++ bool hasIncrementalRefreshPending() const;
++
++ /** Starts an incremental refresh operation. You shall only call this method from a slot
++ * connected to readyForIncrementalRefresh(). To initiate an incremental refresh,
++ * call requestIncrementalRefresh().
++ */
++ void startIncrementalRefresh();
++ void finishIncrementalRefresh();
++
++ void emitDataChangedForAll();
++ void emitDataChangedForSelection(const QItemSelection& selection);
++
++ // Called when the internal storage is cleared
++ virtual void imageInfosCleared() {};
++
++ // Called before rowsAboutToBeRemoved
++ virtual void imageInfosAboutToBeRemoved(int /*begin*/, int /*end*/) {};
++
++protected Q_SLOTS:
++
++ virtual void slotImageChange(const ImageChangeset& changeset);
++ virtual void slotImageTagChange(const ImageTagChangeset& changeset);
++
++private:
++
++ void appendInfos(const QList<ImageInfo>& infos, const QList<QVariant>& extraValues);
++ void appendInfosChecked(const QList<ImageInfo>& infos, const QList<QVariant>& extraValues);
++ void publiciseInfos(const QList<ImageInfo>& infos, const QList<QVariant>& extraValues);
++ void cleanSituationChecks();
++ void removeRowPairsWithCheck(const QList<QPair<int, int> >& toRemove);
++ void removeRowPairs(const QList<QPair<int, int> >& toRemove);
++
++public:
++
++ // Declared public because it's used in ImageModelIncrementalUpdater class
++ class Private;
++
++private:
++
++ Private* const d;
++};
++
++} // namespace Digikam
++
++Q_DECLARE_METATYPE(Digikam::ImageModel*)
++
++#endif // IMAGEMODEL_H
+diff --git a/libs/database/models/imagesortsettings.cpp b/libs/database/models/imagesortsettings.cpp
+new file mode 100644
+index 0000000..39ee6e1
+--- /dev/null
++++ b/libs/database/models/imagesortsettings.cpp
+@@ -0,0 +1,400 @@
++/* ============================================================
++ *
++ * This file is a part of digiKam project
++ * http://www.digikam.org
++ *
++ * Date : 2009-03-05
++ * Description : Filter values for use with ImageFilterModel
++ *
++ * Copyright (C) 2009 by Marcel Wiesweg <marcel dot wiesweg at gmx dot de>
++ * Copyright (C) 2014 by Mohamed Anwer <m dot anwer at gmx dot com>
++ *
++ * This program is free software; you can redistribute it
++ * and/or modify it under the terms of the GNU General
++ * Public License as published by the Free Software Foundation;
++ * either version 2, or (at your option)
++ * any later version.
++ *
++ * This program is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++ * GNU General Public License for more details.
++ *
++ * ============================================================ */
++
++#include "imagesortsettings.h"
++
++// Qt includes
++
++#include <QDateTime>
++#include <QRectF>
++
++// Local includes
++
++#include "coredbfields.h"
++#include "imageinfo.h"
++
++namespace Digikam
++{
++
++ImageSortSettings::ImageSortSettings()
++{
++ categorizationMode = NoCategories;
++ categorizationSortOrder = DefaultOrder;
++ categorizationCaseSensitivity = Qt::CaseSensitive;
++ sortRole = SortByFileName;
++ sortOrder = DefaultOrder;
++ strTypeNatural = true;
++ sortCaseSensitivity = Qt::CaseSensitive;
++ currentCategorizationSortOrder = Qt::AscendingOrder;
++ currentSortOrder = Qt::AscendingOrder;
++}
++
++bool ImageSortSettings::operator==(const ImageSortSettings& other) const
++{
++ return
++ categorizationMode == other.categorizationMode &&
++ categorizationSortOrder == other.categorizationSortOrder &&
++ categorizationCaseSensitivity == other.categorizationCaseSensitivity &&
++ sortRole == other.sortRole &&
++ sortOrder == other.sortOrder &&
++ sortCaseSensitivity == other.sortCaseSensitivity;
++}
++
++void ImageSortSettings::setCategorizationMode(CategorizationMode mode)
++{
++ categorizationMode = mode;
++
++ if (categorizationSortOrder == DefaultOrder)
++ {
++ currentCategorizationSortOrder = defaultSortOrderForCategorizationMode(categorizationMode);
++ }
++}
++
++void ImageSortSettings::setCategorizationSortOrder(SortOrder order)
++{
++ categorizationSortOrder = order;
++
++ if (categorizationSortOrder == DefaultOrder)
++ {
++ currentCategorizationSortOrder = defaultSortOrderForCategorizationMode(categorizationMode);
++ }
++ else
++ {
++ currentCategorizationSortOrder = (Qt::SortOrder)categorizationSortOrder;
++ }
++}
++
++void ImageSortSettings::setSortRole(SortRole role)
++{
++ sortRole = role;
++
++ if (sortOrder == DefaultOrder)
++ {
++ currentSortOrder = defaultSortOrderForSortRole(sortRole);
++ }
++}
++
++void ImageSortSettings::setSortOrder(SortOrder order)
++{
++ sortOrder = order;
++
++ if (sortOrder == DefaultOrder)
++ {
++ currentSortOrder = defaultSortOrderForSortRole(sortRole);
++ }
++ else
++ {
++ currentSortOrder = (Qt::SortOrder)order;
++ }
++}
++
++void ImageSortSettings::setStringTypeNatural(bool natural)
++{
++ strTypeNatural = natural;
++}
++
++Qt::SortOrder ImageSortSettings::defaultSortOrderForCategorizationMode(CategorizationMode mode)
++{
++ switch (mode)
++ {
++ case NoCategories:
++ case OneCategory:
++ case CategoryByAlbum:
++ case CategoryByFormat:
++ default:
++ return Qt::AscendingOrder;
++ }
++}
++
++Qt::SortOrder ImageSortSettings::defaultSortOrderForSortRole(SortRole role)
++{
++ switch (role)
++ {
++ case SortByFileName:
++ case SortByFilePath:
++ return Qt::AscendingOrder;
++ case SortByFileSize:
++ return Qt::DescendingOrder;
++ case SortByModificationDate:
++ case SortByCreationDate:
++ return Qt::AscendingOrder;
++ case SortByRating:
++ case SortByImageSize:
++ return Qt::DescendingOrder;
++ case SortByAspectRatio:
++ return Qt::DescendingOrder;
++ case SortBySimilarity:
++ return Qt::DescendingOrder;
++ default:
++ return Qt::AscendingOrder;
++ }
++}
++
++int ImageSortSettings::compareCategories(const ImageInfo& left, const ImageInfo& right) const
++{
++ switch (categorizationMode)
++ {
++ case NoCategories:
++ case OneCategory:
++ return 0;
++ case CategoryByAlbum:
++ {
++ int leftAlbum = left.albumId();
++ int rightAlbum = right.albumId();
++
++ // return comparation result
++ if (leftAlbum == rightAlbum)
++ {
++ return 0;
++ }
++ else if (lessThanByOrder(leftAlbum, rightAlbum, currentCategorizationSortOrder))
++ {
++ return -1;
++ }
++ else
++ {
++ return 1;
++ }
++ }
++ case CategoryByFormat:
++ {
++ return naturalCompare(left.format(), right.format(),
++ currentCategorizationSortOrder, categorizationCaseSensitivity, strTypeNatural);
++ }
++ default:
++ return 0;
++ }
++}
++
++bool ImageSortSettings::lessThan(const ImageInfo& left, const ImageInfo& right) const
++{
++ int result = compare(left, right, sortRole);
++
++ if (result != 0)
++ {
++ return result < 0;
++ }
++
++ // are they identical?
++ if (left == right)
++ {
++ return false;
++ }
++
++ // If left and right equal for first sort order, use a hierarchy of all sort orders
++ if ( (result = compare(left, right, SortByFileName)) != 0)
++ {
++ return result < 0;
++ }
++
++ if ( (result = compare(left, right, SortByCreationDate)) != 0)
++ {
++ return result < 0;
++ }
++
++ if ( (result = compare(left, right, SortByModificationDate)) != 0)
++ {
++ return result < 0;
++ }
++
++ if ( (result = compare(left, right, SortByFilePath)) != 0)
++ {
++ return result < 0;
++ }
++
++ if ( (result = compare(left, right, SortByFileSize)) != 0)
++ {
++ return result < 0;
++ }
++
++ if ( (result = compare(left, right, SortBySimilarity)) != 0)
++ {
++ return result < 0;
++ }
++
++ return false;
++}
++
++int ImageSortSettings::compare(const ImageInfo& left, const ImageInfo& right) const
++{
++ return compare(left, right, sortRole);
++}
++
++int ImageSortSettings::compare(const ImageInfo& left, const ImageInfo& right, SortRole role) const
++{
++ switch (role)
++ {
++ case SortByFileName:
++ {
++ bool versioning = (left.name().contains(QLatin1String("_v"), Qt::CaseInsensitive) ||
++ right.name().contains(QLatin1String("_v"), Qt::CaseInsensitive));
++ return naturalCompare(left.name(), right.name(), currentSortOrder, sortCaseSensitivity, strTypeNatural, versioning);
++ }
++ case SortByFilePath:
++ return naturalCompare(left.filePath(), right.filePath(), currentSortOrder, sortCaseSensitivity, strTypeNatural);
++ case SortByFileSize:
++ return compareByOrder(left.fileSize(), right.fileSize(), currentSortOrder);
++ case SortByModificationDate:
++ return compareByOrder(left.modDateTime(), right.modDateTime(), currentSortOrder);
++ case SortByCreationDate:
++ return compareByOrder(left.dateTime(), right.dateTime(), currentSortOrder);
++ case SortByRating:
++ // I have the feeling that inverting the sort order for rating is the natural order
++ return - compareByOrder(left.rating(), right.rating(), currentSortOrder);
++ case SortByImageSize:
++ {
++ QSize leftSize = left.dimensions();
++ QSize rightSize = right.dimensions();
++ int leftPixels = leftSize.width() * leftSize.height();
++ int rightPixels = rightSize.width() * rightSize.height();
++ return compareByOrder(leftPixels, rightPixels, currentSortOrder);
++ }
++ case SortByAspectRatio:
++ {
++ QSize leftSize = left.dimensions();
++ QSize rightSize = right.dimensions();
++ int leftAR = (double(leftSize.width()) / double(leftSize.height())) * 1000000;
++ int rightAR = (double(rightSize.width()) / double(rightSize.height())) * 1000000;
++ return compareByOrder(leftAR, rightAR, currentSortOrder);
++ }
++ case SortBySimilarity:
++ {
++ qlonglong leftReferenceImageId = left.currentReferenceImage();
++ qlonglong rightReferenceImageId = right.currentReferenceImage();
++ // make sure that the original image has always the highest similarity.
++ double leftSimilarity = left.id() == leftReferenceImageId ? 1.1 : left.currentSimilarity();
++ double rightSimilarity = right.id() == rightReferenceImageId ? 1.1 : right.currentSimilarity();
++ return compareByOrder(leftSimilarity, rightSimilarity, currentSortOrder);
++ }
++ default:
++ return 1;
++ }
++}
++
++bool ImageSortSettings::lessThan(const QVariant& left, const QVariant& right) const
++{
++ if (left.type() != right.type())
++ {
++ return false;
++ }
++
++ switch (left.type())
++ {
++ case QVariant::Int:
++ return compareByOrder(left.toInt(), right.toInt(), currentSortOrder);
++ case QVariant::UInt:
++ return compareByOrder(left.toUInt(), right.toUInt(), currentSortOrder);
++ case QVariant::LongLong:
++ return compareByOrder(left.toLongLong(), right.toLongLong(), currentSortOrder);
++ case QVariant::ULongLong:
++ return compareByOrder(left.toULongLong(), right.toULongLong(), currentSortOrder);
++ case QVariant::Double:
++ return compareByOrder(left.toDouble(), right.toDouble(), currentSortOrder);
++ case QVariant::Date:
++ return compareByOrder(left.toDate(), right.toDate(), currentSortOrder);
++ case QVariant::DateTime:
++ return compareByOrder(left.toDateTime(), right.toDateTime(), currentSortOrder);
++ case QVariant::Time:
++ return compareByOrder(left.toTime(), right.toTime(), currentSortOrder);
++ case QVariant::Rect:
++ case QVariant::RectF:
++ {
++ QRectF rectLeft = left.toRectF();
++ QRectF rectRight = right.toRectF();
++ int result;
++
++ if ((result = compareByOrder(rectLeft.top(), rectRight.top(), currentSortOrder)) != 0)
++ {
++ return result < 0;
++ }
++
++ if ((result = compareByOrder(rectLeft.left(), rectRight.left(), currentSortOrder)) != 0)
++ {
++ return result < 0;
++ }
++
++ QSizeF sizeLeft = rectLeft.size(), sizeRight = rectRight.size();
++
++ if ((result = compareByOrder(sizeLeft.width()*sizeLeft.height(), sizeRight.width()*sizeRight.height(), currentSortOrder)) != 0)
++ {
++ return result < 0;
++ }
++ // FIXME: fall through?? If not, add "break" here
++ }
++ default:
++ return naturalCompare(left.toString(), right.toString(), currentSortOrder, sortCaseSensitivity, strTypeNatural);
++ }
++}
++
++DatabaseFields::Set ImageSortSettings::watchFlags() const
++{
++ DatabaseFields::Set set;
++
++ switch (sortRole)
++ {
++ case SortByFileName:
++ set |= DatabaseFields::Name;
++ break;
++ case SortByFilePath:
++ set |= DatabaseFields::Name;
++ break;
++ case SortByFileSize:
++ set |= DatabaseFields::FileSize;
++ break;
++ case SortByModificationDate:
++ set |= DatabaseFields::ModificationDate;
++ break;
++ case SortByCreationDate:
++ set |= DatabaseFields::CreationDate;
++ break;
++ case SortByRating:
++ set |= DatabaseFields::Rating;
++ break;
++ case SortByImageSize:
++ set |= DatabaseFields::Width | DatabaseFields::Height;
++ break;
++ case SortByAspectRatio:
++ set |= DatabaseFields::Width | DatabaseFields::Height;
++ break;
++ case SortBySimilarity:
++ // TODO: Not sure what to do here....
++ set |= DatabaseFields::Name;
++ break;
++ }
++
++ switch (categorizationMode)
++ {
++ case NoCategories:
++ case OneCategory:
++ case CategoryByAlbum:
++ break;
++ case CategoryByFormat:
++ set |= DatabaseFields::Format;
++ break;
++ }
++
++ return set;
++}
++
++} // namespace Digikam
+diff --git a/libs/database/models/imagesortsettings.h b/libs/database/models/imagesortsettings.h
+new file mode 100644
+index 0000000..2a5fd8c
+--- /dev/null
++++ b/libs/database/models/imagesortsettings.h
+@@ -0,0 +1,225 @@
++/* ============================================================
++ *
++ * This file is a part of digiKam project
++ * http://www.digikam.org
++ *
++ * Date : 2009-05-31
++ * Description : Sort settings for use with ImageFilterModel
++ *
++ * Copyright (C) 2009 by Marcel Wiesweg <marcel dot wiesweg at gmx dot de>
++ *
++ * This program is free software; you can redistribute it
++ * and/or modify it under the terms of the GNU General
++ * Public License as published by the Free Software Foundation;
++ * either version 2, or (at your option)
++ * any later version.
++ *
++ * This program is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++ * GNU General Public License for more details.
++ *
++ * ============================================================ */
++
++#ifndef IMAGESORTSETTINGS_H
++#define IMAGESORTSETTINGS_H
++
++// Qt includes
++
++#include <QHash>
++#include <QList>
++#include <QMap>
++#include <QString>
++#include <QCollator>
++
++// Local includes
++
++#include "digikam_export.h"
++
++namespace Digikam
++{
++
++class ImageInfo;
++
++namespace DatabaseFields
++{
++ class Set;
++}
++
++class DIGIKAM_DATABASE_EXPORT ImageSortSettings
++{
++public:
++
++ ImageSortSettings();
++
++ bool operator==(const ImageSortSettings& other) const;
++
++ /** Compares the categories of left and right.
++ * Return -1 if left is less than right, 0 if both fall in the same category,
++ * and 1 if left is greater than right.
++ * Adheres to set categorization mode and current category sort order.
++ */
++ int compareCategories(const ImageInfo& left, const ImageInfo& right) const;
++
++ /** Returns true if left is less than right.
++ * Adheres to current sort role and sort order.
++ */
++ bool lessThan(const ImageInfo& left, const ImageInfo& right) const;
++
++ /** Compares the ImageInfos left and right.
++ * Return -1 if left is less than right, 1 if left is greater than right,
++ * and 0 if left equals right comparing the current sort role's value.
++ * Adheres to set sort role and sort order.
++ */
++ int compare(const ImageInfo& left, const ImageInfo& right) const;
++
++ /** Returns true if left QVariant is less than right.
++ * Adheres to current sort role and sort order.
++ * Use for extraValue, if necessary.
++ */
++ bool lessThan(const QVariant& left, const QVariant& right) const;
++
++ enum SortOrder
++ {
++ AscendingOrder = Qt::AscendingOrder,
++ DescendingOrder = Qt::DescendingOrder,
++ DefaultOrder /// sort order depends on the chosen sort role
++ };
++
++ /// --- Categories ---
++
++ enum CategorizationMode
++ {
++ NoCategories, /// categorization switched off
++ OneCategory, /// all items in one global category
++ CategoryByAlbum,
++ CategoryByFormat
++ };
++
++ CategorizationMode categorizationMode;
++ SortOrder categorizationSortOrder;
++
++ void setCategorizationMode(CategorizationMode mode);
++ void setCategorizationSortOrder(SortOrder order);
++
++ /// Only Ascending or Descending, never DefaultOrder
++ Qt::SortOrder currentCategorizationSortOrder;
++ Qt::CaseSensitivity categorizationCaseSensitivity;
++
++ bool isCategorized() const { return categorizationMode >= CategoryByAlbum; }
++
++ /// --- Image Sorting ---
++
++ enum SortRole
++ {
++ // Note: For legacy reasons, the order of the first five entries must remain unchanged
++ SortByFileName,
++ SortByFilePath,
++ SortByCreationDate,
++ SortByFileSize,
++ SortByRating,
++ SortByModificationDate,
++ SortByImageSize, // pixel number
++ SortByAspectRatio, // width / height * 100000
++ SortBySimilarity
++ };
++
++ SortRole sortRole;
++ SortOrder sortOrder;
++ bool strTypeNatural;
++
++ void setSortRole(SortRole role);
++ void setSortOrder(SortOrder order);
++ void setStringTypeNatural(bool natural);
++
++ Qt::SortOrder currentSortOrder;
++ Qt::CaseSensitivity sortCaseSensitivity;
++
++ int compare(const ImageInfo& left, const ImageInfo& right, SortRole sortRole) const;
++
++ // --- ---
++
++ static Qt::SortOrder defaultSortOrderForCategorizationMode(CategorizationMode mode);
++ static Qt::SortOrder defaultSortOrderForSortRole(SortRole role);
++
++ /// --- Change notification ---
++
++ /** Returns database fields a change in which would affect the current sorting.
++ */
++ DatabaseFields::Set watchFlags() const;
++
++ /// --- Utilities ---
++
++ /** Returns a < b if sortOrder is Ascending, or b < a if order is descending.
++ */
++ template <typename T>
++ static inline bool lessThanByOrder(const T& a, const T& b, Qt::SortOrder sortOrder)
++ {
++ if (sortOrder == Qt::AscendingOrder)
++ {
++ return a < b;
++ }
++ else
++ {
++ return b < a;
++ }
++ }
++
++ /** Returns the usual compare result of -1, 0, or 1 for lessThan, equals and greaterThan.
++ */
++ template <typename T>
++ static inline int compareValue(const T& a, const T& b)
++ {
++ if (a == b)
++ {
++ return 0;
++ }
++
++ if (a < b)
++ {
++ return -1;
++ }
++ else
++ {
++ return 1;
++ }
++ }
++
++ /** Takes a typical result from a compare method (0 is equal, -1 is less than, 1 is greater than)
++ * and applies the given sort order to it.
++ */
++ static inline int compareByOrder(int compareResult, Qt::SortOrder sortOrder)
++ {
++ if (sortOrder == Qt::AscendingOrder)
++ {
++ return compareResult;
++ }
++ else
++ {
++ return - compareResult;
++ }
++ }
++
++ template <typename T>
++ static inline int compareByOrder(const T& a, const T& b, Qt::SortOrder sortOrder)
++ {
++ return compareByOrder(compareValue(a, b), sortOrder);
++ }
++
++ /** Compares the two string by natural comparison and adheres to given sort order
++ */
++ static inline int naturalCompare(const QString& a, const QString& b, Qt::SortOrder sortOrder,
++ Qt::CaseSensitivity caseSensitive = Qt::CaseSensitive,
++ bool natural = true, bool versioning = false)
++ {
++ QCollator collator;
++ collator.setNumericMode(natural);
++ collator.setIgnorePunctuation(versioning);
++ collator.setCaseSensitivity(caseSensitive);
++ return (compareByOrder(collator.compare(a, b), sortOrder));
++ }
++};
++
++} // namespace Digikam
++
++#endif // IMAGESORTSETTINGS_H
+diff --git a/libs/database/models/imagethumbnailmodel.cpp b/libs/database/models/imagethumbnailmodel.cpp
+new file mode 100644
+index 0000000..b7f5661
+--- /dev/null
++++ b/libs/database/models/imagethumbnailmodel.cpp
+@@ -0,0 +1,323 @@
++/* ============================================================
++ *
++ * This file is a part of digiKam project
++ * http://www.digikam.org
++ *
++ * Date : 2009-03-05
++ * Description : Qt item model for database entries with support for thumbnail loading
++ *
++ * Copyright (C) 2009-2011 by Marcel Wiesweg <marcel dot wiesweg at gmx dot de>
++ * Copyright (C) 2011-2017 by Gilles Caulier <caulier dot gilles at gmail dot com>
++ *
++ * This program is free software; you can redistribute it
++ * and/or modify it under the terms of the GNU General
++ * Public License as published by the Free Software Foundation;
++ * either version 2, or (at your option)
++ * any later version.
++ *
++ * This program is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++ * GNU General Public License for more details.
++ *
++ * ============================================================ */
++
++#include "imagethumbnailmodel.h"
++
++// Qt includes
++
++#include <QHash>
++
++// Local includes
++
++#include "digikam_debug.h"
++#include "thumbnailloadthread.h"
++#include "digikam_export.h"
++#include "digikam_globals.h"
++
++namespace Digikam
++{
++
++class ImageThumbnailModel::ImageThumbnailModelPriv
++{
++public:
++
++ ImageThumbnailModelPriv() :
++ thread(0),
++ preloadThread(0),
++ thumbSize(0),
++ lastGlobalThumbSize(0),
++ preloadThumbSize(0),
++ emitDataChanged(true)
++ {
++ staticListContainingThumbnailRole << ImageModel::ThumbnailRole;
++ }
++
++ ThumbnailLoadThread* thread;
++ ThumbnailLoadThread* preloadThread;
++ ThumbnailSize thumbSize;
++ ThumbnailSize lastGlobalThumbSize;
++ ThumbnailSize preloadThumbSize;
++ QRect detailRect;
++ QVector<int> staticListContainingThumbnailRole;
++
++ bool emitDataChanged;
++
++ int preloadThumbnailSize() const
++ {
++ if (preloadThumbSize.size())
++ {
++ return preloadThumbSize.size();
++ }
++
++ return thumbSize.size();
++ }
++};
++
++ImageThumbnailModel::ImageThumbnailModel(QObject* parent)
++ : ImageModel(parent), d(new ImageThumbnailModelPriv)
++{
++ setKeepsFilePathCache(true);
++}
++
++ImageThumbnailModel::~ImageThumbnailModel()
++{
++ delete d->preloadThread;
++ delete d;
++}
++
++void ImageThumbnailModel::setThumbnailLoadThread(ThumbnailLoadThread* thread)
++{
++ d->thread = thread;
++
++ connect(d->thread, SIGNAL(signalThumbnailLoaded(LoadingDescription,QPixmap)),
++ this, SLOT(slotThumbnailLoaded(LoadingDescription,QPixmap)));
++}
++
++ThumbnailLoadThread* ImageThumbnailModel::thumbnailLoadThread() const
++{
++ return d->thread;
++}
++
++ThumbnailSize ImageThumbnailModel::thumbnailSize() const
++{
++ return d->thumbSize;
++}
++
++void ImageThumbnailModel::setThumbnailSize(const ThumbnailSize& size)
++{
++ d->lastGlobalThumbSize = size;
++ d->thumbSize = size;
++}
++
++void ImageThumbnailModel::setPreloadThumbnailSize(const ThumbnailSize& size)
++{
++ d->preloadThumbSize = size;
++}
++
++void ImageThumbnailModel::setEmitDataChanged(bool emitSignal)
++{
++ d->emitDataChanged = emitSignal;
++}
++
++void ImageThumbnailModel::setPreloadThumbnails(bool preload)
++{
++ if (preload)
++ {
++ if (!d->preloadThread)
++ {
++ d->preloadThread = new ThumbnailLoadThread;
++ d->preloadThread->setPixmapRequested(false);
++ d->preloadThread->setPriority(QThread::LowestPriority);
++ }
++
++ connect(this, SIGNAL(allRefreshingFinished()),
++ this, SLOT(preloadAllThumbnails()));
++ }
++ else
++ {
++ delete d->preloadThread;
++ d->preloadThread = 0;
++ disconnect(this, SIGNAL(allRefreshingFinished()),
++ this, SLOT(preloadAllThumbnails()));
++ }
++}
++
++void ImageThumbnailModel::prepareThumbnails(const QList<QModelIndex>& indexesToPrepare)
++{
++ prepareThumbnails(indexesToPrepare, d->thumbSize);
++}
++
++void ImageThumbnailModel::prepareThumbnails(const QList<QModelIndex>& indexesToPrepare, const ThumbnailSize& thumbSize)
++{
++ if (!d->thread)
++ {
++ return;
++ }
++
++ QList<ThumbnailIdentifier> ids;
++ foreach(const QModelIndex& index, indexesToPrepare)
++ {
++ ids << imageInfoRef(index).thumbnailIdentifier();
++ }
++ d->thread->findGroup(ids, thumbSize.size());
++}
++
++void ImageThumbnailModel::preloadThumbnails(const QList<ImageInfo>& infos)
++{
++ if (!d->preloadThread)
++ {
++ return;
++ }
++
++ QList<ThumbnailIdentifier> ids;
++ foreach(const ImageInfo& info, infos)
++ {
++ ids << info.thumbnailIdentifier();
++ }
++ d->preloadThread->pregenerateGroup(ids, d->preloadThumbnailSize());
++}
++
++void ImageThumbnailModel::preloadThumbnails(const QList<QModelIndex>& indexesToPreload)
++{
++ if (!d->preloadThread)
++ {
++ return;
++ }
++
++ QList<ThumbnailIdentifier> ids;
++ foreach(const QModelIndex& index, indexesToPreload)
++ {
++ ids << imageInfoRef(index).thumbnailIdentifier();
++ }
++ d->preloadThread->stopAllTasks();
++ d->preloadThread->pregenerateGroup(ids, d->preloadThumbnailSize());
++}
++
++void ImageThumbnailModel::preloadAllThumbnails()
++{
++ preloadThumbnails(imageInfos());
++}
++
++void ImageThumbnailModel::imageInfosCleared()
++{
++ if (d->preloadThread)
++ {
++ d->preloadThread->stopAllTasks();
++ }
++}
++
++QVariant ImageThumbnailModel::data(const QModelIndex& index, int role) const
++{
++ if (role == ThumbnailRole && d->thread && index.isValid())
++ {
++ QPixmap thumbnail;
++ ImageInfo info = imageInfo(index);
++ QString path = info.filePath();
++
++ if (info.isNull())
++ {
++ return QVariant(QVariant::Pixmap);
++ }
++
++ if (!d->detailRect.isNull())
++ {
++ if (d->thread->find(info.thumbnailIdentifier(), d->detailRect, thumbnail, d->thumbSize.size()))
++ {
++ return thumbnail;
++ }
++ }
++ else
++ {
++ if (d->thread->find(info.thumbnailIdentifier(), thumbnail, d->thumbSize.size()))
++ {
++ return thumbnail;
++ }
++ }
++
++ return QVariant(QVariant::Pixmap);
++ }
++
++ return ImageModel::data(index, role);
++}
++
++bool ImageThumbnailModel::setData(const QModelIndex& index, const QVariant& value, int role)
++{
++ if (role == ThumbnailRole)
++ {
++ switch (value.type())
++ {
++ case QVariant::Invalid:
++ d->thumbSize = d->lastGlobalThumbSize;
++ d->detailRect = QRect();
++ break;
++
++ case QVariant::Int:
++
++ if (value.isNull())
++ {
++ d->thumbSize = d->lastGlobalThumbSize;
++ }
++ else
++ {
++ d->thumbSize = value.toInt();
++ }
++ break;
++
++ case QVariant::Rect:
++
++ if (value.isNull())
++ {
++ d->detailRect = QRect();
++ }
++ else
++ {
++ d->detailRect = value.toRect();
++ }
++ break;
++
++ default:
++ break;
++ }
++ }
++
++ return ImageModel::setData(index, value, role);
++}
++
++void ImageThumbnailModel::slotThumbnailLoaded(const LoadingDescription& loadingDescription, const QPixmap& thumb)
++{
++ if (thumb.isNull())
++ {
++ return;
++ }
++
++ // In case of multiple occurrence, we currently do not know which thumbnail is this. Signal change on all.
++ QModelIndexList indexes;
++ ThumbnailIdentifier thumbId = loadingDescription.thumbnailIdentifier();
++ if (thumbId.filePath.isEmpty())
++ {
++ indexes = indexesForImageId(thumbId.id);
++ }
++ else
++ {
++ indexes = indexesForPath(thumbId.filePath);
++ }
++ foreach(const QModelIndex& index, indexes)
++ {
++ if (thumb.isNull())
++ {
++ emit thumbnailFailed(index, loadingDescription.previewParameters.size);
++ }
++ else
++ {
++ emit thumbnailAvailable(index, loadingDescription.previewParameters.size);
++
++ if (d->emitDataChanged)
++ {
++ emit dataChanged(index, index, d->staticListContainingThumbnailRole);
++ }
++ }
++ }
++}
++
++} // namespace Digikam
+diff --git a/libs/database/models/imagethumbnailmodel.h b/libs/database/models/imagethumbnailmodel.h
+new file mode 100644
+index 0000000..366ca65
+--- /dev/null
++++ b/libs/database/models/imagethumbnailmodel.h
+@@ -0,0 +1,140 @@
++/* ============================================================
++ *
++ * This file is a part of digiKam project
++ * http://www.digikam.org
++ *
++ * Date : 2009-03-05
++ * Description : Qt item model for database entries with support for thumbnail loading
++ *
++ * Copyright (C) 2009-2011 by Marcel Wiesweg <marcel dot wiesweg at gmx dot de>
++ * Copyright (C) 2011 by Gilles Caulier <caulier dot gilles at gmail dot com>
++ *
++ * This program is free software; you can redistribute it
++ * and/or modify it under the terms of the GNU General
++ * Public License as published by the Free Software Foundation;
++ * either version 2, or (at your option)
++ * any later version.
++ *
++ * This program is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++ * GNU General Public License for more details.
++ *
++ * ============================================================ */
++
++#ifndef IMAGETHUMBNAILMODEL_H
++#define IMAGETHUMBNAILMODEL_H
++
++// Local includes
++
++#include "imagemodel.h"
++#include "thumbnailsize.h"
++#include "digikam_export.h"
++
++namespace Digikam
++{
++
++class LoadingDescription;
++class ThumbnailLoadThread;
++
++class DIGIKAM_DATABASE_EXPORT ImageThumbnailModel : public ImageModel
++{
++ Q_OBJECT
++
++public:
++
++ /**
++ * An ImageModel that supports thumbnail loading.
++ * You need to set a ThumbnailLoadThread to enable thumbnail loading.
++ * Adjust the thumbnail size to your needs.
++ * Note that setKeepsFilePathCache is enabled per default.
++ */
++ explicit ImageThumbnailModel(QObject* parent);
++ ~ImageThumbnailModel();
++
++ /** Enable thumbnail loading and set the thread that shall be used.
++ * The thumbnail size of this thread will be adjusted.
++ */
++ void setThumbnailLoadThread(ThumbnailLoadThread* thread);
++ ThumbnailLoadThread* thumbnailLoadThread() const;
++
++ /// Set the thumbnail size to use
++ void setThumbnailSize(const ThumbnailSize& thumbSize);
++
++ /// If you want to fix a size for preloading, do it here.
++ void setPreloadThumbnailSize(const ThumbnailSize& thumbSize);
++
++ void setExifRotate(bool rotate);
++
++ /**
++ * Enable emitting dataChanged() when a thumbnail becomes available.
++ * The thumbnailAvailable() signal will be emitted in any case.
++ * Default is true.
++ */
++ void setEmitDataChanged(bool emitSignal);
++
++ /**
++ * Enable preloading of thumbnails:
++ * If preloading is enabled, for every entry in the model a thumbnail generation is started.
++ * Default: false.
++ */
++ void setPreloadThumbnails(bool preload);
++
++ ThumbnailSize thumbnailSize() const;
++
++ /**
++ * Handles the ThumbnailRole.
++ * If the pixmap is available, returns it in the QVariant.
++ * If it still needs to be loaded, returns a null QVariant and emits
++ * thumbnailAvailable() as soon as it is available.
++ */
++ virtual QVariant data(const QModelIndex& index, int role = Qt::DisplayRole) const;
++
++ /**
++ * You can override the current thumbnail size by giving an integer value for ThumbnailRole.
++ * Set a null QVariant to use the thumbnail size set by setThumbnailSize() again.
++ * The index given here is ignored for this purpose.
++ */
++ virtual bool setData(const QModelIndex& index, const QVariant& value, int role = Qt::DisplayRole);
++
++public Q_SLOTS:
++
++ /** Prepare the thumbnail loading for the given indexes
++ */
++ void prepareThumbnails(const QList<QModelIndex>& indexesToPrepare);
++ void prepareThumbnails(const QList<QModelIndex>& indexesToPrepare, const ThumbnailSize& thumbSize);
++
++ /**
++ * Preload thumbnail for the given infos resp. indexes.
++ * Note: Use setPreloadThumbnails to automatically preload all entries in the model.
++ * Note: This only ensures thumbnail generation. It is not guaranteed that pixmaps
++ * are stored in the cache. For thumbnails that are expect to be drawn immediately,
++ * include them in prepareThumbnails().
++ * Note: Stops preloading of previously added thumbnails.
++ */
++ void preloadThumbnails(const QList<ImageInfo>&);
++ void preloadThumbnails(const QList<QModelIndex>&);
++ void preloadAllThumbnails();
++
++Q_SIGNALS:
++
++ void thumbnailAvailable(const QModelIndex& index, int requestedSize);
++ void thumbnailFailed(const QModelIndex& index, int requestedSize);
++
++protected:
++
++ virtual void imageInfosCleared();
++
++protected Q_SLOTS:
++
++ void slotThumbnailLoaded(const LoadingDescription& loadingDescription, const QPixmap& thumb);
++
++private:
++
++ class ImageThumbnailModelPriv;
++ ImageThumbnailModelPriv* const d;
++};
++
++} // namespace Digikam
++
++#endif /* IMAGETHUMBNAILMODEL_H */
+diff --git a/libs/database/models/imageversionsmodel.cpp b/libs/database/models/imageversionsmodel.cpp
+new file mode 100644
+index 0000000..e6ba582
+--- /dev/null
++++ b/libs/database/models/imageversionsmodel.cpp
+@@ -0,0 +1,183 @@
++/* ============================================================
++ *
++ * This file is a part of digiKam project
++ * http://www.digikam.org
++ *
++ * Date : 2010-07-13
++ * Description : Model for image versions
++ *
++ * Copyright (C) 2010 by Martin Klapetek <martin dot klapetek at gmail dot com>
++ *
++ * This program is free software; you can redistribute it
++ * and/or modify it under the terms of the GNU General
++ * Public License as published by the Free Software Foundation;
++ * either version 2, or (at your option)
++ * any later version.
++ *
++ * This program is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++ * GNU General Public License for more details.
++ *
++ * ============================================================ */
++
++#include "imageversionsmodel.h"
++
++// KDE includes
++
++#include <klocalizedstring.h>
++
++// Local includes
++
++#include "digikam_debug.h"
++#include "workingwidget.h"
++
++namespace Digikam
++{
++
++class ImageVersionsModel::Private
++{
++public:
++
++ Private()
++ {
++ data = 0;
++ paintTree = false;
++ }
++
++ ///Complete paths with filenames and tree level
++ QList<QPair<QString, int> >* data;
++ ///This is for delegate to paint it as selected
++ QString currentSelectedImage;
++ ///If true, the delegate will paint items as a tree
++ ///if false, it will be painted as a list
++ bool paintTree;
++};
++
++ImageVersionsModel::ImageVersionsModel(QObject* parent)
++ : QAbstractListModel(parent),
++ d(new Private)
++{
++ d->data = new QList<QPair<QString, int> >;
++}
++
++ImageVersionsModel::~ImageVersionsModel()
++{
++ //qDeleteAll(d->data);
++ delete d;
++}
++
++Qt::ItemFlags ImageVersionsModel::flags(const QModelIndex& index) const
++{
++ if (!index.isValid())
++ {
++ return 0;
++ }
++
++ return Qt::ItemIsEnabled | Qt::ItemIsSelectable;
++}
++
++QVariant ImageVersionsModel::data(const QModelIndex& index, int role) const
++{
++ if (!index.isValid())
++ {
++ return QVariant();
++ }
++
++ if (role == Qt::DisplayRole && !d->data->isEmpty())
++ {
++ return d->data->at(index.row()).first;
++ }
++ else if (role == Qt::UserRole && !d->data->isEmpty())
++ {
++ return d->data->at(index.row()).second;
++ }
++ else if (role == Qt::DisplayRole && d->data->isEmpty())
++ {
++ //TODO: make this text Italic
++ return QVariant(QString(i18n("No image selected")));
++ }
++
++ return QVariant();
++}
++
++int ImageVersionsModel::rowCount(const QModelIndex& parent) const
++{
++ Q_UNUSED(parent)
++ return d->data->count();
++}
++
++void ImageVersionsModel::setupModelData(QList<QPair<QString, int> >& data)
++{
++ beginResetModel();
++
++ d->data->clear();
++
++ if (!data.isEmpty())
++ {
++ d->data->append(data);
++ }
++ else
++ {
++ d->data->append(qMakePair(QString(i18n("This is the original image")), 0));
++ }
++
++ endResetModel();
++}
++
++void ImageVersionsModel::clearModelData()
++{
++ beginResetModel();
++
++ if (!d->data->isEmpty())
++ {
++ d->data->clear();
++ }
++
++ endResetModel();
++}
++
++void ImageVersionsModel::slotAnimationStep()
++{
++ emit dataChanged(createIndex(0, 0), createIndex(rowCount()-1, 1));
++}
++
++QString ImageVersionsModel::currentSelectedImage() const
++{
++ return d->currentSelectedImage;
++}
++
++void ImageVersionsModel::setCurrentSelectedImage(const QString& path)
++{
++ d->currentSelectedImage = path;
++}
++
++QModelIndex ImageVersionsModel::currentSelectedImageIndex() const
++{
++ return index(listIndexOf(d->currentSelectedImage), 0);
++}
++
++bool ImageVersionsModel::paintTree() const
++{
++ return d->paintTree;
++}
++
++void ImageVersionsModel::setPaintTree(bool paint)
++{
++ d->paintTree = paint;
++}
++
++int ImageVersionsModel::listIndexOf(const QString& item) const
++{
++ for (int i = 0; i < d->data->size(); ++i)
++ {
++ if (d->data->at(i).first == item)
++ {
++ return i;
++ }
++ }
++
++ return -1;
++}
++
++} // namespace Digikam
+diff --git a/libs/database/models/imageversionsmodel.h b/libs/database/models/imageversionsmodel.h
+new file mode 100644
+index 0000000..ed08529
+--- /dev/null
++++ b/libs/database/models/imageversionsmodel.h
+@@ -0,0 +1,75 @@
++/* ============================================================
++ *
++ * This file is a part of digiKam project
++ * http://www.digikam.org
++ *
++ * Date : 2010-07-13
++ * Description : Model for image versions
++ *
++ * Copyright (C) 2010 by Martin Klapetek <martin dot klapetek at gmail dot com>
++ *
++ * This program is free software; you can redistribute it
++ * and/or modify it under the terms of the GNU General
++ * Public License as published by the Free Software Foundation;
++ * either version 2, or (at your option)
++ * any later version.
++ *
++ * This program is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++ * GNU General Public License for more details.
++ *
++ * ============================================================ */
++
++#ifndef IMAGEVERSIONSMODEL_H
++#define IMAGEVERSIONSMODEL_H
++
++// Qt includes
++
++#include <QModelIndex>
++#include <QPixmap>
++
++// Local includes
++
++#include "digikam_export.h"
++
++namespace Digikam
++{
++
++class DIGIKAM_DATABASE_EXPORT ImageVersionsModel : public QAbstractListModel
++{
++ Q_OBJECT
++
++public:
++
++ explicit ImageVersionsModel(QObject* parent = 0);
++ ~ImageVersionsModel();
++
++ Qt::ItemFlags flags(const QModelIndex& index) const;
++ QVariant data(const QModelIndex& index, int role = Qt::DisplayRole) const;
++ int rowCount(const QModelIndex& parent = QModelIndex()) const;
++
++ void setupModelData(QList<QPair<QString, int> >& data);
++ void clearModelData();
++
++ QString currentSelectedImage() const;
++ void setCurrentSelectedImage(const QString& path);
++ QModelIndex currentSelectedImageIndex() const;
++
++ bool paintTree() const;
++ int listIndexOf(const QString& item) const;
++
++public Q_SLOTS:
++
++ void slotAnimationStep();
++ void setPaintTree(bool paint);
++
++private:
++
++ class Private;
++ Private* const d;
++};
++
++} // namespace Digikam
++
++#endif // IMAGEVERSIONSMODEL_H
+diff --git a/libs/models/CMakeLists.txt b/libs/models/CMakeLists.txt
+index cbabfaa..804456b 100644
+--- a/libs/models/CMakeLists.txt
++++ b/libs/models/CMakeLists.txt
+@@ -9,18 +9,6 @@ if (POLICY CMP0063)
+ cmake_policy(SET CMP0063 NEW)
+ endif (POLICY CMP0063)
+
+-set(libdatabasemodels_SRCS
+- imagemodel.cpp
+- imagefiltermodel.cpp
+- imagefiltermodelpriv.cpp
+- imagefiltermodelthreads.cpp
+- imagefiltersettings.cpp
+- imagelistmodel.cpp
+- imagesortsettings.cpp
+- imagethumbnailmodel.cpp
+- imageversionsmodel.cpp
+-)
+-
+ set(libalbummodels_SRCS
+ imagealbummodel.cpp
+ imagealbumfiltermodel.cpp
+@@ -52,5 +40,4 @@ endif()
+ #for digikam core lib
+ add_library(digikamgenericmodels_src OBJECT ${libgenericmodels_SRCS})
+
+-add_library(digikamdatabasemodels_src OBJECT ${libdatabasemodels_SRCS})
+-add_library(digikammodels_src OBJECT ${libalbummodels_SRCS} ${libgenericmodels_SRCS})
++add_library(digikammodels_src OBJECT ${libalbummodels_SRCS} ${libgenericmodels_SRCS})
+diff --git a/libs/models/imagefiltermodel.cpp b/libs/models/imagefiltermodel.cpp
+deleted file mode 100644
+index 3d57e05..0000000
+--- a/libs/models/imagefiltermodel.cpp
++++ /dev/null
+@@ -1,1116 +0,0 @@
+-/* ============================================================
+- *
+- * This file is a part of digiKam project
+- * http://www.digikam.org
+- *
+- * Date : 2009-03-05
+- * Description : Qt item model for database entries
+- *
+- * Copyright (C) 2009-2011 by Marcel Wiesweg <marcel dot wiesweg at gmx dot de>
+- * Copyright (C) 2011-2017 by Gilles Caulier <caulier dot gilles at gmail dot com>
+- * Copyright (C) 2010 by Andi Clemens <andi dot clemens at gmail dot com>
+- * Copyright (C) 2011 by Michael G. Hansen <mike at mghansen dot de>
+- * Copyright (C) 2014 by Mohamed Anwer <m dot anwer at gmx dot com>
+- *
+- * This program is free software; you can redistribute it
+- * and/or modify it under the terms of the GNU General
+- * Public License as published by the Free Software Foundation;
+- * either version 2, or (at your option)
+- * any later version.
+- *
+- * This program is distributed in the hope that it will be useful,
+- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+- * GNU General Public License for more details.
+- *
+- * ============================================================ */
+-
+-#include "imagefiltermodel.h"
+-#include "imagefiltermodelpriv.h"
+-#include "imagefiltermodelthreads.h"
+-
+-// Local includes
+-
+-#include "digikam_debug.h"
+-#include "coredbaccess.h"
+-#include "coredbchangesets.h"
+-#include "coredbwatch.h"
+-#include "imageinfolist.h"
+-#include "imagemodel.h"
+-
+-namespace Digikam
+-{
+-
+-ImageSortFilterModel::ImageSortFilterModel(QObject* parent)
+- : DCategorizedSortFilterProxyModel(parent), m_chainedModel(0)
+-{
+-}
+-
+-void ImageSortFilterModel::setSourceImageModel(ImageModel* source)
+-{
+- if (m_chainedModel)
+- {
+- m_chainedModel->setSourceImageModel(source);
+- }
+- else
+- {
+- setDirectSourceImageModel(source);
+- }
+-}
+-
+-void ImageSortFilterModel::setSourceFilterModel(ImageSortFilterModel* source)
+-{
+- if (source)
+- {
+- ImageModel* const model = sourceImageModel();
+-
+- if (model)
+- {
+- source->setSourceImageModel(model);
+- }
+- }
+-
+- m_chainedModel = source;
+- setSourceModel(source);
+-}
+-
+-void ImageSortFilterModel::setDirectSourceImageModel(ImageModel* model)
+-{
+- setSourceModel(model);
+-}
+-
+-void ImageSortFilterModel::setSourceModel(QAbstractItemModel* model)
+-{
+- // made it protected, only setSourceImageModel is public
+- DCategorizedSortFilterProxyModel::setSourceModel(model);
+-}
+-
+-ImageModel* ImageSortFilterModel::sourceImageModel() const
+-{
+- if (m_chainedModel)
+- {
+- return m_chainedModel->sourceImageModel();
+- }
+-
+- return static_cast<ImageModel*>(sourceModel());
+-}
+-
+-ImageSortFilterModel* ImageSortFilterModel::sourceFilterModel() const
+-{
+- return m_chainedModel;
+-}
+-
+-ImageFilterModel* ImageSortFilterModel::imageFilterModel() const
+-{
+- // reimplemented in ImageFilterModel
+- if (m_chainedModel)
+- {
+- return m_chainedModel->imageFilterModel();
+- }
+-
+- return 0;
+-}
+-
+-QModelIndex ImageSortFilterModel::mapToSourceImageModel(const QModelIndex& index) const
+-{
+- if (m_chainedModel)
+- {
+- return m_chainedModel->mapToSourceImageModel(mapToSource(index));
+- }
+-
+- return mapToSource(index);
+-}
+-
+-QModelIndex ImageSortFilterModel::mapFromSourceImageModel(const QModelIndex& albummodel_index) const
+-{
+- if (m_chainedModel)
+- {
+- return mapFromSource(m_chainedModel->mapFromSourceImageModel(albummodel_index));
+- }
+-
+- return mapFromSource(albummodel_index);
+-}
+-
+-
+-QModelIndex ImageSortFilterModel::mapFromDirectSourceToSourceImageModel(const QModelIndex& sourceModel_index) const
+-{
+- if (m_chainedModel)
+- {
+- return m_chainedModel->mapToSourceImageModel(sourceModel_index);
+- }
+- return sourceModel_index;
+-}
+-
+-// -------------- Convenience mappers -------------------------------------------------------------------
+-
+-QList<QModelIndex> ImageSortFilterModel::mapListToSource(const QList<QModelIndex>& indexes) const
+-{
+- QList<QModelIndex> sourceIndexes;
+- foreach(const QModelIndex& index, indexes)
+- {
+- sourceIndexes << mapToSourceImageModel(index);
+- }
+- return sourceIndexes;
+-}
+-
+-QList<QModelIndex> ImageSortFilterModel::mapListFromSource(const QList<QModelIndex>& sourceIndexes) const
+-{
+- QList<QModelIndex> indexes;
+- foreach(const QModelIndex& index, sourceIndexes)
+- {
+- indexes << mapFromSourceImageModel(index);
+- }
+- return indexes;
+-}
+-
+-ImageInfo ImageSortFilterModel::imageInfo(const QModelIndex& index) const
+-{
+- return sourceImageModel()->imageInfo(mapToSourceImageModel(index));
+-}
+-
+-qlonglong ImageSortFilterModel::imageId(const QModelIndex& index) const
+-{
+- return sourceImageModel()->imageId(mapToSourceImageModel(index));
+-}
+-
+-QList<ImageInfo> ImageSortFilterModel::imageInfos(const QList<QModelIndex>& indexes) const
+-{
+- QList<ImageInfo> infos;
+- ImageModel* const model = sourceImageModel();
+-
+- foreach(const QModelIndex& index, indexes)
+- {
+- infos << model->imageInfo(mapToSourceImageModel(index));
+- }
+-
+- return infos;
+-}
+-
+-QList<qlonglong> ImageSortFilterModel::imageIds(const QList<QModelIndex>& indexes) const
+-{
+- QList<qlonglong> ids;
+- ImageModel* const model = sourceImageModel();
+-
+- foreach(const QModelIndex& index, indexes)
+- {
+- ids << model->imageId(mapToSourceImageModel(index));
+- }
+-
+- return ids;
+-}
+-
+-QModelIndex ImageSortFilterModel::indexForPath(const QString& filePath) const
+-{
+- return mapFromSourceImageModel(sourceImageModel()->indexForPath(filePath));
+-}
+-
+-QModelIndex ImageSortFilterModel::indexForImageInfo(const ImageInfo& info) const
+-{
+- return mapFromSourceImageModel(sourceImageModel()->indexForImageInfo(info));
+-}
+-
+-QModelIndex ImageSortFilterModel::indexForImageId(qlonglong id) const
+-{
+- return mapFromSourceImageModel(sourceImageModel()->indexForImageId(id));
+-}
+-
+-QList<ImageInfo> ImageSortFilterModel::imageInfosSorted() const
+-{
+- QList<ImageInfo> infos;
+- const int size = rowCount();
+- ImageModel* const model = sourceImageModel();
+-
+- for (int i=0; i<size; ++i)
+- {
+- infos << model->imageInfo(mapToSourceImageModel(index(i, 0)));
+- }
+-
+- return infos;
+-}
+-
+-// --------------------------------------------------------------------------------------------
+-
+-ImageFilterModel::ImageFilterModel(QObject* parent)
+- : ImageSortFilterModel(parent),
+- d_ptr(new ImageFilterModelPrivate)
+-{
+- d_ptr->init(this);
+-}
+-
+-ImageFilterModel::ImageFilterModel(ImageFilterModelPrivate& dd, QObject* parent)
+- : ImageSortFilterModel(parent),
+- d_ptr(&dd)
+-{
+- d_ptr->init(this);
+-}
+-
+-ImageFilterModel::~ImageFilterModel()
+-{
+- Q_D(ImageFilterModel);
+- delete d;
+-}
+-
+-void ImageFilterModel::setDirectSourceImageModel(ImageModel* sourceModel)
+-{
+- Q_D(ImageFilterModel);
+-
+- if (d->imageModel)
+- {
+- d->imageModel->unsetPreprocessor(d);
+- disconnect(d->imageModel, SIGNAL(modelReset()),
+- this, SLOT(slotModelReset()));
+- slotModelReset();
+- }
+-
+- d->imageModel = sourceModel;
+-
+- if (d->imageModel)
+- {
+- d->imageModel->setPreprocessor(d);
+-
+- connect(d->imageModel, SIGNAL(preprocess(QList<ImageInfo>,QList<QVariant>)),
+- d, SLOT(preprocessInfos(QList<ImageInfo>,QList<QVariant>)));
+-
+- connect(d->imageModel, SIGNAL(processAdded(QList<ImageInfo>,QList<QVariant>)),
+- d, SLOT(processAddedInfos(QList<ImageInfo>,QList<QVariant>)));
+-
+- connect(d, SIGNAL(reAddImageInfos(QList<ImageInfo>,QList<QVariant>)),
+- d->imageModel, SLOT(reAddImageInfos(QList<ImageInfo>,QList<QVariant>)));
+-
+- connect(d, SIGNAL(reAddingFinished()),
+- d->imageModel, SLOT(reAddingFinished()));
+-
+- connect(d->imageModel, SIGNAL(modelReset()),
+- this, SLOT(slotModelReset()));
+-
+- connect(d->imageModel, SIGNAL(imageChange(ImageChangeset,QItemSelection)),
+- this, SLOT(slotImageChange(ImageChangeset)));
+-
+- connect(d->imageModel, SIGNAL(imageTagChange(ImageTagChangeset,QItemSelection)),
+- this, SLOT(slotImageTagChange(ImageTagChangeset)));
+- }
+-
+- setSourceModel(d->imageModel);
+-}
+-
+-QVariant ImageFilterModel::data(const QModelIndex& index, int role) const
+-{
+- Q_D(const ImageFilterModel);
+-
+- if (!index.isValid())
+- {
+- return QVariant();
+- }
+-
+- switch (role)
+- {
+- // Attention: This breaks should there ever be another filter model between this and the ImageModel
+-
+- case DCategorizedSortFilterProxyModel::CategoryDisplayRole:
+- return categoryIdentifier(d->imageModel->imageInfoRef(mapToSource(index)));
+- case CategorizationModeRole:
+- return d->sorter.categorizationMode;
+- case SortOrderRole:
+- return d->sorter.sortRole;
+- //case CategoryCountRole:
+- // return categoryCount(d->imageModel->imageInfoRef(mapToSource(index)));
+- case CategoryAlbumIdRole:
+- return d->imageModel->imageInfoRef(mapToSource(index)).albumId();
+- case CategoryFormatRole:
+- return d->imageModel->imageInfoRef(mapToSource(index)).format();
+- case GroupIsOpenRole:
+- return d->groupFilter.isAllOpen() ||
+- d->groupFilter.isOpen(d->imageModel->imageInfoRef(mapToSource(index)).id());
+- case ImageFilterModelPointerRole:
+- return QVariant::fromValue(const_cast<ImageFilterModel*>(this));
+- }
+-
+- return DCategorizedSortFilterProxyModel::data(index, role);
+-}
+-
+-ImageFilterModel* ImageFilterModel::imageFilterModel() const
+-{
+- return const_cast<ImageFilterModel*>(this);
+-}
+-
+-DatabaseFields::Set ImageFilterModel::suggestedWatchFlags() const
+-{
+- DatabaseFields::Set watchFlags;
+- watchFlags |= DatabaseFields::Name | DatabaseFields::FileSize | DatabaseFields::ModificationDate;
+- watchFlags |= DatabaseFields::Rating | DatabaseFields::CreationDate | DatabaseFields::Orientation |
+- DatabaseFields::Width | DatabaseFields::Height;
+- watchFlags |= DatabaseFields::Comment;
+- watchFlags |= DatabaseFields::ImageRelations;
+- return watchFlags;
+-}
+-
+-// -------------- Filter settings --------------
+-
+-void ImageFilterModel::setDayFilter(const QList<QDateTime>& days)
+-{
+- Q_D(ImageFilterModel);
+- d->filter.setDayFilter(days);
+- setImageFilterSettings(d->filter);
+-}
+-
+-void ImageFilterModel::setTagFilter(const QList<int>& includedTags, const QList<int>& excludedTags,
+- ImageFilterSettings::MatchingCondition matchingCond,
+- bool showUnTagged, const QList<int>& clTagIds, const QList<int>& plTagIds)
+-{
+- Q_D(ImageFilterModel);
+- d->filter.setTagFilter(includedTags, excludedTags, matchingCond, showUnTagged, clTagIds, plTagIds);
+- setImageFilterSettings(d->filter);
+-}
+-
+-void ImageFilterModel::setRatingFilter(int rating, ImageFilterSettings::RatingCondition ratingCond, bool isUnratedExcluded)
+-{
+- Q_D(ImageFilterModel);
+- d->filter.setRatingFilter(rating, ratingCond, isUnratedExcluded);
+- setImageFilterSettings(d->filter);
+-}
+-
+-void ImageFilterModel::setUrlWhitelist(const QList<QUrl> urlList, const QString& id)
+-{
+- Q_D(ImageFilterModel);
+- d->filter.setUrlWhitelist(urlList, id);
+- setImageFilterSettings(d->filter);
+-}
+-
+-void ImageFilterModel::setIdWhitelist(const QList<qlonglong>& idList, const QString& id)
+-{
+- Q_D(ImageFilterModel);
+- d->filter.setIdWhitelist(idList, id);
+- setImageFilterSettings(d->filter);
+-}
+-
+-void ImageFilterModel::setMimeTypeFilter(int mimeTypeFilter)
+-{
+- Q_D(ImageFilterModel);
+- d->filter.setMimeTypeFilter(mimeTypeFilter);
+- setImageFilterSettings(d->filter);
+-}
+-
+-void ImageFilterModel::setGeolocationFilter(const ImageFilterSettings::GeolocationCondition& condition)
+-{
+- Q_D(ImageFilterModel);
+- d->filter.setGeolocationFilter(condition);
+- setImageFilterSettings(d->filter);
+-}
+-
+-void ImageFilterModel::setTextFilter(const SearchTextFilterSettings& settings)
+-{
+- Q_D(ImageFilterModel);
+- d->filter.setTextFilter(settings);
+- setImageFilterSettings(d->filter);
+-}
+-
+-void ImageFilterModel::setImageFilterSettings(const ImageFilterSettings& settings)
+-{
+- Q_D(ImageFilterModel);
+-
+- {
+- QMutexLocker lock(&d->mutex);
+- d->version++;
+- d->filter = settings;
+- d->filterCopy = settings;
+- d->versionFilterCopy = d->versionFilter;
+- d->groupFilterCopy = d->groupFilter;
+-
+- d->needPrepareComments = settings.isFilteringByText();
+- d->needPrepareTags = settings.isFilteringByTags();
+- d->needPrepareGroups = true;
+- d->needPrepare = d->needPrepareComments || d->needPrepareTags || d->needPrepareGroups;
+-
+- d->hasOneMatch = false;
+- d->hasOneMatchForText = false;
+- }
+-
+- d->filterResults.clear();
+-
+- //d->categoryCountHashInt.clear();
+- //d->categoryCountHashString.clear();
+- if (d->imageModel)
+- {
+- d->infosToProcess(d->imageModel->imageInfos());
+- }
+-
+- emit filterSettingsChanged(settings);
+-}
+-
+-void ImageFilterModel::setVersionManagerSettings(const VersionManagerSettings& settings)
+-{
+- Q_D(ImageFilterModel);
+- d->versionFilter.setVersionManagerSettings(settings);
+- setVersionImageFilterSettings(d->versionFilter);
+-}
+-
+-void ImageFilterModel::setExceptionList(const QList<qlonglong>& idList, const QString& id)
+-{
+- Q_D(ImageFilterModel);
+- d->versionFilter.setExceptionList(idList, id);
+- setVersionImageFilterSettings(d->versionFilter);
+-}
+-
+-void ImageFilterModel::setVersionImageFilterSettings(const VersionImageFilterSettings& settings)
+-{
+- Q_D(ImageFilterModel);
+- d->versionFilter = settings;
+- slotUpdateFilter();
+-}
+-
+-bool ImageFilterModel::isGroupOpen(qlonglong group) const
+-{
+- Q_D(const ImageFilterModel);
+- return d->groupFilter.isOpen(group);
+-}
+-
+-bool ImageFilterModel::isAllGroupsOpen() const
+-{
+- Q_D(const ImageFilterModel);
+- return d->groupFilter.isAllOpen();
+-}
+-
+-void ImageFilterModel::setGroupOpen(qlonglong group, bool open)
+-{
+- Q_D(ImageFilterModel);
+- d->groupFilter.setOpen(group, open);
+- setGroupImageFilterSettings(d->groupFilter);
+-}
+-
+-void ImageFilterModel::toggleGroupOpen(qlonglong group)
+-{
+- setGroupOpen(group, !isGroupOpen(group));
+-}
+-
+-void ImageFilterModel::setAllGroupsOpen(bool open)
+-{
+- Q_D(ImageFilterModel);
+- d->groupFilter.setAllOpen(open);
+- setGroupImageFilterSettings(d->groupFilter);
+-}
+-
+-void ImageFilterModel::setGroupImageFilterSettings(const GroupImageFilterSettings& settings)
+-{
+- Q_D(ImageFilterModel);
+- d->groupFilter = settings;
+- slotUpdateFilter();
+-}
+-
+-void ImageFilterModel::slotUpdateFilter()
+-{
+- Q_D(ImageFilterModel);
+- setImageFilterSettings(d->filter);
+-}
+-
+-ImageFilterSettings ImageFilterModel::imageFilterSettings() const
+-{
+- Q_D(const ImageFilterModel);
+- return d->filter;
+-}
+-
+-ImageSortSettings ImageFilterModel::imageSortSettings() const
+-{
+- Q_D(const ImageFilterModel);
+- return d->sorter;
+-}
+-
+-VersionImageFilterSettings ImageFilterModel::versionImageFilterSettings() const
+-{
+- Q_D(const ImageFilterModel);
+- return d->versionFilter;
+-}
+-
+-GroupImageFilterSettings ImageFilterModel::groupImageFilterSettings() const
+-{
+- Q_D(const ImageFilterModel);
+- return d->groupFilter;
+-}
+-
+-void ImageFilterModel::slotModelReset()
+-{
+- Q_D(ImageFilterModel);
+- {
+- QMutexLocker lock(&d->mutex);
+- // discard all packages on the way that are marked as send out for re-add
+- d->lastDiscardVersion = d->version;
+- d->sentOutForReAdd = 0;
+- // discard all packages on the way
+- d->version++;
+- d->sentOut = 0;
+-
+- d->hasOneMatch = false;
+- d->hasOneMatchForText = false;
+- }
+- d->filterResults.clear();
+-}
+-
+-bool ImageFilterModel::filterAcceptsRow(int source_row, const QModelIndex& source_parent) const
+-{
+- Q_D(const ImageFilterModel);
+-
+- if (source_parent.isValid())
+- {
+- return false;
+- }
+-
+- qlonglong id = d->imageModel->imageId(source_row);
+- QHash<qlonglong, bool>::const_iterator it = d->filterResults.constFind(id);
+-
+- if (it != d->filterResults.constEnd())
+- {
+- return it.value();
+- }
+-
+- // usually done in thread and cache, unless source model changed
+- ImageInfo info = d->imageModel->imageInfo(source_row);
+- bool match = d->filter.matches(info);
+- match = match ? d->versionFilter.matches(info) : false;
+-
+- return match ? d->groupFilter.matches(info) : false;
+-}
+-
+-void ImageFilterModel::setSendImageInfoSignals(bool sendSignals)
+-{
+- if (sendSignals)
+- {
+- connect(this, SIGNAL(rowsInserted(QModelIndex,int,int)),
+- this, SLOT(slotRowsInserted(QModelIndex,int,int)));
+-
+- connect(this, SIGNAL(rowsAboutToBeRemoved(QModelIndex,int,int)),
+- this, SLOT(slotRowsAboutToBeRemoved(QModelIndex,int,int)));
+- }
+- else
+- {
+- disconnect(this, SIGNAL(rowsInserted(QModelIndex,int,int)),
+- this, SLOT(slotRowsInserted(QModelIndex,int,int)));
+-
+- disconnect(this, SIGNAL(rowsAboutToBeRemoved(QModelIndex,int,int)),
+- this, SLOT(slotRowsAboutToBeRemoved(QModelIndex,int,int)));
+- }
+-}
+-
+-void ImageFilterModel::slotRowsInserted(const QModelIndex& /*parent*/, int start, int end)
+-{
+- QList<ImageInfo> infos;
+-
+- for (int i=start; i<=end; ++i)
+- {
+- infos << imageInfo(index(i, 0));
+- }
+-
+- emit imageInfosAdded(infos);
+-}
+-
+-void ImageFilterModel::slotRowsAboutToBeRemoved(const QModelIndex& /*parent*/, int start, int end)
+-{
+- QList<ImageInfo> infos;
+-
+- for (int i=start; i<=end; ++i)
+- {
+- infos << imageInfo(index(i, 0));
+- }
+-
+- emit imageInfosAboutToBeRemoved(infos);
+-}
+-
+-// -------------- Threaded preparation & filtering --------------
+-
+-void ImageFilterModel::addPrepareHook(ImageFilterModelPrepareHook* hook)
+-{
+- Q_D(ImageFilterModel);
+- QMutexLocker lock(&d->mutex);
+- d->prepareHooks << hook;
+-}
+-
+-void ImageFilterModel::removePrepareHook(ImageFilterModelPrepareHook* hook)
+-{
+- Q_D(ImageFilterModel);
+- QMutexLocker lock(&d->mutex);
+- d->prepareHooks.removeAll(hook);
+-}
+-
+-void ImageFilterModelPreparer::process(ImageFilterModelTodoPackage package)
+-{
+- if (!checkVersion(package))
+- {
+- emit discarded(package);
+- return;
+- }
+-
+- // get thread-local copy
+- bool needPrepareTags, needPrepareComments, needPrepareGroups;
+- QList<ImageFilterModelPrepareHook*> prepareHooks;
+- {
+- QMutexLocker lock(&d->mutex);
+- needPrepareTags = d->needPrepareTags;
+- needPrepareComments = d->needPrepareComments;
+- needPrepareGroups = d->needPrepareGroups;
+- prepareHooks = d->prepareHooks;
+- }
+-
+- //TODO: Make efficient!!
+- if (needPrepareComments)
+- {
+- foreach(const ImageInfo& info, package.infos)
+- {
+- info.comment();
+- }
+- }
+-
+- if (!checkVersion(package))
+- {
+- emit discarded(package);
+- return;
+- }
+-
+- // The downside of QVector: At some point, we may need a QList for an API.
+- // Nonetheless, QList and ImageInfo is fast. We could as well
+- // reimplement ImageInfoList to ImageInfoVector (internally with templates?)
+- ImageInfoList infoList;
+-
+- if (needPrepareTags || needPrepareGroups)
+- {
+- infoList = package.infos.toList();
+- }
+-
+- if (needPrepareTags)
+- {
+- infoList.loadTagIds();
+- }
+-
+- if (needPrepareGroups)
+- {
+- infoList.loadGroupImageIds();
+- }
+-
+- foreach(ImageFilterModelPrepareHook* hook, prepareHooks)
+- {
+- hook->prepare(package.infos);
+- }
+-
+- emit processed(package);
+-}
+-
+-void ImageFilterModelFilterer::process(ImageFilterModelTodoPackage package)
+-{
+- if (!checkVersion(package))
+- {
+- emit discarded(package);
+- return;
+- }
+-
+- // get thread-local copy
+- ImageFilterSettings localFilter;
+- VersionImageFilterSettings localVersionFilter;
+- GroupImageFilterSettings localGroupFilter;
+- bool hasOneMatch;
+- bool hasOneMatchForText;
+- {
+- QMutexLocker lock(&d->mutex);
+- localFilter = d->filterCopy;
+- localVersionFilter = d->versionFilterCopy;
+- localGroupFilter = d->groupFilterCopy;
+- hasOneMatch = d->hasOneMatch;
+- hasOneMatchForText = d->hasOneMatchForText;
+- }
+-
+- // Actual filtering. The variants to spare checking hasOneMatch over and over again.
+- if (hasOneMatch && hasOneMatchForText)
+- {
+- foreach(const ImageInfo& info, package.infos)
+- {
+- package.filterResults[info.id()] = localFilter.matches(info) &&
+- localVersionFilter.matches(info) &&
+- localGroupFilter.matches(info);
+- }
+- }
+- else if (hasOneMatch)
+- {
+- bool matchForText;
+-
+- foreach(const ImageInfo& info, package.infos)
+- {
+- package.filterResults[info.id()] = localFilter.matches(info, &matchForText) &&
+- localVersionFilter.matches(info) &&
+- localGroupFilter.matches(info);
+-
+- if (matchForText)
+- {
+- hasOneMatchForText = true;
+- }
+- }
+- }
+- else
+- {
+- bool result, matchForText;
+-
+- foreach(const ImageInfo& info, package.infos)
+- {
+- result = localFilter.matches(info, &matchForText) &&
+- localVersionFilter.matches(info) &&
+- localGroupFilter.matches(info);
+- package.filterResults[info.id()] = result;
+-
+- if (result)
+- {
+- hasOneMatch = true;
+- }
+-
+- if (matchForText)
+- {
+- hasOneMatchForText = true;
+- }
+- }
+- }
+-
+- if (checkVersion(package))
+- {
+- QMutexLocker lock(&d->mutex);
+- d->hasOneMatch = hasOneMatch;
+- d->hasOneMatchForText = hasOneMatchForText;
+- }
+-
+- emit processed(package);
+-}
+-
+-// -------------- Sorting and Categorization -------------------------------------------------------
+-
+-void ImageFilterModel::setImageSortSettings(const ImageSortSettings& sorter)
+-{
+- Q_D(ImageFilterModel);
+- d->sorter = sorter;
+- setCategorizedModel(d->sorter.categorizationMode != ImageSortSettings::NoCategories);
+- invalidate();
+-}
+-
+-void ImageFilterModel::setCategorizationMode(ImageSortSettings::CategorizationMode mode)
+-{
+- Q_D(ImageFilterModel);
+- d->sorter.setCategorizationMode(mode);
+- setImageSortSettings(d->sorter);
+-}
+-
+-void ImageFilterModel::setCategorizationSortOrder(ImageSortSettings::SortOrder order)
+-{
+- Q_D(ImageFilterModel);
+- d->sorter.setCategorizationSortOrder(order);
+- setImageSortSettings(d->sorter);
+-}
+-
+-void ImageFilterModel::setSortRole(ImageSortSettings::SortRole role)
+-{
+- Q_D(ImageFilterModel);
+- d->sorter.setSortRole(role);
+- setImageSortSettings(d->sorter);
+-}
+-
+-void ImageFilterModel::setSortOrder(ImageSortSettings::SortOrder order)
+-{
+- Q_D(ImageFilterModel);
+- d->sorter.setSortOrder(order);
+- setImageSortSettings(d->sorter);
+-}
+-
+-void ImageFilterModel::setStringTypeNatural(bool natural)
+-{
+- Q_D(ImageFilterModel);
+- d->sorter.setStringTypeNatural(natural);
+- setImageSortSettings(d->sorter);
+-}
+-
+-int ImageFilterModel::compareCategories(const QModelIndex& left, const QModelIndex& right) const
+-{
+- // source indexes
+- Q_D(const ImageFilterModel);
+-
+- if (!d->sorter.isCategorized())
+- {
+- return 0;
+- }
+-
+- if (!left.isValid() || !right.isValid())
+- {
+- return -1;
+- }
+-
+- const ImageInfo& leftInfo = d->imageModel->imageInfoRef(left);
+- const ImageInfo& rightInfo = d->imageModel->imageInfoRef(right);
+-
+- // Check grouping
+- qlonglong leftGroupImageId = leftInfo.groupImageId();
+- qlonglong rightGroupImageId = rightInfo.groupImageId();
+-
+- return compareInfosCategories(leftGroupImageId == -1 ? leftInfo : ImageInfo(leftGroupImageId),
+- rightGroupImageId == -1 ? rightInfo : ImageInfo(rightGroupImageId));
+-}
+-
+-bool ImageFilterModel::subSortLessThan(const QModelIndex& left, const QModelIndex& right) const
+-{
+- // source indexes
+- Q_D(const ImageFilterModel);
+-
+- if (!left.isValid() || !right.isValid())
+- {
+- return true;
+- }
+-
+- if (left == right)
+- {
+- return false;
+- }
+-
+- const ImageInfo& leftInfo = d->imageModel->imageInfoRef(left);
+- const ImageInfo& rightInfo = d->imageModel->imageInfoRef(right);
+-
+- if (leftInfo == rightInfo)
+- {
+- return d->sorter.lessThan(left.data(ImageModel::ExtraDataRole), right.data(ImageModel::ExtraDataRole));
+- }
+-
+- // Check grouping
+- qlonglong leftGroupImageId = leftInfo.groupImageId();
+- qlonglong rightGroupImageId = rightInfo.groupImageId();
+-
+- // Either no grouping (-1), or same group image, or same image
+- if (leftGroupImageId == rightGroupImageId)
+- {
+- return infosLessThan(leftInfo, rightInfo);
+- }
+-
+- // We have grouping to handle
+-
+- // Is one grouped on the other? Sort behind leader.
+- if (leftGroupImageId == rightInfo.id())
+- {
+- return false;
+- }
+- if (rightGroupImageId == leftInfo.id())
+- {
+- return true;
+- }
+-
+- // Use the group leader for sorting
+- return infosLessThan(leftGroupImageId == -1 ? leftInfo : ImageInfo(leftGroupImageId),
+- rightGroupImageId == -1 ? rightInfo : ImageInfo(rightGroupImageId));
+-}
+-
+-int ImageFilterModel::compareInfosCategories(const ImageInfo& left, const ImageInfo& right) const
+-{
+- // Note: reimplemented in ImageAlbumFilterModel
+- Q_D(const ImageFilterModel);
+- return d->sorter.compareCategories(left, right);
+-}
+-
+-// Feel free to optimize. QString::number is 3x slower.
+-static inline QString fastNumberToString(int id)
+-{
+- const int size = sizeof(int) * 2;
+- char c[size+1];
+- c[size] = '\0';
+- char* p = c;
+- int number = id;
+-
+- for (int i=0; i<size; ++i)
+- {
+- *p = 'a' + (number & 0xF);
+- number >>= 4;
+- ++p;
+- }
+-
+- return QString::fromLatin1(c);
+-}
+-
+-QString ImageFilterModel::categoryIdentifier(const ImageInfo& i) const
+-{
+- Q_D(const ImageFilterModel);
+-
+- if (!d->sorter.isCategorized())
+- {
+- return QString();
+- }
+-
+- qlonglong groupedImageId = i.groupImageId();
+- ImageInfo info = groupedImageId == -1 ? i : ImageInfo(groupedImageId);
+-
+- switch (d->sorter.categorizationMode)
+- {
+- case ImageSortSettings::NoCategories:
+- return QString();
+- case ImageSortSettings::OneCategory:
+- return QString();
+- case ImageSortSettings::CategoryByAlbum:
+- return fastNumberToString(info.albumId());
+- case ImageSortSettings::CategoryByFormat:
+- return info.format();
+- default:
+- return QString();
+- }
+-}
+-
+-bool ImageFilterModel::infosLessThan(const ImageInfo& left, const ImageInfo& right) const
+-{
+- Q_D(const ImageFilterModel);
+- return d->sorter.lessThan(left, right);
+-}
+-
+-// -------------- Watching changes -----------------------------------------------------------------
+-
+-void ImageFilterModel::slotImageTagChange(const ImageTagChangeset& changeset)
+-{
+- Q_D(ImageFilterModel);
+-
+- if (!d->imageModel || d->imageModel->isEmpty())
+- {
+- return;
+- }
+-
+- // already scheduled to re-filter?
+- if (d->updateFilterTimer->isActive())
+- {
+- return;
+- }
+-
+- // do we filter at all?
+- if (!d->versionFilter.isFilteringByTags() &&
+- !d->filter.isFilteringByTags() &&
+- !d->filter.isFilteringByText())
+- {
+- return;
+- }
+-
+- // is one of our images affected?
+- foreach(const qlonglong& id, changeset.ids())
+- {
+- // if one matching image id is found, trigger a refresh
+- if (d->imageModel->hasImage(id))
+- {
+- d->updateFilterTimer->start();
+- return;
+- }
+- }
+-}
+-
+-void ImageFilterModel::slotImageChange(const ImageChangeset& changeset)
+-{
+- Q_D(ImageFilterModel);
+-
+- if (!d->imageModel || d->imageModel->isEmpty())
+- {
+- return;
+- }
+-
+- // already scheduled to re-filter?
+- if (d->updateFilterTimer->isActive())
+- {
+- return;
+- }
+-
+- // is one of the values affected that we filter or sort by?
+- DatabaseFields::Set set = changeset.changes();
+- bool sortAffected = (set & d->sorter.watchFlags());
+- bool filterAffected = (set & d->filter.watchFlags()) || (set & d->groupFilter.watchFlags());
+-
+- if (!sortAffected && !filterAffected)
+- {
+- return;
+- }
+-
+- // is one of our images affected?
+- bool imageAffected = false;
+-
+- foreach(const qlonglong& id, changeset.ids())
+- {
+- // if one matching image id is found, trigger a refresh
+- if (d->imageModel->hasImage(id))
+- {
+- imageAffected = true;
+- break;
+- }
+- }
+-
+- if (!imageAffected)
+- {
+- return;
+- }
+-
+- if (filterAffected)
+- {
+- d->updateFilterTimer->start();
+- }
+- else
+- {
+- invalidate(); // just resort, reuse filter results
+- }
+-}
+-
+-// -------------------------------------------------------------------------------------------------------
+-
+-NoDuplicatesImageFilterModel::NoDuplicatesImageFilterModel(QObject* parent)
+- : ImageSortFilterModel(parent)
+-{
+-}
+-
+-bool NoDuplicatesImageFilterModel::filterAcceptsRow(int source_row, const QModelIndex& source_parent) const
+-{
+- QModelIndex index = sourceModel()->index(source_row, 0, source_parent);
+-
+- if (index.data(ImageModel::ExtraDataDuplicateCount).toInt() <= 1)
+- {
+- return true;
+- }
+-
+- QModelIndex previousIndex = sourceModel()->index(source_row - 1, 0, source_parent);
+-
+- if (!previousIndex.isValid())
+- {
+- return true;
+- }
+-
+- if (sourceImageModel()->imageId(mapFromDirectSourceToSourceImageModel(index)) == sourceImageModel()->imageId(mapFromDirectSourceToSourceImageModel(previousIndex)))
+- {
+- return false;
+- }
+- return true;
+-}
+-
+-/*
+-void NoDuplicatesImageFilterModel::setSourceModel(QAbstractItemModel* model)
+-{
+- if (sourceModel())
+- {
+- }
+-
+- ImageSortFilterModel::setSourceModel(model);
+-
+- if (sourceModel())
+- {
+- connect(sourceModel(), SIGNAL(rowsAboutToBeRemoved(QModelIndex,int,int)),
+- this, SLOT(slotRowsAboutToBeRemoved(QModelIndex,int,int)));
+- }
+-}
+-
+-void NoDuplicatesImageFilterModel::slotRowsAboutToBeRemoved(const QModelIndex& parent, int begin, int end)
+-{
+- bool needInvalidate = false;
+-
+- for (int i = begin; i<=end; ++i)
+- {
+- QModelIndex index = sourceModel()->index(i, 0, parent);
+-
+- // filtered out by us?
+- if (!mapFromSource(index).isValid())
+- {
+- continue;
+- }
+-
+- QModelIndex sourceIndex = mapFromDirectSourceToSourceImageModel(index);
+- qlonglong id = sourceImageModel()->imageId(sourceIndex);
+-
+- if (sourceImageModel()->numberOfIndexesForImageId(id) > 1)
+- {
+- needInvalidate = true;
+- }
+- }
+-}*/
+-
+-} // namespace Digikam
+diff --git a/libs/models/imagefiltermodel.h b/libs/models/imagefiltermodel.h
+deleted file mode 100644
+index d131b3e..0000000
+--- a/libs/models/imagefiltermodel.h
++++ /dev/null
+@@ -1,299 +0,0 @@
+-/* ============================================================
+- *
+- * This file is a part of digiKam project
+- * http://www.digikam.org
+- *
+- * Date : 2009-03-05
+- * Description : Qt item model for database entries
+- *
+- * Copyright (C) 2009-2011 by Marcel Wiesweg <marcel dot wiesweg at gmx dot de>
+- * Copyright (C) 2011 by Gilles Caulier <caulier dot gilles at gmail dot com>
+- * Copyright (C) 2010 by Andi Clemens <andi dot clemens at gmail dot com>
+- * Copyright (C) 2011 by Michael G. Hansen <mike at mghansen dot de>
+- * Copyright (C) 2014 by Mohamed Anwer <m dot anwer at gmx dot com>
+- *
+- * This program is free software; you can redistribute it
+- * and/or modify it under the terms of the GNU General
+- * Public License as published by the Free Software Foundation;
+- * either version 2, or (at your option)
+- * any later version.
+- *
+- * This program is distributed in the hope that it will be useful,
+- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+- * GNU General Public License for more details.
+- *
+- * ============================================================ */
+-
+-#ifndef IMAGEFILTERMODEL_H
+-#define IMAGEFILTERMODEL_H
+-
+-// Local includes
+-
+-#include "dcategorizedsortfilterproxymodel.h"
+-#include "textfilter.h"
+-#include "imagefiltersettings.h"
+-#include "imagemodel.h"
+-#include "imagesortsettings.h"
+-#include "digikam_export.h"
+-
+-namespace Digikam
+-{
+-
+-class ImageChangeset;
+-class ImageFilterModel;
+-class ImageTagChangeset;
+-
+-class DIGIKAM_DATABASE_EXPORT ImageFilterModelPrepareHook
+-{
+-public:
+-
+- virtual ~ImageFilterModelPrepareHook() {};
+- virtual void prepare(const QVector<ImageInfo>& infos) = 0;
+-};
+-
+-// -----------------------------------------------------------------------------------------------
+-
+-class DIGIKAM_DATABASE_EXPORT ImageSortFilterModel : public DCategorizedSortFilterProxyModel
+-{
+- Q_OBJECT
+-
+-public:
+-
+- explicit ImageSortFilterModel(QObject* parent = 0);
+-
+- void setSourceImageModel(ImageModel* model);
+- ImageModel* sourceImageModel() const;
+-
+- void setSourceFilterModel(ImageSortFilterModel* model);
+- ImageSortFilterModel* sourceFilterModel() const;
+-
+- QModelIndex mapToSourceImageModel(const QModelIndex& index) const;
+- QModelIndex mapFromSourceImageModel(const QModelIndex& imagemodel_index) const;
+- QModelIndex mapFromDirectSourceToSourceImageModel(const QModelIndex& sourceModel_index) const;
+-
+- /// Convenience methods mapped to ImageModel.
+- /// Mentioned indexes returned come from the source image model.
+- QList<QModelIndex> mapListToSource(const QList<QModelIndex>& indexes) const;
+- QList<QModelIndex> mapListFromSource(const QList<QModelIndex>& sourceIndexes) const;
+-
+- ImageInfo imageInfo(const QModelIndex& index) const;
+- qlonglong imageId(const QModelIndex& index) const;
+- QList<ImageInfo> imageInfos(const QList<QModelIndex>& indexes) const;
+- QList<qlonglong> imageIds(const QList<QModelIndex>& indexes) const;
+-
+- QModelIndex indexForPath(const QString& filePath) const;
+- QModelIndex indexForImageInfo(const ImageInfo& info) const;
+- QModelIndex indexForImageId(qlonglong id) const;
+-
+- /** Returns a list of all image infos, sorted according to this model.
+- * If you do not need a sorted list, use ImageModel's imageInfos() method.
+- */
+- QList<ImageInfo> imageInfosSorted() const;
+-
+- /// Returns this, any chained ImageFilterModel, or 0.
+- virtual ImageFilterModel* imageFilterModel() const;
+-
+-protected:
+-
+- /// Reimplement if needed. Called only when model shall be set as (direct) sourceModel.
+- virtual void setDirectSourceImageModel(ImageModel* model);
+-
+- // made protected
+- virtual void setSourceModel(QAbstractItemModel* model);
+-
+-protected:
+-
+- ImageSortFilterModel* m_chainedModel;
+-};
+-
+-// -----------------------------------------------------------------------------------------------
+-
+-class DIGIKAM_DATABASE_EXPORT ImageFilterModel : public ImageSortFilterModel
+-{
+- Q_OBJECT
+-
+-public:
+-
+- enum ImageFilterModelRoles
+- {
+- /// Returns the current categorization mode
+- CategorizationModeRole = ImageModel::FilterModelRoles + 1,
+- /// Returns the current sort order
+- SortOrderRole = ImageModel::FilterModelRoles + 2,
+- // / Returns the number of items in the index' category
+- //CategoryCountRole = ImageModel::FilterModelRoles + 3,
+- /// Returns the id of the PAlbum of the index which is used for category
+- CategoryAlbumIdRole = ImageModel::FilterModelRoles + 3,
+- /// Returns the format of the index which is used for category
+- CategoryFormatRole = ImageModel::FilterModelRoles + 4,
+- /// Returns true if the given image is a group leader, and the group is opened
+- GroupIsOpenRole = ImageModel::FilterModelRoles + 5,
+- ImageFilterModelPointerRole = ImageModel::FilterModelRoles + 50
+- };
+-
+-public:
+-
+- explicit ImageFilterModel(QObject* parent = 0);
+- ~ImageFilterModel();
+-
+- /** Add a hook to get added images for preparation tasks before they are added in the model */
+- void addPrepareHook(ImageFilterModelPrepareHook* hook);
+- void removePrepareHook(ImageFilterModelPrepareHook* hook);
+-
+- /** Returns a set of DatabaseFields suggested to set as watch flags on the source ImageModel.
+- * The contained flags will be those that this model can sort or filter by. */
+- DatabaseFields::Set suggestedWatchFlags() const;
+-
+- ImageFilterSettings imageFilterSettings() const;
+- VersionImageFilterSettings versionImageFilterSettings() const;
+- GroupImageFilterSettings groupImageFilterSettings() const;
+- ImageSortSettings imageSortSettings() const;
+-
+- // group is identified by the id of its group leader
+- bool isGroupOpen(qlonglong group) const;
+- bool isAllGroupsOpen() const;
+-
+- /// Enables sending imageInfosAdded and imageInfosAboutToBeRemoved
+- void setSendImageInfoSignals(bool sendSignals);
+-
+- virtual QVariant data(const QModelIndex& index, int role = Qt::DisplayRole) const;
+- virtual ImageFilterModel* imageFilterModel() const;
+-
+-public Q_SLOTS:
+-
+- /** Changes the current version image filter settings and refilters. */
+- void setVersionImageFilterSettings(const VersionImageFilterSettings& settings);
+-
+- /** Changes the current version image filter settings and refilters. */
+- void setGroupImageFilterSettings(const GroupImageFilterSettings& settings);
+-
+- /** Adjust the current ImageFilterSettings.
+- * Equivalent to retrieving the current filter settings, adjusting the parameter
+- * and calling setImageFilterSettings.
+- * Provided for convenience.
+- * It is encouraged to use setImageFilterSettings if you change more than one
+- * parameter at a time.
+- */
+- void setDayFilter(const QList<QDateTime>& days);
+- void setTagFilter(const QList<int>& includedTags, const QList<int>& excludedTags,
+- ImageFilterSettings::MatchingCondition matchingCond, bool showUnTagged,
+- const QList<int>& clTagIds, const QList<int>& plTagIds);
+- void setRatingFilter(int rating, ImageFilterSettings::RatingCondition ratingCond, bool isUnratedExcluded);
+- void setMimeTypeFilter(int mimeTypeFilter);
+- void setGeolocationFilter(const ImageFilterSettings::GeolocationCondition& condition);
+- void setTextFilter(const SearchTextFilterSettings& settings);
+-
+- void setCategorizationMode(ImageSortSettings::CategorizationMode mode);
+- void setCategorizationSortOrder(ImageSortSettings::SortOrder order);
+- void setSortRole(ImageSortSettings::SortRole role);
+- void setSortOrder(ImageSortSettings::SortOrder order);
+- void setStringTypeNatural(bool natural);
+- void setUrlWhitelist(const QList<QUrl> urlList, const QString& id);
+- void setIdWhitelist(const QList<qlonglong>& idList, const QString& id);
+-
+- void setVersionManagerSettings(const VersionManagerSettings& settings);
+- void setExceptionList(const QList<qlonglong>& idlist, const QString& id);
+-
+- void setGroupOpen(qlonglong group, bool open);
+- void toggleGroupOpen(qlonglong group);
+- void setAllGroupsOpen(bool open);
+-
+- /** Changes the current image filter settings and refilters. */
+- virtual void setImageFilterSettings(const ImageFilterSettings& settings);
+-
+- /** Changes the current image sort settings and resorts. */
+- virtual void setImageSortSettings(const ImageSortSettings& settings);
+-
+-Q_SIGNALS:
+-
+- /// Signals that the set filter matches at least one index
+- void filterMatches(bool matches);
+-
+- /** Signals that the set text filter matches at least one entry.
+- If no text filter is set, this signal is emitted
+- with 'false' when filterMatches() is emitted.
+- */
+- void filterMatchesForText(bool matchesByText);
+-
+- /** Emitted when the filter settings have been changed
+- (the model may not yet have been updated)
+- */
+- void filterSettingsChanged(const ImageFilterSettings& settings);
+-
+- /** These signals need to be explicitly enabled with setSendImageInfoSignals()
+- */
+- void imageInfosAdded(const QList<ImageInfo>& infos);
+- void imageInfosAboutToBeRemoved(const QList<ImageInfo>& infos);
+-
+-public:
+-
+- // Declared as public because of use in sub-classes.
+- class ImageFilterModelPrivate;
+-
+-protected:
+-
+- ImageFilterModelPrivate* const d_ptr;
+-
+-protected:
+-
+- ImageFilterModel(ImageFilterModelPrivate& dd, QObject* parent);
+-
+- virtual void setDirectSourceImageModel(ImageModel* model);
+-
+- virtual bool filterAcceptsRow(int source_row, const QModelIndex& source_parent) const;
+-
+- virtual int compareCategories(const QModelIndex& left, const QModelIndex& right) const;
+- virtual bool subSortLessThan(const QModelIndex& left, const QModelIndex& right) const;
+- //virtual int categoryCount(const ImageInfo& info) const;
+-
+- /** Reimplement to customize category sorting,
+- * Return negative if category of left < category right,
+- * Return 0 if left and right are in the same category, else return positive.
+- */
+- virtual int compareInfosCategories(const ImageInfo& left, const ImageInfo& right) const;
+-
+- /** Reimplement to customize sorting. Do not take categories into account here.
+- */
+- virtual bool infosLessThan(const ImageInfo& left, const ImageInfo& right) const;
+-
+- /** Returns a unique identifier for the category if info. The string need not be for user display.
+- */
+- virtual QString categoryIdentifier(const ImageInfo& info) const;
+-
+-protected Q_SLOTS:
+-
+- void slotModelReset();
+- void slotUpdateFilter();
+-
+- void slotImageTagChange(const ImageTagChangeset& changeset);
+- void slotImageChange(const ImageChangeset& changeset);
+-
+- void slotRowsInserted(const QModelIndex& parent, int start, int end);
+- void slotRowsAboutToBeRemoved(const QModelIndex& parent, int start, int end);
+-
+-private:
+-
+- Q_DECLARE_PRIVATE(ImageFilterModel)
+-};
+-
+-// -----------------------------------------------------------------------------------------------------
+-
+-class DIGIKAM_DATABASE_EXPORT NoDuplicatesImageFilterModel : public ImageSortFilterModel
+-{
+- Q_OBJECT
+-
+-public:
+-
+- explicit NoDuplicatesImageFilterModel(QObject* parent = 0);
+-
+-protected:
+-
+- virtual bool filterAcceptsRow(int source_row, const QModelIndex& source_parent) const;
+-};
+-
+-} // namespace Digikam
+-
+-Q_DECLARE_METATYPE(Digikam::ImageFilterModel*)
+-
+-#endif // IMAGEMODEL_H
+diff --git a/libs/models/imagefiltermodelpriv.cpp b/libs/models/imagefiltermodelpriv.cpp
+deleted file mode 100644
+index 07d9e79..0000000
+--- a/libs/models/imagefiltermodelpriv.cpp
++++ /dev/null
+@@ -1,258 +0,0 @@
+-/* ============================================================
+- *
+- * This file is a part of digiKam project
+- * http://www.digikam.org
+- *
+- * Date : 2009-03-05
+- * Description : Qt item model for database entries
+- *
+- * Copyright (C) 2009-2011 by Marcel Wiesweg <marcel dot wiesweg at gmx dot de>
+- * Copyright (C) 2011-2017 by Gilles Caulier <caulier dot gilles at gmail dot com>
+- * Copyright (C) 2010 by Andi Clemens <andi dot clemens at gmail dot com>
+- * Copyright (C) 2011 by Michael G. Hansen <mike at mghansen dot de>
+- * Copyright (C) 2014 by Mohamed Anwer <m dot anwer at gmx dot com>
+- *
+- * This program is free software; you can redistribute it
+- * and/or modify it under the terms of the GNU General
+- * Public License as published by the Free Software Foundation;
+- * either version 2, or (at your option)
+- * any later version.
+- *
+- * This program is distributed in the hope that it will be useful,
+- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+- * GNU General Public License for more details.
+- *
+- * ============================================================ */
+-
+-#include "imagefiltermodelpriv.h"
+-
+-// Local includes
+-
+-#include "digikam_debug.h"
+-#include "imagefiltermodelthreads.h"
+-
+-namespace Digikam
+-{
+-
+-ImageFilterModel::ImageFilterModelPrivate::ImageFilterModelPrivate()
+-{
+- imageModel = 0;
+- version = 0;
+- lastDiscardVersion = 0;
+- sentOut = 0;
+- sentOutForReAdd = 0;
+- updateFilterTimer = 0;
+- needPrepare = false;
+- needPrepareComments = false;
+- needPrepareTags = false;
+- needPrepareGroups = false;
+- preparer = 0;
+- filterer = 0;
+- hasOneMatch = false;
+- hasOneMatchForText = false;
+-
+- setupWorkers();
+-}
+-
+-ImageFilterModel::ImageFilterModelPrivate::~ImageFilterModelPrivate()
+-{
+- // facilitate thread stopping
+- ++version;
+- preparer->deactivate();
+- filterer->deactivate();
+- delete preparer;
+- delete filterer;
+-}
+-
+-void ImageFilterModel::ImageFilterModelPrivate::init(ImageFilterModel* _q)
+-{
+- q = _q;
+-
+- updateFilterTimer = new QTimer(this);
+- updateFilterTimer->setSingleShot(true);
+- updateFilterTimer->setInterval(250);
+-
+- connect(updateFilterTimer, SIGNAL(timeout()),
+- q, SLOT(slotUpdateFilter()));
+-
+- // inter-thread redirection
+- qRegisterMetaType<ImageFilterModelTodoPackage>("ImageFilterModelTodoPackage");
+-}
+-
+-void ImageFilterModel::ImageFilterModelPrivate::preprocessInfos(const QList<ImageInfo>& infos, const QList<QVariant>& extraValues)
+-{
+- infosToProcess(infos, extraValues, true);
+-}
+-
+-void ImageFilterModel::ImageFilterModelPrivate::processAddedInfos(const QList<ImageInfo>& infos, const QList<QVariant>& extraValues)
+-{
+- // These have already been added, we just process them afterwards
+- infosToProcess(infos, extraValues, false);
+-}
+-
+-void ImageFilterModel::ImageFilterModelPrivate::setupWorkers()
+-{
+- preparer = new ImageFilterModelPreparer(this);
+- filterer = new ImageFilterModelFilterer(this);
+-
+- // A package in constructed in infosToProcess.
+- // Normal flow is infosToProcess -> preparer::process -> filterer::process -> packageFinished.
+- // If no preparation is needed, the first step is skipped.
+- // If filter version changes, both will discard old package and send them to packageDiscarded.
+-
+- connect(this, SIGNAL(packageToPrepare(ImageFilterModelTodoPackage)),
+- preparer, SLOT(process(ImageFilterModelTodoPackage)));
+-
+- connect(this, SIGNAL(packageToFilter(ImageFilterModelTodoPackage)),
+- filterer, SLOT(process(ImageFilterModelTodoPackage)));
+-
+- connect(preparer, SIGNAL(processed(ImageFilterModelTodoPackage)),
+- filterer, SLOT(process(ImageFilterModelTodoPackage)));
+-
+- connect(filterer, SIGNAL(processed(ImageFilterModelTodoPackage)),
+- this, SLOT(packageFinished(ImageFilterModelTodoPackage)));
+-
+- connect(preparer, SIGNAL(discarded(ImageFilterModelTodoPackage)),
+- this, SLOT(packageDiscarded(ImageFilterModelTodoPackage)));
+-
+- connect(filterer, SIGNAL(discarded(ImageFilterModelTodoPackage)),
+- this, SLOT(packageDiscarded(ImageFilterModelTodoPackage)));
+-}
+-
+-void ImageFilterModel::ImageFilterModelPrivate::infosToProcess(const QList<ImageInfo>& infos)
+-{
+- infosToProcess(infos, QList<QVariant>(), false);
+-}
+-
+-void ImageFilterModel::ImageFilterModelPrivate::infosToProcess(const QList<ImageInfo>& infos, const QList<QVariant>& extraValues, bool forReAdd)
+-{
+- if (infos.isEmpty())
+- {
+- return;
+- }
+-
+- filterer->schedule();
+-
+- if (needPrepare)
+- {
+- preparer->schedule();
+- }
+-
+- Q_ASSERT(extraValues.isEmpty() || infos.size() == extraValues.size());
+-
+- // prepare and filter in chunks
+- const int size = infos.size();
+- const int maxChunkSize = needPrepare ? PrepareChunkSize : FilterChunkSize;
+- const bool hasExtraValues = !extraValues.isEmpty();
+- QList<ImageInfo>::const_iterator it = infos.constBegin(), end;
+- QList<QVariant>::const_iterator xit = extraValues.constBegin(), xend;
+- int index = 0;
+- QVector<ImageInfo> infoVector;
+- QVector<QVariant> extraValueVector;
+-
+- while (it != infos.constEnd())
+- {
+- const int chunkSize = qMin(maxChunkSize, size - index);
+- infoVector.resize(chunkSize);
+- end = it + chunkSize;
+- qCopy(it, end, infoVector.begin());
+-
+- if (hasExtraValues)
+- {
+- extraValueVector.resize(chunkSize);
+- xend = xit + chunkSize;
+- qCopy(xit, xend, extraValueVector.begin());
+- xit = xend;
+- }
+-
+- it = end;
+- index += chunkSize;
+-
+- ++sentOut;
+-
+- if (forReAdd)
+- {
+- ++sentOutForReAdd;
+- }
+-
+- if (needPrepare)
+- {
+- emit packageToPrepare(ImageFilterModelTodoPackage(infoVector, extraValueVector, version, forReAdd));
+- }
+- else
+- {
+- emit packageToFilter(ImageFilterModelTodoPackage(infoVector, extraValueVector, version, forReAdd));
+- }
+- }
+-}
+-
+-void ImageFilterModel::ImageFilterModelPrivate::packageFinished(const ImageFilterModelTodoPackage& package)
+-{
+- // check if it got discarded on the journey
+- if (package.version != version)
+- {
+- packageDiscarded(package);
+- return;
+- }
+-
+- // incorporate result
+- QHash<qlonglong, bool>::const_iterator it = package.filterResults.constBegin();
+-
+- for (; it != package.filterResults.constEnd(); ++it)
+- {
+- filterResults.insert(it.key(), it.value());
+- }
+-
+- // re-add if necessary
+- if (package.isForReAdd)
+- {
+- emit reAddImageInfos(package.infos.toList(), package.extraValues.toList());
+-
+- if (sentOutForReAdd == 1) // last package
+- {
+- emit reAddingFinished();
+- }
+- }
+-
+- // decrement counters
+- --sentOut;
+-
+- if (package.isForReAdd)
+- {
+- --sentOutForReAdd;
+- }
+-
+- // If all packages have returned, filtered and readded, and no more are expected,
+- // and there is need to tell the filter result to the view, do that
+- if (sentOut == 0 && sentOutForReAdd == 0 && !imageModel->isRefreshing())
+- {
+- q->invalidate(); // use invalidate, not invalidateFilter only. Sorting may have changed as well.
+- emit (q->filterMatches(hasOneMatch));
+- emit (q->filterMatchesForText(hasOneMatchForText));
+- filterer->deactivate();
+- preparer->deactivate();
+- }
+-}
+-
+-void ImageFilterModel::ImageFilterModelPrivate::packageDiscarded(const ImageFilterModelTodoPackage& package)
+-{
+- // Either, the model was reset, or the filter changed
+- // In the former case throw all away, in the latter case, recycle
+- if (package.version > lastDiscardVersion)
+- {
+- // Recycle packages: Send again with current version
+- // Do not increment sentOut or sentOutForReAdd here: it was not decremented!
+-
+- if (needPrepare)
+- {
+- emit packageToPrepare(ImageFilterModelTodoPackage(package.infos, package.extraValues, version, package.isForReAdd));
+- }
+- else
+- {
+- emit packageToFilter(ImageFilterModelTodoPackage(package.infos, package.extraValues, version, package.isForReAdd));
+- }
+- }
+-}
+-
+-} // namespace Digikam
+diff --git a/libs/models/imagefiltermodelpriv.h b/libs/models/imagefiltermodelpriv.h
+deleted file mode 100644
+index a9e3f22..0000000
+--- a/libs/models/imagefiltermodelpriv.h
++++ /dev/null
+@@ -1,159 +0,0 @@
+-/* ============================================================
+- *
+- * This file is a part of digiKam project
+- * http://www.digikam.org
+- *
+- * Date : 2009-03-11
+- * Description : Qt item model for database entries - private shared header
+- *
+- * Copyright (C) 2009-2011 by Marcel Wiesweg <marcel dot wiesweg at gmx dot de>
+- *
+- * This program is free software; you can redistribute it
+- * and/or modify it under the terms of the GNU General
+- * Public License as published by the Free Software Foundation;
+- * either version 2, or (at your option)
+- * any later version.
+- *
+- * This program is distributed in the hope that it will be useful,
+- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+- * GNU General Public License for more details.
+- *
+- * ============================================================ */
+-
+-#ifndef IMAGEFILTERMODELPRIV_H
+-#define IMAGEFILTERMODELPRIV_H
+-
+-// Qt includes
+-
+-#include <QHash>
+-#include <QMutex>
+-#include <QMutexLocker>
+-#include <QSet>
+-#include <QThread>
+-#include <QTimer>
+-#include <QWaitCondition>
+-
+-// Local includes
+-
+-#include "imageinfo.h"
+-#include "imagefiltermodel.h"
+-
+-#include "digikam_export.h"
+-// Yes, we need the EXPORT macro in a private header because
+-// this private header is shared across binary objects.
+-// This does NOT make this classes here any more public!
+-
+-namespace Digikam
+-{
+-
+-const int PrepareChunkSize = 101;
+-const int FilterChunkSize = 2001;
+-
+-class ImageFilterModelTodoPackage
+-{
+-public:
+-
+- ImageFilterModelTodoPackage()
+- : version(0), isForReAdd(false)
+- {
+- }
+-
+- ImageFilterModelTodoPackage(const QVector<ImageInfo>& infos, const QVector<QVariant>& extraValues, int version, bool isForReAdd)
+- : infos(infos), extraValues(extraValues), version(version), isForReAdd(isForReAdd)
+- {
+- }
+-
+- QVector<ImageInfo> infos;
+- QVector<QVariant> extraValues;
+- unsigned int version;
+- bool isForReAdd;
+- QHash<qlonglong, bool> filterResults;
+-};
+-
+-// ------------------------------------------------------------------------------------------------
+-
+-class ImageFilterModelPreparer;
+-class ImageFilterModelFilterer;
+-
+-class DIGIKAM_DATABASE_EXPORT ImageFilterModel::ImageFilterModelPrivate : public QObject
+-{
+- Q_OBJECT
+-
+-public:
+-
+- ImageFilterModelPrivate();
+- ~ImageFilterModelPrivate();
+-
+- void init(ImageFilterModel* q);
+- void setupWorkers();
+- void infosToProcess(const QList<ImageInfo>& infos);
+- void infosToProcess(const QList<ImageInfo>& infos, const QList<QVariant>& extraValues, bool forReAdd = true);
+-
+-public:
+-
+- ImageFilterModel* q;
+-
+- ImageModel* imageModel;
+-
+- ImageFilterSettings filter;
+- ImageSortSettings sorter;
+- VersionImageFilterSettings versionFilter;
+- GroupImageFilterSettings groupFilter;
+-
+- volatile unsigned int version;
+- unsigned int lastDiscardVersion;
+- unsigned int lastFilteredVersion;
+- int sentOut;
+- int sentOutForReAdd;
+-
+- QTimer* updateFilterTimer;
+-
+- bool needPrepare;
+- bool needPrepareComments;
+- bool needPrepareTags;
+- bool needPrepareGroups;
+-
+- QMutex mutex;
+- ImageFilterSettings filterCopy;
+- VersionImageFilterSettings versionFilterCopy;
+- GroupImageFilterSettings groupFilterCopy;
+- ImageFilterModelPreparer* preparer;
+- ImageFilterModelFilterer* filterer;
+-
+- QHash<qlonglong, bool> filterResults;
+- bool hasOneMatch;
+- bool hasOneMatchForText;
+-
+- QList<ImageFilterModelPrepareHook*> prepareHooks;
+-
+-/*
+- QHash<int, QSet<qlonglong> > categoryCountHashInt;
+- QHash<QString, QSet<qlonglong> > categoryCountHashString;
+-
+-public:
+-
+- void cacheCategoryCount(int id, qlonglong imageid) const
+- { const_cast<ImageFilterModelPrivate*>(this)->categoryCountHashInt[id].insert(imageid); }
+- void cacheCategoryCount(const QString& id, qlonglong imageid) const
+- { const_cast<ImageFilterModelPrivate*>(this)->categoryCountHashString[id].insert(imageid); }
+-*/
+-
+-public Q_SLOTS:
+-
+- void preprocessInfos(const QList<ImageInfo>& infos, const QList<QVariant>& extraValues);
+- void processAddedInfos(const QList<ImageInfo>& infos, const QList<QVariant>& extraValues);
+- void packageFinished(const ImageFilterModelTodoPackage& package);
+- void packageDiscarded(const ImageFilterModelTodoPackage& package);
+-
+-Q_SIGNALS:
+-
+- void packageToPrepare(const ImageFilterModelTodoPackage& package);
+- void packageToFilter(const ImageFilterModelTodoPackage& package);
+- void reAddImageInfos(const QList<ImageInfo>& infos, const QList<QVariant>& extraValues);
+- void reAddingFinished();
+-};
+-
+-} // namespace Digikam
+-
+-#endif // IMAGEFILTERMODELPRIV_H
+diff --git a/libs/models/imagefiltermodelthreads.cpp b/libs/models/imagefiltermodelthreads.cpp
+deleted file mode 100644
+index aa5c462..0000000
+--- a/libs/models/imagefiltermodelthreads.cpp
++++ /dev/null
+@@ -1,40 +0,0 @@
+-/* ============================================================
+- *
+- * This file is a part of digiKam project
+- * http://www.digikam.org
+- *
+- * Date : 2009-03-05
+- * Description : Qt item model for database entries
+- *
+- * Copyright (C) 2009-2011 by Marcel Wiesweg <marcel dot wiesweg at gmx dot de>
+- * Copyright (C) 2011-2017 by Gilles Caulier <caulier dot gilles at gmail dot com>
+- * Copyright (C) 2010 by Andi Clemens <andi dot clemens at gmail dot com>
+- * Copyright (C) 2011 by Michael G. Hansen <mike at mghansen dot de>
+- * Copyright (C) 2014 by Mohamed Anwer <m dot anwer at gmx dot com>
+- *
+- * This program is free software; you can redistribute it
+- * and/or modify it under the terms of the GNU General
+- * Public License as published by the Free Software Foundation;
+- * either version 2, or (at your option)
+- * any later version.
+- *
+- * This program is distributed in the hope that it will be useful,
+- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+- * GNU General Public License for more details.
+- *
+- * ============================================================ */
+-
+-#include "imagefiltermodel.h"
+-#include "imagefiltermodelpriv.h"
+-#include "imagefiltermodelthreads.h"
+-
+-namespace Digikam
+-{
+-
+-ImageFilterModelWorker::ImageFilterModelWorker(ImageFilterModel::ImageFilterModelPrivate* const d)
+- : d(d)
+-{
+-}
+-
+-} // namespace Digikam
+diff --git a/libs/models/imagefiltermodelthreads.h b/libs/models/imagefiltermodelthreads.h
+deleted file mode 100644
+index 83fa987..0000000
+--- a/libs/models/imagefiltermodelthreads.h
++++ /dev/null
+@@ -1,100 +0,0 @@
+-/* ============================================================
+- *
+- * This file is a part of digiKam project
+- * http://www.digikam.org
+- *
+- * Date : 2009-03-11
+- * Description : Qt item model for database entries - private header
+- *
+- * Copyright (C) 2009-2011 by Marcel Wiesweg <marcel dot wiesweg at gmx dot de>
+- *
+- * This program is free software; you can redistribute it
+- * and/or modify it under the terms of the GNU General
+- * Public License as published by the Free Software Foundation;
+- * either version 2, or (at your option)
+- * any later version.
+- *
+- * This program is distributed in the hope that it will be useful,
+- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+- * GNU General Public License for more details.
+- *
+- * ============================================================ */
+-
+-#ifndef IMAGEFILTERMODELTHREADS_H
+-#define IMAGEFILTERMODELTHREADS_H
+-
+-// Qt includes
+-
+-#include <QThread>
+-
+-// Local includes
+-
+-#include "digikam_export.h"
+-#include "workerobject.h"
+-
+-namespace Digikam
+-{
+-
+-class DIGIKAM_DATABASE_EXPORT ImageFilterModelWorker : public WorkerObject
+-{
+- Q_OBJECT
+-
+-public:
+-
+- explicit ImageFilterModelWorker(ImageFilterModel::ImageFilterModelPrivate* const d);
+-
+- bool checkVersion(const ImageFilterModelTodoPackage& package)
+- {
+- return d->version == package.version;
+- }
+-
+-public Q_SLOTS:
+-
+- virtual void process(ImageFilterModelTodoPackage package) = 0;
+-
+-Q_SIGNALS:
+-
+- void processed(const ImageFilterModelTodoPackage& package);
+- void discarded(const ImageFilterModelTodoPackage& package);
+-
+-protected:
+-
+- ImageFilterModel::ImageFilterModelPrivate* d;
+-};
+-
+-// -----------------------------------------------------------------------------------------
+-
+-class DIGIKAM_DATABASE_EXPORT ImageFilterModelPreparer : public ImageFilterModelWorker
+-{
+- Q_OBJECT
+-
+-public:
+-
+- explicit ImageFilterModelPreparer(ImageFilterModel::ImageFilterModelPrivate* const d)
+- : ImageFilterModelWorker(d)
+- {
+- }
+-
+- void process(ImageFilterModelTodoPackage package);
+-};
+-
+-// ----------------------------------------------------------------------------------------
+-
+-class DIGIKAM_DATABASE_EXPORT ImageFilterModelFilterer : public ImageFilterModelWorker
+-{
+- Q_OBJECT
+-
+-public:
+-
+- explicit ImageFilterModelFilterer(ImageFilterModel::ImageFilterModelPrivate* const d)
+- : ImageFilterModelWorker(d)
+- {
+- }
+-
+- void process(ImageFilterModelTodoPackage package);
+-};
+-
+-} // namespace Digikam
+-
+-#endif // IMAGEFILTERMODELTHREADS_H
+diff --git a/libs/models/imagefiltersettings.cpp b/libs/models/imagefiltersettings.cpp
+deleted file mode 100644
+index b61e7f9..0000000
+--- a/libs/models/imagefiltersettings.cpp
++++ /dev/null
+@@ -1,952 +0,0 @@
+-/* ============================================================
+- *
+- * This file is a part of digiKam project
+- * http://www.digikam.org
+- *
+- * Date : 2009-03-05
+- * Description : Filter values for use with ImageFilterModel
+- *
+- * Copyright (C) 2009-2011 by Marcel Wiesweg <marcel dot wiesweg at gmx dot de>
+- * Copyright (C) 2011-2017 by Gilles Caulier <caulier dot gilles at gmail dot com>
+- * Copyright (C) 2010 by Andi Clemens <andi dot clemens at gmail dot com>
+- * Copyright (C) 2011 by Michael G. Hansen <mike at mghansen dot de>
+- * Copyright (C) 2014 by Mohamed Anwer <m dot anwer at gmx dot com>
+- *
+- * This program is free software; you can redistribute it
+- * and/or modify it under the terms of the GNU General
+- * Public License as published by the Free Software Foundation;
+- * either version 2, or (at your option)
+- * any later version.
+- *
+- * This program is distributed in the hope that it will be useful,
+- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+- * GNU General Public License for more details.
+- *
+- * ============================================================ */
+-
+-#include "imagefiltersettings.h"
+-
+-// C++ includes
+-
+-#include <cmath>
+-
+-// Qt includes
+-
+-#include <QDateTime>
+-
+-// Local includes
+-
+-#include "digikam_debug.h"
+-#include "coredbfields.h"
+-#include "digikam_globals.h"
+-#include "imageinfo.h"
+-#include "tagscache.h"
+-#include "versionmanagersettings.h"
+-
+-namespace Digikam
+-{
+-
+-ImageFilterSettings::ImageFilterSettings()
+-{
+- m_untaggedFilter = false;
+- m_isUnratedExcluded = false;
+- m_ratingFilter = 0;
+- m_mimeTypeFilter = MimeFilter::AllFiles;
+- m_ratingCond = GreaterEqualCondition;
+- m_matchingCond = OrCondition;
+- m_geolocationCondition = GeolocationNoFilter;
+-}
+-
+-DatabaseFields::Set ImageFilterSettings::watchFlags() const
+-{
+- DatabaseFields::Set set;
+-
+- if (isFilteringByDay())
+- {
+- set |= DatabaseFields::CreationDate;
+- }
+-
+- if (isFilteringByText())
+- {
+- set |= DatabaseFields::Name;
+- set |= DatabaseFields::Comment;
+- }
+-
+- if (isFilteringByRating())
+- {
+- set |= DatabaseFields::Rating;
+- }
+-
+- if (isFilteringByTypeMime())
+- {
+- set |= DatabaseFields::Category;
+- set |= DatabaseFields::Format;
+- }
+-
+- if (isFilteringByGeolocation())
+- {
+- set |= DatabaseFields::ImagePositionsAll;
+- }
+-
+- if (isFilteringByColorLabels())
+- {
+- set |= DatabaseFields::ColorLabel;
+- }
+-
+- if (isFilteringByPickLabels())
+- {
+- set |= DatabaseFields::PickLabel;
+- }
+-
+- return set;
+-}
+-
+-bool ImageFilterSettings::isFilteringByDay() const
+-{
+- if (!m_dayFilter.isEmpty())
+- {
+- return true;
+- }
+-
+- return false;
+-}
+-
+-bool ImageFilterSettings::isFilteringByTags() const
+-{
+- if (!m_includeTagFilter.isEmpty() || !m_excludeTagFilter.isEmpty() || m_untaggedFilter)
+- {
+- return true;
+- }
+-
+- return false;
+-}
+-
+-bool ImageFilterSettings::isFilteringByColorLabels() const
+-{
+- if (!m_colorLabelTagFilter.isEmpty())
+- {
+- return true;
+- }
+-
+- return false;
+-}
+-
+-bool ImageFilterSettings::isFilteringByPickLabels() const
+-{
+- if (!m_pickLabelTagFilter.isEmpty())
+- {
+- return true;
+- }
+-
+- return false;
+-}
+-
+-bool ImageFilterSettings::isFilteringByText() const
+-{
+- if (!m_textFilterSettings.text.isEmpty())
+- {
+- return true;
+- }
+-
+- return false;
+-}
+-
+-bool ImageFilterSettings::isFilteringByTypeMime() const
+-{
+- if (m_mimeTypeFilter != MimeFilter::AllFiles)
+- {
+- return true;
+- }
+-
+- return false;
+-}
+-
+-bool ImageFilterSettings::isFilteringByGeolocation() const
+-{
+- return (m_geolocationCondition != GeolocationNoFilter);
+-}
+-
+-bool ImageFilterSettings::isFilteringByRating() const
+-{
+- if (m_ratingFilter != 0 || m_ratingCond != GreaterEqualCondition || m_isUnratedExcluded)
+- {
+- return true;
+- }
+-
+- return false;
+-}
+-
+-bool ImageFilterSettings::isFilteringInternally() const
+-{
+- return (isFiltering() || !m_urlWhitelists.isEmpty() || !m_idWhitelists.isEmpty());
+-}
+-
+-bool ImageFilterSettings::isFiltering() const
+-{
+- return isFilteringByDay() ||
+- isFilteringByTags() ||
+- isFilteringByText() ||
+- isFilteringByRating() ||
+- isFilteringByTypeMime() ||
+- isFilteringByColorLabels() ||
+- isFilteringByPickLabels() ||
+- isFilteringByGeolocation();
+-}
+-
+-void ImageFilterSettings::setDayFilter(const QList<QDateTime>& days)
+-{
+- m_dayFilter.clear();
+-
+- for (QList<QDateTime>::const_iterator it = days.constBegin(); it != days.constEnd(); ++it)
+- {
+- m_dayFilter.insert(*it, true);
+- }
+-}
+-
+-void ImageFilterSettings::setTagFilter(const QList<int>& includedTags,
+- const QList<int>& excludedTags,
+- MatchingCondition matchingCondition,
+- bool showUnTagged,
+- const QList<int>& clTagIds,
+- const QList<int>& plTagIds)
+-{
+- m_includeTagFilter = includedTags;
+- m_excludeTagFilter = excludedTags;
+- m_matchingCond = matchingCondition;
+- m_untaggedFilter = showUnTagged;
+- m_colorLabelTagFilter = clTagIds;
+- m_pickLabelTagFilter = plTagIds;
+-}
+-
+-void ImageFilterSettings::setRatingFilter(int rating, RatingCondition ratingCondition, bool isUnratedExcluded)
+-{
+- m_ratingFilter = rating;
+- m_ratingCond = ratingCondition;
+- m_isUnratedExcluded = isUnratedExcluded;
+-}
+-
+-void ImageFilterSettings::setMimeTypeFilter(int mime)
+-{
+- m_mimeTypeFilter = (MimeFilter::TypeMimeFilter)mime;
+-}
+-
+-void ImageFilterSettings::setGeolocationFilter(const GeolocationCondition& condition)
+-{
+- m_geolocationCondition = condition;
+-}
+-
+-void ImageFilterSettings::setTextFilter(const SearchTextFilterSettings& settings)
+-{
+- m_textFilterSettings = settings;
+-}
+-
+-void ImageFilterSettings::setTagNames(const QHash<int, QString>& hash)
+-{
+- m_tagNameHash = hash;
+-}
+-
+-void ImageFilterSettings::setAlbumNames(const QHash<int, QString>& hash)
+-{
+- m_albumNameHash = hash;
+-}
+-
+-void ImageFilterSettings::setUrlWhitelist(const QList<QUrl>& urlList, const QString& id)
+-{
+- if (urlList.isEmpty())
+- {
+- m_urlWhitelists.remove(id);
+- }
+- else
+- {
+- m_urlWhitelists.insert(id, urlList);
+- }
+-}
+-
+-void ImageFilterSettings::setIdWhitelist(const QList<qlonglong>& idList, const QString& id)
+-{
+- if (idList.isEmpty())
+- {
+- m_idWhitelists.remove(id);
+- }
+- else
+- {
+- m_idWhitelists.insert(id, idList);
+- }
+-}
+-
+-template <class ContainerA, class ContainerB>
+-bool containsAnyOf(const ContainerA& listA, const ContainerB& listB)
+-{
+- foreach (const typename ContainerA::value_type& a, listA)
+- {
+- if (listB.contains(a))
+- {
+- return true;
+- }
+- }
+- return false;
+-}
+-
+-template <class ContainerA, typename Value, class ContainerB>
+-bool containsNoneOfExcept(const ContainerA& list, const ContainerB& noneOfList, const Value& exception)
+-{
+- foreach (const typename ContainerB::value_type& n, noneOfList)
+- {
+- if (n != exception && list.contains(n))
+- {
+- return false;
+- }
+- }
+- return true;
+-}
+-
+-bool ImageFilterSettings::matches(const ImageInfo& info, bool* const foundText) const
+-{
+- if (foundText)
+- {
+- *foundText = false;
+- }
+-
+- if (!isFilteringInternally())
+- {
+- return true;
+- }
+-
+- bool match = false;
+-
+- if (!m_includeTagFilter.isEmpty() || !m_excludeTagFilter.isEmpty())
+- {
+- QList<int> tagIds = info.tagIds();
+- QList<int>::const_iterator it;
+-
+- match = m_includeTagFilter.isEmpty();
+-
+- if (m_matchingCond == OrCondition)
+- {
+- for (it = m_includeTagFilter.begin(); it != m_includeTagFilter.end(); ++it)
+- {
+- if (tagIds.contains(*it))
+- {
+- match = true;
+- break;
+- }
+- }
+-
+- match |= (m_untaggedFilter && tagIds.isEmpty());
+- }
+- else // AND matching condition...
+- {
+- // m_untaggedFilter and non-empty tag filter, combined with AND, is logically no match
+- if (!m_untaggedFilter)
+- {
+- for (it = m_includeTagFilter.begin(); it != m_includeTagFilter.end(); ++it)
+- {
+- if (!tagIds.contains(*it))
+- {
+- break;
+- }
+- }
+-
+- if (it == m_includeTagFilter.end())
+- {
+- match = true;
+- }
+- }
+- }
+-
+- for (it = m_excludeTagFilter.begin(); it != m_excludeTagFilter.end(); ++it)
+- {
+- if (tagIds.contains(*it))
+- {
+- match = false;
+- break;
+- }
+- }
+- }
+- else if (m_untaggedFilter)
+- {
+- match = !TagsCache::instance()->containsPublicTags(info.tagIds());
+- }
+- else
+- {
+- match = true;
+- }
+-
+- //-- Filter by pick labels ------------------------------------------------
+-
+- if (!m_pickLabelTagFilter.isEmpty())
+- {
+- QList<int> tagIds = info.tagIds();
+- bool matchPL = false;
+-
+- if (containsAnyOf(m_pickLabelTagFilter, tagIds))
+- {
+- matchPL = true;
+- }
+- else if (!matchPL)
+- {
+- int noPickLabelTagId = TagsCache::instance()->tagForPickLabel(NoPickLabel);
+-
+- if (m_pickLabelTagFilter.contains(noPickLabelTagId))
+- {
+- // Searching for "has no ColorLabel" requires special handling:
+- // Scan that the tag ids contains none of the ColorLabel tags, except maybe the NoColorLabel tag
+- matchPL = containsNoneOfExcept(tagIds, TagsCache::instance()->pickLabelTags(), noPickLabelTagId);
+- }
+- }
+-
+- match &= matchPL;
+- }
+-
+- //-- Filter by color labels ------------------------------------------------
+-
+- if (!m_colorLabelTagFilter.isEmpty())
+- {
+- QList<int> tagIds = info.tagIds();
+- bool matchCL = false;
+-
+- if (containsAnyOf(m_colorLabelTagFilter, tagIds))
+- {
+- matchCL = true;
+- }
+- else if (!matchCL)
+- {
+- int noColorLabelTagId = TagsCache::instance()->tagForColorLabel(NoColorLabel);
+-
+- if (m_colorLabelTagFilter.contains(noColorLabelTagId))
+- {
+- // Searching for "has no ColorLabel" requires special handling:
+- // Scan that the tag ids contains none of the ColorLabel tags, except maybe the NoColorLabel tag
+- matchCL = containsNoneOfExcept(tagIds, TagsCache::instance()->colorLabelTags(), noColorLabelTagId);
+- }
+- }
+-
+- match &= matchCL;
+- }
+-
+- //-- Filter by date -----------------------------------------------------------
+-
+- if (!m_dayFilter.isEmpty())
+- {
+- match &= m_dayFilter.contains(QDateTime(info.dateTime().date(), QTime()));
+- }
+-
+- //-- Filter by rating ---------------------------------------------------------
+-
+- if (m_ratingFilter >= 0)
+- {
+- // for now we treat -1 (no rating) just like a rating of 0.
+- int rating = info.rating();
+-
+- if (rating == -1)
+- {
+- rating = 0;
+- }
+-
+- if(m_isUnratedExcluded && rating == 0)
+- {
+- match = false;
+- }
+- else
+- {
+- if (m_ratingCond == GreaterEqualCondition)
+- {
+- // If the rating is not >=, i.e it is <, then it does not match.
+- if (rating < m_ratingFilter)
+- {
+- match = false;
+- }
+- }
+- else if (m_ratingCond == EqualCondition)
+- {
+- // If the rating is not =, i.e it is !=, then it does not match.
+- if (rating != m_ratingFilter)
+- {
+- match = false;
+- }
+- }
+- else
+- {
+- // If the rating is not <=, i.e it is >, then it does not match.
+- if (rating > m_ratingFilter)
+- {
+- match = false;
+- }
+- }
+- }
+- }
+-
+- // -- Filter by mime type -----------------------------------------------------
+-
+- switch (m_mimeTypeFilter)
+- {
+- // info.format is a standardized string: Only one possibility per mime type
+- case MimeFilter::ImageFiles:
+- {
+- if (info.category() != DatabaseItem::Image)
+- {
+- match = false;
+- }
+-
+- break;
+- }
+- case MimeFilter::JPGFiles:
+- {
+- if (info.format() != QLatin1String("JPG"))
+- {
+- match = false;
+- }
+-
+- break;
+- }
+- case MimeFilter::PNGFiles:
+- {
+- if (info.format() != QLatin1String("PNG"))
+- {
+- match = false;
+- }
+-
+- break;
+- }
+- case MimeFilter::TIFFiles:
+- {
+- if (info.format() != QLatin1String("TIFF"))
+- {
+- match = false;
+- }
+-
+- break;
+- }
+- case MimeFilter::DNGFiles:
+- {
+- if (info.format() != QLatin1String("RAW-DNG"))
+- {
+- match = false;
+- }
+-
+- break;
+- }
+- case MimeFilter::NoRAWFiles:
+- {
+- if (info.format().startsWith(QLatin1String("RAW")))
+- {
+- match = false;
+- }
+-
+- break;
+- }
+- case MimeFilter::RAWFiles:
+- {
+- if (!info.format().startsWith(QLatin1String("RAW")))
+- {
+- match = false;
+- }
+-
+- break;
+- }
+- case MimeFilter::MoviesFiles:
+- {
+- if (info.category() != DatabaseItem::Video)
+- {
+- match = false;
+- }
+-
+- break;
+- }
+- case MimeFilter::AudioFiles:
+- {
+- if (info.category() != DatabaseItem::Audio)
+- {
+- match = false;
+- }
+-
+- break;
+- }
+- case MimeFilter::RasterFiles:
+- {
+- if (info.format() != QLatin1String("PSD") && // Adobe Photoshop Document
+- info.format() != QLatin1String("PSB") && // Adobe Photoshop Big
+- info.format() != QLatin1String("XCF") && // Gimp
+- info.format() != QLatin1String("KRA") && // Krita
+- info.format() != QLatin1String("ORA") // Open Raster
+- )
+- {
+- match = false;
+- }
+-
+- break;
+- }
+- default:
+- {
+- // All Files: do nothing...
+- break;
+- }
+- }
+-
+- //-- Filter by geolocation ----------------------------------------------------
+-
+- if (m_geolocationCondition!=GeolocationNoFilter)
+- {
+- if (m_geolocationCondition==GeolocationNoCoordinates)
+- {
+- if (info.hasCoordinates())
+- {
+- match = false;
+- }
+- }
+- else if (m_geolocationCondition==GeolocationHasCoordinates)
+- {
+- if (!info.hasCoordinates())
+- {
+- match = false;
+- }
+- }
+- }
+-
+- //-- Filter by text -----------------------------------------------------------
+-
+- if (!m_textFilterSettings.text.isEmpty())
+- {
+- bool textMatch = false;
+-
+- // Image name
+- if (m_textFilterSettings.textFields & SearchTextFilterSettings::ImageName &&
+- info.name().contains(m_textFilterSettings.text, m_textFilterSettings.caseSensitive))
+- {
+- textMatch = true;
+- }
+-
+- // Image title
+- if (m_textFilterSettings.textFields & SearchTextFilterSettings::ImageTitle &&
+- info.title().contains(m_textFilterSettings.text, m_textFilterSettings.caseSensitive))
+- {
+- textMatch = true;
+- }
+-
+- // Image comment
+- if (m_textFilterSettings.textFields & SearchTextFilterSettings::ImageComment &&
+- info.comment().contains(m_textFilterSettings.text, m_textFilterSettings.caseSensitive))
+- {
+- textMatch = true;
+- }
+-
+- // Tag names
+- foreach(int id, info.tagIds())
+- {
+- if (m_textFilterSettings.textFields & SearchTextFilterSettings::TagName &&
+- m_tagNameHash.value(id).contains(m_textFilterSettings.text, m_textFilterSettings.caseSensitive))
+- {
+- textMatch = true;
+- }
+- }
+-
+- // Album names
+- if (m_textFilterSettings.textFields & SearchTextFilterSettings::AlbumName &&
+- m_albumNameHash.value(info.albumId()).contains(m_textFilterSettings.text, m_textFilterSettings.caseSensitive))
+- {
+- textMatch = true;
+- }
+-
+- // Image Aspect Ratio
+- if (m_textFilterSettings.textFields & SearchTextFilterSettings::ImageAspectRatio)
+- {
+- QRegExp expRatio (QLatin1String("^\\d+:\\d+$"));
+- QRegExp expFloat (QLatin1String("^\\d+(.\\d+)?$"));
+-
+- if (expRatio.indexIn(m_textFilterSettings.text) > -1 && m_textFilterSettings.text.contains(QRegExp(QLatin1String(":\\d+"))))
+- {
+- QString trimmedTextFilterSettingsText = m_textFilterSettings.text;
+- QStringList numberStringList = trimmedTextFilterSettingsText.split(QLatin1String(":"), QString::SkipEmptyParts);
+-
+- if (numberStringList.length() == 2)
+- {
+- QString numString = (QString)numberStringList.at(0), denomString = (QString)numberStringList.at(1);
+- bool canConverseNum = false;
+- bool canConverseDenom = false;
+- int num = numString.toInt(&canConverseNum, 10), denom = denomString.toInt(&canConverseDenom, 10);
+-
+- if (canConverseNum && canConverseDenom)
+- {
+- if (fabs(info.aspectRatio() - (double)num / denom) < 0.1)
+- textMatch = true;
+- }
+- }
+- }
+- else if (expFloat.indexIn(m_textFilterSettings.text) > -1)
+- {
+- QString trimmedTextFilterSettingsText = m_textFilterSettings.text;
+- bool canConverse = false;
+- double ratio = trimmedTextFilterSettingsText.toDouble(&canConverse);
+-
+- if (canConverse)
+- {
+- if (fabs(info.aspectRatio() - ratio) < 0.1)
+- textMatch = true;
+- }
+- }
+- }
+-
+- // Image Pixel Size
+- // See bug #341053 for details.
+-
+- if (m_textFilterSettings.textFields & SearchTextFilterSettings::ImagePixelSize)
+- {
+- QSize size = info.dimensions();
+- int pixelSize = size.height()*size.width();
+- QString text = m_textFilterSettings.text;
+-
+- if(text.contains(QRegExp(QLatin1String("^>\\d{1,15}$"))) && pixelSize > (text.remove(0,1)).toInt())
+- {
+- textMatch = true;
+- }
+- else if(text.contains(QRegExp(QLatin1String("^<\\d{1,15}$"))) && pixelSize < (text.remove(0,1)).toInt())
+- {
+- textMatch = true;
+- }
+- else if(text.contains(QRegExp(QLatin1String("^\\d+$"))) && pixelSize == text.toInt())
+- {
+- textMatch = true;
+- }
+- }
+-
+- match &= textMatch;
+-
+- if (foundText)
+- {
+- *foundText = textMatch;
+- }
+- }
+-
+- // -- filter by URL-whitelists ------------------------------------------------
+- // NOTE: whitelists are always AND for now.
+-
+- if (match)
+- {
+- const QUrl url = info.fileUrl();
+-
+- for (QHash<QString, QList<QUrl>>::const_iterator it = m_urlWhitelists.constBegin();
+- it!=m_urlWhitelists.constEnd(); ++it)
+- {
+- match = it->contains(url);
+-
+- if (!match)
+- {
+- break;
+- }
+- }
+- }
+-
+- if (match)
+- {
+- const qlonglong id = info.id();
+-
+- for (QHash<QString, QList<qlonglong> >::const_iterator it = m_idWhitelists.constBegin();
+- it!=m_idWhitelists.constEnd(); ++it)
+- {
+- match = it->contains(id);
+-
+- if (!match)
+- {
+- break;
+- }
+- }
+- }
+-
+- return match;
+-}
+-
+-// -------------------------------------------------------------------------------------------------
+-
+-VersionImageFilterSettings::VersionImageFilterSettings()
+-{
+- m_includeTagFilter = 0;
+- m_exceptionTagFilter = 0;
+-}
+-
+-VersionImageFilterSettings::VersionImageFilterSettings(const VersionManagerSettings& settings)
+-{
+- setVersionManagerSettings(settings);
+-}
+-
+-bool VersionImageFilterSettings::operator==(const VersionImageFilterSettings& other) const
+-{
+- return m_excludeTagFilter == other.m_excludeTagFilter &&
+- m_exceptionLists == other.m_exceptionLists;
+-}
+-
+-bool VersionImageFilterSettings::matches(const ImageInfo& info) const
+-{
+- if (!isFiltering())
+- {
+- return true;
+- }
+-
+- const qlonglong id = info.id();
+-
+- for (QHash<QString, QList<qlonglong> >::const_iterator it = m_exceptionLists.constBegin();
+- it != m_exceptionLists.constEnd(); ++it)
+- {
+- if (it->contains(id))
+- {
+- return true;
+- }
+- }
+-
+- bool match = true;
+- QList<int> tagIds = info.tagIds();
+-
+- if (!tagIds.contains(m_includeTagFilter))
+- {
+- for (QList<int>::const_iterator it = m_excludeTagFilter.begin();
+- it != m_excludeTagFilter.end(); ++it)
+- {
+- if (tagIds.contains(*it))
+- {
+- match = false;
+- break;
+- }
+- }
+- }
+-
+- if (!match)
+- {
+- if (tagIds.contains(m_exceptionTagFilter))
+- {
+- match = true;
+- }
+- }
+-
+- return match;
+-}
+-
+-bool VersionImageFilterSettings::isHiddenBySettings(const ImageInfo& info) const
+-{
+- QList<int> tagIds = info.tagIds();
+-
+- foreach(int tagId, m_excludeTagFilter)
+- {
+- if (tagIds.contains(tagId))
+- {
+- return true;
+- }
+- }
+-
+- return false;
+-}
+-
+-bool VersionImageFilterSettings::isExemptedBySettings(const ImageInfo& info) const
+-{
+- return info.tagIds().contains(m_exceptionTagFilter);
+-}
+-
+-void VersionImageFilterSettings::setVersionManagerSettings(const VersionManagerSettings& settings)
+-{
+- m_excludeTagFilter.clear();
+-
+- if (!settings.enabled)
+- {
+- return;
+- }
+-
+- if (!(settings.showInViewFlags & VersionManagerSettings::ShowOriginal))
+- {
+- m_excludeTagFilter << TagsCache::instance()->getOrCreateInternalTag(InternalTagName::originalVersion());
+- }
+-
+- if (!(settings.showInViewFlags & VersionManagerSettings::ShowIntermediates))
+- {
+- m_excludeTagFilter << TagsCache::instance()->getOrCreateInternalTag(InternalTagName::intermediateVersion());
+- }
+-
+- m_includeTagFilter = TagsCache::instance()->getOrCreateInternalTag(InternalTagName::currentVersion());
+- m_exceptionTagFilter = TagsCache::instance()->getOrCreateInternalTag(InternalTagName::versionAlwaysVisible());
+-}
+-
+-void VersionImageFilterSettings::setExceptionList(const QList<qlonglong>& idList, const QString& id)
+-{
+- if (idList.isEmpty())
+- {
+- m_exceptionLists.remove(id);
+- }
+- else
+- {
+- m_exceptionLists.insert(id, idList);
+- }
+-}
+-
+-bool VersionImageFilterSettings::isFiltering() const
+-{
+- return !m_excludeTagFilter.isEmpty();
+-}
+-
+-bool VersionImageFilterSettings::isFilteringByTags() const
+-{
+- return isFiltering();
+-}
+-
+-// -------------------------------------------------------------------------------------------------
+-
+-GroupImageFilterSettings::GroupImageFilterSettings()
+- : m_allOpen(false)
+-{
+-}
+-
+-bool GroupImageFilterSettings::operator==(const GroupImageFilterSettings& other) const
+-{
+- return (m_allOpen == other.m_allOpen &&
+- m_openGroups == other.m_openGroups);
+-}
+-
+-bool GroupImageFilterSettings::matches(const ImageInfo& info) const
+-{
+- if (m_allOpen)
+- {
+- return true;
+- }
+-
+- if (info.isGrouped())
+- {
+- return m_openGroups.contains(info.groupImage().id());
+- }
+- return true;
+-}
+-
+-void GroupImageFilterSettings::setOpen(qlonglong group, bool open)
+-{
+- if (open)
+- {
+- m_openGroups << group;
+- }
+- else
+- {
+- m_openGroups.remove(group);
+- }
+-}
+-
+-bool GroupImageFilterSettings::isOpen(qlonglong group) const
+-{
+- return m_openGroups.contains(group);
+-}
+-
+-void GroupImageFilterSettings::setAllOpen(bool open)
+-{
+- m_allOpen = open;
+-}
+-
+-bool GroupImageFilterSettings::isAllOpen() const
+-{
+- return m_allOpen;
+-}
+-
+-bool GroupImageFilterSettings::isFiltering() const
+-{
+- return !m_allOpen;
+-}
+-
+-DatabaseFields::Set GroupImageFilterSettings::watchFlags() const
+-{
+- return DatabaseFields::ImageRelations;
+-}
+-
+-} // namespace Digikam
+diff --git a/libs/models/imagefiltersettings.h b/libs/models/imagefiltersettings.h
+deleted file mode 100644
+index 0e7beae..0000000
+--- a/libs/models/imagefiltersettings.h
++++ /dev/null
+@@ -1,349 +0,0 @@
+-/* ============================================================
+- *
+- * This file is a part of digiKam project
+- * http://www.digikam.org
+- *
+- * Date : 2009-03-05
+- * Description : Filter values for use with ImageFilterModel
+- *
+- * Copyright (C) 2009-2011 by Marcel Wiesweg <marcel dot wiesweg at gmx dot de>
+- * Copyright (C) 2011-2017 by Gilles Caulier <caulier dot gilles at gmail dot com>
+- * Copyright (C) 2010 by Andi Clemens <andi dot clemens at gmail dot com>
+- * Copyright (C) 2011 by Michael G. Hansen <mike at mghansen dot de>
+- * Copyright (C) 2014 by Mohamed Anwer <m dot anwer at gmx dot com>
+- *
+- * This program is free software; you can redistribute it
+- * and/or modify it under the terms of the GNU General
+- * Public License as published by the Free Software Foundation;
+- * either version 2, or (at your option)
+- * any later version.
+- *
+- * This program is distributed in the hope that it will be useful,
+- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+- * GNU General Public License for more details.
+- *
+- * ============================================================ */
+-
+-#ifndef IMAGEFILTERSETTINGS_H
+-#define IMAGEFILTERSETTINGS_H
+-
+-// Qt includes
+-
+-#include <QHash>
+-#include <QList>
+-#include <QMap>
+-#include <QString>
+-#include <QSet>
+-#include <QUrl>
+-
+-// Local includes
+-
+-#include "searchtextbar.h"
+-#include "mimefilter.h"
+-#include "digikam_export.h"
+-
+-namespace Digikam
+-{
+-
+-class ImageInfo;
+-class VersionManagerSettings;
+-
+-namespace DatabaseFields
+-{
+- class Set;
+-}
+-
+-// ---------------------------------------------------------------------------------------
+-
+-class DIGIKAM_DATABASE_EXPORT SearchTextFilterSettings : public SearchTextSettings
+-{
+-
+-public:
+-
+- enum TextFilterFields
+- {
+- None = 0x00,
+- ImageName = 0x01,
+- ImageTitle = 0x02,
+- ImageComment = 0x04,
+- TagName = 0x08,
+- AlbumName = 0x10,
+- ImageAspectRatio = 0x20,
+- ImagePixelSize = 0x40,
+- All = ImageName | ImageTitle | ImageComment | TagName | AlbumName | ImageAspectRatio | ImagePixelSize
+- };
+-
+-public:
+-
+- SearchTextFilterSettings()
+- {
+- textFields = None;
+- }
+-
+- explicit SearchTextFilterSettings(const SearchTextSettings& settings)
+- {
+- caseSensitive = settings.caseSensitive;
+- text = settings.text;
+- textFields = None;
+- }
+-
+- TextFilterFields textFields;
+-};
+-
+-// ---------------------------------------------------------------------------------------
+-
+-class DIGIKAM_DATABASE_EXPORT ImageFilterSettings
+-{
+-public:
+-
+- ImageFilterSettings();
+-
+- /**
+- * Returns true if the given ImageInfo matches the filter criteria.
+- * Optionally, foundText is set to true if it matched by text search.
+- */
+- bool matches(const ImageInfo& info, bool* const foundText = 0) const;
+-
+-public:
+-
+- /// --- Tags filter ---
+-
+- /// Possible logical matching condition used to sort tags id.
+- enum MatchingCondition
+- {
+- OrCondition,
+- AndCondition
+- };
+-
+- void setTagFilter(const QList<int>& includedTags,
+- const QList<int>& excludedTags,
+- MatchingCondition matchingCond,
+- bool showUnTagged,
+- const QList<int>& clTagIds,
+- const QList<int>& plTagIds);
+-
+-public:
+-
+- /// --- Rating filter ---
+-
+- /// Possible conditions used to filter rating: >=, =, <=
+- enum RatingCondition
+- {
+- GreaterEqualCondition,
+- EqualCondition,
+- LessEqualCondition
+- };
+-
+- void setRatingFilter(int rating, RatingCondition ratingCond, bool isUnratedExcluded);
+-
+-public:
+-
+- /// --- Date filter ---
+- void setDayFilter(const QList<QDateTime>& days);
+-
+-public:
+-
+- /// --- Text filter ---
+- void setTextFilter(const SearchTextFilterSettings& settings);
+- void setTagNames(const QHash<int, QString>& tagNameHash);
+- void setAlbumNames(const QHash<int, QString>& albumNameHash);
+-
+-public:
+-
+- /// --- Mime filter ---
+- void setMimeTypeFilter(int mimeTypeFilter);
+-
+-public:
+-
+- /// --- Geolocation filter
+- enum GeolocationCondition
+- {
+- GeolocationNoFilter = 0,
+- GeolocationNoCoordinates = 1 << 1,
+- GeolocationHasCoordinates = 1 << 2
+- };
+-
+- void setGeolocationFilter(const GeolocationCondition& condition);
+-
+-public:
+-
+- /// Returns if the day is a filter criteria
+- bool isFilteringByDay() const;
+-
+- /// Returns if the type mime is a filter criteria
+- bool isFilteringByTypeMime() const;
+-
+- /// Returns whether geolocation is a filter criteria
+- bool isFilteringByGeolocation() const;
+-
+- /// Returns if the rating is a filter criteria
+- bool isFilteringByRating() const;
+-
+- /// Returns if the pick labels is a filter criteria
+- bool isFilteringByPickLabels() const;
+-
+- /// Returns if the color labels is a filter criteria
+- bool isFilteringByColorLabels() const;
+-
+- /// Returns if the tag is a filter criteria
+- bool isFilteringByTags() const;
+-
+- /// Returns if the text (including comment) is a filter criteria
+- bool isFilteringByText() const;
+-
+- /// Returns if images will be filtered by these criteria at all
+- bool isFiltering() const;
+-
+-public:
+-
+- /// --- URL whitelist filter
+- void setUrlWhitelist(const QList<QUrl>& urlList, const QString& id);
+-
+-public:
+-
+- /// --- ID whitelist filter
+- void setIdWhitelist(const QList<qlonglong>& idList, const QString& id);
+-
+-public:
+-
+- /// --- Change notification ---
+-
+- /** Returns database fields a change in which would affect the current filtering.
+- * To find out if an image tag change affects filtering, test isFilteringByTags().
+- * The text filter will also be affected by changes in tags and album names.
+- */
+- DatabaseFields::Set watchFlags() const;
+-
+-private:
+-
+- /**
+- * @brief Returns whether some internal filtering (whitelist by id or URL) or normal filtering is going on
+- */
+- bool isFilteringInternally() const;
+-
+-private:
+-
+- /// --- Tags filter ---
+- bool m_untaggedFilter;
+- QList<int> m_includeTagFilter;
+- QList<int> m_excludeTagFilter;
+- MatchingCondition m_matchingCond;
+- QList<int> m_colorLabelTagFilter;
+- QList<int> m_pickLabelTagFilter;
+-
+- /// --- Rating filter ---
+- int m_ratingFilter;
+- RatingCondition m_ratingCond;
+- bool m_isUnratedExcluded;
+-
+- /// --- Date filter ---
+- QMap<QDateTime, bool> m_dayFilter;
+-
+- /// --- Text filter ---
+- SearchTextFilterSettings m_textFilterSettings;
+-
+- /// Helpers for text search: Set these if you want to search album or tag names with text search
+- QHash<int, QString> m_tagNameHash;
+- QHash<int, QString> m_albumNameHash;
+-
+- /// --- Mime filter ---
+- MimeFilter::TypeMimeFilter m_mimeTypeFilter;
+-
+- /// --- Geolocation filter
+- GeolocationCondition m_geolocationCondition;
+-
+- /// --- URL whitelist filter
+- QHash<QString,QList<QUrl>> m_urlWhitelists;
+-
+- /// --- ID whitelist filter
+- QHash<QString,QList<qlonglong> > m_idWhitelists;
+-};
+-
+-// ---------------------------------------------------------------------------------------
+-
+-class DIGIKAM_DATABASE_EXPORT VersionImageFilterSettings
+-{
+-public:
+-
+- VersionImageFilterSettings();
+- explicit VersionImageFilterSettings(const VersionManagerSettings& settings);
+-
+- bool operator==(const VersionImageFilterSettings& other) const;
+-
+- /**
+- * Returns true if the given ImageInfo matches the filter criteria.
+- */
+- bool matches(const ImageInfo& info) const;
+-
+- bool isHiddenBySettings(const ImageInfo& info) const;
+- bool isExemptedBySettings(const ImageInfo& info) const;
+-
+- /// --- Tags filter ---
+-
+- void setVersionManagerSettings(const VersionManagerSettings& settings);
+-
+- /**
+- * Add list with exceptions: These images will be exempted from filtering by this filter
+- */
+- void setExceptionList(const QList<qlonglong>& idlist, const QString& id);
+-
+- /// Returns if images will be filtered by these criteria at all
+- bool isFiltering() const;
+-
+- /// Returns if the tag is a filter criteria
+- bool isFilteringByTags() const;
+-
+- /// DatabaseFields::Set watchFlags() const: Would return 0
+-
+-protected:
+-
+- QList<int> m_excludeTagFilter;
+- int m_includeTagFilter;
+- int m_exceptionTagFilter;
+- QHash<QString,QList<qlonglong> > m_exceptionLists;
+-};
+-
+-// ---------------------------------------------------------------------------------------
+-
+-class DIGIKAM_DATABASE_EXPORT GroupImageFilterSettings
+-{
+-public:
+-
+- GroupImageFilterSettings();
+-
+- bool operator==(const GroupImageFilterSettings& other) const;
+-
+- /**
+- * Returns true if the given ImageInfo matches the filter criteria.
+- */
+- bool matches(const ImageInfo& info) const;
+-
+- /**
+- * Open or close a group.
+- */
+- void setOpen(qlonglong group, bool open);
+- bool isOpen(qlonglong group) const;
+-
+- /**
+- * Open all groups
+- */
+- void setAllOpen(bool open);
+- bool isAllOpen() const;
+-
+- /// Returns if images will be filtered by these criteria at all
+- bool isFiltering() const;
+-
+- DatabaseFields::Set watchFlags() const;
+-
+-protected:
+-
+- bool m_allOpen;
+- QSet<qlonglong> m_openGroups;
+-};
+-
+-} // namespace Digikam
+-
+-Q_DECLARE_METATYPE(Digikam::ImageFilterSettings::GeolocationCondition)
+-
+-#endif // IMAGEFILTERSETTINGS_H
+diff --git a/libs/models/imagelistmodel.cpp b/libs/models/imagelistmodel.cpp
+deleted file mode 100644
+index fafce34..0000000
+--- a/libs/models/imagelistmodel.cpp
++++ /dev/null
+@@ -1,70 +0,0 @@
+-/* ============================================================
+- *
+- * This file is a part of digiKam project
+- * http://www.digikam.org
+- *
+- * Date : 2010-12-06
+- * Description : An image model based on a static list
+- *
+- * Copyright (C) 2010-2011 by Marcel Wiesweg <marcel dot wiesweg at gmx dot de>
+- *
+- * This program is free software; you can redistribute it
+- * and/or modify it under the terms of the GNU General
+- * Public License as published by the Free Software Foundation;
+- * either version 2, or (at your option)
+- * any later version.
+- *
+- * This program is distributed in the hope that it will be useful,
+- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+- * GNU General Public License for more details.
+- *
+- * ============================================================ */
+-
+-#include "imagelistmodel.h"
+-
+-// Local includes
+-
+-#include "digikam_debug.h"
+-#include "coredbaccess.h"
+-#include "coredbchangesets.h"
+-#include "coredbwatch.h"
+-#include "imageinfo.h"
+-#include "imageinfolist.h"
+-
+-namespace Digikam
+-{
+-
+-ImageListModel::ImageListModel(QObject* parent)
+- : ImageThumbnailModel(parent)
+-{
+- connect(CoreDbAccess::databaseWatch(), SIGNAL(collectionImageChange(CollectionImageChangeset)),
+- this, SLOT(slotCollectionImageChange(CollectionImageChangeset)));
+-}
+-
+-ImageListModel::~ImageListModel()
+-{
+-}
+-
+-void ImageListModel::slotCollectionImageChange(const CollectionImageChangeset& changeset)
+-{
+- if (isEmpty())
+- {
+- return;
+- }
+-
+- switch (changeset.operation())
+- {
+- case CollectionImageChangeset::Added:
+- break;
+- case CollectionImageChangeset::Removed:
+- case CollectionImageChangeset::RemovedAll:
+- removeImageInfos(ImageInfoList(changeset.ids()));
+- break;
+-
+- default:
+- break;
+- }
+-}
+-
+-} // namespace Digikam
+diff --git a/libs/models/imagelistmodel.h b/libs/models/imagelistmodel.h
+deleted file mode 100644
+index a225b1b..0000000
+--- a/libs/models/imagelistmodel.h
++++ /dev/null
+@@ -1,63 +0,0 @@
+-/* ============================================================
+- *
+- * This file is a part of digiKam project
+- * http://www.digikam.org
+- *
+- * Date : 2010-12-06
+- * Description : An image model based on a static list
+- *
+- * Copyright (C) 2010-2011 by Marcel Wiesweg <marcel dot wiesweg at gmx dot de>
+- *
+- * This program is free software; you can redistribute it
+- * and/or modify it under the terms of the GNU General
+- * Public License as published by the Free Software Foundation;
+- * either version 2, or (at your option)
+- * any later version.
+- *
+- * This program is distributed in the hope that it will be useful,
+- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+- * GNU General Public License for more details.
+- *
+- * ============================================================ */
+-
+-#ifndef IMAGELISTMODEL_H
+-#define IMAGELISTMODEL_H
+-
+-// Local includes
+-
+-#include "imagethumbnailmodel.h"
+-#include "digikam_export.h"
+-
+-namespace Digikam
+-{
+-
+-class ImageChangeset;
+-class CollectionImageChangeset;
+-
+-class DIGIKAM_DATABASE_EXPORT ImageListModel : public ImageThumbnailModel
+-{
+- Q_OBJECT
+-
+-public:
+-
+- explicit ImageListModel(QObject* parent = 0);
+- ~ImageListModel();
+-
+- // NOTE: necessary methods to add and remove ImageInfos to the model are inherited from ImageModel
+-
+-Q_SIGNALS:
+-
+- /**
+- * Emitted when images are removed from the model because they are removed in the database
+- */
+- void imageInfosRemoved(const QList<ImageInfo>& infos);
+-
+-protected Q_SLOTS:
+-
+- void slotCollectionImageChange(const CollectionImageChangeset& changeset);
+-};
+-
+-} // namespace Digikam
+-
+-#endif // IMAGELISTMODEL_H
+diff --git a/libs/models/imagemodel.cpp b/libs/models/imagemodel.cpp
+deleted file mode 100644
+index 41b43cf..0000000
+--- a/libs/models/imagemodel.cpp
++++ /dev/null
+@@ -1,1368 +0,0 @@
+-/* ============================================================
+- *
+- * This file is a part of digiKam project
+- * http://www.digikam.org
+- *
+- * Date : 2009-03-05
+- * Description : Qt item model for database entries
+- *
+- * Copyright (C) 2009-2011 by Marcel Wiesweg <marcel dot wiesweg at gmx dot de>
+- *
+- * This program is free software; you can redistribute it
+- * and/or modify it under the terms of the GNU General
+- * Public License as published by the Free Software Foundation;
+- * either version 2, or (at your option)
+- * any later version.
+- *
+- * This program is distributed in the hope that it will be useful,
+- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+- * GNU General Public License for more details.
+- *
+- * ============================================================ */
+-
+-#include "imagemodel.h"
+-
+-// Qt includes
+-
+-#include <QHash>
+-#include <QItemSelection>
+-
+-// Local includes
+-
+-#include "digikam_debug.h"
+-#include "coredbchangesets.h"
+-#include "coredbfields.h"
+-#include "coredbwatch.h"
+-#include "imageinfo.h"
+-#include "imageinfolist.h"
+-#include "abstractitemdragdrophandler.h"
+-
+-namespace Digikam
+-{
+-
+-class ImageModel::Private
+-{
+-public:
+-
+- Private()
+- {
+- preprocessor = 0;
+- keepFilePathCache = false;
+- sendRemovalSignals = false;
+- incrementalUpdater = 0;
+- refreshing = false;
+- reAdding = false;
+- incrementalRefreshRequested = false;
+- }
+-
+- ImageInfoList infos;
+- QList<QVariant> extraValues;
+- QHash<qlonglong, int> idHash;
+-
+- bool keepFilePathCache;
+- QHash<QString, qlonglong> filePathHash;
+-
+- bool sendRemovalSignals;
+-
+- QObject* preprocessor;
+- bool refreshing;
+- bool reAdding;
+- bool incrementalRefreshRequested;
+-
+- DatabaseFields::Set watchFlags;
+-
+- class ImageModelIncrementalUpdater* incrementalUpdater;
+-
+- ImageInfoList pendingInfos;
+- QList<QVariant> pendingExtraValues;
+-
+- inline bool isValid(const QModelIndex& index)
+- {
+- if (!index.isValid())
+- {
+- return false;
+- }
+-
+- if (index.row() < 0 || index.row() >= infos.size())
+- {
+- qCDebug(DIGIKAM_GENERAL_LOG) << "Invalid index" << index;
+- return false;
+- }
+-
+- return true;
+- }
+- inline bool extraValueValid(const QModelIndex& index)
+- {
+- // we assume isValid() being called before, no duplicate checks
+- if (index.row() >= extraValues.size())
+- {
+- qCDebug(DIGIKAM_GENERAL_LOG) << "Invalid index for extraData" << index;
+- return false;
+- }
+-
+- return true;
+- }
+-};
+-
+-typedef QPair<int, int> IntPair; // to make foreach macro happy
+-typedef QList<IntPair> IntPairList;
+-
+-class ImageModelIncrementalUpdater
+-{
+-public:
+-
+- explicit ImageModelIncrementalUpdater(ImageModel::Private* d);
+-
+- void appendInfos(const QList<ImageInfo>& infos, const QList<QVariant>& extraValues);
+- void aboutToBeRemovedInModel(const IntPairList& aboutToBeRemoved);
+- QList<IntPair> oldIndexes();
+-
+- static QList<IntPair> toContiguousPairs(const QList<int>& ids);
+-
+-public:
+-
+- QHash<qlonglong, int> oldIds;
+- QList<QVariant> oldExtraValues;
+- QList<ImageInfo> newInfos;
+- QList<QVariant> newExtraValues;
+- QList<IntPairList> modelRemovals;
+-};
+-
+-ImageModel::ImageModel(QObject* parent)
+- : QAbstractListModel(parent),
+- d(new Private)
+-{
+- connect(CoreDbAccess::databaseWatch(), SIGNAL(imageChange(ImageChangeset)),
+- this, SLOT(slotImageChange(ImageChangeset)));
+-
+- connect(CoreDbAccess::databaseWatch(), SIGNAL(imageTagChange(ImageTagChangeset)),
+- this, SLOT(slotImageTagChange(ImageTagChangeset)));
+-}
+-
+-ImageModel::~ImageModel()
+-{
+- delete d->incrementalUpdater;
+- delete d;
+-}
+-
+-// ------------ Access methods -------------
+-
+-void ImageModel::setKeepsFilePathCache(bool keepCache)
+-{
+- d->keepFilePathCache = keepCache;
+-}
+-
+-bool ImageModel::keepsFilePathCache() const
+-{
+- return d->keepFilePathCache;
+-}
+-
+-bool ImageModel::isEmpty() const
+-{
+- return d->infos.isEmpty();
+-}
+-
+-void ImageModel::setWatchFlags(const DatabaseFields::Set& set)
+-{
+- d->watchFlags = set;
+-}
+-
+-ImageInfo ImageModel::imageInfo(const QModelIndex& index) const
+-{
+- if (!d->isValid(index))
+- {
+- return ImageInfo();
+- }
+-
+- return d->infos.at(index.row());
+-}
+-
+-ImageInfo& ImageModel::imageInfoRef(const QModelIndex& index) const
+-{
+- return d->infos[index.row()];
+-}
+-
+-qlonglong ImageModel::imageId(const QModelIndex& index) const
+-{
+- if (!d->isValid(index))
+- {
+- return 0;
+- }
+-
+- return d->infos.at(index.row()).id();
+-}
+-
+-QList<ImageInfo> ImageModel::imageInfos(const QList<QModelIndex>& indexes) const
+-{
+- QList<ImageInfo> infos;
+-
+- foreach(const QModelIndex& index, indexes)
+- {
+- infos << imageInfo(index);
+- }
+-
+- return infos;
+-}
+-
+-QList<qlonglong> ImageModel::imageIds(const QList<QModelIndex>& indexes) const
+-{
+- QList<qlonglong> ids;
+-
+- foreach(const QModelIndex& index, indexes)
+- {
+- ids << imageId(index);
+- }
+-
+- return ids;
+-}
+-
+-ImageInfo ImageModel::imageInfo(int row) const
+-{
+- if (row >= d->infos.size())
+- {
+- return ImageInfo();
+- }
+-
+- return d->infos.at(row);
+-}
+-
+-ImageInfo& ImageModel::imageInfoRef(int row) const
+-{
+- return d->infos[row];
+-}
+-
+-qlonglong ImageModel::imageId(int row) const
+-{
+- if (row < 0 || row >= d->infos.size())
+- {
+- return -1;
+- }
+-
+- return d->infos.at(row).id();
+-}
+-
+-QModelIndex ImageModel::indexForImageInfo(const ImageInfo& info) const
+-{
+- return indexForImageId(info.id());
+-}
+-
+-QModelIndex ImageModel::indexForImageInfo(const ImageInfo& info, const QVariant& extraValue) const
+-{
+- return indexForImageId(info.id(), extraValue);
+-}
+-
+-QList<QModelIndex> ImageModel::indexesForImageInfo(const ImageInfo& info) const
+-{
+- return indexesForImageId(info.id());
+-}
+-
+-QModelIndex ImageModel::indexForImageId(qlonglong id) const
+-{
+- int index = d->idHash.value(id, -1);
+-
+- if (index != -1)
+- {
+- return createIndex(index, 0);
+- }
+-
+- return QModelIndex();
+-}
+-
+-QModelIndex ImageModel::indexForImageId(qlonglong id, const QVariant& extraValue) const
+-{
+- if (d->extraValues.isEmpty())
+- return indexForImageId(id);
+-
+- QHash<qlonglong, int>::const_iterator it;
+-
+- for (it = d->idHash.constFind(id); it != d->idHash.constEnd() && it.key() == id; ++it)
+- {
+- if (d->extraValues.at(it.value()) == extraValue)
+- return createIndex(it.value(), 0);
+- }
+-
+- return QModelIndex();
+-}
+-
+-QList<QModelIndex> ImageModel::indexesForImageId(qlonglong id) const
+-{
+- QList<QModelIndex> indexes;
+- QHash<qlonglong, int>::const_iterator it;
+-
+- for (it = d->idHash.constFind(id); it != d->idHash.constEnd() && it.key() == id; ++it)
+- {
+- indexes << createIndex(it.value(), 0);
+- }
+-
+- return indexes;
+-}
+-
+-int ImageModel::numberOfIndexesForImageInfo(const ImageInfo& info) const
+-{
+- return numberOfIndexesForImageId(info.id());
+-}
+-
+-int ImageModel::numberOfIndexesForImageId(qlonglong id) const
+-{
+- if (d->extraValues.isEmpty())
+- {
+- return 0;
+- }
+-
+- int count = 0;
+- QHash<qlonglong,int>::const_iterator it;
+-
+- for (it = d->idHash.constFind(id); it != d->idHash.constEnd() && it.key() == id; ++it)
+- {
+- ++count;
+- }
+-
+- return count;
+-}
+-
+-// static method
+-ImageInfo ImageModel::retrieveImageInfo(const QModelIndex& index)
+-{
+- if (!index.isValid())
+- {
+- return ImageInfo();
+- }
+-
+- ImageModel* const model = index.data(ImageModelPointerRole).value<ImageModel*>();
+- int row = index.data(ImageModelInternalId).toInt();
+-
+- if (!model)
+- {
+- return ImageInfo();
+- }
+-
+- return model->imageInfo(row);
+-}
+-
+-// static method
+-qlonglong ImageModel::retrieveImageId(const QModelIndex& index)
+-{
+- if (!index.isValid())
+- {
+- return 0;
+- }
+-
+- ImageModel* const model = index.data(ImageModelPointerRole).value<ImageModel*>();
+- int row = index.data(ImageModelInternalId).toInt();
+-
+- if (!model)
+- {
+- return 0;
+- }
+-
+- return model->imageId(row);
+-}
+-
+-QModelIndex ImageModel::indexForPath(const QString& filePath) const
+-{
+- if (d->keepFilePathCache)
+- {
+- return indexForImageId(d->filePathHash.value(filePath));
+- }
+- else
+- {
+- const int size = d->infos.size();
+-
+- for (int i=0; i<size; ++i)
+- {
+- if (d->infos.at(i).filePath() == filePath)
+- {
+- return createIndex(i, 0);
+- }
+- }
+- }
+-
+- return QModelIndex();
+-}
+-
+-QList<QModelIndex> ImageModel::indexesForPath(const QString& filePath) const
+-{
+- if (d->keepFilePathCache)
+- {
+- return indexesForImageId(d->filePathHash.value(filePath));
+- }
+- else
+- {
+- QList<QModelIndex> indexes;
+- const int size = d->infos.size();
+-
+- for (int i=0; i<size; ++i)
+- {
+- if (d->infos.at(i).filePath() == filePath)
+- {
+- indexes << createIndex(i, 0);
+- }
+- }
+-
+- return indexes;
+- }
+-}
+-
+-ImageInfo ImageModel::imageInfo(const QString& filePath) const
+-{
+- if (d->keepFilePathCache)
+- {
+- qlonglong id = d->filePathHash.value(filePath);
+-
+- if (id)
+- {
+- int index = d->idHash.value(id, -1);
+-
+- if (index != -1)
+- {
+- return d->infos.at(index);
+- }
+- }
+- }
+- else
+- {
+- foreach(const ImageInfo& info, d->infos)
+- {
+- if (info.filePath() == filePath)
+- {
+- return info;
+- }
+- }
+- }
+-
+- return ImageInfo();
+-}
+-
+-QList<ImageInfo> ImageModel::imageInfos(const QString& filePath) const
+-{
+- QList<ImageInfo> infos;
+-
+- if (d->keepFilePathCache)
+- {
+- qlonglong id = d->filePathHash.value(filePath);
+-
+- if (id)
+- {
+- foreach(int index, d->idHash.values(id))
+- {
+- infos << d->infos.at(index);
+- }
+- }
+- }
+- else
+- {
+- foreach(const ImageInfo& info, d->infos)
+- {
+- if (info.filePath() == filePath)
+- {
+- infos << info;
+- }
+- }
+- }
+-
+- return infos;
+-}
+-
+-void ImageModel::addImageInfo(const ImageInfo& info)
+-{
+- addImageInfos(QList<ImageInfo>() << info, QList<QVariant>());
+-}
+-
+-void ImageModel::addImageInfos(const QList<ImageInfo>& infos)
+-{
+- addImageInfos(infos, QList<QVariant>());
+-}
+-
+-void ImageModel::addImageInfos(const QList<ImageInfo>& infos, const QList<QVariant>& extraValues)
+-{
+- if (infos.isEmpty())
+- {
+- return;
+- }
+-
+- if (d->incrementalUpdater)
+- {
+- d->incrementalUpdater->appendInfos(infos, extraValues);
+- }
+- else
+- {
+- appendInfos(infos, extraValues);
+- }
+-}
+-
+-void ImageModel::addImageInfoSynchronously(const ImageInfo& info)
+-{
+- addImageInfosSynchronously(QList<ImageInfo>() << info, QList<QVariant>());
+-}
+-
+-void ImageModel::addImageInfosSynchronously(const QList<ImageInfo>& infos)
+-{
+- addImageInfos(infos, QList<QVariant>());
+-}
+-
+-void ImageModel::addImageInfosSynchronously(const QList<ImageInfo>& infos, const QList<QVariant>& extraValues)
+-{
+- if (infos.isEmpty())
+- {
+- return;
+- }
+-
+- publiciseInfos(infos, extraValues);
+- emit processAdded(infos, extraValues);
+-}
+-
+-void ImageModel::ensureHasImageInfo(const ImageInfo& info)
+-{
+- ensureHasImageInfos(QList<ImageInfo>() << info, QList<QVariant>());
+-}
+-
+-void ImageModel::ensureHasImageInfos(const QList<ImageInfo>& infos)
+-{
+- ensureHasImageInfos(infos, QList<QVariant>());
+-}
+-
+-void ImageModel::ensureHasImageInfos(const QList<ImageInfo>& infos, const QList<QVariant>& extraValues)
+-{
+- if (extraValues.isEmpty())
+- {
+- if (!d->pendingExtraValues.isEmpty())
+- {
+- qCDebug(DIGIKAM_GENERAL_LOG) << "ExtraValue / No Extra Value mismatch. Ignoring added infos.";
+- return;
+- }
+- }
+- else
+- {
+- if (d->pendingInfos.size() != d->pendingExtraValues.size())
+- {
+- qCDebug(DIGIKAM_GENERAL_LOG) << "ExtraValue / No Extra Value mismatch. Ignoring added infos.";
+- return;
+- }
+- }
+-
+- d->pendingInfos << infos;
+- d->pendingExtraValues << extraValues;
+- cleanSituationChecks();
+-}
+-
+-void ImageModel::clearImageInfos()
+-{
+- d->infos.clear();
+- d->extraValues.clear();
+- d->idHash.clear();
+- d->filePathHash.clear();
+- delete d->incrementalUpdater;
+- d->incrementalUpdater = 0;
+- d->pendingInfos.clear();
+- d->pendingExtraValues.clear();
+- d->refreshing = false;
+- d->reAdding = false;
+- d->incrementalRefreshRequested = false;
+-
+- beginResetModel();
+- endResetModel();
+-
+- imageInfosCleared();
+-}
+-
+-void ImageModel::setImageInfos(const QList<ImageInfo>& infos)
+-{
+- clearImageInfos();
+- addImageInfos(infos);
+-}
+-
+-QList<ImageInfo> ImageModel::imageInfos() const
+-{
+- return d->infos;
+-}
+-
+-QList<qlonglong> ImageModel::imageIds() const
+-{
+- return d->idHash.keys();
+-}
+-
+-bool ImageModel::hasImage(qlonglong id) const
+-{
+- return d->idHash.contains(id);
+-}
+-
+-bool ImageModel::hasImage(const ImageInfo& info) const
+-{
+- return d->idHash.contains(info.id());
+-}
+-
+-bool ImageModel::hasImage(const ImageInfo& info, const QVariant& extraValue) const
+-{
+- return hasImage(info.id(), extraValue);
+-}
+-
+-bool ImageModel::hasImage(qlonglong id, const QVariant& extraValue) const
+-{
+- if (d->extraValues.isEmpty())
+- return hasImage(id);
+-
+- QHash<qlonglong, int>::const_iterator it;
+-
+- for (it = d->idHash.constFind(id); it != d->idHash.constEnd() && it.key() == id; ++it)
+- {
+- if (d->extraValues.at(it.value()) == extraValue)
+- return true;
+- }
+-
+- return false;;
+-}
+-
+-QList<ImageInfo> ImageModel::uniqueImageInfos() const
+-{
+- if (d->extraValues.isEmpty())
+- {
+- return d->infos;
+- }
+-
+- QList<ImageInfo> uniqueInfos;
+- const int size = d->infos.size();
+-
+- for (int i=0; i<size; ++i)
+- {
+- const ImageInfo& info = d->infos.at(i);
+-
+- if (d->idHash.value(info.id()) == i)
+- {
+- uniqueInfos << info;
+- }
+- }
+-
+- return uniqueInfos;
+-}
+-
+-void ImageModel::emitDataChangedForAll()
+-{
+- if (d->infos.isEmpty())
+- {
+- return;
+- }
+-
+- QModelIndex first = createIndex(0, 0);
+- QModelIndex last = createIndex(d->infos.size() - 1, 0);
+- emit dataChanged(first, last);
+-}
+-
+-void ImageModel::emitDataChangedForSelection(const QItemSelection& selection)
+-{
+- if (!selection.isEmpty())
+- {
+- foreach(const QItemSelectionRange& range, selection)
+- {
+- emit dataChanged(range.topLeft(), range.bottomRight());
+- }
+- }
+-}
+-
+-void ImageModel::ensureHasGroupedImages(const ImageInfo& groupLeader)
+-{
+- ensureHasImageInfos(groupLeader.groupedImages());
+-}
+-
+-// ------------ Preprocessing -------------
+-
+-void ImageModel::setPreprocessor(QObject* preprocessor)
+-{
+- unsetPreprocessor(d->preprocessor);
+- d->preprocessor = preprocessor;
+-}
+-
+-void ImageModel::unsetPreprocessor(QObject* preprocessor)
+-{
+- if (preprocessor && d->preprocessor == preprocessor)
+- {
+- disconnect(this, SIGNAL(preprocess(QList<ImageInfo>,QList<QVariant>)), 0, 0);
+- disconnect(d->preprocessor, 0, this, SLOT(reAddImageInfos(QList<ImageInfo>,QList<QVariant>)));
+- disconnect(d->preprocessor, 0, this, SLOT(reAddingFinished()));
+- }
+-}
+-
+-void ImageModel::appendInfos(const QList<ImageInfo>& infos, const QList<QVariant>& extraValues)
+-{
+- if (infos.isEmpty())
+- {
+- return;
+- }
+-
+- if (d->preprocessor)
+- {
+- d->reAdding = true;
+- emit preprocess(infos, extraValues);
+- }
+- else
+- {
+- publiciseInfos(infos, extraValues);
+- }
+-}
+-
+-void ImageModel::appendInfosChecked(const QList<ImageInfo>& infos, const QList<QVariant>& extraValues)
+-{
+- // This method does deduplication. It is private because in context of readding or refreshing it is of no use.
+-
+- if (extraValues.isEmpty())
+- {
+- QList<ImageInfo> checkedInfos;
+-
+- foreach (const ImageInfo& info, infos)
+- {
+- if (!hasImage(info))
+- {
+- checkedInfos << info;
+- }
+- }
+-
+- appendInfos(checkedInfos, QList<QVariant>());
+- }
+- else
+- {
+- QList<ImageInfo> checkedInfos;
+- QList<QVariant> checkedExtraValues;
+- const int size = infos.size();
+-
+- for (int i=0; i<size; i++)
+- {
+- if (!hasImage(infos[i], extraValues[i]))
+- {
+- checkedInfos << infos[i];
+- checkedExtraValues << extraValues[i];
+- }
+- }
+-
+- appendInfos(checkedInfos, checkedExtraValues);
+- }
+-}
+-
+-void ImageModel::reAddImageInfos(const QList<ImageInfo>& infos, const QList<QVariant>& extraValues)
+-{
+- // addImageInfos -> appendInfos -> preprocessor -> reAddImageInfos
+- publiciseInfos(infos, extraValues);
+-}
+-
+-void ImageModel::reAddingFinished()
+-{
+- d->reAdding = false;
+- cleanSituationChecks();
+-}
+-
+-void ImageModel::startRefresh()
+-{
+- d->refreshing = true;
+-}
+-
+-void ImageModel::finishRefresh()
+-{
+- d->refreshing = false;
+- cleanSituationChecks();
+-}
+-
+-bool ImageModel::isRefreshing() const
+-{
+- return d->refreshing;
+-}
+-
+-void ImageModel::cleanSituationChecks()
+-{
+- // For starting an incremental refresh we want a clear situation:
+- // Any remaining batches from non-incremental refreshing subclasses have been received in appendInfos(),
+- // any batches sent to preprocessor for re-adding have been re-added.
+- if (d->refreshing || d->reAdding)
+- {
+- return;
+- }
+-
+- if (!d->pendingInfos.isEmpty())
+- {
+- appendInfosChecked(d->pendingInfos, d->pendingExtraValues);
+- d->pendingInfos.clear();
+- d->pendingExtraValues.clear();
+- cleanSituationChecks();
+- return;
+- }
+-
+- if (d->incrementalRefreshRequested)
+- {
+- d->incrementalRefreshRequested = false;
+- emit readyForIncrementalRefresh();
+- }
+- else
+- {
+- emit allRefreshingFinished();
+- }
+-}
+-
+-void ImageModel::publiciseInfos(const QList<ImageInfo>& infos, const QList<QVariant>& extraValues)
+-{
+- if (infos.isEmpty())
+- {
+- return;
+- }
+-
+- Q_ASSERT(infos.size() == extraValues.size() || (extraValues.isEmpty() && d->extraValues.isEmpty()));
+-
+- emit imageInfosAboutToBeAdded(infos);
+- const int firstNewIndex = d->infos.size();
+- const int lastNewIndex = d->infos.size() + infos.size() - 1;
+- beginInsertRows(QModelIndex(), firstNewIndex, lastNewIndex);
+- d->infos << infos;
+- d->extraValues << extraValues;
+-
+- for (int i=firstNewIndex; i<=lastNewIndex; ++i)
+- {
+- const ImageInfo& info = d->infos.at(i);
+- qlonglong id = info.id();
+- d->idHash.insertMulti(id, i);
+-
+- if (d->keepFilePathCache)
+- {
+- d->filePathHash[info.filePath()] = id;
+- }
+- }
+-
+- endInsertRows();
+- emit imageInfosAdded(infos);
+-}
+-
+-void ImageModel::requestIncrementalRefresh()
+-{
+- if (d->reAdding)
+- {
+- d->incrementalRefreshRequested = true;
+- }
+- else
+- {
+- emit readyForIncrementalRefresh();
+- }
+-}
+-
+-bool ImageModel::hasIncrementalRefreshPending() const
+-{
+- return d->incrementalRefreshRequested;
+-}
+-
+-void ImageModel::startIncrementalRefresh()
+-{
+- delete d->incrementalUpdater;
+-
+- d->incrementalUpdater = new ImageModelIncrementalUpdater(d);
+-}
+-
+-void ImageModel::finishIncrementalRefresh()
+-{
+- if (!d->incrementalUpdater)
+- {
+- return;
+- }
+-
+- // remove old entries
+- QList<QPair<int, int> > pairs = d->incrementalUpdater->oldIndexes();
+- removeRowPairs(pairs);
+-
+- // add new indexes
+- appendInfos(d->incrementalUpdater->newInfos, d->incrementalUpdater->newExtraValues);
+-
+- delete d->incrementalUpdater;
+- d->incrementalUpdater = 0;
+-}
+-
+-void ImageModel::removeIndex(const QModelIndex& index)
+-{
+- removeIndexes(QList<QModelIndex>() << index);
+-}
+-
+-void ImageModel::removeIndexes(const QList<QModelIndex>& indexes)
+-{
+- QList<int> listIndexes;
+-
+- foreach(const QModelIndex& index, indexes)
+- {
+- if (d->isValid(index))
+- {
+- listIndexes << index.row();
+- }
+- }
+-
+- if (listIndexes.isEmpty())
+- {
+- return;
+- }
+-
+- removeRowPairsWithCheck(ImageModelIncrementalUpdater::toContiguousPairs(listIndexes));
+-}
+-
+-void ImageModel::removeImageInfo(const ImageInfo& info)
+-{
+- removeImageInfos(QList<ImageInfo>() << info);
+-}
+-
+-void ImageModel::removeImageInfos(const QList<ImageInfo>& infos)
+-{
+- QList<int> listIndexes;
+-
+- foreach(const ImageInfo& info, infos)
+- {
+- QModelIndex index = indexForImageId(info.id());
+-
+- if (index.isValid())
+- {
+- listIndexes << index.row();
+- }
+- }
+- removeRowPairsWithCheck(ImageModelIncrementalUpdater::toContiguousPairs(listIndexes));
+-}
+-
+-void ImageModel::removeImageInfos(const QList<ImageInfo>& infos, const QList<QVariant>& extraValues)
+-{
+- if (extraValues.isEmpty())
+- {
+- removeImageInfos(infos);
+- return;
+- }
+-
+- QList<int> listIndexes;
+-
+- for (int i=0; i<infos.size(); ++i)
+- {
+- QModelIndex index = indexForImageId(infos.at(i).id(), extraValues.at(i));
+-
+- if (index.isValid())
+- {
+- listIndexes << index.row();
+- }
+- }
+-
+- removeRowPairsWithCheck(ImageModelIncrementalUpdater::toContiguousPairs(listIndexes));
+-}
+-
+-void ImageModel::setSendRemovalSignals(bool send)
+-{
+- d->sendRemovalSignals = send;
+-}
+-
+-template <class List, typename T>
+-static bool pairsContain(const List& list, T value)
+-{
+- typename List::const_iterator middle;
+- typename List::const_iterator begin = list.begin();
+- typename List::const_iterator end = list.end();
+- int n = int(end - begin);
+- int half;
+-
+- while (n > 0)
+- {
+- half = n >> 1;
+- middle = begin + half;
+-
+- if (middle->first <= value && middle->second >= value)
+- {
+- return true;
+- }
+- else if (middle->second < value)
+- {
+- begin = middle + 1;
+- n -= half + 1;
+- }
+- else
+- {
+- n = half;
+- }
+- }
+-
+- return false;
+-}
+-
+-void ImageModel::removeRowPairsWithCheck(const QList<QPair<int, int> >& toRemove)
+-{
+- if (d->incrementalUpdater)
+- {
+- d->incrementalUpdater->aboutToBeRemovedInModel(toRemove);
+- }
+-
+- removeRowPairs(toRemove);
+-}
+-
+-void ImageModel::removeRowPairs(const QList<QPair<int, int> >& toRemove)
+-{
+- if (toRemove.isEmpty())
+- {
+- return;
+- }
+-
+- // Remove old indexes
+- // Keep in mind that when calling beginRemoveRows all structures announced to be removed
+- // must still be valid, and this includes our hashes as well, which limits what we can optimize
+-
+- int removedRows = 0, offset = 0;
+- typedef QPair<int, int> IntPair; // to make foreach macro happy
+-
+- foreach(const IntPair& pair, toRemove)
+- {
+- const int begin = pair.first - offset;
+- const int end = pair.second - offset; // inclusive
+- removedRows = end - begin + 1;
+-
+- // when removing from the list, all subsequent indexes are affected
+- offset += removedRows;
+-
+- QList<ImageInfo> removedInfos;
+-
+- if (d->sendRemovalSignals)
+- {
+- qCopy(d->infos.begin() + begin, d->infos.begin() + end, removedInfos.begin());
+- emit imageInfosAboutToBeRemoved(removedInfos);
+- }
+-
+- imageInfosAboutToBeRemoved(begin, end);
+- beginRemoveRows(QModelIndex(), begin, end);
+-
+- // update idHash - which points to indexes of d->infos, and these change now!
+- QHash<qlonglong, int>::iterator it;
+-
+- for (it = d->idHash.begin(); it != d->idHash.end(); )
+- {
+- if (it.value() >= begin)
+- {
+- if (it.value() > end)
+- {
+- // after the removed interval: adjust index
+- it.value() -= removedRows;
+- }
+- else
+- {
+- // in the removed interval
+- it = d->idHash.erase(it);
+- continue;
+- }
+- }
+-
+- ++it;
+- }
+-
+- // remove from list
+- d->infos.erase(d->infos.begin() + begin, d->infos.begin() + (end + 1));
+-
+- if (!d->extraValues.isEmpty())
+- {
+- d->extraValues.erase(d->extraValues.begin() + begin, d->extraValues.begin() + (end + 1));
+- }
+-
+- endRemoveRows();
+-
+- if (d->sendRemovalSignals)
+- {
+- emit imageInfosRemoved(removedInfos);
+- }
+- }
+-
+- // tidy up: remove old indexes from file path hash now
+- if (d->keepFilePathCache)
+- {
+- QHash<QString, qlonglong>::iterator it;
+-
+- for (it = d->filePathHash.begin(); it != d->filePathHash.end(); )
+- {
+- if (pairsContain(toRemove, it.value()))
+- {
+- it = d->filePathHash.erase(it);
+- }
+- else
+- {
+- ++it;
+- }
+- }
+- }
+-}
+-
+-ImageModelIncrementalUpdater::ImageModelIncrementalUpdater(ImageModel::Private* d)
+-{
+- oldIds = d->idHash;
+- oldExtraValues = d->extraValues;
+-}
+-
+-void ImageModelIncrementalUpdater::appendInfos(const QList<ImageInfo>& infos, const QList<QVariant>& extraValues)
+-{
+- if (extraValues.isEmpty())
+- {
+- foreach(const ImageInfo& info, infos)
+- {
+- QHash<qlonglong,int>::iterator it = oldIds.find(info.id());
+-
+- if (it != oldIds.end())
+- {
+- oldIds.erase(it);
+- }
+- else
+- {
+- newInfos << info;
+- }
+- }
+- }
+- else
+- {
+- for (int i=0; i<infos.size(); ++i)
+- {
+- const ImageInfo& info = infos.at(i);
+- bool found = false;
+- QHash<qlonglong,int>::iterator it;
+-
+- for (it = oldIds.find(info.id()); it != oldIds.end() && it.key() == info.id(); ++it)
+- {
+- // first check is for bug #262596. Not sure if needed.
+- if (it.value() < oldExtraValues.size() && extraValues.at(i) == oldExtraValues.at(it.value()))
+- {
+- found = true;
+- break;
+- }
+- }
+-
+- if (found)
+- {
+- oldIds.erase(it);
+- // do not erase from oldExtraValues - oldIds is a hash id -> index.
+- }
+- else
+- {
+- newInfos << info;
+- newExtraValues << extraValues.at(i);
+- }
+- }
+- }
+-}
+-
+-void ImageModelIncrementalUpdater::aboutToBeRemovedInModel(const IntPairList& toRemove)
+-{
+- modelRemovals << toRemove;
+-}
+-
+-QList<QPair<int, int> > ImageModelIncrementalUpdater::oldIndexes()
+-{
+- // first, apply all changes to indexes by direct removal in model
+- // while the updater was active
+- foreach(const IntPairList& list, modelRemovals)
+- {
+- int removedRows = 0, offset = 0;
+-
+- foreach(const IntPair& pair, list)
+- {
+- const int begin = pair.first - offset;
+- const int end = pair.second - offset; // inclusive
+- removedRows = end - begin + 1;
+-
+- // when removing from the list, all subsequent indexes are affected
+- offset += removedRows;
+-
+- // update idHash - which points to indexes of d->infos, and these change now!
+- QHash<qlonglong, int>::iterator it;
+-
+- for (it = oldIds.begin(); it != oldIds.end(); )
+- {
+- if (it.value() >= begin)
+- {
+- if (it.value() > end)
+- {
+- // after the removed interval: adjust index
+- it.value() -= removedRows;
+- }
+- else
+- {
+- // in the removed interval
+- it = oldIds.erase(it);
+- continue;
+- }
+- }
+-
+- ++it;
+- }
+- }
+- }
+-
+- modelRemovals.clear();
+-
+- return toContiguousPairs(oldIds.values());
+-}
+-
+-QList<QPair<int, int> > ImageModelIncrementalUpdater::toContiguousPairs(const QList<int>& unsorted)
+-{
+- // Take the given indices and return them as contiguous pairs [begin, end]
+-
+- QList<QPair<int, int> > pairs;
+-
+- if (unsorted.isEmpty())
+- {
+- return pairs;
+- }
+-
+- QList<int> indices(unsorted);
+- qSort(indices);
+-
+- QPair<int, int> pair(indices.first(), indices.first());
+-
+- for (int i=1; i<indices.size(); ++i)
+- {
+- const int &index = indices.at(i);
+-
+- if (index == pair.second + 1)
+- {
+- pair.second = index;
+- continue;
+- }
+-
+- pairs << pair; // insert last pair
+- pair.first = index;
+- pair.second = index;
+- }
+-
+- pairs << pair;
+-
+- return pairs;
+-}
+-
+-// ------------ QAbstractItemModel implementation -------------
+-
+-QVariant ImageModel::data(const QModelIndex& index, int role) const
+-{
+- if (!d->isValid(index))
+- {
+- return QVariant();
+- }
+-
+- switch (role)
+- {
+- case Qt::DisplayRole:
+- case Qt::ToolTipRole:
+- return d->infos.at(index.row()).name();
+-
+- case ImageModelPointerRole:
+- return QVariant::fromValue(const_cast<ImageModel*>(this));
+-
+- case ImageModelInternalId:
+- return index.row();
+-
+- case CreationDateRole:
+- return d->infos.at(index.row()).dateTime();
+-
+- case ExtraDataRole:
+-
+- if (d->extraValueValid(index))
+- {
+- return d->extraValues.at(index.row());
+- }
+- else
+- {
+- return QVariant();
+- }
+-
+- case ExtraDataDuplicateCount:
+- {
+- qlonglong id = d->infos.at(index.row()).id();
+- return numberOfIndexesForImageId(id);
+- }
+- }
+-
+- return QVariant();
+-}
+-
+-QVariant ImageModel::headerData(int section, Qt::Orientation orientation, int role) const
+-{
+- Q_UNUSED(section)
+- Q_UNUSED(orientation)
+- Q_UNUSED(role)
+- return QVariant();
+-}
+-
+-int ImageModel::rowCount(const QModelIndex& parent) const
+-{
+- if (parent.isValid())
+- {
+- return 0;
+- }
+-
+- return d->infos.size();
+-}
+-
+-Qt::ItemFlags ImageModel::flags(const QModelIndex& index) const
+-{
+- if (!d->isValid(index))
+- {
+- return 0;
+- }
+-
+- Qt::ItemFlags f = Qt::ItemIsSelectable | Qt::ItemIsEnabled;
+-
+- f |= dragDropFlags(index);
+-
+- return f;
+-}
+-
+-QModelIndex ImageModel::index(int row, int column, const QModelIndex& parent) const
+-{
+- if (column != 0 || row < 0 || parent.isValid() || row >= d->infos.size())
+- {
+- return QModelIndex();
+- }
+-
+- return createIndex(row, 0);
+-}
+-
+-// ------------ Database watch -------------
+-
+-void ImageModel::slotImageChange(const ImageChangeset& changeset)
+-{
+- if (d->infos.isEmpty())
+- {
+- return;
+- }
+-
+- if (d->watchFlags & changeset.changes())
+- {
+- QItemSelection items;
+-
+- foreach(const qlonglong& id, changeset.ids())
+- {
+- QModelIndex index = indexForImageId(id);
+-
+- if (index.isValid())
+- {
+- items.select(index, index);
+- }
+- }
+-
+- if (!items.isEmpty())
+- {
+- emitDataChangedForSelection(items);
+- emit imageChange(changeset, items);
+- }
+- }
+-}
+-
+-void ImageModel::slotImageTagChange(const ImageTagChangeset& changeset)
+-{
+- if (d->infos.isEmpty())
+- {
+- return;
+- }
+-
+- QItemSelection items;
+-
+- foreach(const qlonglong& id, changeset.ids())
+- {
+- QModelIndex index = indexForImageId(id);
+-
+- if (index.isValid())
+- {
+- items.select(index, index);
+- }
+- }
+-
+- if (!items.isEmpty())
+- {
+- emitDataChangedForSelection(items);
+- emit imageTagChange(changeset, items);
+- }
+-}
+-
+-} // namespace Digikam
+diff --git a/libs/models/imagemodel.h b/libs/models/imagemodel.h
+deleted file mode 100644
+index dcf94c2..0000000
+--- a/libs/models/imagemodel.h
++++ /dev/null
+@@ -1,364 +0,0 @@
+-/* ============================================================
+- *
+- * This file is a part of digiKam project
+- * http://www.digikam.org
+- *
+- * Date : 2009-03-05
+- * Description : Qt item model for database entries
+- *
+- * Copyright (C) 2009-2011 by Marcel Wiesweg <marcel dot wiesweg at gmx dot de>
+- *
+- * This program is free software; you can redistribute it
+- * and/or modify it under the terms of the GNU General
+- * Public License as published by the Free Software Foundation;
+- * either version 2, or (at your option)
+- * any later version.
+- *
+- * This program is distributed in the hope that it will be useful,
+- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+- * GNU General Public License for more details.
+- *
+- * ============================================================ */
+-
+-#ifndef IMAGEMODEL_H
+-#define IMAGEMODEL_H
+-
+-// Qt includes
+-
+-#include <QAbstractListModel>
+-
+-// Local includes
+-
+-#include "dragdropimplementations.h"
+-#include "imageinfo.h"
+-#include "digikam_export.h"
+-
+-class QItemSelection;
+-
+-namespace Digikam
+-{
+-
+-class ImageChangeset;
+-class ImageTagChangeset;
+-
+-namespace DatabaseFields
+-{
+-class Set;
+-}
+-
+-class DIGIKAM_DATABASE_EXPORT ImageModel : public QAbstractListModel, public DragDropModelImplementation
+-{
+- Q_OBJECT
+-
+-public:
+-
+- enum ImageModelRoles
+- {
+- /// An ImageModel* pointer to this model
+- ImageModelPointerRole = Qt::UserRole,
+- ImageModelInternalId = Qt::UserRole + 1,
+- /// Returns a thumbnail pixmap. May be implemented by subclasses.
+- /// Returns either a valid pixmap or a null QVariant.
+- ThumbnailRole = Qt::UserRole + 2,
+- /// Returns a QDateTime with the creation date
+- CreationDateRole = Qt::UserRole + 3,
+- /// Return (optional) extraData field
+- ExtraDataRole = Qt::UserRole + 5,
+- /// Returns the number of duplicate indexes for the same image id
+- ExtraDataDuplicateCount = Qt::UserRole + 6,
+-
+- // Roles which are defined here but not implemented by ImageModel
+- /// Returns position of item in Left Light Table preview.
+- LTLeftPanelRole = Qt::UserRole + 50,
+- /// Returns position of item in Right Light Table preview.
+- LTRightPanelRole = Qt::UserRole + 51,
+-
+- // For use by subclasses
+- SubclassRoles = Qt::UserRole + 100,
+- // For use by filter models
+- FilterModelRoles = Qt::UserRole + 500
+- };
+-
+-public:
+-
+- explicit ImageModel(QObject* parent = 0);
+- ~ImageModel();
+-
+- /** If a cache is kept, lookup by file path is fast,
+- * without a cache it is O(n). Default is false.
+- */
+- void setKeepsFilePathCache(bool keepCache);
+- bool keepsFilePathCache() const;
+-
+- /** Set a set of database fields to watch.
+- * If either of these is changed, dataChanged() will be emitted.
+- * Default is no flag (no signal will be emitted).
+- */
+- void setWatchFlags(const DatabaseFields::Set& set);
+-
+- /** Returns the ImageInfo object, reference or image id from the underlying data
+- * pointed to by the index.
+- * If the index is not valid, imageInfo will return a null ImageInfo, imageId will
+- * return 0, imageInfoRef must not be called with an invalid index.
+- */
+- ImageInfo imageInfo(const QModelIndex& index) const;
+- ImageInfo& imageInfoRef(const QModelIndex& index) const;
+- qlonglong imageId(const QModelIndex& index) const;
+- QList<ImageInfo> imageInfos(const QList<QModelIndex>& indexes) const;
+- QList<qlonglong> imageIds(const QList<QModelIndex>& indexes) const;
+-
+- /** Returns the ImageInfo object, reference or image id from the underlying data
+- * of the given row (parent is the invalid QModelIndex, column is 0).
+- * Note that imageInfoRef will crash if index is invalid.
+- */
+- ImageInfo imageInfo(int row) const;
+- ImageInfo& imageInfoRef(int row) const;
+- qlonglong imageId(int row) const;
+-
+- /** Return the index for the given ImageInfo or id, if contained in this model.
+- */
+- QModelIndex indexForImageInfo(const ImageInfo& info) const;
+- QModelIndex indexForImageInfo(const ImageInfo& info, const QVariant& extraValue) const;
+- QModelIndex indexForImageId(qlonglong id) const;
+- QModelIndex indexForImageId(qlonglong id, const QVariant& extraValue) const;
+- QList<QModelIndex> indexesForImageInfo(const ImageInfo& info) const;
+- QList<QModelIndex> indexesForImageId(qlonglong id) const;
+-
+- int numberOfIndexesForImageInfo(const ImageInfo& info) const;
+- int numberOfIndexesForImageId(qlonglong id) const;
+-
+- /** Returns the index or ImageInfo object from the underlying data
+- * for the given file path. This is fast if keepsFilePathCache is enabled.
+- * The file path is as returned by ImageInfo.filePath().
+- * In case of multiple occurrences of the same file, the simpler variants return
+- * any one found first, use the QList methods to retrieve all occurrences.
+- */
+- QModelIndex indexForPath(const QString& filePath) const;
+- ImageInfo imageInfo(const QString& filePath) const;
+- QList<QModelIndex> indexesForPath(const QString& filePath) const;
+- QList<ImageInfo> imageInfos(const QString& filePath) const;
+-
+- /** Main entry point for subclasses adding image infos to the model.
+- * If you list entries not unique per image id, you must add an extraValue
+- * so that every entry is unique by imageId and extraValues.
+- * Please note that these methods do not prevent addition of duplicate entries.
+- */
+- void addImageInfo(const ImageInfo& info);
+- void addImageInfos(const QList<ImageInfo>& infos);
+- void addImageInfos(const QList<ImageInfo>& infos, const QList<QVariant>& extraValues);
+-
+- /** Clears image infos and resets model.
+- */
+- void clearImageInfos();
+-
+- /** Clears and adds the infos.
+- */
+- void setImageInfos(const QList<ImageInfo>& infos);
+-
+- /**
+- * Directly remove the given indexes or infos from the model.
+- */
+- void removeIndex(const QModelIndex& indexes);
+- void removeIndexes(const QList<QModelIndex>& indexes);
+- void removeImageInfo(const ImageInfo& info);
+- void removeImageInfos(const QList<ImageInfo>& infos);
+- void removeImageInfos(const QList<ImageInfo>& infos, const QList<QVariant>& extraValues);
+-
+- /**
+- * addImageInfo() is asynchronous if a prepocessor is set.
+- * This method first adds the info, synchronously.
+- * Only afterwards, the preprocessor will have the opportunity to process it.
+- * This method also bypasses any incremental updates.
+- * Please note that these methods do not prevent addition of duplicate entries.
+- */
+- void addImageInfoSynchronously(const ImageInfo& info);
+- void addImageInfosSynchronously(const QList<ImageInfo>& infos);
+- void addImageInfosSynchronously(const QList<ImageInfo>& infos, const QList<QVariant>& extraValues);
+-
+- /**
+- * Add the given entries. Method returns immediately, the
+- * addition may happen later asynchronously.
+- * These methods prevent the addition of duplicate entries.
+- */
+- void ensureHasImageInfo(const ImageInfo& info);
+- void ensureHasImageInfos(const QList<ImageInfo>& infos);
+- void ensureHasImageInfos(const QList<ImageInfo>& infos, const QList<QVariant>& extraValues);
+-
+- /**
+- * Ensure that all images grouped on the given leader are contained in the model.
+- */
+- void ensureHasGroupedImages(const ImageInfo& groupLeader);
+-
+- QList<ImageInfo> imageInfos() const;
+- QList<qlonglong> imageIds() const;
+- QList<ImageInfo> uniqueImageInfos() const;
+-
+- bool hasImage(qlonglong id) const;
+- bool hasImage(const ImageInfo& info) const;
+- bool hasImage(const ImageInfo& info, const QVariant& extraValue) const;
+- bool hasImage(qlonglong id, const QVariant& extraValue) const;
+-
+- bool isEmpty() const;
+-
+- // Drag and Drop
+- DECLARE_MODEL_DRAG_DROP_METHODS
+-
+- /**
+- * Install an object as a preprocessor for ImageInfos added to this model.
+- * For every QList of ImageInfos added to addImageInfo, the signal preprocess()
+- * will be emitted. The preprocessor may process the items and shall then readd
+- * them by calling reAddImageInfos(). It may take some time to process.
+- * It shall discard any held infos when the modelReset() signal is sent.
+- * It shall call readdFinished() when no reset occurred and all infos on the way have been readded.
+- * This means that only after calling this method, you shall make three connections
+- * (preprocess -> your slot, your signal -> reAddImageInfos, your signal -> reAddingFinished)
+- * and make or already hold a connection modelReset() -> your slot.
+- * There is only one preprocessor at a time, a previously set object will be disconnected.
+- */
+- void setPreprocessor(QObject* processor);
+- void unsetPreprocessor(QObject* processor);
+-
+- /**
+- * Returns true if this model is currently refreshing.
+- * For a preprocessor this means that, although the preprocessor may currently have
+- * processed all it got, more batches are to be expected.
+- */
+- bool isRefreshing() const;
+-
+- /**
+- * Enable sending of imageInfosAboutToBeRemoved and imageInfosRemoved signals.
+- * Default: false
+- */
+- void setSendRemovalSignals(bool send);
+-
+- virtual QVariant data(const QModelIndex& index, int role = Qt::DisplayRole) const;
+- virtual QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const;
+- virtual int rowCount(const QModelIndex& parent = QModelIndex()) const;
+- virtual Qt::ItemFlags flags(const QModelIndex& index) const;
+- virtual QModelIndex index(int row, int column = 0, const QModelIndex& parent = QModelIndex()) const;
+-
+- /** Retrieves the imageInfo object from the data() method of the given index.
+- * The index may be from a QSortFilterProxyModel as long as an ImageModel is at the end. */
+- static ImageInfo retrieveImageInfo(const QModelIndex& index);
+- static qlonglong retrieveImageId(const QModelIndex& index);
+-
+-Q_SIGNALS:
+-
+- /** Informs that ImageInfos will be added to the model.
+- * This signal is sent before the model data is changed and views are informed.
+- */
+- void imageInfosAboutToBeAdded(const QList<ImageInfo>& infos);
+-
+- /** Informs that ImageInfos have been added to the model.
+- * This signal is sent after the model data is changed and views are informed.
+- */
+- void imageInfosAdded(const QList<ImageInfo>& infos);
+-
+- /** Informs that ImageInfos will be removed from the model.
+- * This signal is sent before the model data is changed and views are informed.
+- * Note: You need to explicitly enable sending of this signal. It is not sent
+- * in clearImageInfos().
+- */
+- void imageInfosAboutToBeRemoved(const QList<ImageInfo>& infos);
+-
+- /** Informs that ImageInfos have been removed from the model.
+- * This signal is sent after the model data is changed and views are informed. *
+- * Note: You need to explicitly enable sending of this signal. It is not sent
+- * in clearImageInfos().
+- */
+- void imageInfosRemoved(const QList<ImageInfo>& infos);
+-
+- /** Connect to this signal only if you are the current preprocessor.
+- */
+- void preprocess(const QList<ImageInfo>& infos, const QList<QVariant>&);
+- void processAdded(const QList<ImageInfo>& infos, const QList<QVariant>&);
+-
+- /** If an ImageChangeset affected indexes of this model with changes as set in watchFlags(),
+- * this signal contains the changeset and the affected indexes.
+- */
+- void imageChange(const ImageChangeset&, const QItemSelection&);
+-
+- /** If an ImageTagChangeset affected indexes of this model,
+- * this signal contains the changeset and the affected indexes.
+- */
+- void imageTagChange(const ImageTagChangeset&, const QItemSelection&);
+-
+- /** Signals that the model is right now ready to start an incremental refresh.
+- * This is guaranteed only for the scope of emitting this signal.
+- */
+- void readyForIncrementalRefresh();
+-
+- /** Signals that the model has finished currently with all scheduled
+- * refreshing, full or incremental, and all preprocessing.
+- * The model is in polished, clean situation right now.
+- */
+- void allRefreshingFinished();
+-
+-public Q_SLOTS:
+-
+- void reAddImageInfos(const QList<ImageInfo>& infos, const QList<QVariant>& extraValues);
+- void reAddingFinished();
+-
+-protected:
+-
+- /** Subclasses that add ImageInfos in batches shall call startRefresh()
+- * when they start sending batches and finishRefresh() when they have finished.
+- * No incremental refreshes will be started while listing.
+- * A clearImageInfos() always stops listing, calling finishRefresh() is then not necessary.
+- */
+- void startRefresh();
+- void finishRefresh();
+-
+- /** As soon as the model is ready to start an incremental refresh, the signal
+- * readyForIncrementalRefresh() will be emitted. The signal will be emitted inline
+- * if the model is ready right now.
+- */
+- void requestIncrementalRefresh();
+- bool hasIncrementalRefreshPending() const;
+-
+- /** Starts an incremental refresh operation. You shall only call this method from a slot
+- * connected to readyForIncrementalRefresh(). To initiate an incremental refresh,
+- * call requestIncrementalRefresh().
+- */
+- void startIncrementalRefresh();
+- void finishIncrementalRefresh();
+-
+- void emitDataChangedForAll();
+- void emitDataChangedForSelection(const QItemSelection& selection);
+-
+- // Called when the internal storage is cleared
+- virtual void imageInfosCleared() {};
+-
+- // Called before rowsAboutToBeRemoved
+- virtual void imageInfosAboutToBeRemoved(int /*begin*/, int /*end*/) {};
+-
+-protected Q_SLOTS:
+-
+- virtual void slotImageChange(const ImageChangeset& changeset);
+- virtual void slotImageTagChange(const ImageTagChangeset& changeset);
+-
+-private:
+-
+- void appendInfos(const QList<ImageInfo>& infos, const QList<QVariant>& extraValues);
+- void appendInfosChecked(const QList<ImageInfo>& infos, const QList<QVariant>& extraValues);
+- void publiciseInfos(const QList<ImageInfo>& infos, const QList<QVariant>& extraValues);
+- void cleanSituationChecks();
+- void removeRowPairsWithCheck(const QList<QPair<int, int> >& toRemove);
+- void removeRowPairs(const QList<QPair<int, int> >& toRemove);
+-
+-public:
+-
+- // Declared public because it's used in ImageModelIncrementalUpdater class
+- class Private;
+-
+-private:
+-
+- Private* const d;
+-};
+-
+-} // namespace Digikam
+-
+-Q_DECLARE_METATYPE(Digikam::ImageModel*)
+-
+-#endif // IMAGEMODEL_H
+diff --git a/libs/models/imagesortsettings.cpp b/libs/models/imagesortsettings.cpp
+deleted file mode 100644
+index 39ee6e1..0000000
+--- a/libs/models/imagesortsettings.cpp
++++ /dev/null
+@@ -1,400 +0,0 @@
+-/* ============================================================
+- *
+- * This file is a part of digiKam project
+- * http://www.digikam.org
+- *
+- * Date : 2009-03-05
+- * Description : Filter values for use with ImageFilterModel
+- *
+- * Copyright (C) 2009 by Marcel Wiesweg <marcel dot wiesweg at gmx dot de>
+- * Copyright (C) 2014 by Mohamed Anwer <m dot anwer at gmx dot com>
+- *
+- * This program is free software; you can redistribute it
+- * and/or modify it under the terms of the GNU General
+- * Public License as published by the Free Software Foundation;
+- * either version 2, or (at your option)
+- * any later version.
+- *
+- * This program is distributed in the hope that it will be useful,
+- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+- * GNU General Public License for more details.
+- *
+- * ============================================================ */
+-
+-#include "imagesortsettings.h"
+-
+-// Qt includes
+-
+-#include <QDateTime>
+-#include <QRectF>
+-
+-// Local includes
+-
+-#include "coredbfields.h"
+-#include "imageinfo.h"
+-
+-namespace Digikam
+-{
+-
+-ImageSortSettings::ImageSortSettings()
+-{
+- categorizationMode = NoCategories;
+- categorizationSortOrder = DefaultOrder;
+- categorizationCaseSensitivity = Qt::CaseSensitive;
+- sortRole = SortByFileName;
+- sortOrder = DefaultOrder;
+- strTypeNatural = true;
+- sortCaseSensitivity = Qt::CaseSensitive;
+- currentCategorizationSortOrder = Qt::AscendingOrder;
+- currentSortOrder = Qt::AscendingOrder;
+-}
+-
+-bool ImageSortSettings::operator==(const ImageSortSettings& other) const
+-{
+- return
+- categorizationMode == other.categorizationMode &&
+- categorizationSortOrder == other.categorizationSortOrder &&
+- categorizationCaseSensitivity == other.categorizationCaseSensitivity &&
+- sortRole == other.sortRole &&
+- sortOrder == other.sortOrder &&
+- sortCaseSensitivity == other.sortCaseSensitivity;
+-}
+-
+-void ImageSortSettings::setCategorizationMode(CategorizationMode mode)
+-{
+- categorizationMode = mode;
+-
+- if (categorizationSortOrder == DefaultOrder)
+- {
+- currentCategorizationSortOrder = defaultSortOrderForCategorizationMode(categorizationMode);
+- }
+-}
+-
+-void ImageSortSettings::setCategorizationSortOrder(SortOrder order)
+-{
+- categorizationSortOrder = order;
+-
+- if (categorizationSortOrder == DefaultOrder)
+- {
+- currentCategorizationSortOrder = defaultSortOrderForCategorizationMode(categorizationMode);
+- }
+- else
+- {
+- currentCategorizationSortOrder = (Qt::SortOrder)categorizationSortOrder;
+- }
+-}
+-
+-void ImageSortSettings::setSortRole(SortRole role)
+-{
+- sortRole = role;
+-
+- if (sortOrder == DefaultOrder)
+- {
+- currentSortOrder = defaultSortOrderForSortRole(sortRole);
+- }
+-}
+-
+-void ImageSortSettings::setSortOrder(SortOrder order)
+-{
+- sortOrder = order;
+-
+- if (sortOrder == DefaultOrder)
+- {
+- currentSortOrder = defaultSortOrderForSortRole(sortRole);
+- }
+- else
+- {
+- currentSortOrder = (Qt::SortOrder)order;
+- }
+-}
+-
+-void ImageSortSettings::setStringTypeNatural(bool natural)
+-{
+- strTypeNatural = natural;
+-}
+-
+-Qt::SortOrder ImageSortSettings::defaultSortOrderForCategorizationMode(CategorizationMode mode)
+-{
+- switch (mode)
+- {
+- case NoCategories:
+- case OneCategory:
+- case CategoryByAlbum:
+- case CategoryByFormat:
+- default:
+- return Qt::AscendingOrder;
+- }
+-}
+-
+-Qt::SortOrder ImageSortSettings::defaultSortOrderForSortRole(SortRole role)
+-{
+- switch (role)
+- {
+- case SortByFileName:
+- case SortByFilePath:
+- return Qt::AscendingOrder;
+- case SortByFileSize:
+- return Qt::DescendingOrder;
+- case SortByModificationDate:
+- case SortByCreationDate:
+- return Qt::AscendingOrder;
+- case SortByRating:
+- case SortByImageSize:
+- return Qt::DescendingOrder;
+- case SortByAspectRatio:
+- return Qt::DescendingOrder;
+- case SortBySimilarity:
+- return Qt::DescendingOrder;
+- default:
+- return Qt::AscendingOrder;
+- }
+-}
+-
+-int ImageSortSettings::compareCategories(const ImageInfo& left, const ImageInfo& right) const
+-{
+- switch (categorizationMode)
+- {
+- case NoCategories:
+- case OneCategory:
+- return 0;
+- case CategoryByAlbum:
+- {
+- int leftAlbum = left.albumId();
+- int rightAlbum = right.albumId();
+-
+- // return comparation result
+- if (leftAlbum == rightAlbum)
+- {
+- return 0;
+- }
+- else if (lessThanByOrder(leftAlbum, rightAlbum, currentCategorizationSortOrder))
+- {
+- return -1;
+- }
+- else
+- {
+- return 1;
+- }
+- }
+- case CategoryByFormat:
+- {
+- return naturalCompare(left.format(), right.format(),
+- currentCategorizationSortOrder, categorizationCaseSensitivity, strTypeNatural);
+- }
+- default:
+- return 0;
+- }
+-}
+-
+-bool ImageSortSettings::lessThan(const ImageInfo& left, const ImageInfo& right) const
+-{
+- int result = compare(left, right, sortRole);
+-
+- if (result != 0)
+- {
+- return result < 0;
+- }
+-
+- // are they identical?
+- if (left == right)
+- {
+- return false;
+- }
+-
+- // If left and right equal for first sort order, use a hierarchy of all sort orders
+- if ( (result = compare(left, right, SortByFileName)) != 0)
+- {
+- return result < 0;
+- }
+-
+- if ( (result = compare(left, right, SortByCreationDate)) != 0)
+- {
+- return result < 0;
+- }
+-
+- if ( (result = compare(left, right, SortByModificationDate)) != 0)
+- {
+- return result < 0;
+- }
+-
+- if ( (result = compare(left, right, SortByFilePath)) != 0)
+- {
+- return result < 0;
+- }
+-
+- if ( (result = compare(left, right, SortByFileSize)) != 0)
+- {
+- return result < 0;
+- }
+-
+- if ( (result = compare(left, right, SortBySimilarity)) != 0)
+- {
+- return result < 0;
+- }
+-
+- return false;
+-}
+-
+-int ImageSortSettings::compare(const ImageInfo& left, const ImageInfo& right) const
+-{
+- return compare(left, right, sortRole);
+-}
+-
+-int ImageSortSettings::compare(const ImageInfo& left, const ImageInfo& right, SortRole role) const
+-{
+- switch (role)
+- {
+- case SortByFileName:
+- {
+- bool versioning = (left.name().contains(QLatin1String("_v"), Qt::CaseInsensitive) ||
+- right.name().contains(QLatin1String("_v"), Qt::CaseInsensitive));
+- return naturalCompare(left.name(), right.name(), currentSortOrder, sortCaseSensitivity, strTypeNatural, versioning);
+- }
+- case SortByFilePath:
+- return naturalCompare(left.filePath(), right.filePath(), currentSortOrder, sortCaseSensitivity, strTypeNatural);
+- case SortByFileSize:
+- return compareByOrder(left.fileSize(), right.fileSize(), currentSortOrder);
+- case SortByModificationDate:
+- return compareByOrder(left.modDateTime(), right.modDateTime(), currentSortOrder);
+- case SortByCreationDate:
+- return compareByOrder(left.dateTime(), right.dateTime(), currentSortOrder);
+- case SortByRating:
+- // I have the feeling that inverting the sort order for rating is the natural order
+- return - compareByOrder(left.rating(), right.rating(), currentSortOrder);
+- case SortByImageSize:
+- {
+- QSize leftSize = left.dimensions();
+- QSize rightSize = right.dimensions();
+- int leftPixels = leftSize.width() * leftSize.height();
+- int rightPixels = rightSize.width() * rightSize.height();
+- return compareByOrder(leftPixels, rightPixels, currentSortOrder);
+- }
+- case SortByAspectRatio:
+- {
+- QSize leftSize = left.dimensions();
+- QSize rightSize = right.dimensions();
+- int leftAR = (double(leftSize.width()) / double(leftSize.height())) * 1000000;
+- int rightAR = (double(rightSize.width()) / double(rightSize.height())) * 1000000;
+- return compareByOrder(leftAR, rightAR, currentSortOrder);
+- }
+- case SortBySimilarity:
+- {
+- qlonglong leftReferenceImageId = left.currentReferenceImage();
+- qlonglong rightReferenceImageId = right.currentReferenceImage();
+- // make sure that the original image has always the highest similarity.
+- double leftSimilarity = left.id() == leftReferenceImageId ? 1.1 : left.currentSimilarity();
+- double rightSimilarity = right.id() == rightReferenceImageId ? 1.1 : right.currentSimilarity();
+- return compareByOrder(leftSimilarity, rightSimilarity, currentSortOrder);
+- }
+- default:
+- return 1;
+- }
+-}
+-
+-bool ImageSortSettings::lessThan(const QVariant& left, const QVariant& right) const
+-{
+- if (left.type() != right.type())
+- {
+- return false;
+- }
+-
+- switch (left.type())
+- {
+- case QVariant::Int:
+- return compareByOrder(left.toInt(), right.toInt(), currentSortOrder);
+- case QVariant::UInt:
+- return compareByOrder(left.toUInt(), right.toUInt(), currentSortOrder);
+- case QVariant::LongLong:
+- return compareByOrder(left.toLongLong(), right.toLongLong(), currentSortOrder);
+- case QVariant::ULongLong:
+- return compareByOrder(left.toULongLong(), right.toULongLong(), currentSortOrder);
+- case QVariant::Double:
+- return compareByOrder(left.toDouble(), right.toDouble(), currentSortOrder);
+- case QVariant::Date:
+- return compareByOrder(left.toDate(), right.toDate(), currentSortOrder);
+- case QVariant::DateTime:
+- return compareByOrder(left.toDateTime(), right.toDateTime(), currentSortOrder);
+- case QVariant::Time:
+- return compareByOrder(left.toTime(), right.toTime(), currentSortOrder);
+- case QVariant::Rect:
+- case QVariant::RectF:
+- {
+- QRectF rectLeft = left.toRectF();
+- QRectF rectRight = right.toRectF();
+- int result;
+-
+- if ((result = compareByOrder(rectLeft.top(), rectRight.top(), currentSortOrder)) != 0)
+- {
+- return result < 0;
+- }
+-
+- if ((result = compareByOrder(rectLeft.left(), rectRight.left(), currentSortOrder)) != 0)
+- {
+- return result < 0;
+- }
+-
+- QSizeF sizeLeft = rectLeft.size(), sizeRight = rectRight.size();
+-
+- if ((result = compareByOrder(sizeLeft.width()*sizeLeft.height(), sizeRight.width()*sizeRight.height(), currentSortOrder)) != 0)
+- {
+- return result < 0;
+- }
+- // FIXME: fall through?? If not, add "break" here
+- }
+- default:
+- return naturalCompare(left.toString(), right.toString(), currentSortOrder, sortCaseSensitivity, strTypeNatural);
+- }
+-}
+-
+-DatabaseFields::Set ImageSortSettings::watchFlags() const
+-{
+- DatabaseFields::Set set;
+-
+- switch (sortRole)
+- {
+- case SortByFileName:
+- set |= DatabaseFields::Name;
+- break;
+- case SortByFilePath:
+- set |= DatabaseFields::Name;
+- break;
+- case SortByFileSize:
+- set |= DatabaseFields::FileSize;
+- break;
+- case SortByModificationDate:
+- set |= DatabaseFields::ModificationDate;
+- break;
+- case SortByCreationDate:
+- set |= DatabaseFields::CreationDate;
+- break;
+- case SortByRating:
+- set |= DatabaseFields::Rating;
+- break;
+- case SortByImageSize:
+- set |= DatabaseFields::Width | DatabaseFields::Height;
+- break;
+- case SortByAspectRatio:
+- set |= DatabaseFields::Width | DatabaseFields::Height;
+- break;
+- case SortBySimilarity:
+- // TODO: Not sure what to do here....
+- set |= DatabaseFields::Name;
+- break;
+- }
+-
+- switch (categorizationMode)
+- {
+- case NoCategories:
+- case OneCategory:
+- case CategoryByAlbum:
+- break;
+- case CategoryByFormat:
+- set |= DatabaseFields::Format;
+- break;
+- }
+-
+- return set;
+-}
+-
+-} // namespace Digikam
+diff --git a/libs/models/imagesortsettings.h b/libs/models/imagesortsettings.h
+deleted file mode 100644
+index 2a5fd8c..0000000
+--- a/libs/models/imagesortsettings.h
++++ /dev/null
+@@ -1,225 +0,0 @@
+-/* ============================================================
+- *
+- * This file is a part of digiKam project
+- * http://www.digikam.org
+- *
+- * Date : 2009-05-31
+- * Description : Sort settings for use with ImageFilterModel
+- *
+- * Copyright (C) 2009 by Marcel Wiesweg <marcel dot wiesweg at gmx dot de>
+- *
+- * This program is free software; you can redistribute it
+- * and/or modify it under the terms of the GNU General
+- * Public License as published by the Free Software Foundation;
+- * either version 2, or (at your option)
+- * any later version.
+- *
+- * This program is distributed in the hope that it will be useful,
+- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+- * GNU General Public License for more details.
+- *
+- * ============================================================ */
+-
+-#ifndef IMAGESORTSETTINGS_H
+-#define IMAGESORTSETTINGS_H
+-
+-// Qt includes
+-
+-#include <QHash>
+-#include <QList>
+-#include <QMap>
+-#include <QString>
+-#include <QCollator>
+-
+-// Local includes
+-
+-#include "digikam_export.h"
+-
+-namespace Digikam
+-{
+-
+-class ImageInfo;
+-
+-namespace DatabaseFields
+-{
+- class Set;
+-}
+-
+-class DIGIKAM_DATABASE_EXPORT ImageSortSettings
+-{
+-public:
+-
+- ImageSortSettings();
+-
+- bool operator==(const ImageSortSettings& other) const;
+-
+- /** Compares the categories of left and right.
+- * Return -1 if left is less than right, 0 if both fall in the same category,
+- * and 1 if left is greater than right.
+- * Adheres to set categorization mode and current category sort order.
+- */
+- int compareCategories(const ImageInfo& left, const ImageInfo& right) const;
+-
+- /** Returns true if left is less than right.
+- * Adheres to current sort role and sort order.
+- */
+- bool lessThan(const ImageInfo& left, const ImageInfo& right) const;
+-
+- /** Compares the ImageInfos left and right.
+- * Return -1 if left is less than right, 1 if left is greater than right,
+- * and 0 if left equals right comparing the current sort role's value.
+- * Adheres to set sort role and sort order.
+- */
+- int compare(const ImageInfo& left, const ImageInfo& right) const;
+-
+- /** Returns true if left QVariant is less than right.
+- * Adheres to current sort role and sort order.
+- * Use for extraValue, if necessary.
+- */
+- bool lessThan(const QVariant& left, const QVariant& right) const;
+-
+- enum SortOrder
+- {
+- AscendingOrder = Qt::AscendingOrder,
+- DescendingOrder = Qt::DescendingOrder,
+- DefaultOrder /// sort order depends on the chosen sort role
+- };
+-
+- /// --- Categories ---
+-
+- enum CategorizationMode
+- {
+- NoCategories, /// categorization switched off
+- OneCategory, /// all items in one global category
+- CategoryByAlbum,
+- CategoryByFormat
+- };
+-
+- CategorizationMode categorizationMode;
+- SortOrder categorizationSortOrder;
+-
+- void setCategorizationMode(CategorizationMode mode);
+- void setCategorizationSortOrder(SortOrder order);
+-
+- /// Only Ascending or Descending, never DefaultOrder
+- Qt::SortOrder currentCategorizationSortOrder;
+- Qt::CaseSensitivity categorizationCaseSensitivity;
+-
+- bool isCategorized() const { return categorizationMode >= CategoryByAlbum; }
+-
+- /// --- Image Sorting ---
+-
+- enum SortRole
+- {
+- // Note: For legacy reasons, the order of the first five entries must remain unchanged
+- SortByFileName,
+- SortByFilePath,
+- SortByCreationDate,
+- SortByFileSize,
+- SortByRating,
+- SortByModificationDate,
+- SortByImageSize, // pixel number
+- SortByAspectRatio, // width / height * 100000
+- SortBySimilarity
+- };
+-
+- SortRole sortRole;
+- SortOrder sortOrder;
+- bool strTypeNatural;
+-
+- void setSortRole(SortRole role);
+- void setSortOrder(SortOrder order);
+- void setStringTypeNatural(bool natural);
+-
+- Qt::SortOrder currentSortOrder;
+- Qt::CaseSensitivity sortCaseSensitivity;
+-
+- int compare(const ImageInfo& left, const ImageInfo& right, SortRole sortRole) const;
+-
+- // --- ---
+-
+- static Qt::SortOrder defaultSortOrderForCategorizationMode(CategorizationMode mode);
+- static Qt::SortOrder defaultSortOrderForSortRole(SortRole role);
+-
+- /// --- Change notification ---
+-
+- /** Returns database fields a change in which would affect the current sorting.
+- */
+- DatabaseFields::Set watchFlags() const;
+-
+- /// --- Utilities ---
+-
+- /** Returns a < b if sortOrder is Ascending, or b < a if order is descending.
+- */
+- template <typename T>
+- static inline bool lessThanByOrder(const T& a, const T& b, Qt::SortOrder sortOrder)
+- {
+- if (sortOrder == Qt::AscendingOrder)
+- {
+- return a < b;
+- }
+- else
+- {
+- return b < a;
+- }
+- }
+-
+- /** Returns the usual compare result of -1, 0, or 1 for lessThan, equals and greaterThan.
+- */
+- template <typename T>
+- static inline int compareValue(const T& a, const T& b)
+- {
+- if (a == b)
+- {
+- return 0;
+- }
+-
+- if (a < b)
+- {
+- return -1;
+- }
+- else
+- {
+- return 1;
+- }
+- }
+-
+- /** Takes a typical result from a compare method (0 is equal, -1 is less than, 1 is greater than)
+- * and applies the given sort order to it.
+- */
+- static inline int compareByOrder(int compareResult, Qt::SortOrder sortOrder)
+- {
+- if (sortOrder == Qt::AscendingOrder)
+- {
+- return compareResult;
+- }
+- else
+- {
+- return - compareResult;
+- }
+- }
+-
+- template <typename T>
+- static inline int compareByOrder(const T& a, const T& b, Qt::SortOrder sortOrder)
+- {
+- return compareByOrder(compareValue(a, b), sortOrder);
+- }
+-
+- /** Compares the two string by natural comparison and adheres to given sort order
+- */
+- static inline int naturalCompare(const QString& a, const QString& b, Qt::SortOrder sortOrder,
+- Qt::CaseSensitivity caseSensitive = Qt::CaseSensitive,
+- bool natural = true, bool versioning = false)
+- {
+- QCollator collator;
+- collator.setNumericMode(natural);
+- collator.setIgnorePunctuation(versioning);
+- collator.setCaseSensitivity(caseSensitive);
+- return (compareByOrder(collator.compare(a, b), sortOrder));
+- }
+-};
+-
+-} // namespace Digikam
+-
+-#endif // IMAGESORTSETTINGS_H
+diff --git a/libs/models/imagethumbnailmodel.cpp b/libs/models/imagethumbnailmodel.cpp
+deleted file mode 100644
+index b7f5661..0000000
+--- a/libs/models/imagethumbnailmodel.cpp
++++ /dev/null
+@@ -1,323 +0,0 @@
+-/* ============================================================
+- *
+- * This file is a part of digiKam project
+- * http://www.digikam.org
+- *
+- * Date : 2009-03-05
+- * Description : Qt item model for database entries with support for thumbnail loading
+- *
+- * Copyright (C) 2009-2011 by Marcel Wiesweg <marcel dot wiesweg at gmx dot de>
+- * Copyright (C) 2011-2017 by Gilles Caulier <caulier dot gilles at gmail dot com>
+- *
+- * This program is free software; you can redistribute it
+- * and/or modify it under the terms of the GNU General
+- * Public License as published by the Free Software Foundation;
+- * either version 2, or (at your option)
+- * any later version.
+- *
+- * This program is distributed in the hope that it will be useful,
+- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+- * GNU General Public License for more details.
+- *
+- * ============================================================ */
+-
+-#include "imagethumbnailmodel.h"
+-
+-// Qt includes
+-
+-#include <QHash>
+-
+-// Local includes
+-
+-#include "digikam_debug.h"
+-#include "thumbnailloadthread.h"
+-#include "digikam_export.h"
+-#include "digikam_globals.h"
+-
+-namespace Digikam
+-{
+-
+-class ImageThumbnailModel::ImageThumbnailModelPriv
+-{
+-public:
+-
+- ImageThumbnailModelPriv() :
+- thread(0),
+- preloadThread(0),
+- thumbSize(0),
+- lastGlobalThumbSize(0),
+- preloadThumbSize(0),
+- emitDataChanged(true)
+- {
+- staticListContainingThumbnailRole << ImageModel::ThumbnailRole;
+- }
+-
+- ThumbnailLoadThread* thread;
+- ThumbnailLoadThread* preloadThread;
+- ThumbnailSize thumbSize;
+- ThumbnailSize lastGlobalThumbSize;
+- ThumbnailSize preloadThumbSize;
+- QRect detailRect;
+- QVector<int> staticListContainingThumbnailRole;
+-
+- bool emitDataChanged;
+-
+- int preloadThumbnailSize() const
+- {
+- if (preloadThumbSize.size())
+- {
+- return preloadThumbSize.size();
+- }
+-
+- return thumbSize.size();
+- }
+-};
+-
+-ImageThumbnailModel::ImageThumbnailModel(QObject* parent)
+- : ImageModel(parent), d(new ImageThumbnailModelPriv)
+-{
+- setKeepsFilePathCache(true);
+-}
+-
+-ImageThumbnailModel::~ImageThumbnailModel()
+-{
+- delete d->preloadThread;
+- delete d;
+-}
+-
+-void ImageThumbnailModel::setThumbnailLoadThread(ThumbnailLoadThread* thread)
+-{
+- d->thread = thread;
+-
+- connect(d->thread, SIGNAL(signalThumbnailLoaded(LoadingDescription,QPixmap)),
+- this, SLOT(slotThumbnailLoaded(LoadingDescription,QPixmap)));
+-}
+-
+-ThumbnailLoadThread* ImageThumbnailModel::thumbnailLoadThread() const
+-{
+- return d->thread;
+-}
+-
+-ThumbnailSize ImageThumbnailModel::thumbnailSize() const
+-{
+- return d->thumbSize;
+-}
+-
+-void ImageThumbnailModel::setThumbnailSize(const ThumbnailSize& size)
+-{
+- d->lastGlobalThumbSize = size;
+- d->thumbSize = size;
+-}
+-
+-void ImageThumbnailModel::setPreloadThumbnailSize(const ThumbnailSize& size)
+-{
+- d->preloadThumbSize = size;
+-}
+-
+-void ImageThumbnailModel::setEmitDataChanged(bool emitSignal)
+-{
+- d->emitDataChanged = emitSignal;
+-}
+-
+-void ImageThumbnailModel::setPreloadThumbnails(bool preload)
+-{
+- if (preload)
+- {
+- if (!d->preloadThread)
+- {
+- d->preloadThread = new ThumbnailLoadThread;
+- d->preloadThread->setPixmapRequested(false);
+- d->preloadThread->setPriority(QThread::LowestPriority);
+- }
+-
+- connect(this, SIGNAL(allRefreshingFinished()),
+- this, SLOT(preloadAllThumbnails()));
+- }
+- else
+- {
+- delete d->preloadThread;
+- d->preloadThread = 0;
+- disconnect(this, SIGNAL(allRefreshingFinished()),
+- this, SLOT(preloadAllThumbnails()));
+- }
+-}
+-
+-void ImageThumbnailModel::prepareThumbnails(const QList<QModelIndex>& indexesToPrepare)
+-{
+- prepareThumbnails(indexesToPrepare, d->thumbSize);
+-}
+-
+-void ImageThumbnailModel::prepareThumbnails(const QList<QModelIndex>& indexesToPrepare, const ThumbnailSize& thumbSize)
+-{
+- if (!d->thread)
+- {
+- return;
+- }
+-
+- QList<ThumbnailIdentifier> ids;
+- foreach(const QModelIndex& index, indexesToPrepare)
+- {
+- ids << imageInfoRef(index).thumbnailIdentifier();
+- }
+- d->thread->findGroup(ids, thumbSize.size());
+-}
+-
+-void ImageThumbnailModel::preloadThumbnails(const QList<ImageInfo>& infos)
+-{
+- if (!d->preloadThread)
+- {
+- return;
+- }
+-
+- QList<ThumbnailIdentifier> ids;
+- foreach(const ImageInfo& info, infos)
+- {
+- ids << info.thumbnailIdentifier();
+- }
+- d->preloadThread->pregenerateGroup(ids, d->preloadThumbnailSize());
+-}
+-
+-void ImageThumbnailModel::preloadThumbnails(const QList<QModelIndex>& indexesToPreload)
+-{
+- if (!d->preloadThread)
+- {
+- return;
+- }
+-
+- QList<ThumbnailIdentifier> ids;
+- foreach(const QModelIndex& index, indexesToPreload)
+- {
+- ids << imageInfoRef(index).thumbnailIdentifier();
+- }
+- d->preloadThread->stopAllTasks();
+- d->preloadThread->pregenerateGroup(ids, d->preloadThumbnailSize());
+-}
+-
+-void ImageThumbnailModel::preloadAllThumbnails()
+-{
+- preloadThumbnails(imageInfos());
+-}
+-
+-void ImageThumbnailModel::imageInfosCleared()
+-{
+- if (d->preloadThread)
+- {
+- d->preloadThread->stopAllTasks();
+- }
+-}
+-
+-QVariant ImageThumbnailModel::data(const QModelIndex& index, int role) const
+-{
+- if (role == ThumbnailRole && d->thread && index.isValid())
+- {
+- QPixmap thumbnail;
+- ImageInfo info = imageInfo(index);
+- QString path = info.filePath();
+-
+- if (info.isNull())
+- {
+- return QVariant(QVariant::Pixmap);
+- }
+-
+- if (!d->detailRect.isNull())
+- {
+- if (d->thread->find(info.thumbnailIdentifier(), d->detailRect, thumbnail, d->thumbSize.size()))
+- {
+- return thumbnail;
+- }
+- }
+- else
+- {
+- if (d->thread->find(info.thumbnailIdentifier(), thumbnail, d->thumbSize.size()))
+- {
+- return thumbnail;
+- }
+- }
+-
+- return QVariant(QVariant::Pixmap);
+- }
+-
+- return ImageModel::data(index, role);
+-}
+-
+-bool ImageThumbnailModel::setData(const QModelIndex& index, const QVariant& value, int role)
+-{
+- if (role == ThumbnailRole)
+- {
+- switch (value.type())
+- {
+- case QVariant::Invalid:
+- d->thumbSize = d->lastGlobalThumbSize;
+- d->detailRect = QRect();
+- break;
+-
+- case QVariant::Int:
+-
+- if (value.isNull())
+- {
+- d->thumbSize = d->lastGlobalThumbSize;
+- }
+- else
+- {
+- d->thumbSize = value.toInt();
+- }
+- break;
+-
+- case QVariant::Rect:
+-
+- if (value.isNull())
+- {
+- d->detailRect = QRect();
+- }
+- else
+- {
+- d->detailRect = value.toRect();
+- }
+- break;
+-
+- default:
+- break;
+- }
+- }
+-
+- return ImageModel::setData(index, value, role);
+-}
+-
+-void ImageThumbnailModel::slotThumbnailLoaded(const LoadingDescription& loadingDescription, const QPixmap& thumb)
+-{
+- if (thumb.isNull())
+- {
+- return;
+- }
+-
+- // In case of multiple occurrence, we currently do not know which thumbnail is this. Signal change on all.
+- QModelIndexList indexes;
+- ThumbnailIdentifier thumbId = loadingDescription.thumbnailIdentifier();
+- if (thumbId.filePath.isEmpty())
+- {
+- indexes = indexesForImageId(thumbId.id);
+- }
+- else
+- {
+- indexes = indexesForPath(thumbId.filePath);
+- }
+- foreach(const QModelIndex& index, indexes)
+- {
+- if (thumb.isNull())
+- {
+- emit thumbnailFailed(index, loadingDescription.previewParameters.size);
+- }
+- else
+- {
+- emit thumbnailAvailable(index, loadingDescription.previewParameters.size);
+-
+- if (d->emitDataChanged)
+- {
+- emit dataChanged(index, index, d->staticListContainingThumbnailRole);
+- }
+- }
+- }
+-}
+-
+-} // namespace Digikam
+diff --git a/libs/models/imagethumbnailmodel.h b/libs/models/imagethumbnailmodel.h
+deleted file mode 100644
+index 366ca65..0000000
+--- a/libs/models/imagethumbnailmodel.h
++++ /dev/null
+@@ -1,140 +0,0 @@
+-/* ============================================================
+- *
+- * This file is a part of digiKam project
+- * http://www.digikam.org
+- *
+- * Date : 2009-03-05
+- * Description : Qt item model for database entries with support for thumbnail loading
+- *
+- * Copyright (C) 2009-2011 by Marcel Wiesweg <marcel dot wiesweg at gmx dot de>
+- * Copyright (C) 2011 by Gilles Caulier <caulier dot gilles at gmail dot com>
+- *
+- * This program is free software; you can redistribute it
+- * and/or modify it under the terms of the GNU General
+- * Public License as published by the Free Software Foundation;
+- * either version 2, or (at your option)
+- * any later version.
+- *
+- * This program is distributed in the hope that it will be useful,
+- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+- * GNU General Public License for more details.
+- *
+- * ============================================================ */
+-
+-#ifndef IMAGETHUMBNAILMODEL_H
+-#define IMAGETHUMBNAILMODEL_H
+-
+-// Local includes
+-
+-#include "imagemodel.h"
+-#include "thumbnailsize.h"
+-#include "digikam_export.h"
+-
+-namespace Digikam
+-{
+-
+-class LoadingDescription;
+-class ThumbnailLoadThread;
+-
+-class DIGIKAM_DATABASE_EXPORT ImageThumbnailModel : public ImageModel
+-{
+- Q_OBJECT
+-
+-public:
+-
+- /**
+- * An ImageModel that supports thumbnail loading.
+- * You need to set a ThumbnailLoadThread to enable thumbnail loading.
+- * Adjust the thumbnail size to your needs.
+- * Note that setKeepsFilePathCache is enabled per default.
+- */
+- explicit ImageThumbnailModel(QObject* parent);
+- ~ImageThumbnailModel();
+-
+- /** Enable thumbnail loading and set the thread that shall be used.
+- * The thumbnail size of this thread will be adjusted.
+- */
+- void setThumbnailLoadThread(ThumbnailLoadThread* thread);
+- ThumbnailLoadThread* thumbnailLoadThread() const;
+-
+- /// Set the thumbnail size to use
+- void setThumbnailSize(const ThumbnailSize& thumbSize);
+-
+- /// If you want to fix a size for preloading, do it here.
+- void setPreloadThumbnailSize(const ThumbnailSize& thumbSize);
+-
+- void setExifRotate(bool rotate);
+-
+- /**
+- * Enable emitting dataChanged() when a thumbnail becomes available.
+- * The thumbnailAvailable() signal will be emitted in any case.
+- * Default is true.
+- */
+- void setEmitDataChanged(bool emitSignal);
+-
+- /**
+- * Enable preloading of thumbnails:
+- * If preloading is enabled, for every entry in the model a thumbnail generation is started.
+- * Default: false.
+- */
+- void setPreloadThumbnails(bool preload);
+-
+- ThumbnailSize thumbnailSize() const;
+-
+- /**
+- * Handles the ThumbnailRole.
+- * If the pixmap is available, returns it in the QVariant.
+- * If it still needs to be loaded, returns a null QVariant and emits
+- * thumbnailAvailable() as soon as it is available.
+- */
+- virtual QVariant data(const QModelIndex& index, int role = Qt::DisplayRole) const;
+-
+- /**
+- * You can override the current thumbnail size by giving an integer value for ThumbnailRole.
+- * Set a null QVariant to use the thumbnail size set by setThumbnailSize() again.
+- * The index given here is ignored for this purpose.
+- */
+- virtual bool setData(const QModelIndex& index, const QVariant& value, int role = Qt::DisplayRole);
+-
+-public Q_SLOTS:
+-
+- /** Prepare the thumbnail loading for the given indexes
+- */
+- void prepareThumbnails(const QList<QModelIndex>& indexesToPrepare);
+- void prepareThumbnails(const QList<QModelIndex>& indexesToPrepare, const ThumbnailSize& thumbSize);
+-
+- /**
+- * Preload thumbnail for the given infos resp. indexes.
+- * Note: Use setPreloadThumbnails to automatically preload all entries in the model.
+- * Note: This only ensures thumbnail generation. It is not guaranteed that pixmaps
+- * are stored in the cache. For thumbnails that are expect to be drawn immediately,
+- * include them in prepareThumbnails().
+- * Note: Stops preloading of previously added thumbnails.
+- */
+- void preloadThumbnails(const QList<ImageInfo>&);
+- void preloadThumbnails(const QList<QModelIndex>&);
+- void preloadAllThumbnails();
+-
+-Q_SIGNALS:
+-
+- void thumbnailAvailable(const QModelIndex& index, int requestedSize);
+- void thumbnailFailed(const QModelIndex& index, int requestedSize);
+-
+-protected:
+-
+- virtual void imageInfosCleared();
+-
+-protected Q_SLOTS:
+-
+- void slotThumbnailLoaded(const LoadingDescription& loadingDescription, const QPixmap& thumb);
+-
+-private:
+-
+- class ImageThumbnailModelPriv;
+- ImageThumbnailModelPriv* const d;
+-};
+-
+-} // namespace Digikam
+-
+-#endif /* IMAGETHUMBNAILMODEL_H */
+diff --git a/libs/models/imageversionsmodel.cpp b/libs/models/imageversionsmodel.cpp
+deleted file mode 100644
+index e6ba582..0000000
+--- a/libs/models/imageversionsmodel.cpp
++++ /dev/null
+@@ -1,183 +0,0 @@
+-/* ============================================================
+- *
+- * This file is a part of digiKam project
+- * http://www.digikam.org
+- *
+- * Date : 2010-07-13
+- * Description : Model for image versions
+- *
+- * Copyright (C) 2010 by Martin Klapetek <martin dot klapetek at gmail dot com>
+- *
+- * This program is free software; you can redistribute it
+- * and/or modify it under the terms of the GNU General
+- * Public License as published by the Free Software Foundation;
+- * either version 2, or (at your option)
+- * any later version.
+- *
+- * This program is distributed in the hope that it will be useful,
+- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+- * GNU General Public License for more details.
+- *
+- * ============================================================ */
+-
+-#include "imageversionsmodel.h"
+-
+-// KDE includes
+-
+-#include <klocalizedstring.h>
+-
+-// Local includes
+-
+-#include "digikam_debug.h"
+-#include "workingwidget.h"
+-
+-namespace Digikam
+-{
+-
+-class ImageVersionsModel::Private
+-{
+-public:
+-
+- Private()
+- {
+- data = 0;
+- paintTree = false;
+- }
+-
+- ///Complete paths with filenames and tree level
+- QList<QPair<QString, int> >* data;
+- ///This is for delegate to paint it as selected
+- QString currentSelectedImage;
+- ///If true, the delegate will paint items as a tree
+- ///if false, it will be painted as a list
+- bool paintTree;
+-};
+-
+-ImageVersionsModel::ImageVersionsModel(QObject* parent)
+- : QAbstractListModel(parent),
+- d(new Private)
+-{
+- d->data = new QList<QPair<QString, int> >;
+-}
+-
+-ImageVersionsModel::~ImageVersionsModel()
+-{
+- //qDeleteAll(d->data);
+- delete d;
+-}
+-
+-Qt::ItemFlags ImageVersionsModel::flags(const QModelIndex& index) const
+-{
+- if (!index.isValid())
+- {
+- return 0;
+- }
+-
+- return Qt::ItemIsEnabled | Qt::ItemIsSelectable;
+-}
+-
+-QVariant ImageVersionsModel::data(const QModelIndex& index, int role) const
+-{
+- if (!index.isValid())
+- {
+- return QVariant();
+- }
+-
+- if (role == Qt::DisplayRole && !d->data->isEmpty())
+- {
+- return d->data->at(index.row()).first;
+- }
+- else if (role == Qt::UserRole && !d->data->isEmpty())
+- {
+- return d->data->at(index.row()).second;
+- }
+- else if (role == Qt::DisplayRole && d->data->isEmpty())
+- {
+- //TODO: make this text Italic
+- return QVariant(QString(i18n("No image selected")));
+- }
+-
+- return QVariant();
+-}
+-
+-int ImageVersionsModel::rowCount(const QModelIndex& parent) const
+-{
+- Q_UNUSED(parent)
+- return d->data->count();
+-}
+-
+-void ImageVersionsModel::setupModelData(QList<QPair<QString, int> >& data)
+-{
+- beginResetModel();
+-
+- d->data->clear();
+-
+- if (!data.isEmpty())
+- {
+- d->data->append(data);
+- }
+- else
+- {
+- d->data->append(qMakePair(QString(i18n("This is the original image")), 0));
+- }
+-
+- endResetModel();
+-}
+-
+-void ImageVersionsModel::clearModelData()
+-{
+- beginResetModel();
+-
+- if (!d->data->isEmpty())
+- {
+- d->data->clear();
+- }
+-
+- endResetModel();
+-}
+-
+-void ImageVersionsModel::slotAnimationStep()
+-{
+- emit dataChanged(createIndex(0, 0), createIndex(rowCount()-1, 1));
+-}
+-
+-QString ImageVersionsModel::currentSelectedImage() const
+-{
+- return d->currentSelectedImage;
+-}
+-
+-void ImageVersionsModel::setCurrentSelectedImage(const QString& path)
+-{
+- d->currentSelectedImage = path;
+-}
+-
+-QModelIndex ImageVersionsModel::currentSelectedImageIndex() const
+-{
+- return index(listIndexOf(d->currentSelectedImage), 0);
+-}
+-
+-bool ImageVersionsModel::paintTree() const
+-{
+- return d->paintTree;
+-}
+-
+-void ImageVersionsModel::setPaintTree(bool paint)
+-{
+- d->paintTree = paint;
+-}
+-
+-int ImageVersionsModel::listIndexOf(const QString& item) const
+-{
+- for (int i = 0; i < d->data->size(); ++i)
+- {
+- if (d->data->at(i).first == item)
+- {
+- return i;
+- }
+- }
+-
+- return -1;
+-}
+-
+-} // namespace Digikam
+diff --git a/libs/models/imageversionsmodel.h b/libs/models/imageversionsmodel.h
+deleted file mode 100644
+index ed08529..0000000
+--- a/libs/models/imageversionsmodel.h
++++ /dev/null
+@@ -1,75 +0,0 @@
+-/* ============================================================
+- *
+- * This file is a part of digiKam project
+- * http://www.digikam.org
+- *
+- * Date : 2010-07-13
+- * Description : Model for image versions
+- *
+- * Copyright (C) 2010 by Martin Klapetek <martin dot klapetek at gmail dot com>
+- *
+- * This program is free software; you can redistribute it
+- * and/or modify it under the terms of the GNU General
+- * Public License as published by the Free Software Foundation;
+- * either version 2, or (at your option)
+- * any later version.
+- *
+- * This program is distributed in the hope that it will be useful,
+- * but WITHOUT ANY WARRANTY; without even the implied warranty of
+- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+- * GNU General Public License for more details.
+- *
+- * ============================================================ */
+-
+-#ifndef IMAGEVERSIONSMODEL_H
+-#define IMAGEVERSIONSMODEL_H
+-
+-// Qt includes
+-
+-#include <QModelIndex>
+-#include <QPixmap>
+-
+-// Local includes
+-
+-#include "digikam_export.h"
+-
+-namespace Digikam
+-{
+-
+-class DIGIKAM_DATABASE_EXPORT ImageVersionsModel : public QAbstractListModel
+-{
+- Q_OBJECT
+-
+-public:
+-
+- explicit ImageVersionsModel(QObject* parent = 0);
+- ~ImageVersionsModel();
+-
+- Qt::ItemFlags flags(const QModelIndex& index) const;
+- QVariant data(const QModelIndex& index, int role = Qt::DisplayRole) const;
+- int rowCount(const QModelIndex& parent = QModelIndex()) const;
+-
+- void setupModelData(QList<QPair<QString, int> >& data);
+- void clearModelData();
+-
+- QString currentSelectedImage() const;
+- void setCurrentSelectedImage(const QString& path);
+- QModelIndex currentSelectedImageIndex() const;
+-
+- bool paintTree() const;
+- int listIndexOf(const QString& item) const;
+-
+-public Q_SLOTS:
+-
+- void slotAnimationStep();
+- void setPaintTree(bool paint);
+-
+-private:
+-
+- class Private;
+- Private* const d;
+-};
+-
+-} // namespace Digikam
+-
+-#endif // IMAGEVERSIONSMODEL_H
+--
+cgit v0.11.2
+
diff --git a/kde/patch/dolphin.patch b/kde/patch/dolphin.patch
new file mode 100644
index 0000000..dfe3a2f
--- /dev/null
+++ b/kde/patch/dolphin.patch
@@ -0,0 +1,3 @@
+# Let the user decide whether she wants to run Dolphin as root:
+cat $CWD/patch/dolphin/dolphin_revert_noroot.patch | patch -p1 --verbose || { touch ${SLACK_KDE_BUILD_DIR}/${PKGNAME}.failed ; continue ; }
+
diff --git a/kde/patch/dolphin/dolphin_revert_noroot.patch b/kde/patch/dolphin/dolphin_revert_noroot.patch
new file mode 100644
index 0000000..46bb541
--- /dev/null
+++ b/kde/patch/dolphin/dolphin_revert_noroot.patch
@@ -0,0 +1,44 @@
+Taken from openSUSE:
+https://build.opensuse.org/package/view_file/KDE:Applications/dolphin/0001-Revert-Disallow-executing-Dolphin-as-root-on-Linux.patch?expand=1
+
+From ba74d639178916221c748b0d5d89f7ac4f5ed669 Mon Sep 17 00:00:00 2001
+From: Fabian Vogt <fabian@ritter-vogt.de>
+Date: Sat, 22 Apr 2017 14:00:33 +0200
+Subject: [PATCH] Revert "Disallow executing Dolphin as root on Linux"
+
+This reverts commit 0bdd8e0b0516555c6233fdc7901e9b417cf89791.
+We ship a desktop file to open dolphin as root and we allow YaST on the
+desktop. So this patch is absolutely pointless for us.
+---
+ src/main.cpp | 13 -------------
+ 1 file changed, 13 deletions(-)
+
+diff --git a/src/main.cpp b/src/main.cpp
+index 789a52996..acba8daed 100644
+--- a/src/main.cpp
++++ b/src/main.cpp
+@@ -35,21 +35,8 @@
+ #include <KLocalizedString>
+ #include <Kdelibs4ConfigMigrator>
+
+-#ifndef Q_OS_WIN
+-#include <unistd.h>
+-#endif
+-#include <iostream>
+-
+ extern "C" Q_DECL_EXPORT int kdemain(int argc, char **argv)
+ {
+-#ifndef Q_OS_WIN
+- // Check whether we are running as root
+- if (getuid() == 0) {
+- std::cout << "Executing Dolphin as root is not possible." << std::endl;
+- return EXIT_FAILURE;
+- }
+-#endif
+-
+ QApplication app(argc, argv);
+ app.setAttribute(Qt::AA_UseHighDpiPixmaps, true);
+ app.setWindowIcon(QIcon::fromTheme(QStringLiteral("system-file-manager"), app.windowIcon()));
+--
+2.12.0
+
diff --git a/kde/patch/gwenview.patch b/kde/patch/gwenview.patch
new file mode 100644
index 0000000..04dfe50
--- /dev/null
+++ b/kde/patch/gwenview.patch
@@ -0,0 +1,4 @@
+# Prevent dataloss when importing pictures;
+# Will be fixed in 17.04.2:
+#cat $CWD/patch/gwenview/gwenview-17.04.1_dataloss.patch | patch -p1 --verbose || { touch ${SLACK_KDE_BUILD_DIR}/${PKGNAME}.failed ; continue ; }
+
diff --git a/kde/patch/gwenview/gwenview-17.04.1_dataloss.patch b/kde/patch/gwenview/gwenview-17.04.1_dataloss.patch
new file mode 100644
index 0000000..fa93428
--- /dev/null
+++ b/kde/patch/gwenview/gwenview-17.04.1_dataloss.patch
@@ -0,0 +1,131 @@
+From 6ce5d2f8d82f83c5a3d726ee5807ebaf7a6e3c6c Mon Sep 17 00:00:00 2001
+From: Henrik Fehlauer <rkflx@lab12.net>
+Date: Thu, 11 May 2017 22:40:15 +0200
+Subject: Avoid data loss when importing pictures
+
+Summary:
+Fix porting regressions, which left users of Gwenview Importer with:
+- failed import (import destination still empty)
+- additionally (when choosing "Delete" instead of "Keep" after import):
+ pictures also removed from import source, with no way to recover
+
+Correct additional problems remaining after fixing the import failure:
+- hang on duplicate filenames
+- identically named files with different content are never imported
+- error dialog when deleting pictures from import source
+
+BUG: 379615
+
+In detail:
+
+1st problem (introduced in 017b4fe5dc7f4b6e876cfd7b108dcebbf609ae94):
+
+ Initially, pictures are copied to a temporary folder
+ (e.g. "foo/.gwenview_importer-IcQqvo/"), before being moved/renamed
+ to the final destination (e.g. "foo/"), which is determined by
+ calling "cd .." on the temporary folder.
+
+ However, mistakenly this path contains a superfluous '/'
+ (e.g. "foo/.gwenview_importer-IcQqvo//"), resulting in the final
+ destination reading "foo/.gwenview_importer-IcQqvo/" instead of
+ "foo/". On cleanup, the temporary folder is removed, simultaneously
+ deleting all new pictures.
+
+ Fix: Omit '/' where appropriate.
+
+2nd problem (broken by a3262e9b197ee97323ef8bf3a9dca1e13f61a74c):
+
+ When trying to find a unique filename, the while loop "stat"ing the
+ file repeats forever.
+
+ Fix: Call "KIO::stat" and "KJobWidgets::setWindow"
+ also inside the loop.
+
+3rd problem (introduced in 017b4fe5dc7f4b6e876cfd7b108dcebbf609ae94):
+
+ If the destination directory already contains an identically named
+ file, we try to find a different name by appending a number. For
+ this, we need to strip the old filename from the full path.
+ Unfortunately, only calling "path()" is incorrect, giving
+ "foo/pict0001.jpg/pict0001_1.jpg", rather than "foo/pict0001_1.jpg".
+
+ Fix: Use "adjusted(QUrl::RemoveFilename)".
+
+4th problem (broken by a3262e9b197ee97323ef8bf3a9dca1e13f61a74c):
+
+ Although deletion works, we show a warning dialog stating failure.
+
+ Fix: Invert the logic of "job->exec()", as the error handling should
+ be skipped by "break"ing out of the while loop.
+
+Test Plan:
+Steps to reproduce (see https://bugs.kde.org/show_bug.cgi?id=379615) no longer result in data loss.
+
+Autotests for importer (separate review request in D5750) pass. Hopefully, this helps catching any future porting regressions.
+
+Reviewers: ltoscano, sandsmark, gateau
+
+Reviewed By: ltoscano
+
+Differential Revision: https://phabricator.kde.org/D5749
+---
+ importer/fileutils.cpp | 5 ++++-
+ importer/importdialog.cpp | 2 +-
+ importer/importer.cpp | 4 ++--
+ 3 files changed, 7 insertions(+), 4 deletions(-)
+
+diff --git a/importer/fileutils.cpp b/importer/fileutils.cpp
+index 5293d56..a51a18c 100644
+--- a/importer/fileutils.cpp
++++ b/importer/fileutils.cpp
+@@ -128,7 +128,10 @@ RenameResult rename(const QUrl& src, const QUrl& dst_, QWidget* authWindow)
+ }
+ result = RenamedUnderNewName;
+
+- dst.setPath(dst.path() + '/' + prefix + QString::number(count) + suffix);
++ dst.setPath(dst.adjusted(QUrl::RemoveFilename).path() + prefix + QString::number(count) + suffix);
++ statJob = KIO::stat(dst);
++ KJobWidgets::setWindow(statJob, authWindow);
++
+ ++count;
+ }
+
+diff --git a/importer/importdialog.cpp b/importer/importdialog.cpp
+index ee6f7cd..5e9e847 100644
+--- a/importer/importdialog.cpp
++++ b/importer/importdialog.cpp
+@@ -121,7 +121,7 @@ public:
+ QList<QUrl> urls = importedUrls + skippedUrls;
+ while (true) {
+ KIO::Job* job = KIO::del(urls);
+- if (!job->exec()) {
++ if (job->exec()) {
+ break;
+ }
+ // Deleting failed
+diff --git a/importer/importer.cpp b/importer/importer.cpp
+index 51c4b96..a7e1d4e 100644
+--- a/importer/importer.cpp
++++ b/importer/importer.cpp
+@@ -98,7 +98,7 @@ struct ImporterPrivate
+ }
+ mCurrentUrl = mUrlList.takeFirst();
+ QUrl dst = mTempImportDirUrl;
+- dst.setPath(dst.path() + '/' + mCurrentUrl.fileName());
++ dst.setPath(dst.path() + mCurrentUrl.fileName());
+ KIO::Job* job = KIO::copy(mCurrentUrl, dst, KIO::HideProgressInfo);
+ KJobWidgets::setWindow(job, mAuthWindow);
+ QObject::connect(job, SIGNAL(result(KJob*)),
+@@ -122,7 +122,7 @@ struct ImporterPrivate
+ } else {
+ fileName = src.fileName();
+ }
+- dst.setPath(dst.path() + '/' + fileName);
++ dst.setPath(dst.path() + fileName);
+
+ FileUtils::RenameResult result = FileUtils::rename(src, dst, mAuthWindow);
+ switch (result) {
+--
+cgit v0.11.2
+
+
diff --git a/kde/patch/kalzium.patch b/kde/patch/kalzium.patch
new file mode 100644
index 0000000..6593e9d
--- /dev/null
+++ b/kde/patch/kalzium.patch
@@ -0,0 +1,3 @@
+# Fix build against KF 5.31.0 (repaired in 16.12.3):
+#cat $CWD/patch/kalzium/kalzium_kf_5.31.patch | patch -p1 --verbose || { touch ${SLACK_KDE_BUILD_DIR}/${PKGNAME}.failed ; continue ; }
+
diff --git a/kde/patch/kalzium/kalzium_kf_5.31.patch b/kde/patch/kalzium/kalzium_kf_5.31.patch
new file mode 100644
index 0000000..a3d4e00
--- /dev/null
+++ b/kde/patch/kalzium/kalzium_kf_5.31.patch
@@ -0,0 +1,156 @@
+Patch taken from:
+https://gitweb.gentoo.org/repo/gentoo.git/plain/kde-apps/kalzium/files/kalzium-16.12.2-kf-5.31.patch
+
+From f233d458959548ab371e3faeca7313f746625afc Mon Sep 17 00:00:00 2001
+From: Heiko Becker <heirecka@exherbo.org>
+Date: Sun, 22 Jan 2017 14:46:24 +0100
+Subject: Fix build with extra-cmake-modules > 5.30
+
+Since a5f3a76e14799c68b5e8f74e375baa5f6f6ab4dc in
+extra-cmake-modules.git -fno-operator-names is passed to the build
+(when supported), causing a build error for kalzium.
+
+REVIEW: 129873
+---
+ src/calculator/titrationCalculator.cpp | 39 +++++++++++++++-------------------
+ 1 file changed, 17 insertions(+), 22 deletions(-)
+
+diff --git a/src/calculator/titrationCalculator.cpp b/src/calculator/titrationCalculator.cpp
+index 44ea152..6ea9ac9 100644
+--- a/src/calculator/titrationCalculator.cpp
++++ b/src/calculator/titrationCalculator.cpp
+@@ -41,11 +41,6 @@
+
+ using namespace std;
+
+-#ifdef _MSC_VER
+-#define and &&
+-#define or ||
+-#endif
+-
+ titrationCalculator::titrationCalculator(QWidget * parent) : QWidget(parent)
+ {
+ xmin = 0;
+@@ -112,7 +107,7 @@ void titrationCalculator::plot()
+ }
+ QString mreporto;
+ int iter = 0;
+- if (uid.xaxis->text() == "" or uid.xaxis->text() == " ") {
++ if (uid.xaxis->text() == "" || uid.xaxis->text() == " ") {
+ uid.xaxis->setText(i18n("nothing"));
+ }
+ if (tmpy == 0) {
+@@ -121,11 +116,11 @@ void titrationCalculator::plot()
+ //now we have to solve the system of equations NOTE:yvalue contains the equation of Y-axis variable
+ //we iterates the process until you have an equation in one only unknown variable or a numeric expression
+ mreporto = solve(yvalue);
+- while (end == 0 or lettere == 1) {
++ while (end == 0 || lettere == 1) {
+ QByteArray ba = mreporto.toLatin1();
+ char *tmreport = ba.data();
+ ++iter;
+- if (end == 1 or lettere == 0) {
++ if (end == 1 || lettere == 0) {
+ break;
+ }
+ if (iter > 100) {
+@@ -273,13 +268,13 @@ QString titrationCalculator::solve(char *yvalue)
+ QString tempyval;
+ QString ptem;
+ for (int i = 0; strlen(yvalue) + 1; ++i) {
+- if (!(yvalue[i]=='q' or yvalue[i]=='w' or yvalue[i]=='e' or yvalue[i]=='r' or yvalue[i]=='t' or yvalue[i]=='y' or yvalue[i]=='u' or yvalue[i]=='i' or yvalue[i]=='o' or yvalue[i]=='p' or yvalue[i]=='a' or yvalue[i]=='s' or yvalue[i]=='d' or yvalue[i]=='f' or yvalue[i]=='g' or yvalue[i]=='h' or yvalue[i]=='j' or yvalue[i]=='k' or yvalue[i]=='l' or yvalue[i]=='z' or yvalue[i]=='x' or yvalue[i]=='c' or yvalue[i]=='v' or yvalue[i]=='b' or yvalue[i]=='n' or yvalue[i]=='m' or yvalue[i]=='+' or yvalue[i]=='-' or yvalue[i]=='^' or yvalue[i]=='*' or yvalue[i]=='/' or yvalue[i]=='(' or yvalue[i]==')' or yvalue[i]=='Q' or yvalue[i]=='W' or yvalue[i]=='E' or yvalue[i]=='R' or yvalue[i]=='T' or yvalue[i]=='Y' or yvalue[i]=='U' or yvalue[i]=='I' or yvalue[i]=='O' or yvalue[i]=='P' or yvalue[i]=='A' or yvalue[i]=='S' or yvalue[i]=='D' or yvalue[i]=='F' or yvalue[i]=='G' or yvalue[i]=='H' or yvalue[i]=='J' or yvalue[i]=='K' or yvalue[i]=='L' or yvalue[i]=='Z' or yvalue[i]=='X' or yvalue[i]=='C' or yvalue[i]=='V' or yvalue[i]=='B' or yvalue[i]=='N' or yvalue[i]=='M' or yvalue[i]=='1' or yvalue[i]=='2' or yvalue[i]=='3' or yvalue[i]=='4' or yvalue[i]=='5' or yvalue[i]=='6' or yvalue[i]=='7' or yvalue[i]=='8' or yvalue[i]=='9' or yvalue[i]=='0' or yvalue[i]=='.' or yvalue[i]==',')) {
++ if (!(yvalue[i]=='q' || yvalue[i]=='w' || yvalue[i]=='e' || yvalue[i]=='r' || yvalue[i]=='t' || yvalue[i]=='y' || yvalue[i]=='u' || yvalue[i]=='i' || yvalue[i]=='o' || yvalue[i]=='p' || yvalue[i]=='a' || yvalue[i]=='s' || yvalue[i]=='d' || yvalue[i]=='f' || yvalue[i]=='g' || yvalue[i]=='h' || yvalue[i]=='j' || yvalue[i]=='k' || yvalue[i]=='l' || yvalue[i]=='z' || yvalue[i]=='x' || yvalue[i]=='c' || yvalue[i]=='v' || yvalue[i]=='b' || yvalue[i]=='n' || yvalue[i]=='m' || yvalue[i]=='+' || yvalue[i]=='-' || yvalue[i]=='^' || yvalue[i]=='*' || yvalue[i]=='/' || yvalue[i]=='(' || yvalue[i]==')' || yvalue[i]=='Q' || yvalue[i]=='W' || yvalue[i]=='E' || yvalue[i]=='R' || yvalue[i]=='T' || yvalue[i]=='Y' || yvalue[i]=='U' || yvalue[i]=='I' || yvalue[i]=='O' || yvalue[i]=='P' || yvalue[i]=='A' || yvalue[i]=='S' || yvalue[i]=='D' || yvalue[i]=='F' || yvalue[i]=='G' || yvalue[i]=='H' || yvalue[i]=='J' || yvalue[i]=='K' || yvalue[i]=='L' || yvalue[i]=='Z' || yvalue[i]=='X' || yvalue[i]=='C' || yvalue[i]=='V' || yvalue[i]=='B' || yvalue[i]=='N' || yvalue[i]=='M' || yvalue[i]=='1' || yvalue[i]=='2' || yvalue[i]=='3' || yvalue[i]=='4' || yvalue[i]=='5' || yvalue[i]=='6' || yvalue[i]=='7' || yvalue[i]=='8' || yvalue[i]=='9' || yvalue[i]=='0' || yvalue[i]=='.' || yvalue[i]==',')) {
+ break; //if current value is not a permitted value, this means that something is wrong
+ }
+- if (yvalue[i]=='q' or yvalue[i]=='w' or yvalue[i]=='e' or yvalue[i]=='r' or yvalue[i]=='t' or yvalue[i]=='y' or yvalue[i]=='u' or yvalue[i]=='i' or yvalue[i]=='o' or yvalue[i]=='p' or yvalue[i]=='a' or yvalue[i]=='s' or yvalue[i]=='d' or yvalue[i]=='f' or yvalue[i]=='g' or yvalue[i]=='h' or yvalue[i]=='j' or yvalue[i]=='k' or yvalue[i]=='l' or yvalue[i]=='z' or yvalue[i]=='x' or yvalue[i]=='c' or yvalue[i]=='v' or yvalue[i]=='b' or yvalue[i]=='n' or yvalue[i]=='m' or yvalue[i]=='Q' or yvalue[i]=='W' or yvalue[i]=='E' or yvalue[i]=='R' or yvalue[i]=='T' or yvalue[i]=='Y' or yvalue[i]=='U' or yvalue[i]=='I' or yvalue[i]=='O' or yvalue[i]=='P' or yvalue[i]=='A' or yvalue[i]=='S' or yvalue[i]=='D' or yvalue[i]=='F' or yvalue[i]=='G' or yvalue[i]=='H' or yvalue[i]=='J' or yvalue[i]=='K' or yvalue[i]=='L' or yvalue[i]=='Z' or yvalue[i]=='X' or yvalue[i]=='C' or yvalue[i]=='V' or yvalue[i]=='B' or yvalue[i]=='N' or yvalue[i]=='M' or yvalue[i]=='.' or yvalue[i]==',') {
++ if (yvalue[i]=='q' || yvalue[i]=='w' || yvalue[i]=='e' || yvalue[i]=='r' || yvalue[i]=='t' || yvalue[i]=='y' || yvalue[i]=='u' || yvalue[i]=='i' || yvalue[i]=='o' || yvalue[i]=='p' || yvalue[i]=='a' || yvalue[i]=='s' || yvalue[i]=='d' || yvalue[i]=='f' || yvalue[i]=='g' || yvalue[i]=='h' || yvalue[i]=='j' || yvalue[i]=='k' || yvalue[i]=='l' || yvalue[i]=='z' || yvalue[i]=='x' || yvalue[i]=='c' || yvalue[i]=='v' || yvalue[i]=='b' || yvalue[i]=='n' || yvalue[i]=='m' || yvalue[i]=='Q' || yvalue[i]=='W' || yvalue[i]=='E' || yvalue[i]=='R' || yvalue[i]=='T' || yvalue[i]=='Y' || yvalue[i]=='U' || yvalue[i]=='I' || yvalue[i]=='O' || yvalue[i]=='P' || yvalue[i]=='A' || yvalue[i]=='S' || yvalue[i]=='D' || yvalue[i]=='F' || yvalue[i]=='G' || yvalue[i]=='H' || yvalue[i]=='J' || yvalue[i]=='K' || yvalue[i]=='L' || yvalue[i]=='Z' || yvalue[i]=='X' || yvalue[i]=='C' || yvalue[i]=='V' || yvalue[i]=='B' || yvalue[i]=='N' || yvalue[i]=='M' || yvalue[i]=='.' || yvalue[i]==',') {
+ lettere = 1; //if lettere == 0 then the equation contains only mnumbers
+ }
+- if (yvalue[i]=='+' or yvalue[i]=='-' or yvalue[i]=='^' or yvalue[i]=='*' or yvalue[i]=='/' or yvalue[i]=='(' or yvalue[i]==')' or yvalue[i]=='1' or yvalue[i]=='2' or yvalue[i]=='3' or yvalue[i]=='4' or yvalue[i]=='5' or yvalue[i]=='6' or yvalue[i]=='7' or yvalue[i]=='8' or yvalue[i]=='9' or yvalue[i]=='0' or yvalue[i]=='.' or yvalue[i]==',') {
++ if (yvalue[i]=='+' || yvalue[i]=='-' || yvalue[i]=='^' || yvalue[i]=='*' || yvalue[i]=='/' || yvalue[i]=='(' || yvalue[i]==')' || yvalue[i]=='1' || yvalue[i]=='2' || yvalue[i]=='3' || yvalue[i]=='4' || yvalue[i]=='5' || yvalue[i]=='6' || yvalue[i]=='7' || yvalue[i]=='8' || yvalue[i]=='9' || yvalue[i]=='0' || yvalue[i]=='.' || yvalue[i]==',') {
+ tempyval = tempyval + QString(yvalue[i]);
+ } else {
+ tempy = tempy + QString(yvalue[i]);
+@@ -302,7 +297,7 @@ QString titrationCalculator::solve(char *yvalue)
+ end = 1;
+ }
+ if (tempy!=uid.xaxis->text()) {
+- if (yvalue[i]=='+' or yvalue[i]=='-' or yvalue[i]=='^' or yvalue[i]=='*' or yvalue[i]=='/' or yvalue[i]=='(' or yvalue[i]==')' or yvalue[i]=='1' or yvalue[i]=='2' or yvalue[i]=='3' or yvalue[i]=='4' or yvalue[i]=='5' or yvalue[i]=='6' or yvalue[i]=='7' or yvalue[i]=='8' or yvalue[i]=='9' or yvalue[i]=='0' or yvalue[i]=='.' or yvalue[i]==',') {
++ if (yvalue[i]=='+' || yvalue[i]=='-' || yvalue[i]=='^' || yvalue[i]=='*' || yvalue[i]=='/' || yvalue[i]=='(' || yvalue[i]==')' || yvalue[i]=='1' || yvalue[i]=='2' || yvalue[i]=='3' || yvalue[i]=='4' || yvalue[i]=='5' || yvalue[i]=='6' || yvalue[i]=='7' || yvalue[i]=='8' || yvalue[i]=='9' || yvalue[i]=='0' || yvalue[i]=='.' || yvalue[i]==',') {
+ //actually nothing
+ } else {
+ end = 0;
+@@ -335,13 +330,13 @@ QString titrationCalculator::solvex(char *yvalue, QString dnum) {
+ QString tempyval;
+ tempy = "";
+ for (int i = 0; strlen(yvalue) + 1; ++i) {
+- if (!(yvalue[i]=='q' or yvalue[i]=='w' or yvalue[i]=='e' or yvalue[i]=='r' or yvalue[i]=='t' or yvalue[i]=='y' or yvalue[i]=='u' or yvalue[i]=='i' or yvalue[i]=='o' or yvalue[i]=='p' or yvalue[i]=='a' or yvalue[i]=='s' or yvalue[i]=='d' or yvalue[i]=='f' or yvalue[i]=='g' or yvalue[i]=='h' or yvalue[i]=='j' or yvalue[i]=='k' or yvalue[i]=='l' or yvalue[i]=='z' or yvalue[i]=='x' or yvalue[i]=='c' or yvalue[i]=='v' or yvalue[i]=='b' or yvalue[i]=='n' or yvalue[i]=='m' or yvalue[i]=='+' or yvalue[i]=='-' or yvalue[i]=='^' or yvalue[i]=='*' or yvalue[i]=='/' or yvalue[i]=='(' or yvalue[i]==')' or yvalue[i]=='Q' or yvalue[i]=='W' or yvalue[i]=='E' or yvalue[i]=='R' or yvalue[i]=='T' or yvalue[i]=='Y' or yvalue[i]=='U' or yvalue[i]=='I' or yvalue[i]=='O' or yvalue[i]=='P' or yvalue[i]=='A' or yvalue[i]=='S' or yvalue[i]=='D' or yvalue[i]=='F' or yvalue[i]=='G' or yvalue[i]=='H' or yvalue[i]=='J' or yvalue[i]=='K' or yvalue[i]=='L' or yvalue[i]=='Z' or yvalue[i]=='X' or yvalue[i]=='C' or yvalue[i]=='V' or yvalue[i]=='B' or yvalue[i]=='N' or yvalue[i]=='M' or yvalue[i]=='1' or yvalue[i]=='2' or yvalue[i]=='3' or yvalue[i]=='4' or yvalue[i]=='5' or yvalue[i]=='6' or yvalue[i]=='7' or yvalue[i]=='8' or yvalue[i]=='9' or yvalue[i]=='0' or yvalue[i]=='.' or yvalue[i]==',')) {
++ if (!(yvalue[i]=='q' || yvalue[i]=='w' || yvalue[i]=='e' || yvalue[i]=='r' || yvalue[i]=='t' || yvalue[i]=='y' || yvalue[i]=='u' || yvalue[i]=='i' || yvalue[i]=='o' || yvalue[i]=='p' || yvalue[i]=='a' || yvalue[i]=='s' || yvalue[i]=='d' || yvalue[i]=='f' || yvalue[i]=='g' || yvalue[i]=='h' || yvalue[i]=='j' || yvalue[i]=='k' || yvalue[i]=='l' || yvalue[i]=='z' || yvalue[i]=='x' || yvalue[i]=='c' || yvalue[i]=='v' || yvalue[i]=='b' || yvalue[i]=='n' || yvalue[i]=='m' || yvalue[i]=='+' || yvalue[i]=='-' || yvalue[i]=='^' || yvalue[i]=='*' || yvalue[i]=='/' || yvalue[i]=='(' || yvalue[i]==')' || yvalue[i]=='Q' || yvalue[i]=='W' || yvalue[i]=='E' || yvalue[i]=='R' || yvalue[i]=='T' || yvalue[i]=='Y' || yvalue[i]=='U' || yvalue[i]=='I' || yvalue[i]=='O' || yvalue[i]=='P' || yvalue[i]=='A' || yvalue[i]=='S' || yvalue[i]=='D' || yvalue[i]=='F' || yvalue[i]=='G' || yvalue[i]=='H' || yvalue[i]=='J' || yvalue[i]=='K' || yvalue[i]=='L' || yvalue[i]=='Z' || yvalue[i]=='X' || yvalue[i]=='C' || yvalue[i]=='V' || yvalue[i]=='B' || yvalue[i]=='N' || yvalue[i]=='M' || yvalue[i]=='1' || yvalue[i]=='2' || yvalue[i]=='3' || yvalue[i]=='4' || yvalue[i]=='5' || yvalue[i]=='6' || yvalue[i]=='7' || yvalue[i]=='8' || yvalue[i]=='9' || yvalue[i]=='0' || yvalue[i]=='.' || yvalue[i]==',')) {
+ break; //if current value is not a permitted value, this means that something is wrong
+ }
+- if (yvalue[i]=='q' or yvalue[i]=='w' or yvalue[i]=='e' or yvalue[i]=='r' or yvalue[i]=='t' or yvalue[i]=='y' or yvalue[i]=='u' or yvalue[i]=='i' or yvalue[i]=='o' or yvalue[i]=='p' or yvalue[i]=='a' or yvalue[i]=='s' or yvalue[i]=='d' or yvalue[i]=='f' or yvalue[i]=='g' or yvalue[i]=='h' or yvalue[i]=='j' or yvalue[i]=='k' or yvalue[i]=='l' or yvalue[i]=='z' or yvalue[i]=='x' or yvalue[i]=='c' or yvalue[i]=='v' or yvalue[i]=='b' or yvalue[i]=='n' or yvalue[i]=='m' or yvalue[i]=='Q' or yvalue[i]=='W' or yvalue[i]=='E' or yvalue[i]=='R' or yvalue[i]=='T' or yvalue[i]=='Y' or yvalue[i]=='U' or yvalue[i]=='I' or yvalue[i]=='O' or yvalue[i]=='P' or yvalue[i]=='A' or yvalue[i]=='S' or yvalue[i]=='D' or yvalue[i]=='F' or yvalue[i]=='G' or yvalue[i]=='H' or yvalue[i]=='J' or yvalue[i]=='K' or yvalue[i]=='L' or yvalue[i]=='Z' or yvalue[i]=='X' or yvalue[i]=='C' or yvalue[i]=='V' or yvalue[i]=='B' or yvalue[i]=='N' or yvalue[i]=='M' or yvalue[i]=='.' or yvalue[i]==',') {
++ if (yvalue[i]=='q' || yvalue[i]=='w' || yvalue[i]=='e' || yvalue[i]=='r' || yvalue[i]=='t' || yvalue[i]=='y' || yvalue[i]=='u' || yvalue[i]=='i' || yvalue[i]=='o' || yvalue[i]=='p' || yvalue[i]=='a' || yvalue[i]=='s' || yvalue[i]=='d' || yvalue[i]=='f' || yvalue[i]=='g' || yvalue[i]=='h' || yvalue[i]=='j' || yvalue[i]=='k' || yvalue[i]=='l' || yvalue[i]=='z' || yvalue[i]=='x' || yvalue[i]=='c' || yvalue[i]=='v' || yvalue[i]=='b' || yvalue[i]=='n' || yvalue[i]=='m' || yvalue[i]=='Q' || yvalue[i]=='W' || yvalue[i]=='E' || yvalue[i]=='R' || yvalue[i]=='T' || yvalue[i]=='Y' || yvalue[i]=='U' || yvalue[i]=='I' || yvalue[i]=='O' || yvalue[i]=='P' || yvalue[i]=='A' || yvalue[i]=='S' || yvalue[i]=='D' || yvalue[i]=='F' || yvalue[i]=='G' || yvalue[i]=='H' || yvalue[i]=='J' || yvalue[i]=='K' || yvalue[i]=='L' || yvalue[i]=='Z' || yvalue[i]=='X' || yvalue[i]=='C' || yvalue[i]=='V' || yvalue[i]=='B' || yvalue[i]=='N' || yvalue[i]=='M' || yvalue[i]=='.' || yvalue[i]==',') {
+ tempy = tempy + yvalue[i]; //if lettere == 0 then the equation contains only mnumbers
+ }
+- if (yvalue[i]=='+' or yvalue[i]=='-' or yvalue[i]=='^' or yvalue[i]=='*' or yvalue[i]=='/' or yvalue[i]=='(' or yvalue[i]==')' or yvalue[i]=='1' or yvalue[i]=='2' or yvalue[i]=='3' or yvalue[i]=='4' or yvalue[i]=='5' or yvalue[i]=='6' or yvalue[i]=='7' or yvalue[i]=='8' or yvalue[i]=='9' or yvalue[i]=='0' or yvalue[i]=='.' or yvalue[i]==',') {
++ if (yvalue[i]=='+' || yvalue[i]=='-' || yvalue[i]=='^' || yvalue[i]=='*' || yvalue[i]=='/' || yvalue[i]=='(' || yvalue[i]==')' || yvalue[i]=='1' || yvalue[i]=='2' || yvalue[i]=='3' || yvalue[i]=='4' || yvalue[i]=='5' || yvalue[i]=='6' || yvalue[i]=='7' || yvalue[i]=='8' || yvalue[i]=='9' || yvalue[i]=='0' || yvalue[i]=='.' || yvalue[i]==',') {
+ if (!tempyolda.isEmpty()) {
+ tempy = tempy + yvalue[i];
+ if (tempyolda == uid.xaxis->text()) {
+@@ -359,7 +354,7 @@ QString titrationCalculator::solvex(char *yvalue, QString dnum) {
+ tempyolda = tempyold;
+ } else {
+ tempyold = "";
+- if (((olda != 1) and (yvalue[i + 1] != '^')) or (yvalue[i] == '+' or yvalue[i] == '-' or yvalue[i] == '^' or yvalue[i] == '*' or yvalue[i] == '/' or yvalue[i] == '(' or yvalue[i] == ')')) {
++ if (((olda != 1) && (yvalue[i + 1] != '^')) || (yvalue[i] == '+' || yvalue[i] == '-' || yvalue[i] == '^' || yvalue[i] == '*' || yvalue[i] == '/' || yvalue[i] == '(' || yvalue[i] == ')')) {
+ tempyval = tempyval + QString(yvalue[i]);
+ }
+ }
+@@ -374,7 +369,7 @@ QString titrationCalculator::solvex(char *yvalue, QString dnum) {
+ tempyold = "";
+ olda = 1;
+ }
+- if ((tempy==uid.xaxis->text()) and (!tempyolda.isEmpty())) {
++ if ((tempy==uid.xaxis->text()) && (!tempyolda.isEmpty())) {
+ if (yvalue[i + 1] != '^') {
+ tempyval = tempyval + dnum;
+ }
+@@ -611,7 +606,7 @@ void titrationCalculator::on_actionOpen_triggered()
+ if (tmpchr != '|') {
+ tempyval = tempyval + tmpchr;
+ } else {
+- if ((tablea == 1) and (tempyval != QString("table1")) and (tempyval != QString("table2")) and (tempyval != QString("xaxis")) and (tempyval != QString("yaxis")) and (tempyval != QString("note"))) {
++ if ((tablea == 1) && (tempyval != QString("table1")) && (tempyval != QString("table2")) && (tempyval != QString("xaxis")) && (tempyval != QString("yaxis")) && (tempyval != QString("note"))) {
+ if ((i % 2) != 0) {
+ QTableWidgetItem *titemo = uid.tableWidget->item((i - 1) / 2, 1);
+ if (titemo) {
+@@ -626,7 +621,7 @@ void titrationCalculator::on_actionOpen_triggered()
+ ++i;
+ }
+
+- if ((tableb == 1) and (tempyval != QString("table1")) and (tempyval != QString("table2")) and (tempyval != QString("xaxis")) and (tempyval != QString("yaxis")) and (tempyval != QString("note"))) {
++ if ((tableb == 1) && (tempyval != QString("table1")) && (tempyval != QString("table2")) && (tempyval != QString("xaxis")) && (tempyval != QString("yaxis")) && (tempyval != QString("note"))) {
+ if ((i % 2) != 0) {
+ QTableWidgetItem *titemo = uid.tableWidget_2->item((i - 1) / 2, 1);
+ if (titemo) {
+@@ -641,13 +636,13 @@ void titrationCalculator::on_actionOpen_triggered()
+ }
+ ++i;
+ }
+- if ((xax == 1) and (tempyval != QString("table1")) and (tempyval != QString("table2")) and (tempyval != QString("xaxis")) and (tempyval != QString("yaxis")) and (tempyval != QString("note"))) {
++ if ((xax == 1) && (tempyval != QString("table1")) && (tempyval != QString("table2")) && (tempyval != QString("xaxis")) && (tempyval != QString("yaxis")) && (tempyval != QString("note"))) {
+ uid.xaxis->setText(tempyval);
+ }
+- if ((yax == 1) and (tempyval != QString("table1")) and (tempyval != QString("table2")) and (tempyval != QString("xaxis")) and (tempyval != QString("yaxis")) and (tempyval != QString("note"))) {
++ if ((yax == 1) && (tempyval != QString("table1")) && (tempyval != QString("table2")) && (tempyval != QString("xaxis")) && (tempyval != QString("yaxis")) && (tempyval != QString("note"))) {
+ uid.yaxis->setText(tempyval);
+ }
+- if ((notea == 1) and (tempyval != QString("table1")) and (tempyval != QString("table2")) and (tempyval != QString("xaxis")) and (tempyval != QString("yaxis")) and (tempyval != QString("note"))) {
++ if ((notea == 1) && (tempyval != QString("table1")) && (tempyval != QString("table2")) && (tempyval != QString("xaxis")) && (tempyval != QString("yaxis")) && (tempyval != QString("note"))) {
+ uid.note->setText(tempyval);
+ }
+
+--
+cgit v0.11.2
+
+
diff --git a/kde/patch/kate.patch b/kde/patch/kate.patch
index d8cd42f..45c2f53 100644
--- a/kde/patch/kate.patch
+++ b/kde/patch/kate.patch
@@ -2,3 +2,7 @@
# Should be fixed after 15.12.0.
#cat $CWD/patch/kate/kate-15.12.0.patch | patch -p1 --verbose || { touch ${SLACK_KDE_BUILD_DIR}/${PKGNAME}.failed ; continue ; }
+# Allow Kate to be started by the root user; disallowing this is not
+# a decision that a developer should make for the user, it is patronizing:
+cat $CWD/patch/kate/kate_runasroot.patch | patch -p1 --verbose || { touch ${SLACK_KDE_BUILD_DIR}/${PKGNAME}.failed ; continue ; }
+
diff --git a/kde/patch/kate/kate_runasroot.patch b/kde/patch/kate/kate_runasroot.patch
new file mode 100644
index 0000000..88dbbe9
--- /dev/null
+++ b/kde/patch/kate/kate_runasroot.patch
@@ -0,0 +1,48 @@
+From 435ed5853b9451ab8fdfff722545c57a8f154625 Mon Sep 17 00:00:00 2001
+From: Fabian Vogt <fabian@ritter-vogt.de>
+Date: Sat, 18 Feb 2017 13:49:14 +0100
+Subject: [PATCH] Defuse root block
+
+While the main point is correct as any application running in the same
+X session (not sandboxed) can use kate's capability to open a console,
+we allow (even encourage) running YaST on X11 as root.
+That way it's only an impact on usability.
+---
+ kate/main.cpp | 3 +--
+ kwrite/main.cpp | 3 +--
+ 2 files changed, 2 insertions(+), 4 deletions(-)
+
+diff --git a/kate/main.cpp b/kate/main.cpp
+index 342cd5db3..4845646aa 100644
+--- a/kate/main.cpp
++++ b/kate/main.cpp
+@@ -64,9 +64,8 @@ int main(int argc, char **argv)
+ * Check whether we are running as root
+ **/
+ if (getuid() == 0) {
+- std::cout << "Executing Kate as root is not possible. To edit files as root use:" << std::endl;
++ std::cout << "THIS IS POTENTIALLY INSECURE!\nTo edit files as root please use:" << std::endl;
+ std::cout << "SUDO_EDITOR=kate sudoedit <file>" << std::endl;
+- return 0;
+ }
+ #endif
+ /**
+diff --git a/kwrite/main.cpp b/kwrite/main.cpp
+index 68a055edb..4937f72d3 100644
+--- a/kwrite/main.cpp
++++ b/kwrite/main.cpp
+@@ -54,9 +54,8 @@ extern "C" Q_DECL_EXPORT int main(int argc, char **argv)
+ * Check whether we are running as root
+ **/
+ if (getuid() == 0) {
+- std::cout << "Executing KWrite as root is not possible. To edit files as root use:" << std::endl;
++ std::cout << "THIS IS POTENTIALLY INSECURE!\nTo edit files as root please use:" << std::endl;
+ std::cout << "SUDO_EDITOR=kwrite sudoedit <file>" << std::endl;
+- return 0;
+ }
+ #endif
+ /**
+--
+2.12.2
+
+
diff --git a/kde/patch/kcalcore.patch b/kde/patch/kcalcore.patch
new file mode 100644
index 0000000..051150d
--- /dev/null
+++ b/kde/patch/kcalcore.patch
@@ -0,0 +1,4 @@
+# Fix compile error against new libical 3:
+# Fixed in Applications 17.12.0:
+#cat $CWD/patch/kcalcore/kcalcore_libical3.patch | patch -p1 --verbose || { touch ${SLACK_KDE_BUILD_DIR}/${PKGNAME}.failed ; continue ; }
+
diff --git a/kde/patch/kcalcore/kcalcore_libical3.patch b/kde/patch/kcalcore/kcalcore_libical3.patch
new file mode 100644
index 0000000..0a5155f
--- /dev/null
+++ b/kde/patch/kcalcore/kcalcore_libical3.patch
@@ -0,0 +1,109 @@
+From 27eaa211b23a6bb0bcba5a91cf7cadfc1e888e21 Mon Sep 17 00:00:00 2001
+From: Allen Winter <winter@kde.org>
+Date: Fri, 6 Oct 2017 10:39:20 -0400
+Subject: icalformat_p.cpp, icaltimezones.cpp - follow API changes in libical3
+
+---
+ src/icalformat_p.cpp | 11 ++++++-----
+ src/icaltimezones.cpp | 10 ++++------
+ 2 files changed, 10 insertions(+), 11 deletions(-)
+
+diff --git a/src/icalformat_p.cpp b/src/icalformat_p.cpp
+index bd1d8a3..c2e4548 100644
+--- a/src/icalformat_p.cpp
++++ b/src/icalformat_p.cpp
+@@ -2355,7 +2355,6 @@ icaltimetype ICalFormatImpl::writeICalDate(const QDate &date)
+ t.second = 0;
+
+ t.is_date = 1;
+- t.is_utc = 0;
+ t.zone = nullptr;
+
+ return t;
+@@ -2377,7 +2376,9 @@ icaltimetype ICalFormatImpl::writeICalDateTime(const QDateTime &datetime, bool d
+ t.second = datetime.time().second();
+ }
+ t.zone = nullptr; // zone is NOT set
+- t.is_utc = datetime.isUtc() ? 1 : 0;
++ if ( datetime.isUtc() ) {
++ t = icaltime_convert_to_zone(t, icaltimezone_get_utc_timezone());
++ }
+
+ // _dumpIcaltime( t );
+
+@@ -2450,7 +2452,7 @@ icalproperty *ICalFormatImpl::writeICalDateTimeProperty(const icalproperty_kind
+ }
+
+ KTimeZone ktz;
+- if (!t.is_utc) {
++ if (!icaltime_is_utc(t)) {
+ ktz = dt.timeZone();
+ }
+
+@@ -2483,7 +2484,7 @@ QDateTime ICalFormatImpl::readICalDateTime(icalproperty *p, const icaltimetype &
+ // _dumpIcaltime( t );
+
+ KDateTime::Spec timeSpec;
+- if (t.is_utc || t.zone == icaltimezone_get_utc_timezone()) {
++ if (icaltime_is_utc(t) || t.zone == icaltimezone_get_utc_timezone()) {
+ timeSpec = KDateTime::UTC; // the time zone is UTC
+ utc = false; // no need to convert to UTC
+ } else {
+diff --git a/src/icaltimezones.cpp b/src/icaltimezones.cpp
+index 2f6d42f..f8f8d5d 100644
+--- a/src/icaltimezones.cpp
++++ b/src/icaltimezones.cpp
+@@ -54,7 +54,7 @@ static QDateTime toQDateTime(const icaltimetype &t)
+ {
+ return QDateTime(QDate(t.year, t.month, t.day),
+ QTime(t.hour, t.minute, t.second),
+- (t.is_utc ? Qt::UTC : Qt::LocalTime));
++ (icaltime_is_utc(t) ? Qt::UTC : Qt::LocalTime));
+ }
+
+ // Maximum date for time zone data.
+@@ -81,7 +81,6 @@ static icaltimetype writeLocalICalDateTime(const QDateTime &utc, int offset)
+ t.second = local.time().second();
+ t.is_date = 0;
+ t.zone = nullptr;
+- t.is_utc = 0;
+ return t;
+ }
+
+@@ -888,7 +887,7 @@
+ }
+ case ICAL_LASTMODIFIED_PROPERTY: {
+ const icaltimetype t = icalproperty_get_lastmodified(p);
+- if (t.is_utc) {
++ if (icaltime_is_utc(t)) {
+ data->d->lastModified = toQDateTime(t);
+ } else {
+ qCDebug(KCALCORE_LOG) << "LAST-MODIFIED not UTC";
+@@ -1261,7 +1260,7 @@ bool ICalTimeZoneParser::parsePhase(icalcomponent *c, ICalTimeZonePhase &phase)
+ // Convert DTSTART to QDateTime, and from local time to UTC
+ const QDateTime localStart = toQDateTime(dtstart); // local time
+ dtstart.second -= prevOffset;
+- dtstart.is_utc = 1;
++ dtstart = icaltime_convert_to_zone(dtstart, icaltimezone_get_utc_timezone());
+ const QDateTime utcStart = toQDateTime(icaltime_normalize(dtstart)); // UTC
+
+ transitions += utcStart;
+@@ -1286,13 +1285,12 @@ bool ICalTimeZoneParser::parsePhase(icalcomponent *c, ICalTimeZonePhase &phase)
+ t.minute = dtstart.minute;
+ t.second = dtstart.second;
+ t.is_date = 0;
+- t.is_utc = 0; // dtstart is in local time
+ }
+ // RFC2445 states that RDATE must be in local time,
+ // but we support UTC as well to be safe.
+- if (!t.is_utc) {
++ if (!icaltime_is_utc(t)) {
+ t.second -= prevOffset; // convert to UTC
+- t.is_utc = 1;
++ t = icaltime_convert_to_zone(t, icaltimezone_get_utc_timezone());
+ t = icaltime_normalize(t);
+ }
+ transitions += toQDateTime(t);
+--
+cgit v0.11.2
+
diff --git a/kde/patch/kde-gtk-config.patch b/kde/patch/kde-gtk-config.patch
new file mode 100644
index 0000000..a62e649
--- /dev/null
+++ b/kde/patch/kde-gtk-config.patch
@@ -0,0 +1,4 @@
+# Make the kde-gtk-config load the current config first:
+# Fixed in 5.11.2
+#cat $CWD/patch/kde-gtk-config/kde-gtk-config_loadcurrentsettings.patch | patch -p1 --verbose || { touch ${SLACK_KDE_BUILD_DIR}/${PKGNAME}.failed ; continue ; }
+
diff --git a/kde/patch/kde-gtk-config/kde-gtk-config_loadcurrentsettings.patch b/kde/patch/kde-gtk-config/kde-gtk-config_loadcurrentsettings.patch
new file mode 100644
index 0000000..b5b074d
--- /dev/null
+++ b/kde/patch/kde-gtk-config/kde-gtk-config_loadcurrentsettings.patch
@@ -0,0 +1,622 @@
+From 0d0f812a1704c62c014bc87162b1280224b64f93 Mon Sep 17 00:00:00 2001
+From: Fabian Vogt <fabian@ritter-vogt.de>
+Date: Tue, 24 Oct 2017 13:25:32 +0200
+Subject: Revert "Make the kde-gtk-config kcm better at checking global gtk
+ settings"
+
+Summary:
+This reverts commit 34357f74ee2d98128ff423b0ec6ddcbf4232c475.
+
+Reverting this fixes loading of the actually used GTK settings.
+
+BUG: 382291
+
+Test Plan:
+Opened kcmshell5 kde-gtk-config with and without this revert.
+Without, it shows Adwaita as theme, with it shows breeze.
+GTK uses breeze, so the behaviour with the revert is correct.
+
+Reviewers: #plasma, apol
+
+Subscribers: plasma-devel
+
+Tags: #plasma
+
+Differential Revision: https://phabricator.kde.org/D8443
+---
+ CMakeLists.txt | 2 +-
+ src/abstractappearance.h | 5 +-
+ src/appearancegtk2.cpp | 103 +++++++++++++---------------------
+ src/appearancegtk2.h | 11 +---
+ src/appearancegtk3.cpp | 143 +++++++++++++++++++++--------------------------
+ src/appearancegtk3.h | 10 +---
+ src/appearencegtk.cpp | 4 +-
+ tests/CMakeLists.txt | 2 +-
+ tests/configsavetest.cpp | 75 ++++++++++---------------
+ tests/configsavetest.h | 8 +--
+ 10 files changed, 144 insertions(+), 219 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 181cfc9..bf1ba29 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -51,7 +51,7 @@ ki18n_wrap_ui(kcm_SRCS
+ )
+ add_library(kcm_kdegtkconfig MODULE ${kcm_SRCS})
+ target_compile_definitions(kcm_kdegtkconfig PRIVATE -DPROJECT_VERSION="${PROJECT_VERSION}")
+-target_link_libraries(kcm_kdegtkconfig ${X11_Xcursor_LIB} KF5::ConfigCore KF5::I18n KF5::KIOWidgets KF5::NewStuff KF5::Archive KF5::NewStuff KF5::ConfigWidgets KF5::IconThemes)
++target_link_libraries(kcm_kdegtkconfig ${X11_Xcursor_LIB} KF5::I18n KF5::KIOWidgets KF5::NewStuff KF5::Archive KF5::NewStuff KF5::ConfigWidgets KF5::IconThemes)
+
+ kcoreaddons_desktop_to_json(kcm_kdegtkconfig kde-gtk-config.desktop)
+
+diff --git a/src/abstractappearance.h b/src/abstractappearance.h
+index 208342e..2961a09 100644
+--- a/src/abstractappearance.h
++++ b/src/abstractappearance.h
+@@ -30,11 +30,10 @@ class AbstractAppearance
+ {
+ public:
+ virtual ~AbstractAppearance() {}
+- virtual bool loadSettings() = 0;
+- virtual bool saveSettings() const = 0;
++ virtual QString defaultConfigFile() const = 0;
+ virtual bool loadSettings(const QString& path) = 0;
+ virtual bool saveSettings(const QString& path) const = 0;
+-
++
+ /** @returns the installed themes' paths*/
+ virtual QStringList installedThemes() const = 0;
+
+diff --git a/src/appearancegtk2.cpp b/src/appearancegtk2.cpp
+index 92cbee3..44a2239 100644
+--- a/src/appearancegtk2.cpp
++++ b/src/appearancegtk2.cpp
+@@ -30,38 +30,48 @@
+ #include <QStandardPaths>
+ #include <config.h>
+
+-bool AppearanceGTK2::loadSettingsPrivate(const QString& path)
++bool AppearanceGTK2::loadSettings(const QString& path)
+ {
+ QFile configFile(path);
+
+- if (!configFile.open(QIODevice::ReadOnly | QIODevice::Text))
+- return false;
++ bool canRead = configFile.open(QIODevice::ReadOnly | QIODevice::Text);
+
+- const QMap<QString, QString> foundSettings = readSettingsTuples(&configFile);
+-
+- for(auto it = foundSettings.constBegin(), itEnd = foundSettings.constEnd(); it!=itEnd; ++it) {
+- if (it.key() == "gtk-theme-name")
+- m_settings["theme"] = *it;
+- else if (it.key() == "gtk-icon-theme-name")
+- m_settings["icon"] = *it;
+- else if (it.key() == "gtk-fallback-icon-theme")
+- m_settings["icon_fallback"] = *it;
+- else if (it.key() == "gtk-cursor-theme-name")
+- m_settings["cursor"] = *it;
+- else if (it.key() == "gtk-font-name")
+- m_settings["font"] = *it;
+- else if (it.key() == "gtk-toolbar-style")
+- m_settings["toolbar_style"] = *it;
+- else if (it.key() == "gtk-button-images")
+- m_settings["show_icons_buttons"] = *it;
+- else if(it.key() == "gtk-menu-images")
+- m_settings["show_icons_menus"] = *it;
+- else if (it.key() == "gtk-primary-button-warps-slider")
+- m_settings["primary_button_warps_slider"] = *it;
+- else
+- qWarning() << "unknown field" << it.key();
++ if(canRead) {
++// qDebug() << "The gtk2 config file exists...";
++ const QMap<QString, QString> foundSettings = readSettingsTuples(&configFile);
++ m_settings = QMap<QString, QString> {
++ {"toolbar_style", "GTK_TOOLBAR_ICONS"},
++ {"show_icons_buttons", "0"},
++ {"show_icons_menus", "0"},
++ {"primary_button_warps_slider", "false"}
++ };
++
++ for(auto it = foundSettings.constBegin(), itEnd = foundSettings.constEnd(); it!=itEnd; ++it) {
++ if (it.key() == "gtk-theme-name")
++ m_settings["theme"] = *it;
++ else if (it.key() == "gtk-icon-theme-name")
++ m_settings["icon"] = *it;
++ else if (it.key() == "gtk-fallback-icon-theme")
++ m_settings["icon_fallback"] = *it;
++ else if (it.key() == "gtk-cursor-theme-name")
++ m_settings["cursor"] = *it;
++ else if (it.key() == "gtk-font-name")
++ m_settings["font"] = *it;
++ else if (it.key() == "gtk-toolbar-style")
++ m_settings["toolbar_style"] = *it;
++ else if (it.key() == "gtk-button-images")
++ m_settings["show_icons_buttons"] = *it;
++ else if(it.key() == "gtk-menu-images")
++ m_settings["show_icons_menus"] = *it;
++ else if (it.key() == "gtk-primary-button-warps-slider")
++ m_settings["primary_button_warps_slider"] = *it;
++ else
++ qWarning() << "unknown field" << it.key();
++ }
++
+ }
+- return true;
++
++ return canRead;
+ }
+
+ QString AppearanceGTK2::themesGtkrcFile(const QString& themeName) const
+@@ -82,7 +92,7 @@ QString AppearanceGTK2::themesGtkrcFile(const QString& themeName) const
+ return QString();
+ }
+
+-bool AppearanceGTK2::saveSettingsPrivate(const QString& gtkrcFile) const
++bool AppearanceGTK2::saveSettings(const QString& gtkrcFile) const
+ {
+ QFile gtkrc(gtkrcFile);
+ gtkrc.remove();
+@@ -107,14 +117,14 @@ bool AppearanceGTK2::saveSettingsPrivate(const QString& gtkrcFile) const
+ flow << "include \"/etc/gtk-2.0/gtkrc\"\n"; //We include the /etc's config file
+
+ int nameEnd = m_settings["font"].lastIndexOf(QRegExp(" ([0-9]+|bold|italic)"));
+- const auto fontFamily = m_settings["font"].leftRef(nameEnd);
++ QString fontFamily = m_settings["font"].left(nameEnd);
+
+ //TODO: is this really needed?
+ flow << "style \"user-font\" \n"
+ << "{\n"
+ << "\tfont_name=\""<< fontFamily << "\"\n"
+ << "}\n";
+-
++
+ flow << "widget_class \"*\" style \"user-font\"\n";
+ flow << "gtk-font-name=\"" << m_settings["font"] << "\"\n";
+ flow << "gtk-theme-name=\"" << m_settings["theme"] << "\"\n";
+@@ -144,16 +154,6 @@ bool AppearanceGTK2::saveSettingsPrivate(const QString& gtkrcFile) const
+ return true;
+ }
+
+-void AppearanceGTK2::reset()
+-{
+- m_settings = QMap<QString, QString> {
+- {"toolbar_style", "GTK_TOOLBAR_ICONS"},
+- {"show_icons_buttons", "0"},
+- {"show_icons_menus", "0"},
+- {"primary_button_warps_slider", "false"}
+- };
+-}
+-
+ QString AppearanceGTK2::defaultConfigFile() const
+ {
+ return QDir::homePath()+"/.gtkrc-2.0";
+@@ -183,26 +183,3 @@ QStringList AppearanceGTK2::installedThemes() const
+
+ return paths;
+ }
+-
+-bool AppearanceGTK2::loadSettings()
+-{
+- reset();
+-
+- return loadSettingsPrivate("/etc/gtk-2.0/gtkrc") && loadSettingsPrivate(defaultConfigFile());
+-}
+-
+-bool AppearanceGTK2::saveSettings() const
+-{
+- return saveSettings(defaultConfigFile());
+-}
+-
+-bool AppearanceGTK2::loadSettings(const QString& gtkrcFile)
+-{
+- reset();
+- return loadSettingsPrivate(gtkrcFile);
+-}
+-
+-bool AppearanceGTK2::saveSettings(const QString& gtkrcFile) const
+-{
+- return saveSettingsPrivate(gtkrcFile);
+-}
+diff --git a/src/appearancegtk2.h b/src/appearancegtk2.h
+index 7df49bf..8bc28ee 100644
+--- a/src/appearancegtk2.h
++++ b/src/appearancegtk2.h
+@@ -29,17 +29,10 @@ class AppearanceGTK2 : public AbstractAppearance
+ {
+ bool loadSettings(const QString& path) override;
+ bool saveSettings(const QString& path) const override;
+- bool loadSettings() override;
+- bool saveSettings() const override;
++ QString defaultConfigFile() const override;
+ QStringList installedThemes() const override;
+-
++
+ QString themesGtkrcFile(const QString& themeName) const;
+-
+-private:
+- void reset();
+- QString defaultConfigFile() const;
+- bool loadSettingsPrivate(const QString& path);
+- bool saveSettingsPrivate(const QString& path) const;
+ };
+
+ #endif // APPEARANCEGTK2_H
+diff --git a/src/appearancegtk3.cpp b/src/appearancegtk3.cpp
+index 7df48c3..fa1bde5 100644
+--- a/src/appearancegtk3.cpp
++++ b/src/appearancegtk3.cpp
+@@ -25,8 +25,6 @@
+ #include <QDir>
+ #include <QDebug>
+ #include <QStandardPaths>
+-#include <KSharedConfig>
+-#include <KConfigGroup>
+
+ QStringList AppearanceGTK3::installedThemes() const
+ {
+@@ -53,65 +51,76 @@ QStringList AppearanceGTK3::installedThemes() const
+ return themes;
+ }
+
+-bool AppearanceGTK3::saveSettings(const KSharedConfig::Ptr& file) const
+-{
+- KConfigGroup group(file, "Settings");
+-
+- group.writeEntry("gtk-font-name", m_settings["font"]);
+- group.writeEntry("gtk-theme-name", m_settings["theme"]);
+- group.writeEntry("gtk-icon-theme-name", m_settings["icon"]);
+- group.writeEntry("gtk-fallback-icon-theme", m_settings["icon_fallback"]);
+- group.writeEntry("gtk-cursor-theme-name", m_settings["cursor"]);
+- group.writeEntry("gtk-toolbar-style", m_settings["toolbar_style"]);
+- group.writeEntry("gtk-menu-images", m_settings["show_icons_menus"]);
+- group.writeEntry("gtk-button-images", m_settings["show_icons_buttons"]);
+- group.writeEntry("gtk-primary-button-warps-slider", m_settings["primary_button_warps_slider"]);
+- group.writeEntry("gtk-application-prefer-dark-theme", m_settings["application_prefer_dark_theme"]);
+-
+- const bool sync = group.sync();
+- Q_ASSERT(sync);
+- return true;
+-}
+-
+-bool AppearanceGTK3::loadSettings(const KSharedConfig::Ptr& file)
++bool AppearanceGTK3::saveSettings(const QString& file) const
+ {
+- KConfigGroup group(file, "Settings");
+-
+- if (!file || !group.isValid()) {
+- qWarning() << "Cannot open the GTK3 config file" << file;
++ //Opening GTK3 config file $ENV{XDG_CONFIG_HOME}/gtk-3.0/m_settings.ini
++ QDir::home().mkpath(file.left(file.lastIndexOf('/'))); //we make sure the path exists
++ QFile file_gtk3(file);
++
++ if(!file_gtk3.open(QIODevice::WriteOnly | QIODevice::Text)) {
++ qWarning() << "Couldn't open GTK3 config file for writing at:" << file_gtk3.fileName();
+ return false;
+ }
++ QTextStream flow3(&file_gtk3);
++ flow3 << "[Settings]\n";
++ flow3 << "gtk-font-name=" << m_settings["font"] << "\n";
++ flow3 << "gtk-theme-name=" << m_settings["theme"] << "\n";
++ flow3 << "gtk-icon-theme-name="<< m_settings["icon"] << "\n";
++ flow3 << "gtk-fallback-icon-theme=" << m_settings["icon_fallback"] << "\n";
++ flow3 << "gtk-cursor-theme-name=" << m_settings["cursor"] << "\n";
++ flow3 << "gtk-toolbar-style=" << m_settings["toolbar_style"] << "\n";
++ flow3 << "gtk-menu-images=" << m_settings["show_icons_menus"] << "\n";
++ flow3 << "gtk-button-images=" << m_settings["show_icons_buttons"] << "\n";
++ flow3 << "gtk-primary-button-warps-slider=" << m_settings["primary_button_warps_slider"] << "\n";
++ flow3 << "gtk-application-prefer-dark-theme=" << m_settings["application_prefer_dark_theme"] << "\n";
+
+- m_settings = QMap<QString, QString> {
+- {"toolbar_style", "GTK_TOOLBAR_ICONS"},
+- {"show_icons_buttons", "0"},
+- {"show_icons_menus", "0"},
+- {"primary_button_warps_slider", "false"},
+- {"application_prefer_dark_theme", "false"}
+- };
+-
+- m_settings["theme"] = group.readEntry("gtk-theme-name");
+- m_settings["icon"] = group.readEntry("gtk-icon-theme-name");
+- m_settings["icon_fallback"] = group.readEntry("gtk-fallback-icon-theme");
+- m_settings["cursor"] = group.readEntry("gtk-cursor-theme-name");
+- m_settings["font"] = group.readEntry("gtk-font-name");
+- m_settings["toolbar_style"] = group.readEntry("gtk-toolbar-style");
+- m_settings["show_icons_buttons"] = group.readEntry("gtk-button-images");
+- m_settings["show_icons_menus"] = group.readEntry("gtk-menu-images");
+- m_settings["primary_button_warps_slider"] = group.readEntry("gtk-primary-button-warps-slider");
+- m_settings["application_prefer_dark_theme"] = group.readEntry("gtk-application-prefer-dark-theme");
+- for(auto it = m_settings.begin(); it != m_settings.end(); ) {
+- if (it.value().isEmpty())
+- it = m_settings.erase(it);
+- else
+- ++it;
+- }
+ return true;
+ }
+
+-QString AppearanceGTK3::configFileName() const
++bool AppearanceGTK3::loadSettings(const QString& path)
+ {
+- return QStringLiteral("gtk-3.0/settings.ini");
++ QFile fileGtk3(path);
++ bool canRead=fileGtk3.open(QIODevice::ReadOnly | QIODevice::Text);
++
++ if(canRead) {
++ const QMap<QString, QString> foundSettings = readSettingsTuples(&fileGtk3);
++
++ m_settings = QMap<QString, QString> {
++ {"toolbar_style", "GTK_TOOLBAR_ICONS"},
++ {"show_icons_buttons", "0"},
++ {"show_icons_menus", "0"},
++ {"primary_button_warps_slider", "false"},
++ {"application_prefer_dark_theme", "false"}
++ };
++
++ for(auto it = foundSettings.constBegin(), itEnd = foundSettings.constEnd(); it!=itEnd; ++it) {
++ if (it.key() == "gtk-theme-name")
++ m_settings["theme"] = *it;
++ else if (it.key() == "gtk-icon-theme-name")
++ m_settings["icon"] = *it;
++ else if (it.key() == "gtk-fallback-icon-theme")
++ m_settings["icon_fallback"] = *it;
++ else if (it.key() == "gtk-cursor-theme-name")
++ m_settings["cursor"] = *it;
++ else if (it.key() == "gtk-font-name")
++ m_settings["font"] = *it;
++ else if (it.key() == "gtk-toolbar-style")
++ m_settings["toolbar_style"] = *it;
++ else if (it.key() == "gtk-button-images")
++ m_settings["show_icons_buttons"] = *it;
++ else if (it.key() == "gtk-menu-images")
++ m_settings["show_icons_menus"] = *it;
++ else if (it.key() == "gtk-primary-button-warps-slider")
++ m_settings["primary_button_warps_slider"] = *it;
++ else if (it.key() == "gtk-application-prefer-dark-theme")
++ m_settings["application_prefer_dark_theme"] = *it;
++ else
++ qWarning() << "unknown field" << it.key();
++ }
++ } else
++ qWarning() << "Cannot open the GTK3 config file" << path;
++
++ return canRead;
+ }
+
+ QString AppearanceGTK3::defaultConfigFile() const
+@@ -120,7 +129,7 @@ QString AppearanceGTK3::defaultConfigFile() const
+ if(root.isEmpty())
+ root = QFileInfo(QDir::home(), ".config").absoluteFilePath();
+
+- return root + '/' + configFileName();
++ return root+"/gtk-3.0/settings.ini";
+ }
+
+ bool AppearanceGTK3::getApplicationPreferDarkTheme() const
+@@ -132,29 +141,3 @@ void AppearanceGTK3::setApplicationPreferDarkTheme(const bool& enable)
+ {
+ m_settings["application_prefer_dark_theme"] = enable ? "true" : "false";
+ }
+-
+-bool AppearanceGTK3::saveSettings(const QString& file) const
+-{
+- auto cfg = KSharedConfig::openConfig(file);
+- return saveSettings(cfg);
+-}
+-
+-bool AppearanceGTK3::loadSettings(const QString& path)
+-{
+- auto cfg = KSharedConfig::openConfig(path);
+- return loadSettings(cfg);
+-}
+-
+-bool AppearanceGTK3::loadSettings()
+-{
+- auto cfg = KSharedConfig::openConfig(configFileName());
+- cfg->setReadDefaults(true);
+- return loadSettings(cfg);
+-}
+-
+-bool AppearanceGTK3::saveSettings() const
+-{
+- auto cfg = KSharedConfig::openConfig(configFileName());
+- cfg->setReadDefaults(true);
+- return saveSettings(cfg);
+-}
+diff --git a/src/appearancegtk3.h b/src/appearancegtk3.h
+index 3ce5a05..d4562b1 100644
+--- a/src/appearancegtk3.h
++++ b/src/appearancegtk3.h
+@@ -23,7 +23,6 @@
+ #ifndef APPEARANCEGTK3_H
+ #define APPEARANCEGTK3_H
+
+-#include <KSharedConfig>
+ #include "abstractappearance.h"
+
+ class AppearanceGTK3 : public AbstractAppearance
+@@ -31,18 +30,11 @@ class AppearanceGTK3 : public AbstractAppearance
+
+ public:
+ QStringList installedThemes() const override;
+- bool saveSettings() const override;
+- bool loadSettings() override;
+ bool saveSettings(const QString& file) const override;
+ bool loadSettings(const QString& path) override;
++ QString defaultConfigFile() const override;
+ bool getApplicationPreferDarkTheme() const;
+ void setApplicationPreferDarkTheme(const bool& enable);
+-
+-private:
+- QString defaultConfigFile() const;
+- QString configFileName() const;
+- bool saveSettings(const KSharedConfig::Ptr& file) const;
+- bool loadSettings(const KSharedConfig::Ptr& file);
+ };
+
+ #endif // APPEARANCEGTK3_H
+diff --git a/src/appearencegtk.cpp b/src/appearencegtk.cpp
+index 95a6604..2e26a5a 100644
+--- a/src/appearencegtk.cpp
++++ b/src/appearencegtk.cpp
+@@ -64,7 +64,7 @@ bool AppearenceGTK::loadFileConfig()
+ {
+ bool correct = false;
+ foreach(AbstractAppearance* app, m_app) {
+- bool c = app->loadSettings();
++ bool c = app->loadSettings(app->defaultConfigFile());
+ correct = correct || c;
+ }
+ // qDebug() << "loading..." << correct;
+@@ -75,7 +75,7 @@ bool AppearenceGTK::saveFileConfig()
+ {
+ bool correct = true;
+ foreach(AbstractAppearance* app, m_app) {
+- bool c = app->saveSettings();
++ bool c = app->saveSettings(app->defaultConfigFile());
+ correct = correct && c;
+ }
+ // qDebug() << "saving..." << correct;
+diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
+index 151725d..05bf8f1 100644
+--- a/tests/CMakeLists.txt
++++ b/tests/CMakeLists.txt
+@@ -2,7 +2,7 @@ macro(add_kgc_test name)
+ add_executable(${name} ${name}.cpp ${ARGV})
+ add_test(${name} ${name})
+ ecm_mark_as_test(${name})
+- target_link_libraries(${name} Qt5::Core Qt5::Gui Qt5::Test KF5::ConfigCore)
++ target_link_libraries(${name} Qt5::Core Qt5::Gui Qt5::Test)
+ target_include_directories(${name} PRIVATE ${CMAKE_BINARY_DIR})
+ endmacro(add_kgc_test)
+
+diff --git a/tests/configsavetest.cpp b/tests/configsavetest.cpp
+index 1fe8f4f..d5d8460 100644
+--- a/tests/configsavetest.cpp
++++ b/tests/configsavetest.cpp
+@@ -9,40 +9,33 @@
+
+ QTEST_GUILESS_MAIN(ConfigSaveTest);
+
+-ConfigSaveTest::ConfigSaveTest()
+-{
+- QStandardPaths::setTestModeEnabled(true);
+-}
+-
+-static void fillValues(QScopedPointer<AbstractAppearance>& a)
++void ConfigSaveTest::fillValues(AbstractAppearance* a)
+ {
+ a->setFont("a");
+ a->setIcon("a");
+ a->setTheme("a");
+ a->setToolbarStyle("a");
+ a->setIconFallback("a");
+- a->setCursor("a");
+ a->setShowIconsInButtons(true);
+ a->setShowIconsInMenus(true);
+ a->setPrimaryButtonWarpsSlider(true);
+
+- auto a3 = dynamic_cast<AppearanceGTK3*>(a.data());
++ auto a3 = dynamic_cast<AppearanceGTK3*>(a);
+ if (a3) {
+ a3->setApplicationPreferDarkTheme(false);
+ }
+ }
+
+-void compareAppearances(QScopedPointer<AbstractAppearance>& reloaded, QScopedPointer<AbstractAppearance>& instance)
++bool compareAppearances(AbstractAppearance* a, AbstractAppearance* b)
+ {
+- QCOMPARE(reloaded->getFont(), instance->getFont());
+- QCOMPARE(reloaded->getIcon(), instance->getIcon());
+- QCOMPARE(reloaded->getTheme(), instance->getTheme());
+- QCOMPARE(reloaded->getCursor(), instance->getCursor());
+- QCOMPARE(reloaded->getToolbarStyle(), instance->getToolbarStyle());
+- QCOMPARE(reloaded->getIconFallback(), instance->getIconFallback());
+- QCOMPARE(reloaded->getShowIconsInButtons(), instance->getShowIconsInButtons());
+- QCOMPARE(reloaded->getShowIconsInMenus(), instance->getShowIconsInMenus());
+- QCOMPARE(reloaded->getPrimaryButtonWarpsSlider(), instance->getPrimaryButtonWarpsSlider());
++ return a->getFont() == b->getFont()
++ && a->getIcon() == b->getIcon()
++ && a->getTheme() == b->getTheme()
++ && a->getToolbarStyle() == b->getToolbarStyle()
++ && a->getIconFallback() == b->getIconFallback()
++ && a->getShowIconsInButtons() == b->getShowIconsInButtons()
++ && a->getShowIconsInMenus() == b->getShowIconsInMenus()
++ && a->getPrimaryButtonWarpsSlider() == b->getPrimaryButtonWarpsSlider();
+ }
+
+ QByteArray readFile(const QString& path)
+@@ -53,35 +46,23 @@ QByteArray readFile(const QString& path)
+ return f.readAll();
+ }
+
+-void ConfigSaveTest::testGtk2()
++void ConfigSaveTest::testOpen()
+ {
+- const QString pathA = QDir::current().absoluteFilePath("test-gtk2")
+- , pathB = QDir::current().absoluteFilePath("testB-gtk2");
+-
+- QScopedPointer<AbstractAppearance> instance(new AppearanceGTK2);
+- fillValues(instance);
+- QVERIFY(instance->saveSettings(pathA));
+-
+- QScopedPointer<AbstractAppearance> reloaded(new AppearanceGTK2);
+- QVERIFY(reloaded->loadSettings(pathA));
+- compareAppearances(reloaded, instance);
+- QVERIFY(reloaded->saveSettings(pathB));
+- QCOMPARE(readFile(pathA), readFile(pathB));
+-}
+-
+-void ConfigSaveTest::testGtk3()
+-{
+- QScopedPointer<AbstractAppearance> instance(new AppearanceGTK3);
+- fillValues(instance);
+- const QString pathA = QDir::current().absoluteFilePath("test-gtk3")
+- , pathB = QDir::current().absoluteFilePath("testB-gtk3");
+- QVERIFY(instance->saveSettings(pathA));
+-
+- QScopedPointer<AbstractAppearance> reloaded(new AppearanceGTK3);
+- QVERIFY(QFile::exists(pathA));
+- QVERIFY(reloaded->loadSettings(pathA));
+- compareAppearances(reloaded, instance);
+- QVERIFY(reloaded->saveSettings(pathB));
++ QVector<AbstractAppearance*> instances;
++ instances << new AppearanceGTK2 << new AppearanceGTK3;
++ fillValues(instances[0]);
++ fillValues(instances[1]);
++ QVERIFY(instances[0]->saveSettings("test-gtk2"));
++ QVERIFY(instances[1]->saveSettings("test-gtk3"));
+
+- QCOMPARE(readFile(pathA), readFile(pathB));
++ QVector<AbstractAppearance*> reloaded;
++ reloaded << new AppearanceGTK2 << new AppearanceGTK3;
++ QVERIFY(reloaded[0]->loadSettings("test-gtk2"));
++ QVERIFY(reloaded[1]->loadSettings("test-gtk3"));
++ QVERIFY(compareAppearances(reloaded[0], instances[0]));
++ QVERIFY(compareAppearances(reloaded[1], instances[1]));
++ QVERIFY(reloaded[0]->saveSettings("testB-gtk2"));
++ QVERIFY(reloaded[1]->saveSettings("testB-gtk3"));
++ QCOMPARE(readFile("test-gtk2"), readFile("testB-gtk2"));
++ QCOMPARE(readFile("test-gtk3"), readFile("testB-gtk3"));
+ }
+diff --git a/tests/configsavetest.h b/tests/configsavetest.h
+index 342b408..39fb4c2 100644
+--- a/tests/configsavetest.h
++++ b/tests/configsavetest.h
+@@ -11,11 +11,11 @@ class AbstractAppearance;
+ class ConfigSaveTest : public QObject
+ {
+ Q_OBJECT
+-public:
+- ConfigSaveTest();
+ private slots:
+- void testGtk2();
+- void testGtk3();
++ void testOpen();
++
++private:
++ void fillValues(AbstractAppearance* a);
+ };
+
+ #endif // CONFIGSAVETEST_H
+--
+cgit v0.11.2
+
diff --git a/kde/patch/kde-runtime.patch b/kde/patch/kde-runtime.patch
index d95ef54..c3b6101 100644
--- a/kde/patch/kde-runtime.patch
+++ b/kde/patch/kde-runtime.patch
@@ -5,3 +5,6 @@
# Fix compilation against NetworkManager 1.0.6:
cat $CWD/patch/kde-runtime/kde-runtime_networkmanager.patch | patch -p1 --verbose || { touch ${SLACK_KDE_BUILD_DIR}/${PKGNAME}.failed ; continue ; }
+## Fix compilation against gpgme 1.7+:
+#cat $CWD/patch/kde-runtime/kde-runtime_gpgme.patch | patch -p1 --verbose || { touch ${SLACK_KDE_BUILD_DIR}/${PKGNAME}.failed ; continue ; }
+
diff --git a/kde/patch/kde-runtime/kde-runtime_gpgme.patch b/kde/patch/kde-runtime/kde-runtime_gpgme.patch
new file mode 100644
index 0000000..b1703ed
--- /dev/null
+++ b/kde/patch/kde-runtime/kde-runtime_gpgme.patch
@@ -0,0 +1,133 @@
+commit 1b80d1d0b961f8e28186928ede2b87af292c3de4
+Author: Antonio Rojas <arojas@archlinux.org>
+Date: Thu Nov 10 16:58:10 2016 +0100
+
+ Allow building kwalletd against gpgme++ from gpgme 1.7
+
+ REVIEW: 129339
+
+diff --git a/kwalletd/CMakeLists.txt b/kwalletd/CMakeLists.txt
+index 73aec82..ae8c745 100644
+--- a/kwalletd/CMakeLists.txt
++++ b/kwalletd/CMakeLists.txt
+@@ -5,11 +5,18 @@ find_package(Gpgme) # Called by FindQGpgme, but since we call some gpgme
+ # functions ourselves we need to link against it directly.
+ find_package(QGpgme) # provided by kdepimlibs
+
+-if (GPGME_FOUND AND QGPGME_FOUND)
++if (NOT QGPGME_FOUND)
++find_package(Gpgmepp) # provided by gpgme 1.7
++endif (NOT QGPGME_FOUND)
++
++if ((GPGME_FOUND AND QGPGME_FOUND) OR Gpgmepp_FOUND)
+ add_definitions(-DHAVE_QGPGME)
+- include_directories(${GPGME_INCLUDES} ${QGPGME_INCLUDE_DIR})
++ include_directories(${GPGME_INCLUDES})
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${KDE4_ENABLE_EXCEPTIONS}")
+-endif(GPGME_FOUND AND QGPGME_FOUND)
++endif((GPGME_FOUND AND QGPGME_FOUND) OR Gpgmepp_FOUND)
++if (GPGME_FOUND AND QGPGME_FOUND)
++ include_directories(${QGPGME_INCLUDE_DIR})
++endif (GPGME_FOUND AND QGPGME_FOUND)
+
+ ########### build backends #########
+ add_subdirectory(backend)
+@@ -37,7 +44,7 @@ kde4_add_ui_files(kwalletd_KDEINIT_SRCS
+ kwalletwizardpagepassword.ui
+ )
+
+-if (GPGME_FOUND AND QGPGME_FOUND)
++if ((GPGME_FOUND AND QGPGME_FOUND) OR Gpgmepp_FOUND)
+ set(kwalletd_KDEINIT_SRCS
+ ${kwalletd_KDEINIT_SRCS}
+ knewwalletdialog.cpp
+@@ -48,7 +55,7 @@ if (GPGME_FOUND AND QGPGME_FOUND)
+ knewwalletdialogintro.ui
+ knewwalletdialoggpg.ui
+ )
+-endif(GPGME_FOUND AND QGPGME_FOUND)
++endif((GPGME_FOUND AND QGPGME_FOUND) OR Gpgmepp_FOUND)
+
+ find_file(kwallet_xml org.kde.KWallet.xml HINTS ${KDE4_DBUS_INTERFACES_DIR} )
+
+@@ -57,8 +64,12 @@ qt4_add_dbus_adaptor( kwalletd_KDEINIT_SRCS ${kwallet_xml} kwalletd.h KWalletD )
+ kde4_add_kdeinit_executable( kwalletd NOGUI ${kwalletd_KDEINIT_SRCS} )
+
+ target_link_libraries(kdeinit_kwalletd ${KDE4_KDEUI_LIBS} kwalletbackend )
+-if (GPGME_FOUND AND QGPGME_FOUND)
+- target_link_libraries(kdeinit_kwalletd ${QGPGME_LIBRARIES} )
++if(GPGME_FOUND AND QGPGME_FOUND)
++target_link_libraries(kdeinit_kwalletd ${QGPGME_LIBRARIES} )
++else(GPGME_FOUND AND QGPGME_FOUND)
++if(Gpgmepp_FOUND)
++target_link_libraries(kdeinit_kwalletd Gpgmepp)
++endif(Gpgmepp_FOUND)
+ endif(GPGME_FOUND AND QGPGME_FOUND)
+
+ install(TARGETS kdeinit_kwalletd ${INSTALL_TARGETS_DEFAULT_ARGS})
+@@ -73,4 +84,4 @@ install( FILES kwalletd.notifyrc DESTINATION ${DATA_INSTALL_DIR}/kwalletd )
+ install( FILES kwallet-4.13.upd DESTINATION ${DATA_INSTALL_DIR}/kconf_update)
+
+ add_subdirectory(tests)
+-add_subdirectory(autotests)
+\ No newline at end of file
++add_subdirectory(autotests)
+diff --git a/kwalletd/backend/CMakeLists.txt b/kwalletd/backend/CMakeLists.txt
+index 4db348f..7347b12 100644
+--- a/kwalletd/backend/CMakeLists.txt
++++ b/kwalletd/backend/CMakeLists.txt
+@@ -22,6 +22,10 @@ kde4_add_library(kwalletbackend SHARED ${kwalletbackend_LIB_SRCS})
+ target_link_libraries(kwalletbackend ${KDE4_KDEUI_LIBS} ${LIBGCRYPT_LIBRARIES})
+ if(QGPGME_FOUND)
+ target_link_libraries(kwalletbackend ${QGPGME_LIBRARIES} )
++else(QGPGME_FOUND)
++if(Gpgmepp_FOUND)
++target_link_libraries(kwalletbackend Gpgmepp)
++endif(Gpgmepp_FOUND)
+ endif(QGPGME_FOUND)
+
+ # link with advapi32 on windows
+diff --git a/kwalletd/backend/backendpersisthandler.cpp b/kwalletd/backend/backendpersisthandler.cpp
+index b7f63f8..9608af0 100644
+--- a/kwalletd/backend/backendpersisthandler.cpp
++++ b/kwalletd/backend/backendpersisthandler.cpp
+@@ -33,6 +33,7 @@
+ #include <gpgme++/data.h>
+ #include <gpgme++/encryptionresult.h>
+ #include <gpgme++/decryptionresult.h>
++#include <boost/shared_ptr.hpp>
+ #endif
+ #include "backendpersisthandler.h"
+ #include "kwalletbackend.h"
+diff --git a/kwalletd/kwalletwizard.cpp b/kwalletd/kwalletwizard.cpp
+index 78de78d..821b666 100644
+--- a/kwalletd/kwalletwizard.cpp
++++ b/kwalletd/kwalletwizard.cpp
+@@ -40,6 +40,7 @@
+ #include <kdebug.h>
+ #include <kmessagebox.h>
+ #include <gpgme.h>
++#include <boost/shared_ptr.hpp>
+ #endif
+
+ class PageIntro : public QWizardPage
+commit cf28801cd34730da07a2c01704ca3114630f4fe7
+Author: Antonio Rojas <arojas@archlinux.org>
+Date: Thu Nov 10 18:54:41 2016 +0100
+
+ Compiling against gmgpe 1.7 requires c++11
+
+diff --git a/kwalletd/CMakeLists.txt b/kwalletd/CMakeLists.txt
+index ae8c745..88d944e 100644
+--- a/kwalletd/CMakeLists.txt
++++ b/kwalletd/CMakeLists.txt
+@@ -17,6 +17,9 @@ endif((GPGME_FOUND AND QGPGME_FOUND) OR Gpgmepp_FOUND)
+ if (GPGME_FOUND AND QGPGME_FOUND)
+ include_directories(${QGPGME_INCLUDE_DIR})
+ endif (GPGME_FOUND AND QGPGME_FOUND)
++if (Gpgmepp_FOUND)
++ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x")
++endif (Gpgmepp_FOUND)
+
+ ########### build backends #########
+ add_subdirectory(backend)
diff --git a/kde/patch/kdenlive.patch b/kde/patch/kdenlive.patch
new file mode 100644
index 0000000..9065c4d
--- /dev/null
+++ b/kde/patch/kdenlive.patch
@@ -0,0 +1,4 @@
+# Fix compilation with gcc7.
+# Should have been fixed in 17.04.2...
+#cat $CWD/patch/kdenlive/kdenlive_gcc7.patch | patch -p1 --verbose || { touch ${SLACK_KDE_BUILD_DIR}/${PKGNAME}.failed ; continue ; }
+
diff --git a/kde/patch/kdenlive/kdenlive_gcc7.patch b/kde/patch/kdenlive/kdenlive_gcc7.patch
new file mode 100644
index 0000000..a7ddb90
--- /dev/null
+++ b/kde/patch/kdenlive/kdenlive_gcc7.patch
@@ -0,0 +1,32 @@
+# Make kdenlive compile with gcc7
+
+--- kdenlive-17.04.1/src/profiles/tree/profiletreemodel.cpp.orig 2017-05-08 19:52:35.000000000 +0200
++++ kdenlive-17.04.1/src/profiles/tree/profiletreemodel.cpp 2017-05-19 08:09:04.986909338 +0200
+@@ -27,6 +27,7 @@
+ #include <QVector>
+ #include <array>
+ #include <KLocalizedString>
++#include <functional>
+
+
+ class ProfileItem
+--- kdenlive-17.04.1/src/scopes/audioscopes/spectrogram.cpp.orig 2017-05-08 19:52:35.000000000 +0200
++++ kdenlive-17.04.1/src/scopes/audioscopes/spectrogram.cpp 2017-05-19 08:09:04.993910503 +0200
+@@ -241,7 +241,7 @@
+ x = leftDist + (m_innerScopeRect.width() - 1) * ((float)hz) / m_freqMax;
+
+ // Hide text if it would overlap with the text drawn at the mouse position
+- hideText = m_aTrackMouse->isChecked() && m_mouseWithinWidget && abs(x - (leftDist + mouseX + 20)) < (int) minDistX + 16
++ hideText = m_aTrackMouse->isChecked() && m_mouseWithinWidget && abs(x - ((int)leftDist + mouseX + 20)) < (int) minDistX + 16
+ && mouseX < m_innerScopeRect.width() && mouseX >= 0;
+
+ if (x <= rightBorder) {
+@@ -268,7 +268,7 @@
+ }
+ // Draw the line at the very right (maximum frequency)
+ x = leftDist + m_innerScopeRect.width() - 1;
+- hideText = m_aTrackMouse->isChecked() && m_mouseWithinWidget && abs(x - (leftDist + mouseX + 30)) < (int) minDistX
++ hideText = m_aTrackMouse->isChecked() && m_mouseWithinWidget && abs(x - ((int)leftDist + mouseX + 30)) < (int) minDistX
+ && mouseX < m_innerScopeRect.width() && mouseX >= 0;
+ davinci.drawLine(x, topDist, x, topDist + m_innerScopeRect.height() + 6);
+ if (!hideText) {
diff --git a/kde/patch/kdepimlibs4.patch b/kde/patch/kdepimlibs4.patch
new file mode 100644
index 0000000..91a7d15
--- /dev/null
+++ b/kde/patch/kdepimlibs4.patch
@@ -0,0 +1,3 @@
+# Fix a compilation issue with new libical:
+cat $CWD/patch/kdepimlibs4/kdepimlibs.libical3.diff | patch -p1 --verbose || { touch ${SLACK_KDE_BUILD_DIR}/${PKGNAME}.failed ; continue ; }
+
diff --git a/kde/patch/kdepimlibs4/kdepimlibs.libical3.diff b/kde/patch/kdepimlibs4/kdepimlibs.libical3.diff
new file mode 100644
index 0000000..c3b8caf
--- /dev/null
+++ b/kde/patch/kdepimlibs4/kdepimlibs.libical3.diff
@@ -0,0 +1,184 @@
+--- ./kcalcore/icalformat_p.cpp.orig 2015-06-24 07:43:14.000000000 -0500
++++ ./kcalcore/icalformat_p.cpp 2017-12-05 23:03:44.742261940 -0600
+@@ -2301,7 +2301,6 @@
+ t.second = 0;
+
+ t.is_date = 1;
+- t.is_utc = 0;
+ t.zone = 0;
+
+ return t;
+@@ -2322,8 +2321,7 @@
+ t.minute = datetime.time().minute();
+ t.second = datetime.time().second();
+ }
+- t.zone = 0; // zone is NOT set
+- t.is_utc = datetime.isUtc() ? 1 : 0;
++ t.zone = datetime.isUtc() ? icaltimezone_get_utc_timezone() : 0; // zone is NOT set
+
+ // _dumpIcaltime( t );
+
+@@ -2398,7 +2396,7 @@
+ }
+
+ KTimeZone ktz;
+- if (!t.is_utc) {
++ if (!icaltime_is_utc( t )) {
+ ktz = dt.timeZone();
+ }
+
+@@ -2431,7 +2429,7 @@
+ // _dumpIcaltime( t );
+
+ KDateTime::Spec timeSpec;
+- if (t.is_utc || t.zone == icaltimezone_get_utc_timezone()) {
++ if (icaltime_is_utc( t ) || t.zone == icaltimezone_get_utc_timezone()) {
+ timeSpec = KDateTime::UTC; // the time zone is UTC
+ utc = false; // no need to convert to UTC
+ } else {
+--- ./kcalcore/icaltimezones.cpp.orig 2015-06-24 07:43:14.000000000 -0500
++++ ./kcalcore/icaltimezones.cpp 2017-12-05 23:03:55.482262829 -0600
+@@ -54,7 +54,7 @@
+ {
+ return QDateTime(QDate(t.year, t.month, t.day),
+ QTime(t.hour, t.minute, t.second),
+- (t.is_utc ? Qt::UTC : Qt::LocalTime));
++ (icaltime_is_utc( t ) ? Qt::UTC : Qt::LocalTime));
+ }
+
+ // Maximum date for time zone data.
+@@ -81,7 +81,6 @@
+ t.second = local.time().second();
+ t.is_date = 0;
+ t.zone = 0;
+- t.is_utc = 0;
+ return t;
+ }
+
+@@ -886,7 +885,7 @@
+ case ICAL_LASTMODIFIED_PROPERTY:
+ {
+ const icaltimetype t = icalproperty_get_lastmodified(p);
+- if (t.is_utc) {
++ if (icaltime_is_utc( t )) {
+ data->d->lastModified = toQDateTime(t);
+ } else {
+ kDebug() << "LAST-MODIFIED not UTC";
+@@ -1259,7 +1258,7 @@
+ // Convert DTSTART to QDateTime, and from local time to UTC
+ const QDateTime localStart = toQDateTime(dtstart); // local time
+ dtstart.second -= prevOffset;
+- dtstart.is_utc = 1;
++ dtstart.zone = icaltimezone_get_utc_timezone();
+ const QDateTime utcStart = toQDateTime(icaltime_normalize(dtstart)); // UTC
+
+ transitions += utcStart;
+@@ -1286,13 +1285,13 @@
+ t.minute = dtstart.minute;
+ t.second = dtstart.second;
+ t.is_date = 0;
+- t.is_utc = 0; // dtstart is in local time
++ t.zone = 0; // dtstart is in local time
+ }
+ // RFC2445 states that RDATE must be in local time,
+ // but we support UTC as well to be safe.
+- if (!t.is_utc) {
++ if (!icaltime_is_utc( t )) {
+ t.second -= prevOffset; // convert to UTC
+- t.is_utc = 1;
++ t.zone = icaltimezone_get_utc_timezone();
+ t = icaltime_normalize(t);
+ }
+ transitions += toQDateTime(t);
+--- ./kcal/icalformat_p.cpp.orig 2015-06-24 07:43:14.000000000 -0500
++++ ./kcal/icalformat_p.cpp 2017-12-05 23:04:01.670263342 -0600
+@@ -2087,7 +2087,6 @@
+ t.second = 0;
+
+ t.is_date = 1;
+- t.is_utc = 0;
+ t.zone = 0;
+
+ return t;
+@@ -2106,8 +2105,7 @@
+ t.second = datetime.time().second();
+
+ t.is_date = 0;
+- t.zone = 0; // zone is NOT set
+- t.is_utc = datetime.isUtc() ? 1 : 0;
++ t.zone = datetime.isUtc() ? icaltimezone_get_utc_timezone() : 0;
+
+ // _dumpIcaltime( t );
+
+@@ -2174,7 +2172,7 @@
+ }
+
+ KTimeZone ktz;
+- if ( !t.is_utc ) {
++ if ( !icaltime_is_utc( t ) ) {
+ ktz = dt.timeZone();
+ }
+
+@@ -2207,7 +2205,7 @@
+ // _dumpIcaltime( t );
+
+ KDateTime::Spec timeSpec;
+- if ( t.is_utc || t.zone == icaltimezone_get_utc_timezone() ) {
++ if ( icaltime_is_utc( t ) || t.zone == icaltimezone_get_utc_timezone() ) {
+ timeSpec = KDateTime::UTC; // the time zone is UTC
+ utc = false; // no need to convert to UTC
+ } else {
+--- ./kcal/icaltimezones.cpp.orig 2015-06-24 07:43:14.000000000 -0500
++++ ./kcal/icaltimezones.cpp 2017-12-05 23:04:07.385263815 -0600
+@@ -50,7 +50,7 @@
+ {
+ return QDateTime( QDate( t.year, t.month, t.day ),
+ QTime( t.hour, t.minute, t.second ),
+- ( t.is_utc ? Qt::UTC : Qt::LocalTime ) );
++ ( icaltime_is_utc( t ) ? Qt::UTC : Qt::LocalTime ) );
+ }
+
+ // Maximum date for time zone data.
+@@ -77,7 +77,6 @@
+ t.second = local.time().second();
+ t.is_date = 0;
+ t.zone = 0;
+- t.is_utc = 0;
+ return t;
+ }
+
+@@ -787,7 +786,7 @@
+ case ICAL_LASTMODIFIED_PROPERTY:
+ {
+ icaltimetype t = icalproperty_get_lastmodified(p);
+- if ( t.is_utc ) {
++ if ( icaltime_is_utc( t ) ) {
+ data->d->lastModified = toQDateTime( t );
+ } else {
+ kDebug() << "LAST-MODIFIED not UTC";
+@@ -972,7 +971,7 @@
+ // Convert DTSTART to QDateTime, and from local time to UTC
+ QDateTime localStart = toQDateTime( dtstart ); // local time
+ dtstart.second -= prevOffset;
+- dtstart.is_utc = 1;
++ dtstart.zone = icaltimezone_get_utc_timezone();
+ QDateTime utcStart = toQDateTime( icaltime_normalize( dtstart ) ); // UTC
+
+ transitions += utcStart;
+@@ -999,13 +998,13 @@
+ t.minute = dtstart.minute;
+ t.second = dtstart.second;
+ t.is_date = 0;
+- t.is_utc = 0; // dtstart is in local time
++ t.zone = 0; // dtstart is in local time
+ }
+ // RFC2445 states that RDATE must be in local time,
+ // but we support UTC as well to be safe.
+- if ( !t.is_utc ) {
++ if ( !icaltime_is_utc( t ) ) {
+ t.second -= prevOffset; // convert to UTC
+- t.is_utc = 1;
++ t.zone = icaltimezone_get_utc_timezone();
+ t = icaltime_normalize( t );
+ }
+ transitions += toQDateTime( t );
diff --git a/kde/patch/kdesdk-kioslaves.patch b/kde/patch/kdesdk-kioslaves.patch
index dd4f9e2..da2f885 100644
--- a/kde/patch/kdesdk-kioslaves.patch
+++ b/kde/patch/kdesdk-kioslaves.patch
@@ -1,3 +1,3 @@
# Fix compilation against svn > 1.8.
-cat $CWD/patch/kdesdk-kioslaves/svn19.patch | patch -p1 --verbose || { touch ${SLACK_KDE_BUILD_DIR}/${PKGNAME}.failed ; continue ; }
+#cat $CWD/patch/kdesdk-kioslaves/svn19.patch | patch -p1 --verbose || { touch ${SLACK_KDE_BUILD_DIR}/${PKGNAME}.failed ; continue ; }
diff --git a/kde/patch/kholidays.patch b/kde/patch/kholidays.patch
index f1ed4b5..ec8ad80 100644
--- a/kde/patch/kholidays.patch
+++ b/kde/patch/kholidays.patch
@@ -2,3 +2,7 @@
# Fixed post Plasma 5.5.5.
#cat $CWD/patch/kholidays/kholidays_isnan.patch | patch -p1 --verbose || { touch ${SLACK_KDE_BUILD_DIR}/${PKGNAME}.failed ; continue ; }
+# Revert depfreeze breaking merges (KF5_VERSION, cmake, PIM_VERSION).
+# Should be fixed in Applications > 16.12.3.
+#cat $CWD/patch/kholidays/kholidays_depfreeze_revert.patch | patch -p1 --verbose || { touch ${SLACK_KDE_BUILD_DIR}/${PKGNAME}.failed ; continue ; }
+
diff --git a/kde/patch/kholidays/kholidays_depfreeze_revert.patch b/kde/patch/kholidays/kholidays_depfreeze_revert.patch
new file mode 100644
index 0000000..316403a
--- /dev/null
+++ b/kde/patch/kholidays/kholidays_depfreeze_revert.patch
@@ -0,0 +1,61 @@
+From 506bd08a6faf61c776beecb05f1acbe04223827a Mon Sep 17 00:00:00 2001
+From: Andreas Sturmlechner <andreas.sturmlechner@gmail.com>
+Date: Fri, 10 Mar 2017 13:33:10 +0100
+Subject: Revert depfreeze breaking merges (KF5_VERSION, cmake, PIM_VERSION)
+
+---
+ CMakeLists.txt | 16 ++++++++--------
+ 1 file changed, 8 insertions(+), 8 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 05164db..e0b67b8 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -1,28 +1,28 @@
+-cmake_minimum_required(VERSION 3.0)
+-set(PIM_VERSION "5.4.40")
++cmake_minimum_required(VERSION 2.8.12)
+
+-project(KHolidays VERSION ${PIM_VERSION})
++project(KHolidays)
+
+ # ECM setup
+-set(KF5_VERSION "5.31.0")
++set(KF5_VERSION "5.28.0")
+ find_package(ECM ${KF5_VERSION} CONFIG REQUIRED)
+ set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH})
+
+ include(GenerateExportHeader)
+ include(ECMGenerateHeaders)
+ include(ECMGeneratePriFile)
+-include(CMakePackageConfigHelpers)
++include(ECMPackageConfigHelpers)
+ include(ECMSetupVersion)
+ include(ECMPoQmTools)
+ include(FeatureSummary)
+ include(KDEInstallDirs)
+ include(KDECMakeSettings)
+ include(KDEFrameworkCompilerSettings NO_POLICY_SCOPE)
+-include(ECMCoverageOption)
++
++set(PIM_VERSION "5.4.3")
+
+ set(KHOLIDAYS_LIB_VERSION ${PIM_VERSION})
+
+-ecm_setup_version(PROJECT VARIABLE_PREFIX KHOLIDAYS
++ecm_setup_version(${KHOLIDAYS_LIB_VERSION} VARIABLE_PREFIX KHOLIDAYS
+ VERSION_HEADER "${CMAKE_CURRENT_BINARY_DIR}/kholidays_version.h"
+ PACKAGE_VERSION_FILE "${CMAKE_CURRENT_BINARY_DIR}/KF5HolidaysConfigVersion.cmake"
+ SOVERSION 5
+@@ -50,7 +50,7 @@ endif()
+ ########### CMake Config Files ###########
+ set(CMAKECONFIG_INSTALL_DIR "${KDE_INSTALL_CMAKEPACKAGEDIR}/KF5Holidays")
+
+-configure_package_config_file(
++ecm_configure_package_config_file(
+ "${CMAKE_CURRENT_SOURCE_DIR}/KF5HolidaysConfig.cmake.in"
+ "${CMAKE_CURRENT_BINARY_DIR}/KF5HolidaysConfig.cmake"
+ INSTALL_DESTINATION ${CMAKECONFIG_INSTALL_DIR}
+--
+cgit v0.11.2
+
diff --git a/kde/patch/kio.patch b/kde/patch/kio.patch
index 5d87cba..1caed00 100644
--- a/kde/patch/kio.patch
+++ b/kde/patch/kio.patch
@@ -7,3 +7,8 @@
# to kio (kf5 based) to make service menus visible in dolphin (kf5 based):
#cat $CWD/patch/kio/kio_dolphin_servicemenus.patch | patch -p1 --verbose || { touch ${SLACK_KDE_BUILD_DIR}/${PKGNAME}.failed ; continue ; }
+# Qt >= 5.9.3 breaks creation of folders in kio, which affects e.g.
+# Dolphin and Plasma Folder View.
+# Fixed in KIO 5.41:
+#cat $CWD/patch/kio/kio_fix_url_setpath.patch | patch -p1 --verbose || { touch ${SLACK_KDE_BUILD_DIR}/${PKGNAME}.failed ; continue ; }
+
diff --git a/kde/patch/kio/kio_fix_url_setpath.patch b/kde/patch/kio/kio_fix_url_setpath.patch
new file mode 100644
index 0000000..d9cf740
--- /dev/null
+++ b/kde/patch/kio/kio_fix_url_setpath.patch
@@ -0,0 +1,65 @@
+From 2353119aae8f03565bc7779ed1d597d266f5afda Mon Sep 17 00:00:00 2001
+From: Elvis Angelaccio <elvis.angelaccio@kde.org>
+Date: Thu, 16 Nov 2017 10:41:19 +0100
+Subject: Fix KIO::mkpath with qtbase 5.10 beta 4
+
+Summary:
+The latest Qt 5.10 beta includes [1] which breaks a bunch of unit tests,
+since `url.setPath("//foo")` will now result in an invalid (empty) QUrl.
+
+This patch fixes the KIO::mkpath() case.
+
+[1]: http://code.qt.io/cgit/qt/qtbase.git/commit/?id=f62768d046528636789f901ac79e2cfa1843a7b7
+
+Test Plan:
+
+* I can now create folders from dolphin and plasma.
+* fileundomanagertest and mkpathjobtest no longer fail
+
+Reviewers: #frameworks, dfaure
+
+Tags: #frameworks
+
+Differential Revision: https://phabricator.kde.org/D8836
+---
+ src/core/mkpathjob.cpp | 17 ++++++++++++++---
+ 1 file changed, 14 insertions(+), 3 deletions(-)
+
+diff --git a/src/core/mkpathjob.cpp b/src/core/mkpathjob.cpp
+index bff46ca..a177805 100644
+--- a/src/core/mkpathjob.cpp
++++ b/src/core/mkpathjob.cpp
+@@ -43,8 +43,13 @@ public:
+ m_url.setPath(QStringLiteral("/"));
+ int i = 0;
+ for (; i < basePathComponents.count() && i < m_pathComponents.count(); ++i) {
+- if (m_pathComponents.at(i) == basePathComponents.at(i)) {
+- m_url.setPath(m_url.path() + '/' + m_pathComponents.at(i));
++ const QString pathComponent = m_pathComponents.at(i);
++ if (pathComponent == basePathComponents.at(i)) {
++ if (m_url.path() == QLatin1Char('/')) {
++ m_url.setPath(m_url.path() + pathComponent);
++ } else {
++ m_url.setPath(m_url.path() + '/' + pathComponent);
++ }
+ } else {
+ break;
+ }
+@@ -57,7 +62,13 @@ public:
+ if (m_url.isLocalFile()) {
+ i = 0;
+ for (; i < m_pathComponents.count(); ++i) {
+- QString testDir = m_url.toLocalFile() + '/' + m_pathComponents.at(i);
++ const QString localFile = m_url.toLocalFile();
++ QString testDir;
++ if (localFile == QLatin1Char('/')) {
++ testDir = localFile + m_pathComponents.at(i);
++ } else {
++ testDir = localFile + '/' + m_pathComponents.at(i);
++ }
+ if (QFileInfo(testDir).isDir()) {
+ m_url.setPath(testDir);
+ } else {
+--
+cgit v0.11.2
+
diff --git a/kde/patch/konsole.patch b/kde/patch/konsole.patch
new file mode 100644
index 0000000..ce82120
--- /dev/null
+++ b/kde/patch/konsole.patch
@@ -0,0 +1,5 @@
+# Set TERM to 'konsole' instead of the default 'xterm-256color'
+# to prevent garbled text under certain conditions:
+# Reverted to default behaviour in 18.04.0 after Slackware did the same:
+#cat $CWD/patch/konsole/konsole.term.is.konsole.patch | patch -p1 --verbose || { touch ${SLACK_KDE_BUILD_DIR}/${PKGNAME}.failed ; continue ; }
+
diff --git a/kde/patch/konsole/konsole.term.is.konsole.patch b/kde/patch/konsole/konsole.term.is.konsole.patch
new file mode 100644
index 0000000..443b9f1
--- /dev/null
+++ b/kde/patch/konsole/konsole.term.is.konsole.patch
@@ -0,0 +1,24 @@
+diff -uar konsole-17.12.3.orig/src/Profile.cpp konsole-17.12.3/src/Profile.cpp
+--- konsole-17.12.3.orig/src/Profile.cpp 2018-03-01 23:54:01.000000000 +0100
++++ konsole-17.12.3/src/Profile.cpp 2018-04-03 21:17:11.897873304 +0200
+@@ -157,7 +157,7 @@
+ // See Pty.cpp on why Arguments is populated
+ setProperty(Arguments, QStringList() << QString::fromUtf8(qgetenv("SHELL")));
+ setProperty(Icon, QStringLiteral("utilities-terminal"));
+- setProperty(Environment, QStringList() << QStringLiteral("TERM=xterm-256color") << QStringLiteral("COLORTERM=truecolor"));
++ setProperty(Environment, QStringList() << QStringLiteral("TERM=konsole") << QStringLiteral("COLORTERM=truecolor"));
+ setProperty(LocalTabTitleFormat, QStringLiteral("%d : %n"));
+ setProperty(RemoteTabTitleFormat, QStringLiteral("(%u) %H"));
+ setProperty(ShowTerminalSizeHint, true);
+diff -uar konsole-17.12.3.orig/src/Pty.cpp konsole-17.12.3/src/Pty.cpp
+--- konsole-17.12.3.orig/src/Pty.cpp 2018-03-01 23:54:01.000000000 +0100
++++ konsole-17.12.3/src/Pty.cpp 2018-04-03 21:18:18.898007801 +0200
+@@ -229,7 +229,7 @@
+
+ // extra safeguard to make sure $TERM is always set
+ if (!isTermEnvAdded) {
+- setEnv(QStringLiteral("TERM"), QStringLiteral("xterm-256color"));
++ setEnv(QStringLiteral("TERM"), QStringLiteral("konsole"));
+ }
+ }
+
diff --git a/kde/patch/kopete.patch b/kde/patch/kopete.patch
new file mode 100644
index 0000000..64e8238
--- /dev/null
+++ b/kde/patch/kopete.patch
@@ -0,0 +1,9 @@
+# Fix for jabber protocol vulnerability in Kopete: CVE-2017-5593
+# (User Impersonation Vulnerability)
+# Fixed in 16.12.3.
+# cat $CWD/patch/kopete/kopete_kdebug376348.patch | patch -p1 --verbose || { touch ${SLACK_KDE_BUILD_DIR}/${PKGNAME}.failed ; continue ; }
+
+# Make 18.04.0 compile.
+# Fixed in 18.04.1.
+#cat $CWD/patch/kopete/kopete_kdebug393372.patch | patch -p1 --verbose || { touch ${SLACK_KDE_BUILD_DIR}/${PKGNAME}.failed ; continue ; }
+
diff --git a/kde/patch/kopete/kopete_kdebug376348.patch b/kde/patch/kopete/kopete_kdebug376348.patch
new file mode 100644
index 0000000..d9bb057
--- /dev/null
+++ b/kde/patch/kopete/kopete_kdebug376348.patch
@@ -0,0 +1,127 @@
+From 6243764c4fd0985320d4a10b48051cc418d584ad Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Pali=20Roh=C3=A1r?= <pali.rohar@gmail.com>
+Date: Sat, 11 Feb 2017 13:24:59 +0100
+Subject: Fix CVE 2017-5593 (User Impersonation Vulnerability) in jabber
+ protocol
+
+BUG: 376348
+FIXED-IN: 16.12.3
+---
+ .../jabber/libiris/patches/01_cve_2017-5593.patch | 52 ++++++++++++++++++++++
+ .../jabber/libiris/src/xmpp/xmpp-im/xmpp_tasks.cpp | 14 +++---
+ 2 files changed, 61 insertions(+), 5 deletions(-)
+ create mode 100644 protocols/jabber/libiris/patches/01_cve_2017-5593.patch
+
+diff --git a/protocols/jabber/libiris/patches/01_cve_2017-5593.patch b/protocols/jabber/libiris/patches/01_cve_2017-5593.patch
+new file mode 100644
+index 0000000..573ca66
+--- /dev/null
++++ b/protocols/jabber/libiris/patches/01_cve_2017-5593.patch
+@@ -0,0 +1,52 @@
++diff --git a/src/xmpp/xmpp-im/xmpp_tasks.cpp b/src/xmpp/xmpp-im/xmpp_tasks.cpp
++index 0e74b71..0837548 100644
++--- a/src/xmpp/xmpp-im/xmpp_tasks.cpp
+++++ b/src/xmpp/xmpp-im/xmpp_tasks.cpp
++@@ -888,14 +888,18 @@ bool JT_PushMessage::take(const QDomElement &e)
++ QDomElement forward;
++ Message::CarbonDir cd = Message::NoCarbon;
++
+++ Jid fromJid = Jid(e1.attribute(QLatin1String("from")));
++ // Check for Carbon
++ QDomNodeList list = e1.childNodes();
++ for (int i = 0; i < list.size(); ++i) {
++ QDomElement el = list.at(i).toElement();
++
++- if (el.attribute("xmlns") == QLatin1String("urn:xmpp:carbons:2") && (el.tagName() == QLatin1String("received") || el.tagName() == QLatin1String("sent"))) {
+++ if (el.attribute("xmlns") == QLatin1String("urn:xmpp:carbons:2")
+++ && (el.tagName() == QLatin1String("received") || el.tagName() == QLatin1String("sent"))
+++ && fromJid.compare(Jid(e1.attribute(QLatin1String("to"))), false)) {
++ QDomElement el1 = el.firstChildElement();
++- if (el1.tagName() == QLatin1String("forwarded") && el1.attribute(QLatin1String("xmlns")) == QLatin1String("urn:xmpp:forward:0")) {
+++ if (el1.tagName() == QLatin1String("forwarded")
+++ && el1.attribute(QLatin1String("xmlns")) == QLatin1String("urn:xmpp:forward:0")) {
++ QDomElement el2 = el1.firstChildElement(QLatin1String("message"));
++ if (!el2.isNull()) {
++ forward = el2;
++@@ -904,7 +908,8 @@ bool JT_PushMessage::take(const QDomElement &e)
++ }
++ }
++ }
++- else if (el.tagName() == QLatin1String("forwarded") && el.attribute(QLatin1String("xmlns")) == QLatin1String("urn:xmpp:forward:0")) {
+++ else if (el.tagName() == QLatin1String("forwarded")
+++ && el.attribute(QLatin1String("xmlns")) == QLatin1String("urn:xmpp:forward:0")) {
++ forward = el.firstChildElement(QLatin1String("message")); // currently only messages are supportted
++ // TODO <delay> element support
++ if (!forward.isNull()) {
++@@ -913,7 +918,6 @@ bool JT_PushMessage::take(const QDomElement &e)
++ }
++ }
++
++- QString from = e1.attribute(QLatin1String("from"));
++ Stanza s = client()->stream().createStanza(addCorrectNS(forward.isNull()? e1 : forward));
++ if(s.isNull()) {
++ //printf("take: bad stanza??\n");
++@@ -926,7 +930,7 @@ bool JT_PushMessage::take(const QDomElement &e)
++ return false;
++ }
++ if (!forward.isNull()) {
++- m.setForwardedFrom(Jid(from));
+++ m.setForwardedFrom(fromJid);
++ m.setCarbonDirection(cd);
++ }
++
+diff --git a/protocols/jabber/libiris/src/xmpp/xmpp-im/xmpp_tasks.cpp b/protocols/jabber/libiris/src/xmpp/xmpp-im/xmpp_tasks.cpp
+index 0e74b71..0837548 100644
+--- a/protocols/jabber/libiris/src/xmpp/xmpp-im/xmpp_tasks.cpp
++++ b/protocols/jabber/libiris/src/xmpp/xmpp-im/xmpp_tasks.cpp
+@@ -888,14 +888,18 @@ bool JT_PushMessage::take(const QDomElement &e)
+ QDomElement forward;
+ Message::CarbonDir cd = Message::NoCarbon;
+
++ Jid fromJid = Jid(e1.attribute(QLatin1String("from")));
+ // Check for Carbon
+ QDomNodeList list = e1.childNodes();
+ for (int i = 0; i < list.size(); ++i) {
+ QDomElement el = list.at(i).toElement();
+
+- if (el.attribute("xmlns") == QLatin1String("urn:xmpp:carbons:2") && (el.tagName() == QLatin1String("received") || el.tagName() == QLatin1String("sent"))) {
++ if (el.attribute("xmlns") == QLatin1String("urn:xmpp:carbons:2")
++ && (el.tagName() == QLatin1String("received") || el.tagName() == QLatin1String("sent"))
++ && fromJid.compare(Jid(e1.attribute(QLatin1String("to"))), false)) {
+ QDomElement el1 = el.firstChildElement();
+- if (el1.tagName() == QLatin1String("forwarded") && el1.attribute(QLatin1String("xmlns")) == QLatin1String("urn:xmpp:forward:0")) {
++ if (el1.tagName() == QLatin1String("forwarded")
++ && el1.attribute(QLatin1String("xmlns")) == QLatin1String("urn:xmpp:forward:0")) {
+ QDomElement el2 = el1.firstChildElement(QLatin1String("message"));
+ if (!el2.isNull()) {
+ forward = el2;
+@@ -904,7 +908,8 @@ bool JT_PushMessage::take(const QDomElement &e)
+ }
+ }
+ }
+- else if (el.tagName() == QLatin1String("forwarded") && el.attribute(QLatin1String("xmlns")) == QLatin1String("urn:xmpp:forward:0")) {
++ else if (el.tagName() == QLatin1String("forwarded")
++ && el.attribute(QLatin1String("xmlns")) == QLatin1String("urn:xmpp:forward:0")) {
+ forward = el.firstChildElement(QLatin1String("message")); // currently only messages are supportted
+ // TODO <delay> element support
+ if (!forward.isNull()) {
+@@ -913,7 +918,6 @@ bool JT_PushMessage::take(const QDomElement &e)
+ }
+ }
+
+- QString from = e1.attribute(QLatin1String("from"));
+ Stanza s = client()->stream().createStanza(addCorrectNS(forward.isNull()? e1 : forward));
+ if(s.isNull()) {
+ //printf("take: bad stanza??\n");
+@@ -926,7 +930,7 @@ bool JT_PushMessage::take(const QDomElement &e)
+ return false;
+ }
+ if (!forward.isNull()) {
+- m.setForwardedFrom(Jid(from));
++ m.setForwardedFrom(fromJid);
+ m.setCarbonDirection(cd);
+ }
+
+--
+cgit v0.11.2
+
diff --git a/kde/patch/kopete/kopete_kdebug393372.patch b/kde/patch/kopete/kopete_kdebug393372.patch
new file mode 100644
index 0000000..2d1b1f0
--- /dev/null
+++ b/kde/patch/kopete/kopete_kdebug393372.patch
@@ -0,0 +1,30 @@
+From b1f4fa1401cba2e359e5a4b3ea2bafd119fca62b Mon Sep 17 00:00:00 2001
+From: Pino Toscano <pino@kde.org>
+Date: Tue, 24 Apr 2018 06:30:19 +0200
+Subject: oscar: include buffer.h
+
+This header uses Buffer as by-value parameter, so make sure it knows
+about it.
+
+BUG: 393372
+FIXED-IN: 18.04.1
+---
+ protocols/oscar/liboscar/tasks/messagereceivertask.h | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/protocols/oscar/liboscar/tasks/messagereceivertask.h b/protocols/oscar/liboscar/tasks/messagereceivertask.h
+index 8f52cd7..908e903 100644
+--- a/protocols/oscar/liboscar/tasks/messagereceivertask.h
++++ b/protocols/oscar/liboscar/tasks/messagereceivertask.h
+@@ -21,6 +21,7 @@
+ #include <QByteArray>
+ #include "oscarmessage.h"
+ #include "oscartypeclasses.h"
++#include "buffer.h"
+
+ class QTextCodec;
+
+--
+cgit v0.11.2
+
+
diff --git a/kde/patch/kpat.patch b/kde/patch/kpat.patch
new file mode 100644
index 0000000..dfc1651
--- /dev/null
+++ b/kde/patch/kpat.patch
@@ -0,0 +1,5 @@
+# Commit https://cgit.kde.org/kpat.git/patch/?id=fc1d54ced6a727382599d767e55879b6843c3456
+# Introduces a hard dependency on fc-solver which in turn has new dependencies
+# So, we revert this commit to avoid dropping kpat altogether
+cat $CWD/patch/kpat/kpat_no_freecell_solver_dep.patch | patch -p1 --reverse --verbose || { touch ${SLACK_KDE_BUILD_DIR}/${PKGNAME}.failed ; continue ; }
+
diff --git a/kde/patch/kpat/kpat_no_freecell_solver_dep.patch b/kde/patch/kpat/kpat_no_freecell_solver_dep.patch
new file mode 100644
index 0000000..c2a0e66
--- /dev/null
+++ b/kde/patch/kpat/kpat_no_freecell_solver_dep.patch
@@ -0,0 +1,1475 @@
+Commit https://cgit.kde.org/kpat.git/patch/?id=fc1d54ced6a727382599d767e55879b6843c3456
+Introduces a hard dependency on fc-solver which in turn has new dependencies
+So, we revert this commit to avoid dropping kpat altogether
+
+From ed0e53e0888da7123f4a0d2097f8da7fb105ca18 Mon Sep 17 00:00:00 2001
+From: Fabian Kosmale <0inkane@googlemail.com>
+Date: Sun, 13 May 2018 15:14:53 +0200
+Subject: Use Freecell Solver for FreeCell and Simple Simon
+
+Summary: This uses http://fc-solve.shlomifish.org/ and prevents the looping in the existing solvers.
+
+Test Plan: Test that the solvers are working.
+
+Reviewers: #kde_games, fabiank
+
+Subscribers: kde-games-devel, aacid, #kde_games
+
+Tags: #kde_games
+
+Differential Revision: https://phabricator.kde.org/D12415
+---
+ CMakeLists.txt | 6 +-
+ dealer.cpp | 4 +
+ freecell.cpp | 35 ++++
+ freecell.h | 1 +
+ patsolve/abstract_fc_solve_solver.cpp | 239 ++++++++++++++++++++++++++
+ patsolve/abstract_fc_solve_solver.h | 52 ++++++
+ patsolve/freecellsolver.cpp | 310 +++++++++++++++++-----------------
+ patsolve/freecellsolver.h | 23 ++-
+ patsolve/patsolve.h | 12 +-
+ patsolve/simonsolver.cpp | 129 +++++++++++++-
+ patsolve/simonsolver.h | 20 ++-
+ patsolve/solverinterface.h | 2 +
+ pileutils.cpp | 61 +++++++
+ pileutils.h | 4 +
+ simon.cpp | 56 +++++-
+ simon.h | 1 +
+ 16 files changed, 779 insertions(+), 176 deletions(-)
+ create mode 100644 patsolve/abstract_fc_solve_solver.cpp
+ create mode 100644 patsolve/abstract_fc_solve_solver.h
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 8f738bf..c043c45 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -4,6 +4,8 @@ cmake_minimum_required (VERSION 2.8.12 FATAL_ERROR)
+ set (QT_MIN_VERSION "5.7.0")
+ set (KF5_MIN_VERSION "5.30.0")
+
++include(FindPkgConfig)
++pkg_check_modules(FC_SOLVE REQUIRED libfreecell-solver)
+ find_package(ECM ${KF5_MIN_VERSION} REQUIRED CONFIG)
+ set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${ECM_MODULE_PATH} ${ECM_KDE_MODULE_DIR})
+
+@@ -45,7 +47,7 @@ add_subdirectory(sounds)
+ add_subdirectory(themes)
+ add_subdirectory(doc)
+
+-set(kpat_SRCS
++set(kpat_SRCS ${libfcs_SRCS}
+ main.cpp
+ dealer.cpp
+ dealerinfo.cpp
+@@ -59,6 +61,7 @@ set(kpat_SRCS
+ soundengine.cpp
+ statisticsdialog.cpp
+ view.cpp
++ patsolve/abstract_fc_solve_solver.cpp
+ patsolve/memory.cpp
+ patsolve/patsolve.cpp
+
+@@ -101,6 +104,7 @@ target_link_libraries(kpat
+ KF5::KIOCore
+ KF5KDEGames
+ kcardgame
++ ${FC_SOLVE_LIBRARIES}
+ )
+
+ install(TARGETS kpat ${KDE_INSTALL_TARGETS_DEFAULT_ARGS})
+diff --git a/dealer.cpp b/dealer.cpp
+index 7c03ebf..a2558fc 100644
+--- a/dealer.cpp
++++ b/dealer.cpp
+@@ -1724,6 +1724,10 @@ void DealerScene::startSolver()
+
+ bool DealerScene::isGameLost() const
+ {
++ if (! m_winningMoves.isEmpty())
++ {
++ return false;
++ }
+ if ( solver() )
+ {
+ if ( m_solverThread && m_solverThread->isRunning() )
+diff --git a/freecell.cpp b/freecell.cpp
+index f870cdb..9a7c278 100644
+--- a/freecell.cpp
++++ b/freecell.cpp
+@@ -111,6 +111,41 @@ void Freecell::restart( const QList<KCard*> & cards )
+ }
+
+
++QString Freecell::solverFormat() const
++{
++ QString output;
++ QString tmp;
++ for (int i = 0; i < 4 ; i++) {
++ if (target[i]->isEmpty())
++ continue;
++ tmp += suitToString(target[i]->topCard()->suit()) + '-' + rankToString(target[i]->topCard()->rank()) + ' ';
++ }
++ if (!tmp.isEmpty())
++ output += QString::fromLatin1("Foundations: %1\n").arg(tmp);
++
++ tmp.truncate(0);
++ for (int i = 0; i < 4 ; i++) {
++ if (freecell[i]->isEmpty())
++ tmp += "- ";
++ else
++ tmp += rankToString(freecell[i]->topCard()->rank()) + suitToString(freecell[i]->topCard()->suit()) + ' ';
++ }
++ if (!tmp.isEmpty())
++ {
++ QString a = QString::fromLatin1("Freecells: %1\n");
++ output += a.arg(tmp);
++ }
++
++ for (int i = 0; i < 8 ; i++)
++ {
++ QList<KCard*> cards = store[i]->cards();
++ for (QList<KCard*>::ConstIterator it = cards.begin(); it != cards.end(); ++it)
++ output += rankToString((*it)->rank()) + suitToString((*it)->suit()) + ' ';
++ output += '\n';
++ }
++ return output;
++}
++
+ void Freecell::cardsDroppedOnPile( const QList<KCard*> & cards, KCardPile * pile )
+ {
+ if ( cards.size() <= 1 )
+diff --git a/freecell.h b/freecell.h
+index 7b0b2cb..9f7d84b 100644
+--- a/freecell.h
++++ b/freecell.h
+@@ -62,6 +62,7 @@ protected slots:
+ private:
+ bool canPutStore( const KCardPile * pile, const QList<KCard*> & cards ) const;
+
++ virtual QString solverFormat() const;
+ PatPile* store[8];
+ PatPile* freecell[4];
+ PatPile* target[4];
+diff --git a/patsolve/abstract_fc_solve_solver.cpp b/patsolve/abstract_fc_solve_solver.cpp
+new file mode 100644
+index 0000000..11e5baa
+--- /dev/null
++++ b/patsolve/abstract_fc_solve_solver.cpp
+@@ -0,0 +1,239 @@
++/*
++ * Copyright (C) 2006-2009 Stephan Kulow <coolo@kde.org>
++ *
++ * This program is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU General Public License as
++ * published by the Free Software Foundation; either version 2 of
++ * the License, or (at your option) any later version.
++ *
++ * This program is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++ * GNU General Public License for more details.
++ *
++ * You should have received a copy of the GNU General Public License
++ * along with this program. If not, see <http://www.gnu.org/licenses/>.
++ */
++
++#include <stdlib.h>
++#include <string.h>
++
++#include "freecell-solver/fcs_user.h"
++#include "freecell-solver/fcs_cl.h"
++
++#include "abstract_fc_solve_solver.h"
++
++const int CHUNKSIZE = 100;
++const long int MAX_ITERS_LIMIT = 200000;
++
++#define PRINT 0
++
++/* These two routines make and unmake moves. */
++
++void FcSolveSolver::make_move(MOVE *)
++{
++ return;
++}
++
++void FcSolveSolver::undo_move(MOVE *)
++{
++ return;
++}
++
++/* Get the possible moves from a position, and store them in Possible[]. */
++SolverInterface::ExitStatus FcSolveSolver::patsolve( int _max_positions )
++{
++ int current_iters_count;
++ max_positions = (_max_positions < 0) ? MAX_ITERS_LIMIT : _max_positions;
++
++ init();
++
++ if (!solver_instance)
++ {
++ {
++ solver_instance = freecell_solver_user_alloc();
++
++ solver_ret = FCS_STATE_NOT_BEGAN_YET;
++
++ char * error_string;
++ int error_arg;
++ const char * known_parameters[1] = {NULL};
++ /* A "char *" copy instead of "const char *". */
++
++ int parse_args_ret_code = freecell_solver_user_cmd_line_parse_args(
++ solver_instance,
++ get_cmd_line_arg_count() ,
++ get_cmd_line_args(),
++ 0,
++ known_parameters,
++ NULL,
++ NULL,
++ &error_string,
++ &error_arg
++ );
++
++ Q_ASSERT(!parse_args_ret_code);
++ }
++
++ /* Not needed for Simple Simon because it's already specified in
++ * freecell_solver_cmd_line_args. TODO : abstract .
++ *
++ * Shlomi Fish
++ * */
++ setFcSolverGameParams();
++
++ current_iters_count = CHUNKSIZE;
++ freecell_solver_user_limit_iterations(solver_instance, current_iters_count);
++ }
++
++ if (solver_instance)
++ {
++ bool continue_loop = true;
++ while (continue_loop &&
++ ( (solver_ret == FCS_STATE_NOT_BEGAN_YET)
++ || (solver_ret == FCS_STATE_SUSPEND_PROCESS))
++ &&
++ (current_iters_count < MAX_ITERS_LIMIT)
++ )
++ {
++ current_iters_count += CHUNKSIZE;
++ freecell_solver_user_limit_iterations(solver_instance, current_iters_count);
++
++ if (solver_ret == FCS_STATE_NOT_BEGAN_YET)
++ {
++ solver_ret =
++ freecell_solver_user_solve_board(
++ solver_instance,
++ board_as_string
++ );
++ }
++ else
++ {
++ solver_ret = freecell_solver_user_resume_solution(solver_instance);
++ }
++ {
++ // QMutexLocker lock( &endMutex );
++ if ( m_shouldEnd )
++ {
++ continue_loop = false;
++ }
++ }
++ }
++ }
++
++ switch (solver_ret)
++ {
++ case FCS_STATE_IS_NOT_SOLVEABLE:
++ if (solver_instance)
++ {
++ freecell_solver_user_free(solver_instance);
++ solver_instance = NULL;
++ }
++ return Solver::NoSolutionExists;
++
++ case FCS_STATE_WAS_SOLVED:
++ {
++ if (solver_instance)
++ {
++ m_winMoves.clear();
++ while (freecell_solver_user_get_moves_left(solver_instance))
++ {
++ fcs_move_t move;
++ MOVE new_move;
++ const int verdict = !freecell_solver_user_get_next_move(
++ solver_instance, &move)
++ ;
++
++ Q_ASSERT (verdict);
++
++ new_move.fcs = move;
++
++ m_winMoves.append( new_move );
++ }
++
++ freecell_solver_user_free(solver_instance);
++ solver_instance = NULL;
++ }
++ return Solver::SolutionExists;
++ }
++
++ case FCS_STATE_SUSPEND_PROCESS:
++ return Solver::UnableToDetermineSolvability;
++
++ default:
++ if (solver_instance)
++ {
++ freecell_solver_user_free(solver_instance);
++ solver_instance = NULL;
++ }
++ return Solver::NoSolutionExists;
++ }
++}
++
++/* Get the possible moves from a position, and store them in Possible[]. */
++
++int FcSolveSolver::get_possible_moves(int *, int *)
++{
++ return 0;
++}
++
++bool FcSolveSolver::isWon()
++{
++ return true;
++}
++
++int FcSolveSolver::getOuts()
++{
++ return 0;
++}
++
++FcSolveSolver::FcSolveSolver()
++ : Solver()
++ , solver_instance(NULL)
++ , solver_ret(FCS_STATE_NOT_BEGAN_YET)
++ , board_as_string("")
++{
++}
++
++unsigned int FcSolveSolver::getClusterNumber()
++{
++ return 0;
++}
++
++void FcSolveSolver::print_layout()
++{
++#if 0
++ int i, w, o;
++
++ fprintf(stderr, "print-layout-begin\n");
++ for (w = 0; w < 10; ++w) {
++ Q_ASSERT( Wp[w] == &W[w][Wlen[w]-1] );
++ fprintf( stderr, "Play%d: ", w );
++ for (i = 0; i < Wlen[w]; ++i) {
++ printcard(W[w][i], stderr);
++ }
++ fputc('\n', stderr);
++ }
++ fprintf( stderr, "Off: " );
++ for (o = 0; o < 4; ++o) {
++ if ( O[o] != -1 )
++ printcard( O[o] + PS_KING, stderr);
++ }
++ fprintf(stderr, "\nprint-layout-end\n");
++#endif
++}
++
++void FcSolveSolver::unpack_cluster( unsigned int)
++{
++ return;
++}
++
++FcSolveSolver::~FcSolveSolver()
++{
++ if (solver_instance)
++ {
++ freecell_solver_user_free(solver_instance);
++ solver_instance = NULL;
++ }
++}
++
+diff --git a/patsolve/abstract_fc_solve_solver.h b/patsolve/abstract_fc_solve_solver.h
+new file mode 100644
+index 0000000..d2d072d
+--- /dev/null
++++ b/patsolve/abstract_fc_solve_solver.h
+@@ -0,0 +1,52 @@
++/*
++ * Copyright (C) 2006-2009 Stephan Kulow <coolo@kde.org>
++ *
++ * This program is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU General Public License as
++ * published by the Free Software Foundation; either version 2 of
++ * the License, or (at your option) any later version.
++ *
++ * This program is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++ * GNU General Public License for more details.
++ *
++ * You should have received a copy of the GNU General Public License
++ * along with this program. If not, see <http://www.gnu.org/licenses/>.
++ */
++
++#ifndef ABSTRACT_FC_SOLVE_SOLVER_H
++#define ABSTRACT_FC_SOLVE_SOLVER_H
++
++#include "patsolve.h"
++
++struct FcSolveSolver : public Solver<10>
++{
++public:
++ FcSolveSolver();
++ virtual ~FcSolveSolver();
++ virtual int get_possible_moves(int *a, int *numout);
++ virtual bool isWon();
++ virtual void make_move(MOVE *m);
++ virtual void undo_move(MOVE *m);
++ virtual int getOuts();
++ virtual unsigned int getClusterNumber();
++ virtual void translate_layout() = 0;
++ virtual void unpack_cluster( unsigned int k );
++ virtual MoveHint translateMove(const MOVE &m) = 0;
++ virtual SolverInterface::ExitStatus patsolve( int _max_positions = -1);
++ virtual void setFcSolverGameParams() = 0;
++
++ virtual void print_layout();
++
++ virtual int get_cmd_line_arg_count() = 0;
++ virtual const char * * get_cmd_line_args() = 0;
++/* Names of the cards. The ordering is defined in pat.h. */
++
++ void * solver_instance;
++ int solver_ret;
++ // More than enough space for two decks.
++ char board_as_string[4 * 13 * 2 * 4 * 3];
++};
++
++#endif // ABSTRACT_FC_SOLVE_SOLVER_H
+diff --git a/patsolve/freecellsolver.cpp b/patsolve/freecellsolver.cpp
+index 39eff50..e92000f 100644
+--- a/patsolve/freecellsolver.cpp
++++ b/patsolve/freecellsolver.cpp
+@@ -16,12 +16,18 @@
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
++#include <stdlib.h>
++#include <string.h>
++
++#include "freecell-solver/fcs_user.h"
++#include "freecell-solver/fcs_cl.h"
++
+ #include "freecellsolver.h"
+
+ #include "../freecell.h"
+
+-
+-/* Some macros used in get_possible_moves(). */
++const int CHUNKSIZE = 100;
++const long int MAX_ITERS_LIMIT = 200000;
+
+ /* The following function implements
+ (Same_suit ? (suit(a) == suit(b)) : (color(a) != color(b)))
+@@ -32,10 +38,13 @@ namespace {
+
+ /* Statistics. */
+
++#if 0
+ int FreecellSolver::Xparam[] = { 4, 1, 8, -1, 7, 11, 4, 2, 2, 1, 2 };
++#endif
+
+ /* These two routines make and unmake moves. */
+
++#if 0
+ void FreecellSolver::make_move(MOVE *m)
+ {
+ int from, to;
+@@ -85,7 +94,9 @@ void FreecellSolver::undo_move(MOVE *m)
+ Wlen[from]++;
+ hashpile(from);
+ }
++#endif
+
++#if 0
+ /* Move prioritization. Given legal, pruned moves, there are still some
+ that are a waste of time, especially in the endgame where there are lots of
+ possible moves, but few productive ones. Note that we also prioritize
+@@ -178,9 +189,11 @@ void FreecellSolver::prioritize(MOVE *mp0, int n)
+ }
+ }
+ }
++#endif
+
+ /* Automove logic. Freecell games must avoid certain types of automoves. */
+
++#if 0
+ int FreecellSolver::good_automove(int o, int r)
+ {
+ int i;
+@@ -220,148 +233,43 @@ int FreecellSolver::good_automove(int o, int r)
+
+ return true;
+ }
++#endif
+
+-/* Get the possible moves from a position, and store them in Possible[]. */
++#define CMD_LINE_ARGS_NUM 2
+
+-int FreecellSolver::get_possible_moves(int *a, int *numout)
++static const char * freecell_solver_cmd_line_args[CMD_LINE_ARGS_NUM] =
+ {
+- int i, n, t, w, o, empty, emptyw;
+- card_t card;
+- MOVE *mp;
+-
+- /* Check for moves from W to O. */
+-
+- n = 0;
+- mp = Possible;
+- for (w = 0; w < Nwpiles + Ntpiles; ++w) {
+- if (Wlen[w] > 0) {
+- card = *Wp[w];
+- o = SUIT(card);
+- empty = (O[o] == NONE);
+- if ((empty && (RANK(card) == PS_ACE)) ||
+- (!empty && (RANK(card) == O[o] + 1))) {
+- mp->card_index = 0;
+- mp->from = w;
+- mp->to = o;
+- mp->totype = O_Type;
+- mp->turn_index = -1;
+- mp->pri = 0; /* unused */
+- n++;
+- mp++;
+-
+- /* If it's an automove, just do it. */
+-
+- if (good_automove(o, RANK(card))) {
+- *a = true;
+- mp[-1].pri = 127;
+- if (n != 1) {
+- Possible[0] = mp[-1];
+- return 1;
+- }
+- return n;
+- }
+- }
+- }
+- }
+-
+- /* No more automoves, but remember if there were any moves out. */
+-
+- *a = false;
+- *numout = n;
+-
+- /* Check for moves from non-singleton W cells to one of any
+- empty W cells. */
++ "--load-config", "video-editing"
++};
+
+- emptyw = -1;
+- for (w = 0; w < Nwpiles; ++w) {
+- if (Wlen[w] == 0) {
+- emptyw = w;
+- break;
+- }
+- }
+- if (emptyw >= 0) {
+- for (i = 0; i < Nwpiles + Ntpiles; ++i) {
+- if (i == emptyw || Wlen[i] == 0) {
+- continue;
+- }
+- bool allowed = false;
+- if ( i < Nwpiles)
+- allowed = true;
+- if ( i >= Nwpiles )
+- allowed = true;
+- if ( allowed ) {
+- card = *Wp[i];
+- mp->card_index = 0;
+- mp->from = i;
+- mp->to = emptyw;
+- mp->totype = W_Type;
+- mp->turn_index = -1;
+- if ( i >= Nwpiles )
+- mp->pri = Xparam[6];
+- else
+- mp->pri = Xparam[3];
+- n++;
+- mp++;
+- }
+- }
+- }
+-
+- /* Check for moves from W to non-empty W cells. */
+-
+- for (i = 0; i < Nwpiles + Ntpiles; ++i) {
+- if (Wlen[i] > 0) {
+- card = *Wp[i];
+- for (w = 0; w < Nwpiles; ++w) {
+- if (i == w) {
+- continue;
+- }
+- if (Wlen[w] > 0 &&
+- (RANK(card) == RANK(*Wp[w]) - 1 &&
+- suitable(card, *Wp[w]))) {
+- mp->card_index = 0;
+- mp->from = i;
+- mp->to = w;
+- mp->totype = W_Type;
+- mp->turn_index = -1;
+- if ( i >= Nwpiles )
+- mp->pri = Xparam[5];
+- else
+- mp->pri = Xparam[4];
+- n++;
+- mp++;
+- }
+- }
+- }
+- }
+-
+- /* Check for moves from W to one of any empty T cells. */
+-
+- for (t = 0; t < Ntpiles; ++t) {
+- if (!Wlen[t+Nwpiles]) {
+- break;
+- }
+- }
++int FreecellSolver::get_cmd_line_arg_count()
++{
++ return CMD_LINE_ARGS_NUM;
++}
+
+- if (t < Ntpiles) {
+- for (w = 0; w < Nwpiles; ++w) {
+- if (Wlen[w] > 0) {
+- card = *Wp[w];
+- mp->card_index = 0;
+- mp->from = w;
+- mp->turn_index = -1;
+- mp->to = t+Nwpiles;
+- mp->totype = W_Type;
+- mp->pri = Xparam[7];
+- n++;
+- mp++;
+- }
+- }
+- }
++const char * * FreecellSolver::get_cmd_line_args()
++{
++ return freecell_solver_cmd_line_args;
++}
+
+
+- return n;
++void FreecellSolver::setFcSolverGameParams()
++{
++ /*
++ * I'm using the more standard interface instead of the depracated
++ * user_set_game one. I'd like that each function will have its
++ * own dedicated purpose.
++ *
++ * Shlomi Fish
++ * */
++ freecell_solver_user_set_num_freecells(solver_instance,4);
++ freecell_solver_user_set_num_stacks(solver_instance,8);
++ freecell_solver_user_set_num_decks(solver_instance,1);
++ freecell_solver_user_set_sequences_are_built_by_type(solver_instance, FCS_SEQ_BUILT_BY_ALTERNATE_COLOR);
++ freecell_solver_user_set_sequence_move(solver_instance, 0);
++ freecell_solver_user_set_empty_stacks_filled_by(solver_instance, FCS_ES_FILLED_BY_ANY_CARD);
+ }
+-
++#if 0
+ void FreecellSolver::unpack_cluster( unsigned int k )
+ {
+ /* Get the Out cells from the cluster number. */
+@@ -373,27 +281,13 @@ void FreecellSolver::unpack_cluster( unsigned int k )
+ k >>= 4;
+ O[3] = k & 0xF;
+ }
++#endif
+
+-bool FreecellSolver::isWon()
+-{
+- // maybe won?
+- for (int o = 0; o < 4; ++o) {
+- if (O[o] != PS_KING) {
+- return false;
+- }
+- }
+-
+- return true;
+-}
+-
+-int FreecellSolver::getOuts()
+-{
+- return O[0] + O[1] + O[2] + O[3];
+-}
+
+ FreecellSolver::FreecellSolver(const Freecell *dealer)
+- : Solver()
++ : FcSolveSolver()
+ {
++#if 0
+ Osuit[0] = PS_DIAMOND;
+ Osuit[1] = PS_CLUB;
+ Osuit[2] = PS_HEART;
+@@ -402,12 +296,15 @@ FreecellSolver::FreecellSolver(const Freecell *dealer)
+ Nwpiles = 8;
+ Ntpiles = 4;
+
++#endif
++
+ deal = dealer;
+ }
+
+ /* Read a layout file. Format is one pile per line, bottom to top (visible
+ card). Temp cells and Out on the last two lines, if any. */
+
++#if 0
+ void FreecellSolver::translate_layout()
+ {
+ /* Read the workspace. */
+@@ -447,9 +344,78 @@ void FreecellSolver::translate_layout()
+ }
+ }
+ }
++#endif
+
+ MoveHint FreecellSolver::translateMove( const MOVE &m )
+ {
++ fcs_move_t move = m.fcs;
++ int cards = fcs_move_get_num_cards_in_seq(move);
++ PatPile *from = 0;
++ PatPile *to = 0;
++
++ switch(fcs_move_get_type(move))
++ {
++ case FCS_MOVE_TYPE_STACK_TO_STACK:
++ from = deal->store[fcs_move_get_src_stack(move)];
++ to = deal->store[fcs_move_get_dest_stack(move)];
++ break;
++
++ case FCS_MOVE_TYPE_FREECELL_TO_STACK:
++ from = deal->freecell[fcs_move_get_src_freecell(move)];
++ to = deal->store[fcs_move_get_dest_stack(move)];
++ cards = 1;
++ break;
++
++ case FCS_MOVE_TYPE_FREECELL_TO_FREECELL:
++ from = deal->freecell[fcs_move_get_src_freecell(move)];
++ to = deal->freecell[fcs_move_get_dest_freecell(move)];
++ cards = 1;
++ break;
++
++ case FCS_MOVE_TYPE_STACK_TO_FREECELL:
++ from = deal->store[fcs_move_get_src_stack(move)];
++ to = deal->freecell[fcs_move_get_dest_freecell(move)];
++ cards = 1;
++ break;
++
++ case FCS_MOVE_TYPE_STACK_TO_FOUNDATION:
++ from = deal->store[fcs_move_get_src_stack(move)];
++ cards = 1;
++ to = 0;
++ break;
++
++ case FCS_MOVE_TYPE_FREECELL_TO_FOUNDATION:
++ from = deal->freecell[fcs_move_get_src_freecell(move)];
++ cards = 1;
++ to = 0;
++ }
++ Q_ASSERT(from);
++ Q_ASSERT(cards <= from->cards().count());
++ Q_ASSERT(to || cards == 1);
++ KCard *card = from->cards()[from->cards().count() - cards];
++
++ if (!to)
++ {
++ PatPile *target = 0;
++ PatPile *empty = 0;
++ for (int i = 0; i < 4; ++i) {
++ KCard *c = deal->target[i]->topCard();
++ if (c) {
++ if ( c->suit() == card->suit() )
++ {
++ target = deal->target[i];
++ break;
++ }
++ } else if ( !empty )
++ empty = deal->target[i];
++ }
++ to = target ? target : empty;
++ }
++ Q_ASSERT(to);
++
++ return MoveHint(card, to, 0);
++
++#if 0
+ // this is tricky as we need to want to build the "meta moves"
+
+ PatPile *frompile = nullptr;
+@@ -486,8 +452,43 @@ MoveHint FreecellSolver::translateMove( const MOVE &m )
+
+ return MoveHint( card, target, m.pri );
+ }
++#endif
+ }
+
++void FreecellSolver::translate_layout()
++{
++ strcpy(board_as_string, deal->solverFormat().toLatin1());
++
++ if (solver_instance)
++ {
++ freecell_solver_user_recycle(solver_instance);
++ solver_ret = FCS_STATE_NOT_BEGAN_YET;
++ }
++#if 0
++ /* Read the workspace. */
++ int total = 0;
++
++ for ( int w = 0; w < 10; ++w ) {
++ int i = translate_pile(deal->store[w], W[w], 52);
++ Wp[w] = &W[w][i - 1];
++ Wlen[w] = i;
++ total += i;
++ }
++
++ for (int i = 0; i < 4; ++i) {
++ O[i] = -1;
++ KCard *c = deal->target[i]->top();
++ if (c) {
++ total += 13;
++ O[i] = translateSuit( c->suit() );
++ }
++ }
++#endif
++}
++
++
++
++#if 0
+ unsigned int FreecellSolver::getClusterNumber()
+ {
+ int i = O[0] + (O[1] << 4);
+@@ -496,7 +497,9 @@ unsigned int FreecellSolver::getClusterNumber()
+ k |= i << 8;
+ return k;
+ }
++#endif
+
++#if 0
+ void FreecellSolver::print_layout()
+ {
+ int i, t, w, o;
+@@ -519,3 +522,4 @@ void FreecellSolver::print_layout()
+ }
+ fprintf(stderr, "\nprint-layout-end\n");
+ }
++#endif
+diff --git a/patsolve/freecellsolver.h b/patsolve/freecellsolver.h
+index 45ca063..99d1dbb 100644
+--- a/patsolve/freecellsolver.h
++++ b/patsolve/freecellsolver.h
+@@ -19,16 +19,17 @@
+ #ifndef FREECELLSOLVER_H
+ #define FREECELLSOLVER_H
+
+-class Freecell;
+-#include "patsolve.h"
++#include "abstract_fc_solve_solver.h"
+
+ constexpr auto Nwpiles = 8;
+ constexpr auto Ntpiles = 4;
++class Freecell;
+
+-class FreecellSolver : public Solver<Nwpiles + Ntpiles>
++class FreecellSolver : public FcSolveSolver
+ {
+ public:
+ explicit FreecellSolver(const Freecell *dealer);
++#if 0
+ int good_automove(int o, int r);
+ int get_possible_moves(int *a, int *numout) Q_DECL_OVERRIDE;
+ bool isWon() Q_DECL_OVERRIDE;
+@@ -40,8 +41,17 @@ public:
+ void translate_layout() Q_DECL_OVERRIDE;
+ void unpack_cluster( unsigned int k ) Q_DECL_OVERRIDE;
+ MoveHint translateMove(const MOVE &m) Q_DECL_OVERRIDE;
+-
+- void print_layout() Q_DECL_OVERRIDE;
++#endif
++ virtual void translate_layout();
++#if 0
++ virtual void unpack_cluster( unsigned int k );
++#endif
++ virtual MoveHint translateMove(const MOVE &m);
++ virtual void setFcSolverGameParams();
++ virtual int get_cmd_line_arg_count();
++ virtual const char * * get_cmd_line_args();
++#if 0
++ virtual void print_layout();
+
+ int Nwpiles; /* the numbers we're actually using */
+ int Ntpiles;
+@@ -51,10 +61,11 @@ public:
+ card_t O[4]; /* output piles store only the rank or NONE */
+ card_t Osuit[4];
+
+- const Freecell *deal;
+
+ static int Xparam[];
++#endif
+
++ const Freecell *deal;
+ };
+
+ #endif // FREECELLSOLVER_H
+diff --git a/patsolve/patsolve.h b/patsolve/patsolve.h
+index 03285d4..1c3a7c6 100644
+--- a/patsolve/patsolve.h
++++ b/patsolve/patsolve.h
+@@ -33,6 +33,10 @@
+
+ #include <cstdio>
+
++/* A card is represented as ( down << 6 ) + (suit << 4) + rank. */
++
++typedef quint8 card_t;
++
+ struct POSITION {
+ POSITION *queue; /* next position in the queue */
+ POSITION *parent; /* point back up the move stack */
+@@ -48,14 +52,15 @@ class MemoryManager;
+ template<size_t NumberPiles>
+ class Solver : public SolverInterface
+ {
++
+ public:
+
+ Solver();
+ virtual ~Solver();
+- ExitStatus patsolve( int max_positions = -1) final;
++ virtual ExitStatus patsolve( int max_positions = -1);
++ bool recursive(POSITION *pos = nullptr);
+ virtual void translate_layout() = 0;
+ virtual MoveHint translateMove(const MOVE &m ) = 0;
+-
+ void stopExecution() final;
+ QList<MOVE> firstMoves() const final;
+ QList<MOVE> winMoves() const final;
+@@ -126,8 +131,7 @@ protected:
+ POSITION *Stack = nullptr;
+ QMap<qint32,bool> recu_pos;
+ int max_positions;
+-
+-private:
++protected:
+ QList<MOVE> m_firstMoves;
+ QList<MOVE> m_winMoves;
+ std::atomic_bool m_shouldEnd;
+diff --git a/patsolve/simonsolver.cpp b/patsolve/simonsolver.cpp
+index a9d640c..e75dcaa 100644
+--- a/patsolve/simonsolver.cpp
++++ b/patsolve/simonsolver.cpp
+@@ -15,17 +15,26 @@
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
++#include <stdlib.h>
++#include <string.h>
++
++#include "freecell-solver/fcs_user.h"
++#include "freecell-solver/fcs_cl.h"
++
+ #include "simonsolver.h"
+
+ #include "../simon.h"
+
+ #include <QDebug>
+
++const int CHUNKSIZE = 100;
++const long int MAX_ITERS_LIMIT = 200000;
+
+ #define PRINT 0
+
+ /* These two routines make and unmake moves. */
+
++#if 0
+ void SimonSolver::make_move(MOVE *m)
+ {
+ #if PRINT
+@@ -136,13 +145,62 @@ void SimonSolver::undo_move(MOVE *m)
+ print_layout();
+ #endif
+ }
++#endif
++
++#define CMD_LINE_ARGS_NUM 4
++static const char * freecell_solver_cmd_line_args[CMD_LINE_ARGS_NUM] =
++{
++ "-g", "simple_simon", "--load-config", "the-last-mohican"
++};
++
++int SimonSolver::get_cmd_line_arg_count()
++{
++ return CMD_LINE_ARGS_NUM;
++}
++
++const char * * SimonSolver::get_cmd_line_args()
++{
++ return freecell_solver_cmd_line_args;
++}
++
++void SimonSolver::setFcSolverGameParams()
++{
++ freecell_solver_user_apply_preset(solver_instance, "simple_simon");
++}
+
++#if 0
+ /* Get the possible moves from a position, and store them in Possible[]. */
+
+ int SimonSolver::get_possible_moves(int *a, int *numout)
+ {
+ MOVE *mp;
++ int n;
++
++ mp = Possible;
++ n = 0;
++ *a = 1;
++
++ while (freecell_solver_user_get_moves_left(solver_instance))
++ {
++ fcs_move_t move;
++ fcs_move_t * move_ptr;
++ if (!freecell_solver_user_get_next_move(solver_instance, &move)) {
++ move_ptr = new fcs_move_t;
++ *move_ptr = move;
++ mp->ptr = (void *)move_ptr;
++ mp++;
++ n++;
++ }
++ else
++ {
++ Q_ASSERT(0);
++ }
++ }
++
++ *numout = n;
++ return n;
+
++#if 0
+ /* Check for moves from W to O. */
+
+ int n = 0;
+@@ -301,8 +359,11 @@ int SimonSolver::get_possible_moves(int *a, int *numout)
+ }
+
+ return n;
++#endif
+ }
++#endif
+
++#if 0
+ void SimonSolver::unpack_cluster( unsigned int k )
+ {
+ // TODO: this only works for easy
+@@ -314,7 +375,9 @@ void SimonSolver::unpack_cluster( unsigned int k )
+ O[i] = -1;
+ }
+ }
++#endif
+
++#if 0
+ bool SimonSolver::isWon()
+ {
+ // maybe won?
+@@ -324,7 +387,9 @@ bool SimonSolver::isWon()
+
+ return true;
+ }
++#endif
+
++#if 0
+ int SimonSolver::getOuts()
+ {
+ int k = 0;
+@@ -334,9 +399,10 @@ int SimonSolver::getOuts()
+
+ return k;
+ }
++#endif
+
+ SimonSolver::SimonSolver(const Simon *dealer)
+- : Solver()
++ : FcSolveSolver()
+ {
+ deal = dealer;
+ }
+@@ -346,6 +412,14 @@ card). Temp cells and Out on the last two lines, if any. */
+
+ void SimonSolver::translate_layout()
+ {
++ strcpy(board_as_string, deal->solverFormat().toLatin1());
++
++ if (solver_instance)
++ {
++ freecell_solver_user_recycle(solver_instance);
++ solver_ret = FCS_STATE_NOT_BEGAN_YET;
++ }
++#if 0
+ /* Read the workspace. */
+ int total = 0;
+
+@@ -364,8 +438,10 @@ void SimonSolver::translate_layout()
+ O[i] = translateSuit( c->suit() );
+ }
+ }
++#endif
+ }
+
++#if 0
+ unsigned int SimonSolver::getClusterNumber()
+ {
+ unsigned int k = 0;
+@@ -376,7 +452,9 @@ unsigned int SimonSolver::getClusterNumber()
+ }
+ return k;
+ }
++#endif
+
++#if 0
+ void SimonSolver::print_layout()
+ {
+ int i, w, o;
+@@ -397,9 +475,57 @@ void SimonSolver::print_layout()
+ }
+ fprintf(stderr, "\nprint-layout-end\n");
+ }
++#endif
+
+ MoveHint SimonSolver::translateMove( const MOVE &m )
+ {
++ fcs_move_t move = m.fcs;
++ int cards = fcs_move_get_num_cards_in_seq(move);
++ PatPile *from = 0;
++ PatPile *to = 0;
++
++ switch(fcs_move_get_type(move))
++ {
++ case FCS_MOVE_TYPE_STACK_TO_STACK:
++ from = deal->store[fcs_move_get_src_stack(move)];
++ to = deal->store[fcs_move_get_dest_stack(move)];
++ break;
++
++ case FCS_MOVE_TYPE_SEQ_TO_FOUNDATION:
++ from = deal->store[fcs_move_get_src_stack(move)];
++ cards = 13;
++ to = deal->target[fcs_move_get_foundation(move)];
++ break;
++
++ }
++ Q_ASSERT(from);
++ Q_ASSERT(cards <= from->cards().count());
++ Q_ASSERT(to || cards == 1);
++ KCard *card = from->cards()[from->cards().count() - cards];
++
++ if (!to)
++ {
++ PatPile *target = 0;
++ PatPile *empty = 0;
++ for (int i = 0; i < 4; ++i) {
++ KCard *c = deal->target[i]->topCard();
++ if (c) {
++ if ( c->suit() == card->suit() )
++ {
++ target = deal->target[i];
++ break;
++ }
++ } else if ( !empty )
++ empty = deal->target[i];
++ }
++ to = target ? target : empty;
++ }
++
++ Q_ASSERT(to);
++
++ return MoveHint(card, to, 0);
++
++#if 0
+ Q_ASSERT( m.from < 10 && m.to < 10 );
+
+ PatPile *frompile = deal->store[m.from];
+@@ -414,4 +540,5 @@ MoveHint SimonSolver::translateMove( const MOVE &m )
+
+ Q_ASSERT( m.to < 10 );
+ return MoveHint( card, deal->store[m.to], m.pri );
++#endif
+ }
+diff --git a/patsolve/simonsolver.h b/patsolve/simonsolver.h
+index 2d57dda..4a417b1 100644
+--- a/patsolve/simonsolver.h
++++ b/patsolve/simonsolver.h
+@@ -18,29 +18,37 @@
+ #ifndef SIMONSOLVER_H
+ #define SIMONSOLVER_H
+
+-#include "patsolve.h"
++#include "abstract_fc_solve_solver.h"
++#include "simon.h"
+ class Simon;
+
+
+-class SimonSolver : public Solver<10>
++class SimonSolver : public FcSolveSolver
+ {
+ public:
+ explicit SimonSolver(const Simon *dealer);
++#if 0
+ int get_possible_moves(int *a, int *numout) Q_DECL_OVERRIDE;
+ bool isWon() Q_DECL_OVERRIDE;
+ void make_move(MOVE *m) Q_DECL_OVERRIDE;
+ void undo_move(MOVE *m) Q_DECL_OVERRIDE;
+ int getOuts() Q_DECL_OVERRIDE;
+ unsigned int getClusterNumber() Q_DECL_OVERRIDE;
+- void translate_layout() Q_DECL_OVERRIDE;
++#endif
++ virtual void translate_layout() Q_DECL_OVERRIDE;
++ virtual MoveHint translateMove(const MOVE &m) Q_DECL_OVERRIDE;
++#if 0
+ void unpack_cluster( unsigned int k ) Q_DECL_OVERRIDE;
+- MoveHint translateMove(const MOVE &m) Q_DECL_OVERRIDE;
+-
+ void print_layout() Q_DECL_OVERRIDE;
++#endif
++ virtual void setFcSolverGameParams();
+
++ virtual int get_cmd_line_arg_count();
++ virtual const char * * get_cmd_line_args();
++#if 0
+ /* Names of the cards. The ordering is defined in pat.h. */
+-
+ int O[4];
++#endif
+ const Simon *deal;
+ };
+
+diff --git a/patsolve/solverinterface.h b/patsolve/solverinterface.h
+index d99d3b8..77fd410 100644
+--- a/patsolve/solverinterface.h
++++ b/patsolve/solverinterface.h
+@@ -4,6 +4,7 @@
+ #include <QList>
+
+ #include "../hint.h"
++#include "freecell-solver/fcs_user.h"
+
+
+ /* A card is represented as ( down << 6 ) + (suit << 4) + rank. */
+@@ -22,6 +23,7 @@ public:
+ PileType totype;
+ signed char pri; /* move priority (low priority == low value) */
+ int turn_index; /* turn the card index */
++ fcs_move_t fcs; /* A Freecell Solver move. */
+
+ bool operator<( const MOVE &m) const
+ {
+diff --git a/pileutils.cpp b/pileutils.cpp
+index 1e3da3e..609c716 100644
+--- a/pileutils.cpp
++++ b/pileutils.cpp
+@@ -48,6 +48,33 @@ bool isSameSuitAscending( const QList<KCard*> & cards )
+ return true;
+ }
+
++int countSameSuitDescendingSequences( const QList<KCard*> & cards )
++{
++ if ( cards.size() <= 1 )
++ return 0;
++
++ int suit = cards.first()->suit();
++ int lastRank = cards.first()->rank();
++
++ int count = 1;
++
++ for( int i = 1; i < cards.size(); ++i )
++ {
++ --lastRank;
++
++ if ( cards[i]->rank() != lastRank )
++ return -1;
++
++ if ( cards[i]->suit() != suit )
++ {
++ count++;
++ suit = cards[i]->suit();
++ }
++ }
++ return count;
++}
++
++
+
+ bool isSameSuitDescending( const QList<KCard*> & cards )
+ {
+@@ -121,3 +148,37 @@ bool checkAddAlternateColorDescendingFromKing( const QList<KCard*> & oldCards, c
+ && newCards.first()->rank() == oldCards.last()->rank() - 1;
+ }
+
++QString suitToString(int s) {
++ switch (s) {
++ case KCardDeck::Clubs:
++ return "C";
++ case KCardDeck::Hearts:
++ return "H";
++ case KCardDeck::Diamonds:
++ return "D";
++ case KCardDeck::Spades:
++ return "S";
++ default:
++ exit(-1);
++ }
++ return QString();
++}
++
++QString rankToString(int r)
++{
++ switch (r) {
++ case KCardDeck::King:
++ return "K";
++ case KCardDeck::Ace:
++ return "A";
++ case KCardDeck::Jack:
++ return "J";
++ case KCardDeck::Queen:
++ return "Q";
++ case KCardDeck::Ten:
++ return "T";
++ default:
++ return QString::number(r);
++ }
++}
++
+diff --git a/pileutils.h b/pileutils.h
+index 2fa1657..faa8c40 100644
+--- a/pileutils.h
++++ b/pileutils.h
+@@ -26,9 +26,13 @@ class KCard;
+ bool isSameSuitAscending( const QList<KCard*> & cards );
+ bool isSameSuitDescending( const QList<KCard*> & cards );
+ bool isAlternateColorDescending( const QList<KCard*> & cards );
++int countSameSuitDescendingSequences( const QList<KCard*> & cards );
+
+ bool checkAddSameSuitAscendingFromAce( const QList<KCard*> & oldCards, const QList<KCard*> & newCards );
+ bool checkAddAlternateColorDescending( const QList<KCard*> & oldCards, const QList<KCard*> & newCards );
+ bool checkAddAlternateColorDescendingFromKing( const QList<KCard*> & oldCards, const QList<KCard*> & newCards );
+
++extern QString suitToString(int s);
++extern QString rankToString(int r);
++
+ #endif
+diff --git a/simon.cpp b/simon.cpp
+index 8e3ef10..834dd55 100644
+--- a/simon.cpp
++++ b/simon.cpp
+@@ -111,24 +111,70 @@ bool Simon::checkAdd(const PatPile * pile, const QList<KCard*> & oldCards, const
+ {
+ if (pile->pileRole() == PatPile::Tableau)
+ {
+- return oldCards.isEmpty()
+- || oldCards.last()->rank() == newCards.first()->rank() + 1;
++ if (! (oldCards.isEmpty()
++ || oldCards.last()->rank() == newCards.first()->rank() + 1 ))
++ {
++ return false;
++ }
++
++ int seqs_count = countSameSuitDescendingSequences(newCards);
++
++ if (seqs_count < 0)
++ return false;
++
++ // This is similar to the supermoves of Freecell - we can use empty
++ // columns to temporarily hold intermediate sub-sequences which are
++ // not the same suit - only a "false" parent.
++ // Shlomi Fish
++
++ int empty_piles_count = 0;
++
++ for (int i = 0; i < 10; ++i )
++ if (store[i]->isEmpty() && ( store[i]->index() != pile->index() ))
++ empty_piles_count++;
++
++ return (seqs_count <= (1 << empty_piles_count));
+ }
+ else
+ {
+ return oldCards.isEmpty()
+ && newCards.first()->rank() == KCardDeck::King
+- && newCards.last()->rank() == KCardDeck::Ace;
++ && newCards.last()->rank() == KCardDeck::Ace
++ && isSameSuitDescending(newCards);
+ }
+ }
+
+ bool Simon::checkRemove(const PatPile * pile, const QList<KCard*> & cards) const
+ {
+- return pile->pileRole() == PatPile::Tableau
+- && isSameSuitDescending(cards);
++ if (pile->pileRole() != PatPile::Tableau)
++ return false;
++
++ int seqs_count = countSameSuitDescendingSequences(cards);
++
++ return (seqs_count >= 0);
+ }
+
++QString Simon::solverFormat() const
++{
++ QString output;
++ QString tmp;
++ for (int i = 0; i < 4 ; i++) {
++ if (target[i]->isEmpty())
++ continue;
++ tmp += suitToString(target[i]->topCard()->suit()) + "-K ";
++ }
++ if (!tmp.isEmpty())
++ output += QString::fromLatin1("Foundations: %1\n").arg(tmp);
+
++ for (int i = 0; i < 10 ; i++)
++ {
++ QList<KCard*> cards = store[i]->cards();
++ for (QList<KCard*>::ConstIterator it = cards.begin(); it != cards.end(); ++it)
++ output += rankToString((*it)->rank()) + suitToString((*it)->suit()) + ' ';
++ output += '\n';
++ }
++ return output;
++}
+
+ static class SimonDealerInfo : public DealerInfo
+ {
+diff --git a/simon.h b/simon.h
+index 83d10ab..d816f27 100644
+--- a/simon.h
++++ b/simon.h
+@@ -57,6 +57,7 @@ private:
+ PatPile* store[10];
+ PatPile* target[4];
+
++ virtual QString solverFormat() const;
+ friend class SimonSolver;
+ };
+
+--
+cgit v0.11.2
+
diff --git a/kde/patch/krita.patch b/kde/patch/krita.patch
new file mode 100644
index 0000000..e1604ab
--- /dev/null
+++ b/kde/patch/krita.patch
@@ -0,0 +1,3 @@
+# Fix compilation of Krita against Qt 5.9:
+#cat $CWD/patch/krita/krita_qt59.patch | patch -p1 --verbose || { touch ${SLACK_KDE_BUILD_DIR}/${PKGNAME}.failed ; continue ; }
+
diff --git a/kde/patch/krita/krita_qt59.patch b/kde/patch/krita/krita_qt59.patch
new file mode 100644
index 0000000..f517995
--- /dev/null
+++ b/kde/patch/krita/krita_qt59.patch
@@ -0,0 +1,26 @@
+Source: https://github.com/KDE/krita/commit/2f59d0d1.patch
+
+From 2f59d0d1d91e3f79342c20d0df68aa9a51817e8d Mon Sep 17 00:00:00 2001
+From: Luca Beltrame <lbeltrame@kde.org>
+Date: Sat, 6 May 2017 16:00:21 +0200
+Subject: [PATCH] Drop QForeachContainer include and fix Qt 5.9 build
+
+It's not used anywhere.
+
+Acked by boud.
+---
+ libs/ui/KisResourceBundleManifest.cpp | 1 -
+ 1 file changed, 1 deletion(-)
+
+diff --git a/libs/ui/KisResourceBundleManifest.cpp b/libs/ui/KisResourceBundleManifest.cpp
+index e4f94ca788..83761657d8 100644
+--- a/libs/ui/KisResourceBundleManifest.cpp
++++ b/libs/ui/KisResourceBundleManifest.cpp
+@@ -22,7 +22,6 @@
+ #include <QDomElement>
+ #include <QDomNode>
+ #include <QDomNodeList>
+-#include <QForeachContainer>
+
+ #include <KoXmlNS.h>
+ #include <KoXmlReader.h>
diff --git a/kde/patch/ksudoku.patch b/kde/patch/ksudoku.patch
new file mode 100644
index 0000000..d379585
--- /dev/null
+++ b/kde/patch/ksudoku.patch
@@ -0,0 +1,4 @@
+# Qt5 apps accept qwindowtitle, not caption. KDEBUG 381087,
+# however ksudoku-17.04.x is still kdelibs4 based:
+#cat $CWD/patch/ksudoku/ksudoku_qwindowtitle.patch | patch -p1 --verbose || { touch ${SLACK_KDE_BUILD_DIR}/${PKGNAME}.failed ; continue ; }
+
diff --git a/kde/patch/ksudoku/ksudoku_qwindowtitle.patch b/kde/patch/ksudoku/ksudoku_qwindowtitle.patch
new file mode 100644
index 0000000..3417b34
--- /dev/null
+++ b/kde/patch/ksudoku/ksudoku_qwindowtitle.patch
@@ -0,0 +1,15 @@
+Qt5 .desktop files for apps accept qwindowtitle, not caption.
+However, the 17.04 branch of ksudoku is still kdelibs4 based, and the
+patch applied to KDE BUG 381087 broke the launch of ksudoku here:
+
+--- a/src/gui/org.kde.ksudoku.desktop 2017-06-13 02:44:11.000000000 +0200
++++ b/src/gui/org.kde.ksudoku.desktop 2017-07-15 11:58:32.027477614 +0200
+@@ -50,7 +50,7 @@
+ Name[x-test]=xxKSudokuxx
+ Name[zh_CN]=KSudoku
+ Name[zh_TW]=KSudoku
+-Exec=ksudoku %i -qwindowtitle %c
++Exec=ksudoku %i -caption %c
+ Icon=ksudoku
+ Type=Application
+ X-DocPath=ksudoku/index.html
diff --git a/kde/patch/ktexteditor.patch b/kde/patch/ktexteditor.patch
new file mode 100644
index 0000000..a4f0aad
--- /dev/null
+++ b/kde/patch/ktexteditor.patch
@@ -0,0 +1,3 @@
+# Fix indentation for some languages (e.g. Python) in Kate and KDevelop:
+#cat $CWD/patch/ktexteditor/ktexteditor_fix_indentation.patch | patch -p1 --verbose || { touch ${SLACK_KDE_BUILD_DIR}/${PKGNAME}.failed ; continue ; }
+
diff --git a/kde/patch/ktexteditor/ktexteditor_fix_indentation.patch b/kde/patch/ktexteditor/ktexteditor_fix_indentation.patch
new file mode 100644
index 0000000..fc5d9d9
--- /dev/null
+++ b/kde/patch/ktexteditor/ktexteditor_fix_indentation.patch
@@ -0,0 +1,32 @@
+From aeebeadb5f5955995c17de56cf83ba7166a132dd Mon Sep 17 00:00:00 2001
+From: Sven Brauch <mail@svenbrauch.de>
+Date: Mon, 16 Oct 2017 18:35:50 +0200
+Subject: fix some indenters from indenting on random characters
+
+If triggerCharacters was not set, toString() would return "undefined",
+making indenters trigger on u, n, d, e, f, i and n.
+
+Differential Revision: https://phabricator.kde.org/D8333
+---
+ src/script/kateindentscript.cpp | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/src/script/kateindentscript.cpp b/src/script/kateindentscript.cpp
+index 15ce387..380bd45 100644
+--- a/src/script/kateindentscript.cpp
++++ b/src/script/kateindentscript.cpp
+@@ -46,7 +46,10 @@ const QString &KateIndentScript::triggerCharacters()
+
+ m_triggerCharactersSet = true;
+
+- m_triggerCharacters = global(QStringLiteral("triggerCharacters")).toString();
++ auto triggerCharacters = global(QStringLiteral("triggerCharacters"));
++ if ( !triggerCharacters.isUndefined() ) {
++ m_triggerCharacters = triggerCharacters.toString();
++ }
+
+ //qCDebug(LOG_KTE) << "trigger chars: '" << m_triggerCharacters << "'";
+
+--
+cgit v0.11.2
+
diff --git a/kde/patch/kwin.patch b/kde/patch/kwin.patch
new file mode 100644
index 0000000..9f05f30
--- /dev/null
+++ b/kde/patch/kwin.patch
@@ -0,0 +1,11 @@
+# Trivial patch for testing the CK2 session controller interface
+# as a replacement for systemd-logind;
+#cat $CWD/patch/kwin/kwin_replace_logind_with_ck2.patch | patch -p1 --verbose || { touch ${SLACK_KDE_BUILD_DIR}/${PKGNAME}.failed ; continue ; }
+
+# Workaround Qt regression no longer delivering events for the root window.
+# Fixed in kwin 5.10.3.
+#cat $CWD/patch/kwin/kwin_qt59_rootwindow_events.patch | patch -p1 --verbose || { touch ${SLACK_KDE_BUILD_DIR}/${PKGNAME}.failed ; continue ; }
+
+# Fix compilation with cmake 3.10 (fixed in 5.12.0):
+#cat $CWD/patch/kwin/kwin_cmake310.patch | patch -p1 --verbose || { touch ${SLACK_KDE_BUILD_DIR}/${PKGNAME}.failed ; continue ; }
+
diff --git a/kde/patch/kwin/kwin_cmake310.patch b/kde/patch/kwin/kwin_cmake310.patch
new file mode 100644
index 0000000..5675ba5
--- /dev/null
+++ b/kde/patch/kwin/kwin_cmake310.patch
@@ -0,0 +1,52 @@
+Taken from:
+https://gitweb.gentoo.org/repo/gentoo.git/tree/kde-plasma/kwin/files/kwin-5.11.5-cmake-3.10.patch
+
+From cd544890ced4192d07467c89e23adbb62d8cea5c Mon Sep 17 00:00:00 2001
+From: Milian Wolff <mail@milianw.de>
+Date: Mon, 18 Dec 2017 11:40:35 +0100
+Subject: Fix build with CMake 3.10
+
+Looks like a classic false-positive, but this makes the compile
+pass for me without making the code harder to read:
+
+AutoMoc error
+-------------
+ "/ssd/milian/projects/kf5/src/kde/workspace/kwin/kcmkwin/kwinscripts/main.cpp"
+The file contains a K_PLUGIN_FACTORY macro, but does not include "main.moc"!
+Consider to
+ - add #include "main.moc"
+ - enable SKIP_AUTOMOC for this file
+
+So we just add the include and then get rid of the duplicate
+definition of the plugin factory and the problem is resolved.
+---
+ kcmkwin/kwinscripts/main.cpp | 2 ++
+ kcmkwin/kwinscripts/module.cpp | 2 --
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/kcmkwin/kwinscripts/main.cpp b/kcmkwin/kwinscripts/main.cpp
+index f5ee04b..baa5175 100644
+--- a/kcmkwin/kwinscripts/main.cpp
++++ b/kcmkwin/kwinscripts/main.cpp
+@@ -22,3 +22,5 @@
+
+ K_PLUGIN_FACTORY(KcmKWinScriptsFactory,
+ registerPlugin<Module>("kwin-scripts");)
++
++#include "main.moc"
+diff --git a/kcmkwin/kwinscripts/module.cpp b/kcmkwin/kwinscripts/module.cpp
+index a0d698e..ccf7d41 100644
+--- a/kcmkwin/kwinscripts/module.cpp
++++ b/kcmkwin/kwinscripts/module.cpp
+@@ -40,8 +40,6 @@
+
+ #include "version.h"
+
+-K_PLUGIN_FACTORY_DECLARATION(KcmKWinScriptsFactory)
+-
+ Module::Module(QWidget *parent, const QVariantList &args) :
+ KCModule(parent, args),
+ ui(new Ui::Module),
+--
+cgit v0.11.2
+
diff --git a/kde/patch/kwin/kwin_qt59_rootwindow_events.patch b/kde/patch/kwin/kwin_qt59_rootwindow_events.patch
new file mode 100644
index 0000000..178d081
--- /dev/null
+++ b/kde/patch/kwin/kwin_qt59_rootwindow_events.patch
@@ -0,0 +1,63 @@
+From a6dee74ee455d1da47dd5c9d55a84adbb5e1426a Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Martin=20Fl=C3=B6ser?= <mgraesslin@kde.org>
+Date: Sun, 18 Jun 2017 14:23:33 +0200
+Subject: Workaround Qt regression of no longer delivering events for the root
+ window
+
+Summary:
+With qtbase 2b34aefcf02f09253473b096eb4faffd3e62b5f4 we do no longer get
+events reported for the X11 root window. Our keyboard handling in effects
+like PresentWindows and DesktopGrid relied on that.
+
+This change works around the regression by calling winId() on
+qApp->desktop() as suggested in the change. This is a short term solution
+for the 5.10 branch.
+
+This needs to be addressed properly by no longer relying on Qt in this
+area. KWin already does not rely on Qt for Wayland in that area and is
+able to compose the QKeyEvents. This should also be done on X11. It just
+needs some more hook up code for xkb, but that's needed anyway to improve
+modifier only shortcuts and friends.
+
+BUG: 360841
+FIXED-IN: 5.10.3
+
+Reviewers: #kwin, #plasma
+
+Subscribers: plasma-devel, kwin
+
+Tags: #kwin
+
+Differential Revision: https://phabricator.kde.org/D6258
+---
+ effects.cpp | 6 ++++++
+ 1 file changed, 6 insertions(+)
+
+diff --git a/effects.cpp b/effects.cpp
+index d2c4768..8155de6 100644
+--- a/effects.cpp
++++ b/effects.cpp
+@@ -48,6 +48,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
+ #include "kwinglutils.h"
+
+ #include <QDebug>
++#include <QDesktopWidget>
+
+ #include <Plasma/Theme>
+
+@@ -599,6 +600,11 @@ bool EffectsHandlerImpl::grabKeyboard(Effect* effect)
+ bool ret = grabXKeyboard();
+ if (!ret)
+ return false;
++ // Workaround for Qt 5.9 regression introduced with 2b34aefcf02f09253473b096eb4faffd3e62b5f4
++ // we no longer get any events for the root window, one needs to call winId() on the desktop window
++ // TODO: change effects event handling to create the appropriate QKeyEvent without relying on Qt
++ // as it's done already in the Wayland case.
++ qApp->desktop()->winId();
+ }
+ keyboard_grab_effect = effect;
+ return true;
+--
+cgit v0.11.2
+
+
diff --git a/kde/patch/kwin/kwin_replace_logind_with_ck2.patch b/kde/patch/kwin/kwin_replace_logind_with_ck2.patch
new file mode 100644
index 0000000..294a691
--- /dev/null
+++ b/kde/patch/kwin/kwin_replace_logind_with_ck2.patch
@@ -0,0 +1,85 @@
+From: Eric Koegel <eric.koegel@gmail.com>
+Date: Sun, 24 Jul 2016 14:37:26 +0300
+
+Trivial patch for testing the CK2 session controller interface
+as a replacement for systemd-logind;
+Eric Koegel's original patch was rebased to kwin-5.10.2 by Eric Hameleers
+
+diff -uar kwin-5.10.2.orig/logind.cpp kwin-5.10.2/logind.cpp
+--- kwin-5.10.2.orig/logind.cpp 2017-06-13 20:19:37.000000000 +0200
++++ kwin-5.10.2/logind.cpp 2017-06-18 20:49:56.018661568 +0200
+@@ -58,10 +58,10 @@
+ namespace KWin
+ {
+
+-const static QString s_login1Service = QStringLiteral("org.freedesktop.login1");
+-const static QString s_login1Path = QStringLiteral("/org/freedesktop/login1");
+-const static QString s_login1ManagerInterface = QStringLiteral("org.freedesktop.login1.Manager");
+-const static QString s_login1SessionInterface = QStringLiteral("org.freedesktop.login1.Session");
++const static QString s_login1Service = QStringLiteral("org.freedesktop.ConsoleKit");
++const static QString s_login1Path = QStringLiteral("/org/freedesktop/ConsoleKit/Manager");
++const static QString s_login1ManagerInterface = QStringLiteral("org.freedesktop.ConsoleKit.Manager");
++const static QString s_login1SessionInterface = QStringLiteral("org.freedesktop.ConsoleKit.Session");
+ const static QString s_dbusPropertiesInterface = QStringLiteral("org.freedesktop.DBus.Properties");
+
+ LogindIntegration *LogindIntegration::s_self = nullptr;
+@@ -151,7 +151,7 @@
+ return;
+ }
+ if (!reply.isValid()) {
+- qCDebug(KWIN_CORE) << "The session is not registered with logind" << reply.error().message();
++ qCDebug(KWIN_CORE) << "The session is not registered with ConsoleKit2" << reply.error().message();
+ return;
+ }
+ m_sessionPath = reply.value().path();
+@@ -199,7 +199,7 @@
+ m_sessionPath,
+ s_dbusPropertiesInterface,
+ QStringLiteral("Get"));
+- message.setArguments(QVariantList({s_login1SessionInterface, QStringLiteral("Active")}));
++ message.setArguments(QVariantList({s_login1SessionInterface, QStringLiteral("active")}));
+ QDBusPendingReply<QVariant> reply = m_bus.asyncCall(message);
+ QDBusPendingCallWatcher *watcher = new QDBusPendingCallWatcher(reply, this);
+ connect(watcher, &QDBusPendingCallWatcher::finished, this,
+@@ -207,7 +207,7 @@
+ QDBusPendingReply<QVariant> reply = *self;
+ self->deleteLater();
+ if (!reply.isValid()) {
+- qCDebug(KWIN_CORE) << "Failed to get Active Property of logind session:" << reply.error().message();
++ qCDebug(KWIN_CORE) << "Failed to get Active Property of ConsoleKit2 session:" << reply.error().message();
+ return;
+ }
+ const bool active = reply.value().toBool();
+@@ -236,7 +236,7 @@
+ QDBusPendingReply<QVariant> reply = *self;
+ self->deleteLater();
+ if (!reply.isValid()) {
+- qCDebug(KWIN_CORE) << "Failed to get VTNr Property of logind session:" << reply.error().message();
++ qCDebug(KWIN_CORE) << "Failed to get VTNr Property of ConsoleKit2 session:" << reply.error().message();
+ return;
+ }
+ const int vt = reply.value().toUInt();
+@@ -365,12 +365,12 @@
+ QDBusPendingReply<QVariant> reply = *self;
+ self->deleteLater();
+ if (!reply.isValid()) {
+- qCDebug(KWIN_CORE) << "Failed to get Seat Property of logind session:" << reply.error().message();
++ qCDebug(KWIN_CORE) << "Failed to get Seat Property of ConsoleKit2 session:" << reply.error().message();
+ return;
+ }
+ DBusLogindSeat seat = qdbus_cast<DBusLogindSeat>(reply.value().value<QDBusArgument>());
+ const QString seatPath = seat.path.path();
+- qCDebug(KWIN_CORE) << "Logind seat:" << seat.name << "/" << seatPath;
++ qCDebug(KWIN_CORE) << "ConsoleKit2 seat:" << seat.name << "/" << seatPath;
+ if (m_seatPath != seatPath) {
+ m_seatPath = seatPath;
+ }
+@@ -385,7 +385,7 @@
+ }
+ QDBusMessage message = QDBusMessage::createMethodCall(s_login1Service,
+ m_seatPath,
+- QStringLiteral("org.freedesktop.login1.Seat"),
++ QStringLiteral("org.freedesktop.ConsoleKit.Seat"),
+ QStringLiteral("SwitchTo"));
+ message.setArguments(QVariantList{vtNr});
+ m_bus.asyncCall(message);
diff --git a/kde/patch/libkface.patch b/kde/patch/libkface.patch
new file mode 100644
index 0000000..9775e82
--- /dev/null
+++ b/kde/patch/libkface.patch
@@ -0,0 +1,3 @@
+# Compile libkface against opencv 3.2:
+cat $CWD/patch/libkface/libkface_opencv3.patch | patch -p1 --verbose || { touch ${SLACK_KDE_BUILD_DIR}/${PKGNAME}.failed ; continue ; }
+
diff --git a/kde/patch/libkface/libkface_opencv3.patch b/kde/patch/libkface/libkface_opencv3.patch
new file mode 100644
index 0000000..a6804d3
--- /dev/null
+++ b/kde/patch/libkface/libkface_opencv3.patch
@@ -0,0 +1,61 @@
+Taken from Gentoo:
+https://gitweb.gentoo.org/repo/gentoo.git/plain/kde-apps/libkface/files/libkface-16.11.80-opencv3.2-gentoo-3.1.patch
+
+--- a/src/recognition-opencv-lbph/facerec_borrowed.h 2016-11-26 14:19:01.492645170 +0100
++++ b/src/recognition-opencv-lbph/facerec_borrowed.h.new 2016-11-26 14:19:17.655835794 +0100
+@@ -141,7 +141,7 @@
+ /*
+ * Predict
+ */
+- void predict(cv::InputArray src, cv::Ptr<cv::face::PredictCollector> collector, const int state = 0) const override;
++ void predict(cv::InputArray src, cv::Ptr<cv::face::PredictCollector> collector) const override;
+ #endif
+
+ /**
+--- a/src/recognition-opencv-lbph/facerec_borrowed.cpp 2016-11-26 14:19:01.492645170 +0100
++++ b/src/recognition-opencv-lbph/facerec_borrowed.cpp.new 2016-11-26 14:19:29.184971765 +0100
+@@ -380,7 +380,7 @@
+ #if OPENCV_TEST_VERSION(3,1,0)
+ void LBPHFaceRecognizer::predict(InputArray _src, int &minClass, double &minDist) const
+ #else
+-void LBPHFaceRecognizer::predict(cv::InputArray _src, cv::Ptr<cv::face::PredictCollector> collector, const int state) const
++void LBPHFaceRecognizer::predict(cv::InputArray _src, cv::Ptr<cv::face::PredictCollector> collector) const
+ #endif
+ {
+ if(m_histograms.empty())
+@@ -404,7 +404,7 @@
+ minDist = DBL_MAX;
+ minClass = -1;
+ #else
+- collector->init((int)m_histograms.size(), state);
++ collector->init((int)m_histograms.size());
+ #endif
+
+ // This is the standard method
+@@ -424,7 +424,7 @@
+ }
+ #else
+ int label = m_labels.at<int>((int) sampleIdx);
+- if (!collector->emit(label, dist, state))
++ if (!collector->collect(label, dist))
+ {
+ return;
+ }
+@@ -470,7 +470,7 @@
+ minClass = it->first;
+ }
+ #else
+- if (!collector->emit(it->first, mean, state))
++ if (!collector->collect(it->first, mean))
+ {
+ return;
+ }
+@@ -523,7 +523,7 @@
+ }
+ #else
+ // large is better thus it is -score.
+- if (!collector->emit(it->first, -score, state))
++ if (!collector->collect(it->first, -score))
+ {
+ return;
+ }
diff --git a/kde/patch/libkleo.patch b/kde/patch/libkleo.patch
new file mode 100644
index 0000000..9c1cef3
--- /dev/null
+++ b/kde/patch/libkleo.patch
@@ -0,0 +1,4 @@
+# Compile libkleo with gcc7:
+# Fixed in Applications 17.04.2:
+#cat $CWD/patch/libkleo/libkleo_gcc7.patch | patch -p1 --verbose || { touch ${SLACK_KDE_BUILD_DIR}/${PKGNAME}.failed ; continue ; }
+
diff --git a/kde/patch/libkleo/libkleo_gcc7.patch b/kde/patch/libkleo/libkleo_gcc7.patch
new file mode 100644
index 0000000..40e0616
--- /dev/null
+++ b/kde/patch/libkleo/libkleo_gcc7.patch
@@ -0,0 +1,27 @@
+From 675ce908a33d16f3b78d3fc741b0ff45790e4770 Mon Sep 17 00:00:00 2001
+From: Fabian Vogt <fabian@ritter-vogt.de>
+Date: Wed, 17 May 2017 17:05:41 +0200
+Subject: Fix compilation with GCC 7
+
+std::bind is part of functional, and GCC 7 requires an explicit include.
+---
+ src/kleo/enum.cpp | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/src/kleo/enum.cpp b/src/kleo/enum.cpp
+index 15ea1fd..829d4fd 100644
+--- a/src/kleo/enum.cpp
++++ b/src/kleo/enum.cpp
+@@ -33,6 +33,9 @@
+ #include "enum.h"
+ #include "libkleo_debug.h"
+ #include "models/keycache.h"
++
++#include <functional>
++
+ #include <KLocalizedString>
+
+ #include <gpgme++/key.h>
+--
+cgit v0.11.2
+
diff --git a/kde/patch/oxygen-gtk2.patch b/kde/patch/oxygen-gtk2.patch
new file mode 100644
index 0000000..4ca11e9
--- /dev/null
+++ b/kde/patch/oxygen-gtk2.patch
@@ -0,0 +1,3 @@
+# Add more firefox-derived browsers as supported by the theme:
+cat $CWD/patch/oxygen-gtk2/oxygen-gtk2_KDEBUG_341181.patch | patch -p1 --verbose || { touch ${SLACK_KDE_BUILD_DIR}/${PKGNAME}.failed ; continue ; }
+
diff --git a/kde/patch/oxygen-gtk2/oxygen-gtk2_KDEBUG_341181.patch b/kde/patch/oxygen-gtk2/oxygen-gtk2_KDEBUG_341181.patch
new file mode 100644
index 0000000..b6a1e55
--- /dev/null
+++ b/kde/patch/oxygen-gtk2/oxygen-gtk2_KDEBUG_341181.patch
@@ -0,0 +1,115 @@
+From b1ee5fb80c44c6c8a625333af1cfdc997d408805 Mon Sep 17 00:00:00 2001
+From: Hugo Pereira Da Costa <hugo.pereira@free.fr>
+Date: Sat, 18 Jul 2015 20:09:28 +0200
+Subject: moved xul application names to dedicated header file, added a number
+ of xul applications to prevent crash for these CCBUG: 341181
+
+---
+ src/oxygenapplicationname.cpp | 18 ++-----------
+ src/oxygenxulapplicationnames.h | 56 +++++++++++++++++++++++++++++++++++++++++
+ 2 files changed, 58 insertions(+), 16 deletions(-)
+ create mode 100644 src/oxygenxulapplicationnames.h
+
+diff --git a/src/oxygenapplicationname.cpp b/src/oxygenapplicationname.cpp
+index feb5a23..17c8a1a 100644
+--- a/src/oxygenapplicationname.cpp
++++ b/src/oxygenapplicationname.cpp
+@@ -25,6 +25,7 @@
+
+ #include "oxygenapplicationname.h"
+ #include "oxygengtkutils.h"
++#include "oxygenxulapplicationnames.h"
+ #include "config.h"
+
+ #include <cstdlib>
+@@ -79,23 +80,8 @@ namespace Oxygen
+ gtkAppName == "chromium" ||
+ gtkAppName == "chromium-browser" ||
+ gtkAppName == "google-chrome" ) _name = GoogleChrome;
+- else {
+
+- // tag all mozilla-like applications (XUL)
+- static const std::string XulAppNames[] =
+- {
+- "firefox",
+- "thunderbird",
+- "seamonkey",
+- "iceweasel",
+- "icecat",
+- "icedove",
+- "xulrunner",
+- "komodo",
+- "aurora",
+- "zotero",
+- ""
+- };
++ else {
+
+ for( unsigned int index = 0; !XulAppNames[index].empty(); ++index )
+ {
+diff --git a/src/oxygenxulapplicationnames.h b/src/oxygenxulapplicationnames.h
+new file mode 100644
+index 0000000..252a1fc
+--- /dev/null
++++ b/src/oxygenxulapplicationnames.h
+@@ -0,0 +1,56 @@
++#ifndef oxygenxulapplicationname_h
++#define oxygenxulapplicationname_h
++/*
++* this file is part of the oxygen gtk engine
++* Copyright (c) 2010 Hugo Pereira Da Costa <hugo.pereira@free.fr>
++*
++* inspired notably from kdelibs/kdeui/color/kcolorutils.h
++* Copyright (C) 2007 Matthew Woehlke <mw_triad@users.sourceforge.net>
++* Copyright (C) 2007 Thomas Zander <zander@kde.org>
++* Copyright (C) 2007 Zack Rusin <zack@kde.org>
++*
++* This library is free software; you can redistribute it and/or
++* modify it under the terms of the GNU Lesser General Public
++* License as published by the Free Software Foundation; either
++* version 2 of the License, or( at your option ) any later version.
++*
++* This library is distributed in the hope that it will be useful,
++* but WITHOUT ANY WARRANTY; without even the implied warranty of
++* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++* Lesser General Public License for more details.
++*
++* You should have received a copy of the GNU Lesser General Public
++* License along with this library; if not, write to the Free
++* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
++* MA 02110-1301, USA.
++*/
++
++#include <string>
++
++namespace Oxygen
++{
++
++ // tag all mozilla-like applications (XUL)
++ static const std::string XulAppNames[] =
++ {
++ "aurora",
++ "earlybird",
++ "icecat",
++ "icedove",
++ "iceweasel",
++ "instantbird",
++ "firefox",
++ "fossamail",
++ "komodo",
++ "newmoon",
++ "palemoon",
++ "seamonkey",
++ "thunderbird",
++ "xulrunner",
++ "zotero",
++ ""
++ };
++
++}
++
++#endif
+--
+cgit v0.11.2
+
+
diff --git a/kde/patch/perlqt.patch b/kde/patch/perlqt.patch
new file mode 100644
index 0000000..1cdd7db
--- /dev/null
+++ b/kde/patch/perlqt.patch
@@ -0,0 +1,3 @@
+# Fix build:
+cat $CWD/patch/perlqt/perlqt.gcc6.diff | patch -p1 --verbose || { touch ${SLACK_KDE_BUILD_DIR}/${PKGNAME}.failed ; continue ; }
+
diff --git a/kde/patch/perlqt/perlqt.gcc6.diff b/kde/patch/perlqt/perlqt.gcc6.diff
new file mode 100644
index 0000000..9a6e42e
--- /dev/null
+++ b/kde/patch/perlqt/perlqt.gcc6.diff
@@ -0,0 +1,11 @@
+--- ./qtcore/src/util.cpp.orig 2014-11-04 16:59:39.000000000 -0600
++++ ./qtcore/src/util.cpp 2017-10-04 22:25:36.055839800 -0500
+@@ -2251,7 +2251,7 @@
+ methcache.insert(mcid, new Smoke::ModuleIndex(mi));
+ }
+
+- static smokeperl_object nothis = { 0, 0, 0, false };
++ static smokeperl_object nothis = { 0, 0, 0, NULL };
+ smokeperl_object* call_this = 0;
+ if ( SvOK(sv_this) ) {
+ call_this = sv_obj_info( sv_this );
diff --git a/kde/patch/plasma-workspace.patch b/kde/patch/plasma-workspace.patch
index c1e56fc..8671c65 100644
--- a/kde/patch/plasma-workspace.patch
+++ b/kde/patch/plasma-workspace.patch
@@ -4,5 +4,14 @@
#cat $CWD/patch/plasma-workspace/plasma-workspace_consolekit2.patch | patch -p1 --verbose || { touch ${SLACK_KDE_BUILD_DIR}/${PKGNAME}.failed ; continue ; }
# Apply commit that fixes compilation of 5.6.5:
-#cat $CWD/patch/plasma-workspace/plasma-workspace_apply_767aa57.patc | patch -p1 --verbose || { touch ${SLACK_KDE_BUILD_DIR}/${PKGNAME}.failed ; continue ; }
+#cat $CWD/patch/plasma-workspace/plasma-workspace_apply_767aa57.patch | patch -p1 --verbose || { touch ${SLACK_KDE_BUILD_DIR}/${PKGNAME}.failed ; continue ; }
+
+# Systray: Move all icon resolution to dataengine, preventing high CPU usage,
+# see https://phabricator.kde.org/D2986 :
+# Fixed in 5.9.0
+#cat $CWD/patch/plasma-workspace/plasma-workspace.systray_cpubug.patch | patch -p1 --verbose || { touch ${SLACK_KDE_BUILD_DIR}/${PKGNAME}.failed ; continue ; }
+
+# Fix vulnerability (CVE-2018-6791 - KDEBUG_389815)
+# (already fixed in Plasma 5.12.0):
+#cat $CWD/patch/plasma-workspace/plasma-workspace_kdebug389815.patch | patch -p1 --verbose || { touch ${SLACK_KDE_BUILD_DIR}/${PKGNAME}.failed ; continue ; }
diff --git a/kde/patch/plasma-workspace/plasma-workspace.systray_cpubug.patch b/kde/patch/plasma-workspace/plasma-workspace.systray_cpubug.patch
new file mode 100644
index 0000000..4ad3c07
--- /dev/null
+++ b/kde/patch/plasma-workspace/plasma-workspace.systray_cpubug.patch
@@ -0,0 +1,152 @@
+https://phabricator.kde.org/D2986
+Systray: Move all icon resolution to dataengine
+
+diff --git a/applets/systemtray/package/contents/ui/ConfigEntries.qml b/applets/systemtray/package/contents/ui/ConfigEntries.qml
+--- a/applets/systemtray/package/contents/ui/ConfigEntries.qml
++++ b/applets/systemtray/package/contents/ui/ConfigEntries.qml
+@@ -75,7 +75,7 @@
+ "index": i,
+ "taskId": item.Id,
+ "name": item.Title,
+- "iconName": plasmoid.nativeInterface.resolveIcon(item.IconName, item.IconThemePath),
++ "iconName": item.IconName,
+ "icon": item.Icon
+ });
+ }
+diff --git a/applets/systemtray/package/contents/ui/items/StatusNotifierItem.qml b/applets/systemtray/package/contents/ui/items/StatusNotifierItem.qml
+--- a/applets/systemtray/package/contents/ui/items/StatusNotifierItem.qml
++++ b/applets/systemtray/package/contents/ui/items/StatusNotifierItem.qml
+@@ -28,7 +28,7 @@
+ text: Title
+ mainText: ToolTipTitle != "" ? ToolTipTitle : Title
+ subText: ToolTipSubTitle
+- icon: ToolTipIcon != "" ? ToolTipIcon : plasmoid.nativeInterface.resolveIcon(IconName != "" ? IconName : Icon, IconThemePath)
++ icon: ToolTipIcon != "" ? ToolTipIcon : Icon ? Icon : IconName
+ textFormat: Text.AutoText
+ category: Category
+
+@@ -48,7 +48,7 @@
+
+ PlasmaCore.IconItem {
+ id: iconItem
+- source: plasmoid.nativeInterface.resolveIcon(IconName != "" ? IconName : Icon, IconThemePath)
++ source: Icon ? Icon : IconName
+ width: Math.min(parent.width, parent.height)
+ height: width
+ active: taskIcon.containsMouse
+diff --git a/applets/systemtray/systemtray.h b/applets/systemtray/systemtray.h
+--- a/applets/systemtray/systemtray.h
++++ b/applets/systemtray/systemtray.h
+@@ -60,12 +60,6 @@
+
+ //Invokable utilities
+ /**
+- * returns either a simple icon name or a custom path if the app is
+- * using a custom theme
+- */
+- Q_INVOKABLE QVariant resolveIcon(const QVariant &variant, const QString &iconThemePath);
+-
+- /**
+ * Given an AppletInterface pointer, shows a proper context menu for it
+ */
+ Q_INVOKABLE void showPlasmoidMenu(QQuickItem *appletInterface, int x, int y);
+diff --git a/applets/systemtray/systemtray.cpp b/applets/systemtray/systemtray.cpp
+--- a/applets/systemtray/systemtray.cpp
++++ b/applets/systemtray/systemtray.cpp
+@@ -37,37 +37,11 @@
+ #include <Plasma/PluginLoader>
+ #include <Plasma/ServiceJob>
+
+-#include <KIconLoader>
+-#include <KIconEngine>
+ #include <KActionCollection>
+ #include <KLocalizedString>
+
+ #include <plasma_version.h>
+
+-/*
+- * An app may also load icons from their own directories, so we need a new iconloader that takes this into account
+- * This is wrapped into a subclass of iconengine so the iconloader lifespan matches the icon object
+- */
+-class AppIconEngine : public KIconEngine
+-{
+-public:
+- AppIconEngine(const QString &variant, const QString &path, const QString &appName);
+- ~AppIconEngine();
+-private:
+- KIconLoader* m_loader;
+-};
+-
+-AppIconEngine::AppIconEngine(const QString &variant, const QString &path, const QString &appName) :
+- KIconEngine(variant, m_loader = new KIconLoader(appName, QStringList()))
+-{
+- m_loader->addAppDir(appName, path);
+-}
+-
+-AppIconEngine::~AppIconEngine()
+-{
+- delete m_loader;
+-}
+-
+ class PlasmoidModel: public QStandardItemModel
+ {
+ public:
+@@ -169,32 +143,6 @@
+ }
+ }
+
+-QVariant SystemTray::resolveIcon(const QVariant &variant, const QString &iconThemePath)
+-{
+- if (variant.canConvert<QString>()) {
+- if (!iconThemePath.isEmpty()) {
+- const QString path = iconThemePath;
+- if (!path.isEmpty()) {
+- // FIXME: If last part of path is not "icons", this won't work!
+- auto tokens = path.splitRef('/', QString::SkipEmptyParts);
+- if (tokens.length() >= 3 && tokens.takeLast() == QLatin1String("icons")) {
+- const QString appName = tokens.takeLast().toString();
+-
+- return QVariant(QIcon(new AppIconEngine(variant.toString(), path, appName)));
+- } else {
+- qCWarning(SYSTEM_TRAY) << "Wrong IconThemePath" << path << ": too short or does not end with 'icons'";
+- }
+- }
+-
+- //return just the string hoping that IconItem will know how to interpret it anyways as either a normal icon or a SVG from the theme
+- return variant;
+- }
+- }
+-
+- // Most importantly QIcons. Nothing to do for those.
+- return variant;
+-}
+-
+ void SystemTray::showPlasmoidMenu(QQuickItem *appletInterface, int x, int y)
+ {
+ if (!appletInterface) {
+diff --git a/dataengines/statusnotifieritem/statusnotifieritemsource.cpp b/dataengines/statusnotifieritem/statusnotifieritemsource.cpp
+--- a/dataengines/statusnotifieritem/statusnotifieritemsource.cpp
++++ b/dataengines/statusnotifieritem/statusnotifieritemsource.cpp
+@@ -240,14 +240,19 @@
+ if (!m_customIconLoader) {
+ m_customIconLoader = new KIconLoader(QString(), QStringList(), this);
+ }
++ // FIXME: If last part of path is not "icons", this won't work!
++ QString appName;
++ auto tokens = path.splitRef('/', QString::SkipEmptyParts);
++ if (tokens.length() >= 3 && tokens.takeLast() == QLatin1String("icons"))
++ appName = tokens.takeLast().toString();
+
+ //icons may be either in the root directory of the passed path or in a appdir format
+ //i.e hicolor/32x32/iconname.png
+
+- m_customIconLoader->reconfigure(QString(), QStringList(path));
++ m_customIconLoader->reconfigure(appName, QStringList(path));
+
+ //add app dir requires an app name, though this is completely unused in this context
+- m_customIconLoader->addAppDir(QStringLiteral("unused"), path);
++ m_customIconLoader->addAppDir(appName.size() ? appName : QStringLiteral("unused"), path);
+ }
+ setData(QStringLiteral("IconThemePath"), path);
+
+
diff --git a/kde/patch/plasma-workspace/plasma-workspace_kdebug389815.patch b/kde/patch/plasma-workspace/plasma-workspace_kdebug389815.patch
new file mode 100644
index 0000000..e2f1e48
--- /dev/null
+++ b/kde/patch/plasma-workspace/plasma-workspace_kdebug389815.patch
@@ -0,0 +1,32 @@
+From f32002ce50edc3891f1fa41173132c820b917d57 Mon Sep 17 00:00:00 2001
+From: Marco Martin <notmart@gmail.com>
+Date: Mon, 5 Feb 2018 13:12:51 +0100
+Subject: Make sure device paths are quoted
+
+in the case a vfat removable device has $() or `` in its label,
+such as $(touch foo) the quoted command may get executed,
+leaving an attack vector. Use KMacroExpander::expandMacrosShellQuote
+to make sure everything is quoted and not interpreted as a command
+
+BUG:389815
+---
+ soliduiserver/deviceserviceaction.cpp | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/soliduiserver/deviceserviceaction.cpp b/soliduiserver/deviceserviceaction.cpp
+index f49c967..738b27c 100644
+--- a/soliduiserver/deviceserviceaction.cpp
++++ b/soliduiserver/deviceserviceaction.cpp
+@@ -158,7 +158,7 @@ void DelayedExecutor::delayedExecute(const QString &udi)
+
+ QString exec = m_service.exec();
+ MacroExpander mx(device);
+- mx.expandMacros(exec);
++ mx.expandMacrosShellQuote(exec);
+
+ KRun::runCommand(exec, QString(), m_service.icon(), 0);
+ deleteLater();
+--
+cgit v0.11.2
+
+
diff --git a/kde/patch/powerdevil.patch b/kde/patch/powerdevil.patch
new file mode 100644
index 0000000..b7e2bae
--- /dev/null
+++ b/kde/patch/powerdevil.patch
@@ -0,0 +1,4 @@
+# PowerDevil fails to setup power settings on a fresh install.
+# Fixed in 5.12.5.
+#cat $CWD/patch/powerdevil/powerdevil-5.12.4_firstrun.patch | patch -p1 --verbose || { touch ${SLACK_KDE_BUILD_DIR}/${PKGNAME}.failed ; continue ; }
+
diff --git a/kde/patch/powerdevil/powerdevil-5.12.4_firstrun.patch b/kde/patch/powerdevil/powerdevil-5.12.4_firstrun.patch
new file mode 100644
index 0000000..165e67b
--- /dev/null
+++ b/kde/patch/powerdevil/powerdevil-5.12.4_firstrun.patch
@@ -0,0 +1,42 @@
+From be91abe7fc8cc731b57bec4cf2c004c07b0fd79b Mon Sep 17 00:00:00 2001
+From: Kai Uwe Broulik <kde@privat.broulik.de>
+Date: Wed, 25 Apr 2018 10:56:16 +0200
+Subject: Ignore "migration" key for determining whether the config is empty
+
+Otherwise we would never generate the default power management configuration
+leading to it not suspending on lid close, not handling power buttons etc etc
+
+CHANGELOG: Fixed bug that caused power management system to not work on a fresh install
+
+Reviewed-By: David Edmundson
+
+BUG: 391782
+FIXED-IN: 5.12.5
+---
+ daemon/powerdevilcore.cpp | 8 +++++++-
+ 1 file changed, 7 insertions(+), 1 deletion(-)
+
+diff --git a/daemon/powerdevilcore.cpp b/daemon/powerdevilcore.cpp
+index 2cf936e..53b7521 100644
+--- a/daemon/powerdevilcore.cpp
++++ b/daemon/powerdevilcore.cpp
+@@ -108,9 +108,15 @@ void Core::onBackendReady()
+
+ m_profilesConfig = KSharedConfig::openConfig("powermanagementprofilesrc", KConfig::CascadeConfig);
+
++ QStringList groups = m_profilesConfig->groupList();
++ // the "migration" key is for shortcuts migration in added by migratePre512KeyboardShortcuts
++ // and as such our configuration would never be considered empty, ignore it!
++ groups.removeOne(QStringLiteral("migration"));
++
+ // Is it brand new?
+- if (m_profilesConfig->groupList().isEmpty()) {
++ if (groups.isEmpty()) {
+ // Generate defaults
++ qCDebug(POWERDEVIL) << "Generating a default configuration";
+ bool toRam = m_backend->supportedSuspendMethods() & PowerDevil::BackendInterface::ToRam;
+ bool toDisk = m_backend->supportedSuspendMethods() & PowerDevil::BackendInterface::ToDisk;
+ ProfileGenerator::generateProfiles(toRam, toDisk);
+--
+cgit v0.11.2
+
diff --git a/kde/patch/pykde4.patch b/kde/patch/pykde4.patch
new file mode 100644
index 0000000..48073d4
--- /dev/null
+++ b/kde/patch/pykde4.patch
@@ -0,0 +1,5 @@
+# Fix compilation against sip-4.19:
+cat $CWD/patch/pykde4/0001-use-LIB_PYTHON-realpath.patch | patch -p1 --verbose || { touch ${SLACK_KDE_BUILD_DIR}/${PKGNAME}.failed ; continue ; }
+cat $CWD/patch/pykde4/0002-Add-some-missing-link-libraries.patch | patch -p1 --verbose || { touch ${SLACK_KDE_BUILD_DIR}/${PKGNAME}.failed ; continue ; }
+cat $CWD/patch/pykde4/0003-Fix-build-with-sip-4.19.patch | patch -p1 --verbose || { touch ${SLACK_KDE_BUILD_DIR}/${PKGNAME}.failed ; continue ; }
+
diff --git a/kde/patch/pykde4/0001-use-LIB_PYTHON-realpath.patch b/kde/patch/pykde4/0001-use-LIB_PYTHON-realpath.patch
new file mode 100644
index 0000000..85ad4bc
--- /dev/null
+++ b/kde/patch/pykde4/0001-use-LIB_PYTHON-realpath.patch
@@ -0,0 +1,31 @@
+From 34bed3ceb7cd2bb43e67acce97f4cc3e8bbc1c1d Mon Sep 17 00:00:00 2001
+From: Rex Dieter <rdieter@math.unl.edu>
+Date: Tue, 11 Mar 2014 09:51:17 -0500
+Subject: [PATCH 1/3] use LIB_PYTHON realpath
+
+Use GET_FILENAME_COMPONENT( ... REALPATH). PYTHON_LIBRARY as returned
+by cmake, whose target is often a symlink. Some distro packaging
+reserves such library symlinks for -devel and not runtime.
+
+REVIEW: 116719
+---
+ kpythonpluginfactory/CMakeLists.txt | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/kpythonpluginfactory/CMakeLists.txt b/kpythonpluginfactory/CMakeLists.txt
+index c24160e..a777dac 100644
+--- a/kpythonpluginfactory/CMakeLists.txt
++++ b/kpythonpluginfactory/CMakeLists.txt
+@@ -3,7 +3,8 @@
+ set(kpythonpluginfactory_SRCS
+ kpythonpluginfactory.cpp)
+
+-GET_FILENAME_COMPONENT(LIB_PYTHON ${PYTHON_LIBRARIES} NAME)
++GET_FILENAME_COMPONENT(PYTHON_LIBRARY_REALPATH "${PYTHON_LIBRARY}" REALPATH)
++GET_FILENAME_COMPONENT(LIB_PYTHON ${PYTHON_LIBRARY_REALPATH} NAME)
+ ADD_DEFINITIONS(-DLIB_PYTHON="${LIB_PYTHON}")
+ ADD_DEFINITIONS(-DKDE_DEFAULT_DEBUG_AREA=15000)
+
+--
+2.9.3
+
diff --git a/kde/patch/pykde4/0002-Add-some-missing-link-libraries.patch b/kde/patch/pykde4/0002-Add-some-missing-link-libraries.patch
new file mode 100644
index 0000000..00283cc
--- /dev/null
+++ b/kde/patch/pykde4/0002-Add-some-missing-link-libraries.patch
@@ -0,0 +1,60 @@
+From b0137f694f946c7f10ac2863a71b4cdeda15eb87 Mon Sep 17 00:00:00 2001
+From: Wolfgang Bauer <wbauer@tmo.at>
+Date: Wed, 14 Sep 2016 23:54:40 +0200
+Subject: [PATCH 2/3] Add some missing(?) link libraries
+
+This fixes the following build errors in openSUSE Factory:
+
+CMakeFiles/python_module_PyKDE4_dnssd.dir/sip/dnssd/sipdnssdpart2.cpp.o:
+In function `meth_DNSSD_ServiceBrowser_resolveHostName':
+/home/abuild/rpmbuild/BUILD/pykde4-4.14.3/build/sip/dnssd/sipdnssdpart2.cpp:408:
+undefined reference to `QHostAddress::QHostAddress(QHostAddress
+const&)'
+/home/abuild/rpmbuild/BUILD/pykde4-4.14.3/build/sip/dnssd/sipdnssdpart2.cpp:408:
+undefined reference to `QHostAddress::~QHostAddress()'
+collect2: error: ld returned 1 exit status
+...
+CMakeFiles/python_module_PyKDE4_kio.dir/sip/kio/sipkiopart3.cpp.o: In
+function `meth_KFilePlacesModel_deviceForIndex':
+/home/abuild/rpmbuild/BUILD/pykde4-4.14.3/build/sip/kio/sipkiopart3.cpp:18560:
+undefined reference to `Solid::Device::Device(Solid::Device const&)'
+/home/abuild/rpmbuild/BUILD/pykde4-4.14.3/build/sip/kio/sipkiopart3.cpp:18560:
+undefined reference to `Solid::Device::~Device()'
+CMakeFiles/python_module_PyKDE4_kio.dir/sip/kio/sipkiopart4.cpp.o: In
+function `meth_KDeviceListModel_deviceForIndex':
+/home/abuild/rpmbuild/BUILD/pykde4-4.14.3/build/sip/kio/sipkiopart4.cpp:27090:
+undefined reference to `Solid::Device::Device(Solid::Device const&)'
+/home/abuild/rpmbuild/BUILD/pykde4-4.14.3/build/sip/kio/sipkiopart4.cpp:27090:
+undefined reference to `Solid::Device::~Device()'
+collect2: error: ld returned 1 exit status
+
+REVIEW: 127705
+---
+ CMakeLists.txt | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index b0768cf..b919d1b 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -166,7 +166,7 @@ add_sip_python_module(PyKDE4.kdeui sip/kdeui/kdeuimod.sip ${KDE4_KDEUI_LIBS} ${Q
+
+ file(GLOB kio_files_sip sip/kio/*.sip)
+ set(SIP_EXTRA_FILES_DEPEND ${kio_files_sip})
+-add_sip_python_module(PyKDE4.kio sip/kio/kiomod.sip ${KDE4_KIO_LIBS} ${KDE4_KFILE_LIBS})
++add_sip_python_module(PyKDE4.kio sip/kio/kiomod.sip ${KDE4_KIO_LIBS} ${KDE4_KFILE_LIBS} ${KDE4_SOLID_LIBS})
+
+ file(GLOB kutils_files_sip sip/kutils/*.sip)
+ set(SIP_EXTRA_FILES_DEPEND ${kutils_files_sip})
+@@ -190,7 +190,7 @@ add_sip_python_module(PyKDE4.knewstuff sip/knewstuff/knewstuffmod.sip ${KDE4_KNE
+
+ file(GLOB dnssd_files_sip sip/dnssd/*.sip)
+ set(SIP_EXTRA_FILES_DEPEND ${dnssd_files_sip})
+-add_sip_python_module(PyKDE4.dnssd sip/dnssd/dnssdmod.sip ${KDE4_KDNSSD_LIBS} ${QT_QTCORE_LIBRARY})
++add_sip_python_module(PyKDE4.dnssd sip/dnssd/dnssdmod.sip ${KDE4_KDNSSD_LIBS} ${QT_QTCORE_LIBRARY} ${QT_QTNETWORK_LIBRARY})
+
+ file(GLOB phonon_files_sip sip/phonon/*.sip)
+ set(SIP_EXTRA_FILES_DEPEND ${phonon_files_sip})
+--
+2.9.3
+
diff --git a/kde/patch/pykde4/0003-Fix-build-with-sip-4.19.patch b/kde/patch/pykde4/0003-Fix-build-with-sip-4.19.patch
new file mode 100644
index 0000000..61ef78d
--- /dev/null
+++ b/kde/patch/pykde4/0003-Fix-build-with-sip-4.19.patch
@@ -0,0 +1,599 @@
+From 2d1eadf5d0148c88cb4393993f0269e196cbe7b1 Mon Sep 17 00:00:00 2001
+From: Johannes Huber <johu@gentoo.org>
+Date: Mon, 9 Jan 2017 11:52:12 +0100
+Subject: [PATCH 3/3] Fix build with sip 4.19
+
+REVIEW: 129799
+---
+ sip/dnssd/remoteservice.sip | 10 +++++-----
+ sip/kdecore/kmimetype.sip | 10 +++++-----
+ sip/kdecore/ksharedconfig.sip | 4 ++--
+ sip/kdecore/ksycocaentry.sip | 10 +++++-----
+ sip/kdecore/typedefs.sip | 30 +++++++++++++++---------------
+ sip/kdeui/kcompletion.sip | 10 +++++-----
+ sip/kdeui/kxmlguibuilder.sip | 4 ++--
+ sip/kio/kservicegroup.sip | 10 +++++-----
+ sip/ktexteditor/markinterface.sip | 10 +++++-----
+ sip/phonon/objectdescription.sip | 10 +++++-----
+ sip/soprano/pluginmanager.sip | 30 +++++++++++++++---------------
+ 11 files changed, 69 insertions(+), 69 deletions(-)
+
+diff --git a/sip/dnssd/remoteservice.sip b/sip/dnssd/remoteservice.sip
+index 5c5397a..44db887 100644
+--- a/sip/dnssd/remoteservice.sip
++++ b/sip/dnssd/remoteservice.sip
+@@ -66,7 +66,7 @@ protected:
+ DNSSD::RemoteService::Ptr *t = new DNSSD::RemoteService::Ptr (sipCpp->at(i));
+ PyObject *tobj;
+
+- if ((tobj = sipConvertFromNewInstance(t->data(), sipClass_DNSSD_RemoteService, sipTransferObj)) == NULL)
++ if ((tobj = sipConvertFromNewType(t->data(), sipType_DNSSD_RemoteService, sipTransferObj)) == NULL)
+ {
+ Py_DECREF(l);
+ delete t;
+@@ -88,7 +88,7 @@ protected:
+ return 0;
+
+ for (int i = 0; i < PyList_GET_SIZE(sipPy); ++i)
+- if (!sipCanConvertToInstance(PyList_GET_ITEM(sipPy, i), sipClass_DNSSD_RemoteService, SIP_NOT_NONE))
++ if (!sipCanConvertToType(PyList_GET_ITEM(sipPy, i), sipType_DNSSD_RemoteService, SIP_NOT_NONE))
+ return 0;
+
+ return 1;
+@@ -99,11 +99,11 @@ protected:
+ for (int i = 0; i < PyList_GET_SIZE(sipPy); ++i)
+ {
+ int state;
+- DNSSD::RemoteService *t = reinterpret_cast<DNSSD::RemoteService *>(sipConvertToInstance(PyList_GET_ITEM(sipPy, i), sipClass_DNSSD_RemoteService, sipTransferObj, SIP_NOT_NONE, &state, sipIsErr));
++ DNSSD::RemoteService *t = reinterpret_cast<DNSSD::RemoteService *>(sipConvertToType(PyList_GET_ITEM(sipPy, i), sipType_DNSSD_RemoteService, sipTransferObj, SIP_NOT_NONE, &state, sipIsErr));
+
+ if (*sipIsErr)
+ {
+- sipReleaseInstance(t, sipClass_DNSSD_RemoteService, state);
++ sipReleaseType(t, sipType_DNSSD_RemoteService, state);
+
+ delete ql;
+ return 0;
+@@ -113,7 +113,7 @@ protected:
+
+ ql->append(*tptr);
+
+- sipReleaseInstance(t, sipClass_DNSSD_RemoteService, state);
++ sipReleaseType(t, sipType_DNSSD_RemoteService, state);
+ }
+
+ *sipCppPtr = ql;
+diff --git a/sip/kdecore/kmimetype.sip b/sip/kdecore/kmimetype.sip
+index b2d21f7..2945210 100644
+--- a/sip/kdecore/kmimetype.sip
++++ b/sip/kdecore/kmimetype.sip
+@@ -100,7 +100,7 @@ public:
+ KMimeType::Ptr *t = new KMimeType::Ptr (sipCpp->at(i));
+ PyObject *tobj;
+
+- if ((tobj = sipConvertFromNewInstance(t->data(), sipClass_KMimeType, sipTransferObj)) == NULL)
++ if ((tobj = sipConvertFromNewType(t->data(), sipType_KMimeType, sipTransferObj)) == NULL)
+ {
+ Py_DECREF(l);
+ delete t;
+@@ -122,7 +122,7 @@ public:
+ return 0;
+
+ for (int i = 0; i < PyList_GET_SIZE(sipPy); ++i)
+- if (!sipCanConvertToInstance(PyList_GET_ITEM(sipPy, i), sipClass_KMimeType, SIP_NOT_NONE))
++ if (!sipCanConvertToType(PyList_GET_ITEM(sipPy, i), sipType_KMimeType, SIP_NOT_NONE))
+ return 0;
+
+ return 1;
+@@ -133,11 +133,11 @@ public:
+ for (int i = 0; i < PyList_GET_SIZE(sipPy); ++i)
+ {
+ int state;
+- KMimeType *t = reinterpret_cast<KMimeType *>(sipConvertToInstance(PyList_GET_ITEM(sipPy, i), sipClass_KMimeType, sipTransferObj, SIP_NOT_NONE, &state, sipIsErr));
++ KMimeType *t = reinterpret_cast<KMimeType *>(sipConvertToType(PyList_GET_ITEM(sipPy, i), sipType_KMimeType, sipTransferObj, SIP_NOT_NONE, &state, sipIsErr));
+
+ if (*sipIsErr)
+ {
+- sipReleaseInstance(t, sipClass_KMimeType, state);
++ sipReleaseType(t, sipType_KMimeType, state);
+
+ delete ql;
+ return 0;
+@@ -147,7 +147,7 @@ public:
+
+ ql->append(*tptr);
+
+- sipReleaseInstance(t, sipClass_KMimeType, state);
++ sipReleaseType(t, sipType_KMimeType, state);
+ }
+
+ *sipCppPtr = ql;
+diff --git a/sip/kdecore/ksharedconfig.sip b/sip/kdecore/ksharedconfig.sip
+index 54b1599..9442d80 100644
+--- a/sip/kdecore/ksharedconfig.sip
++++ b/sip/kdecore/ksharedconfig.sip
+@@ -65,7 +65,7 @@ typedef KSharedConfig::Ptr KSharedConfigPtr;
+ KSharedConfigPtr kcpp = *sipCpp;
+ KSharedConfig *ksc = kcpp.data ();
+ ksc->ref.ref();
+- PyObject *pyKsc = sipConvertFromInstance(ksc, sipClass_KSharedConfig, sipTransferObj);
++ PyObject *pyKsc = sipConvertFromType(ksc, sipType_KSharedConfig, sipTransferObj);
+ return pyKsc;
+ %End
+
+@@ -74,7 +74,7 @@ typedef KSharedConfig::Ptr KSharedConfigPtr;
+ return 1;
+
+ int state;
+- KSharedConfig* ksc = (KSharedConfig *)sipConvertToInstance(sipPy, sipClass_KSharedConfig, sipTransferObj, SIP_NOT_NONE, &state, sipIsErr);
++ KSharedConfig* ksc = (KSharedConfig *)sipConvertToType(sipPy, sipType_KSharedConfig, sipTransferObj, SIP_NOT_NONE, &state, sipIsErr);
+ *sipCppPtr = new KSharedConfigPtr (ksc);
+ ksc->ref.deref();
+ return sipGetState(sipTransferObj);
+diff --git a/sip/kdecore/ksycocaentry.sip b/sip/kdecore/ksycocaentry.sip
+index 4632e4a..ceb85fa 100644
+--- a/sip/kdecore/ksycocaentry.sip
++++ b/sip/kdecore/ksycocaentry.sip
+@@ -83,7 +83,7 @@ private:
+ KSycocaEntry::Ptr *t = new KSycocaEntry::Ptr (sipCpp->at(i));
+ PyObject *tobj;
+
+- if ((tobj = sipConvertFromNewInstance(t->data(), sipClass_KSycocaEntry, sipTransferObj)) == NULL)
++ if ((tobj = sipConvertFromNewType(t->data(), sipType_KSycocaEntry, sipTransferObj)) == NULL)
+ {
+ Py_DECREF(l);
+ delete t;
+@@ -105,7 +105,7 @@ private:
+ return 0;
+
+ for (int i = 0; i < PyList_GET_SIZE(sipPy); ++i)
+- if (!sipCanConvertToInstance(PyList_GET_ITEM(sipPy, i), sipClass_KSycocaEntry, SIP_NOT_NONE))
++ if (!sipCanConvertToType(PyList_GET_ITEM(sipPy, i), sipType_KSycocaEntry, SIP_NOT_NONE))
+ return 0;
+
+ return 1;
+@@ -116,11 +116,11 @@ private:
+ for (int i = 0; i < PyList_GET_SIZE(sipPy); ++i)
+ {
+ int state;
+- KSycocaEntry *t = reinterpret_cast<KSycocaEntry *>(sipConvertToInstance(PyList_GET_ITEM(sipPy, i), sipClass_KSycocaEntry, sipTransferObj, SIP_NOT_NONE, &state, sipIsErr));
++ KSycocaEntry *t = reinterpret_cast<KSycocaEntry *>(sipConvertToType(PyList_GET_ITEM(sipPy, i), sipType_KSycocaEntry, sipTransferObj, SIP_NOT_NONE, &state, sipIsErr));
+
+ if (*sipIsErr)
+ {
+- sipReleaseInstance(t, sipClass_KSycocaEntry, state);
++ sipReleaseType(t, sipType_KSycocaEntry, state);
+
+ delete ql;
+ return 0;
+@@ -130,7 +130,7 @@ private:
+
+ ql->append(*tptr);
+
+- sipReleaseInstance(t, sipClass_KSycocaEntry, state);
++ sipReleaseType(t, sipType_KSycocaEntry, state);
+ }
+
+ *sipCppPtr = ql;
+diff --git a/sip/kdecore/typedefs.sip b/sip/kdecore/typedefs.sip
+index af53f85..23956b7 100644
+--- a/sip/kdecore/typedefs.sip
++++ b/sip/kdecore/typedefs.sip
+@@ -397,8 +397,8 @@ template <TYPE1,TYPE2>
+ TYPE1 *t1 = new TYPE1(i.key());
+ TYPE2 *t2 = new TYPE2(i.value());
+
+- PyObject *t1obj = sipConvertFromNewInstance(t1, sipClass_TYPE1, sipTransferObj);
+- PyObject *t2obj = sipConvertFromNewInstance(t2, sipClass_TYPE2, sipTransferObj);
++ PyObject *t1obj = sipConvertFromNewType(t1, sipType_TYPE1, sipTransferObj);
++ PyObject *t2obj = sipConvertFromNewType(t2, sipType_TYPE2, sipTransferObj);
+
+ if (t1obj == NULL || t2obj == NULL || PyDict_SetItem(d, t1obj, t2obj) < 0)
+ {
+@@ -438,10 +438,10 @@ template <TYPE1,TYPE2>
+
+ while (PyDict_Next(sipPy, &i, &t1obj, &t2obj))
+ {
+- if (!sipCanConvertToInstance(t1obj, sipClass_TYPE1, SIP_NOT_NONE))
++ if (!sipCanConvertToType(t1obj, sipType_TYPE1, SIP_NOT_NONE))
+ return 0;
+
+- if (!sipCanConvertToInstance(t2obj, sipClass_TYPE2, SIP_NOT_NONE))
++ if (!sipCanConvertToType(t2obj, sipType_TYPE2, SIP_NOT_NONE))
+ return 0;
+ }
+
+@@ -454,13 +454,13 @@ template <TYPE1,TYPE2>
+ {
+ int state1, state2;
+
+- TYPE1 *t1 = reinterpret_cast<TYPE1 *>(sipConvertToInstance(t1obj, sipClass_TYPE1, sipTransferObj, SIP_NOT_NONE, &state1, sipIsErr));
+- TYPE2 *t2 = reinterpret_cast<TYPE2 *>(sipConvertToInstance(t2obj, sipClass_TYPE2, sipTransferObj, SIP_NOT_NONE, &state2, sipIsErr));
++ TYPE1 *t1 = reinterpret_cast<TYPE1 *>(sipConvertToType(t1obj, sipType_TYPE1, sipTransferObj, SIP_NOT_NONE, &state1, sipIsErr));
++ TYPE2 *t2 = reinterpret_cast<TYPE2 *>(sipConvertToType(t2obj, sipType_TYPE2, sipTransferObj, SIP_NOT_NONE, &state2, sipIsErr));
+
+ if (*sipIsErr)
+ {
+- sipReleaseInstance(t1, sipClass_TYPE1, state1);
+- sipReleaseInstance(t2, sipClass_TYPE2, state2);
++ sipReleaseType(t1, sipType_TYPE1, state1);
++ sipReleaseType(t2, sipType_TYPE2, state2);
+
+ delete qm;
+ return 0;
+@@ -468,8 +468,8 @@ template <TYPE1,TYPE2>
+
+ qm->insert(*t1, *t2);
+
+- sipReleaseInstance(t1, sipClass_TYPE1, state1);
+- sipReleaseInstance(t2, sipClass_TYPE2, state2);
++ sipReleaseType(t1, sipType_TYPE1, state1);
++ sipReleaseType(t2, sipType_TYPE2, state2);
+ }
+
+ *sipCppPtr = qm;
+@@ -669,7 +669,7 @@ template <TYPE*>
+ TYPE *t = (TYPE *)(sipCpp->at(i));
+ PyObject *tobj;
+
+- if ((tobj = sipConvertFromNewInstance(t, sipClass_TYPE, sipTransferObj)) == NULL)
++ if ((tobj = sipConvertFromNewType(t, sipType_TYPE, sipTransferObj)) == NULL)
+ {
+ Py_DECREF(l);
+ delete t;
+@@ -691,7 +691,7 @@ template <TYPE*>
+ return 0;
+
+ for (int i = 0; i < PyList_GET_SIZE(sipPy); ++i)
+- if (!sipCanConvertToInstance(PyList_GET_ITEM(sipPy, i), sipClass_TYPE, SIP_NOT_NONE))
++ if (!sipCanConvertToType(PyList_GET_ITEM(sipPy, i), sipType_TYPE, SIP_NOT_NONE))
+ return 0;
+
+ return 1;
+@@ -702,11 +702,11 @@ template <TYPE*>
+ for (int i = 0; i < PyList_GET_SIZE(sipPy); ++i)
+ {
+ int state;
+- TYPE *t = reinterpret_cast<TYPE *>(sipConvertToInstance(PyList_GET_ITEM(sipPy, i), sipClass_TYPE, sipTransferObj, SIP_NOT_NONE, &state, sipIsErr));
++ TYPE *t = reinterpret_cast<TYPE *>(sipConvertToType(PyList_GET_ITEM(sipPy, i), sipType_TYPE, sipTransferObj, SIP_NOT_NONE, &state, sipIsErr));
+
+ if (*sipIsErr)
+ {
+- sipReleaseInstance(t, sipClass_TYPE, state);
++ sipReleaseType(t, sipType_TYPE, state);
+
+ delete qv;
+ return 0;
+@@ -714,7 +714,7 @@ template <TYPE*>
+
+ qv->append(t);
+
+- sipReleaseInstance(t, sipClass_TYPE, state);
++ sipReleaseType(t, sipType_TYPE, state);
+ }
+
+ *sipCppPtr = qv;
+diff --git a/sip/kdeui/kcompletion.sip b/sip/kdeui/kcompletion.sip
+index f1d327f..938506a 100644
+--- a/sip/kdeui/kcompletion.sip
++++ b/sip/kdeui/kcompletion.sip
+@@ -176,7 +176,7 @@ public:
+ #else
+ PyObject *kobj = PyInt_FromLong((int)i.key());
+ #endif
+- PyObject *tobj = sipConvertFromNewInstance(t, sipClass_KShortcut, sipTransferObj);
++ PyObject *tobj = sipConvertFromNewType(t, sipType_KShortcut, sipTransferObj);
+
+ if (kobj == NULL || tobj == NULL || PyDict_SetItem(d, kobj, tobj) < 0)
+ {
+@@ -213,7 +213,7 @@ public:
+ return 0;
+
+ while (PyDict_Next(sipPy, &i, &kobj, &tobj))
+- if (!sipCanConvertToInstance(tobj, sipClass_KShortcut, SIP_NOT_NONE))
++ if (!sipCanConvertToType(tobj, sipType_KShortcut, SIP_NOT_NONE))
+ return 0;
+
+ return 1;
+@@ -229,11 +229,11 @@ public:
+ #else
+ int k = PyInt_AsLong(kobj);
+ #endif
+- KShortcut *t = reinterpret_cast<KShortcut *>(sipConvertToInstance(tobj, sipClass_KShortcut, sipTransferObj, SIP_NOT_NONE, &state, sipIsErr));
++ KShortcut *t = reinterpret_cast<KShortcut *>(sipConvertToType(tobj, sipType_KShortcut, sipTransferObj, SIP_NOT_NONE, &state, sipIsErr));
+
+ if (*sipIsErr)
+ {
+- sipReleaseInstance(t, sipClass_KShortcut, state);
++ sipReleaseType(t, sipType_KShortcut, state);
+
+ delete qm;
+ return 0;
+@@ -241,7 +241,7 @@ public:
+
+ qm->insert((KCompletionBase::KeyBindingType)k, *t);
+
+- sipReleaseInstance(t, sipClass_KShortcut, state);
++ sipReleaseType(t, sipType_KShortcut, state);
+ }
+
+ *sipCppPtr = qm;
+diff --git a/sip/kdeui/kxmlguibuilder.sip b/sip/kdeui/kxmlguibuilder.sip
+index 41ae2aa..e4cf187 100644
+--- a/sip/kdeui/kxmlguibuilder.sip
++++ b/sip/kdeui/kxmlguibuilder.sip
+@@ -49,10 +49,10 @@ QAction *containerAction;
+ PyObject *pyWidget;
+ PyObject *pyContainerAction;
+
+- if ((pyWidget = sipConvertFromNewInstance(res, sipClass_QWidget, NULL)) == NULL)
++ if ((pyWidget = sipConvertFromNewType(res, sipType_QWidget, NULL)) == NULL)
+ return NULL;
+
+- if ((pyContainerAction = sipConvertFromNewInstance(containerAction, sipClass_QAction, NULL)) == NULL)
++ if ((pyContainerAction = sipConvertFromNewType(containerAction, sipType_QAction, NULL)) == NULL)
+ return NULL;
+
+ sipRes = Py_BuildValue ("NN", pyWidget, pyContainerAction);
+diff --git a/sip/kio/kservicegroup.sip b/sip/kio/kservicegroup.sip
+index a1ef981..1ddce37 100644
+--- a/sip/kio/kservicegroup.sip
++++ b/sip/kio/kservicegroup.sip
+@@ -151,7 +151,7 @@ public:
+ KServiceGroup::SPtr *t = new KServiceGroup::SPtr (sipCpp->at(i));
+ PyObject *tobj;
+
+- if ((tobj = sipConvertFromNewInstance(t->data(), sipClass_KServiceGroup, sipTransferObj)) == NULL)
++ if ((tobj = sipConvertFromNewType(t->data(), sipType_KServiceGroup, sipTransferObj)) == NULL)
+ {
+ Py_DECREF(l);
+ delete t;
+@@ -173,7 +173,7 @@ public:
+ return 0;
+
+ for (int i = 0; i < PyList_GET_SIZE(sipPy); ++i)
+- if (!sipCanConvertToInstance(PyList_GET_ITEM(sipPy, i), sipClass_KServiceGroup, SIP_NOT_NONE))
++ if (!sipCanConvertToType(PyList_GET_ITEM(sipPy, i), sipType_KServiceGroup, SIP_NOT_NONE))
+ return 0;
+
+ return 1;
+@@ -184,11 +184,11 @@ public:
+ for (int i = 0; i < PyList_GET_SIZE(sipPy); ++i)
+ {
+ int state;
+- KServiceGroup *t = reinterpret_cast<KServiceGroup *>(sipConvertToInstance(PyList_GET_ITEM(sipPy, i), sipClass_KServiceGroup, sipTransferObj, SIP_NOT_NONE, &state, sipIsErr));
++ KServiceGroup *t = reinterpret_cast<KServiceGroup *>(sipConvertToType(PyList_GET_ITEM(sipPy, i), sipType_KServiceGroup, sipTransferObj, SIP_NOT_NONE, &state, sipIsErr));
+
+ if (*sipIsErr)
+ {
+- sipReleaseInstance(t, sipClass_KServiceGroup, state);
++ sipReleaseType(t, sipType_KServiceGroup, state);
+
+ delete ql;
+ return 0;
+@@ -198,7 +198,7 @@ public:
+
+ ql->append(*tptr);
+
+- sipReleaseInstance(t, sipClass_KServiceGroup, state);
++ sipReleaseType(t, sipType_KServiceGroup, state);
+ }
+
+ *sipCppPtr = ql;
+diff --git a/sip/ktexteditor/markinterface.sip b/sip/ktexteditor/markinterface.sip
+index d9b0ec9..888c506 100644
+--- a/sip/ktexteditor/markinterface.sip
++++ b/sip/ktexteditor/markinterface.sip
+@@ -158,7 +158,7 @@ signals:
+ #else
+ PyObject *t1obj = PyInt_FromLong ((long)t1);
+ #endif
+- PyObject *t2obj = sipConvertFromNewInstance(t2, sipClass_KTextEditor_Mark, sipTransferObj);
++ PyObject *t2obj = sipConvertFromNewType(t2, sipType_KTextEditor_Mark, sipTransferObj);
+
+ if (t2obj == NULL || PyDict_SetItem(d, t1obj, t2obj) < 0)
+ {
+@@ -203,7 +203,7 @@ signals:
+ #endif
+ return 0;
+
+- if (!sipCanConvertToInstance(t2obj, sipClass_KTextEditor_Mark, SIP_NOT_NONE))
++ if (!sipCanConvertToType(t2obj, sipType_KTextEditor_Mark, SIP_NOT_NONE))
+ return 0;
+ }
+
+@@ -221,11 +221,11 @@ signals:
+ #else
+ int t1 = PyInt_AS_LONG (t1obj);
+ #endif
+- KTextEditor::Mark *t2 = reinterpret_cast<KTextEditor::Mark *>(sipConvertToInstance(t2obj, sipClass_KTextEditor_Mark, sipTransferObj, SIP_NOT_NONE, &state2, sipIsErr));
++ KTextEditor::Mark *t2 = reinterpret_cast<KTextEditor::Mark *>(sipConvertToType(t2obj, sipType_KTextEditor_Mark, sipTransferObj, SIP_NOT_NONE, &state2, sipIsErr));
+
+ if (*sipIsErr)
+ {
+- sipReleaseInstance(t2, sipClass_KTextEditor_Mark, state2);
++ sipReleaseType(t2, sipType_KTextEditor_Mark, state2);
+
+ delete qm;
+ return 0;
+@@ -233,7 +233,7 @@ signals:
+
+ qm->insert(t1, t2);
+
+- sipReleaseInstance(t2, sipClass_KTextEditor_Mark, state2);
++ sipReleaseType(t2, sipType_KTextEditor_Mark, state2);
+ }
+
+ *sipCppPtr = qm;
+diff --git a/sip/phonon/objectdescription.sip b/sip/phonon/objectdescription.sip
+index 2b86d5e..015b2ef 100644
+--- a/sip/phonon/objectdescription.sip
++++ b/sip/phonon/objectdescription.sip
+@@ -116,7 +116,7 @@ void registerMetaTypes ();
+ DNSSD::RemoteService::Ptr *t = new Phonon::ObjectDescription (sipCpp->at(i));
+ PyObject *tobj;
+
+- if ((tobj = sipConvertFromNewInstance(t->data(), sipClass_DNSSD_RemoteService, sipTransferObj)) == NULL)
++ if ((tobj = sipConvertFromNewType(t->data(), sipType_DNSSD_RemoteService, sipTransferObj)) == NULL)
+ {
+ Py_DECREF(l);
+ delete t;
+@@ -138,7 +138,7 @@ void registerMetaTypes ();
+ return 0;
+
+ for (int i = 0; i < PyList_GET_SIZE(sipPy); ++i)
+- if (!sipCanConvertToInstance(PyList_GET_ITEM(sipPy, i), sipClass_DNSSD_RemoteService, SIP_NOT_NONE))
++ if (!sipCanConvertToType(PyList_GET_ITEM(sipPy, i), sipType_DNSSD_RemoteService, SIP_NOT_NONE))
+ return 0;
+
+ return 1;
+@@ -149,11 +149,11 @@ void registerMetaTypes ();
+ for (int i = 0; i < PyList_GET_SIZE(sipPy); ++i)
+ {
+ int state;
+- DNSSD::RemoteService *t = reinterpret_cast<DNSSD::RemoteService *>(sipConvertToInstance(PyList_GET_ITEM(sipPy, i), sipClass_DNSSD_RemoteService, sipTransferObj, SIP_NOT_NONE, &state, sipIsErr));
++ DNSSD::RemoteService *t = reinterpret_cast<DNSSD::RemoteService *>(sipConvertToType(PyList_GET_ITEM(sipPy, i), sipType_DNSSD_RemoteService, sipTransferObj, SIP_NOT_NONE, &state, sipIsErr));
+
+ if (*sipIsErr)
+ {
+- sipReleaseInstance(t, sipClass_DNSSD_RemoteService, state);
++ sipReleaseType(t, sipType_DNSSD_RemoteService, state);
+
+ delete ql;
+ return 0;
+@@ -163,7 +163,7 @@ void registerMetaTypes ();
+
+ ql->append(*tptr);
+
+- sipReleaseInstance(t, sipClass_DNSSD_RemoteService, state);
++ sipReleaseType(t, sipType_DNSSD_RemoteService, state);
+ }
+
+ *sipCppPtr = ql;
+diff --git a/sip/soprano/pluginmanager.sip b/sip/soprano/pluginmanager.sip
+index c2be1c3..fe990f8 100644
+--- a/sip/soprano/pluginmanager.sip
++++ b/sip/soprano/pluginmanager.sip
+@@ -73,7 +73,7 @@ public:
+ Soprano::Backend* t = const_cast<Soprano::Backend*>(sipCpp->at(i));
+ PyObject *tobj;
+
+- if ((tobj = sipConvertFromInstance(t, sipClass_Soprano_Backend, sipTransferObj)) == NULL)
++ if ((tobj = sipConvertFromType(t, sipType_Soprano_Backend, sipTransferObj)) == NULL)
+ {
+ Py_DECREF(l);
+ return NULL;
+@@ -93,7 +93,7 @@ public:
+ return 0;
+
+ for (int i = 0; i < PyList_GET_SIZE(sipPy); ++i)
+- if (!sipCanConvertToInstance(PyList_GET_ITEM(sipPy, i), sipClass_Soprano_Backend, SIP_NOT_NONE))
++ if (!sipCanConvertToType(PyList_GET_ITEM(sipPy, i), sipType_Soprano_Backend, SIP_NOT_NONE))
+ return 0;
+
+ return 1;
+@@ -104,18 +104,18 @@ public:
+ for (int i = 0; i < PyList_GET_SIZE(sipPy); ++i)
+ {
+ int state;
+- const Soprano::Backend*t = reinterpret_cast<const Soprano::Backend*>(sipConvertToInstance(PyList_GET_ITEM(sipPy, i), sipClass_Soprano_Backend, sipTransferObj, SIP_NOT_NONE, &state, sipIsErr));
++ const Soprano::Backend*t = reinterpret_cast<const Soprano::Backend*>(sipConvertToType(PyList_GET_ITEM(sipPy, i), sipType_Soprano_Backend, sipTransferObj, SIP_NOT_NONE, &state, sipIsErr));
+
+ if (*sipIsErr)
+ {
+- sipReleaseInstance(const_cast<Soprano::Backend*>(t), sipClass_Soprano_Backend, state);
++ sipReleaseType(const_cast<Soprano::Backend*>(t), sipType_Soprano_Backend, state);
+
+ delete ql;
+ return 0;
+ }
+ ql->append(t);
+
+- sipReleaseInstance(const_cast<Soprano::Backend*>(t), sipClass_Soprano_Backend, state);
++ sipReleaseType(const_cast<Soprano::Backend*>(t), sipType_Soprano_Backend, state);
+ }
+
+ *sipCppPtr = ql;
+@@ -144,7 +144,7 @@ public:
+ Soprano::Parser* t = const_cast<Soprano::Parser*>(sipCpp->at(i));
+ PyObject *tobj;
+
+- if ((tobj = sipConvertFromInstance(t, sipClass_Soprano_Parser, sipTransferObj)) == NULL)
++ if ((tobj = sipConvertFromType(t, sipType_Soprano_Parser, sipTransferObj)) == NULL)
+ {
+ Py_DECREF(l);
+ return NULL;
+@@ -164,7 +164,7 @@ public:
+ return 0;
+
+ for (int i = 0; i < PyList_GET_SIZE(sipPy); ++i)
+- if (!sipCanConvertToInstance(PyList_GET_ITEM(sipPy, i), sipClass_Soprano_Parser, SIP_NOT_NONE))
++ if (!sipCanConvertToType(PyList_GET_ITEM(sipPy, i), sipType_Soprano_Parser, SIP_NOT_NONE))
+ return 0;
+
+ return 1;
+@@ -175,18 +175,18 @@ public:
+ for (int i = 0; i < PyList_GET_SIZE(sipPy); ++i)
+ {
+ int state;
+- const Soprano::Parser*t = reinterpret_cast<const Soprano::Parser*>(sipConvertToInstance(PyList_GET_ITEM(sipPy, i), sipClass_Soprano_Parser, sipTransferObj, SIP_NOT_NONE, &state, sipIsErr));
++ const Soprano::Parser*t = reinterpret_cast<const Soprano::Parser*>(sipConvertToType(PyList_GET_ITEM(sipPy, i), sipType_Soprano_Parser, sipTransferObj, SIP_NOT_NONE, &state, sipIsErr));
+
+ if (*sipIsErr)
+ {
+- sipReleaseInstance(const_cast<Soprano::Parser*>(t), sipClass_Soprano_Parser, state);
++ sipReleaseType(const_cast<Soprano::Parser*>(t), sipType_Soprano_Parser, state);
+
+ delete ql;
+ return 0;
+ }
+ ql->append(t);
+
+- sipReleaseInstance(const_cast<Soprano::Parser*>(t), sipClass_Soprano_Parser, state);
++ sipReleaseType(const_cast<Soprano::Parser*>(t), sipType_Soprano_Parser, state);
+ }
+
+ *sipCppPtr = ql;
+@@ -215,7 +215,7 @@ public:
+ Soprano::Serializer* t = const_cast<Soprano::Serializer*>(sipCpp->at(i));
+ PyObject *tobj;
+
+- if ((tobj = sipConvertFromInstance(t, sipClass_Soprano_Serializer, sipTransferObj)) == NULL)
++ if ((tobj = sipConvertFromType(t, sipType_Soprano_Serializer, sipTransferObj)) == NULL)
+ {
+ Py_DECREF(l);
+ return NULL;
+@@ -235,7 +235,7 @@ public:
+ return 0;
+
+ for (int i = 0; i < PyList_GET_SIZE(sipPy); ++i)
+- if (!sipCanConvertToInstance(PyList_GET_ITEM(sipPy, i), sipClass_Soprano_Serializer, SIP_NOT_NONE))
++ if (!sipCanConvertToType(PyList_GET_ITEM(sipPy, i), sipType_Soprano_Serializer, SIP_NOT_NONE))
+ return 0;
+
+ return 1;
+@@ -246,18 +246,18 @@ public:
+ for (int i = 0; i < PyList_GET_SIZE(sipPy); ++i)
+ {
+ int state;
+- const Soprano::Serializer*t = reinterpret_cast<const Soprano::Serializer*>(sipConvertToInstance(PyList_GET_ITEM(sipPy, i), sipClass_Soprano_Serializer, sipTransferObj, SIP_NOT_NONE, &state, sipIsErr));
++ const Soprano::Serializer*t = reinterpret_cast<const Soprano::Serializer*>(sipConvertToType(PyList_GET_ITEM(sipPy, i), sipType_Soprano_Serializer, sipTransferObj, SIP_NOT_NONE, &state, sipIsErr));
+
+ if (*sipIsErr)
+ {
+- sipReleaseInstance(const_cast<Soprano::Serializer*>(t), sipClass_Soprano_Serializer, state);
++ sipReleaseType(const_cast<Soprano::Serializer*>(t), sipType_Soprano_Serializer, state);
+
+ delete ql;
+ return 0;
+ }
+ ql->append(t);
+
+- sipReleaseInstance(const_cast<Soprano::Serializer*>(t), sipClass_Soprano_Serializer, state);
++ sipReleaseType(const_cast<Soprano::Serializer*>(t), sipType_Soprano_Serializer, state);
+ }
+
+ *sipCppPtr = ql;
+--
+2.9.3
+
diff --git a/kde/patch/sddm-qt5.patch b/kde/patch/sddm-qt5.patch
index fa4e1b3..21f2c04 100644
--- a/kde/patch/sddm-qt5.patch
+++ b/kde/patch/sddm-qt5.patch
@@ -2,9 +2,24 @@
# (brings back the switch_user functionality in KDE):
cat $CWD/patch/sddm-qt5/sddm_consolekit.diff | patch -p1 --verbose || { touch ${SLACK_KDE_BUILD_DIR}/${PKGNAME}.failed ; continue ; }
+# SDDM 0.14 sources $HOME/.xsession which in Slackware will override the
+# session selection you make in SDDM. We fix that unwanted side effect by
+# reverting the change:
+cat $CWD/patch/sddm-qt5/sddm_userxsession.diff | patch -p1 --verbose || { touch ${SLACK_KDE_BUILD_DIR}/${PKGNAME}.failed ; continue ; }
+
+# Fix display of user avatars ($HOME/.face.icon file)
+# (fixed in sddm-0.15.0).
+#cat $CWD//patch/sddm-qt5/sddm_avatars.patch | patch -p1 --verbose || { touch ${SLACK_KDE_BUILD_DIR}/${PKGNAME}.failed ; continue ; }
+
# Fix a compilation error on passwd backend:
#cat $CWD/patch/sddm-qt5/sddm_auth.diff | patch -p1 --verbose || { touch ${SLACK_KDE_BUILD_DIR}/${PKGNAME}.failed ; continue ; }
# Fix a compilation error on passwd backend:
# (fixed in sddm-0.12.0).
#cat $CWD/patch/sddm-qt5/sddm_qstring.patch | patch -p1 --verbose || { touch ${SLACK_KDE_BUILD_DIR}/${PKGNAME}.failed ; continue ; }
+
+# Add the dutch translation:
+if ! grep -q nl.ts data/translations/CMakeLists.txt ; then
+ sed -e '/set(TRANSLATION_FILES/s/TRANSLATION_FILES/&\n nl.ts/' \
+ -i data/translations/CMakeLists.txt
+fi
diff --git a/kde/patch/sddm-qt5/sddm_avatars.patch b/kde/patch/sddm-qt5/sddm_avatars.patch
new file mode 100644
index 0000000..d40f68c
--- /dev/null
+++ b/kde/patch/sddm-qt5/sddm_avatars.patch
@@ -0,0 +1,33 @@
+From ecb903e48822bd90650bdd64fe80754e3e9664cb Mon Sep 17 00:00:00 2001
+From: Bastian Beischer <bastian.beischer@gmail.com>
+Date: Fri, 2 Sep 2016 13:05:18 +0200
+Subject: [PATCH] Fix display of user avatars. (#684)
+
+QFile::exists("...") does not understand file:// URLs, at least in Qt
+5.7.0 and Qt 4.8.7.
+---
+ src/greeter/UserModel.cpp | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/src/greeter/UserModel.cpp b/src/greeter/UserModel.cpp
+index 41a9f10..94c492d 100644
+--- a/src/greeter/UserModel.cpp
++++ b/src/greeter/UserModel.cpp
+@@ -107,13 +107,13 @@ namespace SDDM {
+ d->lastIndex = i;
+
+ if (avatarsEnabled) {
+- const QString userFace = QStringLiteral("file://%1/.face.icon").arg(user->homeDir);
+- const QString systemFace = QStringLiteral("file://%1/%2.face.icon").arg(facesDir).arg(user->name);
++ const QString userFace = QStringLiteral("%1/.face.icon").arg(user->homeDir);
++ const QString systemFace = QStringLiteral("%1/%2.face.icon").arg(facesDir).arg(user->name);
+
+ if (QFile::exists(userFace))
+- user->icon = userFace;
++ user->icon = QStringLiteral("file://%1").arg(userFace);
+ else if (QFile::exists(systemFace))
+- user->icon = systemFace;
++ user->icon = QStringLiteral("file://%1").arg(systemFace);
+ }
+ }
+ }
diff --git a/kde/patch/sddm-qt5/sddm_consolekit.diff b/kde/patch/sddm-qt5/sddm_consolekit.diff
index af79f75..9b535bf 100644
--- a/kde/patch/sddm-qt5/sddm_consolekit.diff
+++ b/kde/patch/sddm-qt5/sddm_consolekit.diff
@@ -1,13 +1,9 @@
-diff --git a/data/scripts/Xsession b/data/scripts/Xsession
-index a5d270d..4b48524 100755
---- a/data/scripts/Xsession
-+++ b/data/scripts/Xsession
-@@ -74,7 +74,7 @@ case $session in
- exec xterm -geometry 80x24-0-0
- ;;
- *)
-- eval exec "$session"
-+ eval exec ck-launch-session dbus-launch --sh-syntax --exit-with-session "$session"
- ;;
- esac
- exec xmessage -center -buttons OK:0 -default OK "Sorry, cannot execute $session. Check $DESKTOP_SESSION.desktop."
+--- sddm-0.14.0/data/scripts/Xsession.orig 2016-08-28 13:54:03.000000000 +0200
++++ sddm-0.14.0/data/scripts/Xsession 2016-11-05 21:47:28.502096600 +0100
+@@ -91,5 +91,5 @@
+ if [ -z "$@" ]; then
+ exec xmessage -center -buttons OK:0 -default OK "Sorry, $DESKTOP_SESSION is no valid session."
+ else
+- exec $@
++ exec ck-launch-session dbus-launch --sh-syntax --exit-with-session $@
+ fi
diff --git a/kde/patch/sddm-qt5/sddm_userxsession.diff b/kde/patch/sddm-qt5/sddm_userxsession.diff
new file mode 100644
index 0000000..cbfa1ef
--- /dev/null
+++ b/kde/patch/sddm-qt5/sddm_userxsession.diff
@@ -0,0 +1,13 @@
+--- sddm-0.14.0/data/scripts/Xsession.orig 2016-08-28 13:54:03.000000000 +0200
++++ sddm-0.14.0/data/scripts/Xsession 2016-11-06 21:35:43.183138893 +0100
+@@ -84,10 +84,6 @@
+ fi
+ [ -f $HOME/.Xresources ] && xrdb -merge $HOME/.Xresources
+
+-if [ -f "$USERXSESSION" ]; then
+- . "$USERXSESSION"
+-fi
+-
+ if [ -z "$@" ]; then
+ exec xmessage -center -buttons OK:0 -default OK "Sorry, $DESKTOP_SESSION is no valid session."
+ else
diff --git a/kde/pkgsrc/akonadi b/kde/pkgsrc/akonadi
deleted file mode 100644
index 922a65a..0000000
--- a/kde/pkgsrc/akonadi
+++ /dev/null
@@ -1 +0,0 @@
-applications/akonadi
diff --git a/kde/pkgsrc/akonadi4 b/kde/pkgsrc/akonadi4
deleted file mode 100644
index bc4eb7a..0000000
--- a/kde/pkgsrc/akonadi4
+++ /dev/null
@@ -1 +0,0 @@
-kde4/akonadi
diff --git a/kde/pkgsrc/baloo b/kde/pkgsrc/baloo
deleted file mode 100644
index 6a9b10c..0000000
--- a/kde/pkgsrc/baloo
+++ /dev/null
@@ -1 +0,0 @@
-kde4/baloo
diff --git a/kde/pkgsrc/baloo-widgets b/kde/pkgsrc/baloo-widgets
deleted file mode 100644
index bf7d09d..0000000
--- a/kde/pkgsrc/baloo-widgets
+++ /dev/null
@@ -1 +0,0 @@
-kde4/baloo-widgets
diff --git a/kde/pkgsrc/kate b/kde/pkgsrc/kate
deleted file mode 100644
index b05851d..0000000
--- a/kde/pkgsrc/kate
+++ /dev/null
@@ -1 +0,0 @@
-applications/kate
diff --git a/kde/pkgsrc/katepart4 b/kde/pkgsrc/katepart4
deleted file mode 100644
index ffe6506..0000000
--- a/kde/pkgsrc/katepart4
+++ /dev/null
@@ -1,2 +0,0 @@
-kde4/kate
-
diff --git a/kde/pkgsrc/kdeconnect4 b/kde/pkgsrc/kdeconnect4
deleted file mode 100644
index 30dffe3..0000000
--- a/kde/pkgsrc/kdeconnect4
+++ /dev/null
@@ -1 +0,0 @@
-kde4-extragear/kdeconnect-kde
diff --git a/kde/pkgsrc/kdepimlibs b/kde/pkgsrc/kdepimlibs
deleted file mode 100644
index 46d9e49..0000000
--- a/kde/pkgsrc/kdepimlibs
+++ /dev/null
@@ -1 +0,0 @@
-applications/kdepimlibs
diff --git a/kde/pkgsrc/kdepimlibs4 b/kde/pkgsrc/kdepimlibs4
deleted file mode 100644
index 514f3bc..0000000
--- a/kde/pkgsrc/kdepimlibs4
+++ /dev/null
@@ -1 +0,0 @@
-kde4/kdepimlibs
diff --git a/kde/pkgsrc/konsole b/kde/pkgsrc/konsole
deleted file mode 100644
index 472571f..0000000
--- a/kde/pkgsrc/konsole
+++ /dev/null
@@ -1 +0,0 @@
-applications/konsole
diff --git a/kde/pkgsrc/konsolepart4 b/kde/pkgsrc/konsolepart4
deleted file mode 100644
index 1ae9743..0000000
--- a/kde/pkgsrc/konsolepart4
+++ /dev/null
@@ -1 +0,0 @@
-kde4/konsole
diff --git a/kde/pkgsrc/libkdegames b/kde/pkgsrc/libkdegames
deleted file mode 100644
index 695b041..0000000
--- a/kde/pkgsrc/libkdegames
+++ /dev/null
@@ -1 +0,0 @@
-applications/libkdegames
diff --git a/kde/pkgsrc/libkdegames4 b/kde/pkgsrc/libkdegames4
deleted file mode 100644
index 328b0b0..0000000
--- a/kde/pkgsrc/libkdegames4
+++ /dev/null
@@ -1 +0,0 @@
-kde4/libkdegames
diff --git a/kde/pkgsrc/libkexiv2 b/kde/pkgsrc/libkexiv2
deleted file mode 100644
index e4d9d44..0000000
--- a/kde/pkgsrc/libkexiv2
+++ /dev/null
@@ -1 +0,0 @@
-applications/libkexiv2
diff --git a/kde/pkgsrc/libkexiv2_4 b/kde/pkgsrc/libkexiv2_4
deleted file mode 100644
index c8efb46..0000000
--- a/kde/pkgsrc/libkexiv2_4
+++ /dev/null
@@ -1 +0,0 @@
-kde4/libkexiv2
diff --git a/kde/pkgsrc/libkmahjongg b/kde/pkgsrc/libkmahjongg
deleted file mode 100644
index a3bf55e..0000000
--- a/kde/pkgsrc/libkmahjongg
+++ /dev/null
@@ -1 +0,0 @@
-applications/libkmahjongg
diff --git a/kde/pkgsrc/libkmahjongg4 b/kde/pkgsrc/libkmahjongg4
deleted file mode 100644
index 2d50a97..0000000
--- a/kde/pkgsrc/libkmahjongg4
+++ /dev/null
@@ -1 +0,0 @@
-kde4/libkmahjongg
diff --git a/kde/pkgsrc/libksane b/kde/pkgsrc/libksane
deleted file mode 100644
index 16816d1..0000000
--- a/kde/pkgsrc/libksane
+++ /dev/null
@@ -1 +0,0 @@
-applications/libksane
diff --git a/kde/pkgsrc/libksane4 b/kde/pkgsrc/libksane4
deleted file mode 100644
index 8ca5d7f..0000000
--- a/kde/pkgsrc/libksane4
+++ /dev/null
@@ -1 +0,0 @@
-kde4/libksane
diff --git a/kde/pkgsrc/okteta b/kde/pkgsrc/okteta
deleted file mode 100644
index d15b049..0000000
--- a/kde/pkgsrc/okteta
+++ /dev/null
@@ -1 +0,0 @@
-applications/okteta
diff --git a/kde/pkgsrc/oktetapart4 b/kde/pkgsrc/oktetapart4
deleted file mode 100644
index dd0c296..0000000
--- a/kde/pkgsrc/oktetapart4
+++ /dev/null
@@ -1,2 +0,0 @@
-kde4/okteta
-
diff --git a/kde/post-install/audiocd-kio4.post-install b/kde/post-install/audiocd-kio4.post-install
new file mode 100644
index 0000000..ec32ab1
--- /dev/null
+++ b/kde/post-install/audiocd-kio4.post-install
@@ -0,0 +1,6 @@
+# These are provided by audiocd-kio and not needed in the kdelibs4 based pkg:
+rm -r $PKG/usr/include
+rm -r $PKG/usr/share/config.kcfg
+# Remove symlink shared with KF5 based pkg:
+rm $PKG/usr/lib${LIBDIRSUFFIX}/libaudiocdplugins.so
+
diff --git a/kde/post-install/dolphin.post-install b/kde/post-install/dolphin.post-install
new file mode 100644
index 0000000..8b0f9e1
--- /dev/null
+++ b/kde/post-install/dolphin.post-install
@@ -0,0 +1,14 @@
+# Add a 'run dolphin as root' menu entry:
+mkdir -p $PKG/usr/share/applications
+cat <<EOT > $PKG/usr/share/applications/org.kde.dolphinsu.desktop
+[Desktop Entry]
+Name=File Manager - Super User Mode
+Exec=dbus-launch dolphin -qwindowtitle "%c" "%u"
+Icon=system-file-manager
+Type=Application
+X-DocPath=dolphin/index.html
+Categories=Qt;KDE;System;FileManager;
+Terminal=false
+MimeType=inode/directory;
+X-KDE-SubstituteUID=true
+EOT
diff --git a/kde/post-install/kde-runtime.post-install b/kde/post-install/kde-runtime.post-install
index fbdacfa..f138174 100644
--- a/kde/post-install/kde-runtime.post-install
+++ b/kde/post-install/kde-runtime.post-install
@@ -1,5 +1,5 @@
# Create a symlink in /usr/bin to the kdesu binary
-( cd $PKG/usr/bin ; ln -s /usr/lib${LIBDIRSUFFIX}/kde4/libexec/kdesu . )
+( cd $PKG/usr/bin ; ln -s /usr/lib${LIBDIRSUFFIX}/kde4/libexec/kdesu kdesu4 )
# Remove the hicolor icon theme index.theme so it doesn't clobber the real one
rm -f $PKG/usr/share/icons/hicolor/index.theme
diff --git a/kde/post-install/kdepimlibs4.post-install b/kde/post-install/kdepimlibs4.post-install
index ae30cc8..0cd6c30 100644
--- a/kde/post-install/kdepimlibs4.post-install
+++ b/kde/post-install/kdepimlibs4.post-install
@@ -1,3 +1,4 @@
# Remove files that clash with the Frameworks version of kdepimlibs:
rm -r $PKG/usr/bin
+rm -r $PKG/usr/share/akonadi
rm -r $PKG/usr/share/config.kcfg
diff --git a/kde/post-install/kdesu.post-install b/kde/post-install/kdesu.post-install
new file mode 100644
index 0000000..52402f5
--- /dev/null
+++ b/kde/post-install/kdesu.post-install
@@ -0,0 +1,4 @@
+# Create a symlink in /usr/bin to the KF5 kdesu binary
+mkdir -p $PKG/usr/bin
+( cd $PKG/usr/bin ; ln -s /usr/lib${LIBDIRSUFFIX}/kf5/kdesu kdesu )
+
diff --git a/kde/post-install/kde-baseapps.post-install b/kde/post-install/kservice.post-install
index 3ae4e1c..a014f3b 100644
--- a/kde/post-install/kde-baseapps.post-install
+++ b/kde/post-install/kservice.post-install
@@ -1,9 +1,9 @@
# Add profile scripts
mkdir -p $PKG/etc/profile.d
-cat $CWD/post-install/kde-baseapps/profile.d/kde.sh \
+cat $CWD/post-install/kservice/profile.d/kde.sh \
| sed -e "s#/lib/#/lib${LIBDIRSUFFIX}/#g" \
> $PKG/etc/profile.d/kde.sh
-cat $CWD/post-install/kde-baseapps/profile.d/kde.csh \
+cat $CWD/post-install/kservice/profile.d/kde.csh \
| sed -e "s#/lib/#/lib${LIBDIRSUFFIX}/#g" \
> $PKG/etc/profile.d/kde.csh
chmod 0755 $PKG/etc/profile.d/*
diff --git a/kde/post-install/kde-baseapps/profile.d/kde.csh b/kde/post-install/kservice/profile.d/kde.csh
index ce8f0c3..cce370c 100644
--- a/kde/post-install/kde-baseapps/profile.d/kde.csh
+++ b/kde/post-install/kservice/profile.d/kde.csh
@@ -12,7 +12,11 @@ else
endif
if ( ! $?XDG_RUNTIME_DIR ) then
- setenv XDG_RUNTIME_DIR /run/user/$USER
+ # Using /run/user would be more in line with XDG specs, but in that case
+ # we should mount /run as tmpfs and add this to the Slackware rc scripts:
+ # mkdir /run/user ; chmod 1777 /run/user
+ # setenv XDG_RUNTIME_DIR /run/user/$USER
+ setenv XDG_RUNTIME_DIR /tmp/xdg-runtime-$USER
mkdir -p $XDG_RUNTIME_DIR
chown $USER $XDG_RUNTIME_DIR
chmod 700 $XDG_RUNTIME_DIR
diff --git a/kde/post-install/kde-baseapps/profile.d/kde.sh b/kde/post-install/kservice/profile.d/kde.sh
index dfc93bd..9448c34 100644
--- a/kde/post-install/kde-baseapps/profile.d/kde.sh
+++ b/kde/post-install/kservice/profile.d/kde.sh
@@ -10,7 +10,11 @@ else
XDG_CONFIG_DIRS=/etc/xdg:/etc/kde/xdg
fi
if [ "$XDG_RUNTIME_DIR" = "" ]; then
- XDG_RUNTIME_DIR=/run/user/$USER
+ # Using /run/user would be more in line with XDG specs, but in that case
+ # we should mount /run as tmpfs and add this to the Slackware rc scripts:
+ # mkdir /run/user ; chmod 1777 /run/user
+ # XDG_RUNTIME_DIR=/run/user/$USER
+ XDG_RUNTIME_DIR=/tmp/xdg-runtime-$USER
mkdir -p $XDG_RUNTIME_DIR
chown $USER $XDG_RUNTIME_DIR
chmod 700 $XDG_RUNTIME_DIR
diff --git a/kde/post-install/plasma-workspace.post-install b/kde/post-install/plasma-workspace.post-install
index bf85e2f..ebeb5e0 100644
--- a/kde/post-install/plasma-workspace.post-install
+++ b/kde/post-install/plasma-workspace.post-install
@@ -6,9 +6,15 @@ cat $CWD/post-install/plasma-workspace/xinit/xinitrc.plasma \
| sed -e "s/@LIBDIRSUFFIX@/$LIBDIRSUFFIX/g" \
> $PKG/etc/X11/xinit/xinitrc.plasma
chmod 0755 $PKG/etc/X11/xinit/xinitrc.plasma
-cat $CWD/post-install/plasma-workspace/xinit/xinitrc.kwayland \
+mkdir -p $PKG/usr/bin
+cat $CWD/post-install/plasma-workspace/scripts/startkwayland \
| sed -e "s/@LIBDIRSUFFIX@/$LIBDIRSUFFIX/g" \
- > $PKG/etc/X11/xinit/xinitrc.kwayland
+ > $PKG/usr/bin/startkwayland
+chmod 0755 $PKG/usr/bin/startkwayland
+
+# ck-launch-session is needed for a Wayland session, since we do not have PAM:
+sed -e 's/^Exec=dbus-launch/Exec=ck-launch-session dbus-launch --sh-syntax/' \
+ -i $PKG/usr/share/wayland-sessions/plasmawayland.desktop
# Add a "fail-safe" version of KDE Plasma desktop session.
# Prefix the name with "z_" because SDDM is braindead:
diff --git a/kde/post-install/plasma-workspace/scripts/startkwayland b/kde/post-install/plasma-workspace/scripts/startkwayland
new file mode 100644
index 0000000..506e276
--- /dev/null
+++ b/kde/post-install/plasma-workspace/scripts/startkwayland
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+# Start KWin as a Plasma 5 Wayland session
+ck-launch-session dbus-launch --sh-syntax --exit-with-session /usr/bin/startplasmacompositor
diff --git a/kde/post-install/plasma-workspace/xinit/xinitrc.kwayland b/kde/post-install/plasma-workspace/xinit/xinitrc.kwayland
deleted file mode 100644
index 43feb31..0000000
--- a/kde/post-install/plasma-workspace/xinit/xinitrc.kwayland
+++ /dev/null
@@ -1,32 +0,0 @@
-#!/bin/sh
-# $XConsortium: xinitrc.cpp,v 1.4 91/08/22 11:41:34 rws Exp $
-
-userresources=$HOME/.Xresources
-usermodmap=$HOME/.Xmodmap
-sysresources=/etc/X11/xinit/.Xresources
-sysmodmap=/etc/X11/xinit/.Xmodmap
-
-# merge in defaults and keymaps
-
-if [ -f $sysresources ]; then
- xrdb -merge $sysresources
-fi
-
-if [ -f $sysmodmap ]; then
- xmodmap $sysmodmap
-fi
-
-if [ -f $userresources ]; then
- xrdb -merge $userresources
-fi
-
-if [ -f $usermodmap ]; then
- xmodmap $usermodmap
-fi
-
-# Start the window manager:
-if [ -z "$DESKTOP_SESSION" -a -x /usr/bin/ck-launch-session ]; then
- ck-launch-session dbus-launch --sh-syntax --exit-with-session startplasmacompositor
-else
- dbus-launch --sh-syntax --exit-with-session startplasmacompositor
-fi
diff --git a/kde/post-install/sddm-qt5.post-install b/kde/post-install/sddm-qt5.post-install
index d1486c1..1a39fd0 100644
--- a/kde/post-install/sddm-qt5.post-install
+++ b/kde/post-install/sddm-qt5.post-install
@@ -1,3 +1,22 @@
# Remove PAM related stuff:
rm -rf $PKG/etc/pam.d
+# Remove the sddm.conf file because we will generate our own in doinst.sh:
+rm -f $PKG/etc/sddm.conf
+
+# Add a wrapper for the sddm binary, to enable a custom environment:
+mv $PKG/usr/bin/sddm $PKG/usr/bin/sddm.bin
+cat <<"EOT" > $PKG/usr/bin/sddm
+#!/bin/sh
+# Customized environment (LANG definition):
+if [ -f /etc/default/sddm ]; then
+ . /etc/default/sddm
+fi
+/usr/bin/sddm.bin "$*"
+EOT
+chmod 0755 $PKG/usr/bin/sddm
+
+# Let's also add an example customization (localization of the UI):
+mkdir -p $PKG/etc/default
+echo ". /etc/profile.d/lang.sh" > $PKG/etc/default/sddm.new
+
diff --git a/kde/pre-install/kde-runtime.pre-install b/kde/pre-install/kde-runtime.pre-install
index c32e2ce..deb906a 100644
--- a/kde/pre-install/kde-runtime.pre-install
+++ b/kde/pre-install/kde-runtime.pre-install
@@ -6,3 +6,7 @@ sed -i \
doc/kioslave/CMakeLists.txt
mv -i doc/kioslave/{,kio}bookmarks
mv -i doc/kioslave/{,kio}smb
+
+# Don't link to kactivities (>= 16.12.0):
+sed -e '/plasmaextracomponents/d' -i plasma/declarativeimports/CMakeLists.txt
+
diff --git a/kde/pre-install/kdepimlibs4.pre-install b/kde/pre-install/kdepimlibs4.pre-install
index a663cc6..d120701 100644
--- a/kde/pre-install/kdepimlibs4.pre-install
+++ b/kde/pre-install/kdepimlibs4.pre-install
@@ -5,3 +5,5 @@ if ! grep -q 'cmake_minimum_required' CMakeLists.txt ; then
sed -i -e '1icmake_minimum_required(VERSION 2.8.9)\' CMakeLists.txt
fi
+# Don't build gpgme++
+sed -e '/gpgme++/d' -e '/qgpgme/d' -i CMakeLists.txt
diff --git a/kde/pre-install/messagelib.pre-install b/kde/pre-install/messagelib.pre-install
new file mode 100644
index 0000000..d4883ff
--- /dev/null
+++ b/kde/pre-install/messagelib.pre-install
@@ -0,0 +1,3 @@
+# Temporary workaround for a gpgme cmake bug:
+sed -e '/find_package.*QGpgme/d' -i CMakeLists.txt
+
diff --git a/kde/slack-desc/polkit-kde-kcmodules-1 b/kde/slack-desc/akonadi-calendar-tools
index a98ca5f..e018173 100644
--- a/kde/slack-desc/polkit-kde-kcmodules-1
+++ b/kde/slack-desc/akonadi-calendar-tools
@@ -5,14 +5,15 @@
# make exactly 11 lines for the formatting to be correct. It's also
# customary to leave one space after the ':'.
- |-----handy-ruler-----------------------------------------------------|
-polkit-kde-kcmodules-1: polkit-kde-kcmodules-1 (KDE polkit kcmodules)
-polkit-kde-kcmodules-1:
-polkit-kde-kcmodules-1: This package contains the kcm_polkit modules for KDE.
-polkit-kde-kcmodules-1:
-polkit-kde-kcmodules-1:
-polkit-kde-kcmodules-1:
-polkit-kde-kcmodules-1:
-polkit-kde-kcmodules-1:
-polkit-kde-kcmodules-1:
-polkit-kde-kcmodules-1:
+ |-----handy-ruler------------------------------------------------------|
+akonadi-calendar-tools: akonadi-calendar-tools (CLI tools to manage akonadi calendars)
+akonadi-calendar-tools:
+akonadi-calendar-tools: CLI tools to manage akonadi calendars.
+akonadi-calendar-tools:
+akonadi-calendar-tools:
+akonadi-calendar-tools:
+akonadi-calendar-tools:
+akonadi-calendar-tools:
+akonadi-calendar-tools:
+akonadi-calendar-tools: Home page: http://www.kde.org/
+akonadi-calendar-tools:
diff --git a/kde/slack-desc/akonadi-import-wizard b/kde/slack-desc/akonadi-import-wizard
new file mode 100644
index 0000000..4f0e90a
--- /dev/null
+++ b/kde/slack-desc/akonadi-import-wizard
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|'
+# on the right side marks the last column you can put a character in. You must
+# make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+akonadi-import-wizard: akonadi-import-wizard (import data from other mail clients to KMail)
+akonadi-import-wizard:
+akonadi-import-wizard: Import data from other mail clients to KMail.
+akonadi-import-wizard:
+akonadi-import-wizard:
+akonadi-import-wizard:
+akonadi-import-wizard:
+akonadi-import-wizard:
+akonadi-import-wizard:
+akonadi-import-wizard: Home page: http://www.kde.org/
+akonadi-import-wizard:
diff --git a/kde/slack-desc/akonadi4 b/kde/slack-desc/akonadi4
deleted file mode 100644
index 72056e9..0000000
--- a/kde/slack-desc/akonadi4
+++ /dev/null
@@ -1,19 +0,0 @@
-# HOW TO EDIT THIS FILE:
-# The "handy ruler" below makes it easier to edit a package description. Line
-# up the first '|' above the ':' following the base package name, and the '|'
-# on the right side marks the last column you can put a character in. You must
-# make exactly 11 lines for the formatting to be correct. It's also
-# customary to leave one space after the ':'.
-
- |-----handy-ruler------------------------------------------------------|
-akonadi4: akonadi4 (PIM storage service)
-akonadi4:
-akonadi4: akonadi is an extensible cross-desktop storage service for PIM data
-akonadi4: and meta data providing concurrent read, write, and query access.
-akonadi4: It will provide a unique desktop wide object identification and
-akonadi4: retrieval.
-akonadi4: This package contains the 0.x version which is required for the
-akonadi4: older Qt4 based KDE-PIM applications.
-akonadi4:
-akonadi4: Homepage: http://www.kdepim.org/akonadi/
-akonadi4:
diff --git a/kde/slack-desc/akonadiconsole b/kde/slack-desc/akonadiconsole
new file mode 100644
index 0000000..9ac1808
--- /dev/null
+++ b/kde/slack-desc/akonadiconsole
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|'
+# on the right side marks the last column you can put a character in. You must
+# make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+akonadiconsole: akonadiconsole (Akonadi management and debugging console)
+akonadiconsole:
+akonadiconsole: Akonadi management and debugging console.
+akonadiconsole:
+akonadiconsole:
+akonadiconsole:
+akonadiconsole:
+akonadiconsole:
+akonadiconsole:
+akonadiconsole: Home page: http://www.kde.org/
+akonadiconsole:
diff --git a/kde/slack-desc/libkdeedu b/kde/slack-desc/akregator
index ab58c79..b3b466a 100644
--- a/kde/slack-desc/libkdeedu
+++ b/kde/slack-desc/akregator
@@ -6,14 +6,14 @@
# customary to leave one space after the ':'.
|-----handy-ruler------------------------------------------------------|
-libkdeedu: libkdeedu (Educational applications)
-libkdeedu:
-libkdeedu: Educational applications for the KDE Software Compilation.
-libkdeedu:
-libkdeedu:
-libkdeedu:
-libkdeedu:
-libkdeedu:
-libkdeedu:
-libkdeedu:
-libkdeedu:
+akregator: akregator (KDE feed reader)
+akregator:
+akregator: KDE feed reader.
+akregator:
+akregator:
+akregator:
+akregator:
+akregator:
+akregator:
+akregator: Home page: http://www.kde.org/
+akregator:
diff --git a/kde/slack-desc/alkimia b/kde/slack-desc/alkimia
new file mode 100644
index 0000000..9230682
--- /dev/null
+++ b/kde/slack-desc/alkimia
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|'
+# on the right side marks the last column you can put a character in. You must
+# make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+alkimia: alkimia (Library used by KDE Finance applications)
+alkimia:
+alkimia: Alkimia is a library used by KDE Finance applications, like Kmymoney.
+alkimia:
+alkimia:
+alkimia:
+alkimia:
+alkimia:
+alkimia:
+alkimia: Home page: http://www.kde.org/
+alkimia:
diff --git a/kde/slack-desc/amor b/kde/slack-desc/amor
deleted file mode 100644
index f6bf310..0000000
--- a/kde/slack-desc/amor
+++ /dev/null
@@ -1,19 +0,0 @@
-# HOW TO EDIT THIS FILE:
-# The "handy ruler" below makes it easier to edit a package description. Line
-# up the first '|' above the ':' following the base package name, and the '|' on
-# the right side marks the last column you can put a character in. You must make
-# exactly 11 lines for the formatting to be correct. It's also customary to
-# leave one space after the ':'.
-
- |-----handy-ruler------------------------------------------------------|
-amor: amor (KDE window animation)
-amor:
-amor: amor an acronym which stands for Amusing Misuse Of Resources.
-amor: It is an animation which sits on top of your active window.
-amor: In its default, amor takes the form of a yellow spot which performs
-amor: many tricks. amor also has many different themes which change the
-amor: appearance and behavior of the animation.
-amor:
-amor:
-amor: Home: http://techbase.kde.org/Projects/Kdetoys/amor
-amor:
diff --git a/kde/slack-desc/baloo b/kde/slack-desc/baloo
deleted file mode 100644
index 4035970..0000000
--- a/kde/slack-desc/baloo
+++ /dev/null
@@ -1,19 +0,0 @@
-# HOW TO EDIT THIS FILE:
-# The "handy ruler" below makes it easier to edit a package description. Line
-# up the first '|' above the ':' following the base package name, and the '|' on
-# the right side marks the last column you can put a character in. You must make
-# exactly 11 lines for the formatting to be correct. It's also customary to
-# leave one space after the ':'.
-
- |-----handy-ruler------------------------------------------------------|
-baloo: baloo (framework for searching and managing metadata)
-baloo:
-baloo: Baloo is a framework for searching and managing metadata.
-baloo: Baloo focuses on providing a very small memory footprint along with
-baloo: with extremely fast searching. It also supports storing additional
-baloo: file based metadata via extended attributes.
-baloo:
-baloo:
-baloo:
-baloo: For more information, visit: http://www.kde.org
-baloo:
diff --git a/kde/slack-desc/baloo-widgets b/kde/slack-desc/baloo-widgets
deleted file mode 100644
index 2f9ce74..0000000
--- a/kde/slack-desc/baloo-widgets
+++ /dev/null
@@ -1,19 +0,0 @@
-# HOW TO EDIT THIS FILE:
-# The "handy ruler" below makes it easier to edit a package description. Line
-# up the first '|' above the ':' following the base package name, and the '|' on
-# the right side marks the last column you can put a character in. You must make
-# exactly 11 lines for the formatting to be correct. It's also customary to
-# leave one space after the ':'.
-
- |-----handy-ruler------------------------------------------------------|
-baloo-widgets: baloo-widgets (widgets for baloo)
-baloo-widgets:
-baloo-widgets: Baloo is a framework for searching and managing metadata.
-baloo-widgets: Balooo-widgets contains widgets for use with Baloo.
-baloo-widgets:
-baloo-widgets:
-baloo-widgets:
-baloo-widgets:
-baloo-widgets:
-baloo-widgets: For more information, visit: http://www.kde.org
-baloo-widgets:
diff --git a/kde/slack-desc/konsolepart4 b/kde/slack-desc/calligraplan
index d6fd2ae..f092af2 100644
--- a/kde/slack-desc/konsolepart4
+++ b/kde/slack-desc/calligraplan
@@ -5,15 +5,15 @@
# make exactly 11 lines for the formatting to be correct. It's also
# customary to leave one space after the ':'.
- |-----handy-ruler-----------------------------------------------------|
-konsolepart4: konsolepart4 (KDE's terminal emulator component)
-konsolepart4:
-konsolepart4: Konsole is KDE's terminal emulator. The konsolepart is an
-konsolepart4: embeddable terminal component for KDE4 applications.
-konsolepart4:
-konsolepart4:
-konsolepart4:
-konsolepart4:
-konsolepart4:
-konsolepart4: Homepage: http://kde.org
-konsolepart4:
+ |-----handy-ruler------------------------------------------------------|
+calligraplan: calligraplan (project planner)
+calligraplan:
+calligraplan: Calligra Plan is a project management application.
+calligraplan: It is intended for managing moderately large projects
+calligraplan: with multiple resources.
+calligraplan:
+calligraplan:
+calligraplan:
+calligraplan:
+calligraplan: Home page: http://www.calligra-suite.org/
+calligraplan:
diff --git a/kde/slack-desc/drkonqi b/kde/slack-desc/drkonqi
new file mode 100644
index 0000000..7469ce6
--- /dev/null
+++ b/kde/slack-desc/drkonqi
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|'
+# on the right side marks the last column you can put a character in. You must
+# make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+drkonqi: drkonqi (crash handler for plasma5)
+drkonqi:
+drkonqi: Drkonqi is the crash handler for KDE Frameworks 5 / Plasma5.
+drkonqi:
+drkonqi:
+drkonqi:
+drkonqi:
+drkonqi:
+drkonqi:
+drkonqi: Home page: http://www.kde.org/
+drkonqi:
diff --git a/kde/slack-desc/amarok b/kde/slack-desc/falkon
index 8ee6397..14cf33e 100644
--- a/kde/slack-desc/amarok
+++ b/kde/slack-desc/falkon
@@ -6,14 +6,14 @@
# customary to leave one space after the ':'.
|-----handy-ruler------------------------------------------------------|
-amarok: amarok (music player)
-amarok:
-amarok: Amarok is a music player for Linux and Unix with an intuitive
-amarok: interface. Amarok makes playing the music you love easier than ever
-amarok: before -- and looks good doing it.
-amarok:
-amarok: Amarok's home page is: http://amarok.kde.org
-amarok:
-amarok:
-amarok:
-amarok:
+falkon: falkon (short description here)
+falkon:
+falkon: Falkon is a QtWebEngine based cross-platform web browser.
+falkon:
+falkon:
+falkon:
+falkon:
+falkon:
+falkon:
+falkon: Home page: http://www.kde.org/
+falkon:
diff --git a/kde/slack-desc/grantlee-editor b/kde/slack-desc/grantlee-editor
new file mode 100644
index 0000000..9ef75e7
--- /dev/null
+++ b/kde/slack-desc/grantlee-editor
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|'
+# on the right side marks the last column you can put a character in. You must
+# make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+grantlee-editor: grantlee-editor (editor for Grantlee themes)
+grantlee-editor:
+grantlee-editor: Editor for Grantlee themes.
+grantlee-editor:
+grantlee-editor:
+grantlee-editor:
+grantlee-editor:
+grantlee-editor:
+grantlee-editor:
+grantlee-editor: Home page: http://www.kde.org/
+grantlee-editor:
diff --git a/kde/slack-desc/jovie b/kde/slack-desc/jovie
deleted file mode 100644
index 6a52283..0000000
--- a/kde/slack-desc/jovie
+++ /dev/null
@@ -1,19 +0,0 @@
-# HOW TO EDIT THIS FILE:
-# The "handy ruler" below makes it easier to edit a package description. Line
-# up the first '|' above the ':' following the base package name, and the '|' on
-# the right side marks the last column you can put a character in. You must make
-# exactly 11 lines for the formatting to be correct. It's also customary to
-# leave one space after the ':'.
-
- |-----handy-ruler------------------------------------------------------|
-jovie: jovie (Text-to-speech daemon)
-jovie:
-jovie: Jovie is the KDE Text To Speech Daemon, which can be used from any
-jovie: KDE application that uses the interface from kdelibs.
-jovie:
-jovie: For more information, visit: http://www.kde.org
-jovie:
-jovie:
-jovie:
-jovie:
-jovie:
diff --git a/kde/slack-desc/kaccessible b/kde/slack-desc/kaccessible
deleted file mode 100644
index 77b9663..0000000
--- a/kde/slack-desc/kaccessible
+++ /dev/null
@@ -1,19 +0,0 @@
-# HOW TO EDIT THIS FILE:
-# The "handy ruler" below makes it easier to edit a package description. Line
-# up the first '|' above the ':' following the base package name, and the '|' on
-# the right side marks the last column you can put a character in. You must make
-# exactly 11 lines for the formatting to be correct. It's also customary to
-# leave one space after the ':'.
-
- |-----handy-ruler------------------------------------------------------|
-kaccessible: kaccessible (Accessibility bridge)
-kaccessible:
-kaccessible: Kaccessible implements a QAccessibleBridgePlugin to provide
-kaccessible: accessibility services like focus tracking and a screenreader.
-kaccessible:
-kaccessible: For more information, visit: http://www.kde.org
-kaccessible:
-kaccessible:
-kaccessible:
-kaccessible:
-kaccessible:
diff --git a/kde/slack-desc/kactivities-workspace b/kde/slack-desc/kactivities-workspace
deleted file mode 100644
index 56e6679..0000000
--- a/kde/slack-desc/kactivities-workspace
+++ /dev/null
@@ -1,19 +0,0 @@
-# HOW TO EDIT THIS FILE:
-# The "handy ruler" below makes it easier to edit a package description. Line
-# up the first '|' above the ':' following the base package name, and the '|' on
-# the right side marks the last column you can put a character in. You must make
-# exactly 11 lines for the formatting to be correct. It's also customary to
-# leave one space after the ':'.
-
- |-----handy-ruler------------------------------------------------------|
-kactivities-workspace: kactivities-workspace ()
-kactivities-workspace:
-kactivities-workspace: Transient package containing workspace plugins (KIO,
-kactivities-workspace: KCM, FileItem) for the period between the upgrade
-kactivities-workspace: to KDE Frameworks 5.20 and upgrade to Plasma 5.6.
-kactivities-workspace:
-kactivities-workspace:
-kactivities-workspace:
-kactivities-workspace:
-kactivities-workspace: For more information, visit: http://www.kde.org
-kactivities-workspace:
diff --git a/kde/slack-desc/kdevelop-php b/kde/slack-desc/kaddressbook
index be58f46..d07f372 100644
--- a/kde/slack-desc/kdevelop-php
+++ b/kde/slack-desc/kaddressbook
@@ -6,14 +6,14 @@
# customary to leave one space after the ':'.
|-----handy-ruler------------------------------------------------------|
-kdevelop-php: kdevelop-php (PHP language plugin for KDevelop)
-kdevelop-php:
-kdevelop-php: This is a KDevelop plugin that provides support for the PHP language.
-kdevelop-php:
-kdevelop-php:
-kdevelop-php:
-kdevelop-php:
-kdevelop-php:
-kdevelop-php:
-kdevelop-php:
-kdevelop-php:
+kaddressbook: kaddressbook (KDE contact manager)
+kaddressbook:
+kaddressbook: KDE contact manager.
+kaddressbook:
+kaddressbook:
+kaddressbook:
+kaddressbook:
+kaddressbook:
+kaddressbook:
+kaddressbook: Home page: http://www.kde.org/
+kaddressbook:
diff --git a/kde/slack-desc/kalarm b/kde/slack-desc/kalarm
new file mode 100644
index 0000000..e142866
--- /dev/null
+++ b/kde/slack-desc/kalarm
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|'
+# on the right side marks the last column you can put a character in. You must
+# make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+kalarm: kalarm (personal alarm scheduler)
+kalarm:
+kalarm: Personal alarm scheduler.
+kalarm:
+kalarm:
+kalarm:
+kalarm:
+kalarm:
+kalarm:
+kalarm: Home page: http://www.kde.org/
+kalarm:
diff --git a/kde/slack-desc/quanta b/kde/slack-desc/kamoso
index af1cadf..3e787d1 100644
--- a/kde/slack-desc/quanta
+++ b/kde/slack-desc/kamoso
@@ -6,14 +6,14 @@
# customary to leave one space after the ':'.
|-----handy-ruler------------------------------------------------------|
-quanta: quanta (Quanta Plus web development environment)
-quanta:
-quanta: Quanta Plus is a web development environment for HTML and associate
-quanta: languages. It is designed for quick web development.
-quanta: Quanta Plus includes the ability to run a debugger.
-quanta:
-quanta: Project page:
-quanta: https://projects.kde.org/projects/playground/devtools/quanta
-quanta:
-quanta:
-quanta:
+kamoso: kamoso (webcam recorder)
+kamoso:
+kamoso: Kamoso is a great program to use your webcam to take pictures or make
+kamoso: videos. It probably should be the best webcam recorder for Linux.
+kamoso:
+kamoso: Kamoso can make photos from your webcam and upload them to Facebook.
+kamoso: It also allows to record videos from your webcam and upload them
+kamoso: to YouTube
+kamoso:
+kamoso: Home page: https://userbase.kde.org/Kamoso
+kamoso:
diff --git a/kde/slack-desc/katepart4 b/kde/slack-desc/katepart4
deleted file mode 100644
index cbb9e90..0000000
--- a/kde/slack-desc/katepart4
+++ /dev/null
@@ -1,19 +0,0 @@
-# HOW TO EDIT THIS FILE:
-# The "handy ruler" below makes it easier to edit a package description. Line
-# up the first '|' above the ':' following the base package name, and the '|'
-# on the right side marks the last column you can put a character in. You must
-# make exactly 11 lines for the formatting to be correct. It's also
-# customary to leave one space after the ':'.
-
- |-----handy-ruler-----------------------------------------------------|
-katepart4: katepart4 (an advanced text editor component for KDE4)
-katepart4:
-katepart4: The Kate project develops two main products:
-katepart4: KatePart, the advanced editor component which is used in numerous KDE
-katepart4: applications requiring a text editing component, and Kate, a MDI text
-katepart4: editor application. In addition, they provide KWrite, a simple SDI
-katepart4: editor shell which allows the user to select his/her favorite editor
-katepart4: component.
-katepart4: This package only contains the KatePart for KDE4 applications.
-katepart4:
-katepart4: Homepage: http://kate-editor.org
diff --git a/kde/slack-desc/kbackup b/kde/slack-desc/kbackup
new file mode 100644
index 0000000..eaebf28
--- /dev/null
+++ b/kde/slack-desc/kbackup
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|'
+# on the right side marks the last column you can put a character in. You must
+# make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+kbackup: kbackup (KDE backup program)
+kbackup:
+kbackup: KBackup is an application that lets you back up any folders or files
+kbackup: in a tar archive to a local folder, e.g. a locally mounted device
+kbackup: like a ZIP drive, USB stick, etc. or a remote URL.
+kbackup: KBackup can run automated backups without using a graphical
+kbackup: user interface.
+kbackup:
+kbackup:
+kbackup: Home page: https://www.kde.org/applications/utilities/kbackup/
+kbackup:
diff --git a/kde/slack-desc/ktux b/kde/slack-desc/kdav
index 4590d96..5e09f66 100644
--- a/kde/slack-desc/ktux
+++ b/kde/slack-desc/kdav
@@ -6,14 +6,14 @@
# leave one space after the ':'.
|-----handy-ruler------------------------------------------------------|
-ktux: ktux (tux screensaver for KDE)
-ktux:
-ktux: ktux is a neat Tux-in-a-spaceship screensaver for KScreenSaver.
-ktux:
-ktux:
-ktux:
-ktux:
-ktux:
-ktux:
-ktux: For more information, visit: http://www.kde.org
-ktux:
+kdav: kdav (KDE DAV protocol implementation)
+kdav:
+kdav: A DAV protocol implemention with KJobs.
+kdav:
+kdav:
+kdav:
+kdav:
+kdav:
+kdav:
+kdav: For more information, visit: http://pim.kde.org
+kdav:
diff --git a/kde/slack-desc/kde-base-artwork b/kde/slack-desc/kde-base-artwork
deleted file mode 100644
index f7df2d0..0000000
--- a/kde/slack-desc/kde-base-artwork
+++ /dev/null
@@ -1,19 +0,0 @@
-# HOW TO EDIT THIS FILE:
-# The "handy ruler" below makes it easier to edit a package description. Line
-# up the first '|' above the ':' following the base package name, and the '|' on
-# the right side marks the last column you can put a character in. You must make
-# exactly 11 lines for the formatting to be correct. It's also customary to
-# leave one space after the ':'.
-
- |-----handy-ruler------------------------------------------------------|
-kde-base-artwork: kde-base-artwork (KDE themes artwork)
-kde-base-artwork:
-kde-base-artwork: This package contains KSplash themes and other artwork.
-kde-base-artwork:
-kde-base-artwork: For more information, visit: http://www.kde.org
-kde-base-artwork:
-kde-base-artwork:
-kde-base-artwork:
-kde-base-artwork:
-kde-base-artwork:
-kde-base-artwork:
diff --git a/kde/slack-desc/kde-baseapps b/kde/slack-desc/kde-baseapps
deleted file mode 100644
index ad9ef35..0000000
--- a/kde/slack-desc/kde-baseapps
+++ /dev/null
@@ -1,19 +0,0 @@
-# HOW TO EDIT THIS FILE:
-# The "handy ruler" below makes it easier to edit a package description. Line
-# up the first '|' above the ':' following the base package name, and the '|' on
-# the right side marks the last column you can put a character in. You must make
-# exactly 11 lines for the formatting to be correct. It's also customary to
-# leave one space after the ':'.
-
- |-----handy-ruler------------------------------------------------------|
-kde-baseapps: kde-baseapps (KDE core applications and files)
-kde-baseapps:
-kde-baseapps: This package provides the core applications and infrastructure files
-kde-baseapps: for the KDE Plasma Desktop.
-kde-baseapps:
-kde-baseapps: For more info, visit: http://www.kde.org
-kde-baseapps:
-kde-baseapps:
-kde-baseapps:
-kde-baseapps:
-kde-baseapps:
diff --git a/kde/slack-desc/kde-bindings b/kde/slack-desc/kde-bindings
deleted file mode 100644
index 3602053..0000000
--- a/kde/slack-desc/kde-bindings
+++ /dev/null
@@ -1,19 +0,0 @@
-# HOW TO EDIT THIS FILE:
-# The "handy ruler" below makes it easier to edit a package description. Line
-# up the first '|' above the ':' following the base package name, and the '|' on
-# the right side marks the last column you can put a character in. You must make
-# exactly 11 lines for the formatting to be correct. It's also customary to
-# leave one space after the ':'.
-
- |-----handy-ruler------------------------------------------------------|
-kde-bindings: kde-bindings (KDE language bindings)
-kde-bindings:
-kde-bindings: KDE and most KDE applications are implemented using the C++
-kde-bindings: programming language, but that doesn't mean you don't have a choice.
-kde-bindings: This package contains a number of bindings to other languages,
-kde-bindings: including scripting languages and other systems' programming
-kde-bindings: languages, allowing them to be used to create applications for the
-kde-bindings: KDE Platform.
-kde-bindings:
-kde-bindings:
-kde-bindings:
diff --git a/kde/slack-desc/kde-runtime b/kde/slack-desc/kde-runtime
deleted file mode 100644
index 279b2bf..0000000
--- a/kde/slack-desc/kde-runtime
+++ /dev/null
@@ -1,18 +0,0 @@
-# HOW TO EDIT THIS FILE:
-# The "handy ruler" below makes it easier to edit a package description. Line
-# up the first '|' above the ':' following the base package name, and the '|' on
-# the right side marks the last column you can put a character in. You must make
-# exactly 11 lines for the formatting to be correct. It's also customary to
-# leave one space after the ':'.
- |-----handy-ruler------------------------------------------------------|
-kde-runtime: kde-runtime (KDE runtime core)
-kde-runtime:
-kde-runtime: This package contains core components of the KDE base runtime module.
-kde-runtime:
-kde-runtime:
-kde-runtime:
-kde-runtime:
-kde-runtime:
-kde-runtime:
-kde-runtime:
-kde-runtime:
diff --git a/kde/slack-desc/kde-workspace b/kde/slack-desc/kde-workspace
deleted file mode 100644
index 3027e73..0000000
--- a/kde/slack-desc/kde-workspace
+++ /dev/null
@@ -1,19 +0,0 @@
-# HOW TO EDIT THIS FILE:
-# The "handy ruler" below makes it easier to edit a package description. Line
-# up the first '|' above the ':' following the base package name, and the '|' on
-# the right side marks the last column you can put a character in. You must make
-# exactly 11 lines for the formatting to be correct. It's also customary to
-# leave one space after the ':'.
-
- |-----handy-ruler------------------------------------------------------|
-kde-workspace: kde-workspace (KDE Plasma Desktop)
-kde-workspace:
-kde-workspace: This package provides the essential parts of the KDE Plasma Desktop
-kde-workspace: that are presented to the user.
-kde-workspace:
-kde-workspace:
-kde-workspace:
-kde-workspace:
-kde-workspace:
-kde-workspace:
-kde-workspace:
diff --git a/kde/slack-desc/kdeartwork b/kde/slack-desc/kdeartwork
deleted file mode 100644
index cc5f6f1..0000000
--- a/kde/slack-desc/kdeartwork
+++ /dev/null
@@ -1,19 +0,0 @@
-# HOW TO EDIT THIS FILE:
-# The "handy ruler" below makes it easier to edit a package description. Line
-# up the first '|' above the ':' following the base package name, and the '|' on
-# the right side marks the last column you can put a character in. You must make
-# exactly 11 lines for the formatting to be correct. It's also customary to
-# leave one space after the ':'.
-
- |-----handy-ruler-------------------------------------------------|
-kdeartwork: kdeartwork (Artwork for KDE)
-kdeartwork:
-kdeartwork: Additional themes, screensavers, sounds, wallpapers, and window
-kdeartwork: styles.
-kdeartwork:
-kdeartwork:
-kdeartwork:
-kdeartwork:
-kdeartwork:
-kdeartwork:
-kdeartwork:
diff --git a/kde/slack-desc/kdebase-runtime b/kde/slack-desc/kdebase-runtime
deleted file mode 100644
index 09bf577..0000000
--- a/kde/slack-desc/kdebase-runtime
+++ /dev/null
@@ -1,18 +0,0 @@
-# HOW TO EDIT THIS FILE:
-# The "handy ruler" below makes it easier to edit a package description. Line
-# up the first '|' above the ':' following the base package name, and the '|' on
-# the right side marks the last column you can put a character in. You must make
-# exactly 11 lines for the formatting to be correct. It's also customary to
-# leave one space after the ':'.
- |-----handy-ruler------------------------------------------------------|
-kdebase-runtime: kdebase-runtime (KDE runtime core)
-kdebase-runtime:
-kdebase-runtime: This package contains core components of the KDE base runtime module.
-kdebase-runtime:
-kdebase-runtime:
-kdebase-runtime:
-kdebase-runtime:
-kdebase-runtime:
-kdebase-runtime:
-kdebase-runtime:
-kdebase-runtime:
diff --git a/kde/slack-desc/kdebase-workspace b/kde/slack-desc/kdebase-workspace
deleted file mode 100644
index 2ec1141..0000000
--- a/kde/slack-desc/kdebase-workspace
+++ /dev/null
@@ -1,19 +0,0 @@
-# HOW TO EDIT THIS FILE:
-# The "handy ruler" below makes it easier to edit a package description. Line
-# up the first '|' above the ':' following the base package name, and the '|'
-# on the right side marks the last column you can put a character in. You must
-# make exactly 11 lines for the formatting to be correct. It's also
-# customary to leave one space after the ':'.
-
- |-----handy-ruler------------------------------------------------------|
-kdebase-workspace: kdebase-workspace (KDE Plasma Desktop)
-kdebase-workspace:
-kdebase-workspace: This package provides the essential parts of the KDE Plasma Desktop
-kdebase-workspace: that are presented to the user.
-kdebase-workspace:
-kdebase-workspace:
-kdebase-workspace:
-kdebase-workspace:
-kdebase-workspace:
-kdebase-workspace:
-kdebase-workspace:
diff --git a/kde/slack-desc/kdebindings b/kde/slack-desc/kdebindings
deleted file mode 100644
index e927c76..0000000
--- a/kde/slack-desc/kdebindings
+++ /dev/null
@@ -1,19 +0,0 @@
-# HOW TO EDIT THIS FILE:
-# The "handy ruler" below makes it easier to edit a package description. Line
-# up the first '|' above the ':' following the base package name, and the '|' on
-# the right side marks the last column you can put a character in. You must make
-# exactly 11 lines for the formatting to be correct. It's also customary to
-# leave one space after the ':'.
-
- |-----handy-ruler------------------------------------------------------|
-kdebindings: kdebindings (KDE language bindings)
-kdebindings:
-kdebindings: KDE and most KDE applications are implemented using the C++
-kdebindings: programming language, but that doesn't mean you don't have a choice.
-kdebindings: This package contains a number of bindings to other languages,
-kdebindings: including scripting languages and other systems' programming
-kdebindings: languages, allowing them to be used to create applications for the
-kdebindings: KDE Platform.
-kdebindings:
-kdebindings:
-kdebindings:
diff --git a/kde/slack-desc/kdeconnect-framework b/kde/slack-desc/kdeconnect-framework
index c630380..4efa154 100644
--- a/kde/slack-desc/kdeconnect-framework
+++ b/kde/slack-desc/kdeconnect-framework
@@ -13,7 +13,7 @@ kdeconnect-framework: Prominent features are: clipboard share, notifications syn
kdeconnect-framework: multimedia remote control over secured network connections.
kdeconnect-framework: Please note you will need to install KDE Connect on Android
kdeconnect-framework: for this app to work:
-kdeconnect-framework: https://play.google.com/store/apps/details?id=org.kde.kdeconnect-framework_tp
+kdeconnect-framework: https://play.google.com/store/apps/details?id=org.kde.kdeconnect_tp
kdeconnect-framework:
kdeconnect-framework: See also:
-kdeconnect-framework: http://albertvaka.wordpress.com/2013/08/05/introducing-framework-connect/
+kdeconnect-framework: https://albertvaka.wordpress.com/2013/08/05/introducing-kde-connect/
diff --git a/kde/slack-desc/kdeconnect-kde b/kde/slack-desc/kdeconnect-kde
deleted file mode 100644
index cf2665e..0000000
--- a/kde/slack-desc/kdeconnect-kde
+++ /dev/null
@@ -1,19 +0,0 @@
-# HOW TO EDIT THIS FILE:
-# The "handy ruler" below makes it easier to edit a package description. Line
-# up the first '|' above the ':' following the base package name, and the '|' on
-# the right side marks the last column you can put a character in. You must make
-# exactly 11 lines for the formatting to be correct. It's also customary to
-# leave one space after the ':'.
-
- |-----handy-ruler------------------------------------------------------|
-kdeconnect-kde: kdeconnect-kde (Integrate Android with the KDE Desktop)
-kdeconnect-kde:
-kdeconnect-kde: KDE Connect is a module to connect KDE with your smartphone.
-kdeconnect-kde: Prominent features are: clipboard share, notifications sync,
-kdeconnect-kde: multimedia remote control over secured network connections.
-kdeconnect-kde: Please note you will need to install KDE Connect on Android
-kdeconnect-kde: for this app to work:
-kdeconnect-kde: https://play.google.com/store/apps/details?id=org.kde.kdeconnect-kde_tp
-kdeconnect-kde:
-kdeconnect-kde: See also:
-kdeconnect-kde: http://albertvaka.wordpress.com/2013/08/05/introducing-kde-connect/
diff --git a/kde/slack-desc/kdeconnect4 b/kde/slack-desc/kdeconnect4
deleted file mode 100644
index aa45f71..0000000
--- a/kde/slack-desc/kdeconnect4
+++ /dev/null
@@ -1,19 +0,0 @@
-# HOW TO EDIT THIS FILE:
-# The "handy ruler" below makes it easier to edit a package description. Line
-# up the first '|' above the ':' following the base package name, and the '|' on
-# the right side marks the last column you can put a character in. You must make
-# exactly 11 lines for the formatting to be correct. It's also customary to
-# leave one space after the ':'.
-
- |-----handy-ruler------------------------------------------------------|
-kdeconnect4: kdeconnect4 (Integrate Android with the KDE Desktop)
-kdeconnect4:
-kdeconnect4: KDE Connect is a module to connect KDE with your smartphone.
-kdeconnect4: Prominent features are: clipboard share, notifications sync,
-kdeconnect4: multimedia remote control over secured network connections.
-kdeconnect4: Please note you will need to install KDE Connect on Android
-kdeconnect4: for this app to work:
-kdeconnect4: https://play.google.com/store/apps/details?id=org.kde.kdeconnect4_tp
-kdeconnect4: This package provides support for Dolphin (kdelibs4) in Plasma5.
-kdeconnect4: See also:
-kdeconnect4: http://albertvaka.wordpress.com/2013/08/05/introducing-kde-connect/
diff --git a/kde/slack-desc/kdegraphics-strigi-analyzer b/kde/slack-desc/kdegraphics-strigi-analyzer
deleted file mode 100644
index 307e5aa..0000000
--- a/kde/slack-desc/kdegraphics-strigi-analyzer
+++ /dev/null
@@ -1,19 +0,0 @@
-# HOW TO EDIT THIS FILE:
-# The "handy ruler" below makes it easier to edit a package description. Line
-# up the first '|' above the ':' following the base package name, and the '|' on
-# the right side marks the last column you can put a character in. You must make
-# exactly 11 lines for the formatting to be correct. It's also customary to
-# leave one space after the ':'.
-
- |-----handy-ruler------------------------------------------------------|
-kdegraphics-strigi-analyzer: kdegraphics-strigi-analyzer (graphics plugins for strigi)
-kdegraphics-strigi-analyzer:
-kdegraphics-strigi-analyzer: Graphics file format plugins for Strigi Desktop Search.
-kdegraphics-strigi-analyzer: These plugins allow Strigi Desktop Search to extract
-kdegraphics-strigi-analyzer: additional information about several document and graphic file
-kdegraphics-strigi-analyzer: formats.
-kdegraphics-strigi-analyzer:
-kdegraphics-strigi-analyzer: For more information, visit: http://www.kde.org
-kdegraphics-strigi-analyzer:
-kdegraphics-strigi-analyzer:
-kdegraphics-strigi-analyzer:
diff --git a/kde/slack-desc/kdenetwork-strigi-analyzers b/kde/slack-desc/kdenetwork-strigi-analyzers
deleted file mode 100644
index 23de02c..0000000
--- a/kde/slack-desc/kdenetwork-strigi-analyzers
+++ /dev/null
@@ -1,19 +0,0 @@
-# HOW TO EDIT THIS FILE:
-# The "handy ruler" below makes it easier to edit a package description. Line
-# up the first '|' above the ':' following the base package name, and the '|'
-# on the right side marks the last column you can put a character in. You must
-# make exactly 11 lines for the formatting to be correct. It's also
-# customary to leave one space after the ':'.
-
- |-----handy-ruler-----------------------------------------------------|
-kdenetwork-strigi-analyzers: kdenetwork-strigi-analyzers (analyzer plugins for Strigi)
-kdenetwork-strigi-analyzers:
-kdenetwork-strigi-analyzers: This package contains analyzer plugins for Strigi.
-kdenetwork-strigi-analyzers:
-kdenetwork-strigi-analyzers:
-kdenetwork-strigi-analyzers:
-kdenetwork-strigi-analyzers:
-kdenetwork-strigi-analyzers:
-kdenetwork-strigi-analyzers:
-kdenetwork-strigi-analyzers: Homepage: http://kde.org/
-kdenetwork-strigi-analyzers:
diff --git a/kde/slack-desc/kdenlive b/kde/slack-desc/kdenlive
index 0b20c12..7d1b619 100644
--- a/kde/slack-desc/kdenlive
+++ b/kde/slack-desc/kdenlive
@@ -14,6 +14,6 @@ kdenlive:
kdenlive:
kdenlive:
kdenlive:
-kdenlive:e
+kdenlive:
kdenlive: For more information, visit: http://www.kdenlive.org
kdenlive:
diff --git a/kde/slack-desc/kdesdk-strigi-analyzers b/kde/slack-desc/kdesdk-strigi-analyzers
deleted file mode 100644
index c4d4bc1..0000000
--- a/kde/slack-desc/kdesdk-strigi-analyzers
+++ /dev/null
@@ -1,19 +0,0 @@
-# HOW TO EDIT THIS FILE:
-# The "handy ruler" below makes it easier to edit a package description. Line
-# up the first '|' above the ':' following the base package name, and the '|' on
-# the right side marks the last column you can put a character in. You must make
-# exactly 11 lines for the formatting to be correct. It's also customary to
-# leave one space after the ':'.
-
- |-----handy-ruler------------------------------------------------------|
-kdesdk-strigi-analyzers: kdesdk-strigi-analyzers (analyzer plugins for Strigi)
-kdesdk-strigi-analyzers:
-kdesdk-strigi-analyzers: This package contains analyzer plugins for Strigi.
-kdesdk-strigi-analyzers:
-kdesdk-strigi-analyzers:
-kdesdk-strigi-analyzers:
-kdesdk-strigi-analyzers:
-kdesdk-strigi-analyzers:
-kdesdk-strigi-analyzers:
-kdesdk-strigi-analyzers: For more information, visit: http://www.kde.org
-kdesdk-strigi-analyzers:
diff --git a/kde/slack-desc/kdgantt2 b/kde/slack-desc/kdev-php
index 87bacd8..7fd0fb9 100644
--- a/kde/slack-desc/kdgantt2
+++ b/kde/slack-desc/kdev-php
@@ -6,14 +6,14 @@
# customary to leave one space after the ':'.
|-----handy-ruler------------------------------------------------------|
-kdgantt2: kdgantt2 (library providing gantt support)
-kdgantt2:
-kdgantt2: kdgantt2 is a library providing gantt support.
-kdgantt2:
-kdgantt2:
-kdgantt2:
-kdgantt2:
-kdgantt2:
-kdgantt2:
-kdgantt2: Home page: http://www.kde.org/
-kdgantt2:
+kdev-php: kdev-php (PHP language plugin for KDevelop)
+kdev-php:
+kdev-php: This is a KDevelop plugin that provides support for the PHP language.
+kdev-php:
+kdev-php:
+kdev-php:
+kdev-php:
+kdev-php:
+kdev-php:
+kdev-php:
+kdev-php:
diff --git a/kde/slack-desc/libmm-qt b/kde/slack-desc/kdiagram
index a32031e..7cc07d1 100644
--- a/kde/slack-desc/libmm-qt
+++ b/kde/slack-desc/kdiagram
@@ -6,14 +6,14 @@
# leave one space after the ':'.
|-----handy-ruler------------------------------------------------------|
-libmm-qt: libmm-qt (ModemManager Qt bindings)
-libmm-qt:
-libmm-qt: This package contains Qt bindings for ModemManager.
-libmm-qt:
-libmm-qt:
-libmm-qt:
-libmm-qt:
-libmm-qt:
-libmm-qt:
-libmm-qt: For more information, visit: http://www.kde.org
-libmm-qt:
+kdiagram: kdiagram (libraries for creating business diagrams)
+kdiagram:
+kdiagram: Powerful libraries (KChart, KGantt) for creating business diagrams.
+kdiagram:
+kdiagram:
+kdiagram:
+kdiagram:
+kdiagram:
+kdiagram:
+kdiagram: For more information, visit: https://github.com/KDE/kdiagram
+kdiagram:
diff --git a/kde/slack-desc/kdialog b/kde/slack-desc/kdialog
new file mode 100644
index 0000000..a15c57b
--- /dev/null
+++ b/kde/slack-desc/kdialog
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|'
+# on the right side marks the last column you can put a character in. You must
+# make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+kdialog: kdialog (utility for displaying dialog boxes from shell scripts)
+kdialog:
+kdialog: A utility for displaying dialog boxes from shell scripts.
+kdialog:
+kdialog:
+kdialog:
+kdialog:
+kdialog:
+kdialog:
+kdialog: Home page: http://www.kde.org/
+kdialog:
diff --git a/kde/slack-desc/kdnssd-framework b/kde/slack-desc/kdnssd-framework
deleted file mode 100644
index 45d0c07..0000000
--- a/kde/slack-desc/kdnssd-framework
+++ /dev/null
@@ -1,21 +0,0 @@
-# HOW TO EDIT THIS FILE:
-# The "handy ruler" below makes it easier to edit a package description. Line
-# up the first '|' above the ':' following the base package name, and the '|'
-# on the right side marks the last column you can put a character in. You must
-# make exactly 11 lines for the formatting to be correct. It's also
-# customary to leave one space after the ':' except on otherwise blank lines.
-
- |-----handy-ruler------------------------------------------------------|
-kdnssd-framework: kdnssd-framework (kdnssd-framework)
-kdnssd-framework:
-kdnssd-framework:
-kdnssd-framework:
-kdnssd-framework:
-kdnssd-framework:
-kdnssd-framework:
-kdnssd-framework:
-kdnssd-framework:
-kdnssd-framework:
-kdnssd-framework:
-kdnssd-framework:
-kdnssd-framework: Homepage: http://kde.org/
diff --git a/kde/slack-desc/keditbookmarks b/kde/slack-desc/keditbookmarks
new file mode 100644
index 0000000..343b621
--- /dev/null
+++ b/kde/slack-desc/keditbookmarks
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|'
+# on the right side marks the last column you can put a character in. You must
+# make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+keditbookmarks: keditbookmarks (Bookmark organizer and editor)
+keditbookmarks:
+keditbookmarks: Bookmark organizer and editor.
+keditbookmarks:
+keditbookmarks:
+keditbookmarks:
+keditbookmarks:
+keditbookmarks:
+keditbookmarks:
+keditbookmarks: Home page: http://www.kde.org/
+keditbookmarks:
diff --git a/kde/slack-desc/kfilemetadata b/kde/slack-desc/kfilemetadata
deleted file mode 100644
index 0e4b7df..0000000
--- a/kde/slack-desc/kfilemetadata
+++ /dev/null
@@ -1,19 +0,0 @@
-# HOW TO EDIT THIS FILE:
-# The "handy ruler" below makes it easier to edit a package description. Line
-# up the first '|' above the ':' following the base package name, and the '|' on
-# the right side marks the last column you can put a character in. You must make
-# exactly 11 lines for the formatting to be correct. It's also customary to
-# leave one space after the ':'.
-
- |-----handy-ruler------------------------------------------------------|
-kfilemetadata: kfilemetadata (a library for extracting file metadata)
-kfilemetadata:
-kfilemetadata: kfilemetadata is a library for extracting file metadata.
-kfilemetadata:
-kfilemetadata:
-kfilemetadata:
-kfilemetadata:
-kfilemetadata:
-kfilemetadata:
-kfilemetadata: For more information, visit: http://www.kde.org
-kfilemetadata:
diff --git a/kde/slack-desc/kfind b/kde/slack-desc/kfind
new file mode 100644
index 0000000..b2b61a1
--- /dev/null
+++ b/kde/slack-desc/kfind
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|'
+# on the right side marks the last column you can put a character in. You must
+# make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+kfind: kfind (find files and directories in KDE)
+kfind:
+kfind: Find files and directories in KDE.
+kfind:
+kfind:
+kfind:
+kfind:
+kfind:
+kfind:
+kfind: Home page: http://www.kde.org/
+kfind:
diff --git a/kde/slack-desc/kgamma b/kde/slack-desc/kgamma
deleted file mode 100644
index be461c5..0000000
--- a/kde/slack-desc/kgamma
+++ /dev/null
@@ -1,19 +0,0 @@
-# HOW TO EDIT THIS FILE:
-# The "handy ruler" below makes it easier to edit a package description. Line
-# up the first '|' above the ':' following the base package name, and the '|' on
-# the right side marks the last column you can put a character in. You must make
-# exactly 11 lines for the formatting to be correct. It's also customary to
-# leave one space after the ':'.
-
- |-----handy-ruler------------------------------------------------------|
-kgamma: kgamma (display gamma configuration)
-kgamma:
-kgamma: A KDE system settings module to configure display gamma.
-kgamma:
-kgamma: For more information, visit: http://www.kde.org
-kgamma:
-kgamma:
-kgamma:
-kgamma:
-kgamma:
-kgamma:
diff --git a/kde/slack-desc/kile b/kde/slack-desc/kile
new file mode 100644
index 0000000..542967c
--- /dev/null
+++ b/kde/slack-desc/kile
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|'
+# on the right side marks the last column you can put a character in. You must
+# make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+kile: kile (TeX/LaTeX frontend for Plasma5)
+kile:
+kile: kile is a user-friendly TeX/LaTeX editor
+kile: for the KDE desktop environment.
+kile:
+kile:
+kile:
+kile:
+kile:
+kile: Home page: http://kile.sourceforge.net/
+kile:
diff --git a/kde/slack-desc/kde-educational b/kde/slack-desc/kimagemapeditor
index bccdeb3..83a2fd1 100644
--- a/kde/slack-desc/kde-educational
+++ b/kde/slack-desc/kimagemapeditor
@@ -6,14 +6,14 @@
# customary to leave one space after the ':'.
|-----handy-ruler------------------------------------------------------|
-kde-educational: kde-educational (Educational applications)
-kde-educational:
-kde-educational: Educational applications for the KDE Software Compilation.
-kde-educational:
-kde-educational:
-kde-educational:
-kde-educational:
-kde-educational:
-kde-educational:
-kde-educational:
-kde-educational:
+kimagemapeditor: kimagemapeditor (HTML image map editor)
+kimagemapeditor:
+kimagemapeditor: HTML image map editor.
+kimagemapeditor:
+kimagemapeditor:
+kimagemapeditor:
+kimagemapeditor:
+kimagemapeditor:
+kimagemapeditor:
+kimagemapeditor: Home page: http://www.kde.org/
+kimagemapeditor:
diff --git a/kde/slack-desc/kimono b/kde/slack-desc/kimono
deleted file mode 100644
index 76c2f2f..0000000
--- a/kde/slack-desc/kimono
+++ /dev/null
@@ -1,19 +0,0 @@
-# HOW TO EDIT THIS FILE:
-# The "handy ruler" below makes it easier to edit a package description. Line
-# up the first '|' above the ':' following the base package name, and the '|' on
-# the right side marks the last column you can put a character in. You must make
-# exactly 11 lines for the formatting to be correct. It's also customary to
-# leave one space after the ':'.
-
- |-----handy-ruler------------------------------------------------------|
-kimono: kimono (C# mono KDE4 bindings)
-kimono:
-kimono: C# Mono KDE 4 language bindings.
-kimono:
-kimono: For more information, visit: http://www.www.org
-kimono:
-kimono:
-kimono:
-kimono:
-kimono:
-kimono:
diff --git a/kde/slack-desc/kio-mtp b/kde/slack-desc/kio-mtp
deleted file mode 100644
index 9e993c1..0000000
--- a/kde/slack-desc/kio-mtp
+++ /dev/null
@@ -1,19 +0,0 @@
-# HOW TO EDIT THIS FILE:
-# The "handy ruler" below makes it easier to edit a package description. Line
-# up the first '|' above the ':' following the base package name, and the '|' on
-# the right side marks the last column you can put a character in. You must make
-# exactly 11 lines for the formatting to be correct. It's also customary to
-# leave one space after the ':'.
-
- |-----handy-ruler------------------------------------------------------|
-kio-mtp: kio-mtp (Provides KIO Access to MTP devices)
-kio-mtp:
-kio-mtp: Provides KIO Access to MTP devices using the mtp:/// protocol.
-kio-mtp: MTP stands for Media Transfer Protocol. It is required in order to
-kio-mtp: access and manage files on devices running Android 4.0 and later.
-kio-mtp:
-kio-mtp:
-kio-mtp: Kio-mtp has been developed by Philipp Schmidt.
-kio-mtp:
-kio-mtp: For more information, visit: http://www.kde.org
-kio-mtp:
diff --git a/kde/slack-desc/kipi-plugins b/kde/slack-desc/kipi-plugins
deleted file mode 100644
index 58fc361..0000000
--- a/kde/slack-desc/kipi-plugins
+++ /dev/null
@@ -1,19 +0,0 @@
-# HOW TO EDIT THIS FILE:
-# The "handy ruler" below makes it easier to edit a package description. Line
-# up the first '|' above the ':' following the base package name, and the '|' on
-# the right side marks the last column you can put a character in. You must make
-# exactly 11 lines for the formatting to be correct. It's also customary to
-# leave one space after the ':'.
-
- |-----handy-ruler------------------------------------------------------|
-kipi-plugins: Kipi Plugins (Plugins for libKipi)
-kipi-plugins:
-kipi-plugins: Kipi Plugins are additional functions for the KDE Images Managment
-kipi-plugins: Host Programs (digiKam, KimDaBa, ShowImg, and Gwenview). They can add
-kipi-plugins: extra menus and shortcuts, and extend the host programs features. You
-kipi-plugins: can install as many or as few as you like, from within host programs.
-kipi-plugins:
-kipi-plugins: Homepage: http://www.kipi-plugins.org/
-kipi-plugins:
-kipi-plugins:
-kipi-plugins:
diff --git a/kde/slack-desc/kirigami2 b/kde/slack-desc/kirigami2
new file mode 100644
index 0000000..5a4c4d8
--- /dev/null
+++ b/kde/slack-desc/kirigami2
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|'
+# on the right side marks the last column you can put a character in. You must
+# make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+kirigami2: kirigami2 (interface components for QtQuick)
+kirigami2:
+kirigami2:
+kirigami2: Kirigami is a set of user interface components created to enable
+kirigami2: the creation of pleasant, efficient applications,
+kirigami2: by KDE's Plasma team and the KDE Visual Design Group.
+kirigami2:
+kirigami2:
+kirigami2:
+kirigami2: Home page: http://www.kde.org/
+kirigami2:
diff --git a/kde/slack-desc/kmail b/kde/slack-desc/kmail
new file mode 100644
index 0000000..d4f3849
--- /dev/null
+++ b/kde/slack-desc/kmail
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|'
+# on the right side marks the last column you can put a character in. You must
+# make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+kmail: kmail (KDE mail client)
+kmail:
+kmail: KDE e-mail client.
+kmail:
+kmail:
+kmail:
+kmail:
+kmail:
+kmail:
+kmail: Home page: http://www.kde.org/
+kmail:
diff --git a/kde/slack-desc/kmail-account-wizard b/kde/slack-desc/kmail-account-wizard
new file mode 100644
index 0000000..eeacecb
--- /dev/null
+++ b/kde/slack-desc/kmail-account-wizard
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|'
+# on the right side marks the last column you can put a character in. You must
+# make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+kmail-account-wizard: kmail-account-wizard (KMail account wizard)
+kmail-account-wizard:
+kmail-account-wizard: KMail account wizard.
+kmail-account-wizard:
+kmail-account-wizard:
+kmail-account-wizard:
+kmail-account-wizard:
+kmail-account-wizard:
+kmail-account-wizard:
+kmail-account-wizard: Home page: http://www.kde.org/
+kmail-account-wizard:
diff --git a/kde/slack-desc/kmymoney b/kde/slack-desc/kmymoney
new file mode 100644
index 0000000..c71822a
--- /dev/null
+++ b/kde/slack-desc/kmymoney
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|'
+# on the right side marks the last column you can put a character in. You must
+# make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+kmymoney: kmymoney (personal finance manager)
+kmymoney:
+kmymoney: KMymoney is a personal finance manager for KDE which operates
+kmymoney: similarly to MS-Money or Quicken.
+kmymoney:
+kmymoney:
+kmymoney:
+kmymoney:
+kmymoney:
+kmymoney: Home page: https://kmymoney.org/
+kmymoney:
diff --git a/kde/slack-desc/knotes b/kde/slack-desc/knotes
new file mode 100644
index 0000000..5e3b6ae
--- /dev/null
+++ b/kde/slack-desc/knotes
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|'
+# on the right side marks the last column you can put a character in. You must
+# make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+knotes: knotes (KDE sticky notes application)
+knotes:
+knotes: KDE sticky notes application.
+knotes:
+knotes:
+knotes:
+knotes:
+knotes:
+knotes:
+knotes: Home page: http://www.kde.org/
+knotes:
diff --git a/kde/slack-desc/koffice b/kde/slack-desc/koffice
deleted file mode 100644
index 6863e91..0000000
--- a/kde/slack-desc/koffice
+++ /dev/null
@@ -1,19 +0,0 @@
-# HOW TO EDIT THIS FILE:
-# The "handy ruler" below makes it easier to edit a package description. Line
-# up the first '|' above the ':' following the base package name, and the '|' on
-# the right side marks the last column you can put a character in. You must make
-# exactly 11 lines for the formatting to be correct. It's also customary to
-# leave one space after the ':'.
-
- |-----handy-ruler------------------------------------------------------|
-koffice: koffice (KDE office productivity suite)
-koffice:
-koffice: KOffice office productivity applications. Included are a word
-koffice: processor, spreadsheet, presentation program, chart and graph creator,
-koffice: vector graphics tool, database report creator, flowcharting program,
-koffice: integrated data management program, a pixel graphics editor,
-koffice: a mathematical formula editor, and KOffice Workspace
-koffice: (a combination of all of the above).
-koffice:
-koffice:
-koffice:
diff --git a/kde/slack-desc/konqueror b/kde/slack-desc/konqueror
new file mode 100644
index 0000000..5bb23b3
--- /dev/null
+++ b/kde/slack-desc/konqueror
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|'
+# on the right side marks the last column you can put a character in. You must
+# make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+konqueror: konqueror (KDE filemanager and webbrowser)
+konqueror:
+konqueror: KDE filemanager & webbrowser.
+konqueror:
+konqueror:
+konqueror:
+konqueror:
+konqueror:
+konqueror:
+konqueror: Home page: http://www.kde.org/
+konqueror:
diff --git a/kde/slack-desc/gpgmepp b/kde/slack-desc/kontact
index d607a7f..491345a 100644
--- a/kde/slack-desc/gpgmepp
+++ b/kde/slack-desc/kontact
@@ -6,14 +6,14 @@
# customary to leave one space after the ':'.
|-----handy-ruler------------------------------------------------------|
-gpgmepp: gpgmepp (C++ bindings/wrapper for gpgme)
-gpgmepp:
-gpgmepp: gpgmepp contains C++ bindings/wrapper for gpgme.
-gpgmepp:
-gpgmepp:
-gpgmepp:
-gpgmepp:
-gpgmepp:
-gpgmepp:
-gpgmepp: Home page: http://www.kde.org/
-gpgmepp:
+kontact: kontact (KDE Personal Information Manager)
+kontact:
+kontact: KDE Personal Information Manager.
+kontact:
+kontact:
+kontact:
+kontact:
+kontact:
+kontact:
+kontact: Home page: http://www.kde.org/
+kontact:
diff --git a/kde/slack-desc/kopete-cryptography b/kde/slack-desc/kopete-cryptography
deleted file mode 100644
index 7529a8b..0000000
--- a/kde/slack-desc/kopete-cryptography
+++ /dev/null
@@ -1,19 +0,0 @@
-# HOW TO EDIT THIS FILE:
-# The "handy ruler" below makes it easier to edit a package description. Line
-# up the first '|' above the ':' following the base package name, and the '|'
-# on the right side marks the last column you can put a character in. You must
-# make exactly 11 lines for the formatting to be correct. It's also
-# customary to leave one space after the ':'.
-
- |-----handy-ruler------------------------------------------------------|
-kopete-cryptography: kopete-cryptography (crypto support for kopete)
-kopete-cryptography:
-kopete-cryptography: Cryptographic support for Kopete, the KDE Instant Messenger.
-kopete-cryptography:
-kopete-cryptography:
-kopete-cryptography:
-kopete-cryptography:
-kopete-cryptography:
-kopete-cryptography:
-kopete-cryptography:
-kopete-cryptography:
diff --git a/kde/slack-desc/kdepimlibs b/kde/slack-desc/korganizer
index 63a5c3e..f270504 100644
--- a/kde/slack-desc/kdepimlibs
+++ b/kde/slack-desc/korganizer
@@ -6,14 +6,14 @@
# customary to leave one space after the ':'.
|-----handy-ruler------------------------------------------------------|
-kdepimlibs: kdepimlibs (Libraries for KDE-PIM)
-kdepimlibs:
-kdepimlibs: This module includes libraries that are central to the development and
-kdepimlibs: execution of a KDE-PIM application.
-kdepimlibs:
-kdepimlibs:
-kdepimlibs:
-kdepimlibs:
-kdepimlibs:
-kdepimlibs: See also https://projects.kde.org/projects/kde/kdepimlibs
-kdepimlibs:
+korganizer: korganizer (calendar and scheduling program)
+korganizer:
+korganizer: Calendar and scheduling program.
+korganizer:
+korganizer:
+korganizer:
+korganizer:
+korganizer:
+korganizer:
+korganizer: Home page: http://www.kde.org/
+korganizer:
diff --git a/kde/slack-desc/korundum b/kde/slack-desc/korundum
deleted file mode 100644
index 70abb6a..0000000
--- a/kde/slack-desc/korundum
+++ /dev/null
@@ -1,19 +0,0 @@
-# HOW TO EDIT THIS FILE:
-# The "handy ruler" below makes it easier to edit a package description. Line
-# up the first '|' above the ':' following the base package name, and the '|' on
-# the right side marks the last column you can put a character in. You must make
-# exactly 11 lines for the formatting to be correct. It's also customary to
-# leave one space after the ':'.
-
- |-----handy-ruler------------------------------------------------------|
-korundum: korundum (KDE ruby bindings)
-korundum:
-korundum: Very complete bindings to both the KDE API and the Qt APIs.
-korundum: The Korundum package includes both a QtRuby Qt-only binding along
-korundum: with the full combined Qt/KDE one.
-korundum: The QtRuby package contains just Qt bindings with no dependencies
-korundum: on KDE.
-korundum:
-korundum: For more information, visit: http://rubyforge.org/projects/korundum/
-korundum:
-korundum:
diff --git a/kde/slack-desc/kplayer b/kde/slack-desc/kplayer
deleted file mode 100644
index 87605b2..0000000
--- a/kde/slack-desc/kplayer
+++ /dev/null
@@ -1,19 +0,0 @@
-# HOW TO EDIT THIS FILE:
-# The "handy ruler" below makes it easier to edit a package description. Line
-# up the first '|' above the ':' following the base package name, and the '|' on
-# the right side marks the last column you can put a character in. You must make
-# exactly 11 lines for the formatting to be correct. It's also customary to
-# leave one space after the ':'.
-
- |-----handy-ruler------------------------------------------------------|
-kplayer: kplayer (KDE media player)
-kplayer:
-kplayer: KPlayer is a KDE multimedia player. With KPlayer you can easily play
-kplayer: a wide variety of video and audio files and streams using a rich and
-kplayer: friendly interface that follows KDE standards.
-kplayer: KPlayer will work out of the box if properly installed, and because
-kplayer: it uses MPlayer as the media playing backend, it will play virtually
-kplayer: any file or Internet stream.
-kplayer:
-kplayer: For more information, visit: http://www.kde.org
-kplayer:
diff --git a/kde/slack-desc/kpmcore b/kde/slack-desc/kpmcore
new file mode 100644
index 0000000..44306d8
--- /dev/null
+++ b/kde/slack-desc/kpmcore
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|'
+# on the right side marks the last column you can put a character in. You must
+# make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':'.
+
+ |-----handy-ruler------------------------------------------------|
+kpmcore: kpmcore (KDE partitionmanager core libraries)
+kpmcore:
+kpmcore: kpmcore is a library for managing partitions. It contains
+kpmcore: common code for KDE Partition Manager and other projects.
+kpmcore:
+kpmcore:
+kpmcore:
+kpmcore:
+kpmcore: See also:
+kpmcore: https://www.kde.org/applications/system/kdepartitionmanager
+kpmcore:
diff --git a/kde/slack-desc/kppp b/kde/slack-desc/kppp
deleted file mode 100644
index 38e1271..0000000
--- a/kde/slack-desc/kppp
+++ /dev/null
@@ -1,19 +0,0 @@
-# HOW TO EDIT THIS FILE:
-# The "handy ruler" below makes it easier to edit a package description. Line
-# up the first '|' above the ':' following the base package name, and the '|' on
-# the right side marks the last column you can put a character in. You must make
-# exactly 11 lines for the formatting to be correct. It's also customary to
-# leave one space after the ':'.
-
- |-----handy-ruler------------------------------------------------------|
-kppp: kppp (dialer and frontend for pppd)
-kppp:
-kppp: KPPP is used to setup PPP (Point-to-Point Protocol) connections.
-kppp: This is most useful for connecting with a cell phone "modem" card
-kppp: these days. It is also use to configure real modem connections.
-kppp:
-kppp:
-kppp:
-kppp:
-kppp: For more information, visit: http://www.kde.org
-kppp:
diff --git a/kde/slack-desc/kremotecontrol b/kde/slack-desc/kremotecontrol
deleted file mode 100644
index 4da69dd..0000000
--- a/kde/slack-desc/kremotecontrol
+++ /dev/null
@@ -1,19 +0,0 @@
-# HOW TO EDIT THIS FILE:
-# The "handy ruler" below makes it easier to edit a package description. Line
-# up the first '|' above the ':' following the base package name, and the '|'
-# on the right side mkremotecontrols the last column you can put a character in. You must
-# make exactly 11 lines for the formatting to be correct. It's also
-# customary to leave one space after the ':'.
-
- |-----handy-ruler------------------------------------------------------|
-kremotecontrol: kremotecontrol (remote control frontend)
-kremotecontrol:
-kremotecontrol: KRemoteControl (formerly known as KDELirc) is a KDE frontend for
-kremotecontrol: your remote controls.
-kremotecontrol:
-kremotecontrol: kremotecontrol's home page is:
-kremotecontrol: http://utils.kde.org/projects/kremotecontrol
-kremotecontrol:
-kremotecontrol:
-kremotecontrol:
-kremotecontrol:
diff --git a/kde/slack-desc/krename b/kde/slack-desc/krename
new file mode 100644
index 0000000..71fdb64
--- /dev/null
+++ b/kde/slack-desc/krename
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|'
+# on the right side marks the last column you can put a character in. You must
+# make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+krename: krename (powerful batch file rename tool)
+krename:
+krename: KRename is a powerful batch renamer for KDE. It allows you to
+krename: easily rename hundreds or even more files in one go.
+krename: The filenames can be created by parts of the original filename,
+krename: numbering the files or accessing hundreds of informations about
+krename: the file, like creation date or Exif informations of an image.
+krename:
+krename:
+krename: Home page: http://www.krename.net/
+krename:
diff --git a/kde/slack-desc/krita b/kde/slack-desc/krita
new file mode 100644
index 0000000..6d7b41e
--- /dev/null
+++ b/kde/slack-desc/krita
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|'
+# on the right side marks the last column you can put a character in. You must
+# make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+krita: krita (painting program)
+krita:
+krita: Krita is a professional FREE and open source painting program.
+krita: It is made by artists that want to see affordable art tools
+krita: for everyone.
+krita:
+krita:
+krita:
+krita:
+krita: Home page: http://www.krita.org/
+krita:
diff --git a/kde/slack-desc/kde-base b/kde/slack-desc/krusader
index d00d2bf..9221c43 100644
--- a/kde/slack-desc/kde-base
+++ b/kde/slack-desc/krusader
@@ -6,14 +6,14 @@
# leave one space after the ':'.
|-----handy-ruler------------------------------------------------------|
-kde-base: kde-base (KDE core applications and files)
-kde-base:
-kde-base: This package provides the core applications and infrastructure files
-kde-base: for the KDE Plasma Desktop.
-kde-base:
-kde-base:
-kde-base:
-kde-base:
-kde-base:
-kde-base:
-kde-base:
+krusader: krusader (twin panel file management for KDE)
+krusader:
+krusader: Krusader is an advanced twin panel (commander style) file manager
+krusader: for KDE and other desktops in the *nix world, similar to Midnight
+krusader: or Total Commander.
+krusader: It provides all the file management features you could possibly want.
+krusader:
+krusader:
+krusader:
+krusader: For more information, visit: http://krusader.org
+krusader:
diff --git a/kde/slack-desc/ksaneplugin b/kde/slack-desc/ksaneplugin
deleted file mode 100644
index 410dcfc..0000000
--- a/kde/slack-desc/ksaneplugin
+++ /dev/null
@@ -1,19 +0,0 @@
-# HOW TO EDIT THIS FILE:
-# The "handy ruler" below makes it easier to edit a package description. Line
-# up the first '|' above the ':' following the base package name, and the '|' on
-# the right side marks the last column you can put a character in. You must make
-# exactly 11 lines for the formatting to be correct. It's also customary to
-# leave one space after the ':'.
-
- |-----handy-ruler------------------------------------------------------|
-ksaneplugin: ksaneplugin (scanning plugin using libksane)
-ksaneplugin:
-ksaneplugin: This is a KScan plugin that implements the scanning through libksane.
-ksaneplugin:
-ksaneplugin: For more information, visit: http://www.kde.org
-ksaneplugin:
-ksaneplugin:
-ksaneplugin:
-ksaneplugin:
-ksaneplugin:
-ksaneplugin:
diff --git a/kde/slack-desc/kscd b/kde/slack-desc/kscd
deleted file mode 100644
index c45699e..0000000
--- a/kde/slack-desc/kscd
+++ /dev/null
@@ -1,19 +0,0 @@
-# HOW TO EDIT THIS FILE:
-# The "handy ruler" below makes it easier to edit a package description. Line
-# up the first '|' above the ':' following the base package name, and the '|' on
-# the right side marks the last column you can put a character in. You must make
-# exactly 11 lines for the formatting to be correct. It's also customary to
-# leave one space after the ':'.
-
- |-----handy-ruler------------------------------------------------------|
-kscd: kscd (CD player)
-kscd:
-kscd: KsCD is a small, fast, CDDB enabled audio CD player which supports
-kscd: multiple platforms.
-kscd:
-kscd:
-kscd:
-kscd:
-kscd:
-kscd: For more information, visit: http://www.kde.org
-kscd:
diff --git a/kde/slack-desc/kscreen b/kde/slack-desc/kscreen
deleted file mode 100644
index 90f1d63..0000000
--- a/kde/slack-desc/kscreen
+++ /dev/null
@@ -1,19 +0,0 @@
-# HOW TO EDIT THIS FILE:
-# The "handy ruler" below makes it easier to edit a package description. Line
-# up the first '|' above the ':' following the base package name, and the '|' on
-# the right side marks the last column you can put a character in. You must make
-# exactly 11 lines for the formatting to be correct. It's also customary to
-# leave one space after the ':'.
-
- |-----handy-ruler------------------------------------------------------|
-kscreen: kscreen (KDE screen management)
-kscreen:
-kscreen: KScreen is the new screen management software for KDE Plasma
-kscreen: Workspaces which tries to be as magic and automatic as possible
-kscreen: for users with basic needs and easy to configure for those
-kscreen: who want special setups.
-kscreen:
-kscreen:
-kscreen: For more information, visit:
-kscreen: http://community.kde.org/Solid/Projects/ScreenManagement
-kscreen:
diff --git a/kde/slack-desc/ksecrets b/kde/slack-desc/ksecrets
deleted file mode 100644
index 40d6564..0000000
--- a/kde/slack-desc/ksecrets
+++ /dev/null
@@ -1,19 +0,0 @@
-# HOW TO EDIT THIS FILE:
-# The "handy ruler" below makes it easier to edit a package description. Line
-# up the first '|' above the ':' following the base package name, and the '|' on
-# the right side marks the last column you can put a character in. You must make
-# exactly 11 lines for the formatting to be correct. It's also customary to
-# leave one space after the ':'.
-
- |-----handy-ruler------------------------------------------------------|
-ksecrets: ksecrets (secrets management infrastructure)
-ksecrets:
-ksecrets: ksecretsservice is a secrets management infrastructure aiming to
-ksecrets: replace kwallet.
-ksecrets:
-ksecrets: For more information, visit:
-ksecrets: http://techbase.kde.org/Projects/Utils/ksecretsservice
-ksecrets:
-ksecrets:
-ksecrets:
-ksecrets:
diff --git a/kde/slack-desc/ksmtp b/kde/slack-desc/ksmtp
new file mode 100644
index 0000000..c8ab4de
--- /dev/null
+++ b/kde/slack-desc/ksmtp
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|'
+# on the right side marks the last column you can put a character in. You must
+# make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+ksmtp: ksmtp (library to send mail through smtp)
+ksmtp:
+ksmtp: ksmtp is a job-based library to send email through an SMTP server,
+ksmtp:
+ksmtp:
+ksmtp:
+ksmtp:
+ksmtp:
+ksmtp:
+ksmtp: Home page: http://www.kde.org/
+ksmtp:
diff --git a/kde/slack-desc/ksnapshot b/kde/slack-desc/ksnapshot
deleted file mode 100644
index 56b278a..0000000
--- a/kde/slack-desc/ksnapshot
+++ /dev/null
@@ -1,19 +0,0 @@
-# HOW TO EDIT THIS FILE:
-# The "handy ruler" below makes it easier to edit a package description. Line
-# up the first '|' above the ':' following the base package name, and the '|' on
-# the right side marks the last column you can put a character in. You must make
-# exactly 11 lines for the formatting to be correct. It's also customary to
-# leave one space after the ':'.
-
- |-----handy-ruler------------------------------------------------------|
-ksnapshot: ksnapshot (screen capture program)
-ksnapshot:
-ksnapshot: A screenshot utility for KDE.
-ksnapshot:
-ksnapshot: For more information, visit: http://www.kde.org
-ksnapshot:
-ksnapshot:
-ksnapshot:
-ksnapshot:
-ksnapshot:
-ksnapshot:
diff --git a/kde/slack-desc/kwave b/kde/slack-desc/kwave
new file mode 100644
index 0000000..9ee24de
--- /dev/null
+++ b/kde/slack-desc/kwave
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|' on
+# the right side marks the last column you can put a character in. You must make
+# exactly 11 lines for the formatting to be correct. It's also customary to
+# leave one space after the ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+kwave: kwave (A sound editor for KDE)
+kwave:
+kwave: Kwave is a sound editor built on the KDE Frameworks 5.
+kwave: With Kwave you can record, play back, import and edit many sorts of
+kwave: audio files including multi channel files.
+kwave: Kwave includes some plugins to transform audio files in several ways
+kwave: and presents a graphical view with zoom- and scroll capability.
+kwave:
+kwave:
+kwave: For more information, visit: http://kwave.sourceforge.net
+kwave:
diff --git a/kde/slack-desc/libkdegames4 b/kde/slack-desc/libkdegames4
deleted file mode 100644
index e2eaf34..0000000
--- a/kde/slack-desc/libkdegames4
+++ /dev/null
@@ -1,19 +0,0 @@
-# HOW TO EDIT THIS FILE:
-# The "handy ruler" below makes it easier to edit a package description. Line
-# up the first '|' above the ':' following the base package name, and the '|' on
-# the right side marks the last column you can put a character in. You must make
-# exactly 11 lines for the formatting to be correct. It's also customary to
-# leave one space after the ':'.
-
- |-----handy-ruler------------------------------------------------------|
-libkdegames4: libkdegames4 (common code and data for many KDE4 games)
-libkdegames4:
-libkdegames4: Libkdegames contains common code and data for many KDE4 games.
-libkdegames4:
-libkdegames4:
-libkdegames4:
-libkdegames4:
-libkdegames4:
-libkdegames4:
-libkdegames4: For more information, visit: http://www.kde.org
-libkdegames4:
diff --git a/kde/slack-desc/libkexiv2_4 b/kde/slack-desc/libkexiv2_4
deleted file mode 100644
index 687a263..0000000
--- a/kde/slack-desc/libkexiv2_4
+++ /dev/null
@@ -1,19 +0,0 @@
-# HOW TO EDIT THIS FILE:
-# The "handy ruler" below makes it easier to edit a package description. Line
-# up the first '|' above the ':' following the base package name, and the '|' on
-# the right side marks the last column you can put a character in. You must make
-# exactly 11 lines for the formatting to be correct. It's also customary to
-# leave one space after the ':'.
-
- |-----handy-ruler------------------------------------------------------|
-libkexiv2_4: libkexiv2_4 (wrapper library for exiv2 library)
-libkexiv2_4:
-libkexiv2_4: Libkexiv2 is a KDE wrapper around the Exiv2 library to manipulate
-libkexiv2_4: pictures' metadata.
-libkexiv2_4: This package contains the KDE4 based library version.
-libkexiv2_4:
-libkexiv2_4: For more information, visit: http://www.kipi-plugins.org/
-libkexiv2_4:
-libkexiv2_4:
-libkexiv2_4:
-libkexiv2_4:
diff --git a/kde/slack-desc/libkface b/kde/slack-desc/libkface
deleted file mode 100644
index d161a04..0000000
--- a/kde/slack-desc/libkface
+++ /dev/null
@@ -1,19 +0,0 @@
-# HOW TO EDIT THIS FILE:
-# The "handy ruler" below makes it easier to edit a package description. Line
-# up the first '|' above the ':' following the base package name, and the '|' on
-# the right side marks the last column you can put a character in. You must make
-# exactly 11 lines for the formatting to be correct. It's also customary to
-# leave one space after the ':'.
-
- |-----handy-ruler------------------------------------------------------|
-libkface: libkface (KDE face recognition wrapper library)
-libkface:
-libkface: A Qt/C++ wrapper around LibFace library to perform face recognition
-libkface: and detection over pictures.
-libkface: This library is used by kipi-plugins, digiKam and others.
-libkface:
-libkface:
-libkface:
-libkface:
-libkface: For more information, visit: http://www.digikam.org
-libkface:
diff --git a/kde/slack-desc/perlkde b/kde/slack-desc/libkgapi
index 2857717..1ad6f96 100644
--- a/kde/slack-desc/perlkde
+++ b/kde/slack-desc/libkgapi
@@ -6,14 +6,14 @@
# leave one space after the ':'.
|-----handy-ruler------------------------------------------------------|
-perlkde: perlkde (perl bindings for KDE)
-perlkde:
-perlkde: Perl bindings for KDE.
-perlkde:
-perlkde: For more information, visit: http://www.kde.org
-perlkde:
-perlkde:
-perlkde:
-perlkde:
-perlkde:
-perlkde:
+libkgapi: libkgapi (library for interacting with Google service API)
+libkgapi:
+libkgapi: A KDE-based library for accessing various Google services
+libkgapi: via their public API.
+libkgapi:
+libkgapi:
+libkgapi:
+libkgapi:
+libkgapi:
+libkgapi: For more information, visit: http://www.kde.org
+libkgapi:
diff --git a/kde/slack-desc/libkmahjongg4 b/kde/slack-desc/libkmahjongg4
deleted file mode 100644
index fe95815..0000000
--- a/kde/slack-desc/libkmahjongg4
+++ /dev/null
@@ -1,19 +0,0 @@
-# HOW TO EDIT THIS FILE:
-# The "handy ruler" below makes it easier to edit a package description. Line
-# up the first '|' above the ':' following the base package name, and the '|' on
-# the right side marks the last column you can put a character in. You must make
-# exactly 11 lines for the formatting to be correct. It's also customary to
-# leave one space after the ':'.
-
- |-----handy-ruler------------------------------------------------------|
-libkmahjongg4: libkmahjongg4 (library for rendering of Mahjongg tilesets)
-libkmahjongg4:
-libkmahjongg4: libkmahjongg4 is a library used by several KDE4 games for loading
-libkmahjongg4: and rendering of Mahjongg tilesets.
-libkmahjongg4:
-libkmahjongg4:
-libkmahjongg4:
-libkmahjongg4:
-libkmahjongg4:
-libkmahjongg4: For more information, visit: http://www.kde.org
-libkmahjongg4:
diff --git a/kde/slack-desc/libksane4 b/kde/slack-desc/libksane4
deleted file mode 100644
index 5da1fc4..0000000
--- a/kde/slack-desc/libksane4
+++ /dev/null
@@ -1,19 +0,0 @@
-# HOW TO EDIT THIS FILE:
-# The "handy ruler" below makes it easier to edit a package description. Line
-# up the first '|' above the ':' following the base package name, and the '|' on
-# the right side marks the last column you can put a character in. You must make
-# exactly 11 lines for the formatting to be correct. It's also customary to
-# leave one space after the ':'.
-
- |-----handy-ruler------------------------------------------------------|
-libksane4: libksane4 (KDE4 scan support interface)
-libksane4:
-libksane4: Libksane is a library to add scan support to KDE4 applications.
-libksane4:
-libksane4: For more information, visit: http://www.kde.org
-libksane4:
-libksane4:
-libksane4:
-libksane4:
-libksane4:
-libksane4:
diff --git a/kde/slack-desc/libkscreen b/kde/slack-desc/libkscreen
deleted file mode 100644
index d823209..0000000
--- a/kde/slack-desc/libkscreen
+++ /dev/null
@@ -1,19 +0,0 @@
-# HOW TO EDIT THIS FILE:
-# The "handy ruler" below makes it easier to edit a package description. Line
-# up the first '|' above the ':' following the base package name, and the '|' on
-# the right side marks the last column you can put a character in. You must make
-# exactly 11 lines for the formatting to be correct. It's also customary to
-# leave one space after the ':'.
-
- |-----handy-ruler------------------------------------------------------|
-libkscreen: libkscreen (KDE screen management library)
-libkscreen:
-libkscreen: LibKScreen is a library that provides access to current configuration
-libkscreen: of connected displays and ways to change the configuration.
-libkscreen:
-libkscreen:
-libkscreen:
-libkscreen:
-libkscreen: For more information, visit:
-libkscreen: http://community.kde.org/Solid/Projects/ScreenManagement
-libkscreen:
diff --git a/kde/slack-desc/libmm-qt5 b/kde/slack-desc/libmm-qt5
deleted file mode 100644
index d89bd4a..0000000
--- a/kde/slack-desc/libmm-qt5
+++ /dev/null
@@ -1,19 +0,0 @@
-# HOW TO EDIT THIS FILE:
-# The "handy ruler" below makes it easier to edit a package description. Line
-# up the first '|' above the ':' following the base package name, and the '|' on
-# the right side marks the last column you can put a character in. You must make
-# exactly 11 lines for the formatting to be correct. It's also customary to
-# leave one space after the ':'.
-
- |-----handy-ruler------------------------------------------------------|
-libmm-qt5: libmm-qt (ModemManager Qt bindings)
-libmm-qt5:
-libmm-qt5: This package contains Qt bindings for ModemManager.
-libmm-qt5:
-libmm-qt5:
-libmm-qt5:
-libmm-qt5:
-libmm-qt5:
-libmm-qt5:
-libmm-qt5: For more information, visit: http://www.kde.org
-libmm-qt5:
diff --git a/kde/slack-desc/libnm-qt b/kde/slack-desc/libnm-qt
deleted file mode 100644
index 671fbe5..0000000
--- a/kde/slack-desc/libnm-qt
+++ /dev/null
@@ -1,19 +0,0 @@
-# HOW TO EDIT THIS FILE:
-# The "handy ruler" below makes it easier to edit a package description. Line
-# up the first '|' above the ':' following the base package name, and the '|' on
-# the right side marks the last column you can put a character in. You must make
-# exactly 11 lines for the formatting to be correct. It's also customary to
-# leave one space after the ':'.
-
- |-----handy-ruler------------------------------------------------------|
-libnm-qt: libnm-qt (NetworkManager Qt bindings)
-libnm-qt:
-libnm-qt: This package contains Qt bindings for NetworkManager.
-libnm-qt:
-libnm-qt:
-libnm-qt:
-libnm-qt:
-libnm-qt:
-libnm-qt:
-libnm-qt: For more information, visit: http://www.kde.org
-libnm-qt:
diff --git a/kde/slack-desc/libnm-qt5 b/kde/slack-desc/libnm-qt5
deleted file mode 100644
index 283eb74..0000000
--- a/kde/slack-desc/libnm-qt5
+++ /dev/null
@@ -1,19 +0,0 @@
-# HOW TO EDIT THIS FILE:
-# The "handy ruler" below makes it easier to edit a package description. Line
-# up the first '|' above the ':' following the base package name, and the '|' on
-# the right side marks the last column you can put a character in. You must make
-# exactly 11 lines for the formatting to be correct. It's also customary to
-# leave one space after the ':'.
-
- |-----handy-ruler------------------------------------------------------|
-libnm-qt5: libnm-qt (NetworkManager Qt bindings)
-libnm-qt5:
-libnm-qt5: This package contains Qt bindings for NetworkManager.
-libnm-qt5:
-libnm-qt5:
-libnm-qt5:
-libnm-qt5:
-libnm-qt5:
-libnm-qt5:
-libnm-qt5: For more information, visit: http://www.kde.org
-libnm-qt5:
diff --git a/kde/slack-desc/mbox-importer b/kde/slack-desc/mbox-importer
new file mode 100644
index 0000000..96e34f8
--- /dev/null
+++ b/kde/slack-desc/mbox-importer
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|'
+# on the right side marks the last column you can put a character in. You must
+# make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+mbox-importer: mbox-importer (import mbox files to KMail)
+mbox-importer:
+mbox-importer: Import mbox files to KMail.
+mbox-importer:
+mbox-importer:
+mbox-importer:
+mbox-importer:
+mbox-importer:
+mbox-importer:
+mbox-importer: Home page: http://www.kde.org/
+mbox-importer:
diff --git a/kde/slack-desc/mplayerthumbs b/kde/slack-desc/mplayerthumbs
deleted file mode 100644
index 999518d..0000000
--- a/kde/slack-desc/mplayerthumbs
+++ /dev/null
@@ -1,19 +0,0 @@
-# HOW TO EDIT THIS FILE:
-# The "handy ruler" below makes it easier to edit a package description. Line
-# up the first '|' above the ':' following the base package name, and the '|' on
-# the right side marks the last column you can put a character in. You must make
-# exactly 11 lines for the formatting to be correct. It's also customary to
-# leave one space after the ':'.
-
- |-----handy-ruler------------------------------------------------------|
-mplayerthumbs: mplayerthumbs (video thumbnail generator)
-mplayerthumbs:
-mplayerthumbs: MPlayerThumbs is a video thumbnail generator for KDE file managers
-mplayerthumbs: like Dolphin and Konqueror. It enables them to show preview images
-mplayerthumbs: of video files.
-mplayerthumbs:
-mplayerthumbs:
-mplayerthumbs:
-mplayerthumbs:
-mplayerthumbs: For more information, visit: http://www.kde.org
-mplayerthumbs:
diff --git a/kde/slack-desc/muon b/kde/slack-desc/muon
deleted file mode 100644
index 5759b49..0000000
--- a/kde/slack-desc/muon
+++ /dev/null
@@ -1,19 +0,0 @@
-# HOW TO EDIT THIS FILE:
-# The "handy ruler" below makes it easier to edit a package description. Line
-# up the first '|' above the ':' following the base package name, and the '|' on
-# the right side marks the last column you can put a character in. You must make
-# exactly 11 lines for the formatting to be correct. It's also customary to
-# leave one space after the ':'.
-
- |-----handy-ruler------------------------------------------------------|
-muon: muon (install and manage software and other addons for your computer)
-muon:
-muon: Muon lets you install and manage software and other addons
-muon: for your computer.
-muon:
-muon:
-muon:
-muon:
-muon:
-muon: For more information, visit: http://www.kde.org
-muon:
diff --git a/kde/slack-desc/nepomuk-core b/kde/slack-desc/nepomuk-core
deleted file mode 100644
index c969b9e..0000000
--- a/kde/slack-desc/nepomuk-core
+++ /dev/null
@@ -1,19 +0,0 @@
-# HOW TO EDIT THIS FILE:
-# The "handy ruler" below makes it easier to edit a package description. Line
-# up the first '|' above the ':' following the base package name, and the '|' on
-# the right side marks the last column you can put a character in. You must make
-# exactly 11 lines for the formatting to be correct. It's also customary to
-# leave one space after the ':'.
-
- |-----handy-ruler------------------------------------------------------|
-nepomuk-core: nepomuk-core (Nepomuk Core utilities and libraries)
-nepomuk-core:
-nepomuk-core: This package contains the Nepomuk Core utilities and libraries.
-nepomuk-core:
-nepomuk-core:
-nepomuk-core:
-nepomuk-core:
-nepomuk-core:
-nepomuk-core:
-nepomuk-core: For more information, visit: http://www.kde.org
-nepomuk-core:
diff --git a/kde/slack-desc/nepomuk-widgets b/kde/slack-desc/nepomuk-widgets
deleted file mode 100644
index f31413c..0000000
--- a/kde/slack-desc/nepomuk-widgets
+++ /dev/null
@@ -1,19 +0,0 @@
-# HOW TO EDIT THIS FILE:
-# The "handy ruler" below makes it easier to edit a package description. Line
-# up the first '|' above the ':' following the base package name, and the '|' on
-# the right side marks the last column you can put a character in. You must make
-# exactly 11 lines for the formatting to be correct. It's also customary to
-# leave one space after the ':'.
-
- |-----handy-ruler------------------------------------------------------|
-nepomuk-widgets: nepomuk-widgets (nepomuk widgets)
-nepomuk-widgets:
-nepomuk-widgets: This package contains all of the Nepomuk widgets.
-nepomuk-widgets:
-nepomuk-widgets:
-nepomuk-widgets:
-nepomuk-widgets:
-nepomuk-widgets:
-nepomuk-widgets:
-nepomuk-widgets: For more information, visit: http://nepomuk.kde.org/
-nepomuk-widgets:
diff --git a/kde/slack-desc/networkmanagement b/kde/slack-desc/networkmanagement
deleted file mode 100644
index 1c2ddcb..0000000
--- a/kde/slack-desc/networkmanagement
+++ /dev/null
@@ -1,19 +0,0 @@
-# HOW TO EDIT THIS FILE:
-# The "handy ruler" below makes it easier to edit a package description. Line
-# up the first '|' above the ':' following the base package name, and the '|' on
-# the right side marks the last column you can put a character in. You must make
-# exactly 11 lines for the formatting to be correct. It's also customary to
-# leave one space after the ':'.
-
- |-----handy-ruler------------------------------------------------------|
-networkmanagement: networkmanagement (KDE network control panel and widget)
-networkmanagement:
-networkmanagement: KDE network control panel and widget.
-networkmanagement:
-networkmanagement: For more information, visit:
-networkmanagement: http://userbase.kde.org/NetworkManagement
-networkmanagement:
-networkmanagement:
-networkmanagement:
-networkmanagement:
-networkmanagement:
diff --git a/kde/slack-desc/oktetapart4 b/kde/slack-desc/oktetapart4
deleted file mode 100644
index c6ae8b5..0000000
--- a/kde/slack-desc/oktetapart4
+++ /dev/null
@@ -1,19 +0,0 @@
-# HOW TO EDIT THIS FILE:
-# The "handy ruler" below makes it easier to edit a package description. Line
-# up the first '|' above the ':' following the base package name, and the '|' on
-# the right side marks the last column you can put a character in. You must make
-# exactly 11 lines for the formatting to be correct. It's also customary to
-# leave one space after the ':'.
-
- |-----handy-ruler------------------------------------------------------|
-oktetapart4: oktetapart4 (hex editor KPart)
-oktetapart4:
-oktetapart4: A KDE hex editor KPart for viewing and editing the raw data of filees
-oktetapart4: in KDE 4 based applications on Plasma 5.
-oktetapart4:
-oktetapart4:
-oktetapart4:
-oktetapart4:
-oktetapart4:
-oktetapart4: For more information, visit: http://www.kde.org
-oktetapart4:
diff --git a/kde/slack-desc/oxygen-icons b/kde/slack-desc/oxygen-icons
deleted file mode 100644
index 85a5e45..0000000
--- a/kde/slack-desc/oxygen-icons
+++ /dev/null
@@ -1,19 +0,0 @@
-# HOW TO EDIT THIS FILE:
-# The "handy ruler" below makes it easier to edit a package description. Line
-# up the first '|' above the ':' following the base package name, and the '|' on
-# the right side marks the last column you can put a character in. You must make
-# exactly 11 lines for the formatting to be correct. It's also customary to
-# leave one space after the ':'.
-
- |-----handy-ruler------------------------------------------------------|
-oxygen-icons: oxygen-icons (Oxygen theme for the KDE Plasma Desktop)
-oxygen-icons:
-oxygen-icons: Oxygen provides a complete and modern icon theme for KDE.
-oxygen-icons:
-oxygen-icons: Visit the Oxygen project online: http://www.oxygen-icons.org
-oxygen-icons:
-oxygen-icons:
-oxygen-icons:
-oxygen-icons:
-oxygen-icons:
-oxygen-icons:
diff --git a/kde/slack-desc/pairs b/kde/slack-desc/pairs
deleted file mode 100644
index 570aae2..0000000
--- a/kde/slack-desc/pairs
+++ /dev/null
@@ -1,19 +0,0 @@
-# HOW TO EDIT THIS FILE:
-# The "handy ruler" below makes it easier to edit a package description. Line
-# up the first '|' above the ':' following the base package name, and the '|' on
-# the right side marks the last column you can put a character in. You must make
-# exactly 11 lines for the formatting to be correct. It's also customary to
-# leave one space after the ':'.
-
- |-----handy-ruler------------------------------------------------------|
-pairs: pairs (a memory game)
-pairs:
-pairs: Pairs is a game that will help train your memory by remembering
-pairs: different images, shapes, sounds and text.
-pairs:
-pairs:
-pairs:
-pairs:
-pairs:
-pairs: For more information, visit: http://www.kde.org
-pairs:
diff --git a/kde/slack-desc/partitionmanager b/kde/slack-desc/partitionmanager
index 0f8c667..37dbe49 100644
--- a/kde/slack-desc/partitionmanager
+++ b/kde/slack-desc/partitionmanager
@@ -6,7 +6,7 @@
# customary to leave one space after the ':'.
|-----handy-ruler------------------------------------------------|
-partitionmanager: partitionmanager (Graphical partition manager for KDE4)
+partitionmanager: partitionmanager (Graphical partition manager for KDE)
partitionmanager:
partitionmanager: Easily manage disks, partitions and filesystems on your KDE
partitionmanager: desktop. Create, resize, move, copy, back up, restore or
diff --git a/kde/slack-desc/perlqt b/kde/slack-desc/perlqt
deleted file mode 100644
index 3023348..0000000
--- a/kde/slack-desc/perlqt
+++ /dev/null
@@ -1,19 +0,0 @@
-# HOW TO EDIT THIS FILE:
-# The "handy ruler" below makes it easier to edit a package description. Line
-# up the first '|' above the ':' following the base package name, and the '|' on
-# the right side marks the last column you can put a character in. You must make
-# exactly 11 lines for the formatting to be correct. It's also customary to
-# leave one space after the ':'.
-
- |-----handy-ruler------------------------------------------------------|
-perlqt: perlqt (Perl OO interface to Qt)
-perlqt:
-perlqt: A Perl Object Oriented interface to the Qt GUI Toolkit.
-perlqt: Access to the KDE Desktop Environment libraries is planned as well.
-perlqt:
-perlqt: For more information, visit: http://perlqt.sourceforge.net
-perlqt:
-perlqt:
-perlqt:
-perlqt:
-perlqt:
diff --git a/kde/slack-desc/kdevelop-php-docs b/kde/slack-desc/pim-data-exporter
index df36858..6094dde 100644
--- a/kde/slack-desc/kdevelop-php-docs
+++ b/kde/slack-desc/pim-data-exporter
@@ -6,14 +6,14 @@
# customary to leave one space after the ':'.
|-----handy-ruler------------------------------------------------------|
-kdevelop-php-docs: kdevelop-php-docs (PHP documentation plugin for KDevelop)
-kdevelop-php-docs:
-kdevelop-php-docs: This KDevelop plugin integrates the php.net online documentation.
-kdevelop-php-docs:
-kdevelop-php-docs:
-kdevelop-php-docs:
-kdevelop-php-docs:
-kdevelop-php-docs:
-kdevelop-php-docs:
-kdevelop-php-docs:
-kdevelop-php-docs:
+pim-data-exporter: pim-data-exporter (import and export KDE PIM settings)
+pim-data-exporter:
+pim-data-exporter: Import and export KDE PIM settings.
+pim-data-exporter:
+pim-data-exporter:
+pim-data-exporter:
+pim-data-exporter:
+pim-data-exporter:
+pim-data-exporter:
+pim-data-exporter: Home page: http://www.kde.org/
+pim-data-exporter:
diff --git a/kde/slack-desc/xembed-sni-proxy b/kde/slack-desc/pim-sieve-editor
index 74170b8..ea1e912 100644
--- a/kde/slack-desc/xembed-sni-proxy
+++ b/kde/slack-desc/pim-sieve-editor
@@ -6,14 +6,14 @@
# customary to leave one space after the ':'.
|-----handy-ruler------------------------------------------------------|
-xembed-sni-proxy: xembed-sni-proxy (Convert XEmbed system tray icons to SNI icons)
-xembed-sni-proxy:
-xembed-sni-proxy: Convert XEmbed system tray icons to SNI icons.
-xembed-sni-proxy:
-xembed-sni-proxy:
-xembed-sni-proxy:
-xembed-sni-proxy:
-xembed-sni-proxy:
-xembed-sni-proxy:
-xembed-sni-proxy: See also: https://github.com/davidedmundson/xembed-sni-proxy.git
-xembed-sni-proxy:
+pim-sieve-editor: pim-sieve-editor (mail sieve editor)
+pim-sieve-editor:
+pim-sieve-editor: Mail sieve editor.
+pim-sieve-editor:
+pim-sieve-editor:
+pim-sieve-editor:
+pim-sieve-editor:
+pim-sieve-editor:
+pim-sieve-editor:
+pim-sieve-editor: Home page: http://www.kde.org/
+pim-sieve-editor:
diff --git a/kde/slack-desc/plasma-browser-integration b/kde/slack-desc/plasma-browser-integration
new file mode 100644
index 0000000..97d3468
--- /dev/null
+++ b/kde/slack-desc/plasma-browser-integration
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|'
+# on the right side marks the last column you can put a character in. You must
+# make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+plasma-browser-integration: plasma-browser-integration (integrate browsers into the Plasma desktop)
+plasma-browser-integration:
+plasma-browser-integration: The plasma-browser-integration package contains
+plasma-browser-integration: omponents necessary to integrate browsers into the Plasma Desktop
+plasma-browser-integration:
+plasma-browser-integration:
+plasma-browser-integration:
+plasma-browser-integration:
+plasma-browser-integration:
+plasma-browser-integration: Home page: https://www.kde.org/plasma-desktop
+plasma-browser-integration:
diff --git a/kde/slack-desc/plasma-mediacenter b/kde/slack-desc/plasma-mediacenter
deleted file mode 100644
index ab11368..0000000
--- a/kde/slack-desc/plasma-mediacenter
+++ /dev/null
@@ -1,19 +0,0 @@
-# HOW TO EDIT THIS FILE:
-# The "handy ruler" below makes it easier to edit a package description. Line
-# up the first '|' above the ':' following the base package name, and the '|' on
-# the right side marks the last column you can put a character in. You must make
-# exactly 11 lines for the formatting to be correct. It's also customary to
-# leave one space after the ':'.
-
- |-----handy-ruler------------------------------------------------------|
-plasma-mediacenter: plasma-mediacenter (KDE mediacenter)
-plasma-mediacenter:
-plasma-mediacenter: A mediacenter user interface written on top of the
-plasma-mediacenter: Plasma Frameworks.
-plasma-mediacenter: One unified interface for any device capable of running KDE.
-plasma-mediacenter:
-plasma-mediacenter:
-plasma-mediacenter:
-plasma-mediacenter: For more information, visit:
-plasma-mediacenter: https://community.kde.org/Plasma/Plasma_Media_Center
-plasma-mediacenter:
diff --git a/kde/slack-desc/plasma-nm b/kde/slack-desc/plasma-nm
deleted file mode 100644
index 09c24f0..0000000
--- a/kde/slack-desc/plasma-nm
+++ /dev/null
@@ -1,19 +0,0 @@
-# HOW TO EDIT THIS FILE:
-# The "handy ruler" below makes it easier to edit a package description. Line
-# up the first '|' above the ':' following the base package name, and the '|' on
-# the right side marks the last column you can put a character in. You must make
-# exactly 11 lines for the formatting to be correct. It's also customary to
-# leave one space after the ':'.
-
- |-----handy-ruler------------------------------------------------------|
-plasma-nm: plasma-nm (KDE networkmanagement applet)
-plasma-nm:
-plasma-nm: This package contains the KDE networkmanagement applet.
-plasma-nm: This applet is written in QML and replacing the old widget based
-plasma-nm: networkmanagement applet.
-plasma-nm:
-plasma-nm:
-plasma-nm:
-plasma-nm:
-plasma-nm: For more information, visit: http://www.kde.org
-plasma-nm:
diff --git a/kde/slack-desc/plasma-vault b/kde/slack-desc/plasma-vault
new file mode 100644
index 0000000..32a8ac5
--- /dev/null
+++ b/kde/slack-desc/plasma-vault
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|'
+# on the right side marks the last column you can put a character in. You must
+# make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+plasma-vault: plasma-vault (create encrypted vaults in plasma5 desktop)
+plasma-vault:
+plasma-vault: Plasma applet and services for creating encrypted vaults.
+plasma-vault: Plasma Vault offers strong encryption features presented in
+plasma-vault: a user-friendly way. Lock and encrypt documents and hide them
+plasma-vault: when the user is logged in.
+plasma-vault: These 'vaults' can be decrypted and opened easily.
+plasma-vault:
+plasma-vault:
+plasma-vault: Home page: http://www.kde.org/
+plasma-vault:
diff --git a/kde/slack-desc/polkit-kde-agent-1 b/kde/slack-desc/polkit-kde-agent-1
deleted file mode 100644
index 8b6f29b..0000000
--- a/kde/slack-desc/polkit-kde-agent-1
+++ /dev/null
@@ -1,18 +0,0 @@
-# HOW TO EDIT THIS FILE:
-# The "handy ruler" below makes it easier to edit a package description. Line
-# up the first '|' above the ':' following the base package name, and the '|'
-# on the right side marks the last column you can put a character in. You must
-# make exactly 11 lines for the formatting to be correct. It's also
-# customary to leave one space after the ':'.
-
- |-----handy-ruler-----------------------------------------------------|
-polkit-kde-agent-1: polkit-kde-agent-1 (KDE polkit authenticator)
-polkit-kde-agent-1:
-polkit-kde-agent-1: This is a polkit authenticator for KDE.
-polkit-kde-agent-1:
-polkit-kde-agent-1:
-polkit-kde-agent-1:
-polkit-kde-agent-1:
-polkit-kde-agent-1:
-polkit-kde-agent-1:
-polkit-kde-agent-1:
diff --git a/kde/slack-desc/printer-applet b/kde/slack-desc/printer-applet
deleted file mode 100644
index f2dd263..0000000
--- a/kde/slack-desc/printer-applet
+++ /dev/null
@@ -1,19 +0,0 @@
-# HOW TO EDIT THIS FILE:
-# The "handy ruler" below makes it easier to edit a package description. Line
-# up the first '|' above the ':' following the base package name, and the '|'
-# on the right side mprinter-applets the last column you can put a character in. You must
-# make exactly 11 lines for the formatting to be correct. It's also
-# customary to leave one space after the ':'.
-
- |-----handy-ruler------------------------------------------------------|
-printer-applet: printer-applet (printer applet)
-printer-applet:
-printer-applet: Printer Applet is a system tray utility that shows current print
-printer-applet: jobs, printer warnings, and errors.
-printer-applet:
-printer-applet: Homepage: http://utils.kde.org/projects/printer-applet
-printer-applet:
-printer-applet:
-printer-applet:
-printer-applet:
-printer-applet:
diff --git a/kde/slack-desc/purpose b/kde/slack-desc/purpose
new file mode 100644
index 0000000..880883a
--- /dev/null
+++ b/kde/slack-desc/purpose
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|'
+# on the right side marks the last column you can put a character in. You must
+# make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+purpose: purpose (offers available actions for a specific purpose)
+purpose:
+purpose: This framework offers the possibility to create integrate services
+purpose: and actions on any application without having to implement them
+purpose: specifically.
+purpose: Purpose will offer them mechanisms to list the different alternatives
+purpose: to execute given the requested action type and will facilitate
+purpose: components so that all the plugins can receive all the information
+purpose: they need.
+purpose:
+purpose: Home page: http://www.kde.org/
diff --git a/kde/slack-desc/pykde4 b/kde/slack-desc/pykde4
deleted file mode 100644
index 65fe3a1..0000000
--- a/kde/slack-desc/pykde4
+++ /dev/null
@@ -1,19 +0,0 @@
-# HOW TO EDIT THIS FILE:
-# The "handy ruler" below makes it easier to edit a package description. Line
-# up the first '|' above the ':' following the base package name, and the '|' on
-# the right side marks the last column you can put a character in. You must make
-# exactly 11 lines for the formatting to be correct. It's also customary to
-# leave one space after the ':'.
-
- |-----handy-ruler------------------------------------------------------|
-pykde4: pykde4 (Python bindings for KDE4)
-pykde4:
-pykde4: Python bindings for KDE4.
-pykde4:
-pykde4: For more information, visit: http://www.kde.org
-pykde4:
-pykde4:
-pykde4:
-pykde4:
-pykde4:
-pykde4:
diff --git a/kde/slack-desc/qqc2-desktop-style b/kde/slack-desc/qqc2-desktop-style
new file mode 100644
index 0000000..f128b48
--- /dev/null
+++ b/kde/slack-desc/qqc2-desktop-style
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|'
+# on the right side marks the last column you can put a character in. You must
+# make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+qqc2-desktop-style: qqc2-desktop-style (desktop integration for qt quick controls 2)
+qqc2-desktop-style:
+qqc2-desktop-style: This is a style for QtQuick Controls 2 which is using QStyle to paint
+qqc2-desktop-style: controls in order to give them a native look & feel on the desktop.
+qqc2-desktop-style: It will be used when te environment variable
+qqc2-desktop-style: QT_QUICK_CONTROLS_STYLE=org.kde.desktop is exported,
+qqc2-desktop-style: or directly in C++ code.
+qqc2-desktop-style:
+qqc2-desktop-style:
+qqc2-desktop-style: Home page: https://api.kde.org/frameworks/qqc2-desktop-style/html/
+qqc2-desktop-style:
diff --git a/kde/slack-desc/qtruby b/kde/slack-desc/qtruby
deleted file mode 100644
index 9f02b06..0000000
--- a/kde/slack-desc/qtruby
+++ /dev/null
@@ -1,19 +0,0 @@
-# HOW TO EDIT THIS FILE:
-# The "handy ruler" below makes it easier to edit a package description. Line
-# up the first '|' above the ':' following the base package name, and the '|' on
-# the right side marks the last column you can put a character in. You must make
-# exactly 11 lines for the formatting to be correct. It's also customary to
-# leave one space after the ':'.
-
- |-----handy-ruler------------------------------------------------------|
-qtruby: qtruby (Qt bindings for ruby)
-qtruby:
-qtruby: QtRuby is part of Korundum, very complete bindings to both the KDE
-qtruby: API and the Qt APIs. The Korundum package includes both a QtRuby
-qtruby: Qt-only binding along with the full combined Qt/KDE one.
-qtruby: The QtRuby package contains just Qt bindings, with no dependency
-qtruby: on KDE.
-qtruby:
-qtruby: For more information, see: http://rubyforge.org/projects/korundum/
-qtruby:
-qtruby:
diff --git a/kde/slack-desc/qyoto b/kde/slack-desc/qyoto
deleted file mode 100644
index 9ca953e..0000000
--- a/kde/slack-desc/qyoto
+++ /dev/null
@@ -1,19 +0,0 @@
-# HOW TO EDIT THIS FILE:
-# The "handy ruler" below makes it easier to edit a package description. Line
-# up the first '|' above the ':' following the base package name, and the '|' on
-# the right side marks the last column you can put a character in. You must make
-# exactly 11 lines for the formatting to be correct. It's also customary to
-# leave one space after the ':'.
-
- |-----handy-ruler------------------------------------------------------|
-qyoto: qyoto (C# Mono Qt4 bindings)
-qyoto:
-qyoto: C# Mono Qt 4 language bindings.
-qyoto:
-qyoto: For more information, visit: http://www.www.org
-qyoto:
-qyoto:
-qyoto:
-qyoto:
-qyoto:
-qyoto:
diff --git a/kde/slack-desc/sddm-theme-breeze b/kde/slack-desc/sddm-theme-breeze
deleted file mode 100644
index f87a26e..0000000
--- a/kde/slack-desc/sddm-theme-breeze
+++ /dev/null
@@ -1,19 +0,0 @@
-# HOW TO EDIT THIS FILE:
-# The "handy ruler" below makes it easier to edit a package description. Line
-# up the first '|' above the ':' following the base package name, and the '|'
-# on the right side marks the last column you can put a character in. You must
-# make exactly 11 lines for the formatting to be correct. It's also
-# customary to leave one space after the ':' except on otherwise blank lines.
-
- |-----handy-ruler------------------------------------------------------|
-sddm-theme-breeze: sddm-theme-breeze (KDE5 Breeze theme for SDDM)
-sddm-theme-breeze:
-sddm-theme-breeze: A theme for Simple Desktop Display Manager (SDDM)
-sddm-theme-breeze: to blend in with the Breeze default theme of
-sddm-theme-breeze: the KDE5 desktop (Plasma Next).
-sddm-theme-breeze:
-sddm-theme-breeze:
-sddm-theme-breeze:
-sddm-theme-breeze: Homepage:
-sddm-theme-breeze: https://code.launchpad.net/~neon/project-neon5/sddm-theme-breeze
-sddm-theme-breeze:
diff --git a/kde/slack-desc/smokegen b/kde/slack-desc/smokegen
deleted file mode 100644
index 17142b4..0000000
--- a/kde/slack-desc/smokegen
+++ /dev/null
@@ -1,19 +0,0 @@
-# HOW TO EDIT THIS FILE:
-# The "handy ruler" below makes it easier to edit a package description. Line
-# up the first '|' above the ':' following the base package name, and the '|' on
-# the right side marks the last column you can put a character in. You must make
-# exactly 11 lines for the formatting to be correct. It's also customary to
-# leave one space after the ':'.
-
- |-----handy-ruler------------------------------------------------------|
-smokegen: smokegen (smoke generator)
-smokegen:
-smokegen: Smoke Generator. The main purpose of SMOKE is making it easier to
-smokegen: write bindings from scripting languages to Qt and KDE - with an
-smokegen: emphasis on ease of use and flexibility.
-smokegen:
-smokegen: For more information, visit: http://www.kde.org
-smokegen:
-smokegen:
-smokegen:
-smokegen:
diff --git a/kde/slack-desc/smokekde b/kde/slack-desc/smokekde
deleted file mode 100644
index 8fee37a..0000000
--- a/kde/slack-desc/smokekde
+++ /dev/null
@@ -1,19 +0,0 @@
-# HOW TO EDIT THIS FILE:
-# The "handy ruler" below makes it easier to edit a package description. Line
-# up the first '|' above the ':' following the base package name, and the '|' on
-# the right side marks the last column you can put a character in. You must make
-# exactly 11 lines for the formatting to be correct. It's also customary to
-# leave one space after the ':'.
-
- |-----handy-ruler------------------------------------------------------|
-smokekde: smokekde (smoke-kde library)
-smokekde:
-smokekde: Smoke generator.
-smokekde:
-smokekde: For more information, visit: http://www.kde.org
-smokekde:
-smokekde:
-smokekde:
-smokekde:
-smokekde:
-smokekde:
diff --git a/kde/slack-desc/smokeqt b/kde/slack-desc/smokeqt
deleted file mode 100644
index dfac28c..0000000
--- a/kde/slack-desc/smokeqt
+++ /dev/null
@@ -1,19 +0,0 @@
-# HOW TO EDIT THIS FILE:
-# The "handy ruler" below makes it easier to edit a package description. Line
-# up the first '|' above the ':' following the base package name, and the '|' on
-# the right side marks the last column you can put a character in. You must make
-# exactly 11 lines for the formatting to be correct. It's also customary to
-# leave one space after the ':'.
-
- |-----handy-ruler------------------------------------------------------|
-smokeqt: smokeqt (bindings for Qt libraries)
-smokeqt:
-smokeqt: This package includes bindings for Qt libraries.
-smokeqt:
-smokeqt: For more information, visit: http://www.kde.org
-smokeqt:
-smokeqt:
-smokeqt:
-smokeqt:
-smokeqt:
-smokeqt:
diff --git a/kde/slack-desc/strigi b/kde/slack-desc/strigi
deleted file mode 100644
index 16dda7e..0000000
--- a/kde/slack-desc/strigi
+++ /dev/null
@@ -1,19 +0,0 @@
-# HOW TO EDIT THIS FILE:
-# The "handy ruler" below makes it easier to edit a package description. Line
-# up the first '|' above the ':' following the base package name, and the '|'
-# on the right side marks the last column you can put a character in. You must
-# make exactly 11 lines for the formatting to be correct. It's also
-# customary to leave one space after the ':'.
-
- |-----handy-ruler-----------------------------------------------------|
-strigi: strigi (fast and light desktop search engine)
-strigi:
-strigi: Strigi is a fast and light desktop search engine. It can handle a
-strigi: large range of file formats such as emails, office documents, media
-strigi: files, and file archives. It can index files that are embedded in
-strigi: other files. This means email attachments and files in zip files
-strigi: are searchable as if they were normal files on your harddisk.
-strigi:
-strigi: Homepage: http://strigi.sourceforge.net/
-strigi:
-strigi:
diff --git a/kde/slack-desc/strigi-multimedia b/kde/slack-desc/strigi-multimedia
deleted file mode 100644
index 0f6660b..0000000
--- a/kde/slack-desc/strigi-multimedia
+++ /dev/null
@@ -1,19 +0,0 @@
-# HOW TO EDIT THIS FILE:
-# The "handy ruler" below makes it easier to edit a package description. Line
-# up the first '|' above the ':' following the base package name, and the '|' on
-# the right side marks the last column you can put a character in. You must make
-# exactly 11 lines for the formatting to be correct. It's also customary to
-# leave one space after the ':'.
-
- |-----handy-ruler------------------------------------------------------|
-strigi-multimedia: strigi-multimedia (Strigi multimedia analyzers)
-strigi-multimedia:
-strigi-multimedia: Various analyzers to provide multimedia support to Strigi.
-strigi-multimedia:
-strigi-multimedia:
-strigi-multimedia:
-strigi-multimedia:
-strigi-multimedia:
-strigi-multimedia:
-strigi-multimedia: For more information, visit: http://www.kde.org
-strigi-multimedia:
diff --git a/kde/slack-desc/superkaramba b/kde/slack-desc/superkaramba
deleted file mode 100644
index 535e35e..0000000
--- a/kde/slack-desc/superkaramba
+++ /dev/null
@@ -1,19 +0,0 @@
-# HOW TO EDIT THIS FILE:
-# The "handy ruler" below makes it easier to edit a package description. Line
-# up the first '|' above the ':' following the base package name, and the '|'
-# on the right side msuperkarambas the last column you can put a character in. You must
-# make exactly 11 lines for the formatting to be correct. It's also
-# customary to leave one space after the ':'.
-
- |-----handy-ruler------------------------------------------------------|
-superkaramba: superkaramba (interactive widget manager)
-superkaramba:
-superkaramba: SuperKaramba is a tool that allows you to easily create
-superkaramba: interactive widgets on your KDE desktop.
-superkaramba:
-superkaramba: Home page: https://projects.kde.org/projects/kde/kdeutils/
-superkaramba:
-superkaramba:
-superkaramba:
-superkaramba:
-superkaramba:
diff --git a/kde/slack-desc/syntax-highlighting b/kde/slack-desc/syntax-highlighting
new file mode 100644
index 0000000..c821b5f
--- /dev/null
+++ b/kde/slack-desc/syntax-highlighting
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|' on
+# the right side marks the last column you can put a character in. You must make
+# exactly 11 lines for the formatting to be correct. It's also customary to
+# leave one space after the ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+syntax-highlighting: syntax-highlighting (syntax highlighting for Kate)
+syntax-highlighting:
+syntax-highlighting: Syntax highlighting engine for structured text and code.
+syntax-highlighting:
+syntax-highlighting:
+syntax-highlighting:
+syntax-highlighting:
+syntax-highlighting:
+syntax-highlighting:
+syntax-highlighting: See http://kde.org
+syntax-highlighting:
diff --git a/kde/slack-desc/libbluedevil b/kde/slack-desc/user-manager
index eb4e2ee..b84f0ad 100644
--- a/kde/slack-desc/libbluedevil
+++ b/kde/slack-desc/user-manager
@@ -6,14 +6,14 @@
# leave one space after the ':'.
|-----handy-ruler------------------------------------------------------|
-libbluedevil: libbluedevil (Qt wrapper for bluez used in the KDE bluetooth stack)
-libbluedevil:
-libbluedevil: Qt wrapper for bluez used in the KDE bluetooth stack.
-libbluedevil:
-libbluedevil:
-libbluedevil:
-libbluedevil:
-libbluedevil:
-libbluedevil:
-libbluedevil: For more information, visit: http://www.kde.org
-libbluedevil:
+user-manager: user-manager (manage the users of your system)
+user-manager:
+user-manager: USer-manager is a system settings module to manage the users
+user-manager: of your system.
+user-manager:
+user-manager:
+user-manager:
+user-manager:
+user-manager:
+user-manager: See also: https://cgit.kde.org/user-manager.git
+user-manager:
diff --git a/kde/slack-desc/kdepimlibs4 b/kde/slack-desc/wacomtablet
index 5b1845a..c54cf87 100644
--- a/kde/slack-desc/kdepimlibs4
+++ b/kde/slack-desc/wacomtablet
@@ -6,14 +6,14 @@
# customary to leave one space after the ':'.
|-----handy-ruler------------------------------------------------------|
-kdepimlibs4: kdepimlibs4 (Libraries for KDE-PIM - Qt4 based)
-kdepimlibs4:
-kdepimlibs4: This module includes Qt4-based libraries that are central to the
-kdepimlibs4: development and execution of a KDE-PIM application.
-kdepimlibs4:
-kdepimlibs4:
-kdepimlibs4:
-kdepimlibs4:
-kdepimlibs4:
-kdepimlibs4: See also: https://projects.kde.org/projects/kde/kdepimlibs
-kdepimlibs4:
+wacomtablet: wacomtablet (kcm for Wacom tablets)
+wacomtablet:
+wacomtablet: This module implements a GUI for the Wacom Linux Drivers
+wacomtablet: and extends it with profile support to handle different
+wacomtablet: button / pen layouts per profile.
+wacomtablet:
+wacomtablet:
+wacomtablet:
+wacomtablet:
+wacomtablet: Home page: https://github.com/KDE/wacomtablet
+wacomtablet:
diff --git a/kde/slack-desc/wicd-kde b/kde/slack-desc/wicd-kde
deleted file mode 100644
index 8c0e87d..0000000
--- a/kde/slack-desc/wicd-kde
+++ /dev/null
@@ -1,19 +0,0 @@
-# HOW TO EDIT THIS FILE:
-# The "handy ruler" below makes it easier to edit a package description. Line
-# up the first '|' above the ':' following the base package name, and the '|' on
-# the right side marks the last column you can put a character in. You must make
-# exactly 11 lines for the formatting to be correct. It's also customary to
-# leave one space after the ':'.
-
- |-----handy-ruler------------------------------------------------------|
-wicd-kde: wicd-kde (Wicd client built on the KDE Development Platform)
-wicd-kde:
-wicd-kde: A Wicd client built on the KDE Development Platform.
-wicd-kde:
-wicd-kde: For more information, visit:
-wicd-kde: https://projects.kde.org/projects/extragear/network/wicd-kde
-wicd-kde:
-wicd-kde:
-wicd-kde:
-wicd-kde:
-wicd-kde:
diff --git a/kde/slack-desc/xdg-desktop-portal-kde b/kde/slack-desc/xdg-desktop-portal-kde
new file mode 100644
index 0000000..35b443b
--- /dev/null
+++ b/kde/slack-desc/xdg-desktop-portal-kde
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|'
+# on the right side marks the last column you can put a character in. You must
+# make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+xdg-desktop-portal-kde: xdg-desktop-portal-kde (implementation for xdg-desktop-portal)
+xdg-desktop-portal-kde:
+xdg-desktop-portal-kde: A backend implementation for xdg-desktop-portal using Qt/KF5.
+xdg-desktop-portal-kde:
+xdg-desktop-portal-kde:
+xdg-desktop-portal-kde:
+xdg-desktop-portal-kde:
+xdg-desktop-portal-kde:
+xdg-desktop-portal-kde:
+xdg-desktop-portal-kde: Home page: http://www.kde.org/
+xdg-desktop-portal-kde:
diff --git a/kde/slack-desc/yakuake b/kde/slack-desc/yakuake
new file mode 100644
index 0000000..ce21172
--- /dev/null
+++ b/kde/slack-desc/yakuake
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|'
+# on the right side marks the last column you can put a character in. You must
+# make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+yakuake: yakuake (drop-down terminal)
+yakuake:
+yakuake: Yakuake is a drop-down terminal emulator based on KDE Konsole.
+yakuake: Features:
+yakuake: + Smoothly rolls down from the top of your screen
+yakuake: + Tabbed, skinnable interface
+yakuake: + Configurable dimensions and animation speed
+yakuake: + Sophisticated D-Bus interface
+yakuake:
+yakuake: Home page: http://www.kde.org/
+yakuake:
diff --git a/kdei/kde-l10n/kde-l10n.SlackBuild b/kdei/kde-l10n/kde-l10n.SlackBuild
deleted file mode 100755
index d1e960a..0000000
--- a/kdei/kde-l10n/kde-l10n.SlackBuild
+++ /dev/null
@@ -1,152 +0,0 @@
-#!/bin/sh
-
-# Copyright 2008 Robby Workman Northport, AL, USA
-# Copyright 2009, 2010, 2011, 2012, 2013, 2014, 2015 Patrick J. Volkerding, Sebeka, MN, USA
-# All rights reserved.
-#
-# Redistribution and use of this script, with or without modification, is
-# permitted provided that the following conditions are met:
-#
-# 1. Redistributions of this script must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-#
-# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ''AS IS'' AND ANY EXPRESS OR IMPLIED
-# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
-# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
-# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
-# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
-# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-# This script should build any of the language packs if run with (for example):
-# PKGLANG=de ./kde-l10n.SlackBuild
-# You should be able to build all of them with something like this:
-# for i in $(cat languages) ; do PKGLANG=$i ./kde-l10n.SlackBuild ; done
-# If ./languages is missing and this script is called without options, the
-# default is to create an up-to-date ./languages list and build all the
-# language packs.
-
-if [ ! -r ./languages ]; then
- for file in kde-l10n*xz ; do
- echo $file | cut -f 3 -d - >> ./languages
- done
-fi
-
-[ -z $VERSION ] && export VERSION=16.08.0
-[ -z $ARCH ] && export ARCH=noarch
-[ -z $BUILD ] && export BUILD=1
-
-# Use this as CFLAGS and CXXFLAGS:
-if [ -z "$SLKCFLAGS" ]; then
- if [ "$ARCH" = "i486" ]; then
- export SLKCFLAGS="-O2 -march=i486 -mtune=i686"
- elif [ "$ARCH" = "s390" ]; then
- export SLKCFLAGS="-O2"
- elif [ "$ARCH" = "x86_64" ]; then
- export SLKCFLAGS="-O2 -fPIC"
- elif [ "$ARCH" = "armv7hl" ]; then
- export SLKCFLAGS="-O2 -march=armv7-a -mfpu=vfpv3-d16"
- else
- export SLKCFLAGS="-O2"
- fi
-fi
-
-# Get the kde environment variables
-[ -d kdebase ] && . ./kdebase/profile.d/kde.sh
-
-# Set the config option variables if they are not already set:
-[ -r ../KDE.options ] && . ../KDE.options
-
-CWD=$(pwd)
-TMP=${TMP:-/tmp}
-
-# This function will insert missing kdepim translations from kde-l10n-4.4.5:
-insert_kdepim() {
- if [ -r $CWD/kdepim-l10n/kdepim-l10n-$(echo $PKGNAM | cut -f 3 -d -)-4.4.5.tar.xz ]; then
- tar xvf $CWD/kdepim-l10n/kdepim-l10n-$(echo $PKGNAM | cut -f 3 -d -)-4.4.5.tar.xz
- fi
- for dir in $(find . -type d -name messages) $(find . -type d -name docs) ; do
- ( cd $dir
- if [ -d kdepim ]; then
- echo "add_subdirectory( kdepim )" >> CMakeLists.txt.new
- fi
- if [ -r CMakeLists.txt ]; then
- cat CMakeLists.txt >> CMakeLists.txt.new
- mv CMakeLists.txt.new CMakeLists.txt
- else
- rm -f CMakeLists.txt.new
- fi
- )
- done
- # Update DTD specification. This will fix some of the issues...
- sed -i -e "s/V4.1.2-Based/V4.2-Based/g" $(grep -lr "V4.1.2-Based" *)
- sed -i -e "s/V4.1-Based/V4.2-Based/g" $(grep -lr "V4.1-Based" *)
- sed -i -e "s/V4.2-Based Variant V1.0/V4.2-Based Variant V1.1/g" $(grep -lr "V4.2-Based Variant V1.0" *)
- if ls $CWD/kdepim-l10n/kdepim-l10n-$(echo $PKGNAM | cut -f 3 -d -)-4.4.5.*.diff.gz 1> /dev/null 2> /dev/null ; then
- for patch in $CWD/kdepim-l10n/kdepim-l10n-$(echo $PKGNAM | cut -f 3 -d -)-4.4.5.*.diff.gz ; do
- zcat $patch | patch -p1 --verbose || exit 1
- done
- fi
-}
-
-make_language_pack() {
-rm -rf $PKG
-mkdir -p $TMP $PKG
-cd $TMP
-rm -rf $PKGNAM-$VERSION
-tar xvf $CWD/$PKGNAM-$VERSION.tar.xz || exit 1
-cd $PKGNAM-$VERSION || exit 1
-#insert_kdepim;
-chown -R root:root .
-find . \
- \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
- -exec chmod 755 {} \; -o \
- \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
- -exec chmod 644 {} \;
-mkdir -p build
-( cd build
- cmake \
- -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \
- -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
- -DCMAKE_INSTALL_PREFIX=/usr \
- -DMAN_INSTALL_DIR=/usr/man \
- -DSYSCONF_INSTALL_DIR=/etc/kde \
- -DLIB_SUFFIX=${LIBDIRSUFFIX} \
- ..
- make || exit 1
- make install DESTDIR=$PKG || exit 1
-) || touch $TMP/$PKGNAM.failed
-( cd $PKG
- find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
- find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
-)
-if [ -d $PKG/usr/man ]; then
- ( cd $PKG/usr/man
- find . -type f -exec gzip -9 {} \;
- )
-fi
-mkdir -p $PKG/install
-cat $CWD/slack-desc/slack-desc.kde-l10n-$PKGLANG > $PKG/install/slack-desc
-cd $PKG
-/sbin/makepkg -l y -c n $TMP/$PKGNAM-$VERSION-$ARCH-$BUILD.txz
-}
-
-if [ -z $PKGLANG ]; then
- for PKGLANG in $(cat languages) ; do
- PKGNAM=kde-l10n-$PKGLANG
- PKG=$TMP/package-kde-l10n-$PKGLANG
- # The global options may be overridden here (if needed):
- [ -r ./local.options/$PKGLANG ] && . ./local.options/$PKGLANG
- make_language_pack;
- done
-else
- PKGNAM=kde-l10n-$PKGLANG
- PKG=$TMP/package-kde-l10n-$PKGLANG
- # The global options may be overridden here (if needed):
- [ -r ./local.options/$PKGLANG ] && . ./local.options/$PKGLANG
- make_language_pack;
-fi
-
diff --git a/kdei/kde-l10n/kdepim-l10n/extract-kdepim-goodness.sh b/kdei/kde-l10n/kdepim-l10n/extract-kdepim-goodness.sh
deleted file mode 100644
index 1c91627..0000000
--- a/kdei/kde-l10n/kdepim-l10n/extract-kdepim-goodness.sh
+++ /dev/null
@@ -1,23 +0,0 @@
-#!/bin/sh
-# This script was used to extract the kdepim parts from the last kde-l10n
-# release that contained them. The resulting kdepim-l10n sources will be
-# merged into our language packages.
-
-# This should be run in the directory containing the kde-l10n-*-4.4.5
-# source tarballs that you wish to create kdepim-l10n archives from.
-
-for file in kde-l10n*.tar.bz2 ; do
- rm -rf $(basename $file .tar.bz2) kdepim-l10n-$(echo $file | cut -f 3 -d -)-4.4.5
- echo "Extracting $file"
- tar xf $file
- mkdir kdepim-l10n-$(echo $file | cut -f 3 -d -)-4.4.5
- ( cd $(basename $file .tar.bz2)
- find . -name "kdepim" -type d -exec cp -a --parents "{}" ../kdepim-l10n-$(echo $file | cut -f 3 -d -)-4.4.5 \;
- )
- ( cd kdepim-l10n-$(echo $file | cut -f 3 -d -)-4.4.5
- tar cf ../kdepim-l10n-$(echo $file | cut -f 3 -d -)-4.4.5.tar .
- )
- rm -f kdepim-l10n-$(echo $file | cut -f 3 -d -)-4.4.5.tar.bz2
- bzip2 -9 kdepim-l10n-$(echo $file | cut -f 3 -d -)-4.4.5.tar
- rm -r $(basename $file .tar.bz2) kdepim-l10n-$(echo $file | cut -f 3 -d -)-4.4.5
-done
diff --git a/kdei/kde-l10n/kdepim-l10n/kdepim-l10n-fr-4.4.5.korganizer.docbook.reorganize.diff.defunct b/kdei/kde-l10n/kdepim-l10n/kdepim-l10n-fr-4.4.5.korganizer.docbook.reorganize.diff.defunct
deleted file mode 100644
index df6184a..0000000
--- a/kdei/kde-l10n/kdepim-l10n/kdepim-l10n-fr-4.4.5.korganizer.docbook.reorganize.diff.defunct
+++ /dev/null
@@ -1,34 +0,0 @@
---- ./docs/kdepim/korganizer/index.docbook.orig 2011-01-19 10:56:02.410999994 -0600
-+++ ./docs/kdepim/korganizer/index.docbook 2011-01-19 12:40:25.712999555 -0600
-@@ -108,6 +108,15 @@
- <releaseinfo
- >2.20.00</releaseinfo>
-
-+<abstract
-+><para
-+>&korganizer; est un agenda personnel facile à utiliser (un <acronym
-+>PIM</acronym
-+>, acronyme anglais de <foreignphrase
-+>personal information manager</foreignphrase
-+>). Vous pouvez planifier des rendez-vous, des événements et des tâches à effectuer. &korganizer; vous remémorera les tâches en instances et vous aidera à respecter votre emploi du temps. </para
-+></abstract>
-+
- <keywordset>
- <keyword
- >KDE</keyword>
-@@ -127,15 +136,6 @@
- >rendez-vous</keyword>
- </keywordset>
-
--<abstract
--><para
-->&korganizer; est un agenda personnel facile à utiliser (un <acronym
-->PIM</acronym
-->, acronyme anglais de <foreignphrase
-->personal information manager</foreignphrase
-->). Vous pouvez planifier des rendez-vous, des événements et des tâches à effectuer. &korganizer; vous remémorera les tâches en instances et vous aidera à respecter votre emploi du temps. </para
--></abstract>
--
- </bookinfo>
-
- <chapter id="introduction">
diff --git a/kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-ar b/kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-ar
deleted file mode 100644
index c1850ab..0000000
--- a/kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-ar
+++ /dev/null
@@ -1,11 +0,0 @@
-kde-l10n-ar: kde-l10n-ar
-kde-l10n-ar:
-kde-l10n-ar: Arabic language support for KDE.
-kde-l10n-ar:
-kde-l10n-ar:
-kde-l10n-ar:
-kde-l10n-ar:
-kde-l10n-ar:
-kde-l10n-ar:
-kde-l10n-ar:
-kde-l10n-ar:
diff --git a/kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-bg b/kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-bg
deleted file mode 100644
index 4210b1f..0000000
--- a/kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-bg
+++ /dev/null
@@ -1,11 +0,0 @@
-kde-l10n-bg: kde-l10n-bg
-kde-l10n-bg:
-kde-l10n-bg: Bulgarian language support for KDE.
-kde-l10n-bg:
-kde-l10n-bg:
-kde-l10n-bg:
-kde-l10n-bg:
-kde-l10n-bg:
-kde-l10n-bg:
-kde-l10n-bg:
-kde-l10n-bg:
diff --git a/kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-bn_IN b/kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-bn_IN
deleted file mode 100644
index 2f7c7c0..0000000
--- a/kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-bn_IN
+++ /dev/null
@@ -1,11 +0,0 @@
-kde-l10n-bn_IN: kde-l10n-bn_IN
-kde-l10n-bn_IN:
-kde-l10n-bn_IN: Bengali language support for KDE.
-kde-l10n-bn_IN:
-kde-l10n-bn_IN:
-kde-l10n-bn_IN:
-kde-l10n-bn_IN:
-kde-l10n-bn_IN:
-kde-l10n-bn_IN:
-kde-l10n-bn_IN:
-kde-l10n-bn_IN:
diff --git a/kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-bs b/kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-bs
deleted file mode 100644
index 04f60af..0000000
--- a/kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-bs
+++ /dev/null
@@ -1,11 +0,0 @@
-kde-l10n-bs: kde-l10n-bs
-kde-l10n-bs:
-kde-l10n-bs: Bosnian language support for KDE.
-kde-l10n-bs:
-kde-l10n-bs:
-kde-l10n-bs:
-kde-l10n-bs:
-kde-l10n-bs:
-kde-l10n-bs:
-kde-l10n-bs:
-kde-l10n-bs:
diff --git a/kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-ca b/kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-ca
deleted file mode 100644
index 0642c74..0000000
--- a/kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-ca
+++ /dev/null
@@ -1,11 +0,0 @@
-kde-l10n-ca: kde-l10n-ca
-kde-l10n-ca:
-kde-l10n-ca: Catalan language support for KDE.
-kde-l10n-ca:
-kde-l10n-ca:
-kde-l10n-ca:
-kde-l10n-ca:
-kde-l10n-ca:
-kde-l10n-ca:
-kde-l10n-ca:
-kde-l10n-ca:
diff --git a/kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-ca@valencia b/kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-ca@valencia
deleted file mode 100644
index f8ecb79..0000000
--- a/kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-ca@valencia
+++ /dev/null
@@ -1,11 +0,0 @@
-kde-l10n-ca@valencia: kde-l10n-ca@valencia
-kde-l10n-ca@valencia:
-kde-l10n-ca@valencia: Catalan (Valencian) language support for KDE.
-kde-l10n-ca@valencia:
-kde-l10n-ca@valencia:
-kde-l10n-ca@valencia:
-kde-l10n-ca@valencia:
-kde-l10n-ca@valencia:
-kde-l10n-ca@valencia:
-kde-l10n-ca@valencia:
-kde-l10n-ca@valencia:
diff --git a/kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-cs b/kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-cs
deleted file mode 100644
index a9ff293..0000000
--- a/kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-cs
+++ /dev/null
@@ -1,11 +0,0 @@
-kde-l10n-cs: kde-l10n-cs
-kde-l10n-cs:
-kde-l10n-cs: Czech language support for KDE.
-kde-l10n-cs:
-kde-l10n-cs:
-kde-l10n-cs:
-kde-l10n-cs:
-kde-l10n-cs:
-kde-l10n-cs:
-kde-l10n-cs:
-kde-l10n-cs:
diff --git a/kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-csb b/kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-csb
deleted file mode 100644
index a430c78..0000000
--- a/kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-csb
+++ /dev/null
@@ -1,11 +0,0 @@
-kde-l10n-csb: kde-l10n-csb
-kde-l10n-csb:
-kde-l10n-csb: Kashubian language support for KDE.
-kde-l10n-csb:
-kde-l10n-csb:
-kde-l10n-csb:
-kde-l10n-csb:
-kde-l10n-csb:
-kde-l10n-csb:
-kde-l10n-csb:
-kde-l10n-csb:
diff --git a/kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-da b/kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-da
deleted file mode 100644
index 9cdb27d..0000000
--- a/kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-da
+++ /dev/null
@@ -1,11 +0,0 @@
-kde-l10n-da: kde-l10n-da
-kde-l10n-da:
-kde-l10n-da: Danish language support for KDE.
-kde-l10n-da:
-kde-l10n-da:
-kde-l10n-da:
-kde-l10n-da:
-kde-l10n-da:
-kde-l10n-da:
-kde-l10n-da:
-kde-l10n-da:
diff --git a/kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-de b/kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-de
deleted file mode 100644
index e90b962..0000000
--- a/kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-de
+++ /dev/null
@@ -1,11 +0,0 @@
-kde-l10n-de: kde-l10n-de
-kde-l10n-de:
-kde-l10n-de: German language support for KDE.
-kde-l10n-de:
-kde-l10n-de:
-kde-l10n-de:
-kde-l10n-de:
-kde-l10n-de:
-kde-l10n-de:
-kde-l10n-de:
-kde-l10n-de:
diff --git a/kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-el b/kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-el
deleted file mode 100644
index 3e6b56e..0000000
--- a/kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-el
+++ /dev/null
@@ -1,11 +0,0 @@
-kde-l10n-el: kde-l10n-el
-kde-l10n-el:
-kde-l10n-el: Greek language support for KDE.
-kde-l10n-el:
-kde-l10n-el:
-kde-l10n-el:
-kde-l10n-el:
-kde-l10n-el:
-kde-l10n-el:
-kde-l10n-el:
-kde-l10n-el:
diff --git a/kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-en_GB b/kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-en_GB
deleted file mode 100644
index 7bd1861..0000000
--- a/kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-en_GB
+++ /dev/null
@@ -1,11 +0,0 @@
-kde-l10n-en_GB: kde-l10n-en_GB
-kde-l10n-en_GB:
-kde-l10n-en_GB: English (UK) language support for KDE.
-kde-l10n-en_GB:
-kde-l10n-en_GB:
-kde-l10n-en_GB:
-kde-l10n-en_GB:
-kde-l10n-en_GB:
-kde-l10n-en_GB:
-kde-l10n-en_GB:
-kde-l10n-en_GB:
diff --git a/kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-eo b/kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-eo
deleted file mode 100644
index 70a4484..0000000
--- a/kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-eo
+++ /dev/null
@@ -1,11 +0,0 @@
-kde-l10n-eo: kde-l10n-eo
-kde-l10n-eo:
-kde-l10n-eo: Esperanto language support for KDE.
-kde-l10n-eo:
-kde-l10n-eo:
-kde-l10n-eo:
-kde-l10n-eo:
-kde-l10n-eo:
-kde-l10n-eo:
-kde-l10n-eo:
-kde-l10n-eo:
diff --git a/kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-es b/kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-es
deleted file mode 100644
index 333cf64..0000000
--- a/kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-es
+++ /dev/null
@@ -1,11 +0,0 @@
-kde-l10n-es: kde-l10n-es
-kde-l10n-es:
-kde-l10n-es: Spanish language support for KDE.
-kde-l10n-es:
-kde-l10n-es:
-kde-l10n-es:
-kde-l10n-es:
-kde-l10n-es:
-kde-l10n-es:
-kde-l10n-es:
-kde-l10n-es:
diff --git a/kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-et b/kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-et
deleted file mode 100644
index ac801ed..0000000
--- a/kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-et
+++ /dev/null
@@ -1,11 +0,0 @@
-kde-l10n-et: kde-l10n-et
-kde-l10n-et:
-kde-l10n-et: Estonian language support for KDE.
-kde-l10n-et:
-kde-l10n-et:
-kde-l10n-et:
-kde-l10n-et:
-kde-l10n-et:
-kde-l10n-et:
-kde-l10n-et:
-kde-l10n-et:
diff --git a/kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-eu b/kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-eu
deleted file mode 100644
index 3576364..0000000
--- a/kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-eu
+++ /dev/null
@@ -1,11 +0,0 @@
-kde-l10n-eu: kde-l10n-eu
-kde-l10n-eu:
-kde-l10n-eu: Basque language support for KDE.
-kde-l10n-eu:
-kde-l10n-eu:
-kde-l10n-eu:
-kde-l10n-eu:
-kde-l10n-eu:
-kde-l10n-eu:
-kde-l10n-eu:
-kde-l10n-eu:
diff --git a/kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-fa b/kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-fa
deleted file mode 100644
index 28fd979..0000000
--- a/kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-fa
+++ /dev/null
@@ -1,11 +0,0 @@
-kde-l10n-fa: kde-l10n-fa
-kde-l10n-fa:
-kde-l10n-fa: Farsi language support for KDE.
-kde-l10n-fa:
-kde-l10n-fa:
-kde-l10n-fa:
-kde-l10n-fa:
-kde-l10n-fa:
-kde-l10n-fa:
-kde-l10n-fa:
-kde-l10n-fa:
diff --git a/kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-fi b/kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-fi
deleted file mode 100644
index 74ed56f..0000000
--- a/kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-fi
+++ /dev/null
@@ -1,11 +0,0 @@
-kde-l10n-fi: kde-l10n-fi
-kde-l10n-fi:
-kde-l10n-fi: Finnish language support for KDE.
-kde-l10n-fi:
-kde-l10n-fi:
-kde-l10n-fi:
-kde-l10n-fi:
-kde-l10n-fi:
-kde-l10n-fi:
-kde-l10n-fi:
-kde-l10n-fi:
diff --git a/kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-fr b/kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-fr
deleted file mode 100644
index 8a70d56..0000000
--- a/kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-fr
+++ /dev/null
@@ -1,11 +0,0 @@
-kde-l10n-fr: kde-l10n-fr
-kde-l10n-fr:
-kde-l10n-fr: French language support for KDE.
-kde-l10n-fr:
-kde-l10n-fr:
-kde-l10n-fr:
-kde-l10n-fr:
-kde-l10n-fr:
-kde-l10n-fr:
-kde-l10n-fr:
-kde-l10n-fr:
diff --git a/kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-fy b/kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-fy
deleted file mode 100644
index 93195d0..0000000
--- a/kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-fy
+++ /dev/null
@@ -1,11 +0,0 @@
-kde-l10n-fy: kde-l10n-fy
-kde-l10n-fy:
-kde-l10n-fy: Abkhasysk language support for KDE.
-kde-l10n-fy:
-kde-l10n-fy:
-kde-l10n-fy:
-kde-l10n-fy:
-kde-l10n-fy:
-kde-l10n-fy:
-kde-l10n-fy:
-kde-l10n-fy:
diff --git a/kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-ga b/kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-ga
deleted file mode 100644
index fc07a27..0000000
--- a/kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-ga
+++ /dev/null
@@ -1,11 +0,0 @@
-kde-l10n-ga: kde-l10n-ga
-kde-l10n-ga:
-kde-l10n-ga: Irish language support for KDE.
-kde-l10n-ga:
-kde-l10n-ga:
-kde-l10n-ga:
-kde-l10n-ga:
-kde-l10n-ga:
-kde-l10n-ga:
-kde-l10n-ga:
-kde-l10n-ga:
diff --git a/kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-gl b/kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-gl
deleted file mode 100644
index 58eaca7..0000000
--- a/kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-gl
+++ /dev/null
@@ -1,11 +0,0 @@
-kde-l10n-gl: kde-l10n-gl
-kde-l10n-gl:
-kde-l10n-gl: Galician language support for KDE.
-kde-l10n-gl:
-kde-l10n-gl:
-kde-l10n-gl:
-kde-l10n-gl:
-kde-l10n-gl:
-kde-l10n-gl:
-kde-l10n-gl:
-kde-l10n-gl:
diff --git a/kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-gu b/kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-gu
deleted file mode 100644
index 79c5ae5..0000000
--- a/kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-gu
+++ /dev/null
@@ -1,11 +0,0 @@
-kde-l10n-gu: kde-l10n-gu
-kde-l10n-gu:
-kde-l10n-gu: Gujarati language support for KDE.
-kde-l10n-gu:
-kde-l10n-gu:
-kde-l10n-gu:
-kde-l10n-gu:
-kde-l10n-gu:
-kde-l10n-gu:
-kde-l10n-gu:
-kde-l10n-gu:
diff --git a/kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-he b/kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-he
deleted file mode 100644
index 3ab491b..0000000
--- a/kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-he
+++ /dev/null
@@ -1,11 +0,0 @@
-kde-l10n-he: kde-l10n-he
-kde-l10n-he:
-kde-l10n-he: Hebrew language support for KDE.
-kde-l10n-he:
-kde-l10n-he:
-kde-l10n-he:
-kde-l10n-he:
-kde-l10n-he:
-kde-l10n-he:
-kde-l10n-he:
-kde-l10n-he:
diff --git a/kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-hi b/kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-hi
deleted file mode 100644
index 7575bb9..0000000
--- a/kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-hi
+++ /dev/null
@@ -1,11 +0,0 @@
-kde-l10n-hi: kde-l10n-hi
-kde-l10n-hi:
-kde-l10n-hi: Hindi language support for KDE.
-kde-l10n-hi:
-kde-l10n-hi:
-kde-l10n-hi:
-kde-l10n-hi:
-kde-l10n-hi:
-kde-l10n-hi:
-kde-l10n-hi:
-kde-l10n-hi:
diff --git a/kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-hne b/kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-hne
deleted file mode 100644
index 3ff7676..0000000
--- a/kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-hne
+++ /dev/null
@@ -1,11 +0,0 @@
-kde-l10n-hne: kde-l10n-hne
-kde-l10n-hne:
-kde-l10n-hne: Chhattisgarhi language support for KDE.
-kde-l10n-hne:
-kde-l10n-hne:
-kde-l10n-hne:
-kde-l10n-hne:
-kde-l10n-hne:
-kde-l10n-hne:
-kde-l10n-hne:
-kde-l10n-hne:
diff --git a/kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-hr b/kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-hr
deleted file mode 100644
index 711dc12..0000000
--- a/kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-hr
+++ /dev/null
@@ -1,11 +0,0 @@
-kde-l10n-hr: kde-l10n-hr
-kde-l10n-hr:
-kde-l10n-hr: Croatian language support for KDE.
-kde-l10n-hr:
-kde-l10n-hr:
-kde-l10n-hr:
-kde-l10n-hr:
-kde-l10n-hr:
-kde-l10n-hr:
-kde-l10n-hr:
-kde-l10n-hr:
diff --git a/kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-hu b/kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-hu
deleted file mode 100644
index 1ecc0c4..0000000
--- a/kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-hu
+++ /dev/null
@@ -1,11 +0,0 @@
-kde-l10n-hu: kde-l10n-hu
-kde-l10n-hu:
-kde-l10n-hu: Hungarian language support for KDE.
-kde-l10n-hu:
-kde-l10n-hu:
-kde-l10n-hu:
-kde-l10n-hu:
-kde-l10n-hu:
-kde-l10n-hu:
-kde-l10n-hu:
-kde-l10n-hu:
diff --git a/kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-ia b/kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-ia
deleted file mode 100644
index e073234..0000000
--- a/kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-ia
+++ /dev/null
@@ -1,11 +0,0 @@
-kde-l10n-ia: kde-l10n-ia
-kde-l10n-ia:
-kde-l10n-ia: Interlingua language support for KDE.
-kde-l10n-ia:
-kde-l10n-ia:
-kde-l10n-ia:
-kde-l10n-ia:
-kde-l10n-ia:
-kde-l10n-ia:
-kde-l10n-ia:
-kde-l10n-ia:
diff --git a/kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-id b/kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-id
deleted file mode 100644
index 6e5bd8a..0000000
--- a/kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-id
+++ /dev/null
@@ -1,11 +0,0 @@
-kde-l10n-id: kde-l10n-id
-kde-l10n-id:
-kde-l10n-id: Indonesian language support for KDE.
-kde-l10n-id:
-kde-l10n-id:
-kde-l10n-id:
-kde-l10n-id:
-kde-l10n-id:
-kde-l10n-id:
-kde-l10n-id:
-kde-l10n-id:
diff --git a/kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-is b/kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-is
deleted file mode 100644
index a9fa3c2..0000000
--- a/kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-is
+++ /dev/null
@@ -1,11 +0,0 @@
-kde-l10n-is: kde-l10n-is
-kde-l10n-is:
-kde-l10n-is: Icelandic language support for KDE.
-kde-l10n-is:
-kde-l10n-is:
-kde-l10n-is:
-kde-l10n-is:
-kde-l10n-is:
-kde-l10n-is:
-kde-l10n-is:
-kde-l10n-is:
diff --git a/kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-it b/kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-it
deleted file mode 100644
index a90d4ec..0000000
--- a/kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-it
+++ /dev/null
@@ -1,11 +0,0 @@
-kde-l10n-it: kde-l10n-it
-kde-l10n-it:
-kde-l10n-it: Italian language support for KDE.
-kde-l10n-it:
-kde-l10n-it:
-kde-l10n-it:
-kde-l10n-it:
-kde-l10n-it:
-kde-l10n-it:
-kde-l10n-it:
-kde-l10n-it:
diff --git a/kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-ja b/kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-ja
deleted file mode 100644
index ba28704..0000000
--- a/kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-ja
+++ /dev/null
@@ -1,11 +0,0 @@
-kde-l10n-ja: kde-l10n-ja
-kde-l10n-ja:
-kde-l10n-ja: Japanese language support for KDE.
-kde-l10n-ja:
-kde-l10n-ja:
-kde-l10n-ja:
-kde-l10n-ja:
-kde-l10n-ja:
-kde-l10n-ja:
-kde-l10n-ja:
-kde-l10n-ja:
diff --git a/kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-kk b/kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-kk
deleted file mode 100644
index 82f5143..0000000
--- a/kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-kk
+++ /dev/null
@@ -1,11 +0,0 @@
-kde-l10n-kk: kde-l10n-kk
-kde-l10n-kk:
-kde-l10n-kk: Kazakh language support for KDE.
-kde-l10n-kk:
-kde-l10n-kk:
-kde-l10n-kk:
-kde-l10n-kk:
-kde-l10n-kk:
-kde-l10n-kk:
-kde-l10n-kk:
-kde-l10n-kk:
diff --git a/kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-km b/kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-km
deleted file mode 100644
index 8f137c0..0000000
--- a/kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-km
+++ /dev/null
@@ -1,11 +0,0 @@
-kde-l10n-km: kde-l10n-km
-kde-l10n-km:
-kde-l10n-km: Khmer language support for KDE.
-kde-l10n-km:
-kde-l10n-km:
-kde-l10n-km:
-kde-l10n-km:
-kde-l10n-km:
-kde-l10n-km:
-kde-l10n-km:
-kde-l10n-km:
diff --git a/kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-kn b/kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-kn
deleted file mode 100644
index 571e643..0000000
--- a/kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-kn
+++ /dev/null
@@ -1,11 +0,0 @@
-kde-l10n-kn: kde-l10n-kn
-kde-l10n-kn:
-kde-l10n-kn: Kannada language support for KDE.
-kde-l10n-kn:
-kde-l10n-kn:
-kde-l10n-kn:
-kde-l10n-kn:
-kde-l10n-kn:
-kde-l10n-kn:
-kde-l10n-kn:
-kde-l10n-kn:
diff --git a/kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-ko b/kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-ko
deleted file mode 100644
index 935283b..0000000
--- a/kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-ko
+++ /dev/null
@@ -1,11 +0,0 @@
-kde-l10n-ko: kde-l10n-ko
-kde-l10n-ko:
-kde-l10n-ko: Korean language support for KDE.
-kde-l10n-ko:
-kde-l10n-ko:
-kde-l10n-ko:
-kde-l10n-ko:
-kde-l10n-ko:
-kde-l10n-ko:
-kde-l10n-ko:
-kde-l10n-ko:
diff --git a/kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-ku b/kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-ku
deleted file mode 100644
index b4a2ff0..0000000
--- a/kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-ku
+++ /dev/null
@@ -1,11 +0,0 @@
-kde-l10n-ku: kde-l10n-ku
-kde-l10n-ku:
-kde-l10n-ku: Kurdish language support for KDE.
-kde-l10n-ku:
-kde-l10n-ku:
-kde-l10n-ku:
-kde-l10n-ku:
-kde-l10n-ku:
-kde-l10n-ku:
-kde-l10n-ku:
-kde-l10n-ku:
diff --git a/kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-lt b/kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-lt
deleted file mode 100644
index 733bc0a..0000000
--- a/kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-lt
+++ /dev/null
@@ -1,11 +0,0 @@
-kde-l10n-lt: kde-l10n-lt
-kde-l10n-lt:
-kde-l10n-lt: Lithuanian language support for KDE.
-kde-l10n-lt:
-kde-l10n-lt:
-kde-l10n-lt:
-kde-l10n-lt:
-kde-l10n-lt:
-kde-l10n-lt:
-kde-l10n-lt:
-kde-l10n-lt:
diff --git a/kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-lv b/kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-lv
deleted file mode 100644
index e65b352..0000000
--- a/kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-lv
+++ /dev/null
@@ -1,11 +0,0 @@
-kde-l10n-lv: kde-l10n-lv
-kde-l10n-lv:
-kde-l10n-lv: Latvian language support for KDE.
-kde-l10n-lv:
-kde-l10n-lv:
-kde-l10n-lv:
-kde-l10n-lv:
-kde-l10n-lv:
-kde-l10n-lv:
-kde-l10n-lv:
-kde-l10n-lv:
diff --git a/kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-mai b/kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-mai
deleted file mode 100644
index c6b8836..0000000
--- a/kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-mai
+++ /dev/null
@@ -1,11 +0,0 @@
-kde-l10n-mai: kde-l10n-mai
-kde-l10n-mai:
-kde-l10n-mai: Maithili language support for KDE.
-kde-l10n-mai:
-kde-l10n-mai:
-kde-l10n-mai:
-kde-l10n-mai:
-kde-l10n-mai:
-kde-l10n-mai:
-kde-l10n-mai:
-kde-l10n-mai:
diff --git a/kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-mk b/kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-mk
deleted file mode 100644
index 4d65fb7..0000000
--- a/kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-mk
+++ /dev/null
@@ -1,11 +0,0 @@
-kde-l10n-mk: kde-l10n-mk
-kde-l10n-mk:
-kde-l10n-mk: Macedonian language support for KDE.
-kde-l10n-mk:
-kde-l10n-mk:
-kde-l10n-mk:
-kde-l10n-mk:
-kde-l10n-mk:
-kde-l10n-mk:
-kde-l10n-mk:
-kde-l10n-mk:
diff --git a/kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-ml b/kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-ml
deleted file mode 100644
index 6ff4b3c..0000000
--- a/kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-ml
+++ /dev/null
@@ -1,11 +0,0 @@
-kde-l10n-ml: kde-l10n-ml
-kde-l10n-ml:
-kde-l10n-ml: Malayalam language support for KDE.
-kde-l10n-ml:
-kde-l10n-ml:
-kde-l10n-ml:
-kde-l10n-ml:
-kde-l10n-ml:
-kde-l10n-ml:
-kde-l10n-ml:
-kde-l10n-ml:
diff --git a/kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-mr b/kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-mr
deleted file mode 100644
index 39a721b..0000000
--- a/kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-mr
+++ /dev/null
@@ -1,11 +0,0 @@
-kde-l10n-mr: kde-l10n-mr
-kde-l10n-mr:
-kde-l10n-mr: Marathi language support for KDE.
-kde-l10n-mr:
-kde-l10n-mr:
-kde-l10n-mr:
-kde-l10n-mr:
-kde-l10n-mr:
-kde-l10n-mr:
-kde-l10n-mr:
-kde-l10n-mr:
diff --git a/kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-nb b/kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-nb
deleted file mode 100644
index cee273c..0000000
--- a/kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-nb
+++ /dev/null
@@ -1,11 +0,0 @@
-kde-l10n-nb: kde-l10n-nb
-kde-l10n-nb:
-kde-l10n-nb: Norwegian (Bokmaal) language support for KDE.
-kde-l10n-nb:
-kde-l10n-nb:
-kde-l10n-nb:
-kde-l10n-nb:
-kde-l10n-nb:
-kde-l10n-nb:
-kde-l10n-nb:
-kde-l10n-nb:
diff --git a/kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-nds b/kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-nds
deleted file mode 100644
index 6d0dfa7..0000000
--- a/kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-nds
+++ /dev/null
@@ -1,11 +0,0 @@
-kde-l10n-nds: kde-l10n-nds
-kde-l10n-nds:
-kde-l10n-nds: Low Saxon language support for KDE.
-kde-l10n-nds:
-kde-l10n-nds:
-kde-l10n-nds:
-kde-l10n-nds:
-kde-l10n-nds:
-kde-l10n-nds:
-kde-l10n-nds:
-kde-l10n-nds:
diff --git a/kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-nl b/kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-nl
deleted file mode 100644
index 7533647..0000000
--- a/kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-nl
+++ /dev/null
@@ -1,11 +0,0 @@
-kde-l10n-nl: kde-l10n-nl
-kde-l10n-nl:
-kde-l10n-nl: Dutch language support for KDE.
-kde-l10n-nl:
-kde-l10n-nl:
-kde-l10n-nl:
-kde-l10n-nl:
-kde-l10n-nl:
-kde-l10n-nl:
-kde-l10n-nl:
-kde-l10n-nl:
diff --git a/kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-nn b/kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-nn
deleted file mode 100644
index f3c10b1..0000000
--- a/kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-nn
+++ /dev/null
@@ -1,11 +0,0 @@
-kde-l10n-nn: kde-l10n-nn
-kde-l10n-nn:
-kde-l10n-nn: Norwegian (Nynorsk) language support for KDE.
-kde-l10n-nn:
-kde-l10n-nn:
-kde-l10n-nn:
-kde-l10n-nn:
-kde-l10n-nn:
-kde-l10n-nn:
-kde-l10n-nn:
-kde-l10n-nn:
diff --git a/kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-pa b/kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-pa
deleted file mode 100644
index 9b7b200..0000000
--- a/kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-pa
+++ /dev/null
@@ -1,11 +0,0 @@
-kde-l10n-pa: kde-l10n-pa
-kde-l10n-pa:
-kde-l10n-pa: Punjabi language support for KDE.
-kde-l10n-pa:
-kde-l10n-pa:
-kde-l10n-pa:
-kde-l10n-pa:
-kde-l10n-pa:
-kde-l10n-pa:
-kde-l10n-pa:
-kde-l10n-pa:
diff --git a/kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-pl b/kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-pl
deleted file mode 100644
index e5515a2..0000000
--- a/kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-pl
+++ /dev/null
@@ -1,11 +0,0 @@
-kde-l10n-pl: kde-l10n-pl
-kde-l10n-pl:
-kde-l10n-pl: Polish language support for KDE.
-kde-l10n-pl:
-kde-l10n-pl:
-kde-l10n-pl:
-kde-l10n-pl:
-kde-l10n-pl:
-kde-l10n-pl:
-kde-l10n-pl:
-kde-l10n-pl:
diff --git a/kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-pt b/kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-pt
deleted file mode 100644
index f71c7ee..0000000
--- a/kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-pt
+++ /dev/null
@@ -1,11 +0,0 @@
-kde-l10n-pt: kde-l10n-pt
-kde-l10n-pt:
-kde-l10n-pt: Portuguese language support for KDE.
-kde-l10n-pt:
-kde-l10n-pt:
-kde-l10n-pt:
-kde-l10n-pt:
-kde-l10n-pt:
-kde-l10n-pt:
-kde-l10n-pt:
-kde-l10n-pt:
diff --git a/kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-pt_BR b/kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-pt_BR
deleted file mode 100644
index fd86097..0000000
--- a/kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-pt_BR
+++ /dev/null
@@ -1,11 +0,0 @@
-kde-l10n-pt_BR: kde-l10n-pt_BR
-kde-l10n-pt_BR:
-kde-l10n-pt_BR: Brazilian Portuguese language support for KDE.
-kde-l10n-pt_BR:
-kde-l10n-pt_BR:
-kde-l10n-pt_BR:
-kde-l10n-pt_BR:
-kde-l10n-pt_BR:
-kde-l10n-pt_BR:
-kde-l10n-pt_BR:
-kde-l10n-pt_BR:
diff --git a/kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-ro b/kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-ro
deleted file mode 100644
index 7eea0dd..0000000
--- a/kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-ro
+++ /dev/null
@@ -1,11 +0,0 @@
-kde-l10n-ro: kde-l10n-ro
-kde-l10n-ro:
-kde-l10n-ro: Romanian language support for KDE.
-kde-l10n-ro:
-kde-l10n-ro:
-kde-l10n-ro:
-kde-l10n-ro:
-kde-l10n-ro:
-kde-l10n-ro:
-kde-l10n-ro:
-kde-l10n-ro:
diff --git a/kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-ru b/kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-ru
deleted file mode 100644
index e857af4..0000000
--- a/kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-ru
+++ /dev/null
@@ -1,11 +0,0 @@
-kde-l10n-ru: kde-l10n-ru
-kde-l10n-ru:
-kde-l10n-ru: Russian language support for KDE.
-kde-l10n-ru:
-kde-l10n-ru:
-kde-l10n-ru:
-kde-l10n-ru:
-kde-l10n-ru:
-kde-l10n-ru:
-kde-l10n-ru:
-kde-l10n-ru:
diff --git a/kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-si b/kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-si
deleted file mode 100644
index 1eb88a2..0000000
--- a/kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-si
+++ /dev/null
@@ -1,11 +0,0 @@
-kde-l10n-si: kde-l10n-si
-kde-l10n-si:
-kde-l10n-si: Sinhala language support for KDE.
-kde-l10n-si:
-kde-l10n-si:
-kde-l10n-si:
-kde-l10n-si:
-kde-l10n-si:
-kde-l10n-si:
-kde-l10n-si:
-kde-l10n-si:
diff --git a/kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-sk b/kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-sk
deleted file mode 100644
index 65f1e8c..0000000
--- a/kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-sk
+++ /dev/null
@@ -1,11 +0,0 @@
-kde-l10n-sk: kde-l10n-sk
-kde-l10n-sk:
-kde-l10n-sk: Slovak language support for KDE.
-kde-l10n-sk:
-kde-l10n-sk:
-kde-l10n-sk:
-kde-l10n-sk:
-kde-l10n-sk:
-kde-l10n-sk:
-kde-l10n-sk:
-kde-l10n-sk:
diff --git a/kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-sl b/kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-sl
deleted file mode 100644
index 8c34108..0000000
--- a/kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-sl
+++ /dev/null
@@ -1,11 +0,0 @@
-kde-l10n-sl: kde-l10n-sl
-kde-l10n-sl:
-kde-l10n-sl: Slovenian language support for KDE.
-kde-l10n-sl:
-kde-l10n-sl:
-kde-l10n-sl:
-kde-l10n-sl:
-kde-l10n-sl:
-kde-l10n-sl:
-kde-l10n-sl:
-kde-l10n-sl:
diff --git a/kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-sr b/kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-sr
deleted file mode 100644
index 732a5c9..0000000
--- a/kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-sr
+++ /dev/null
@@ -1,11 +0,0 @@
-kde-l10n-sr: kde-l10n-sr
-kde-l10n-sr:
-kde-l10n-sr: Serbian language support for KDE.
-kde-l10n-sr:
-kde-l10n-sr:
-kde-l10n-sr:
-kde-l10n-sr:
-kde-l10n-sr:
-kde-l10n-sr:
-kde-l10n-sr:
-kde-l10n-sr:
diff --git a/kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-sv b/kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-sv
deleted file mode 100644
index 8c4838f..0000000
--- a/kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-sv
+++ /dev/null
@@ -1,11 +0,0 @@
-kde-l10n-sv: kde-l10n-sv
-kde-l10n-sv:
-kde-l10n-sv: Swedish language support for KDE.
-kde-l10n-sv:
-kde-l10n-sv:
-kde-l10n-sv:
-kde-l10n-sv:
-kde-l10n-sv:
-kde-l10n-sv:
-kde-l10n-sv:
-kde-l10n-sv:
diff --git a/kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-ta b/kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-ta
deleted file mode 100644
index 795d799..0000000
--- a/kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-ta
+++ /dev/null
@@ -1,11 +0,0 @@
-kde-l10n-ta: kde-l10n-ta
-kde-l10n-ta:
-kde-l10n-ta: Tamil language support for KDE.
-kde-l10n-ta:
-kde-l10n-ta:
-kde-l10n-ta:
-kde-l10n-ta:
-kde-l10n-ta:
-kde-l10n-ta:
-kde-l10n-ta:
-kde-l10n-ta:
diff --git a/kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-tg b/kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-tg
deleted file mode 100644
index e8b7456..0000000
--- a/kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-tg
+++ /dev/null
@@ -1,11 +0,0 @@
-kde-l10n-tg: kde-l10n-tg
-kde-l10n-tg:
-kde-l10n-tg: Tajik language support for KDE.
-kde-l10n-tg:
-kde-l10n-tg:
-kde-l10n-tg:
-kde-l10n-tg:
-kde-l10n-tg:
-kde-l10n-tg:
-kde-l10n-tg:
-kde-l10n-tg:
diff --git a/kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-th b/kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-th
deleted file mode 100644
index 0c9a65c..0000000
--- a/kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-th
+++ /dev/null
@@ -1,11 +0,0 @@
-kde-l10n-th: kde-l10n-th
-kde-l10n-th:
-kde-l10n-th: Thai language support for KDE.
-kde-l10n-th:
-kde-l10n-th:
-kde-l10n-th:
-kde-l10n-th:
-kde-l10n-th:
-kde-l10n-th:
-kde-l10n-th:
-kde-l10n-th:
diff --git a/kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-tr b/kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-tr
deleted file mode 100644
index 9ba72ec..0000000
--- a/kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-tr
+++ /dev/null
@@ -1,11 +0,0 @@
-kde-l10n-tr: kde-l10n-tr
-kde-l10n-tr:
-kde-l10n-tr: Turkish language support for KDE.
-kde-l10n-tr:
-kde-l10n-tr:
-kde-l10n-tr:
-kde-l10n-tr:
-kde-l10n-tr:
-kde-l10n-tr:
-kde-l10n-tr:
-kde-l10n-tr:
diff --git a/kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-ug b/kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-ug
deleted file mode 100644
index d7d8234..0000000
--- a/kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-ug
+++ /dev/null
@@ -1,11 +0,0 @@
-kde-l10n-ug: kde-l10n-ug
-kde-l10n-ug:
-kde-l10n-ug: Uyghur language support for KDE.
-kde-l10n-ug:
-kde-l10n-ug:
-kde-l10n-ug:
-kde-l10n-ug:
-kde-l10n-ug:
-kde-l10n-ug:
-kde-l10n-ug:
-kde-l10n-ug:
diff --git a/kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-uk b/kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-uk
deleted file mode 100644
index f918327..0000000
--- a/kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-uk
+++ /dev/null
@@ -1,11 +0,0 @@
-kde-l10n-uk: kde-l10n-uk
-kde-l10n-uk:
-kde-l10n-uk: Ukrainian language support for KDE.
-kde-l10n-uk:
-kde-l10n-uk:
-kde-l10n-uk:
-kde-l10n-uk:
-kde-l10n-uk:
-kde-l10n-uk:
-kde-l10n-uk:
-kde-l10n-uk:
diff --git a/kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-vi b/kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-vi
deleted file mode 100644
index ee4a6d5..0000000
--- a/kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-vi
+++ /dev/null
@@ -1,11 +0,0 @@
-kde-l10n-vi: kde-l10n-vi
-kde-l10n-vi:
-kde-l10n-vi: Vietnamese language support for KDE.
-kde-l10n-vi:
-kde-l10n-vi:
-kde-l10n-vi:
-kde-l10n-vi:
-kde-l10n-vi:
-kde-l10n-vi:
-kde-l10n-vi:
-kde-l10n-vi:
diff --git a/kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-wa b/kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-wa
deleted file mode 100644
index 3bcc46c..0000000
--- a/kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-wa
+++ /dev/null
@@ -1,11 +0,0 @@
-kde-l10n-wa: kde-l10n-wa
-kde-l10n-wa:
-kde-l10n-wa: Walloon language support for KDE.
-kde-l10n-wa:
-kde-l10n-wa:
-kde-l10n-wa:
-kde-l10n-wa:
-kde-l10n-wa:
-kde-l10n-wa:
-kde-l10n-wa:
-kde-l10n-wa:
diff --git a/kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-zh_CN b/kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-zh_CN
deleted file mode 100644
index 9363205..0000000
--- a/kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-zh_CN
+++ /dev/null
@@ -1,11 +0,0 @@
-kde-l10n-zh_CN: kde-l10n-zh_CN
-kde-l10n-zh_CN:
-kde-l10n-zh_CN: Simplified Chinese language support for KDE.
-kde-l10n-zh_CN:
-kde-l10n-zh_CN:
-kde-l10n-zh_CN:
-kde-l10n-zh_CN:
-kde-l10n-zh_CN:
-kde-l10n-zh_CN:
-kde-l10n-zh_CN:
-kde-l10n-zh_CN:
diff --git a/kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-zh_TW b/kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-zh_TW
deleted file mode 100644
index 8b173b9..0000000
--- a/kdei/kde-l10n/slack-desc/slack-desc.kde-l10n-zh_TW
+++ /dev/null
@@ -1,11 +0,0 @@
-kde-l10n-zh_TW: kde-l10n-zh_TW
-kde-l10n-zh_TW:
-kde-l10n-zh_TW: Chinese language support for KDE.
-kde-l10n-zh_TW:
-kde-l10n-zh_TW:
-kde-l10n-zh_TW:
-kde-l10n-zh_TW:
-kde-l10n-zh_TW:
-kde-l10n-zh_TW:
-kde-l10n-zh_TW:
-kde-l10n-zh_TW: