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

factoring

parent 0f33e238
......@@ -58,11 +58,11 @@ public:
ImgurWidget* widget;
};
ImgurWindow::ImgurWindow(Interface* const interface, QWidget* const /*parent*/)
ImgurWindow::ImgurWindow(QWidget* const /*parent*/)
: KPToolDialog(0), d(new ImgurWindowPriv)
{
d->widget = new ImgurWidget(this);
d->webService = new ImgurTalker(interface, this);
d->webService = new ImgurTalker(iface(), this);
setMainWidget(d->widget);
setWindowIcon(KIcon("imgur"));
......
......@@ -60,7 +60,7 @@ class ImgurWindow : public KPToolDialog
public:
ImgurWindow(Interface* const interface, QWidget* const parent = 0);
ImgurWindow(QWidget* const parent = 0);
~ImgurWindow();
void reactivate();
......
......@@ -108,17 +108,10 @@ void Plugin_ImgurExport::setup(QWidget* widget)
void Plugin_ImgurExport::slotActivate()
{
Interface* interface = dynamic_cast<Interface*>(parent());
if (!interface)
{
kError() << "Kipi interface is null!" ;
return;
}
if (!d->winExport)
{
// We clean it up in the close button
d->winExport = new ImgurWindow(interface, kapp->activeWindow());
d->winExport = new ImgurWindow(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