Commit b5a8547e authored by Gilles Caulier's avatar Gilles Caulier 🗼
Browse files

factoring

parent ce9cb261
......@@ -105,20 +105,13 @@ Plugin_Shwup::~Plugin_Shwup()
void Plugin_Shwup::slotExport()
{
Interface* interface = dynamic_cast<Interface*>(parent());
if (!interface)
{
kError() << "Kipi interface is null!";
return;
}
KStandardDirs dir;
QString tmp = dir.saveLocation("tmp", "kipi-shwup-" + QString::number(getpid()) + '/');
if (!m_dlgExport)
{
// We clean it up in the close button
m_dlgExport = new SwWindow(interface, tmp, kapp->activeWindow());
m_dlgExport = new SwWindow(tmp, kapp->activeWindow());
}
else
{
......
......@@ -70,15 +70,14 @@ using namespace KDcrawIface;
namespace KIPIShwupPlugin
{
SwWindow::SwWindow(KIPI::Interface* const interface, const QString& tmpFolder, QWidget* const parent)
SwWindow::SwWindow(const QString& tmpFolder, QWidget* const parent)
: KPToolDialog(parent)
{
m_tmpPath.clear();
m_tmpDir = tmpFolder;
m_interface = interface;
m_imagesCount = 0;
m_imagesTotal = 0;
m_widget = new SwWidget(this, interface);
m_widget = new SwWidget(this, iface());
setMainWidget(m_widget);
setWindowIcon(KIcon("shwup"));
......
......@@ -39,11 +39,6 @@ class QCloseEvent;
class KProgressDialog;
class KUrl;
namespace KIPI
{
class Interface;
}
namespace KIPIPlugins
{
class KPAboutData;
......@@ -69,7 +64,7 @@ class SwWindow : public KPToolDialog
public:
SwWindow(Interface* const interface, const QString& tmpFolder, QWidget* const parent);
SwWindow(const QString& tmpFolder, QWidget* const parent);
~SwWindow();
/**
......@@ -135,8 +130,6 @@ private:
SwConnector* m_connector;
SwWidget* m_widget;
SwNewAlbum* m_albumDlg;
Interface* m_interface;
};
} // namespace KIPIShwupPlugin
......
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