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

factoring

parent 3b433922
......@@ -88,20 +88,13 @@ void Plugin_RajceExport::setup(QWidget* widget)
void Plugin_RajceExport::slotExport()
{
Interface* interface = dynamic_cast<Interface*>(parent());
if (!interface)
{
kError() << "Kipi interface is null!" ;
return;
}
KStandardDirs dir;
QString Tmp = dir.saveLocation("tmp", "kipi-rajceexportplugin-" + QString::number(getpid()) + '/');
QString tmp = dir.saveLocation("tmp", "kipi-rajceexportplugin-" + QString::number(getpid()) + '/');
if (!m_dlgExport)
{
// We clean it up in the close button
m_dlgExport = new RajceWindow(interface, Tmp, kapp->activeWindow());
m_dlgExport = new RajceWindow(tmp, kapp->activeWindow());
}
else
{
......
......@@ -40,11 +40,10 @@
namespace KIPIRajceExportPlugin
{
RajceWindow::RajceWindow(Interface* const interface, const QString& tmpFolder,
QWidget* const /*parent*/, Qt::WFlags /*flags*/)
: KPToolDialog(0), m_interface(interface)
RajceWindow::RajceWindow(const QString& tmpFolder, QWidget* const /*parent*/, Qt::WFlags /*flags*/)
: KPToolDialog(0)
{
m_widget = new RajceWidget(interface, tmpFolder, this);
m_widget = new RajceWidget(iface(), tmpFolder, this);
m_widget->readSettings();
setMainWidget(m_widget);
......
......@@ -23,10 +23,6 @@
#ifndef RAJCEWINDOW_H
#define RAJCEWINDOW_H
// Libkipi includes
#include <libkipi/interface.h>
// Local includes
#include "kptooldialog.h"
......@@ -45,7 +41,7 @@ class RajceWindow : public KPToolDialog
public:
explicit RajceWindow(Interface* const interface, const QString& tmpFolder, QWidget* const parent = 0, Qt::WFlags flags = 0);
explicit RajceWindow(const QString& tmpFolder, QWidget* const parent = 0, Qt::WFlags flags = 0);
~RajceWindow();
void reactivate();
......@@ -57,7 +53,6 @@ private Q_SLOTS:
private:
Interface* m_interface;
RajceWidget* m_widget;
};
......
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