[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    [kipi-plugins/frameworks] /: initial port of ImageShack tool to KF5.
From:       Gilles Caulier <caulier.gilles () gmail ! com>
Date:       2015-06-30 20:45:32
Message-ID: E1ZA2PM-0004dU-WA () scm ! kde ! org
[Download RAW message or body]

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 generic 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/imageshackexport/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/TODO - 100% similarity] R  +1    -1    \
imageshack/icons/CMakeLists.txt [from: \
PORT.KF5/FACTORIZE/imageshackexport/icons/CMakeLists.txt - 076% similarity] R  +-    \
--    imageshack/icons/hi32-apps-kipi-imageshack.png [from: \
PORT.KF5/FACTORIZE/imageshackexport/icons/hi32-apps-kipi-imageshack.png - 100% \
similarity] R  +-    --    imageshack/icons/hi48-apps-kipi-imageshack.png [from: \
PORT.KF5/FACTORIZE/imageshackexport/icons/hi48-apps-kipi-imageshack.png - 100% \
similarity] R  +-    --    imageshack/icons/hi64-apps-kipi-imageshack.png [from: \
PORT.KF5/FACTORIZE/imageshackexport/icons/hi64-apps-kipi-imageshack.png - 100% \
similarity] R  +7    -4    imageshack/imageshack.cpp [from: \
PORT.KF5/FACTORIZE/imageshackexport/imageshack.cpp - 096% similarity] R  +2    -2    \
imageshack/imageshack.h [from: PORT.KF5/FACTORIZE/imageshackexport/imageshack.h - \
096% similarity] R  +2    -3    imageshack/imageshackitem.h [from: \
PORT.KF5/FACTORIZE/imageshackexport/imageshackitem.h - 094% similarity] R  +10   -8   \
imageshack/imageshacktalker.cpp [from: \
PORT.KF5/FACTORIZE/imageshackexport/imageshacktalker.cpp - 098% similarity] R  +2    \
-2    imageshack/imageshacktalker.h [from: \
PORT.KF5/FACTORIZE/imageshackexport/imageshacktalker.h - 097% similarity] R  +12   \
-10   imageshack/imageshackwidget.cpp [from: \
PORT.KF5/FACTORIZE/imageshackexport/imageshackwidget.cpp - 097% similarity] R  +2    \
-2    imageshack/imageshackwidget.h [from: \
PORT.KF5/FACTORIZE/imageshackexport/imageshackwidget.h - 097% similarity] R  +18   \
-16   imageshack/imageshackwindow.cpp [from: \
PORT.KF5/FACTORIZE/imageshackexport/imageshackwindow.cpp - 095% similarity] R  +3    \
-3    imageshack/imageshackwindow.h [from: \
PORT.KF5/FACTORIZE/imageshackexport/imageshackwindow.h - 095% similarity] R  +4    -4 \
imageshack/kipiplugin_imageshack.desktop.cmake.in [from: \
PORT.KF5/FACTORIZE/imageshackexport/kipiplugin_imageshackexport.desktop.cmake.in - \
096% similarity] R  +2    -2    imageshack/kipiplugin_imageshackui.rc [from: \
PORT.KF5/FACTORIZE/imageshackexport/kipiplugin_imageshackexportui.rc - 070% \
similarity] R  +8    -4    imageshack/mpform.cpp [from: \
PORT.KF5/FACTORIZE/imageshackexport/mpform.cpp - 094% similarity] R  +2    -2    \
imageshack/mpform.h [from: PORT.KF5/FACTORIZE/imageshackexport/mpform.h - 094% \
similarity] R  +21   -22   imageshack/plugin_imageshack.cpp [from: \
PORT.KF5/FACTORIZE/imageshackexport/plugin_imageshackexport.cpp - 070% similarity] R  \
+9    -9    imageshack/plugin_imageshack.h [from: \
PORT.KF5/FACTORIZE/imageshackexport/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, <caulier dot gilles at gmail dot com>
-#
-# Redistribution and use is allowed according to the terms of the BSD license.
-# 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_imageshackexport_PART_SRCS})
-
-target_link_libraries(kipiplugin_imageshackexport
-                      KF5::KDcraw
-                      KF5::Kipi
-                      KF5::KExiv2
-                      KF5::KIOCore
-                      
-                      KF5kipiplugins
-                     )
-
-configure_file(kipiplugin_imageshackexport.desktop.cmake.in \
                ${CMAKE_CURRENT_BINARY_DIR}/kipiplugin_imageshackexport.desktop)
-
-install(FILES   ${CMAKE_CURRENT_BINARY_DIR}/kipiplugin_imageshackexport.desktop \
                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 (http://www.vkontakte.ru)  PhotoLayoutEditor  : A tool to \
                assemble images together.
-ImageShackExport   : A tool to export images to ImageShack web service \
(http://imageshack.us) +ImageShack         : A tool to export images to ImageShack \
web service (http://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, <caulier dot gilles at gmail dot com>
+#
+# Redistribution and use is allowed according to the terms of the BSD license.
+# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
+
+subdirs(icons)
+
+add_definitions(-DTRANSLATION_DOMAIN=\"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_BINARY_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/Messages.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/imageshack/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, <caulier dot gilles at gmail dot com>
+# Copyright (c) 2010-2015, Gilles Caulier, <caulier dot gilles at gmail dot com>
 #
 # Redistribution and use is allowed according to the terms of the BSD license.
 # For details see the accompanying COPYING-CMAKE-SCRIPTS file.
diff --git a/PORT.KF5/FACTORIZE/imageshackexport/icons/hi32-apps-kipi-imageshack.png \
b/imageshack/icons/hi32-apps-kipi-imageshack.png similarity index 100%
rename from PORT.KF5/FACTORIZE/imageshackexport/icons/hi32-apps-kipi-imageshack.png
rename to imageshack/icons/hi32-apps-kipi-imageshack.png
diff --git a/PORT.KF5/FACTORIZE/imageshackexport/icons/hi48-apps-kipi-imageshack.png \
b/imageshack/icons/hi48-apps-kipi-imageshack.png similarity index 100%
rename from PORT.KF5/FACTORIZE/imageshackexport/icons/hi48-apps-kipi-imageshack.png
rename to imageshack/icons/hi48-apps-kipi-imageshack.png
diff --git a/PORT.KF5/FACTORIZE/imageshackexport/icons/hi64-apps-kipi-imageshack.png \
b/imageshack/icons/hi64-apps-kipi-imageshack.png similarity index 100%
rename from PORT.KF5/FACTORIZE/imageshackexport/icons/hi64-apps-kipi-imageshack.png
rename to imageshack/icons/hi64-apps-kipi-imageshack.png
diff --git a/PORT.KF5/FACTORIZE/imageshackexport/imageshack.cpp \
b/imageshack/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 <QString>
+#include <QApplication>
 
 // KDE includes
 
-#include <QApplication>
 #include <kconfig.h>
 #include <kconfiggroup.h>
-#include "kipiplugins_debug.h"
 #include <klocalizedstring.h>
 
-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 <QString>
 
-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/imageshack/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/imageshack/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 @@
 *
 * ============================================================ */
 
-#include "imageshacktalker.moc"
+#include "imageshacktalker.h"
 
 // Qt includes
 
@@ -30,11 +30,10 @@
 #include <QDomElement>
 #include <QDomNode>
 #include <QXmlStreamReader>
+#include <QApplication>
 
 // KDE includes
 
-#include <QApplication>
-#include "kipiplugins_debug.h"
 #include <kio/job.h>
 #include <ktoolinvocation.h>
 #include <kio/jobuidelegate.h>
@@ -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   = QString("KIPI-Plugin-Imageshack/%1").arg(kipiplugins_version);
     m_photoApiUrl = QUrl("http://www.imageshack.us/upload_api.php");
@@ -367,7 +369,7 @@ void ImageshackTalker::cancelLogIn()
 
 QString ImageshackTalker::mimeType(const QString& path)
 {
-    KMimeType::Ptr mimePtr = KMimeType::findByUrl(path);
+    KMimeType::Ptr mimePtr = KMimeType::findByUrl(QUrl::fromLocalFile(path));
     return mimePtr->name();
 }
 
@@ -594,4 +596,4 @@ void ImageshackTalker::parseAddPhotoToGalleryDone(QByteArray \
data)  }
 }
 
-} // namespace KIPIImageshackExportPlugin
+} // namespace KIPIImageshackPlugin
diff --git a/PORT.KF5/FACTORIZE/imageshackexport/imageshacktalker.h \
b/imageshack/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/imageshack/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 @@
 *
 * ============================================================ */
 
-#include "imageshackwidget.moc"
+#include "imageshackwidget.h"
 
 // Qt includes
 
@@ -34,35 +34,37 @@
 #include <QGridLayout>
 #include <QHBoxLayout>
 #include <QVBoxLayout>
+#include <QComboBox>
+#include <QApplication>
 
 // KDE includes
 
+#include <kmimetype.h>
 #include <kpushbutton.h>
-#include <QComboBox>
 #include <klocalizedstring.h>
 #include <kdialog.h>
-#include "kipiplugins_debug.h"
 
 // Libkipi includes
 
-#include <uploadwidget.h>
-#include <imagecollection.h>
+#include <KIPI/UploadWidget>
+#include <KIPI/ImageCollection>
 
 // 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* const \
                imageshack)
-    : QWidget(parent), m_imageshack(imageshack)
+    : QWidget(parent),
+      m_imageshack(imageshack)
 {
     setObjectName("ImageshackWidget");
 
-
     QHBoxLayout* const mainLayout = new QHBoxLayout(this);
 
     // --------------------------------------------
@@ -267,7 +269,7 @@ ImageshackWidget::~ImageshackWidget()
 
 void ImageshackWidget::removeVideosFromList()
 {
-    QUrl::List urls = m_imgList->imageUrls();
+    QList<QUrl> urls = m_imgList->imageUrls();
 
     for (int i = 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/imageshack/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/imageshack/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 @@
 *
 * ============================================================ */
 
-#include "imageshackwindow.moc"
+#include "imageshackwindow.h"
 
 // Qt includes
 
@@ -38,30 +38,31 @@
 #include <QRadioButton>
 #include <QSpinBox>
 #include <QVBoxLayout>
+#include <QApplication>
+#include <QIcon>
+#include <QMenu>
+#include <QComboBox>
+#include <QTimer>
 
 // KDE includes
 
 #include <kaboutdata.h>
-#include <QApplication>
 #include <kconfig.h>
-#include "kipiplugins_debug.h"
-#include <QIcon>
 #include <klocalizedstring.h>
-#include <QMenu>
 #include <kmessagebox.h>
 #include <kpushbutton.h>
 #include <krun.h>
 #include <kurllabel.h>
 #include <kstandarddirs.h>
-#include <QComboBox>
 #include <KWindowConfig>
 
 // Libkipi includes
 
-#include <interface.h>
+#include <KIPI/Interface>
 
 // 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* const imghack)
@@ -95,13 +96,14 @@ ImageshackWindow::ImageshackWindow(QWidget* const parent, \
Imageshack* const imgh  this, SLOT(slotImageListChanged()));
 
     // About data
-    KPAboutData* about = new KPAboutData(ki18n("Imageshack Export"),
-                                         0,
-                                         KAboutData::License_GPL,
-                                         ki18n("A kipi plugin to export images to \
                Imageshack web service."),
-                                         ki18n("(c) 2012, Dodon Victor\n"));
-
-    about->addAuthor(ki18n("Dodon Victor"), ki18n("Author"),
+    KPAboutData* const about = new KPAboutData(ki18n("Imageshack Export"),
+                                   0,
+                                   KAboutLicense::GPL,
+                                   ki18n("A kipi plugin to export images to \
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/imageshack/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<QUrl>        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_imageshackexport.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.desktop.cmake.in
                
+++ b/imageshack/kipiplugin_imageshack.desktop.cmake.in
@@ -1,6 +1,6 @@
 [Desktop Entry]
-UntranslatedGenericName=Imageshack Export
-Name=Imageshack Export
+UntranslatedGenericName=Imageshack Tool
+Name=Imageshack Tool
 Name[bs]=Imageshack Izvoz
 Name[ca]=Exportador a Imageshack
 Name[ca@valencia]=Exportador a Imageshack
@@ -29,7 +29,7 @@ Name[sl]=Izvoz v Imageshack
 Name[sv]=Export till Imageshack
 Name[tr]=Imageshack Aktarımı
 Name[uk]=Експорт до Imageshack
-Name[x-test]=xxImageshack Exportxx
+Name[x-test]=xxImageshack Toolxx
 Name[zh_TW]=Imageshack 匯出
 Comment=A tool to export images to Imageshack web service
 Comment[bs]=Alat za izvoz slika u ImageShack web servisu
@@ -64,7 +64,7 @@ Comment[zh_TW]=匯出影像到 端 Imageshack 網 \
服務的工具  Type=Service
 Icon=kipi-imageshack
 ServiceTypes=KIPI/Plugin
-X-KDE-Library=kipiplugin_imageshackexport
+X-KDE-Library=kipiplugin_imageshack
 X-KIPI-PluginCategories=Export
 X-KIPI-BinaryVersion=${KIPI_LIB_SO_CUR_VERSION}
 author=Victor Dodon, dodonvictor at gmail dot com
diff --git a/PORT.KF5/FACTORIZE/imageshackexport/kipiplugin_imageshackexportui.rc \
b/imageshack/kipiplugin_imageshackui.rc similarity index 70%
rename from PORT.KF5/FACTORIZE/imageshackexport/kipiplugin_imageshackexportui.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 @@
 <!DOCTYPE kpartgui SYSTEM "kpartgui.dtd">
 <!-- NOTE: don't forget to increase version ID when this file is modified -->
-<gui version="1" name="kipiplugin_imageshackexport" >
+<gui version="1" name="kipiplugin_imageshack" >
 
     <MenuBar>
 
         <Menu name="Export"><text>&amp;Export</text>
-            <Action name="imageshackexport" group="kipi_export_group" />
+            <Action name="imageshack" group="kipi_export_group" />
         </Menu>
 
     </MenuBar>
diff --git a/PORT.KF5/FACTORIZE/imageshackexport/mpform.cpp b/imageshack/mpform.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 <QFile>
+#include <QUrl>
 
 // KDE includes
 
-#include "kipiplugins_debug.h"
 #include <kmimetype.h>
 #include <krandom.h>
 
-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 = KMimeType::findByUrl(path);
+    KMimeType::Ptr ptr = KMimeType::findByUrl(QUrl::fromLocalFile(path));
     QString mime       = 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/mpform.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 <QByteArray>
 #include <QString>
 
-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.cpp \
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 @@
 *
 * ============================================================ */
 
-#include "plugin_imageshackexport.moc"
+#include "plugin_imageshack.h"
 
 // Qt includes
 
 #include <QPointer>
+#include <QAction>
+#include <QApplication>
 
 // KDE includes
 
-#include <QAction>
 #include <kactioncollection.h>
-#include <QApplication>
-#include "kipiplugins_debug.h"
 #include <kgenericfactory.h>
 #include <kiconloader.h>
 #include <klocalizedstring.h>
@@ -40,20 +39,20 @@
 
 // Libkipi includes
 
-#include <interface.h>
+#include <KIPI/Interface>
 
 // Local includes
 
 #include "imageshack.h"
 #include "imageshackwindow.h"
+#include "kipiplugins_debug.h"
 
-namespace KIPIImageshackExportPlugin
+namespace KIPIImageshackPlugin
 {
 
-K_PLUGIN_FACTORY(Factory, registerPlugin<Plugin_ImageshackExport>();)
-K_EXPORT_PLUGIN(Factory("kipiplugin_imageshackexport"))
+K_PLUGIN_FACTORY(Factory, registerPlugin<Plugin_Imageshack>();)
 
-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, const \
                QVariantList&)
-    : Plugin(Factory::componentData(), parent, "ImageshackExport"),
+Plugin_Imageshack::Plugin_Imageshack(QObject* const parent, const QVariantList&)
+    : 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 = new Imageshack();
 
@@ -81,13 +78,13 @@ Plugin_ImageshackExport::Plugin_ImageshackExport(QObject* 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 widget)
     d->actionExport->setEnabled(true);
 }
 
-void Plugin_ImageshackExport::setupActions()
+void Plugin_Imageshack::setupActions()
 {
     setDefaultCategory(ExportPlugin);
 
     d->actionExport = 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::Key_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<ImageshackWindow> 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 @@
 *
 * ============================================================ */
 
-#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 <plugin.h>
+#include <KIPI/Plugin>
 
 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& args);
-    ~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 */


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic