Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Utilities
Filelight
Commits
a5c97fa8
Commit
a5c97fa8
authored
Apr 27, 2014
by
David Faure
Browse files
Port from queryExit (soon deprecated) to closeEvent
parent
f83c1b1f
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/app/mainWindow.cpp
View file @
a5c97fa8
...
...
@@ -153,18 +153,15 @@ inline void MainWindow::setupActions() //singleton function
connect
(
m_histories
,
SIGNAL
(
activated
(
KUrl
)),
SLOT
(
slotScanUrl
(
KUrl
)));
}
bool
MainWindow
::
queryExit
(
)
void
MainWindow
::
closeEvent
(
QCloseEvent
*
event
)
{
if
(
!
m_part
)
//apparently std::exit() still calls this function, and abort() causes a crash..
return
true
;
KConfigGroup
config
=
KGlobal
::
config
()
->
group
(
"general"
);
m_recentScans
->
saveEntries
(
config
);
config
.
writePathEntry
(
"comboHistory"
,
m_combo
->
historyItems
());
config
.
sync
();
return
true
;
KParts
::
MainWindow
::
closeEvent
(
event
)
;
}
inline
void
MainWindow
::
configToolbars
()
//slot
...
...
src/app/mainWindow.h
View file @
a5c97fa8
...
...
@@ -68,7 +68,7 @@ private slots:
protected:
virtual
void
saveProperties
(
KConfigGroup
&
);
virtual
void
readProperties
(
const
KConfigGroup
&
);
virtual
bool
queryExit
(
);
virtual
void
closeEvent
(
QCloseEvent
*
event
);
private:
Filelight
::
Part
*
m_part
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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