Commit a5c97fa8 authored by David Faure's avatar David Faure
Browse files

Port from queryExit (soon deprecated) to closeEvent

parent f83c1b1f
......@@ -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
......
......@@ -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;
......
Supports Markdown
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