From f537746fa0c1c86f3b73328eefa5b2fdf422a93e Mon Sep 17 00:00:00 2001 From: Martin Rotter Date: Mon, 23 Dec 2013 10:43:45 +0100 Subject: [PATCH] Fixed many krazy2-reported issues. --- CMakeLists.txt | 4 ++-- src/core/feeddownloader.h | 2 +- src/core/feedsmodelcategory.h | 4 ++-- src/core/feedsmodelrootitem.h | 6 +++--- src/core/settings.h | 2 +- src/core/systemfactory.h | 4 ++-- src/core/{basewebpage.cpp => webpage.cpp} | 8 ++++---- src/core/{basewebpage.h => webpage.h} | 10 +++++----- src/gui/dynamicshortcutswidget.h | 4 ++-- src/gui/shortcutcatcher.h | 4 ++-- src/gui/skinfactory.cpp | 2 +- src/gui/webbrowser.cpp | 3 +-- src/gui/webview.cpp | 4 ++-- src/gui/webview.h | 4 ++-- src/main.cpp | 2 +- src/qtsingleapplication/qtlockedfile.cpp | 4 ++-- 16 files changed, 33 insertions(+), 34 deletions(-) rename src/core/{basewebpage.cpp => webpage.cpp} (69%) rename src/core/{basewebpage.h => webpage.h} (52%) diff --git a/CMakeLists.txt b/CMakeLists.txt index f625dcd4c..96f6985a4 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -262,7 +262,7 @@ set(APP_SOURCES src/core/localization.cpp src/core/dynamicshortcuts.cpp src/core/basenetworkaccessmanager.cpp - src/core/basewebpage.cpp + src/core/webpage.cpp src/core/webbrowsernetworkaccessmanager.cpp src/core/textfactory.cpp src/core/databasefactory.cpp @@ -318,7 +318,7 @@ set(APP_HEADERS src/core/settings.h src/core/basenetworkaccessmanager.h src/core/webbrowsernetworkaccessmanager.h - src/core/basewebpage.h + src/core/webpage.h src/core/systemfactory.h src/core/databasefactory.h src/core/messagesmodel.h diff --git a/src/core/feeddownloader.h b/src/core/feeddownloader.h index be225198a..e9e32c41b 100644 --- a/src/core/feeddownloader.h +++ b/src/core/feeddownloader.h @@ -8,7 +8,7 @@ class FeedsModelFeed; // This class offers means to "update" feeds // and "special" categories. -// NOTE: This class is used withing separate thread. +// NOTE: This class is used within separate thread. class FeedDownloader : public QObject { Q_OBJECT diff --git a/src/core/feedsmodelcategory.h b/src/core/feedsmodelcategory.h index d84a8105b..3119888e7 100755 --- a/src/core/feedsmodelcategory.h +++ b/src/core/feedsmodelcategory.h @@ -1,5 +1,5 @@ -#ifndef FEEDSMODELCLASSICCATEGORY_H -#define FEEDSMODELCLASSICCATEGORY_H +#ifndef FEEDSMODELCATEGORY_H +#define FEEDSMODELCATEGORY_H #include "core/feedsmodelrootitem.h" diff --git a/src/core/feedsmodelrootitem.h b/src/core/feedsmodelrootitem.h index 2da4bd0db..7f8ce9de0 100755 --- a/src/core/feedsmodelrootitem.h +++ b/src/core/feedsmodelrootitem.h @@ -1,5 +1,5 @@ -#ifndef FEEDMODELROOTITEM_H -#define FEEDMODELROOTITEM_H +#ifndef FEEDSMODELROOTITEM_H +#define FEEDSMODELROOTITEM_H #include @@ -54,7 +54,7 @@ class FeedsModelRootItem { QString title() const; void setTitle(const QString &title); - // Acess to children. + // Access to children. QList childItems() const; // Removes all childs from this item. diff --git a/src/core/settings.h b/src/core/settings.h index 779d380d6..43bc6eaf2 100644 --- a/src/core/settings.h +++ b/src/core/settings.h @@ -31,7 +31,7 @@ class Settings : public QSettings { const QString &key, const QVariant &value); - // Synchronises settings. + // Synchronizes settings. QSettings::Status checkSettings(); private: diff --git a/src/core/systemfactory.h b/src/core/systemfactory.h index c38cf7afd..70b7ef23e 100644 --- a/src/core/systemfactory.h +++ b/src/core/systemfactory.h @@ -48,7 +48,7 @@ class SystemFactory : public QObject { private: // This read-write lock is used by application on its close. - // Application locks this lock for WRITTING. + // Application locks this lock for WRITING. // This means that if application locks that lock, then // no other transaction-critical action can acquire lock // for reading and won't be executed, so no critical action @@ -57,7 +57,7 @@ class SystemFactory : public QObject { // EACH critical action locks this lock for READING. // Several actions can lock this lock for reading. // But of user decides to close the application (in other words, - // tries to lock the lock for writting), then no other + // tries to lock the lock for writing), then no other // action will be allowed to lock for reading. QReadWriteLock *m_applicationCloseLock; diff --git a/src/core/basewebpage.cpp b/src/core/webpage.cpp similarity index 69% rename from src/core/basewebpage.cpp rename to src/core/webpage.cpp index c21afd0db..de0bf6592 100644 --- a/src/core/basewebpage.cpp +++ b/src/core/webpage.cpp @@ -1,4 +1,4 @@ -#include "core/basewebpage.h" +#include "core/webpage.h" #include "core/webbrowsernetworkaccessmanager.h" #include "gui/webbrowser.h" @@ -7,16 +7,16 @@ #include -BaseWebPage::BaseWebPage(QObject *parent) +WebPage::WebPage(QObject *parent) : QWebPage(parent) { // Setup global network access manager. // NOTE: This makes network settings easy for all web browsers. setNetworkAccessManager(WebBrowser::globalNetworkManager()); } -BaseWebPage::~BaseWebPage() { +WebPage::~WebPage() { } -QWebPage *BaseWebPage::createWindow(WebWindowType type) { +QWebPage *WebPage::createWindow(WebWindowType type) { return QWebPage::createWindow(type); } diff --git a/src/core/basewebpage.h b/src/core/webpage.h similarity index 52% rename from src/core/basewebpage.h rename to src/core/webpage.h index df7f0f3ef..0f79e0d93 100644 --- a/src/core/basewebpage.h +++ b/src/core/webpage.h @@ -1,16 +1,16 @@ -#ifndef BASEWEBPAGE_H -#define BASEWEBPAGE_H +#ifndef WEBPAGE_H +#define WEBPAGE_H #include -class BaseWebPage : public QWebPage { +class WebPage : public QWebPage { Q_OBJECT public: // Constructors and destructors. - explicit BaseWebPage(QObject *parent = 0); - virtual ~BaseWebPage(); + explicit WebPage(QObject *parent = 0); + virtual ~WebPage(); protected: QWebPage *createWindow(WebWindowType type); diff --git a/src/gui/dynamicshortcutswidget.h b/src/gui/dynamicshortcutswidget.h index b60e99c45..d58b94872 100644 --- a/src/gui/dynamicshortcutswidget.h +++ b/src/gui/dynamicshortcutswidget.h @@ -1,5 +1,5 @@ -#ifndef DYNAMICSHORTCUTSOVERVIEW_H -#define DYNAMICSHORTCUTSOVERVIEW_H +#ifndef DYNAMICSHORTCUTSWIDGET_H +#define DYNAMICSHORTCUTSWIDGET_H #include diff --git a/src/gui/shortcutcatcher.h b/src/gui/shortcutcatcher.h index 454cea132..4ccab706b 100644 --- a/src/gui/shortcutcatcher.h +++ b/src/gui/shortcutcatcher.h @@ -26,8 +26,8 @@ ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. *******************************************************************************/ -#ifndef KEYSEQUENCECATCHER_H -#define KEYSEQUENCECATCHER_H +#ifndef SHORTCUTCATCHER_H +#define SHORTCUTCATCHER_H #include diff --git a/src/gui/skinfactory.cpp b/src/gui/skinfactory.cpp index 21dd9e5d1..c71f5d5ef 100644 --- a/src/gui/skinfactory.cpp +++ b/src/gui/skinfactory.cpp @@ -130,7 +130,7 @@ Skin SkinFactory::getSkinInfo(const QString &skin_name, bool *ok) { // Obtain style name. query.setQuery("string(/skin/style)"); query.evaluateTo(&styles); - skin.m_stylesNames = styles.remove('\n').split(",", QString::SkipEmptyParts); + skin.m_stylesNames = styles.remove('\n').split(',', QString::SkipEmptyParts); // Obtain author. query.setQuery("string(/skin/author/name)"); diff --git a/src/gui/webbrowser.cpp b/src/gui/webbrowser.cpp index fc09d390e..5e680e7ce 100644 --- a/src/gui/webbrowser.cpp +++ b/src/gui/webbrowser.cpp @@ -1,9 +1,8 @@ #include "gui/webbrowser.h" #include "core/defs.h" -#include "core/basenetworkaccessmanager.h" #include "core/webbrowsernetworkaccessmanager.h" -#include "core/basewebpage.h" +#include "core/webpage.h" #include "gui/skinfactory.h" #include "gui/webview.h" #include "gui/formmain.h" diff --git a/src/gui/webview.cpp b/src/gui/webview.cpp index 483444ada..dfbf38899 100644 --- a/src/gui/webview.cpp +++ b/src/gui/webview.cpp @@ -2,7 +2,7 @@ #include "core/defs.h" #include "core/settings.h" -#include "core/basewebpage.h" +#include "core/webpage.h" #include "gui/skinfactory.h" #include "gui/iconthemefactory.h" @@ -17,7 +17,7 @@ WebView::WebView(QWidget *parent) - : QWebView(parent), m_page(new BaseWebPage(this)) { + : QWebView(parent), m_page(new WebPage(this)) { setPage(m_page); setContextMenuPolicy(Qt::CustomContextMenu); initializeActions(); diff --git a/src/gui/webview.h b/src/gui/webview.h index 17ccb8c9f..104d19bfb 100644 --- a/src/gui/webview.h +++ b/src/gui/webview.h @@ -6,7 +6,7 @@ class QAction; class QPaintEvent; -class BaseWebPage; +class WebPage; class WebView : public QWebView { Q_OBJECT @@ -66,7 +66,7 @@ class WebView : public QWebView { void mouseReleaseEvent(QMouseEvent *event); private: - BaseWebPage *m_page; + WebPage *m_page; QAction *m_actionReload; QAction *m_actionCopyLink; diff --git a/src/main.cpp b/src/main.cpp index 789994609..d20fd21c6 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -115,7 +115,7 @@ int main(int argc, char *argv[]) { } // Setup single-instance behavior. - QObject::connect(&application, SIGNAL(messageReceived(const QString&)), + QObject::connect(&application, SIGNAL(messageReceived(QString)), &window, SLOT(processExecutionMessage(QString))); // Enter global event loop. diff --git a/src/qtsingleapplication/qtlockedfile.cpp b/src/qtsingleapplication/qtlockedfile.cpp index c142a863a..b1d71f725 100644 --- a/src/qtsingleapplication/qtlockedfile.cpp +++ b/src/qtsingleapplication/qtlockedfile.cpp @@ -158,8 +158,8 @@ QtLockedFile::LockMode QtLockedFile::lockMode() const can be locked. If \a block is true, this function will block until the lock is - aquired. If \a block is false, this function returns \e false - immediately if the lock cannot be aquired. + acquired. If \a block is false, this function returns \e false + immediately if the lock cannot be acquired. If this object already has a lock of type \a mode, this function returns \e true immediately. If this object has a lock of a