diff --git a/packages/packages.common b/packages/packages.common index bbef3546..e8d8bcc1 100644 --- a/packages/packages.common +++ b/packages/packages.common @@ -1,524 +1,524 @@ # packages.common - list of packages for use with gpg4win -*- sh -*- # # The download script processes the statements here to # actually download the packages. The syntax is trivial: # # If the first non whitespace character of a line is #, the line is # considered a comment. If the first word of a line is "server", the # rest of the line will be taken as the base URL for following file # commands. If the first word of a line is "file" the rest of the # line will be appended to the current base URL (with a / as # delimiter). The statement "chk" is followed by the SHA256 checksum of # the last file. # # zlib # server https://gnupg.org/ftp/gcrypt # last-changed: 2022-04-07 # by: wk # verified: swdb file zlib/zlib-1.2.12.tar.gz chk 91844808532e5ce316b3c010929493c0244f3d37593afd6de04f71821d5136d9 # # GNU # server ftp://ftp.gnu.org/pub/gnu # last-changed: 2017-02-15 # by: ah # verified: Sig 68D9 4D8A AEEA D48A E7DC 5B90 4F49 4A94 2E46 16C2 file libiconv/libiconv-1.15.tar.gz chk ccf536620a45458d26ba83887a983b96827001e92a13847b45e4925cc8913178 # last-changed: 2021-08-17 # by: ah (checksum added by ik) # verified: Sig 9001 B85A F9E1 B83D F1BD A942 F5BE 8B26 7C6A 406D file gettext/gettext-0.21.tar.xz chk d20fcbb537e02dcf1383197ba05bd0734ef7bf5db06bdb241eb69b7d16b73192 # last-changed: 2023-05-03 # by ah # verified: verification of checksum from both sf and libpng.org server https://downloads.sourceforge.net file libpng/libpng16/1.6.39/libpng-1.6.39.tar.xz chk 1f4696ce70b4ee5f85f1e1623dc1229b210029fa4b7aee573df3e2ba7b036937 # verified: verification of checksum from multiple sources server https://www.ijg.org name jpeg-9e.tar.gz file files/jpegsrc.v9e.tar.gz chk 4077d6a6a75aeb01884f708919d25934c93305e49f7e3f36db9129320e6f4f3d # last-changed: 2023-05-03 # by ah # verified: verification of checksum from multiple sources e.g. homebrew server https://github.com/uclouvain/openjpeg/archive/refs/tags/ name openjpeg-2.5.0.tar.gz file v2.5.0.tar.gz chk 0333806d6adecc6f7a91243b2b839ff4d2053823634d4f6ed7a59bc87409122a # last-changed: 2023-05-03 # by ah # verified: SIG B1FA7D81EEB8E66399178B9733EBBFC47B3DD87D server https://download.osgeo.org file libtiff/tiff-4.5.0.tar.xz chk dafac979c5e7b6c650025569c5a4e720995ba5f17bc17e6276d1f12427be267c # # GIMP stuff for W32 # server http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies # checked: 2012-03-28 wk - Not updated - not a security problem name pkgconfig-0.23.tar.gz file pkg-config-0.23.tar.gz chk 08a0e072d6a05419a58124db864f0685e6ac96e71b2875bf15ac12714e983b53 name pkgconfig-0.23.zip file pkg-config_0.23-3_win32.zip chk 677d6055494e24cad6c49eab33eee618ddc6ed65da827c8b5b7da761b4063278 server https://download.savannah.gnu.org/releases/ # last-changed: 2023-04-19 # by: ah # verified: SIG E30674707856409FF1948010BE6C3AAC63AD8E3F file freetype/freetype-2.13.0.tar.xz chk 5ee23abd047636c24b2d43c6625dcafc66661d1aca64dec9e0d05df29592624c # # SQLite # server https://www.sqlite.org # last changed: 2021-09-20 # by: ik # verified: SHA1 checksum on https://web.archive.org/web/20190228201545/https://www.sqlite.org/download.html name sqlite-3.27.2.tar.gz file 2019/sqlite-autoconf-3270200.tar.gz chk 50c39e85ea28b5ecfdb3f9e860afe9ba606381e21836b2849efca6a0bfe6ef6e # # Stripped down version of BZIP2 # (full source at http://bzip.org) # server ftp://ftp.g10code.com/g10code/bzip2 # checked: 2014-07-16 ah file bzip2-1.0.6-g10.tar.gz chk c2a9b3aec1a38d34b66106116a39f64b01d84f475fef75c40ea0bda0ea67ed07 # # GnuPG et al. # # All tarballs from this server are verified with an openpgp # signature made by "Werner Koch (dist sig)" or one of the other # gnupg main contributors. # Server changed from ftp to https by wk 2021-09-22 server https://gnupg.org/ftp/gcrypt # last changed 2023-04-11 # by wk # verified: swdb file libgpg-error/libgpg-error-1.47.tar.bz2 chk 9e3c670966b96ecc746c28c2c419541e3bcb787d1a73930f5e5f5e1bcbbb9bdb # last-changed: 2021-04-21 # by: ah # verified: distsigkey.gpg file libassuan/libassuan-2.5.5.tar.bz2 chk 8e8c2fcc982f9ca67dcbb1d95e2dc746b1739a4668bc20b3a3c5be632edb34e4 # last changed 2021-09-20 # by ik # verified: distsigkey.gpg file npth/npth-1.6.tar.bz2 chk 1393abd9adcf0762d34798dc34fdcf4d0d22a8410721e76f1e3afcd1daa4e2d1 # last changed 2022-12-19 # by ah # verified: Signature from: 6DAA6E64A76D2840571B4902528897B826403ADA file libksba/libksba-1.6.3.tar.bz2 chk 3f72c68db30971ebbf14367527719423f0a4d5f8103fc9f4a1c01a9fa440de5c # last changed 2022-04-07 # by wk # verified: swdb file ntbtls/ntbtls-0.3.1.tar.bz2 chk 8922181fef523b77b71625e562e4d69532278eabbd18bc74579dbe14135729ba #name gnupg-msi-2.3.1-beta18-20210420-src.tar.xz #file binary/gnupg-w32-2.3.1_20210420.tar.xz #chk e1a2dc705c940938b7bf7a17f521a41b1ef14139acd8860b2fd59aed2750aa3b #name gnupg-msi-2.3.1-20210420-bin.wixlib #file binary/gnupg-w32-2.3.1_20210420.wixlib #chk 133817a4c4d11996956676c5c200222839ee5dc16e9476bd682d4e68b33ef73e # pinentry # last changed: 2022-08-24 # by: wk # verified: swdb file pinentry/pinentry-1.2.1.tar.bz2 chk 457a185e5a85238fb945a955dc6352ab962dc8b48720b62fc9fa48c7540a4067 # last changed 2023-04-20 # by wk # verified: [build tree] file gpgme/gpgme-1.20.0.tar.bz2 chk 25a5785a5da356689001440926b94e967d02e13c49eb7743e35ef0cf22e42750 # last changed: 2021-01-07 # by: ah file scute/scute-1.7.0.tar.bz2 chk 437fe758b27c243a5ee2535c6b065ea1d09f2c9a02d83567d2f934bb6395c249 # GpgOL # last-changed: 2023-05-16 # by: ah # verified: build tree file gpgol/gpgol-2.5.7.tar.bz2 chk c07aa700ca98aa6465ed3b521edfbc9a670d451b4ad67109afb78c5d75728efd # # GpgEX # # last-changed: 2022-11-18 # by: ah # verified: distsigkey.gpg #file gpgex/gpgex-1.0.10-beta5.tar.bz2 #chk f7e4c619aefed02dfbb07363a4435878a50999b290c60779e670fceb826e283e # # GnuPG utilities # server http://www.jabberwocky.com/software/paperkey # last-changed: 2017-12-05 # by: ah # verified: SIG 7D92 FD31 3AB6 F373 4CC5 9CA1 DB69 8D71 9924 2560 file paperkey-1.5.tar.gz chk c4737943083ce92e41faf13c27a9d608105b6285c0840dfb684a7ee294142ddf # # Kleopatra and dependencies # # Qt base # last changed: 2023-05-08 # by: ah # verified: HTTPS https://download.qt.io/official_releases/qt/5.15/5.15.9/submodules/qtbase-everywhere-opensource-src-5.15.9.tar.xz.sha256 server http://download.qt.io/official_releases/qt/ name qtbase-5.15.9.tar.xz file 5.15/5.15.9/submodules/qtbase-everywhere-opensource-src-5.15.9.tar.xz chk 1947deb9d98aaf46bf47e6659b3e1444ce6616974470523756c082041d396d1e # Qt Tools # last changed: 2023-05-08 # by: ah # verified: HTTPS https://download.qt.io/official_releases/qt/5.15/5.15.9/submodules/qttools-everywhere-opensource-src-5.15.9.tar.xz.sha256 name qttools-5.15.9.tar.xz file 5.15/5.15.9/submodules/qttools-everywhere-opensource-src-5.15.9.tar.xz chk 40dce7845bc156dce7878b304e05b19f1ce7dedd4221c67af3bdf0138196006d # Qt Winextras # last changed: 2023-05-08 # by: ah # verified: HTTPS https://download.qt.io/official_releases/qt/5.15/5.15.9/submodules/qtwinextras-everywhere-opensource-src-5.15.9.tar.xz.sha256 name qtwinextras-5.15.9.tar.xz file 5.15/5.15.9/submodules/qtwinextras-everywhere-opensource-src-5.15.9.tar.xz chk ea5107105b2072ea7194c16cc0721212f28f77c484ce38b370aaa78bfca45798 # Qt X11 extras # last changed: 2021-09-20 # by: ik # verified: HTTPS https://download.qt.io/official_releases/qt/5.15/5.15.9/submodules/qtx11extras-everywhere-opensource-src-5.15.9.tar.xz.sha256 name qtx11extras-5.15.9.tar.xz file 5.15/5.15.9/submodules/qtx11extras-everywhere-opensource-src-5.15.9.tar.xz chk 7ba3123de7b4ff87d02f513ffa1e4c4284e8f882563d114f29cb98d4c00fcbdb # Qt WaylandClient # last changed: 2021-09-21 # by: ik # verified: HTTPS https://download.qt.io/official_releases/qt/5.15/5.15.9/submodules/qtwayland-everywhere-opensource-src-5.15.9.tar.xz.sha256 name qtwayland-5.15.9.tar.xz file 5.15/5.15.9/submodules/qtwayland-everywhere-opensource-src-5.15.9.tar.xz chk b719baf33068f3b92309ac610c3b7ed70edb5bf1e8fa07eefc7cbae6ab6a3c12 # Qt svg # last changed: 2023-05-08 # by: ah # verified: HTTPS https://download.qt.io/official_releases/qt/5.15/5.15.9/submodules/qtsvg-everywhere-opensource-src-5.15.9.tar.xz.sha256 name qtsvg-5.15.9.tar.xz file 5.15/5.15.9/submodules/qtsvg-everywhere-opensource-src-5.15.9.tar.xz chk 881f75d3c4a29a4ef88202763115c19d4869af2638227e9c3474e422639abb5a # Qt translations # last changed: 2023-05-08 # by: ah # verified: HTTPS https://download.qt.io/official_releases/qt/5.15/5.15.9/submodules/qttranslations-everywhere-opensource-src-5.15.9.tar.xz.sha256 name qttranslations-5.15.9.tar.xz file 5.15/5.15.9/submodules/qttranslations-everywhere-opensource-src-5.15.9.tar.xz chk 35f4c4496e8a1f0605b3fb2e28c4b08e191796c9c03c32175a608e9c4dc4bb60 # KDE Frameworks generated by gen-frameworks.sh # When outdated activate this link: #server https://download.kde.org/Attic/frameworks/ server https://download.kde.org/stable/frameworks ##### Paste Here ##### # # Don't forget to update gpg4win.mk.in with new version numbers # # extra-cmake-modules # last changed: 2023-03-22 # by: ah # verified: PGP Signed by ./kde-release-keys.gpg (created by gen-frameworks.sh) file 5.104/extra-cmake-modules-5.104.0.tar.xz chk e49eb21fdb66634b84cccbf6ba65eae3f8e0eee0dc72d50f627280f49df585d9 # kconfig # last changed: 2023-03-22 # by: ah # verified: PGP Signed by ./kde-release-keys.gpg (created by gen-frameworks.sh) file 5.104/kconfig-5.104.0.tar.xz chk b8e7a6b7b0e78e3eb01755a965d893bd95c231befeff10479243e5a182ec2938 # ki18n # last changed: 2023-03-22 # by: ah # verified: PGP Signed by ./kde-release-keys.gpg (created by gen-frameworks.sh) file 5.104/ki18n-5.104.0.tar.xz chk fe815b9e28c680fa472c7ab56e4d7934a8915f19409734a13433797a4be14ee1 # kwidgetsaddons # last changed: 2023-03-22 # by: ah # verified: PGP Signed by ./kde-release-keys.gpg (created by gen-frameworks.sh) file 5.104/kwidgetsaddons-5.104.0.tar.xz chk 4abbb552cd43e51ad2070d8780ca7112e2c9771c2258734ae4a97712b9123120 # kcompletion # last changed: 2023-03-22 # by: ah # verified: PGP Signed by ./kde-release-keys.gpg (created by gen-frameworks.sh) file 5.104/kcompletion-5.104.0.tar.xz chk b0ed0246871283df04c62f0df2b221e32911cb4d292d5ae42f860958032eb510 # kwindowsystem # last changed: 2023-03-22 # by: ah # verified: PGP Signed by ./kde-release-keys.gpg (created by gen-frameworks.sh) file 5.104/kwindowsystem-5.104.0.tar.xz chk 6b10ee354ebb7d2dfd6baa1374929d30811f8169c8233e55849e31e38e6af81a # kcoreaddons # last changed: 2023-03-22 # by: ah # verified: PGP Signed by ./kde-release-keys.gpg (created by gen-frameworks.sh) file 5.104/kcoreaddons-5.104.0.tar.xz chk ed760d4a7fed6c03480dcc3cfe621a49ac5ca9853c846080afe393f7ce794e40 # kcodecs # last changed: 2023-03-22 # by: ah # verified: PGP Signed by ./kde-release-keys.gpg (created by gen-frameworks.sh) file 5.104/kcodecs-5.104.0.tar.xz chk 7ec909f6865eba87a99b046a9aeaa6a83c01308ad1dda87be3f69e91a7909d6b # kconfigwidgets # last changed: 2023-03-22 # by: ah # verified: PGP Signed by ./kde-release-keys.gpg (created by gen-frameworks.sh) file 5.104/kconfigwidgets-5.104.0.tar.xz chk eb9014b813a1c8a18c78ef11be296964b31338e5237080a74234bf97ead64522 # kdbusaddons # last changed: 2023-03-22 # by: ah # verified: PGP Signed by ./kde-release-keys.gpg (created by gen-frameworks.sh) file 5.104/kdbusaddons-5.104.0.tar.xz chk 4c6add0481c407bc3768729e27e8644feba748c333872e62aaa3260338fd56b4 # kxmlgui # last changed: 2023-03-22 # by: ah # verified: PGP Signed by ./kde-release-keys.gpg (created by gen-frameworks.sh) file 5.104/kxmlgui-5.104.0.tar.xz chk f45d5a5411b3ca0197c1e4720c27c7d85e351aeee03aca861066e8db3c7c93e6 # kguiaddons # last changed: 2023-03-22 # by: ah # verified: PGP Signed by ./kde-release-keys.gpg (created by gen-frameworks.sh) file 5.104/kguiaddons-5.104.0.tar.xz chk fb8d8de25b684af6f9e9e893912664a18231486ac995d2522676018c3e93840d # kitemviews # last changed: 2023-03-22 # by: ah # verified: PGP Signed by ./kde-release-keys.gpg (created by gen-frameworks.sh) file 5.104/kitemviews-5.104.0.tar.xz chk 94920dc68c187319fa79c64e194e9ebecaef8c97fc4bd6aba342c18bc75a48bc # kitemmodels # last changed: 2023-03-22 # by: ah # verified: PGP Signed by ./kde-release-keys.gpg (created by gen-frameworks.sh) file 5.104/kitemmodels-5.104.0.tar.xz chk 0bac2fe2fc607443e3332911655ced5dd309e346f2f6a2ff3f29b2f45b7b18d7 # kiconthemes # last changed: 2023-03-22 # by: ah # verified: PGP Signed by ./kde-release-keys.gpg (created by gen-frameworks.sh) file 5.104/kiconthemes-5.104.0.tar.xz chk 70f4d9f950acdaa28b539838226ed1cff7e70cdcf177272185bac7c75a6cccdf # breeze-icons # last changed: 2023-03-22 # by: ah # verified: PGP Signed by ./kde-release-keys.gpg (created by gen-frameworks.sh) file 5.104/breeze-icons-5.104.0.tar.xz chk ff2dacc3fb6f1c7acd378638329f2e5b5fc4fdb3dab1321716d2d54b32eaae6a # karchive # last changed: 2023-03-22 # by: ah # verified: PGP Signed by ./kde-release-keys.gpg (created by gen-frameworks.sh) file 5.104/karchive-5.104.0.tar.xz chk b62f3dfe68691ad2917d0592d66ffc02cfbcc7571b7d1fb1d3fadd695534fd2e # kcrash # last changed: 2023-03-22 # by: ah # verified: PGP Signed by ./kde-release-keys.gpg (created by gen-frameworks.sh) file 5.104/kcrash-5.104.0.tar.xz chk 12d6004f9e2e51a9d74f044462753dd7410e10a40a1f6b07727dcd5b52a7ea96 # kio # last changed: 2023-03-22 # by: ah # verified: PGP Signed by ./kde-release-keys.gpg (created by gen-frameworks.sh) file 5.104/kio-5.104.0.tar.xz chk 5a8b93a5de72406fc4cc7b9aa4715be6d1d5264e617b26be257f5d0e26dde310 # kbookmarks # last changed: 2023-03-22 # by: ah # verified: PGP Signed by ./kde-release-keys.gpg (created by gen-frameworks.sh) file 5.104/kbookmarks-5.104.0.tar.xz chk 85e565590233cfc6dc8c3459717c327961e79c74199d4d1c2741b40946936354 # kservice # last changed: 2023-03-22 # by: ah # verified: PGP Signed by ./kde-release-keys.gpg (created by gen-frameworks.sh) file 5.104/kservice-5.104.0.tar.xz chk 215b109738ea5a10f97c4abbd3c9b9da58c826127708eddd34af345b4e8ad8a3 # solid # last changed: 2023-03-22 # by: ah # verified: PGP Signed by ./kde-release-keys.gpg (created by gen-frameworks.sh) file 5.104/solid-5.104.0.tar.xz chk 2a9a33bc71b4cafec35b9692bd7681a736eeb4e4b81c25f5bd87dbec38c143cf # kjobwidgets # last changed: 2023-03-22 # by: ah # verified: PGP Signed by ./kde-release-keys.gpg (created by gen-frameworks.sh) file 5.104/kjobwidgets-5.104.0.tar.xz chk 3b254124d3bf20666a514710fef8990325da2ade14f49368b1bed1256eb8fea1 # threadweaver # last changed: 2023-04-19 # by: ah # verified: PGP Signed by ./kde-release-keys.gpg (created by gen-frameworks.sh) file 5.104/threadweaver-5.104.0.tar.xz chk 963decfdf0cf780406eb585efdb213539a00cd16ae4dff2b2ffe8822a609a647 # kparts # last changed: 2023-04-19 # by: ah # verified: PGP Signed by ./kde-release-keys.gpg (created by gen-frameworks.sh) file 5.104/kparts-5.104.0.tar.xz chk 66a40646cc4890669991cc63d33803ec335b0c08b7aeb0476b2a852951e700cd ### END PASTE ### server http://download.kde.org/stable/release-service/ # kmime # last changed: 2022-02-01 # by: ah # verified: PGP Sig D81C0CB38EB725EF6691C385BB463350D6EF31EF #file 21.12.1/src/kmime-21.12.1.tar.xz #chk c1f4c06c61f6b4ddde7395b1cfb1f2411a32638e09c6f0a58c6557a7dffe4120 # # Snapshots stored on the GnuPG server # server https://gnupg.org/ftp/gcrypt/snapshots # gpgex # last changed: 2022-12-06 # by: aheinecke # verified: Tarball created by aheinecke. file gpgex/gpgex-1.0.10-beta5.tar.xz chk 2c227634528ef76bcca7fd4b7fe5c38a535f6e68bbe5b2cdc6cc4a74810b2dba # gpg4win-tools # last changed: 2022-08-29 # by: aheinecke # verified: Tarball created by aheinecke. file gpg4win-tools/gpg4win-tools-202208290924.tar.xz chk fe20b69d84893618625d76e55f772477a80628da98411c8bb9c1a5e01028b3f9 # kmime # last changed: 2023-03-22 # by: aheinecke # verified: Tarball created by aheinecke. file kmime/kmime-202303221649.tar.xz chk 0a26c6b7a1b921191e52ee17d8d131f606a1def9ed09e31074a1c7aed5c4c6b7 # libkleo # last changed: 2023-05-31 # by: aheinecke # verified: Tarball created by aheinecke. file libkleo/libkleo-202305311419.tar.xz chk 38752fc52ea2b8ac5b79ddf7ad01ecad5f30dcc8c9fb963370421f09b14c585f # kleopatra # last changed: 2023-05-31 # by: aheinecke # verified: Tarball created by aheinecke. file kleopatra/kleopatra-202305311418.tar.xz chk 912d3ef3a797dedb077f3dc52ee969597e16841b14e7223710a6c975a5bedfc5 # Okular and dependencies # poppler # last changed: 2023-05-31 # by: aheinecke # verified: Tarball created by aheinecke. file poppler/poppler-202305311402.tar.xz chk cb86be10bb3f3f937e0bcba1adca74f0d0b610fd1072b409ea558c2af6882566 # okular -# last changed: 2023-05-04 +# last changed: 2023-05-31 # by: aheinecke # verified: Tarball created by aheinecke. -file okular/okular-202305041409.tar.xz -chk 1bc74f8b35cc5fae5937eeda387742249fab878ec06c2e573e00efe0f90c7339 +file okular/okular-202305311441.tar.xz +chk 8645ebfc9cbd359daf2505de09d919f0cc89cf42b6bb6530a87b560f7d189397 diff --git a/patches/okular/0001-WIP-Buildfix-with-reduced-depdencies.patch b/patches/okular/0001-WIP-Buildfix-with-reduced-depdencies.patch index 3ea459c7..e48707dc 100755 --- a/patches/okular/0001-WIP-Buildfix-with-reduced-depdencies.patch +++ b/patches/okular/0001-WIP-Buildfix-with-reduced-depdencies.patch @@ -1,1047 +1,493 @@ #! /bin/sh patch -p1 -l -f $* < $0 exit $? From 16452ac27fab19e639721808e13c89a454cc0232 Mon Sep 17 00:00:00 2001 From: Andre Heinecke Date: Thu, 4 May 2023 14:07:02 +0200 Subject: [PATCH] WIP: Buildfix with reduced depdencies This needs to be split up and cleaned up. KTextWidgets should only remove the spellchecking and some undo behavior in Text annotations Phonon disables all Media features. KIOFileWidgets should functionally be replaced for Windows with native code but needs testing. DBus needs probably replacement by Kleopatras variant of KUniqueService for the same functionality. For now it always opens in new windows. The CMake version requirement is just to allow compiling on debian stable. --- - CMakeLists.txt | 52 +++++++++++++++++++++++++------- - core/document.cpp | 13 ++++++++ - part/annotwindow.cpp | 9 ++++++ - part/annotwindow.h | 4 +++ - part/dlgpresentation.cpp | 11 +++++++ - part/formwidgets.cpp | 4 ++- - part/formwidgets.h | 5 +++ - part/pageview.cpp | 22 ++++++++++++-- - part/pageviewmouseannotation.cpp | 5 ++- - part/pageviewutils.cpp | 6 ++++ - part/part.cpp | 16 ++++++++++ - part/part.h | 4 +++ - part/presentationwidget.cpp | 38 ++++++++++++++++++----- - shell/CMakeLists.txt | 7 ++++- - shell/main.cpp | 1 - - shell/okular_main.cpp | 11 +++++++ - shell/shell.cpp | 9 +++++- - shell/shell.h | 6 +++- - shell/welcomescreen.cpp | 9 ++++++ - 19 files changed, 206 insertions(+), 26 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt -index 47c8832e1..69f1a0a85 100644 +index b66bd756f..b5a9c6072 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.22) +cmake_minimum_required(VERSION 3.18) # KDE Application Version, managed by release script set (RELEASE_SERVICE_VERSION_MAJOR "23") -@@ -147,8 +147,16 @@ if(KF5JS_FOUND) +@@ -151,8 +151,16 @@ else() endif() if (BUILD_DESKTOP) - find_package(Qt5 ${QT_REQUIRED_VERSION} CONFIG REQUIRED COMPONENTS DBus) - find_package(KF5 ${KF5_REQUIRED_VERSION} REQUIRED COMPONENTS Parts Crash IconThemes TextWidgets) + find_package(Qt5DBus ${QT_REQUIRED_VERSION} CONFIG) + if (Qt5DBus_FOUND) + add_definitions(-DHAVE_DBUS) + endif() + find_package(KF5 ${KF5_REQUIRED_VERSION} REQUIRED COMPONENTS Parts Crash IconThemes) + + find_package(KF5TextWidgets ${KF5_REQUIRED_VERSION} CONFIG) + if (KF5TextWidgets_FOUND) + add_definitions(-DHAVE_TEXTWIDGETS) + endif() find_package(KF5Purpose) set_okular_optional_package_properties(KF5Purpose PROPERTIES -@@ -192,7 +200,14 @@ if(NOT WIN32 AND NOT ANDROID AND NOT APPLE) - else() - set(HAVE_X11 FALSE) - endif() --find_package(Phonon4Qt5 CONFIG REQUIRED) -+ -+find_package(Phonon4Qt5 CONFIG) -+set_okular_optional_package_properties(Phonon4Qt5 PROPERTIES -+ PURPOSE "Support for media files in okular.") -+if (Phonon_FOUND) -+ add_definitions(-DHAVE_PHONON) -+ set(PHONON_LIB Phonon::phonon4qt) -+endif() - - set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_SOURCE_DIR}/cmake/modules) - -@@ -316,11 +331,16 @@ endif(NOT WIN32) - - # okularcore - -+if (Phonon_FOUND) -+set(media_SRCS -+ core/audioplayer.cpp -+) -+endif() -+ - set(okularcore_SRCS - core/action.cpp - core/annotations.cpp - core/area.cpp -- core/audioplayer.cpp - core/bookmarkmanager.cpp - core/chooseenginedialog.cpp - core/document.cpp -@@ -353,7 +373,9 @@ set(okularcore_SRCS - core/script/event.cpp - core/synctex/synctex_parser.c - core/synctex/synctex_parser_utils.c -+ ${media_SRCS} - ) -+ - qt5_add_resources(okularcore_SRCS - core/script/builtin.qrc - ) -@@ -436,7 +458,7 @@ PRIVATE - KF5::I18n - KF5::ThreadWeaver - KF5::Bookmarks -- Phonon::phonon4qt5 -+ ${PHONON_LIB} - Qt5::Svg - ${MATH_LIB} - ZLIB::ZLIB -@@ -480,6 +502,13 @@ install(FILES conf/okular.kcfg DESTINATION ${KDE_INSTALL_KCFGDIR}) - install(FILES conf/okular_core.kcfg DESTINATION ${KDE_INSTALL_KCFGDIR}) - install(FILES core/okularGenerator.desktop DESTINATION ${KDE_INSTALL_KSERVICETYPES5DIR}) - -+if (Phonon_FOUND) -+set(additional_phonon_SRCS -+ part/snapshottaker.cpp -+ part/videowidget.cpp -+) -+endif() -+ - if(BUILD_DESKTOP) - # okularpart - set(okularpart_SRCS -@@ -542,15 +571,14 @@ if(BUILD_DESKTOP) - part/searchwidget.cpp - part/sidebar.cpp - part/side_reviews.cpp -- part/snapshottaker.cpp - part/thumbnaillist.cpp - part/toc.cpp - part/toggleactionmenu.cpp -- part/videowidget.cpp - part/layers.cpp - part/signaturepartutils.cpp - part/signaturepropertiesdialog.cpp - part/signaturepanel.cpp -+ ${additional_phonon_SRCS} - ) - ki18n_wrap_ui(okularpart_SRCS part/selectcertificatedialog.ui) - -@@ -567,21 +595,23 @@ generate_export_header(okularpart BASE_NAME okularpart) - target_link_libraries(okularpart okularcore - ${MATH_LIB} - Qt5::Svg -- Phonon::phonon4qt5 -+ ${PHONON_LIB} - KF5::Archive - KF5::Bookmarks - KF5::I18n +@@ -588,13 +596,16 @@ target_link_libraries(okularpart okularcore KF5::IconThemes KF5::ItemViews KF5::KIOCore - KF5::KIOFileWidgets KF5::KIOWidgets KF5::Parts KF5::Solid KF5::WindowSystem - KF5::TextWidgets ) - ++ +if(KF5TextWidgets_FOUND) + target_link_libraries(okularpart KF5::TextWidgets) +endif() + - if(KF5Wallet_FOUND) - target_link_libraries(okularpart KF5::Wallet) + if (Phonon4Qt5_FOUND) + target_link_libraries(okularpart Phonon::phonon4qt5) endif() -diff --git a/core/document.cpp b/core/document.cpp -index b1b6c94d3..cd6a5f066 100644 ---- a/core/document.cpp -+++ b/core/document.cpp -@@ -70,8 +70,10 @@ - #include "action.h" - #include "annotations.h" - #include "annotations_p.h" -+#ifdef HAVE_PHONON - #include "audioplayer.h" - #include "audioplayer_p.h" -+#endif - #include "bookmarkmanager.h" - #include "chooseenginedialog_p.h" - #include "debug_p.h" -@@ -2576,7 +2578,9 @@ Document::OpenResult Document::openDocument(const QString &docFile, const QUrl & - d->m_nextDocumentDestination = QString(); - } - -+#ifdef HAVE_PHONON - AudioPlayer::instance()->d->m_currentDocument = fromFileDescriptor ? QUrl() : d->m_url; -+#endif - - const QStringList docScripts = d->m_generator->metaData(QStringLiteral("DocumentScripts"), QStringLiteral("JavaScript")).toStringList(); - if (!docScripts.isEmpty()) { -@@ -2648,8 +2652,10 @@ void Document::closeDocument() - d->m_fontThread = nullptr; - } - -+#ifdef HAVE_PHONON - // stop any audio playback - AudioPlayer::instance()->stopPlaybacks(); -+#endif - - // close the current document and save document info if a document is still opened - if (d->m_generator && d->m_pagesVector.size() > 0) { -@@ -2773,7 +2779,9 @@ void Document::closeDocument() - d->m_documentInfo = DocumentInfo(); - d->m_documentInfoAskedKeys.clear(); - -+#ifdef HAVE_PHONON - AudioPlayer::instance()->d->m_currentDocument = QUrl(); -+#endif - - d->m_undoStack->clear(); - d->m_docdataMigrationNeeded = false; -@@ -4304,10 +4312,12 @@ void Document::processAction(const Action *action) - } - } break; - -+#ifdef HAVE_PHONON - case Action::Sound: { - const SoundAction *linksound = static_cast(action); - AudioPlayer::instance()->playSound(linksound->sound(), linksound); - } break; -+#endif - - case Action::Script: { - const ScriptAction *linkscript = static_cast(action); -@@ -4317,6 +4327,7 @@ void Document::processAction(const Action *action) - d->m_scripter->execute(linkscript->scriptType(), linkscript->script()); - } break; - -+#ifdef HAVE_PHONON - case Action::Movie: - Q_EMIT processMovieAction(static_cast(action)); - break; -@@ -4331,6 +4342,8 @@ void Document::processAction(const Action *action) - - Q_EMIT processRenditionAction(static_cast(action)); - } break; -+#endif -+ - case Action::BackendOpaque: { - d->m_generator->opaqueAction(static_cast(action)); - } break; diff --git a/part/annotwindow.cpp b/part/annotwindow.cpp index 68bc16f4d..c77c42697 100644 --- a/part/annotwindow.cpp +++ b/part/annotwindow.cpp @@ -13,7 +13,12 @@ // qt/kde includes #include #include +#ifdef HAVE_TEXTWIDGETS #include +#else +#include +#define KTextEdit QTextEdit +#endif #include #include #include @@ -21,9 +26,11 @@ #include #include #include +#include #include #include #include +#include #include #include #include @@ -234,7 +241,9 @@ AnnotWindow::AnnotWindow(QWidget *parent, Okular::Annotation *annot, Okular::Doc connect(textEdit, &KTextEdit::textChanged, this, &AnnotWindow::slotsaveWindowText); connect(textEdit, &KTextEdit::cursorPositionChanged, this, &AnnotWindow::slotsaveWindowText); +#ifdef HAVE_TEXTWIDGETS connect(textEdit, &KTextEdit::aboutToShowContextMenu, this, &AnnotWindow::slotUpdateUndoAndRedoInContextMenu); +#endif connect(m_document, &Okular::Document::annotationContentsChangedByUndoRedo, this, &AnnotWindow::slotHandleContentsChangedByUndoRedo); if (!canEditAnnotation) { diff --git a/part/annotwindow.h b/part/annotwindow.h index 8f48e698a..8d99b1ebd 100644 --- a/part/annotwindow.h +++ b/part/annotwindow.h @@ -25,6 +25,10 @@ namespace GuiUtils class LatexRenderer; } +#ifndef HAVE_TEXTWIDGETS +#define KTextEdit QTextEdit +#endif + class KTextEdit; class MovableTitle; class QMenu; diff --git a/part/dlgpresentation.cpp b/part/dlgpresentation.cpp index 5dd763b3f..4b4d6c5e2 100644 --- a/part/dlgpresentation.cpp +++ b/part/dlgpresentation.cpp @@ -10,7 +10,13 @@ #include #include + +#ifdef HAVE_TEXTWIDGETS #include +#else +#include +#define KPluralHandlingSpinBox QSpinBox +#endif #include #include @@ -35,7 +41,12 @@ DlgPresentation::DlgPresentation(QWidget *parent) KPluralHandlingSpinBox *advanceTime = new KPluralHandlingSpinBox(this); advanceTime->setPrefix(i18nc("Spinbox prefix: Advance automatically: every n seconds", "every ")); +#ifdef HAVE_TEXTWIDGETS advanceTime->setSuffix(ki18ncp("Advance every %1 seconds", " second", " seconds")); +#else + advanceTime->setPrefix(i18nc("Spinbox suffix: Advance automatically: every n seconds", " seconds")); +#endif + advanceTime->setObjectName(QStringLiteral("kcfg_SlidesAdvanceTime")); QHBoxLayout *advanceAutomaticallyLayout = new QHBoxLayout(); diff --git a/part/formwidgets.cpp b/part/formwidgets.cpp index c2291e4c6..cc737ea9c 100644 --- a/part/formwidgets.cpp +++ b/part/formwidgets.cpp @@ -614,14 +614,16 @@ TextAreaEdit::TextAreaEdit(Okular::FormFieldText *text, PageView *pageView) , FormWidgetIface(this, text) { setAcceptRichText(text->isRichText()); +#ifdef HAVE_TEXTWIDGETS setCheckSpellingEnabled(text->canBeSpellChecked()); + connect(this, &KTextEdit::aboutToShowContextMenu, this, &TextAreaEdit::slotUpdateUndoAndRedoInContextMenu); +#endif setAlignment(text->textAlignment()); setPlainText(text->text()); setUndoRedoEnabled(false); connect(this, &QTextEdit::textChanged, this, &TextAreaEdit::slotChanged); connect(this, &QTextEdit::cursorPositionChanged, this, &TextAreaEdit::slotChanged); - connect(this, &KTextEdit::aboutToShowContextMenu, this, &TextAreaEdit::slotUpdateUndoAndRedoInContextMenu); m_prevCursorPos = textCursor().position(); m_prevAnchorPos = textCursor().anchor(); m_editing = false; diff --git a/part/formwidgets.h b/part/formwidgets.h index ea0d2fef8..e59276593 100644 --- a/part/formwidgets.h +++ b/part/formwidgets.h @@ -13,7 +13,12 @@ #include "core/area.h" #include "core/form.h" +#ifdef HAVE_TEXTWIDGETS #include +#else +#include +#define KTextEdit QTextEdit +#endif #include #include #include -diff --git a/part/pageview.cpp b/part/pageview.cpp -index 3872dd29f..0bf051981 100644 ---- a/part/pageview.cpp -+++ b/part/pageview.cpp -@@ -83,12 +83,14 @@ - #include "tts.h" - #endif - #include "core/action.h" --#include "core/audioplayer.h" - #include "core/document_p.h" - #include "core/form.h" - #include "core/generator.h" - #include "core/misc.h" -+#ifdef HAVE_PHONON -+#include "core/audioplayer.h" - #include "core/movie.h" -+#endif - #include "core/page.h" - #include "core/page_p.h" - #include "core/sourcereference.h" -@@ -1138,6 +1140,7 @@ void PageView::selectAll() - - void PageView::createAnnotationsVideoWidgets(PageViewItem *item, const QList &annotations) - { -+#ifdef HAVE_PHONON - qDeleteAll(item->videoWidgets()); - item->videoWidgets().clear(); - -@@ -1162,6 +1165,7 @@ void PageView::createAnnotationsVideoWidgets(PageViewItem *item, const QList &pageSet, int setupFlag - - // For the video widgets we don't really care about reusing them since they don't contain much info so just - // create them again -+#ifdef HAVE_PHONON - createAnnotationsVideoWidgets(item, pageSet[i]->annotations()); - const QHash videoWidgets = item->videoWidgets(); - for (VideoWidget *vw : videoWidgets) { -@@ -1229,6 +1234,7 @@ void PageView::notifySetup(const QVector &pageSet, int setupFlag - vw->show(); - vw->hide(); - } -+#endif - } - } - -@@ -1586,12 +1592,14 @@ void PageView::notifyCurrentPageChanged(int previous, int current) - { - if (previous != -1) { - PageViewItem *item = d->items.at(previous); -+#ifdef HAVE_PHONON - if (item) { - const QHash videoWidgetsList = item->videoWidgets(); - for (VideoWidget *videoWidget : videoWidgetsList) { - videoWidget->pageLeft(); - } - } -+#endif - - // On close, run the widget scripts, needed for running animated PDF - const Okular::Page *page = d->document->page(previous); -@@ -1606,12 +1614,14 @@ void PageView::notifyCurrentPageChanged(int previous, int current) - - if (current != -1) { - PageViewItem *item = d->items.at(current); -+#ifdef HAVE_PHONON - if (item) { - const QHash videoWidgetsList = item->videoWidgets(); - for (VideoWidget *videoWidget : videoWidgetsList) { - videoWidget->pageEntered(); - } - } -+#endif - - // update zoom text and factor if in a ZoomFit/* zoom mode - if (d->zoomMode != ZoomFixed) { -@@ -4370,6 +4380,7 @@ QMenu *PageView::createProcessLinkMenu(PageViewItem *item, const QPoint eventPos - // creating the menu and its actions - QAction *processLink = menu->addAction(i18n("Follow This Link")); - processLink->setObjectName(QStringLiteral("ProcessLinkAction")); -+#ifdef HAVE_PHONON - if (link->actionType() == Okular::Action::Sound) { - processLink->setText(i18n("Play this Sound")); - if (Okular::AudioPlayer::instance()->state() == Okular::AudioPlayer::PlayingState) { -@@ -4377,6 +4388,7 @@ QMenu *PageView::createProcessLinkMenu(PageViewItem *item, const QPoint eventPos - connect(actStopSound, &QAction::triggered, []() { Okular::AudioPlayer::instance()->stopPlaybacks(); }); - } - } -+#endif - - if (dynamic_cast(link)) { - QAction *actCopyLinkLocation = menu->addAction(QIcon::fromTheme(QStringLiteral("edit-copy")), i18n("Copy Link Address")); -@@ -4677,6 +4689,8 @@ void PageView::slotRequestVisiblePixmaps(int newValue) - Okular::NormalizedRect r = fwi->rect(); - fwi->moveTo(qRound(i->uncroppedGeometry().left() + i->uncroppedWidth() * r.left) + 1 - viewportRect.left(), qRound(i->uncroppedGeometry().top() + i->uncroppedHeight() * r.top) + 1 - viewportRect.top()); - } -+ -+#ifdef HAVE_PHONON - const QHash videoWidgets = i->videoWidgets(); - for (VideoWidget *vw : videoWidgets) { - const Okular::NormalizedRect r = vw->normGeometry(); -@@ -4687,7 +4701,7 @@ void PageView::slotRequestVisiblePixmaps(int newValue) - vw->pageLeft(); - } - } -- -+#endif - if (!i->isVisible()) { - continue; - } -@@ -5317,6 +5331,7 @@ void PageView::externalKeyPressEvent(QKeyEvent *e) - - void PageView::slotProcessMovieAction(const Okular::MovieAction *action) - { -+#ifdef HAVE_PHONON - const Okular::MovieAnnotation *movieAnnotation = action->annotation(); - if (!movieAnnotation) { - return; -@@ -5356,10 +5371,12 @@ void PageView::slotProcessMovieAction(const Okular::MovieAction *action) - vw->play(); - break; - }; -+#endif - } - - void PageView::slotProcessRenditionAction(const Okular::RenditionAction *action) - { -+#ifdef HAVE_PHONON - Okular::Movie *movie = action->movie(); - if (!movie) { - return; -@@ -5400,6 +5417,7 @@ void PageView::slotProcessRenditionAction(const Okular::RenditionAction *action) - default: - return; - }; -+#endif - } - - void PageView::slotFitWindowToPage() -diff --git a/part/pageviewmouseannotation.cpp b/part/pageviewmouseannotation.cpp -index 1e2edaaff..73649ff87 100644 ---- a/part/pageviewmouseannotation.cpp -+++ b/part/pageviewmouseannotation.cpp -@@ -647,6 +647,7 @@ void MouseAnnotation::processAction(const AnnotationDescription &ad) - Okular::Annotation *ann = ad.annotation; - PageViewItem *pageItem = ad.pageViewItem; - -+#ifdef HAVE_PHONON - if (ann->subType() == Okular::Annotation::AMovie) { - VideoWidget *vw = pageItem->videoWidgets().value(static_cast(ann)->movie()); - vw->show(); -@@ -655,7 +656,9 @@ void MouseAnnotation::processAction(const AnnotationDescription &ad) - VideoWidget *vw = pageItem->videoWidgets().value(static_cast(ann)->movie()); - vw->show(); - vw->play(); -- } else if (ann->subType() == Okular::Annotation::AScreen) { -+ } else -+#endif -+ if (ann->subType() == Okular::Annotation::AScreen) { - m_document->processAction(static_cast(ann)->action()); - } else if (ann->subType() == Okular::Annotation::AFileAttachment) { - const Okular::FileAttachmentAnnotation *fileAttachAnnot = static_cast(ann); diff --git a/part/pageviewutils.cpp b/part/pageviewutils.cpp -index 3da2fb52c..d42e74cfd 100644 +index 3da2fb52c..4a47cdf33 100644 --- a/part/pageviewutils.cpp +++ b/part/pageviewutils.cpp @@ -14,6 +14,8 @@ #include #include #include +#include +#include // local includes #include "core/form.h" -@@ -128,10 +130,12 @@ void PageViewItem::setWHZC(int w, int h, double z, const Okular::NormalizedRect - Okular::NormalizedRect r = fwi->rect(); - fwi->setWidthHeight(qRound(fabs(r.right - r.left) * m_uncroppedGeometry.width()), qRound(fabs(r.bottom - r.top) * m_uncroppedGeometry.height())); - } -+#ifdef HAVE_PHONON - for (VideoWidget *vw : qAsConst(m_videoWidgets)) { - const Okular::NormalizedRect r = vw->normGeometry(); - vw->resize(qRound(fabs(r.right - r.left) * m_uncroppedGeometry.width()), qRound(fabs(r.bottom - r.top) * m_uncroppedGeometry.height())); - } -+#endif - } - - void PageViewItem::moveTo(int x, int y) -@@ -146,10 +150,12 @@ void PageViewItem::moveTo(int x, int y) - Okular::NormalizedRect r = (*it)->rect(); - (*it)->moveTo(qRound(x + m_uncroppedGeometry.width() * r.left) + 1, qRound(y + m_uncroppedGeometry.height() * r.top) + 1); - } -+#ifdef HAVE_PHONON - for (VideoWidget *vw : qAsConst(m_videoWidgets)) { - const Okular::NormalizedRect r = vw->normGeometry(); - vw->move(qRound(x + m_uncroppedGeometry.width() * r.left) + 1, qRound(y + m_uncroppedGeometry.height() * r.top) + 1); - } -+#endif - } - - void PageViewItem::setVisible(bool visible) diff --git a/part/part.cpp b/part/part.cpp -index d5a620947..652da35cd 100644 +index 9c22672cf..68303e5b0 100644 --- a/part/part.cpp +++ b/part/part.cpp -@@ -34,10 +34,13 @@ +@@ -36,10 +36,13 @@ #include #include #include +#include +#include #include #include #include #include +#include #include #include #include -@@ -123,6 +126,11 @@ +@@ -125,6 +128,11 @@ #include #include +#ifdef Q_OS_WIN +#include +#include +#endif + #ifdef OKULAR_KEEP_FILE_OPEN class FileKeeper { -@@ -321,6 +329,7 @@ Part::Part(QWidget *parentWidget, QObject *parent, const QVariantList &args) +@@ -323,6 +331,7 @@ Part::Part(QWidget *parentWidget, QObject *parent, const QVariantList &args) setupConfigSkeleton(args, componentName()); +#ifdef HAVE_DBUS numberOfParts++; if (numberOfParts == 1) { m_registerDbusName = QStringLiteral("/okular"); -@@ -328,6 +337,7 @@ Part::Part(QWidget *parentWidget, QObject *parent, const QVariantList &args) +@@ -330,6 +339,7 @@ Part::Part(QWidget *parentWidget, QObject *parent, const QVariantList &args) m_registerDbusName = QStringLiteral("/okular%1").arg(numberOfParts); } QDBusConnection::sessionBus().registerObject(m_registerDbusName, this, QDBusConnection::ExportScriptableSlots); +#endif // connect the started signal to tell the job the mimetypes we like, // and get some more information from it -@@ -984,7 +994,9 @@ void Part::setupActions() +@@ -986,7 +996,9 @@ void Part::setupActions() Part::~Part() { +#ifdef HAVE_DBUS QDBusConnection::sessionBus().unregisterObject(m_registerDbusName); +#endif m_document->removeObserver(this); -@@ -3871,7 +3883,11 @@ void Part::setEditorCmd(const QString &editorCmd) +@@ -3873,7 +3885,11 @@ void Part::setEditorCmd(const QString &editorCmd) void Part::slotOpenContainingFolder() { +#ifdef Q_OS_WIN + ShellExecuteW(NULL, L"explore", (wchar_t *)localFilePath().utf16(), NULL, NULL, SW_SHOWDEFAULT); +#else KIO::highlightInFileManager({QUrl(localFilePath())}); +#endif } } // namespace Okular diff --git a/part/part.h b/part/part.h -index c880d4747..f463d1ada 100644 +index 311824984..91b065a83 100644 --- a/part/part.h +++ b/part/part.h @@ -20,7 +20,11 @@ #include #include #include +#ifdef HAVE_DBUS #include // krazy:exclude=includes +#else +#define Q_NOREPLY +#endif #include #include diff --git a/part/presentationwidget.cpp b/part/presentationwidget.cpp -index bd5192c53..81e069195 100644 +index bd5192c53..01afad83d 100644 --- a/part/presentationwidget.cpp +++ b/part/presentationwidget.cpp @@ -7,9 +7,6 @@ #include "presentationwidget.h" // qt/kde includes -#include -#include -#include #include #include @@ -39,6 +36,9 @@ #include #ifdef Q_OS_LINUX +#include +#include +#include #include #include // For ::close() for sleep inhibition #endif -@@ -51,10 +51,13 @@ - #include "annotationtools.h" - #include "core/action.h" - #include "core/annotations.h" -+#ifdef HAVE_PHONON - #include "core/audioplayer.h" -+#include "core/movie.h" -+#include "videowidget.h" -+#endif - #include "core/document.h" - #include "core/generator.h" --#include "core/movie.h" - #include "core/page.h" - #include "drawingtoolactions.h" - #include "gui/debug_ui.h" -@@ -64,7 +67,6 @@ - #include "presentationsearchbar.h" - #include "settings.h" - #include "settings_core.h" --#include "videowidget.h" - - // comment this to disable the top-right progress indicator - #define ENABLE_PROGRESS_OVERLAY -@@ -76,7 +78,9 @@ struct PresentationFrame { - - ~PresentationFrame() - { -+#ifdef HAVE_PHONON - qDeleteAll(videoWidgets); -+#endif - } - - PresentationFrame(const PresentationFrame &) = delete; -@@ -94,17 +98,21 @@ struct PresentationFrame { - } - geometry.setRect((width - pageWidth) / 2, (height - pageHeight) / 2, pageWidth, pageHeight); - -+#ifdef HAVE_PHONON - for (VideoWidget *vw : qAsConst(videoWidgets)) { - const Okular::NormalizedRect r = vw->normGeometry(); - QRect vwgeom = r.geometry(geometry.width(), geometry.height()); - vw->resize(vwgeom.size()); - vw->move(geometry.topLeft() + vwgeom.topLeft()); - } -+#endif - } - - const Okular::Page *page; - QRect geometry; -+#ifdef HAVE_PHONON - QHash videoWidgets; -+#endif - std::vector drawings; - }; - -@@ -256,8 +264,10 @@ PresentationWidget::PresentationWidget(QWidget *parent, Okular::Document *doc, D - connect(m_nextPageTimer, &QTimer::timeout, this, &PresentationWidget::slotNextPage); - setPlayPauseIcon(); - -+#ifdef HAVE_PHONON - connect(m_document, &Okular::Document::processMovieAction, this, &PresentationWidget::slotProcessMovieAction); - connect(m_document, &Okular::Document::processRenditionAction, this, &PresentationWidget::slotProcessRenditionAction); -+#endif - - // handle cursor appearance as specified in configuration - if (Okular::Settings::slidesCursor() == Okular::Settings::EnumSlidesCursor::HiddenDelay) { -@@ -286,8 +296,10 @@ PresentationWidget::~PresentationWidget() - // allow power management saver again - allowPowerManagement(); - -+#ifdef HAVE_PHONON - // stop the audio playbacks - Okular::AudioPlayer::instance()->stopPlaybacks(); -+#endif - - // remove our highlights - if (m_searchBar) { -@@ -331,6 +343,7 @@ void PresentationWidget::notifySetup(const QVector &pageSet, int - for (const Okular::Page *page : pageSet) { - PresentationFrame *frame = new PresentationFrame(); - frame->page = page; -+#ifdef HAVE_PHONON - const QList annotations = page->annotations(); - for (Okular::Annotation *a : annotations) { - if (a->subType() == Okular::Annotation::AMovie) { -@@ -355,6 +368,7 @@ void PresentationWidget::notifySetup(const QVector &pageSet, int - } - } - } -+#endif - frame->recalcGeometry(m_width, m_height, screenRatio); - // add the frame to the vector - m_frames.push_back(frame); -@@ -401,13 +415,14 @@ void PresentationWidget::notifyCurrentPageChanged(int previousPage, int currentP - { - if (previousPage != -1) { - // stop video playback -+#ifdef HAVE_PHONON - for (VideoWidget *vw : qAsConst(m_frames[previousPage]->videoWidgets)) { - vw->stop(); - vw->pageLeft(); - } -- - // stop audio playback, if any - Okular::AudioPlayer::instance()->stopPlaybacks(); -+#endif - - // perform the page closing action, if any - if (m_document->page(previousPage)->pageAction(Okular::Page::Closing)) { -@@ -474,10 +489,12 @@ void PresentationWidget::notifyCurrentPageChanged(int previousPage, int currentP - } - } - -+#ifdef HAVE_PHONON - // start autoplay video playback - for (VideoWidget *vw : qAsConst(m_frames[m_frameIndex]->videoWidgets)) { - vw->pageEntered(); - } -+#endif - } - } - -@@ -673,6 +690,7 @@ void PresentationWidget::mousePressEvent(QMouseEvent *e) - - const Okular::Annotation *annotation = getAnnotation(e->x(), e->y()); - if (annotation) { -+#ifdef HAVE_PHONON - if (annotation->subType() == Okular::Annotation::AMovie) { - const Okular::MovieAnnotation *movieAnnotation = static_cast(annotation); - -@@ -687,7 +705,9 @@ void PresentationWidget::mousePressEvent(QMouseEvent *e) - vw->show(); - vw->play(); - return; -- } else if (annotation->subType() == Okular::Annotation::AScreen) { -+ } -+#endif -+ if (annotation->subType() == Okular::Annotation::AScreen) { - m_document->processAction(static_cast(annotation)->action()); - return; - } -@@ -2258,6 +2278,7 @@ void PresentationWidget::initTransition(const Okular::PageTransition *transition - - void PresentationWidget::slotProcessMovieAction(const Okular::MovieAction *action) - { -+#ifdef HAVE_PHONON - const Okular::MovieAnnotation *movieAnnotation = action->annotation(); - if (!movieAnnotation) { - return; -@@ -2290,10 +2311,12 @@ void PresentationWidget::slotProcessMovieAction(const Okular::MovieAction *actio - vw->play(); - break; - }; -+#endif - } - - void PresentationWidget::slotProcessRenditionAction(const Okular::RenditionAction *action) - { -+#ifdef HAVE_PHONON - Okular::Movie *movie = action->movie(); - if (!movie) { - return; -@@ -2327,6 +2350,7 @@ void PresentationWidget::slotProcessRenditionAction(const Okular::RenditionActio - default: - return; - }; -+#endif - } - - void PresentationWidget::slotTogglePlayPause() diff --git a/shell/CMakeLists.txt b/shell/CMakeLists.txt index 597f0b74c..7b83323e3 100644 --- a/shell/CMakeLists.txt +++ b/shell/CMakeLists.txt @@ -23,7 +23,12 @@ ecm_add_app_icon(okular_SRCS ICONS ${ICONS_SRCS}) add_executable(okular ${okular_SRCS}) -target_link_libraries(okular KF5::I18n KF5::Parts KF5::WindowSystem KF5::Crash KF5::IconThemes Qt5::DBus) +target_link_libraries(okular KF5::I18n KF5::Parts KF5::WindowSystem KF5::Crash KF5::IconThemes) + +if(TARGET Qt5::DBus) + target_link_libraries(okular Qt5::DBus) +endif() + if(TARGET KF5::Activities) target_compile_definitions(okular PUBLIC -DWITH_KACTIVITIES=1) diff --git a/shell/main.cpp b/shell/main.cpp index 35f3aea65..dd08abeaf 100644 --- a/shell/main.cpp +++ b/shell/main.cpp @@ -21,7 +21,6 @@ #include #include #include -#include #include #include diff --git a/shell/okular_main.cpp b/shell/okular_main.cpp index c23f46356..43229f71b 100644 --- a/shell/okular_main.cpp +++ b/shell/okular_main.cpp @@ -16,8 +16,11 @@ #include #include #include +#ifdef HAVE_DBUS #include +#endif #include +#include #include "config-okular.h" #if HAVE_X11 @@ -43,6 +46,9 @@ static QString startupId() static bool attachUniqueInstance(const QStringList &paths, const QString &serializedOptions) { +#ifndef HAVE_DBUS + return false; +#else if (!ShellUtils::unique(serializedOptions) || paths.count() != 1) { return false; } @@ -66,11 +72,15 @@ static bool attachUniqueInstance(const QStringList &paths, const QString &serial } return true; +#endif } // Ask an existing non-unique instance to open new tabs static bool attachExistingInstance(const QStringList &paths, const QString &serializedOptions) { +#ifndef HAVE_DBUS + return false; +#else if (paths.count() < 1) { return false; } @@ -159,6 +169,7 @@ static bool attachExistingInstance(const QStringList &paths, const QString &seri bestService->call(QStringLiteral("tryRaise"), startupId()); return true; +#endif } namespace Okular diff --git a/shell/shell.cpp b/shell/shell.cpp index 970dafb82..cbf68d419 100644 --- a/shell/shell.cpp +++ b/shell/shell.cpp @@ -36,11 +36,15 @@ #include #include #include +#ifdef HAVE_DBUS #include +#endif #include #include #include #include +#include +#include #include #include #include @@ -237,6 +241,7 @@ Shell::Shell(const QString &serializedOptions) readSettings(); m_unique = ShellUtils::unique(serializedOptions); +#ifdef HAVE_DBUS if (m_unique) { m_unique = QDBusConnection::sessionBus().registerService(QStringLiteral("org.kde.okular")); if (!m_unique) { @@ -258,7 +263,7 @@ Shell::Shell(const QString &serializedOptions) } QDBusConnection::sessionBus().registerObject(QStringLiteral("/okularshell"), this, QDBusConnection::ExportScriptableSlots); - +#endif // Make sure that the welcome scren is visible on startup. showWelcomeScreen(); } else { @@ -333,9 +338,11 @@ Shell::~Shell() } m_tabs.clear(); } +#ifdef HAVE_DBUS if (m_unique) { QDBusConnection::sessionBus().unregisterService(QStringLiteral("org.kde.okular")); } +#endif delete m_tabWidget; } diff --git a/shell/shell.h b/shell/shell.h index facffe33b..a864cb72e 100644 --- a/shell/shell.h +++ b/shell/shell.h @@ -20,7 +20,11 @@ #include #include -#include // krazy:exclude=includes +#ifdef HAVE_DBUS +#include // krazy:exclude=include +#else +#define Q_NOREPLY +#endif #include "welcomescreen.h" diff --git a/shell/welcomescreen.cpp b/shell/welcomescreen.cpp -index 128abd7a2..ead12eb7c 100644 +index 1e4bff15e..1066c5f18 100644 --- a/shell/welcomescreen.cpp +++ b/shell/welcomescreen.cpp @@ -21,6 +21,11 @@ #include "recentitemsmodel.h" +#ifdef Q_OS_WIN +#include +#include +#endif + class RecentsListItemDelegate : public QStyledItemDelegate { Q_OBJECT @@ -78,7 +83,11 @@ public: showDirectoryAction->setIcon(QIcon::fromTheme(QStringLiteral("document-open-folder"))); connect(showDirectoryAction, &QAction::triggered, this, [item]() { if (item->url.isLocalFile()) { +#ifdef Q_OS_WIN + ShellExecuteW(NULL, L"explore", (wchar_t *)item->url.toLocalFile().utf16(), NULL, NULL, SW_SHOWDEFAULT); +#else KIO::highlightInFileManager({item->url}); +#endif } }); menu.addAction(showDirectoryAction); --- -2.40.1