From kde-commits Tue Jun 30 20:45:32 2015 From: Gilles Caulier Date: Tue, 30 Jun 2015 20:45:32 +0000 To: kde-commits Subject: [kipi-plugins/frameworks] /: initial port of ImageShack tool to KF5. Message-Id: X-MARC-Message: https://marc.info/?l=kde-commits&m=143569715009871 Git commit 84b0136434c97d43f409fbc4898169d79e11cc5a by Gilles Caulier. Committed on 30/06/2015 at 20:42. Pushed by cgilles into branch 'frameworks'. initial port of ImageShack tool to KF5. Compile and link as well. Plugin have been renamed from ImageShack Export to ImageShack to be more ge= neric if later, import feature is add. TODO: - KDE4Support still in use and must be ported to pure KF5 - Factoring must be done with new libkipiplugins API CCMAIL: shouryasgupta@gmail.com CCMAIL: aspotashev@gmail.com M +1 -1 CMakeLists.txt D +0 -33 PORT.KF5/FACTORIZE/imageshackexport/CMakeLists.txt M +1 -1 README A +36 -0 imageshack/CMakeLists.txt R +0 -0 imageshack/Messages.sh [from: PORT.KF5/FACTORIZE/imageshacke= xport/Messages.sh - 100% similarity] R +0 -0 imageshack/README [from: PORT.KF5/FACTORIZE/imageshackexport= /README - 100% similarity] R +0 -0 imageshack/TODO [from: PORT.KF5/FACTORIZE/imageshackexport/T= ODO - 100% similarity] R +1 -1 imageshack/icons/CMakeLists.txt [from: PORT.KF5/FACTORIZE/im= ageshackexport/icons/CMakeLists.txt - 076% similarity] R +- -- imageshack/icons/hi32-apps-kipi-imageshack.png [from: PORT.K= F5/FACTORIZE/imageshackexport/icons/hi32-apps-kipi-imageshack.png - 100% si= milarity] R +- -- imageshack/icons/hi48-apps-kipi-imageshack.png [from: PORT.K= F5/FACTORIZE/imageshackexport/icons/hi48-apps-kipi-imageshack.png - 100% si= milarity] R +- -- imageshack/icons/hi64-apps-kipi-imageshack.png [from: PORT.K= F5/FACTORIZE/imageshackexport/icons/hi64-apps-kipi-imageshack.png - 100% si= milarity] R +7 -4 imageshack/imageshack.cpp [from: PORT.KF5/FACTORIZE/imagesha= ckexport/imageshack.cpp - 096% similarity] R +2 -2 imageshack/imageshack.h [from: PORT.KF5/FACTORIZE/imageshack= export/imageshack.h - 096% similarity] R +2 -3 imageshack/imageshackitem.h [from: PORT.KF5/FACTORIZE/images= hackexport/imageshackitem.h - 094% similarity] R +10 -8 imageshack/imageshacktalker.cpp [from: PORT.KF5/FACTORIZE/im= ageshackexport/imageshacktalker.cpp - 098% similarity] R +2 -2 imageshack/imageshacktalker.h [from: PORT.KF5/FACTORIZE/imag= eshackexport/imageshacktalker.h - 097% similarity] R +12 -10 imageshack/imageshackwidget.cpp [from: PORT.KF5/FACTORIZE/im= ageshackexport/imageshackwidget.cpp - 097% similarity] R +2 -2 imageshack/imageshackwidget.h [from: PORT.KF5/FACTORIZE/imag= eshackexport/imageshackwidget.h - 097% similarity] R +18 -16 imageshack/imageshackwindow.cpp [from: PORT.KF5/FACTORIZE/im= ageshackexport/imageshackwindow.cpp - 095% similarity] R +3 -3 imageshack/imageshackwindow.h [from: PORT.KF5/FACTORIZE/imag= eshackexport/imageshackwindow.h - 095% similarity] R +4 -4 imageshack/kipiplugin_imageshack.desktop.cmake.in [from: POR= T.KF5/FACTORIZE/imageshackexport/kipiplugin_imageshackexport.desktop.cmake.= in - 096% similarity] R +2 -2 imageshack/kipiplugin_imageshackui.rc [from: PORT.KF5/FACTOR= IZE/imageshackexport/kipiplugin_imageshackexportui.rc - 070% similarity] R +8 -4 imageshack/mpform.cpp [from: PORT.KF5/FACTORIZE/imageshackex= port/mpform.cpp - 094% similarity] R +2 -2 imageshack/mpform.h [from: PORT.KF5/FACTORIZE/imageshackexpo= rt/mpform.h - 094% similarity] R +21 -22 imageshack/plugin_imageshack.cpp [from: PORT.KF5/FACTORIZE/i= mageshackexport/plugin_imageshackexport.cpp - 070% similarity] R +9 -9 imageshack/plugin_imageshack.h [from: PORT.KF5/FACTORIZE/ima= geshackexport/plugin_imageshackexport.h - 075% similarity] http://commits.kde.org/kipi-plugins/84b0136434c97d43f409fbc4898169d79e11cc5a diff --git a/CMakeLists.txt b/CMakeLists.txt index 6115e8e..51f7607 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -409,7 +409,7 @@ if(KF5Kipi_FOUND) # add_subdirectory(picasawebexport) # add_subdirectory(smug) # add_subdirectory(rajceexport) -# add_subdirectory(imageshackexport) + add_subdirectory(imageshack) # # if(QCA2_FOUND) # add_subdirectory(shwup) diff --git a/PORT.KF5/FACTORIZE/imageshackexport/CMakeLists.txt b/PORT.KF5/= FACTORIZE/imageshackexport/CMakeLists.txt deleted file mode 100644 index 4f89543..0000000 --- a/PORT.KF5/FACTORIZE/imageshackexport/CMakeLists.txt +++ /dev/null @@ -1,33 +0,0 @@ -# -# Copyright (c) 2010-2014, Gilles Caulier, -# -# Redistribution and use is allowed according to the terms of the BSD lice= nse. -# For details see the accompanying COPYING-CMAKE-SCRIPTS file. - -subdirs(icons) - -set(kipiplugin_imageshackexport_PART_SRCS - plugin_imageshackexport.cpp - imageshack.cpp - imageshackwindow.cpp - imageshackwidget.cpp - imageshacktalker.cpp - mpform.cpp - ) - -add_library(kipiplugin_imageshackexport MODULE ${kipiplugin_imageshackexpo= rt_PART_SRCS}) - -target_link_libraries(kipiplugin_imageshackexport - KF5::KDcraw - KF5::Kipi - KF5::KExiv2 - KF5::KIOCore - = - KF5kipiplugins - ) - -configure_file(kipiplugin_imageshackexport.desktop.cmake.in ${CMAKE_CURREN= T_BINARY_DIR}/kipiplugin_imageshackexport.desktop) - -install(FILES ${CMAKE_CURRENT_BINARY_DIR}/kipiplugin_imageshackexport.de= sktop DESTINATION ${SERVICES_INSTALL_DIR}) -install(TARGETS kipiplugin_imageshackexport = DESTINATION ${PLUGIN_INSTALL_DIR}) -install(FILES kipiplugin_imageshackexportui.rc = DESTINATION ${KXMLGUI_INSTALL_DIR}/kipi) diff --git a/README b/README index ff108cc..0aa83ea 100644 --- a/README +++ b/README @@ -48,7 +48,7 @@ MediaWiki : A tool to export images to Mediawiki= based web service (htt RajceExport : A tool to export images to Rajce web service (http://= www.rajce.idnes.cz). Vkontakte : A tool to export images to VKontakte web service (htt= p://www.vkontakte.ru) PhotoLayoutEditor : A tool to assemble images together. -ImageShackExport : A tool to export images to ImageShack web service (ht= tp://imageshack.us) +ImageShack : A tool to export images to ImageShack web service (ht= tp://imageshack.us) ImgurExport : A tool to export images to ImgUr web service (http://= imgur.com) DLNAExport : A tool to export collection on DLNA network service (= http://www.dlna.org). Panorama : A tool to assemble panoramic photo automatically. diff --git a/imageshack/CMakeLists.txt b/imageshack/CMakeLists.txt new file mode 100644 index 0000000..739b3a4 --- /dev/null +++ b/imageshack/CMakeLists.txt @@ -0,0 +1,36 @@ +# +# Copyright (c) 2010-2015, Gilles Caulier, +# +# Redistribution and use is allowed according to the terms of the BSD lice= nse. +# For details see the accompanying COPYING-CMAKE-SCRIPTS file. + +subdirs(icons) + +add_definitions(-DTRANSLATION_DOMAIN=3D\"kipiplugin_imageshack\") + + +set(kipiplugin_imageshack_PART_SRCS + imageshack.cpp + mpform.cpp + plugin_imageshack.cpp + imageshacktalker.cpp + imageshackwidget.cpp + imageshackwindow.cpp + ) + +add_library(kipiplugin_imageshack MODULE ${kipiplugin_imageshack_PART_SRCS= }) + +target_link_libraries(kipiplugin_imageshack + KF5::KDcraw + KF5::Kipi + KF5::KExiv2 + KF5::KIOCore + + KF5kipiplugins + ) + +configure_file(kipiplugin_imageshack.desktop.cmake.in ${CMAKE_CURRENT_BINA= RY_DIR}/kipiplugin_imageshack.desktop) + +install(FILES ${CMAKE_CURRENT_BINARY_DIR}/kipiplugin_imageshack.desktop = DESTINATION ${SERVICES_INSTALL_DIR}) +install(TARGETS kipiplugin_imageshack = DESTINATION ${PLUGIN_INSTALL_DIR}) +install(FILES kipiplugin_imageshackui.rc = DESTINATION ${KXMLGUI_INSTALL_DIR}/kipi) diff --git a/PORT.KF5/FACTORIZE/imageshackexport/Messages.sh b/imageshack/M= essages.sh similarity index 100% rename from PORT.KF5/FACTORIZE/imageshackexport/Messages.sh rename to imageshack/Messages.sh diff --git a/PORT.KF5/FACTORIZE/imageshackexport/README b/imageshack/README similarity index 100% rename from PORT.KF5/FACTORIZE/imageshackexport/README rename to imageshack/README diff --git a/PORT.KF5/FACTORIZE/imageshackexport/TODO b/imageshack/TODO similarity index 100% rename from PORT.KF5/FACTORIZE/imageshackexport/TODO rename to imageshack/TODO diff --git a/PORT.KF5/FACTORIZE/imageshackexport/icons/CMakeLists.txt b/ima= geshack/icons/CMakeLists.txt similarity index 76% rename from PORT.KF5/FACTORIZE/imageshackexport/icons/CMakeLists.txt rename to imageshack/icons/CMakeLists.txt index 1b3147f..6965180 100644 --- a/PORT.KF5/FACTORIZE/imageshackexport/icons/CMakeLists.txt +++ b/imageshack/icons/CMakeLists.txt @@ -1,5 +1,5 @@ # -# Copyright (c) 2010-2014, Gilles Caulier, +# Copyright (c) 2010-2015, Gilles Caulier, # # Redistribution and use is allowed according to the terms of the BSD lice= nse. # For details see the accompanying COPYING-CMAKE-SCRIPTS file. diff --git a/PORT.KF5/FACTORIZE/imageshackexport/icons/hi32-apps-kipi-image= shack.png b/imageshack/icons/hi32-apps-kipi-imageshack.png similarity index 100% rename from PORT.KF5/FACTORIZE/imageshackexport/icons/hi32-apps-kipi-images= hack.png rename to imageshack/icons/hi32-apps-kipi-imageshack.png diff --git a/PORT.KF5/FACTORIZE/imageshackexport/icons/hi48-apps-kipi-image= shack.png b/imageshack/icons/hi48-apps-kipi-imageshack.png similarity index 100% rename from PORT.KF5/FACTORIZE/imageshackexport/icons/hi48-apps-kipi-images= hack.png rename to imageshack/icons/hi48-apps-kipi-imageshack.png diff --git a/PORT.KF5/FACTORIZE/imageshackexport/icons/hi64-apps-kipi-image= shack.png b/imageshack/icons/hi64-apps-kipi-imageshack.png similarity index 100% rename from PORT.KF5/FACTORIZE/imageshackexport/icons/hi64-apps-kipi-images= hack.png rename to imageshack/icons/hi64-apps-kipi-imageshack.png diff --git a/PORT.KF5/FACTORIZE/imageshackexport/imageshack.cpp b/imageshac= k/imageshack.cpp similarity index 96% rename from PORT.KF5/FACTORIZE/imageshackexport/imageshack.cpp rename to imageshack/imageshack.cpp index ac2a23f..bc64521 100644 --- a/PORT.KF5/FACTORIZE/imageshackexport/imageshack.cpp +++ b/imageshack/imageshack.cpp @@ -25,16 +25,19 @@ // Qt includes = #include +#include = // KDE includes = -#include #include #include -#include "kipiplugins_debug.h" #include = -namespace KIPIImageshackExportPlugin +// Locla includes + +#include "kipiplugins_debug.h" + +namespace KIPIImageshackPlugin { = Imageshack::Imageshack() @@ -118,4 +121,4 @@ void Imageshack::saveSettings() config.sync(); } = -} // namespace KIPIImageshackExportPlugin +} // namespace KIPIImageshackPlugin diff --git a/PORT.KF5/FACTORIZE/imageshackexport/imageshack.h b/imageshack/= imageshack.h similarity index 96% rename from PORT.KF5/FACTORIZE/imageshackexport/imageshack.h rename to imageshack/imageshack.h index 5633e06..bc29a70 100644 --- a/PORT.KF5/FACTORIZE/imageshackexport/imageshack.h +++ b/imageshack/imageshack.h @@ -27,7 +27,7 @@ = #include = -namespace KIPIImageshackExportPlugin +namespace KIPIImageshackPlugin { = class Imageshack @@ -71,6 +71,6 @@ private: = }; // Imageshack class = -} // KIPIImageshackExportPlugin +} // KIPIImageshackPlugin = #endif // IMAGESHACK_H diff --git a/PORT.KF5/FACTORIZE/imageshackexport/imageshackitem.h b/imagesh= ack/imageshackitem.h similarity index 94% rename from PORT.KF5/FACTORIZE/imageshackexport/imageshackitem.h rename to imageshack/imageshackitem.h index b629d3c..6b5af24 100644 --- a/PORT.KF5/FACTORIZE/imageshackexport/imageshackitem.h +++ b/imageshack/imageshackitem.h @@ -23,7 +23,7 @@ #ifndef IMAGESHACKITEM_H #define IMAGESHACKITEM_H = -namespace KIPIImageshackExportPlugin +namespace KIPIImageshackPlugin { = class ImageshackGallery @@ -58,7 +58,6 @@ public: QString m_bucket; }; = -} // namespace KIPIImageshackExportPlugin +} // namespace KIPIImageshackPlugin = #endif // IMAGESHACKITEM_H - diff --git a/PORT.KF5/FACTORIZE/imageshackexport/imageshacktalker.cpp b/ima= geshack/imageshacktalker.cpp similarity index 98% rename from PORT.KF5/FACTORIZE/imageshackexport/imageshacktalker.cpp rename to imageshack/imageshacktalker.cpp index 3301aa7..0251cd4 100644 --- a/PORT.KF5/FACTORIZE/imageshackexport/imageshacktalker.cpp +++ b/imageshack/imageshacktalker.cpp @@ -20,7 +20,7 @@ * * =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D */ = -#include "imageshacktalker.moc" +#include "imageshacktalker.h" = // Qt includes = @@ -30,11 +30,10 @@ #include #include #include +#include = // KDE includes = -#include -#include "kipiplugins_debug.h" #include #include #include @@ -45,13 +44,16 @@ #include "kpversion.h" #include "imageshack.h" #include "mpform.h" +#include "kipiplugins_debug.h" = -namespace KIPIImageshackExportPlugin +namespace KIPIImageshackPlugin { = ImageshackTalker::ImageshackTalker(Imageshack* imghack) - : m_imageshack(imghack), m_loginInProgress(false), m_job(0), - m_state(IMGHCK_DONOTHING) + : m_imageshack(imghack), + m_loginInProgress(false), + m_job(0), + m_state(IMGHCK_DONOTHING) { m_userAgent =3D QString("KIPI-Plugin-Imageshack/%1").arg(kipiplugins= _version); m_photoApiUrl =3D QUrl("http://www.imageshack.us/upload_api.php"); @@ -367,7 +369,7 @@ void ImageshackTalker::cancelLogIn() = QString ImageshackTalker::mimeType(const QString& path) { - KMimeType::Ptr mimePtr =3D KMimeType::findByUrl(path); + KMimeType::Ptr mimePtr =3D KMimeType::findByUrl(QUrl::fromLocalFile(pa= th)); return mimePtr->name(); } = @@ -594,4 +596,4 @@ void ImageshackTalker::parseAddPhotoToGalleryDone(QByte= Array data) } } = -} // namespace KIPIImageshackExportPlugin +} // namespace KIPIImageshackPlugin diff --git a/PORT.KF5/FACTORIZE/imageshackexport/imageshacktalker.h b/image= shack/imageshacktalker.h similarity index 97% rename from PORT.KF5/FACTORIZE/imageshackexport/imageshacktalker.h rename to imageshack/imageshacktalker.h index fc625aa..d418459 100644 --- a/PORT.KF5/FACTORIZE/imageshackexport/imageshacktalker.h +++ b/imageshack/imageshacktalker.h @@ -36,7 +36,7 @@ class QDomElement; class QByteArray; = -namespace KIPIImageshackExportPlugin +namespace KIPIImageshackPlugin { = class Imageshack; @@ -137,6 +137,6 @@ private: State m_state; }; = -} // namespace KIPIImageshackExportPlugin +} // namespace KIPIImageshackPlugin = #endif // IMAGESHACKTALKER_H diff --git a/PORT.KF5/FACTORIZE/imageshackexport/imageshackwidget.cpp b/ima= geshack/imageshackwidget.cpp similarity index 97% rename from PORT.KF5/FACTORIZE/imageshackexport/imageshackwidget.cpp rename to imageshack/imageshackwidget.cpp index 24a5882..d0a2706 100644 --- a/PORT.KF5/FACTORIZE/imageshackexport/imageshackwidget.cpp +++ b/imageshack/imageshackwidget.cpp @@ -20,7 +20,7 @@ * * =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D */ = -#include "imageshackwidget.moc" +#include "imageshackwidget.h" = // Qt includes = @@ -34,35 +34,37 @@ #include #include #include +#include +#include = // KDE includes = +#include #include -#include #include #include -#include "kipiplugins_debug.h" = // Libkipi includes = -#include -#include +#include +#include = // Local includes = +#include "kipiplugins_debug.h" #include "kpimageslist.h" #include "imageshack.h" #include "kpprogresswidget.h" = -namespace KIPIImageshackExportPlugin +namespace KIPIImageshackPlugin { = ImageshackWidget::ImageshackWidget(QWidget* const parent, Imageshack* cons= t imageshack) - : QWidget(parent), m_imageshack(imageshack) + : QWidget(parent), + m_imageshack(imageshack) { setObjectName("ImageshackWidget"); = - QHBoxLayout* const mainLayout =3D new QHBoxLayout(this); = // -------------------------------------------- @@ -267,7 +269,7 @@ ImageshackWidget::~ImageshackWidget() = void ImageshackWidget::removeVideosFromList() { - QUrl::List urls =3D m_imgList->imageUrls(); + QList urls =3D m_imgList->imageUrls(); = for (int i =3D 0; i < urls.size(); ++i) { @@ -363,4 +365,4 @@ void ImageshackWidget::slotReloadGalleries() emit signalReloadGalleries(); } = -} // namespace KIPIImageshackExportPlugin +} // namespace KIPIImageshackPlugin diff --git a/PORT.KF5/FACTORIZE/imageshackexport/imageshackwidget.h b/image= shack/imageshackwidget.h similarity index 97% rename from PORT.KF5/FACTORIZE/imageshackexport/imageshackwidget.h rename to imageshack/imageshackwidget.h index 71f254e..6556bc7 100644 --- a/PORT.KF5/FACTORIZE/imageshackexport/imageshackwidget.h +++ b/imageshack/imageshackwidget.h @@ -42,7 +42,7 @@ namespace KIPIPlugins class KPProgressWidget; } = -namespace KIPIImageshackExportPlugin +namespace KIPIImageshackPlugin { = class Imageshack; @@ -118,6 +118,6 @@ private: = }; // class ImageshackWidget = -} // namespace KIPIImageshackExportPlugin +} // namespace KIPIImageshackPlugin = #endif // IMAGESHACKWIDGET_H diff --git a/PORT.KF5/FACTORIZE/imageshackexport/imageshackwindow.cpp b/ima= geshack/imageshackwindow.cpp similarity index 95% rename from PORT.KF5/FACTORIZE/imageshackexport/imageshackwindow.cpp rename to imageshack/imageshackwindow.cpp index 9282af2..f5ab396 100644 --- a/PORT.KF5/FACTORIZE/imageshackexport/imageshackwindow.cpp +++ b/imageshack/imageshackwindow.cpp @@ -20,7 +20,7 @@ * * =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D */ = -#include "imageshackwindow.moc" +#include "imageshackwindow.h" = // Qt includes = @@ -38,30 +38,31 @@ #include #include #include +#include +#include +#include +#include +#include = // KDE includes = #include -#include #include -#include "kipiplugins_debug.h" -#include #include -#include #include #include #include #include #include -#include #include = // Libkipi includes = -#include +#include = // Local includes = +#include "kipiplugins_debug.h" #include "imageshack.h" #include "imageshackwidget.h" #include "imageshacktalker.h" @@ -69,7 +70,7 @@ #include "kpimageslist.h" #include "kpprogresswidget.h" = -namespace KIPIImageshackExportPlugin +namespace KIPIImageshackPlugin { = ImageshackWindow::ImageshackWindow(QWidget* const parent, Imageshack* cons= t imghack) @@ -95,13 +96,14 @@ ImageshackWindow::ImageshackWindow(QWidget* const paren= t, Imageshack* const imgh this, SLOT(slotImageListChanged())); = // About data - KPAboutData* about =3D new KPAboutData(ki18n("Imageshack Export"), - 0, - KAboutData::License_GPL, - ki18n("A kipi plugin to export im= ages to Imageshack web service."), - ki18n("(c) 2012, Dodon Victor\n")= ); - - about->addAuthor(ki18n("Dodon Victor"), ki18n("Author"), + KPAboutData* const about =3D new KPAboutData(ki18n("Imageshack Export"= ), + 0, + KAboutLicense::GPL, + ki18n("A kipi plugin to export images t= o Imageshack web service."), + ki18n("(c) 2012, Dodon Victor\n")); + + about->addAuthor(ki18n("Dodon Victor").toString(), + ki18n("Author").toString(), "dodonvictor at gmail dot com"); = about->setHandbookEntry("imageshackexport"); @@ -508,4 +510,4 @@ void ImageshackWindow::slotGetGalleries() m_talker->getGalleries(); } = -} // namespace KIPIImageshackExportPlugin +} // namespace KIPIImageshackPlugin diff --git a/PORT.KF5/FACTORIZE/imageshackexport/imageshackwindow.h b/image= shack/imageshackwindow.h similarity index 95% rename from PORT.KF5/FACTORIZE/imageshackexport/imageshackwindow.h rename to imageshack/imageshackwindow.h index 5a79672..9643883 100644 --- a/PORT.KF5/FACTORIZE/imageshackexport/imageshackwindow.h +++ b/imageshack/imageshackwindow.h @@ -46,7 +46,7 @@ namespace KIPIPlugins using namespace KIPI; using namespace KIPIPlugins; = -namespace KIPIImageshackExportPlugin +namespace KIPIImageshackPlugin { = class Imageshack; @@ -107,13 +107,13 @@ private: unsigned int m_imagesCount; unsigned int m_imagesTotal; = - QUrl::List m_transferQueue; + QList m_transferQueue; = Imageshack* m_imageshack; ImageshackWidget* m_widget; ImageshackTalker* m_talker; }; = -} // namespace KIPIImageshackExportPlugin +} // namespace KIPIImageshackPlugin = #endif // IMAGESHACKWINDOW_H diff --git a/PORT.KF5/FACTORIZE/imageshackexport/kipiplugin_imageshackexpor= t.desktop.cmake.in b/imageshack/kipiplugin_imageshack.desktop.cmake.in similarity index 96% rename from PORT.KF5/FACTORIZE/imageshackexport/kipiplugin_imageshackexport= .desktop.cmake.in rename to imageshack/kipiplugin_imageshack.desktop.cmake.in index a8fbbed..5342c71 100644 --- a/PORT.KF5/FACTORIZE/imageshackexport/kipiplugin_imageshackexport.deskt= op.cmake.in +++ b/imageshack/kipiplugin_imageshack.desktop.cmake.in @@ -1,6 +1,6 @@ [Desktop Entry] -UntranslatedGenericName=3DImageshack Export -Name=3DImageshack Export +UntranslatedGenericName=3DImageshack Tool +Name=3DImageshack Tool Name[bs]=3DImageshack Izvoz Name[ca]=3DExportador a Imageshack Name[ca@valencia]=3DExportador a Imageshack @@ -29,7 +29,7 @@ Name[sl]=3DIzvoz v Imageshack Name[sv]=3DExport till Imageshack Name[tr]=3DImageshack Aktar=C4=B1m=C4=B1 Name[uk]=3D=D0=95=D0=BA=D1=81=D0=BF=D0=BE=D1=80=D1=82 =D0=B4=D0=BE Imagesh= ack -Name[x-test]=3DxxImageshack Exportxx +Name[x-test]=3DxxImageshack Toolxx Name[zh_TW]=3DImageshack =E5=8C=AF=E5=87=BA Comment=3DA tool to export images to Imageshack web service Comment[bs]=3DAlat za izvoz slika u ImageShack web servisu @@ -64,7 +64,7 @@ Comment[zh_TW]=3D=E5=8C=AF=E5=87=BA=E5=BD=B1=E5=83=8F=E5= =88=B0=E9=81=A0=E7=AB=AF Imageshack =E7=B6=B2=E9=A0=81=E6=9C=8D=E5=8B=99=E7= =9A=84=E5=B7=A5=E5=85=B7 Type=3DService Icon=3Dkipi-imageshack ServiceTypes=3DKIPI/Plugin -X-KDE-Library=3Dkipiplugin_imageshackexport +X-KDE-Library=3Dkipiplugin_imageshack X-KIPI-PluginCategories=3DExport X-KIPI-BinaryVersion=3D${KIPI_LIB_SO_CUR_VERSION} author=3DVictor Dodon, dodonvictor at gmail dot com diff --git a/PORT.KF5/FACTORIZE/imageshackexport/kipiplugin_imageshackexpor= tui.rc b/imageshack/kipiplugin_imageshackui.rc similarity index 70% rename from PORT.KF5/FACTORIZE/imageshackexport/kipiplugin_imageshackexport= ui.rc rename to imageshack/kipiplugin_imageshackui.rc index 903e868..f2d6da6 100644 --- a/PORT.KF5/FACTORIZE/imageshackexport/kipiplugin_imageshackexportui.rc +++ b/imageshack/kipiplugin_imageshackui.rc @@ -1,11 +1,11 @@ - + = = &Export - + = diff --git a/PORT.KF5/FACTORIZE/imageshackexport/mpform.cpp b/imageshack/mp= form.cpp similarity index 94% rename from PORT.KF5/FACTORIZE/imageshackexport/mpform.cpp rename to imageshack/mpform.cpp index 252013d..2dc3754 100644 --- a/PORT.KF5/FACTORIZE/imageshackexport/mpform.cpp +++ b/imageshack/mpform.cpp @@ -30,14 +30,18 @@ // Qt includes = #include +#include = // KDE includes = -#include "kipiplugins_debug.h" #include #include = -namespace KIPIImageshackExportPlugin +// Local includes + +#include "kipiplugins_debug.h" + +namespace KIPIImageshackPlugin { = MPForm::MPForm() @@ -91,7 +95,7 @@ void MPForm::addPair(const QString& name, const QString& = value) = bool MPForm::addFile(const QString& name, const QString& path) { - KMimeType::Ptr ptr =3D KMimeType::findByUrl(path); + KMimeType::Ptr ptr =3D KMimeType::findByUrl(QUrl::fromLocalFile(path)); QString mime =3D ptr->name(); if (mime.isEmpty()) return false; @@ -140,4 +144,4 @@ QByteArray MPForm::formData() const return m_buffer; } = -} // namespace KIPIImageshackExportPlugin +} // namespace KIPIImageshackPlugin diff --git a/PORT.KF5/FACTORIZE/imageshackexport/mpform.h b/imageshack/mpfo= rm.h similarity index 94% rename from PORT.KF5/FACTORIZE/imageshackexport/mpform.h rename to imageshack/mpform.h index 19495b2..d4c7e8c 100644 --- a/PORT.KF5/FACTORIZE/imageshackexport/mpform.h +++ b/imageshack/mpform.h @@ -28,7 +28,7 @@ #include #include = -namespace KIPIImageshackExportPlugin +namespace KIPIImageshackPlugin { = class MPForm @@ -55,6 +55,6 @@ private: QByteArray m_boundary; }; = -} // namespace KIPIImageshackExportPlugin +} // namespace KIPIImageshackPlugin = #endif /* MPFORM_H */ diff --git a/PORT.KF5/FACTORIZE/imageshackexport/plugin_imageshackexport.cp= p b/imageshack/plugin_imageshack.cpp similarity index 70% rename from PORT.KF5/FACTORIZE/imageshackexport/plugin_imageshackexport.cpp rename to imageshack/plugin_imageshack.cpp index b832fdb..f0baf61 100644 --- a/PORT.KF5/FACTORIZE/imageshackexport/plugin_imageshackexport.cpp +++ b/imageshack/plugin_imageshack.cpp @@ -20,18 +20,17 @@ * * =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D */ = -#include "plugin_imageshackexport.moc" +#include "plugin_imageshack.h" = // Qt includes = #include +#include +#include = // KDE includes = -#include #include -#include -#include "kipiplugins_debug.h" #include #include #include @@ -40,20 +39,20 @@ = // Libkipi includes = -#include +#include = // Local includes = #include "imageshack.h" #include "imageshackwindow.h" +#include "kipiplugins_debug.h" = -namespace KIPIImageshackExportPlugin +namespace KIPIImageshackPlugin { = -K_PLUGIN_FACTORY(Factory, registerPlugin();) -K_EXPORT_PLUGIN(Factory("kipiplugin_imageshackexport")) +K_PLUGIN_FACTORY(Factory, registerPlugin();) = -class Plugin_ImageshackExport::Private +class Plugin_Imageshack::Private { public: = @@ -63,17 +62,15 @@ public: { } = - QAction * actionExport; + QAction* actionExport; Imageshack* imageshack; }; = -Plugin_ImageshackExport::Plugin_ImageshackExport(QObject* const parent, co= nst QVariantList&) - : Plugin(Factory::componentData(), parent, "ImageshackExport"), +Plugin_Imageshack::Plugin_Imageshack(QObject* const parent, const QVariant= List&) + : Plugin(parent, "Imageshack"), d(new Private()) { - qCDebug(KIPIPLUGINS_LOG) << "Plugin_ImageshackExport plugin loaded"; - - KIconLoader::global()->addAppDir("kipiplugin_imageshackexport"); + qCDebug(KIPIPLUGINS_LOG) << "Plugin_Imageshack plugin loaded"; = d->imageshack =3D new Imageshack(); = @@ -81,13 +78,13 @@ Plugin_ImageshackExport::Plugin_ImageshackExport(QObjec= t* const parent, const QV setupXML(); } = -Plugin_ImageshackExport::~Plugin_ImageshackExport() +Plugin_Imageshack::~Plugin_Imageshack() { delete d->imageshack; delete d; } = -void Plugin_ImageshackExport::setup(QWidget* const widget) +void Plugin_Imageshack::setup(QWidget* const widget) { Plugin::setup(widget); setupActions(); @@ -101,23 +98,23 @@ void Plugin_ImageshackExport::setup(QWidget* const wid= get) d->actionExport->setEnabled(true); } = -void Plugin_ImageshackExport::setupActions() +void Plugin_Imageshack::setupActions() { setDefaultCategory(ExportPlugin); = d->actionExport =3D new QAction(this); d->actionExport->setText(i18n("Export to &Imageshack...")); d->actionExport->setIcon(QIcon::fromTheme("kipi-imageshack")); - d->actionExport->setShortcut(KShortcut(Qt::ALT + Qt::SHIFT + Qt::Key_M= )); + d->actionExport->setShortcut(QKeySequence(Qt::ALT + Qt::SHIFT + Qt::Ke= y_M)); d->actionExport->setEnabled(false); = connect(d->actionExport, SIGNAL(triggered(bool)), this, SLOT(slotExport())); = - addAction("imageshackexport", d->actionExport); + addAction("imageshack", d->actionExport); } = -void Plugin_ImageshackExport::slotExport() +void Plugin_Imageshack::slotExport() { QPointer dlg; = @@ -127,4 +124,6 @@ void Plugin_ImageshackExport::slotExport() delete dlg; } = -} // namespace KIPIImageshackExportPlugin +} // namespace KIPIImageshackPlugin + +#include "plugin_imageshack.moc" diff --git a/PORT.KF5/FACTORIZE/imageshackexport/plugin_imageshackexport.h = b/imageshack/plugin_imageshack.h similarity index 75% rename from PORT.KF5/FACTORIZE/imageshackexport/plugin_imageshackexport.h rename to imageshack/plugin_imageshack.h index 2919995..2e4876d 100644 --- a/PORT.KF5/FACTORIZE/imageshackexport/plugin_imageshackexport.h +++ b/imageshack/plugin_imageshack.h @@ -20,8 +20,8 @@ * * =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D */ = -#ifndef PLUGIN_IMAGESHACKEXPORT_H -#define PLUGIN_IMAGESHACKEXPORT_H +#ifndef PLUGIN_IMAGESHACK_H +#define PLUGIN_IMAGESHACK_H = // Qt includes = @@ -29,23 +29,23 @@ = // Libkipi includes = -#include +#include = class QAction; = -namespace KIPIImageshackExportPlugin +namespace KIPIImageshackPlugin { = class Imageshack; = -class Plugin_ImageshackExport : public KIPI::Plugin +class Plugin_Imageshack : public KIPI::Plugin { Q_OBJECT = public: = - Plugin_ImageshackExport(QObject* const parent, const QVariantList& arg= s); - ~Plugin_ImageshackExport(); + Plugin_Imageshack(QObject* const parent, const QVariantList& args); + ~Plugin_Imageshack(); = void setup(QWidget* const); = @@ -63,6 +63,6 @@ private: Private* const d; }; = -} // namespace KIPIImageshackExportPlugin +} // namespace KIPIImageshackPlugin = -#endif /* PLUGIN_IMAGESHACKEXPORT_H */ +#endif /* PLUGIN_IMAGESHACK_H */