summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrea Diamantini <adjam7@gmail.com>2012-12-28 16:50:41 +0100
committerAndrea Diamantini <adjam7@gmail.com>2012-12-28 16:50:41 +0100
commitfaa7f72c417b4ccd9b794b32b988312186d62e59 (patch)
tree19a4db56f1526e073ce87a0c05a0923d5a6e442f /src
parentSVN_SILENT made messages (.desktop file) (diff)
downloadrekonq-faa7f72c417b4ccd9b794b32b988312186d62e59.tar.xz
Krazy Fixes, first shot
Diffstat (limited to 'src')
-rw-r--r--src/adblock/adblockrule.h2
-rw-r--r--src/adblock/adblockrulefallbackimpl.h3
-rw-r--r--src/adblock/adblockruleimpl.h3
-rw-r--r--src/adblock/adblockrulenullimpl.h3
-rw-r--r--src/adblock/adblockruletextmatchimpl.h3
-rw-r--r--src/adblock/adblocksettingwidget.h6
-rw-r--r--src/bookmarks/bookmarkmanager.h2
-rw-r--r--src/bookmarks/bookmarkowner.cpp10
-rw-r--r--src/bookmarks/bookmarkowner.h2
-rw-r--r--src/bookmarks/bookmarkscontextmenu.cpp2
-rw-r--r--src/bookmarks/bookmarkscontextmenu.h1
-rw-r--r--src/bookmarks/bookmarkstoolbar.h2
-rw-r--r--src/download/downloadmanager.h3
-rw-r--r--src/kspellplugin.cpp76
-rw-r--r--src/kspellplugin.h14
-rw-r--r--src/main.cpp5
-rw-r--r--src/rekonqpage/newtabpage.h2
-rw-r--r--src/sessionmanager.h2
-rw-r--r--src/settings/advancedwidget.h2
-rw-r--r--src/settings/appearancewidget.h2
-rw-r--r--src/settings/generalwidget.h2
-rw-r--r--src/settings/networkwidget.h2
-rw-r--r--src/settings/passexceptionswidget.h2
-rw-r--r--src/settings/privacywidget.h2
-rw-r--r--src/settings/settingsdialog.h2
-rw-r--r--src/settings/tabswidget.h2
-rw-r--r--src/settings/webkitwidget.h2
-rw-r--r--src/sync/ftpsynchandler.h2
-rw-r--r--src/sync/googlesynchandler.h2
-rw-r--r--src/sync/operasynchandler.cpp4
-rw-r--r--src/sync/operasynchandler.h2
-rw-r--r--src/sync/synccheckwidget.h3
-rw-r--r--src/sync/syncdatawidget.h2
-rw-r--r--src/sync/syncftpsettingswidget.h2
-rw-r--r--src/sync/syncgooglesettingswidget.h2
-rw-r--r--src/sync/synchandler.h2
-rw-r--r--src/sync/synchosttypewidget.h2
-rw-r--r--src/sync/syncmanager.cpp4
-rw-r--r--src/sync/syncoperasettingswidget.cpp6
-rw-r--r--src/sync/syncoperasettingswidget.h2
-rw-r--r--src/tabwindow/tabbar.h2
-rw-r--r--src/tabwindow/tabwindow.h2
-rw-r--r--src/urlbar/bookmarkwidget.cpp9
-rw-r--r--src/urlbar/bookmarkwidget.h6
-rw-r--r--src/urlbar/completionwidget.h2
-rw-r--r--src/urlbar/resourcelinkdialog.cpp8
-rw-r--r--src/urlbar/urlbar.h2
-rw-r--r--src/urlbar/urlsuggester.h2
-rw-r--r--src/useragent/useragentmanager.h2
-rw-r--r--src/useragent/useragentwidget.h2
-rw-r--r--src/webtab/networkaccessmanager.h2
-rw-r--r--src/webtab/protocolhandler.h2
-rw-r--r--src/webtab/walletbar.h2
-rw-r--r--src/webtab/webpluginfactory.h2
-rw-r--r--src/webtab/webview.cpp6
-rw-r--r--src/webwindow/findbar.h2
-rw-r--r--src/webwindow/rekonqmenu.h2
-rw-r--r--src/webwindow/webwindow.h2
58 files changed, 147 insertions, 104 deletions
diff --git a/src/adblock/adblockrule.h b/src/adblock/adblockrule.h
index 15dea344..448a5ed3 100644
--- a/src/adblock/adblockrule.h
+++ b/src/adblock/adblockrule.h
@@ -51,7 +51,7 @@ enum RuleTypes
class AdBlockRule
{
public:
- AdBlockRule(const QString &filter);
+ explicit AdBlockRule(const QString &filter);
bool match(const QNetworkRequest &request, const QString &encodedUrl, const QString &encodedUrlLowerCase) const
{
diff --git a/src/adblock/adblockrulefallbackimpl.h b/src/adblock/adblockrulefallbackimpl.h
index 4b5716f8..17b89897 100644
--- a/src/adblock/adblockrulefallbackimpl.h
+++ b/src/adblock/adblockrulefallbackimpl.h
@@ -37,7 +37,8 @@
class AdBlockRuleFallbackImpl : public AdBlockRuleImpl
{
public:
- AdBlockRuleFallbackImpl(const QString &filter);
+ explicit AdBlockRuleFallbackImpl(const QString &filter);
+
bool match(const QNetworkRequest &request, const QString &encodedUrl, const QString &encodedUrlLowerCase) const;
QString ruleString() const;
diff --git a/src/adblock/adblockruleimpl.h b/src/adblock/adblockruleimpl.h
index f1d428d5..b1d69ce9 100644
--- a/src/adblock/adblockruleimpl.h
+++ b/src/adblock/adblockruleimpl.h
@@ -32,8 +32,9 @@ class QNetworkRequest;
class AdBlockRuleImpl
{
public:
- AdBlockRuleImpl(const QString &) {}
+ explicit AdBlockRuleImpl(const QString &) {}
virtual ~AdBlockRuleImpl() {}
+
virtual bool match(const QNetworkRequest &request, const QString &encodedUrl, const QString &encodedUrlLowerCase) const = 0;
// This are added just for debugging purposes
diff --git a/src/adblock/adblockrulenullimpl.h b/src/adblock/adblockrulenullimpl.h
index a8f69652..e5bcd660 100644
--- a/src/adblock/adblockrulenullimpl.h
+++ b/src/adblock/adblockrulenullimpl.h
@@ -39,7 +39,8 @@ class AdBlockRuleNullImpl : public AdBlockRuleImpl
{
public:
- AdBlockRuleNullImpl(const QString &filter);
+ explicit AdBlockRuleNullImpl(const QString &filter);
+
bool match(const QNetworkRequest &, const QString &, const QString &) const;
static bool isNullFilter(const QString &filter);
diff --git a/src/adblock/adblockruletextmatchimpl.h b/src/adblock/adblockruletextmatchimpl.h
index 8600543d..7a99f41d 100644
--- a/src/adblock/adblockruletextmatchimpl.h
+++ b/src/adblock/adblockruletextmatchimpl.h
@@ -37,7 +37,8 @@
class AdBlockRuleTextMatchImpl : public AdBlockRuleImpl
{
public:
- AdBlockRuleTextMatchImpl(const QString &filter);
+ explicit AdBlockRuleTextMatchImpl(const QString &filter);
+
bool match(const QNetworkRequest &request, const QString &encodedUrl, const QString &encodedUrlLowerCase) const;
static bool isTextMatchFilter(const QString &filter);
diff --git a/src/adblock/adblocksettingwidget.h b/src/adblock/adblocksettingwidget.h
index c630d795..2f0fab15 100644
--- a/src/adblock/adblocksettingwidget.h
+++ b/src/adblock/adblocksettingwidget.h
@@ -24,8 +24,8 @@
* ============================================================ */
-#ifndef ADBLOCK_SETTINGS_WIDGET_H
-#define ADBLOCK_SETTINGS_WIDGET_H
+#ifndef AD_BLOCK_SETTINGS_WIDGET_H
+#define AD_BLOCK_SETTINGS_WIDGET_H
// Rekonq Includes
@@ -70,4 +70,4 @@ private:
KSharedConfig::Ptr _adblockConfig;
};
-#endif // ADBLOCK_SETTINGS_WIDGET_H
+#endif // AD_BLOCK_SETTINGS_WIDGET_H
diff --git a/src/bookmarks/bookmarkmanager.h b/src/bookmarks/bookmarkmanager.h
index 0e86fcca..c970d390 100644
--- a/src/bookmarks/bookmarkmanager.h
+++ b/src/bookmarks/bookmarkmanager.h
@@ -129,7 +129,7 @@ private:
* (actually konqueror's bookmarks).
* @param parent The WebWindow to provide bookmarks objects.
*/
- BookmarkManager(QObject *parent = 0);
+ explicit BookmarkManager(QObject *parent = 0);
public Q_SLOTS:
/**
diff --git a/src/bookmarks/bookmarkowner.cpp b/src/bookmarks/bookmarkowner.cpp
index 20a602a6..ba2d8f63 100644
--- a/src/bookmarks/bookmarkowner.cpp
+++ b/src/bookmarks/bookmarkowner.cpp
@@ -46,9 +46,7 @@
// Qt Includes
#include <QClipboard>
-// Nepomuk config include
-#include "config-nepomuk.h"
-
+// Nepomuk Includes
#ifdef HAVE_NEPOMUK
// Local Nepomuk Includes
#include "resourcelinkdialog.h"
@@ -330,9 +328,11 @@ void BookmarkOwner::editBookmark(KBookmark bookmark)
void BookmarkOwner::fancyBookmark(KBookmark bookmark)
{
Nepomuk::Resource nfoResource = (KUrl)bookmark.url();
- Nepomuk::ResourceLinkDialog r(nfoResource);
- r.exec();
+ QPointer<Nepomuk::ResourceLinkDialog> r = new Nepomuk::ResourceLinkDialog(nfoResource);
+ r->exec();
+
+ r->deleteLater();
}
#endif
diff --git a/src/bookmarks/bookmarkowner.h b/src/bookmarks/bookmarkowner.h
index aca338dd..6a18c237 100644
--- a/src/bookmarks/bookmarkowner.h
+++ b/src/bookmarks/bookmarkowner.h
@@ -35,7 +35,7 @@
#include "rekonq_defines.h"
// Nepomuk config include
-#include "config-nepomuk.h"
+#include <config-nepomuk.h>
// KDE Includes
#include <KAction>
diff --git a/src/bookmarks/bookmarkscontextmenu.cpp b/src/bookmarks/bookmarkscontextmenu.cpp
index 54e558cc..69cde758 100644
--- a/src/bookmarks/bookmarkscontextmenu.cpp
+++ b/src/bookmarks/bookmarkscontextmenu.cpp
@@ -29,7 +29,7 @@
#include "bookmarkscontextmenu.h"
// Nepomuk config include
-#include "config-nepomuk.h"
+#include <config-nepomuk.h>
// Local Includes
#include "bookmarkowner.h"
diff --git a/src/bookmarks/bookmarkscontextmenu.h b/src/bookmarks/bookmarkscontextmenu.h
index c927f3a6..b98e3408 100644
--- a/src/bookmarks/bookmarkscontextmenu.h
+++ b/src/bookmarks/bookmarkscontextmenu.h
@@ -27,6 +27,7 @@
#ifndef BOOKMARKS_CONTEXT_MENU_H
#define BOOKMARKS_CONTEXT_MENU_H
+
// KDE Includes
#include <KBookmarkMenu>
diff --git a/src/bookmarks/bookmarkstoolbar.h b/src/bookmarks/bookmarkstoolbar.h
index 4098f2a3..bca7864f 100644
--- a/src/bookmarks/bookmarkstoolbar.h
+++ b/src/bookmarks/bookmarkstoolbar.h
@@ -82,7 +82,7 @@ class BookmarkToolBar : public KToolBar
Q_OBJECT
public:
- BookmarkToolBar(QWidget *parent);
+ explicit BookmarkToolBar(QWidget *parent);
~BookmarkToolBar();
protected:
diff --git a/src/download/downloadmanager.h b/src/download/downloadmanager.h
index 224ef8bd..c61e761c 100644
--- a/src/download/downloadmanager.h
+++ b/src/download/downloadmanager.h
@@ -81,7 +81,8 @@ public:
void removeDownloadItem(int index);
private:
- DownloadManager(QObject *parent = 0);
+ explicit DownloadManager(QObject *parent = 0);
+
void init();
DownloadItem* addDownload(KIO::CopyJob *job);
diff --git a/src/kspellplugin.cpp b/src/kspellplugin.cpp
index 1186eb44..7b20b4a4 100644
--- a/src/kspellplugin.cpp
+++ b/src/kspellplugin.cpp
@@ -3,6 +3,7 @@
* This file is a part of the rekonq project
*
* Copyright (C) 2012 by Lindsay Mathieson <lindsay dot mathieson at gmail dot com>
+* Copyright (C) 2012 by Andrea Diamantini <adjam7 at gmail dot com>
*
*
* This program is free software; you can redistribute it and/or
@@ -24,16 +25,45 @@
* ============================================================ */
-#include <stdio.h>
-#include <KDebug>
+// Self Includes
#include "kspellplugin.h"
+
+// KDE Includes
+#include <KDebug>
+
+// Qt Includes
#include <QTextBoundaryFinder>
+// Auto Includes
#include "rekonq.h"
+// Defines
#define methodDebug() kDebug("KWebSpellChecker: %s", __FUNCTION__)
-/////////////////////////////
+
+// ---------------------------------------------------------------------------------------------
+
+
+static bool isValidWord(const QString &str)
+{
+ if (str.isEmpty() || (str.length() == 1 && !str[0].isLetter()))
+ {
+ return false;
+ }
+ const int length = str.length();
+ for (int i = 0; i < length; ++i)
+ {
+ if (!str[i].isNumber())
+ {
+ return true;
+ }
+ }
+ // 'str' only contains numbers
+ return false;
+}
+
+
+// ---------------------------------------------------------------------------------------------
// KWebSpellChecker
@@ -42,48 +72,36 @@ KWebSpellChecker::KWebSpellChecker()
m_speller = new Sonnet::Speller();
}
+
KWebSpellChecker::~KWebSpellChecker()
{
delete m_speller;
}
+
bool KWebSpellChecker::isContinousSpellCheckingEnabled() const
{
return ReKonfig::automaticSpellChecking();
}
+
void KWebSpellChecker::toggleContinousSpellChecking()
{
ReKonfig::setAutomaticSpellChecking(! ReKonfig::automaticSpellChecking());
}
+
void KWebSpellChecker::learnWord(const QString& word)
{
Q_UNUSED(word);
}
+
void KWebSpellChecker::ignoreWordInSpellDocument(const QString& word)
{
Q_UNUSED(word);
}
-static bool isValidWord(const QString &str)
-{
- if (str.isEmpty() || (str.length() == 1 && !str[0].isLetter()))
- {
- return false;
- }
- const int length = str.length();
- for (int i = 0; i < length; ++i)
- {
- if (!str[i].isNumber())
- {
- return true;
- }
- }
- // 'str' only contains numbers
- return false;
-}
void KWebSpellChecker::checkSpellingOfString(const QString& word, int* misspellingLocation, int* misspellingLength)
{
@@ -131,8 +149,10 @@ void KWebSpellChecker::checkSpellingOfString(const QString& word, int* misspelli
}
}
+
QString KWebSpellChecker::autoCorrectSuggestionForMisspelledWord(const QString& word)
{
+ Q_UNUSED(word);
/*
QStringList words = m_speller->suggest(word);
if (words.size() > 0)
@@ -141,10 +161,10 @@ QString KWebSpellChecker::autoCorrectSuggestionForMisspelledWord(const QString&
return QString("");
*/
-
- return QString("");
+ return QString();
}
+
void KWebSpellChecker::guessesForWord(const QString& word, const QString& context, QStringList& guesses)
{
Q_UNUSED(context);
@@ -153,15 +173,18 @@ void KWebSpellChecker::guessesForWord(const QString& word, const QString& contex
guesses = words;
}
+
bool KWebSpellChecker::isGrammarCheckingEnabled()
{
return false;
}
+
void KWebSpellChecker::toggleGrammarChecking()
{
}
+
void KWebSpellChecker::checkGrammarOfString(const QString&, QList<GrammarDetail>&, int* badGrammarLocation, int* badGrammarLength)
{
Q_UNUSED(badGrammarLocation);
@@ -169,12 +192,15 @@ void KWebSpellChecker::checkGrammarOfString(const QString&, QList<GrammarDetail>
}
-////////////////////////////////////////////
+// ----------------------------------------------------------------------------------------------------------------
// KWebKitPlatformPlugin
+
+
KWebKitPlatformPlugin::KWebKitPlatformPlugin()
{
}
+
KWebKitPlatformPlugin::~KWebKitPlatformPlugin()
{
}
@@ -185,6 +211,7 @@ bool KWebKitPlatformPlugin::supportsExtension(Extension ext) const
return ext == SpellChecker;
}
+
QObject* KWebKitPlatformPlugin::createExtension(Extension ext) const
{
if (ext == SpellChecker)
@@ -193,6 +220,7 @@ QObject* KWebKitPlatformPlugin::createExtension(Extension ext) const
return NULL;
}
+
+// ----------------------------------------------------------------------------------------------------------------
Q_EXPORT_PLUGIN2(kwebspellchecker, KWebKitPlatformPlugin);
Q_IMPORT_PLUGIN(kwebspellchecker)
-
diff --git a/src/kspellplugin.h b/src/kspellplugin.h
index faa83106..a6fed183 100644
--- a/src/kspellplugin.h
+++ b/src/kspellplugin.h
@@ -3,6 +3,7 @@
* This file is a part of the rekonq project
*
* Copyright (C) 2012 by Lindsay Mathieson <lindsay dot mathieson at gmail dot com>
+* Copyright (C) 2012 by Andrea Diamantini <adjam7 at gmail dot com>
*
*
* This program is free software; you can redistribute it and/or
@@ -24,16 +25,16 @@
* ============================================================ */
-#ifndef TESTQWEBSPELLCHECKER_H
-#define TESTQWEBSPELLCHECKER_H
+#ifndef KWEBSPELLCHECKER_H
+#define KWEBSPELLCHECKER_H
#include <QtGlobal>
#include <QtPlugin>
-#include <sonnet/speller.h>
-#include "qwebkitplatformplugin.h"
+#include <sonnet/speller.h>
+#include "qwebkitplatformplugin.h"
class KWebSpellChecker : public QWebSpellChecker
@@ -59,6 +60,9 @@ public:
};
+// ----------------------------------------------------------------------------------
+
+
class KWebKitPlatformPlugin : public QObject, public QWebKitPlatformPlugin
{
Q_OBJECT
@@ -73,4 +77,4 @@ public:
};
-#endif \ No newline at end of file
+#endif // KWEBSPELLCHECKER_H
diff --git a/src/main.cpp b/src/main.cpp
index 7874e84b..7f6fcd9e 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -25,17 +25,20 @@
// version include
-#include "config-version.h"
+#include <config-version.h>
+// Local Includes
#include "application.h"
#include "tabwindow.h"
#include "urlresolver.h"
+// KDE Includes
#include <KDE/KAboutData>
#include <KDE/KUniqueApplication>
#include <KDE/KCmdLineArgs>
#include <KDebug>
+// Qt Includes
#include <QDir>
#include <QUrl>
diff --git a/src/rekonqpage/newtabpage.h b/src/rekonqpage/newtabpage.h
index 1c8d423d..36f79401 100644
--- a/src/rekonqpage/newtabpage.h
+++ b/src/rekonqpage/newtabpage.h
@@ -50,7 +50,7 @@ class REKONQ_TESTS_EXPORT NewTabPage : public QObject
Q_OBJECT
public:
- NewTabPage(QWebFrame *frame);
+ explicit NewTabPage(QWebFrame *frame);
/**
* This method takes an about: url and loads
diff --git a/src/sessionmanager.h b/src/sessionmanager.h
index da60d889..c1ae88f1 100644
--- a/src/sessionmanager.h
+++ b/src/sessionmanager.h
@@ -71,7 +71,7 @@ public:
bool restoreTabWindow(TabWindow * window);
private:
- SessionManager(QObject *parent = 0);
+ explicit SessionManager(QObject *parent = 0);
public Q_SLOTS:
// This method restores session
diff --git a/src/settings/advancedwidget.h b/src/settings/advancedwidget.h
index c9509c9d..e7f5793d 100644
--- a/src/settings/advancedwidget.h
+++ b/src/settings/advancedwidget.h
@@ -43,7 +43,7 @@ class AdvancedWidget : public QWidget, private Ui::advanced
Q_OBJECT
public:
- AdvancedWidget(QWidget *parent = 0);
+ explicit AdvancedWidget(QWidget *parent = 0);
void save();
bool changed();
diff --git a/src/settings/appearancewidget.h b/src/settings/appearancewidget.h
index 86f6d66a..2154df81 100644
--- a/src/settings/appearancewidget.h
+++ b/src/settings/appearancewidget.h
@@ -43,7 +43,7 @@ class AppearanceWidget : public QWidget, private Ui::appearance
Q_OBJECT
public:
- AppearanceWidget(QWidget *parent = 0);
+ explicit AppearanceWidget(QWidget *parent = 0);
void save();
bool changed();
diff --git a/src/settings/generalwidget.h b/src/settings/generalwidget.h
index 33dfe610..ad865955 100644
--- a/src/settings/generalwidget.h
+++ b/src/settings/generalwidget.h
@@ -40,7 +40,7 @@ class GeneralWidget : public QWidget, private Ui::general
Q_OBJECT
public:
- GeneralWidget(QWidget *parent = 0);
+ explicit GeneralWidget(QWidget *parent = 0);
void save();
bool changed();
diff --git a/src/settings/networkwidget.h b/src/settings/networkwidget.h
index 74a0e312..f0cf28f1 100644
--- a/src/settings/networkwidget.h
+++ b/src/settings/networkwidget.h
@@ -40,7 +40,7 @@ class NetworkWidget : public QWidget
Q_OBJECT
public:
- NetworkWidget(QWidget *parent = 0);
+ explicit NetworkWidget(QWidget *parent = 0);
~NetworkWidget();
void save();
diff --git a/src/settings/passexceptionswidget.h b/src/settings/passexceptionswidget.h
index 6b02c4e6..2a538fcc 100644
--- a/src/settings/passexceptionswidget.h
+++ b/src/settings/passexceptionswidget.h
@@ -43,7 +43,7 @@ class PassExWidget : public QWidget, private Ui::PassExceptions
Q_OBJECT
public:
- PassExWidget(QWidget *parent = 0);
+ explicit PassExWidget(QWidget *parent = 0);
private Q_SLOTS:
void removeOne();
diff --git a/src/settings/privacywidget.h b/src/settings/privacywidget.h
index 229cb7df..7bbf70b8 100644
--- a/src/settings/privacywidget.h
+++ b/src/settings/privacywidget.h
@@ -43,7 +43,7 @@ class PrivacyWidget : public QWidget, private Ui::privacy
Q_OBJECT
public:
- PrivacyWidget(QWidget *parent = 0);
+ explicit PrivacyWidget(QWidget *parent = 0);
void save();
void reload();
diff --git a/src/settings/settingsdialog.h b/src/settings/settingsdialog.h
index ad03602b..ed05cf27 100644
--- a/src/settings/settingsdialog.h
+++ b/src/settings/settingsdialog.h
@@ -45,7 +45,7 @@ class REKONQ_TESTS_EXPORT SettingsDialog : public KConfigDialog
Q_OBJECT
public:
- SettingsDialog(QWidget *parent = 0);
+ explicit SettingsDialog(QWidget *parent = 0);
~SettingsDialog();
virtual bool hasChanged();
diff --git a/src/settings/tabswidget.h b/src/settings/tabswidget.h
index 056f030c..786f95f9 100644
--- a/src/settings/tabswidget.h
+++ b/src/settings/tabswidget.h
@@ -40,7 +40,7 @@ class TabsWidget : public QWidget, private Ui::tabs
Q_OBJECT
public:
- TabsWidget(QWidget *parent = 0);
+ explicit TabsWidget(QWidget *parent = 0);
void save();
bool changed();
diff --git a/src/settings/webkitwidget.h b/src/settings/webkitwidget.h
index 1a41a6a1..16653813 100644
--- a/src/settings/webkitwidget.h
+++ b/src/settings/webkitwidget.h
@@ -40,7 +40,7 @@ class WebKitWidget : public QWidget, private Ui::webkit
Q_OBJECT
public:
- WebKitWidget(QWidget *parent = 0);
+ explicit WebKitWidget(QWidget *parent = 0);
void save();
bool changed();
diff --git a/src/sync/ftpsynchandler.h b/src/sync/ftpsynchandler.h
index 2cb1227a..9122b9eb 100644
--- a/src/sync/ftpsynchandler.h
+++ b/src/sync/ftpsynchandler.h
@@ -43,7 +43,7 @@ class FTPSyncHandler : public SyncHandler
Q_OBJECT
public:
- FTPSyncHandler(QObject *parent = 0);
+ explicit FTPSyncHandler(QObject *parent = 0);
void syncHistory();
void syncBookmarks();
diff --git a/src/sync/googlesynchandler.h b/src/sync/googlesynchandler.h
index 459ce16e..f0671b78 100644
--- a/src/sync/googlesynchandler.h
+++ b/src/sync/googlesynchandler.h
@@ -46,7 +46,7 @@ class GoogleSyncHandler : public SyncHandler
Q_OBJECT
public:
- GoogleSyncHandler(QObject *parent = 0);
+ explicit GoogleSyncHandler(QObject *parent = 0);
void syncHistory();
void syncBookmarks();
diff --git a/src/sync/operasynchandler.cpp b/src/sync/operasynchandler.cpp
index ee3fb20d..085f5693 100644
--- a/src/sync/operasynchandler.cpp
+++ b/src/sync/operasynchandler.cpp
@@ -168,7 +168,7 @@ void OperaSyncHandler::startLogin()
if (_qoauth.error() != QOAuth::NoError)
{
- kDebug() << "Error occured while fetching request tokens. Error code is : " << _qoauth.error();
+ kDebug() << "Error occurred while fetching request tokens. Error code is : " << _qoauth.error();
emit syncStatus(Rekonq::Bookmarks, false, i18n("OAuth : Error fetching request token."));
_isSyncing = false;
return;
@@ -460,7 +460,7 @@ void OperaSyncHandler::createBookmarkFolderResultSlot(KJob* job)
if (job->error() != 0)
{
- kDebug() << "Error occured while creating bookmark folder on server. Error code : " << job->error();
+ kDebug() << "Error occurred while creating bookmark folder on server. Error code : " << job->error();
decreaseRequestCount();
return;
}
diff --git a/src/sync/operasynchandler.h b/src/sync/operasynchandler.h
index 794164c1..12b05d47 100644
--- a/src/sync/operasynchandler.h
+++ b/src/sync/operasynchandler.h
@@ -52,7 +52,7 @@ class OperaSyncHandler : public SyncHandler
Q_OBJECT
public:
- OperaSyncHandler(QObject *parent = 0);
+ explicit OperaSyncHandler(QObject *parent = 0);
void syncHistory();
void syncBookmarks();
diff --git a/src/sync/synccheckwidget.h b/src/sync/synccheckwidget.h
index 312fe9b4..9e0232bc 100644
--- a/src/sync/synccheckwidget.h
+++ b/src/sync/synccheckwidget.h
@@ -43,7 +43,8 @@ class SyncCheckWidget : public QWizardPage, private Ui::SyncCheck
Q_OBJECT
public:
- SyncCheckWidget(QWidget *parent = 0);
+ explicit SyncCheckWidget(QWidget *parent = 0);
+
void initializePage();
private Q_SLOTS:
diff --git a/src/sync/syncdatawidget.h b/src/sync/syncdatawidget.h
index cfec1d49..b5c3eb78 100644
--- a/src/sync/syncdatawidget.h
+++ b/src/sync/syncdatawidget.h
@@ -43,7 +43,7 @@ class SyncDataWidget : public QWizardPage, private Ui::SyncData
Q_OBJECT
public:
- SyncDataWidget(QWidget *parent = 0);
+ explicit SyncDataWidget(QWidget *parent = 0);
int nextId() const;
diff --git a/src/sync/syncftpsettingswidget.h b/src/sync/syncftpsettingswidget.h
index d067eef4..14f4fdb9 100644
--- a/src/sync/syncftpsettingswidget.h
+++ b/src/sync/syncftpsettingswidget.h
@@ -43,7 +43,7 @@ class SyncFTPSettingsWidget : public QWizardPage, private Ui::SyncFTPSettings
Q_OBJECT
public:
- SyncFTPSettingsWidget(QWidget *parent = 0);
+ explicit SyncFTPSettingsWidget(QWidget *parent = 0);
int nextId() const;
};
diff --git a/src/sync/syncgooglesettingswidget.h b/src/sync/syncgooglesettingswidget.h
index a51b1d2c..65a70318 100644
--- a/src/sync/syncgooglesettingswidget.h
+++ b/src/sync/syncgooglesettingswidget.h
@@ -44,7 +44,7 @@ class SyncGoogleSettingsWidget : public QWizardPage, private Ui::SyncGoogleSetti
Q_OBJECT
public:
- SyncGoogleSettingsWidget(QWidget *parent = 0);
+ explicit SyncGoogleSettingsWidget(QWidget *parent = 0);
int nextId() const;
};
diff --git a/src/sync/synchandler.h b/src/sync/synchandler.h
index 32266d7c..ae1d9ac0 100644
--- a/src/sync/synchandler.h
+++ b/src/sync/synchandler.h
@@ -40,7 +40,7 @@ class SyncHandler : public QObject
Q_OBJECT
public:
- SyncHandler(QObject *parent = 0);
+ explicit SyncHandler(QObject *parent = 0);
virtual ~SyncHandler();
virtual void syncHistory() = 0;
diff --git a/src/sync/synchosttypewidget.h b/src/sync/synchosttypewidget.h
index 4f577958..b05fd54c 100644
--- a/src/sync/synchosttypewidget.h
+++ b/src/sync/synchosttypewidget.h
@@ -43,7 +43,7 @@ class SyncHostTypeWidget : public QWizardPage, private Ui::SyncHostType
Q_OBJECT
public:
- SyncHostTypeWidget(QWidget *parent = 0);
+ explicit SyncHostTypeWidget(QWidget *parent = 0);
int nextId() const;
bool changed();
diff --git a/src/sync/syncmanager.cpp b/src/sync/syncmanager.cpp
index e31c226d..7a1cb782 100644
--- a/src/sync/syncmanager.cpp
+++ b/src/sync/syncmanager.cpp
@@ -32,8 +32,8 @@
#include "rekonq.h"
// Config Includes
-#include "config-qca2.h"
-#include "config-qtoauth.h"
+#include <config-qca2.h>
+#include <config-qtoauth.h>
// Local Includes
#include "application.h"
diff --git a/src/sync/syncoperasettingswidget.cpp b/src/sync/syncoperasettingswidget.cpp
index a45ae70c..dbeb0555 100644
--- a/src/sync/syncoperasettingswidget.cpp
+++ b/src/sync/syncoperasettingswidget.cpp
@@ -33,13 +33,15 @@
#include "rekonq.h"
// Config Includes
-#include "config-qca2.h"
-#include "config-qtoauth.h"
+#include <config-qca2.h>
+#include <config-qtoauth.h>
// Local Includes
#include "syncassistant.h"
+
+
SyncOperaSettingsWidget::SyncOperaSettingsWidget(QWidget *parent)
: QWizardPage(parent)
{
diff --git a/src/sync/syncoperasettingswidget.h b/src/sync/syncoperasettingswidget.h
index 53e95699..47c157b8 100644
--- a/src/sync/syncoperasettingswidget.h
+++ b/src/sync/syncoperasettingswidget.h
@@ -44,7 +44,7 @@ class SyncOperaSettingsWidget : public QWizardPage, private Ui::SyncOperaSetting
Q_OBJECT
public:
- SyncOperaSettingsWidget(QWidget *parent = 0);
+ explicit SyncOperaSettingsWidget(QWidget *parent = 0);
int nextId() const;
};
diff --git a/src/tabwindow/tabbar.h b/src/tabwindow/tabbar.h
index c27b238f..73b5802e 100644
--- a/src/tabwindow/tabbar.h
+++ b/src/tabwindow/tabbar.h
@@ -49,7 +49,7 @@ class TabBar : public KTabBar
Q_OBJECT
public:
- TabBar(QWidget *parent);
+ explicit TabBar(QWidget *parent);
void setTabHighlighted(int index, bool b);
QRect tabTextRect(int index);
diff --git a/src/tabwindow/tabwindow.h b/src/tabwindow/tabwindow.h
index 4da4f213..3c7d9c8b 100644
--- a/src/tabwindow/tabwindow.h
+++ b/src/tabwindow/tabwindow.h
@@ -60,7 +60,7 @@ class TabWindow : public RekonqWindow
Q_OBJECT
public:
- TabWindow(bool withTab = true, bool PrivateBrowsingMode = false, QWidget *parent = 0);
+ explicit TabWindow(bool withTab = true, bool PrivateBrowsingMode = false, QWidget *parent = 0);
TabWindow(WebPage *pg, QWidget *parent = 0);
WebWindow* currentWebWindow() const;
diff --git a/src/urlbar/bookmarkwidget.cpp b/src/urlbar/bookmarkwidget.cpp
index 6b39c2c8..47c06d75 100644
--- a/src/urlbar/bookmarkwidget.cpp
+++ b/src/urlbar/bookmarkwidget.cpp
@@ -51,9 +51,6 @@
#include <QDBusConnection>
#include <QDBusConnectionInterface>
-// Nepomuk config include
-#include "config-nepomuk.h"
-
#ifdef HAVE_NEPOMUK
// Local Nepomuk Includes
#include "resourcelinkdialog.h"
@@ -360,7 +357,9 @@ void BookmarkWidget::addCommentSlot()
void BookmarkWidget::linkToResourceSlot()
{
- Nepomuk::ResourceLinkDialog r(m_nfoResource);
- r.exec();
+ QPointer<Nepomuk::ResourceLinkDialog> r = new Nepomuk::ResourceLinkDialog(m_nfoResource);
+ r->exec();
+
+ r->deleteLater();
}
#endif
diff --git a/src/urlbar/bookmarkwidget.h b/src/urlbar/bookmarkwidget.h
index e5f25d37..39f6fbd4 100644
--- a/src/urlbar/bookmarkwidget.h
+++ b/src/urlbar/bookmarkwidget.h
@@ -35,15 +35,13 @@
#include <QPlainTextEdit>
// Nepomuk config include
-#include "config-nepomuk.h"
-
-#ifdef HAVE_NEPOMUK
+#include <config-nepomuk.h>
// Nepomuk Includes
+#ifdef HAVE_NEPOMUK
#include <Nepomuk/Resource>
#include <Nepomuk/Tag>
#include <Nepomuk/Vocabulary/NFO>
-
#endif
// Forward Declarations
diff --git a/src/urlbar/completionwidget.h b/src/urlbar/completionwidget.h
index 2857bacf..57a90b0e 100644
--- a/src/urlbar/completionwidget.h
+++ b/src/urlbar/completionwidget.h
@@ -49,7 +49,7 @@ class CompletionWidget : public QFrame
Q_OBJECT
public:
- CompletionWidget(QWidget *parent);
+ explicit CompletionWidget(QWidget *parent);
virtual bool eventFilter(QObject *obj, QEvent *ev);
void setVisible(bool visible);
diff --git a/src/urlbar/resourcelinkdialog.cpp b/src/urlbar/resourcelinkdialog.cpp
index 8a4b5685..b300c8ec 100644
--- a/src/urlbar/resourcelinkdialog.cpp
+++ b/src/urlbar/resourcelinkdialog.cpp
@@ -234,10 +234,12 @@ void Nepomuk::ResourceLinkDialog::showContextMenu(const QPoint &pos)
void Nepomuk::ResourceLinkDialog::createNewResourceSlot()
{
- Nepomuk::NewResourceDialog newResource(d->m_resourceSelect->currentIndex(), d->m_nfoResource);
- //close();
- newResource.exec();
+ QPointer<Nepomuk::NewResourceDialog> r = new Nepomuk::NewResourceDialog(d->m_resourceSelect->currentIndex(), d->m_nfoResource);
+ r->exec();
+
setRelatedResources();
+
+ r->deleteLater();
}
diff --git a/src/urlbar/urlbar.h b/src/urlbar/urlbar.h
index beb1caf4..cce5cd46 100644
--- a/src/urlbar/urlbar.h
+++ b/src/urlbar/urlbar.h
@@ -53,7 +53,7 @@ class IconButton : public QToolButton
Q_OBJECT
public:
- IconButton(QWidget *parent = 0);
+ explicit IconButton(QWidget *parent = 0);
Q_SIGNALS:
void clicked(QPoint);
diff --git a/src/urlbar/urlsuggester.h b/src/urlbar/urlsuggester.h
index 18b63bd4..33bcb398 100644
--- a/src/urlbar/urlsuggester.h
+++ b/src/urlbar/urlsuggester.h
@@ -121,7 +121,7 @@ class UrlSuggester : public QObject
Q_OBJECT
public:
- UrlSuggester(const QString &typedUrl);
+ explicit UrlSuggester(const QString &typedUrl);
UrlSuggestionList orderedSearchItems();
diff --git a/src/useragent/useragentmanager.h b/src/useragent/useragentmanager.h
index 9b906a53..bdba4e86 100644
--- a/src/useragent/useragentmanager.h
+++ b/src/useragent/useragentmanager.h
@@ -54,7 +54,7 @@ public:
void populateUAMenuForTabUrl(KMenu *, WebWindow *);
private:
- UserAgentManager(QObject *parent = 0);
+ explicit UserAgentManager(QObject *parent = 0);
private Q_SLOTS:
void showSettings();
diff --git a/src/useragent/useragentwidget.h b/src/useragent/useragentwidget.h
index 1c850d9e..4d84a001 100644
--- a/src/useragent/useragentwidget.h
+++ b/src/useragent/useragentwidget.h
@@ -43,7 +43,7 @@ class UserAgentWidget : public QWidget, private Ui::UserAgent
Q_OBJECT
public:
- UserAgentWidget(QWidget *parent = 0);
+ explicit UserAgentWidget(QWidget *parent = 0);
private Q_SLOTS:
void deleteUserAgent();
diff --git a/src/webtab/networkaccessmanager.h b/src/webtab/networkaccessmanager.h
index 1c9c3905..d839bdda 100644
--- a/src/webtab/networkaccessmanager.h
+++ b/src/webtab/networkaccessmanager.h
@@ -47,7 +47,7 @@ class REKONQ_TESTS_EXPORT NetworkAccessManager : public KIO::Integration::Access
Q_OBJECT
public:
- NetworkAccessManager(QObject *parent);
+ explicit NetworkAccessManager(QObject *parent);
protected:
virtual QNetworkReply *createRequest(QNetworkAccessManager::Operation op, const QNetworkRequest &request, QIODevice *outgoingData = 0);
diff --git a/src/webtab/protocolhandler.h b/src/webtab/protocolhandler.h
index 83d2e81c..d5a6c0dd 100644
--- a/src/webtab/protocolhandler.h
+++ b/src/webtab/protocolhandler.h
@@ -51,7 +51,7 @@ class REKONQ_TESTS_EXPORT ProtocolHandler : public QObject
Q_OBJECT
public:
- ProtocolHandler(QObject *parent = 0);
+ explicit ProtocolHandler(QObject *parent = 0);
/**
* This function handles all the protocols that have to be handled before
diff --git a/src/webtab/walletbar.h b/src/webtab/walletbar.h
index f1bbd2cb..c5357fa2 100644
--- a/src/webtab/walletbar.h
+++ b/src/webtab/walletbar.h
@@ -44,7 +44,7 @@ class REKONQ_TESTS_EXPORT WalletBar : public KMessageWidget
Q_OBJECT
public:
- WalletBar(QWidget *parent);
+ explicit WalletBar(QWidget *parent);
private Q_SLOTS:
void rememberData();
diff --git a/src/webtab/webpluginfactory.h b/src/webtab/webpluginfactory.h
index 82bf02ce..0a0e6749 100644
--- a/src/webtab/webpluginfactory.h
+++ b/src/webtab/webpluginfactory.h
@@ -41,7 +41,7 @@ class REKONQ_TESTS_EXPORT WebPluginFactory : public KWebPluginFactory
Q_OBJECT
public:
- WebPluginFactory(QObject *parent);
+ explicit WebPluginFactory(QObject *parent);
virtual QObject *create(const QString &_mimeType,
const QUrl &url,
diff --git a/src/webtab/webview.cpp b/src/webtab/webview.cpp
index c49002d6..986f8484 100644
--- a/src/webtab/webview.cpp
+++ b/src/webtab/webview.cpp
@@ -251,12 +251,12 @@ bool WebView::popupSpellMenu(QContextMenuEvent *event)
script += QString::number(s1);
script += QL1S(") + \"");
script += w;
- script += QL1S("\" + this.value.substring(");
+ script += QL1C('\\') + QL1S("this.value.substring(");
script += QString::number(s2);
- script += QL1S(")");
+ script += QL1C(')');
element.evaluateJavaScript(script);
// reposition cursor
- element.evaluateJavaScript("this.selectionEnd=this.selectionStart=" + QString::number(selStart) + ";");
+ element.evaluateJavaScript("this.selectionEnd=this.selectionStart=" + QString::number(selStart) + QL1C(';'));
}
}
}
diff --git a/src/webwindow/findbar.h b/src/webwindow/findbar.h
index 2371490d..ecf97d3c 100644
--- a/src/webwindow/findbar.h
+++ b/src/webwindow/findbar.h
@@ -47,7 +47,7 @@ class REKONQ_TESTS_EXPORT FindBar : public QWidget
Q_OBJECT
public:
- FindBar(QWidget *parent);
+ explicit FindBar(QWidget *parent);
bool matchCase() const;
void notifyMatch(bool match);
diff --git a/src/webwindow/rekonqmenu.h b/src/webwindow/rekonqmenu.h
index a9422dcf..d8621f3a 100644
--- a/src/webwindow/rekonqmenu.h
+++ b/src/webwindow/rekonqmenu.h
@@ -50,7 +50,7 @@ class REKONQ_TESTS_EXPORT RekonqMenu : public KMenu
Q_OBJECT
public:
- RekonqMenu(QWidget *parent);
+ explicit RekonqMenu(QWidget *parent);
protected:
virtual void showEvent(QShowEvent* event);
diff --git a/src/webwindow/webwindow.h b/src/webwindow/webwindow.h
index 55c8b1d7..a8c2f236 100644
--- a/src/webwindow/webwindow.h
+++ b/src/webwindow/webwindow.h
@@ -62,7 +62,7 @@ class WebWindow : public QWidget
Q_OBJECT
public:
- WebWindow(QWidget *parent = 0, bool isPrivateBrowsing = false, WebPage *pg = 0);
+ explicit WebWindow(QWidget *parent = 0, bool isPrivateBrowsing = false, WebPage *pg = 0);
~WebWindow();
void load(const QUrl &);