Commit 86fb5746 authored by Gilles Caulier's avatar Gilles Caulier 🗼
Browse files

factoring

parent f45fdef4
......@@ -72,13 +72,11 @@
namespace KIPIImageshackExportPlugin
{
ImageshackWindow::ImageshackWindow(Interface* const interface, QWidget* const parent, Imageshack* const imghack)
ImageshackWindow::ImageshackWindow(QWidget* const parent, Imageshack* const imghack)
: KPToolDialog(parent)
{
m_interface = interface;
m_imageshack = imghack;
m_widget = new ImageshackWidget(this, imghack);
m_widget = new ImageshackWidget(this, imghack);
m_widget->setMinimumSize(700, 500);
setMainWidget(m_widget);
setWindowTitle(i18n("Imageshack Export"));
......
......@@ -59,7 +59,7 @@ class ImageshackWindow : public KPToolDialog
public:
ImageshackWindow(Interface* const interface, QWidget* const parent, Imageshack* const pImageshack);
ImageshackWindow(QWidget* const parent, Imageshack* const pImageshack);
~ImageshackWindow();
KPImagesList* getImagesList() const;
......@@ -100,17 +100,15 @@ private Q_SLOTS:
private:
bool m_import;
unsigned int m_imagesCount;
unsigned int m_imagesTotal;
bool m_import;
unsigned int m_imagesCount;
unsigned int m_imagesTotal;
KUrl::List m_transferQueue;
KUrl::List m_transferQueue;
Imageshack* m_imageshack;
ImageshackWidget* m_widget;
ImageshackTalker* m_talker;
Interface* m_interface;
Imageshack* m_imageshack;
ImageshackWidget* m_widget;
ImageshackTalker* m_talker;
};
} // namespace KIPIImageshackExportPlugin
......
......@@ -94,18 +94,11 @@ Plugin_ImageshackExport::~Plugin_ImageshackExport()
void Plugin_ImageshackExport::slotExport()
{
Interface* interface = dynamic_cast<Interface*>(parent());
if (!interface)
{
kError() << "Kipi interface is null!";
return;
}
kDebug() << "Loading Imageshack Export Window";
QPointer<ImageshackWindow> dlg;
dlg = new ImageshackWindow(interface, kapp->activeWindow(), m_pImageshack);
dlg = new ImageshackWindow(kapp->activeWindow(), m_pImageshack);
dlg->exec();
delete dlg;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment