Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Graphics
Kipi Plugins
Commits
d8a5a706
Commit
d8a5a706
authored
Apr 14, 2011
by
Gilles Caulier
🗼
Browse files
polish
Fix memory leak
parent
f9739b2b
Changes
2
Hide whitespace changes
Inline
Side-by-side
rajceexport/rajcewindow.cpp
View file @
d8a5a706
...
...
@@ -44,12 +44,12 @@ namespace KIPIRajceExportPlugin
RajceWindow
::
RajceWindow
(
KIPI
::
Interface
*
interface
,
const
QString
&
tmpFolder
,
QWidget
*
/*parent*/
,
Qt
::
WFlags
/*flags*/
)
:
KDialog
(
0
),
_interface
(
interface
)
:
KDialog
(
0
),
m
_interface
(
interface
)
{
_widget
=
new
RajceWidget
(
interface
,
tmpFolder
,
this
);
_widget
->
readSettings
();
m
_widget
=
new
RajceWidget
(
interface
,
tmpFolder
,
this
);
m
_widget
->
readSettings
();
setMainWidget
(
_widget
);
setMainWidget
(
m
_widget
);
setWindowIcon
(
KIcon
(
"rajce"
));
setButtons
(
Help
|
User1
|
Close
);
setDefaultButton
(
Close
);
...
...
@@ -58,28 +58,28 @@ RajceWindow::RajceWindow(KIPI::Interface* interface, const QString& tmpFolder,
setWindowTitle
(
i18n
(
"Export to Rajce.net"
));
setButtonGuiItem
(
User1
,
KGuiItem
(
i18n
(
"Start Upload"
),
"network-workgroup"
,
i18n
(
"Start upload to Rajce.net"
)));
_widget
->
setMinimumSize
(
700
,
500
);
m
_widget
->
setMinimumSize
(
700
,
500
);
connect
(
this
,
SIGNAL
(
user1Clicked
()),
_widget
,
SLOT
(
startUpload
()));
m
_widget
,
SLOT
(
startUpload
()));
connect
(
this
,
SIGNAL
(
closeClicked
()),
this
,
SLOT
(
slotClose
()));
connect
(
_widget
,
SIGNAL
(
loginStatusChanged
(
bool
)),
connect
(
m
_widget
,
SIGNAL
(
loginStatusChanged
(
bool
)),
this
,
SLOT
(
slotSetUploadButtonEnabled
(
bool
)));
//--------------------------------------------------------------------
m_about
=
new
KIPIPlugins
::
KPAboutData
(
ki18n
(
"Rajce.net Export"
),
0
,
KAboutData
::
License_GPL
,
ki18n
(
"A Kipi plugin to export image collections to "
"Rajce.net."
),
ki18n
(
"(c) 2011, Lukas Krejci"
));
0
,
KAboutData
::
License_GPL
,
ki18n
(
"A Kipi plugin to export image collections to "
"Rajce.net."
),
ki18n
(
"(c) 2011, Lukas Krejci"
));
m_about
->
addAuthor
(
ki18n
(
"Lukas Krejci"
),
ki18n
(
"Author and maintainer"
),
"metlosh at gmail dot com"
);
m_about
->
addAuthor
(
ki18n
(
"Lukas Krejci"
),
ki18n
(
"Author and maintainer"
),
"metlosh at gmail dot com"
);
disconnect
(
this
,
SIGNAL
(
helpClicked
()
),
this
,
SLOT
(
showHelp
())
);
...
...
@@ -95,9 +95,14 @@ RajceWindow::RajceWindow(KIPI::Interface* interface, const QString& tmpFolder,
button
(
User1
)
->
setEnabled
(
false
);
}
RajceWindow
::~
RajceWindow
()
{
delete
m_about
;
}
void
RajceWindow
::
reactivate
()
{
_widget
->
reactivate
();
m
_widget
->
reactivate
();
show
();
}
...
...
@@ -113,8 +118,8 @@ void RajceWindow::slotSetUploadButtonEnabled(bool enabled)
void
RajceWindow
::
slotClose
()
{
_widget
->
cancelUpload
();
_widget
->
writeSettings
();
m
_widget
->
cancelUpload
();
m
_widget
->
writeSettings
();
}
}
//namespace KIPIRajceExportPlugin
rajceexport/rajcewindow.h
View file @
d8a5a706
...
...
@@ -48,6 +48,7 @@ class RajceWindow : public KDialog
public:
explicit
RajceWindow
(
KIPI
::
Interface
*
interface
,
const
QString
&
tmpFolder
,
QWidget
*
parent
=
0
,
Qt
::
WFlags
flags
=
0
);
~
RajceWindow
();
void
reactivate
();
...
...
@@ -59,8 +60,8 @@ private Q_SLOTS:
private:
KIPI
::
Interface
*
_interface
;
RajceWidget
*
_widget
;
KIPI
::
Interface
*
m
_interface
;
RajceWidget
*
m
_widget
;
KIPIPlugins
::
KPAboutData
*
m_about
;
};
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment