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

no need to pass interface as dialog argument

parent 706133ea
......@@ -59,18 +59,16 @@ namespace KIPIDebianScreenshotsPlugin
static int maxWidth = 800;
static int maxHeight = 600;
DsWindow::DsWindow(Interface* const interface, const QString& tmpFolder, QWidget* const /*parent*/)
DsWindow::DsWindow(const QString& tmpFolder, QWidget* const /*parent*/)
: KPToolDialog(0),
m_uploadEnabled(false),
m_imagesCount(0),
m_imagesTotal(0),
// m_talker(new DsTalker(this)),
m_tmpDir(tmpFolder),
m_interface(interface)
m_tmpDir(tmpFolder)
{
m_tmpPath.clear();
// m_tmpDir = tmpFolder;
// m_interface = interface;
// m_imagesCount = 0;
// m_imagesTotal = 0;
m_talker = new DsTalker(this);
......
......@@ -62,7 +62,7 @@ class DsWindow : public KPToolDialog
public:
DsWindow(Interface* const interface, const QString& tmpFolder, QWidget* const parent);
DsWindow(const QString& tmpFolder, QWidget* const parent);
~DsWindow();
/**
......@@ -109,8 +109,6 @@ private:
KUrl::List m_transferQueue;
Interface* m_interface;
DsTalker* m_talker;
DsWidget* m_widget;
};
......
......@@ -99,20 +99,13 @@ Plugin_DebianScreenshots::~Plugin_DebianScreenshots()
void Plugin_DebianScreenshots::slotExport()
{
Interface* interface = dynamic_cast<Interface*>(parent());
if (!interface)
{
kError() << "Kipi interface is null!";
return;
}
KStandardDirs dir;
QString tmp = dir.saveLocation("tmp", QString("kipi-ds-") + QString::number(getpid()) + QString("/"));
if (!m_dlgExport)
{
// We clean it up in the close button
m_dlgExport = new DsWindow(interface, tmp, kapp->activeWindow());
m_dlgExport = new DsWindow(tmp, kapp->activeWindow());
}
else
{
......
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