Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix a typo in the name of function AutoSaver::saveIfNecessary. #13

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions autotests/autosaver/tst_autosaver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ Q_OBJECT

~TestClass()
{
AutoSaver->saveIfNeccessary();
AutoSaver->saveIfNecessary();
}

SubAutoSaver *AutoSaver;
Expand Down Expand Up @@ -104,7 +104,7 @@ void tst_AutoSaver::AutoSaver()
{
SubAutoSaver save(this);
save.changeOccurred();
save.saveIfNeccessary();
save.saveIfNecessary();
}

void tst_AutoSaver::save()
Expand Down
4 changes: 2 additions & 2 deletions src/adblock/adblockmanager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ AdBlockManager::AdBlockManager(QObject *parent)

AdBlockManager::~AdBlockManager()
{
m_saveTimer->saveIfNeccessary();
m_saveTimer->saveIfNecessary();
}

AdBlockManager *AdBlockManager::instance()
Expand Down Expand Up @@ -148,7 +148,7 @@ void AdBlockManager::removeSubscription(AdBlockSubscription *subscription)
#if defined(ADBLOCKMANAGER_DEBUG)
qDebug() << "AdBlockManager::" << __FUNCTION__ << subscription->location();
#endif
m_saveTimer->saveIfNeccessary();
m_saveTimer->saveIfNecessary();
m_subscriptions.removeOne(subscription);
if (subscription->parent() == this)
subscription->deleteLater();
Expand Down
2 changes: 1 addition & 1 deletion src/autofillmanager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ AutoFillManager::AutoFillManager(QObject *parent)

AutoFillManager::~AutoFillManager()
{
m_saveTimer->saveIfNeccessary();
m_saveTimer->saveIfNecessary();
}

void AutoFillManager::save() const
Expand Down
8 changes: 4 additions & 4 deletions src/autosaver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ AutoSaver::~AutoSaver()
if (m_timer.isActive()) {
qWarning() << "AutoSaver: still active when destroyed, changes not saved.";
if (parent() && parent()->metaObject())
qWarning() << parent() << parent()->metaObject()->className() << "should call saveIfNeccessary";
qWarning() << parent() << parent()->metaObject()->className() << "should call saveIfNecessary";
}
}

Expand All @@ -91,7 +91,7 @@ void AutoSaver::changeOccurred()
m_firstChange.start();

if (m_firstChange.elapsed() > MAXWAIT) {
saveIfNeccessary();
saveIfNecessary();
} else {
m_timer.start(AUTOSAVE_IN, this);
}
Expand All @@ -100,13 +100,13 @@ void AutoSaver::changeOccurred()
void AutoSaver::timerEvent(QTimerEvent *event)
{
if (event->timerId() == m_timer.timerId()) {
saveIfNeccessary();
saveIfNecessary();
} else {
QObject::timerEvent(event);
}
}

void AutoSaver::saveIfNeccessary()
void AutoSaver::saveIfNecessary()
{
if (!m_timer.isActive())
return;
Expand Down
2 changes: 1 addition & 1 deletion src/autosaver.h
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ class AutoSaver : public QObject
public:
AutoSaver(QObject *parent);
~AutoSaver();
void saveIfNeccessary();
void saveIfNecessary();

public slots:
void changeOccurred();
Expand Down
2 changes: 1 addition & 1 deletion src/bookmarks/bookmarksmanager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ BookmarksManager::BookmarksManager(QObject *parent)

BookmarksManager::~BookmarksManager()
{
m_saveTimer->saveIfNeccessary();
m_saveTimer->saveIfNecessary();
delete m_bookmarkRootNode;
}

Expand Down
2 changes: 1 addition & 1 deletion src/browserapplication.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -550,7 +550,7 @@ void BrowserApplication::openUrl(const QUrl &url)
BrowserMainWindow *BrowserApplication::newMainWindow()
{
if (!m_mainWindows.isEmpty())
mainWindow()->m_autoSaver->saveIfNeccessary();
mainWindow()->m_autoSaver->saveIfNecessary();
BrowserMainWindow *browser = new BrowserMainWindow();
m_mainWindows.prepend(browser);
connect(this, SIGNAL(privacyChanged(bool)),
Expand Down
2 changes: 1 addition & 1 deletion src/browsermainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ BrowserMainWindow::BrowserMainWindow(QWidget *parent, Qt::WindowFlags flags)
BrowserMainWindow::~BrowserMainWindow()
{
m_autoSaver->changeOccurred();
m_autoSaver->saveIfNeccessary();
m_autoSaver->saveIfNecessary();
}

void BrowserMainWindow::keyPressEvent(QKeyEvent *event)
Expand Down
2 changes: 1 addition & 1 deletion src/downloadmanager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -488,7 +488,7 @@ DownloadManager::DownloadManager(QWidget *parent)
DownloadManager::~DownloadManager()
{
m_autoSaver->changeOccurred();
m_autoSaver->saveIfNeccessary();
m_autoSaver->saveIfNecessary();
if (m_iconProvider)
delete m_iconProvider;
}
Expand Down
4 changes: 2 additions & 2 deletions src/history/historymanager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ HistoryManager::~HistoryManager()
// remove history items on application exit
if (m_daysToExpire == -2)
clear();
m_saveTimer->saveIfNeccessary();
m_saveTimer->saveIfNecessary();
}

QList<HistoryEntry> HistoryManager::history() const
Expand Down Expand Up @@ -274,7 +274,7 @@ void HistoryManager::clear()
m_atomicStringHash.clear();
m_lastSavedUrl.clear();
m_saveTimer->changeOccurred();
m_saveTimer->saveIfNeccessary();
m_saveTimer->saveIfNecessary();
emit historyReset();
emit historyCleared();
}
Expand Down
2 changes: 1 addition & 1 deletion src/network/cookiejar/cookiejar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ CookieJar::~CookieJar()
{
if (m_loaded && m_keepCookies == KeepUntilExit)
clear();
m_saveTimer->saveIfNeccessary();
m_saveTimer->saveIfNecessary();
}

void CookieJar::setPrivate(bool isPrivate)
Expand Down
2 changes: 1 addition & 1 deletion src/network/fileaccesshandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ void FileAccessReply::listDirectory()
continue;
}

// Fetch file icon and generate a corresponding CSS class if neccessary
// Fetch file icon and generate a corresponding CSS class if necessary
QIcon icon = iconProvider.icon(list[i]);
QString cssClass = cssLinkClass(icon, iconSize);
QByteArray cssData = cssClass.toLatin1();
Expand Down
2 changes: 1 addition & 1 deletion src/opensearch/opensearchmanager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ OpenSearchManager::OpenSearchManager(QObject *parent)

OpenSearchManager::~OpenSearchManager()
{
m_autoSaver->saveIfNeccessary();
m_autoSaver->saveIfNecessary();
qDeleteAll(m_engines.values());
m_engines.clear();
}
Expand Down
2 changes: 1 addition & 1 deletion src/toolbarsearch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ void ToolbarSearch::focusInEvent(QFocusEvent *event)

ToolbarSearch::~ToolbarSearch()
{
m_autosaver->saveIfNeccessary();
m_autosaver->saveIfNecessary();
}

void ToolbarSearch::save()
Expand Down