mirror of
https://invent.kde.org/network/falkon.git
synced 2024-11-11 01:22:10 +01:00
SpeedDial: Save using AutoSaver
Prevents losing dials in case of crash.
This commit is contained in:
parent
dc29f6bde5
commit
52f3811916
|
@ -1,6 +1,7 @@
|
|||
Version 1.8.1
|
||||
* not yet released
|
||||
* fixed: autofill not working for some frames
|
||||
* fixed: saving speed dial in case of crash
|
||||
* fixed: building on Mac
|
||||
|
||||
Version 1.8.0
|
||||
|
|
|
@ -294,6 +294,9 @@ MainApplication::~MainApplication()
|
|||
// Delete all classes that are saving data in destructor
|
||||
delete m_bookmarks;
|
||||
delete m_cookieJar;
|
||||
delete m_plugins;
|
||||
|
||||
Settings::syncSettings();
|
||||
}
|
||||
|
||||
bool MainApplication::isClosing() const
|
||||
|
@ -761,7 +764,6 @@ void MainApplication::saveSettings()
|
|||
qzSettings->saveSettings();
|
||||
AdBlockManager::instance()->save();
|
||||
QFile::remove(DataPaths::currentProfilePath() + QLatin1String("/WebpageIcons.db"));
|
||||
Settings::syncSettings();
|
||||
}
|
||||
|
||||
void MainApplication::messageReceived(const QString &message)
|
||||
|
|
|
@ -93,7 +93,6 @@ void Plugins::loadSettings()
|
|||
void Plugins::shutdown()
|
||||
{
|
||||
c2f_saveSettings();
|
||||
m_speedDial->saveSettings();
|
||||
|
||||
foreach (PluginInterface* iPlugin, m_loadedPlugins) {
|
||||
iPlugin->unload();
|
||||
|
|
|
@ -20,6 +20,7 @@
|
|||
#include "settings.h"
|
||||
#include "datapaths.h"
|
||||
#include "qztools.h"
|
||||
#include "autosaver.h"
|
||||
|
||||
#include <QDir>
|
||||
#include <QCryptographicHash>
|
||||
|
@ -38,6 +39,14 @@ SpeedDial::SpeedDial(QObject* parent)
|
|||
, m_loaded(false)
|
||||
, m_regenerateScript(true)
|
||||
{
|
||||
m_autoSaver = new AutoSaver(this);
|
||||
connect(m_autoSaver, SIGNAL(save()), this, SLOT(saveSettings()));
|
||||
connect(this, SIGNAL(pagesChanged()), m_autoSaver, SLOT(changeOcurred()));
|
||||
}
|
||||
|
||||
SpeedDial::~SpeedDial()
|
||||
{
|
||||
m_autoSaver->saveIfNecessary();
|
||||
}
|
||||
|
||||
void SpeedDial::loadSettings()
|
||||
|
|
|
@ -27,6 +27,7 @@ class QUrl;
|
|||
class QWebFrame;
|
||||
class QPixmap;
|
||||
|
||||
class AutoSaver;
|
||||
class PageThumbnailer;
|
||||
|
||||
class QUPZILLA_EXPORT SpeedDial : public QObject
|
||||
|
@ -44,9 +45,9 @@ public:
|
|||
};
|
||||
|
||||
explicit SpeedDial(QObject* parent = 0);
|
||||
~SpeedDial();
|
||||
|
||||
void loadSettings();
|
||||
void saveSettings();
|
||||
|
||||
Page pageForUrl(const QUrl &url);
|
||||
QUrl urlForShortcut(int key);
|
||||
|
@ -81,6 +82,7 @@ public slots:
|
|||
|
||||
private slots:
|
||||
void thumbnailCreated(const QPixmap &pixmap);
|
||||
void saveSettings();
|
||||
|
||||
private:
|
||||
QString escapeTitle(QString string) const;
|
||||
|
@ -99,6 +101,7 @@ private:
|
|||
|
||||
QList<QPointer<QWebFrame> > m_webFrames;
|
||||
QList<Page> m_webPages;
|
||||
AutoSaver* m_autoSaver;
|
||||
|
||||
bool m_loaded;
|
||||
bool m_regenerateScript;
|
||||
|
|
Loading…
Reference in New Issue
Block a user