Changes of Revision 10
[-] [+] | Changed | kio-extras.spec |
[-] [+] | Deleted | kio-extras-5.2.0.tar.xz/thumbnail/jpegcreatorsettings.kcfgc ^ |
@@ -1,4 +0,0 @@ -File=jpegcreatorsettings.kcfg -ClassName=JpegCreatorSettings -Singleton=true -Mutators=true \ No newline at end of file | ||
[-] [+] | Changed | kio-extras-5.3.0.tar.xz/CMakeLists.txt ^ |
@@ -1,12 +1,12 @@ project(kio-extras) -set(PROJECT_VERSION "5.2.0") +set(PROJECT_VERSION "5.3.0") set(PROJECT_VERSION_MAJOR 5) cmake_minimum_required(VERSION 2.8.12 FATAL_ERROR) include(FeatureSummary) -set(QT_MIN_VERSION "5.3.0") +set(QT_MIN_VERSION "5.4.0") set(KF5_MIN_VERSION "5.3.0") find_package(Qt5 ${QT_MIN_VERSION} CONFIG REQUIRED COMPONENTS DBus Network Widgets Svg) @@ -50,6 +50,7 @@ include(ECMMarkNonGuiExecutable) include(ECMMarkAsTest) include(ECMPackageConfigHelpers) +include(ECMOptionalAddSubdirectory) find_package(SLP) set_package_properties(SLP PROPERTIES DESCRIPTION "SLP (Service Location Protocol) implementation" @@ -120,6 +121,7 @@ add_subdirectory( doc ) +add_subdirectory( about ) add_subdirectory( bookmarks ) add_subdirectory( filter ) if(Phonon4Qt5_FOUND) | ||
[-] [+] | Added | kio-extras-5.3.0.tar.xz/about ^ |
+(directory) | ||
[-] [+] | Added | kio-extras-5.3.0.tar.xz/about/CMakeLists.txt ^ |
@@ -0,0 +1,20 @@ + + + + +########### next target ############### + +set(kio_about_PART_SRCS kio_about.cpp ) + + +kde4_add_plugin(kio_about ${kio_about_PART_SRCS}) + + +target_link_libraries(kio_about ${KDE4_KIO_LIBS} ) + +install(TARGETS kio_about DESTINATION ${PLUGIN_INSTALL_DIR} ) + + +########### install files ############### + +install( FILES about.protocol DESTINATION ${SERVICES_INSTALL_DIR} ) | ||
[-] [+] | Added | kio-extras-5.3.0.tar.xz/about/Messages.sh ^ |
@@ -0,0 +1,2 @@ +#! /usr/bin/env bash +$XGETTEXT *.cpp *.h -o $podir/kio_about.pot | ||
[-] [+] | Added | kio-extras-5.3.0.tar.xz/about/about.protocol ^ |
@@ -0,0 +1,9 @@ +[Protocol] +exec=kio_about +protocol=about +input=none +output=filesystem +reading=true +defaultMimetype=text/html +Icon=help-about +Class=:local | ||
[-] [+] | Added | kio-extras-5.3.0.tar.xz/about/kio_about.cpp ^ |
@@ -0,0 +1,74 @@ +/* This file is part of the KDE libraries + + Copyright (c) 2002 John Firebaugh <jfirebaugh@kde.org> + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include "kio_about.h" + +#include <QCoreApplication> + +using namespace KIO; + +AboutProtocol::AboutProtocol(const QByteArray &pool_socket, const QByteArray &app_socket) + : SlaveBase("about", pool_socket, app_socket) +{ +} + +AboutProtocol::~AboutProtocol() +{ +} + +void AboutProtocol::get( const QUrl& ) +{ + QByteArray output; + + QTextStream os( &output, QIODevice::WriteOnly ); + os.setCodec( "ISO-8859-1" ); // In fact ASCII + + os << "<html><head><title>about:blank</title></head><body></body></html>"; + os.flush(); + + mimeType("text/html"); + data( output ); + finished(); +} + +void AboutProtocol::mimetype( const QUrl& ) +{ + mimeType("text/html"); + finished(); +} + +extern "C" Q_DECL_EXPORT int kdemain( int argc, char **argv ) +{ + QCoreApplication app(argc, argv); + + app.setApplicationName("kio_about"); + + if (argc != 4) + { + fprintf(stderr, "Usage: kio_about protocol domain-socket1 domain-socket2\n"); + exit(-1); + } + + AboutProtocol slave(argv[2], argv[3]); + slave.dispatchLoop(); + + return 0; +} + | ||
[-] [+] | Added | kio-extras-5.3.0.tar.xz/about/kio_about.h ^ |
@@ -0,0 +1,40 @@ +/* This file is part of the KDE libraries + + Copyright (c) 2002 John Firebaugh <jfirebaugh@kde.org> + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ +#ifndef __kio_about_h__ +#define __kio_about_h__ + +#include <QByteArray> +#include <QUrl> + +#include <kio/global.h> +#include <kio/slavebase.h> + + +class AboutProtocol : public KIO::SlaveBase +{ +public: + AboutProtocol(const QByteArray &pool_socket, const QByteArray &app_socket); + virtual ~AboutProtocol(); + + virtual void get(const QUrl& url); + virtual void mimetype(const QUrl& url); +}; + +#endif | ||
[-] [+] | Changed | kio-extras-5.3.0.tar.xz/desktop/Home.desktop ^ |
@@ -4,7 +4,6 @@ Name[af]=Tuiste Name[ar]=المنزل Name[as]=ঘৰ -Name[ast]=Carpeta personal Name[be]=Хатняя тэчка Name[be@latin]=Dom Name[bg]=Домашна директория @@ -66,7 +65,7 @@ Name[pa]=ਘਰ Name[pl]=Katalog domowy Name[pt]=Pasta Pessoal -Name[pt_BR]=Pasta do usuário +Name[pt_BR]=Pasta Pessoal Name[ro]=Acasă Name[ru]=Домашняя папка Name[se]=Ruoktu @@ -97,7 +96,6 @@ GenericName[af]=Persoonlike Lêers GenericName[ar]=الملفات الشخصية GenericName[as]=ব্যক্তিগত নথিপত্ৰ -GenericName[ast]=Ficheros personales GenericName[be]=Персанальныя файлы GenericName[be@latin]=Ułasnyja fajły GenericName[bg]=Лични файлове | ||
[-] [+] | Changed | kio-extras-5.3.0.tar.xz/desktop/desktopnotifier.desktop ^ |
@@ -2,7 +2,6 @@ Type=Service Name=Directory Watcher Name[ar]=مراقب المجلدات -Name[ast]=Observador de carpetes Name[bg]=Наблюдение на директории Name[bn]=ডিরেক্টরি ওয়াচার Name[bs]=Nadzornik fascikli @@ -78,7 +77,6 @@ X-KDE-Kded-autoload=false Comment=Monitors directories for changes Comment[ar]=يراقب التغيرات في المجلّدات -Comment[ast]=Monitoriza cambeos en carpetes Comment[bg]=Наблюдение на директории за промени Comment[bn]=বিভিন্ন ডিরেক্টরিতে কোন পরিবর্তন হচ্ছে কি না লক্ষ্য রাখে Comment[bs]=Nadgledanje izmjena u fasciklama | ||
[-] [+] | Changed | kio-extras-5.3.0.tar.xz/desktop/directory.trash ^ |
@@ -2,7 +2,6 @@ Encoding=UTF-8 Name=Trash Name[ar]=سلة المهملات -Name[ast]=Papelera Name[be@latin]=Śmietnica Name[bg]=Кошче Name[bn]=আবর্জনা @@ -83,7 +82,6 @@ Name[zh_TW]=資源回收筒 Comment=Contains removed files Comment[ar]=تحوي الملفات المزالة -Comment[ast]=Contién los ficheros desaniciaos Comment[be]=Утрымлівае выдаленыя файлы Comment[be@latin]=Zachoŭvaje vydalenyja fajły Comment[bg]=Съдържа премахнати файлове | ||
[-] [+] | Changed | kio-extras-5.3.0.tar.xz/doc/CMakeLists.txt ^ |
@@ -1,2 +1,2 @@ -add_subdirectory(kioslave) -add_subdirectory(kcontrol) +ecm_optional_add_subdirectory(kioslave) +ecm_optional_add_subdirectory(kcontrol) | ||
[-] [+] | Changed | kio-extras-5.3.0.tar.xz/fish/fish.protocol ^ |
@@ -16,7 +16,6 @@ Description=A kioslave for the FISH protocol Description[af]='n Kioslave vir die FISH protokol Description[ar]=خادم دخل وخرج كدي لبروتوكول فيش (FISH) لنقل الملفات -Description[ast]=Un kioslave pal protocolu FISH Description[be]=Kioslave для пратакола FISH Description[be@latin]=Słužba „kioslave” dla pratakoła FISH Description[bg]=Kioslave за протокола FISH | ||
[-] [+] | Changed | kio-extras-5.3.0.tar.xz/info/kde-info2html ^ |
@@ -63,7 +63,6 @@ qq(<link rel="stylesheet" href="help:/kdoctools5-common/kde-default.css" type="text/css"> $css_link <style type="text/css"><!-- .chapter { padding-right: 1em } --></style>); -my $LOGO_KDE = "<img src=\"help:/kdoctools5-common/kde_logo.png\" alt=\"KDE - The K Desktop Environment\" width=\"296\" height=\"79\" border=\"0\">"; # the use of a query should make sure it never conflicts with a "real" path my $BROWSE_BY_FILE_PATH = '/browse_by_file?special=yes'; | ||
[-] [+] | Changed | kio-extras-5.3.0.tar.xz/man/kmanpart.desktop ^ |
@@ -3,7 +3,6 @@ Comment=Embeddable Troff Viewer Comment[af]=Inlegbare Troff Kyker Comment[ar]=عارض نصوص Troff القابل للتضمين -Comment[ast]=Visor empotrable de Troff Comment[be]=Убудаваны праглядальнік Troff Comment[be@latin]=Unutrany prahladnik „Troff” Comment[bg]=Визуализатор за вграждане на Troff @@ -94,7 +93,6 @@ Name=KManPart Name[af]=KManPart Name[ar]=KManPart -Name[ast]=KManPart Name[be]=KManPart Name[be@latin]=KManPart Name[bg]=KManPart | ||
[-] [+] | Changed | kio-extras-5.3.0.tar.xz/mtp/mtp-network.desktop ^ |
@@ -2,13 +2,22 @@ Icon=multimedia-player Name=MTP Devices Name[ca]=Dispositius MTP +Name[cs]=Zařízení MTP Name[de]=MTP-Geräte +Name[el]=Συσκευές MTP Name[en_GB]=MTP Devices Name[es]=Dispositivos MTP Name[fi]=MTP-laitteet +Name[gl]=Dispositivos MTP +Name[hu]=MTP eszközök +Name[it]=Dispositivi MTP +Name[ko]=MTP 장치 +Name[nb]=MTP-enheter Name[nl]=MTP-apparaten Name[pl]=Urządzenia MTP +Name[pt]=Dispositivos MTP Name[pt_BR]=Dispositivos MTP +Name[ru]=Устройства MTP Name[sk]=Zariadenia MTP Name[sl]=Naprave MTP Name[sr]=МТП уређаји @@ -16,9 +25,11 @@ Name[sr@ijekavianlatin]=MTP uređaji Name[sr@latin]=MTP uređaji Name[sv]=MTP-enheter +Name[tr]=MTP Aygıtları Name[uk]=Пристрої MTP Name[x-test]=xxMTP Devicesxx Name[zh_CN]=MTP 设备 +Name[zh_TW]=MTP 裝置 Open=false Type=Link URL=mtp:/ | ||
[-] [+] | Changed | kio-extras-5.3.0.tar.xz/mtp/solid_mtp.desktop ^ |
@@ -10,6 +10,7 @@ Name[ar]=افتح بمدير الملفات Name[bg]=Отваряне с файлов мениджър Name[ca]=Obre amb el gestor de fitxers +Name[cs]=Otevřít ve správci souborů Name[csb]=Òtemkni w &menadzerze lopków Name[da]=Åbn med filhåndtering Name[de]=Mit Dateimanager öffnen @@ -20,9 +21,9 @@ Name[et]=Ava failihalduriga Name[eu]=Ireki fitxategi kudeatzailearekin Name[fi]=Avaa tiedostonhallinnassa -Name[fr]=Ouvrir dans le gestionnaire de fichiers Name[fy]=Iepenje mei triembehearder Name[ga]=Oscail le Bainisteoir na gComhad +Name[gl]=Abrir co xestor de ficheiros Name[gu]=ફાઇલ વ્યવસ્થાપક સાથે ખોલો Name[he]=פתיחה באמצעות מנהל הקבצים Name[hr]=Otvori pomoću preglednika datoteka @@ -32,15 +33,18 @@ Name[it]=Apri con il gestore dei file Name[kk]=Файл менеджерінде ашу Name[kn]=ಕಡತ ವ್ಯವಸ್ಥಾಪಕದೊಂದಿಗೆ ತೆರೆ +Name[ko]=파일 관리자로 열기 Name[mk]=Отвори со менаџер на датотеки Name[ml]=ഫയലുകളുടെ നടത്തിപ്പുകാരനില് തുറക്കുക Name[nb]=Åpne med filbehandler Name[nds]=Mit Dateipleger opmaken Name[nl]=Met bestandsbeheerder openen Name[pa]=ਫਾਈਲ ਮੈਨੇਜਰ ਨਾਲ ਖੋਲ੍ਹੋ -Name[pl]=Otwórz w menedżerze plików -Name[pt_BR]=Abrir com o gerenciador de arquivos +Name[pl]=Otwórz w przeglądarce plików +Name[pt]=Abrir com o Gestor de Ficheiros +Name[pt_BR]=Abrir com o Gerenciador de Arquivos Name[ro]=Deschide cu gestionarul de fișiere +Name[ru]=Открыть в диспетчере файлов Name[si]=ගොනු කළමණාකරු සමඟ ආරම්භ කරන්න Name[sk]=Otvoriť v správcovi súborov Name[sl]=Odpri v upravljalniku datotek @@ -51,6 +55,7 @@ Name[sv]=Öppna med filhanterare Name[tg]=Кушодан бо намоишгари Интернети &стандартӣ Name[th]=เปิดใช้งานผ่านเครื่องมือจัดการแฟ้ม +Name[tr]=Dosya yöneticisi ile aç Name[uk]=Відкрити за допомогою програми для керування файлами Name[x-test]=xxOpen with File Managerxx Name[zh_CN]=用文件浏览器打开 | ||
[-] [+] | Changed | kio-extras-5.3.0.tar.xz/network/ioslave/CMakeLists.txt ^ |
@@ -1,5 +1,3 @@ -project( kio_network ) - include_directories( ../network ) @@ -17,7 +15,7 @@ # qt5_add_dbus_interface( kio_network_SRCS ../kded/org.kde.network.xml networkdbusproxy ) add_library(kio_network MODULE ${kio_network_SRCS} ) -target_link_libraries( kio_network molletnetwork KF5::KIOCore ) +target_link_libraries( kio_network molletnetwork5 KF5::KIOCore ) set_target_properties(kio_network PROPERTIES OUTPUT_NAME "network") install( TARGETS kio_network DESTINATION ${PLUGIN_INSTALL_DIR}/kf5/kio) | ||
[-] [+] | Changed | kio-extras-5.3.0.tar.xz/network/ioslave/network.desktop ^ |
@@ -8,7 +8,6 @@ Name[af]=Netwerk Name[ar]=الشبكة Name[as]=নে'টৱৰ্ক -Name[ast]=Rede Name[be]=Сетка Name[be@latin]=Sietka Name[bg]=Мрежа | ||
[-] [+] | Changed | kio-extras-5.3.0.tar.xz/network/ioslave/network.protocol ^ |
@@ -9,7 +9,6 @@ Icon=network-workgroup Description=A kioslave to browse the network Description[ar]=خادم دخل وخرج كدي لتصفح الشبكة -Description[ast]=Un kioslave pa restolar la rede Description[bg]=Kioslave за разглеждане на мрежата Description[bn]=নেটওয়ার্ক ব্রাউজ করার জন্য একটি kioslave Description[bs]=U/I zahvat za pregledanje mreže | ||
[-] [+] | Changed | kio-extras-5.3.0.tar.xz/network/ioslave/virtualfolder_network.desktop ^ |
@@ -8,7 +8,6 @@ Name[af]=Netwerk Name[ar]=الشبكة Name[as]=নে'টৱৰ্ক -Name[ast]=Rede Name[be]=Сетка Name[be@latin]=Sietka Name[bg]=Мрежа | ||
[-] [+] | Changed | kio-extras-5.3.0.tar.xz/network/kded/CMakeLists.txt ^ |
@@ -1,5 +1,3 @@ -project( networkwatcher ) - include_directories( ../network ../ioslave @@ -14,7 +12,7 @@ add_library(kded_networkwatcher MODULE ${kded_networkwatcher_SRCS} ) -target_link_libraries( kded_networkwatcher KF5::DBusAddons KF5::KIOCore molletnetwork ) +target_link_libraries( kded_networkwatcher KF5::DBusAddons KF5::KIOCore molletnetwork5 ) install( TARGETS kded_networkwatcher DESTINATION ${PLUGIN_INSTALL_DIR} ) | ||
[-] [+] | Changed | kio-extras-5.3.0.tar.xz/network/kded/networkwatcher.desktop ^ |
@@ -7,7 +7,6 @@ X-KDE-Kded-load-on-demand=true Name=Network Watcher Name[ar]=مراقب الشبكة -Name[ast]=Visor de redes Name[bg]=Наблюдение на мрежата Name[bn]=নেটওয়ার্ক ওয়াচার Name[bs]=Nadzornik mreže @@ -79,7 +78,6 @@ Name[zh_TW]=網路監控器 Comment=Keeps track of the network and updates directory listings of the network:/ protocol Comment[ar]=يراقب الشبكة و يحدث مسارد مجلدات بروتوكول الشبكة (network:/) -Comment[ast]=Rexistra la rede y los anovamientos de llistaos de direutorios del protocolu network:/ Comment[bg]=Наблюдение на мрежата и обновяване на съответните списъци на мрежовия протокол Comment[bn]=নেটওয়ার্ক-এর ওপর লক্ষ্য রাখে এবং প্রয়োজনমত network:/ প্রোটোকল-এর ডিরেক্টরি তালিকা আপডেট করে Comment[bs]=Prati mrežu i ažurira ispise fascikli protokola network:/ @@ -95,6 +93,7 @@ Comment[es]=Sigue la pista de la red y actualiza los listados de directorios del protocolo network:/ Comment[et]=Hoiab võrgul silma peal ja uuendab protokolli network:/ kataloogide nimekirja Comment[eu]=Sarearen segimendua egiten du eta network:/ protokoloaren direktorio-zerrendak eguneratzen ditu +Comment[fa]=شبکه را میپاید و سیاههی پوشههای شبکه روبرو را به روز میکند:/ protocol Comment[fi]=Pitää kirjaa verkosta ja päivittää network:/-yhteyskäytännön kansioluettelot Comment[fr]=Conserve des enregistrements du réseau et met à jour les contenus des dossiers pour le protocole « network:/ » Comment[fy]=Hâld de netwurk en fernijings triemtafel listen fan it network:/ protocol yn de gaten | ||
[-] [+] | Changed | kio-extras-5.3.0.tar.xz/network/network/CMakeLists.txt ^ |
@@ -1,5 +1,3 @@ -project( molletnetwork ) - set(HAVE_SLP ${SLP_FOUND}) configure_file( config-slp.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-slp.h ) @@ -38,7 +36,7 @@ networkdbus.cpp ) -set( molletnetwork_LIB_SRCS +set( molletnetwork5_LIB_SRCS ${netsystemdriver_SRCS} # ${slpnetworkbuilder_SRCS} ${upnpnetworkbuilder_SRCS} @@ -53,8 +51,8 @@ netservice.cpp ) -add_library( molletnetwork SHARED ${molletnetwork_LIB_SRCS} ) -target_link_libraries( molletnetwork +add_library( molletnetwork5 SHARED ${molletnetwork5_LIB_SRCS} ) +target_link_libraries( molletnetwork5 PUBLIC KF5::DNSSD Qt5::Network @@ -62,8 +60,8 @@ KF5::KDELibs4Support # KSharedPtr ) if(SLP_FOUND) - target_link_libraries( molletnetwork PRIVATE ${SLP_LIBRARIES} ) + target_link_libraries( molletnetwork5 PRIVATE ${SLP_LIBRARIES} ) endif() -set_target_properties( molletnetwork PROPERTIES VERSION ${PROJECT_VERSION} SOVERSION ${PROJECT_VERSION_MAJOR} ) +set_target_properties( molletnetwork5 PROPERTIES VERSION ${PROJECT_VERSION} SOVERSION ${PROJECT_VERSION_MAJOR} ) -install( TARGETS molletnetwork ${INSTALL_TARGETS_DEFAULT_ARGS} LIBRARY NAMELINK_SKIP ) +install( TARGETS molletnetwork5 ${INSTALL_TARGETS_DEFAULT_ARGS} LIBRARY NAMELINK_SKIP ) | ||
[-] [+] | Changed | kio-extras-5.3.0.tar.xz/recentdocuments/recentdocumentsnotifier.desktop ^ |
@@ -1,7 +1,6 @@ [Desktop Entry] Type=Service Name=Recent Document Watcher -Name[ast]=Visor de documentos recientes Name[bg]=Следене на скорошни документи Name[bn]=সম্প্রতি ব্যবহৃত নথী ওয়াচার Name[bs]=Pregled novijih dokumenata | ||
[-] [+] | Changed | kio-extras-5.3.0.tar.xz/sftp/kio_sftp.cpp ^ |
@@ -242,6 +242,18 @@ qCDebug(KIO_SMTP_LOG) << "[" << function << "] (" << priority << ") " << buffer; } +void sftpProtocol::virtual_hook(int id, void *data) +{ + switch(id) { + case SlaveBase::GetFileSystemFreeSpace: { + QUrl *url = static_cast<QUrl *>(data); + fileSystemFreeSpace(*url); + } break; + default: + SlaveBase::virtual_hook(id, data); + } +} + int sftpProtocol::authenticateKeyboardInteractive(AuthInfo &info) { int err = ssh_userauth_kbdint(mSession, NULL, NULL); @@ -2250,3 +2262,31 @@ mPublicKeyAuthInfo = 0; } } + +void sftpProtocol::fileSystemFreeSpace(const QUrl& url) +{ + qCDebug(KIO_SMTP_LOG) << "file system free space of" << url; + + if (!sftpLogin()) { + return; + } + + if (sftp_extension_supported(mSftp, "statvfs@openssh.com", "2") == 0) { + return; + } + + const QByteArray path = url.path().toUtf8(); + + sftp_statvfs_t statvfs = sftp_statvfs(mSftp, path.constData()); + if (statvfs == nullptr) { + reportError(url, sftp_get_error(mSftp)); + return; + } + + setMetaData(QString::fromLatin1("total"), QString::number(statvfs->f_frsize * statvfs->f_blocks)); + setMetaData(QString::fromLatin1("available"), QString::number(statvfs->f_frsize * statvfs->f_bavail)); + + sftp_statvfs_free(statvfs); + + finished(); +} | ||
[-] [+] | Changed | kio-extras-5.3.0.tar.xz/sftp/kio_sftp.h ^ |
@@ -76,6 +76,9 @@ void log_callback(int priority, const char *function, const char *buffer, void *userdata); +protected: + void virtual_hook(int id, void *data) Q_DECL_OVERRIDE; + private: // Private variables /** True if ioslave is connected to sftp server. */ bool mConnected; @@ -208,6 +211,8 @@ StatusCode sftpCopyGet(const KUrl& url, const QString& src, int permissions, KIO::JobFlags flags, int& errorCode); StatusCode sftpCopyPut(const KUrl& url, const QString& dest, int permissions, KIO::JobFlags flags, int& errorCode); + + void fileSystemFreeSpace(const QUrl& url); // KF6 TODO: Once a virtual fileSystemFreeSpace method in SlaveBase exists, override it }; #endif | ||
[-] [+] | Changed | kio-extras-5.3.0.tar.xz/sftp/sftp.protocol ^ |
@@ -19,7 +19,6 @@ Description=A kioslave for sftp Description[af]='n Kioslave vir sftp Description[ar]=خادم دخل وخرج كدي SFTP -Description[ast]=Un kioslave pa sftp Description[be]=Kioslave для sftp Description[be@latin]=Słužba „kioslave” dla SFTP Description[bg]=kioslave за sftp | ||
[-] [+] | Changed | kio-extras-5.3.0.tar.xz/smb/smb-network.desktop ^ |
@@ -3,7 +3,6 @@ Name=Samba Shares Name[af]=Samba Hulpbronne Name[ar]=مشاركات السامبا -Name[ast]=Comparticiones Samba Name[be]=Агульныя тэчкі Samba Name[be@latin]=Supolnyja resursy „Samba” Name[bg]=Ресурси на Samba | ||
[-] [+] | Changed | kio-extras-5.3.0.tar.xz/thumbnail/CMakeLists.txt ^ |
@@ -68,7 +68,7 @@ ########### next target ############### set(jpegthumbnail_PART_SRCS jpegcreator.cpp) -kconfig_add_kcfg_files(jpegthumbnail_PART_SRCS jpegcreatorsettings.kcfgc) +kconfig_add_kcfg_files(jpegthumbnail_PART_SRCS jpegcreatorsettings5.kcfgc) add_library(jpegthumbnail MODULE ${jpegthumbnail_PART_SRCS}) target_link_libraries(jpegthumbnail @@ -91,7 +91,7 @@ target_link_libraries(jpegthumbnail ${EXIV2_LIBRARIES}) endif () -install(FILES jpegcreatorsettings.kcfg DESTINATION ${KCFG_INSTALL_DIR}) +install(FILES jpegcreatorsettings5.kcfg DESTINATION ${KCFG_INSTALL_DIR}) install(TARGETS jpegthumbnail DESTINATION ${PLUGIN_INSTALL_DIR}) ########### next target ############### | ||
[-] [+] | Changed | kio-extras-5.3.0.tar.xz/thumbnail/comicbookthumbnail.desktop ^ |
@@ -3,7 +3,6 @@ Type=Service Name=Comic Books Name[ar]=الكتب الكاريكاتوريّة -Name[ast]=Comics Name[bg]=Комикси Name[bn]=কমিক্স বই Name[bs]=Stripovi | ||
[-] [+] | Changed | kio-extras-5.3.0.tar.xz/thumbnail/cursorthumbnail.desktop ^ |
@@ -3,7 +3,6 @@ Name=Cursor Files Name[af]=Muis wyser Lêers Name[ar]=ملفات المؤشرات -Name[ast]=Ficheros de cursores Name[be]=Файлы курсораў Name[be@latin]=Fajły kursoraŭ Name[bg]=Файлове с показалци на мишката | ||
[-] [+] | Changed | kio-extras-5.3.0.tar.xz/thumbnail/desktopthumbnail.desktop ^ |
@@ -2,7 +2,6 @@ Type=Service Name=Desktop Files Name[ar]=ملفات سطح المكتب -Name[ast]=Ficheros d'escritoriu Name[bg]=Файлове на работния плот Name[bn]=ডেস্কটপ ফাইল Name[bs]=Datoteke površi | ||
[-] [+] | Changed | kio-extras-5.3.0.tar.xz/thumbnail/directorythumbnail.desktop ^ |
@@ -12,6 +12,7 @@ Name[en_GB]=Folders Name[es]=Carpetas Name[eu]=Karpetak +Name[fa]=پوشه Name[fi]=Kansiot Name[fr]=Dossiers Name[gl]=Cartafoles @@ -46,6 +47,7 @@ Name[tr]=Klasörler Name[ug]=قىسقۇچلار Name[uk]=Теки +Name[vi]=Thư mục Name[wa]=Ridants Name[x-test]=xxFoldersxx Name[zh_CN]=文件夹 | ||
[-] [+] | Changed | kio-extras-5.3.0.tar.xz/thumbnail/djvuthumbnail.desktop ^ |
@@ -3,7 +3,6 @@ Name=DjVu Files Name[af]=DjVu Lêers Name[ar]=DjVu ملفات -Name[ast]=Ficheros DjVu Name[be]=DjVu файлы Name[be@latin]=Fajły DjVu Name[bg]=DjVu файлове | ||
[-] [+] | Changed | kio-extras-5.3.0.tar.xz/thumbnail/exrthumbnail.desktop ^ |
@@ -3,7 +3,6 @@ Name=EXR Images Name[af]=EXR Beelde Name[ar]=EXR صور -Name[ast]=Imáxenes EXR Name[be]=Відарысы EXR Name[be@latin]=Vyjavy EXR Name[bg]=EXR образи | ||
[-] [+] | Changed | kio-extras-5.3.0.tar.xz/thumbnail/htmlthumbnail.desktop ^ |
@@ -3,7 +3,6 @@ Name=HTML Files Name[af]=HTML Lêers Name[ar]=HTML ملفات -Name[ast]=Ficheros HTML Name[be]=Файлы HTML Name[be@latin]=Fajły HTML Name[bg]=HTML файлове | ||
[-] [+] | Changed | kio-extras-5.3.0.tar.xz/thumbnail/imagethumbnail.desktop ^ |
@@ -2,7 +2,6 @@ Type=Service Name=Images (GIF, PNG, BMP, ...) Name[ar]=صور (GIF, PNG, BMP, ...) -Name[ast]=Imáxenes (GIF, PNG, BMP...) Name[bg]=Изображения (GIF, PNG, BMP, ...) Name[bn]=ছবি (GIF, PNG, BMP, ...) Name[bs]=Slike (GIF, PNG, BMP...) | ||
[-] [+] | Changed | kio-extras-5.3.0.tar.xz/thumbnail/jpegcreator.cpp ^ |
@@ -21,7 +21,7 @@ #include <cstdio> #include <csetjmp> -#include "jpegcreatorsettings.h" +#include "jpegcreatorsettings5.h" #include <QCheckBox> #include <QFile> #include <QImage> | ||
[-] [+] | Changed | kio-extras-5.3.0.tar.xz/thumbnail/jpegcreatorsettings5.kcfg ^ |
(renamed from thumbnail/jpegcreatorsettings.kcfg) | ||
[-] [+] | Added | kio-extras-5.3.0.tar.xz/thumbnail/jpegcreatorsettings5.kcfgc ^ |
@@ -0,0 +1,4 @@ +File=jpegcreatorsettings5.kcfg +ClassName=JpegCreatorSettings +Singleton=true +Mutators=true | ||
[-] [+] | Changed | kio-extras-5.3.0.tar.xz/thumbnail/jpegthumbnail.desktop ^ |
@@ -2,7 +2,6 @@ Type=Service Name=JPEG Images Name[ar]=صور JPEG -Name[ast]=Imáxenes JPEG Name[bg]=Изображения JPEG Name[bn]=JPEG ছবি Name[bs]=JPEG slike | ||
[-] [+] | Changed | kio-extras-5.3.0.tar.xz/thumbnail/svgthumbnail.desktop ^ |
@@ -2,7 +2,6 @@ Type=Service Name=SVG Images Name[ar]=صور SVG -Name[ast]=Imáxenes SVG Name[bg]=Изображения SVG Name[bn]=SVG ছবি Name[bs]=SVG slike | ||
[-] [+] | Changed | kio-extras-5.3.0.tar.xz/thumbnail/textthumbnail.desktop ^ |
@@ -3,7 +3,6 @@ Name=Text Files Name[af]=Tekslêers Name[ar]=ملفات نصية -Name[ast]=Ficheros de testu Name[be]=Тэкставыя файлы Name[be@latin]=Tekstavyja fajły Name[bg]=Текстови файлове | ||
[-] [+] | Changed | kio-extras-5.3.0.tar.xz/thumbnail/thumbcreator.desktop ^ |
@@ -4,7 +4,6 @@ Comment=Thumbnail Handler Comment[af]=Duimnaelhandteerder Comment[ar]=مداوِل المصغرات -Comment[ast]=Remanar miniatures Comment[be]=Апрацоўшчык мініяцюраў Comment[be@latin]=Stvareńnie padhladaŭ Comment[bg]=Манипулатор на мини изображения | ||
[-] [+] | Changed | kio-extras-5.3.0.tar.xz/thumbnail/thumbnail.cpp ^ |
@@ -31,43 +31,38 @@ #include <sys/shm.h> #endif -#include <QtWidgets/QApplication> -#include <QtCore/QBuffer> -#include <QtCore/QFile> -#include <QtGui/QBitmap> -#include <QtCore/QCryptographicHash> -//#include <qcryptographichash.h> -#include <QtGui/QImage> -#include <QtGui/QPainter> -#include <QtGui/QPixmap> - -//#include <kcodecs.h> +#include <QApplication> +#include <QBuffer> +#include <QFile> +#include <QSaveFile> +#include <QBitmap> +#include <QCryptographicHash> +#include <QImage> +#include <QPainter> +#include <QPixmap> #include <QUrl> -//#include <kapplication.h> -#include <kcmdlineargs.h> +#include <QMimeType> +#include <QMimeDatabase> +#include <QLibrary> +#include <QTemporaryFile> +#include <QDebug> + +#include <KLocalizedString> +#include <KSharedConfig> +#include <KConfigGroup> +#include <KMimeTypeTrader> +#include <KServiceTypeTrader> +#include <KPluginLoader> + #include <kaboutdata.h> -#include <kglobal.h> #include <kiconloader.h> -#include <kmimetype.h> -#include <klibrary.h> -#include <QDebug> -#include <kservice.h> -#include <kservicetype.h> -#include <kservicetypetrader.h> -#include <kmimetypetrader.h> -#include <kstandarddirs.h> -#include <ktemporaryfile.h> -#include <kfilemetainfo.h> -#include <klocale.h> #include <kde_file.h> -#include <config-runtime.h> // For HAVE_NICE #include <kio/thumbcreator.h> #include <kio/thumbsequencecreator.h> -#include <kconfiggroup.h> #include <iostream> -#include <QtCore/QDirIterator> +#include <QDirIterator> // Use correctly KComponentData instead of KApplication (but then no QPixmap) #undef USE_KINSTANCE @@ -171,7 +166,9 @@ if (info.isDir()) { m_mimeType = "inode/directory"; } else { - m_mimeType = KMimeType::findByUrl(QUrl(info.filePath()))->name(); + const QMimeDatabase db; + + m_mimeType = db.mimeTypeForUrl(QUrl(info.filePath())).name(); } qDebug() << "Guessing MIME Type:" << m_mimeType; @@ -214,29 +211,8 @@ QImage img; KConfigGroup group( KSharedConfig::openConfig(), "PreviewSettings" ); + bool kfmiThumb = false; // TODO Figure out if we can use KFileMetadata as a last resource - // ### KFMI - bool kfmiThumb = false; - if (group.readEntry( "UseFileThumbnails", true)) { - KService::Ptr service = - KMimeTypeTrader::self()->preferredService( m_mimeType, "KFilePlugin"); - - if (service && service->isValid() && - service->property("SupportsThumbnail").toBool()) { - // was: KFileMetaInfo info(url.path(), m_mimeType, KFileMetaInfo::Thumbnail); - // but m_mimeType and WhatFlags are now unused in KFileMetaInfo, and not present in the - // call that takes a QUrl - KFileMetaInfo info(url); - if (info.isValid()) { - KFileMetaInfoItem item = info.item("thumbnail"); - if (item.isValid() && item.value().type() == QVariant::Image) { - img = item.value().value<QImage>(); - qDebug() << "using KFMI for the thumbnail\n"; - kfmiThumb = true; - } - } - } - } ThumbCreator::Flags flags = ThumbCreator::None; if (!kfmiThumb) { @@ -359,7 +335,7 @@ } // Keep in sync with kdelibs/kio/kio/previewjob.cpp stream << img.width() << img.height() << quint8(img.format()); - memcpy(shmaddr, img.bits(), img.numBytes()); + memcpy(shmaddr, img.bits(), img.byteCount()); shmdt((char*)shmaddr); mimeType("application/octet-stream"); data(imgData); @@ -485,10 +461,8 @@ // only as small overlay, use no margins) //Use the current (custom) folder icon - QUrl tempDirectory = directory; - tempDirectory.setScheme("file"); //iconNameForUrl will not work with the "thumbnail:/" scheme - //QString iconName = KMimeType::findByUrl(tempDirectory) - QString iconName = "plasma"; // FIXME + const QMimeDatabase db; + const QString iconName = db.mimeTypeForName("inode/directory").iconName(); const QPixmap folder = KIconLoader::global()->loadMimeTypeIcon(iconName, KIconLoader::Desktop, @@ -650,9 +624,9 @@ if (!creator) { // Don't use KPluginFactory here, this is not a QObject and // neither is ThumbCreator - KLibrary library(plugin); + QLibrary library(KPluginLoader::findPlugin((plugin))); if (library.load()) { - newCreator create = (newCreator)library.resolveFunction("new_creator"); + newCreator create = (newCreator)library.resolve("new_creator"); if (create) { creator = create(); } @@ -670,9 +644,11 @@ const QImage ThumbnailProtocol::getIcon() { + const QMimeDatabase db; + ///@todo Can we really do this? It doesn't seem to respect the size if (!m_iconDict.contains(m_mimeType)) { // generate it - QImage icon( KIconLoader::global()->loadMimeTypeIcon( KMimeType::mimeType(m_mimeType)->iconName(), KIconLoader::Desktop, m_iconSize ).toImage() ); + QImage icon(KIconLoader::global()->loadMimeTypeIcon(db.mimeTypeForName(m_mimeType).iconName(), KIconLoader::Desktop, m_iconSize).toImage()); icon = icon.convertToFormat(QImage::Format_ARGB32); m_iconDict.insert(m_mimeType, icon); @@ -693,8 +669,9 @@ << "videopreview"); } - const QUrl fileName(filePath); - const QString subPlugin = pluginForMimeType(KMimeType::findByUrl(fileName)->name()); + const QMimeDatabase db; + const QUrl fileUrl = QUrl::fromLocalFile(filePath); + const QString subPlugin = pluginForMimeType(db.mimeTypeForUrl(fileUrl).name()); if (subPlugin.isEmpty() || !m_enabledPlugins.contains(subPlugin)) { return false; } @@ -710,48 +687,45 @@ // 128 x 128 or 256 x 256 pixels int cacheSize = 0; QCryptographicHash md5(QCryptographicHash::Md5); - md5.addData(QFile::encodeName(fileName.url())); - const QString thumbName = QFile::encodeName(md5.result().toHex()) + ".png"; + md5.addData(QFile::encodeName(fileUrl.toLocalFile())); + const QString thumbName = QFile::encodeName(md5.result().toHex()).append(".png"); if (m_thumbBasePath.isEmpty()) { m_thumbBasePath = QStandardPaths::writableLocation(QStandardPaths::GenericCacheLocation) + QLatin1String("/thumbnails/"); - KStandardDirs::makeDir(m_thumbBasePath + "normal/", 0700); - KStandardDirs::makeDir(m_thumbBasePath + "large/", 0700); + QDir basePath(m_thumbBasePath); + basePath.mkpath("normal/"); + QFile::setPermissions(basePath.absoluteFilePath("normal"), QFile::ReadOwner | QFile::WriteOwner | QFile::ExeOwner); + basePath.mkpath("large/"); + QFile::setPermissions(basePath.absoluteFilePath("large"), QFile::ReadOwner | QFile::WriteOwner | QFile::ExeOwner); } - QString thumbPath = m_thumbBasePath; + QDir thumbPath(m_thumbBasePath); if ((segmentWidth <= 128) && (segmentHeight <= 128)) { cacheSize = 128; - thumbPath += "normal/"; + thumbPath.cd("normal"); } else { cacheSize = 256; - thumbPath += "large/"; + thumbPath.cd("large"); } - if (!thumbnail.load(thumbPath + thumbName)) { | ||
[-] [+] | Changed | kio-extras-5.3.0.tar.xz/thumbnail/windowsexethumbnail.desktop ^ |
@@ -3,7 +3,6 @@ Type=Service Name=Microsoft Windows Executables Name[ar]=ملفات تنفيذية لمايكروسوفت ويندوز -Name[ast]=Executables de Microsoft Windows Name[bg]=Програми за Microsoft Windows Name[bn]=মাইক্রোসফ্ট উইন্ডোজ একজিকিউটেবল Name[bs]=Izvršni datoteke s Vindouza | ||
[-] [+] | Changed | kio-extras-5.3.0.tar.xz/thumbnail/windowsimagethumbnail.desktop ^ |
@@ -3,7 +3,6 @@ Type=Service Name=Microsoft Windows Images Name[ar]=صور لمايكروسوفت ويندوز -Name[ast]=Imáxenes de Microsoft Windows Name[bg]=Изображения за Microsoft Windows Name[bn]=মাইক্রোসফ্ট উইন্ডোজ ইমেজ Name[bs]=Slike s Vindouza | ||
[-] [+] | Changed | kio-extras.yaml ^ |
@@ -1,5 +1,5 @@ Name : kio-extras -Version : 5.2.0 +Version : 5.3.0 Release : 1 Group : System/Base License : GPLv2+ |