Fixed many krazy2-reported issues.

This commit is contained in:
Martin Rotter 2013-12-23 10:43:45 +01:00
parent 733b4b5109
commit f537746fa0
16 changed files with 33 additions and 34 deletions

View File

@ -262,7 +262,7 @@ set(APP_SOURCES
src/core/localization.cpp src/core/localization.cpp
src/core/dynamicshortcuts.cpp src/core/dynamicshortcuts.cpp
src/core/basenetworkaccessmanager.cpp src/core/basenetworkaccessmanager.cpp
src/core/basewebpage.cpp src/core/webpage.cpp
src/core/webbrowsernetworkaccessmanager.cpp src/core/webbrowsernetworkaccessmanager.cpp
src/core/textfactory.cpp src/core/textfactory.cpp
src/core/databasefactory.cpp src/core/databasefactory.cpp
@ -318,7 +318,7 @@ set(APP_HEADERS
src/core/settings.h src/core/settings.h
src/core/basenetworkaccessmanager.h src/core/basenetworkaccessmanager.h
src/core/webbrowsernetworkaccessmanager.h src/core/webbrowsernetworkaccessmanager.h
src/core/basewebpage.h src/core/webpage.h
src/core/systemfactory.h src/core/systemfactory.h
src/core/databasefactory.h src/core/databasefactory.h
src/core/messagesmodel.h src/core/messagesmodel.h

View File

@ -8,7 +8,7 @@ class FeedsModelFeed;
// This class offers means to "update" feeds // This class offers means to "update" feeds
// and "special" categories. // and "special" categories.
// NOTE: This class is used withing separate thread. // NOTE: This class is used within separate thread.
class FeedDownloader : public QObject { class FeedDownloader : public QObject {
Q_OBJECT Q_OBJECT

View File

@ -1,5 +1,5 @@
#ifndef FEEDSMODELCLASSICCATEGORY_H #ifndef FEEDSMODELCATEGORY_H
#define FEEDSMODELCLASSICCATEGORY_H #define FEEDSMODELCATEGORY_H
#include "core/feedsmodelrootitem.h" #include "core/feedsmodelrootitem.h"

View File

@ -1,5 +1,5 @@
#ifndef FEEDMODELROOTITEM_H #ifndef FEEDSMODELROOTITEM_H
#define FEEDMODELROOTITEM_H #define FEEDSMODELROOTITEM_H
#include <QIcon> #include <QIcon>
@ -54,7 +54,7 @@ class FeedsModelRootItem {
QString title() const; QString title() const;
void setTitle(const QString &title); void setTitle(const QString &title);
// Acess to children. // Access to children.
QList<FeedsModelRootItem *> childItems() const; QList<FeedsModelRootItem *> childItems() const;
// Removes all childs from this item. // Removes all childs from this item.

View File

@ -31,7 +31,7 @@ class Settings : public QSettings {
const QString &key, const QString &key,
const QVariant &value); const QVariant &value);
// Synchronises settings. // Synchronizes settings.
QSettings::Status checkSettings(); QSettings::Status checkSettings();
private: private:

View File

@ -48,7 +48,7 @@ class SystemFactory : public QObject {
private: private:
// This read-write lock is used by application on its close. // 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 // This means that if application locks that lock, then
// no other transaction-critical action can acquire lock // no other transaction-critical action can acquire lock
// for reading and won't be executed, so no critical action // 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. // EACH critical action locks this lock for READING.
// Several actions can lock this lock for reading. // Several actions can lock this lock for reading.
// But of user decides to close the application (in other words, // 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. // action will be allowed to lock for reading.
QReadWriteLock *m_applicationCloseLock; QReadWriteLock *m_applicationCloseLock;

View File

@ -1,4 +1,4 @@
#include "core/basewebpage.h" #include "core/webpage.h"
#include "core/webbrowsernetworkaccessmanager.h" #include "core/webbrowsernetworkaccessmanager.h"
#include "gui/webbrowser.h" #include "gui/webbrowser.h"
@ -7,16 +7,16 @@
#include <QWebFrame> #include <QWebFrame>
BaseWebPage::BaseWebPage(QObject *parent) WebPage::WebPage(QObject *parent)
: QWebPage(parent) { : QWebPage(parent) {
// Setup global network access manager. // Setup global network access manager.
// NOTE: This makes network settings easy for all web browsers. // NOTE: This makes network settings easy for all web browsers.
setNetworkAccessManager(WebBrowser::globalNetworkManager()); setNetworkAccessManager(WebBrowser::globalNetworkManager());
} }
BaseWebPage::~BaseWebPage() { WebPage::~WebPage() {
} }
QWebPage *BaseWebPage::createWindow(WebWindowType type) { QWebPage *WebPage::createWindow(WebWindowType type) {
return QWebPage::createWindow(type); return QWebPage::createWindow(type);
} }

View File

@ -1,16 +1,16 @@
#ifndef BASEWEBPAGE_H #ifndef WEBPAGE_H
#define BASEWEBPAGE_H #define WEBPAGE_H
#include <QWebPage> #include <QWebPage>
class BaseWebPage : public QWebPage { class WebPage : public QWebPage {
Q_OBJECT Q_OBJECT
public: public:
// Constructors and destructors. // Constructors and destructors.
explicit BaseWebPage(QObject *parent = 0); explicit WebPage(QObject *parent = 0);
virtual ~BaseWebPage(); virtual ~WebPage();
protected: protected:
QWebPage *createWindow(WebWindowType type); QWebPage *createWindow(WebWindowType type);

View File

@ -1,5 +1,5 @@
#ifndef DYNAMICSHORTCUTSOVERVIEW_H #ifndef DYNAMICSHORTCUTSWIDGET_H
#define DYNAMICSHORTCUTSOVERVIEW_H #define DYNAMICSHORTCUTSWIDGET_H
#include <QWidget> #include <QWidget>

View File

@ -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. SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*******************************************************************************/ *******************************************************************************/
#ifndef KEYSEQUENCECATCHER_H #ifndef SHORTCUTCATCHER_H
#define KEYSEQUENCECATCHER_H #define SHORTCUTCATCHER_H
#include <QWidget> #include <QWidget>

View File

@ -130,7 +130,7 @@ Skin SkinFactory::getSkinInfo(const QString &skin_name, bool *ok) {
// Obtain style name. // Obtain style name.
query.setQuery("string(/skin/style)"); query.setQuery("string(/skin/style)");
query.evaluateTo(&styles); query.evaluateTo(&styles);
skin.m_stylesNames = styles.remove('\n').split(",", QString::SkipEmptyParts); skin.m_stylesNames = styles.remove('\n').split(',', QString::SkipEmptyParts);
// Obtain author. // Obtain author.
query.setQuery("string(/skin/author/name)"); query.setQuery("string(/skin/author/name)");

View File

@ -1,9 +1,8 @@
#include "gui/webbrowser.h" #include "gui/webbrowser.h"
#include "core/defs.h" #include "core/defs.h"
#include "core/basenetworkaccessmanager.h"
#include "core/webbrowsernetworkaccessmanager.h" #include "core/webbrowsernetworkaccessmanager.h"
#include "core/basewebpage.h" #include "core/webpage.h"
#include "gui/skinfactory.h" #include "gui/skinfactory.h"
#include "gui/webview.h" #include "gui/webview.h"
#include "gui/formmain.h" #include "gui/formmain.h"

View File

@ -2,7 +2,7 @@
#include "core/defs.h" #include "core/defs.h"
#include "core/settings.h" #include "core/settings.h"
#include "core/basewebpage.h" #include "core/webpage.h"
#include "gui/skinfactory.h" #include "gui/skinfactory.h"
#include "gui/iconthemefactory.h" #include "gui/iconthemefactory.h"
@ -17,7 +17,7 @@
WebView::WebView(QWidget *parent) WebView::WebView(QWidget *parent)
: QWebView(parent), m_page(new BaseWebPage(this)) { : QWebView(parent), m_page(new WebPage(this)) {
setPage(m_page); setPage(m_page);
setContextMenuPolicy(Qt::CustomContextMenu); setContextMenuPolicy(Qt::CustomContextMenu);
initializeActions(); initializeActions();

View File

@ -6,7 +6,7 @@
class QAction; class QAction;
class QPaintEvent; class QPaintEvent;
class BaseWebPage; class WebPage;
class WebView : public QWebView { class WebView : public QWebView {
Q_OBJECT Q_OBJECT
@ -66,7 +66,7 @@ class WebView : public QWebView {
void mouseReleaseEvent(QMouseEvent *event); void mouseReleaseEvent(QMouseEvent *event);
private: private:
BaseWebPage *m_page; WebPage *m_page;
QAction *m_actionReload; QAction *m_actionReload;
QAction *m_actionCopyLink; QAction *m_actionCopyLink;

View File

@ -115,7 +115,7 @@ int main(int argc, char *argv[]) {
} }
// Setup single-instance behavior. // Setup single-instance behavior.
QObject::connect(&application, SIGNAL(messageReceived(const QString&)), QObject::connect(&application, SIGNAL(messageReceived(QString)),
&window, SLOT(processExecutionMessage(QString))); &window, SLOT(processExecutionMessage(QString)));
// Enter global event loop. // Enter global event loop.

View File

@ -158,8 +158,8 @@ QtLockedFile::LockMode QtLockedFile::lockMode() const
can be locked. can be locked.
If \a block is true, this function will block until the lock is If \a block is true, this function will block until the lock is
aquired. If \a block is false, this function returns \e false acquired. If \a block is false, this function returns \e false
immediately if the lock cannot be aquired. immediately if the lock cannot be acquired.
If this object already has a lock of type \a mode, this function 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 returns \e true immediately. If this object has a lock of a