summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/bookmarks.cpp1
-rw-r--r--src/history.cpp8
-rw-r--r--src/history.h2
-rw-r--r--src/main.cpp28
-rw-r--r--src/mainview.h2
-rw-r--r--src/mainwindow.cpp11
-rw-r--r--src/networkaccessmanager.cpp35
-rw-r--r--src/searchbar.cpp2
-rw-r--r--src/settings.cpp13
-rw-r--r--src/settings_general.ui4
-rw-r--r--src/settings_webkit.ui2
-rw-r--r--src/webview.cpp2
12 files changed, 51 insertions, 59 deletions
diff --git a/src/bookmarks.cpp b/src/bookmarks.cpp
index c7f4da98..eb500985 100644
--- a/src/bookmarks.cpp
+++ b/src/bookmarks.cpp
@@ -275,4 +275,3 @@ KAction* BookmarkProvider::bookmarkToolBarAction()
bookmarkToolBarAction->setShortcutConfigurable(false);
return bookmarkToolBarAction;
}
-
diff --git a/src/history.cpp b/src/history.cpp
index 2bab72d8..fac13b48 100644
--- a/src/history.cpp
+++ b/src/history.cpp
@@ -124,7 +124,7 @@ void HistoryManager::setHistory(const QList<HistoryItem> &history, bool loadedAn
}
else
{
- m_lastSavedUrl = QString();
+ m_lastSavedUrl.clear();
m_saveTimer->changeOccurred();
}
emit historyReset();
@@ -174,7 +174,7 @@ void HistoryManager::checkForExpired()
break;
HistoryItem item = m_history.takeLast();
// remove from saved file also
- m_lastSavedUrl = QString();
+ m_lastSavedUrl.clear();
emit entryRemoved(item);
}
@@ -254,7 +254,7 @@ void HistoryManager::setHistoryLimit(int limit)
void HistoryManager::clear()
{
m_history.clear();
- m_lastSavedUrl = QString();
+ m_lastSavedUrl.clear();
m_saveTimer->changeOccurred();
m_saveTimer->saveIfNeccessary();
historyReset();
@@ -341,7 +341,7 @@ void HistoryManager::load()
// If we had to sort re-write the whole history sorted
if (needToSort)
{
- m_lastSavedUrl = QString();
+ m_lastSavedUrl.clear();
m_saveTimer->changeOccurred();
}
}
diff --git a/src/history.h b/src/history.h
index 1bc1aa91..7b3cbec9 100644
--- a/src/history.h
+++ b/src/history.h
@@ -397,7 +397,7 @@ signals:
void openUrl(const KUrl &url);
public:
- HistoryDialog(QWidget *parent = 0, HistoryManager *history = 0);
+ explicit HistoryDialog(QWidget *parent = 0, HistoryManager *history = 0);
private slots:
void customContextMenuRequested(const QPoint &pos);
diff --git a/src/main.cpp b/src/main.cpp
index 4dcdd902..600961c5 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -26,10 +26,10 @@
static const char description[] =
- I18N_NOOP("KDE Browser Webkit Based");
+ I18N_NOOP("Webkit Based Browser for KDE");
-static const char version[] = "0.1alpha";
+static const char version[] = "0.1";
int main(int argc, char **argv)
@@ -48,12 +48,12 @@ int main(int argc, char **argv)
// about authors
about.addAuthor(ki18n("Andrea Diamantini"),
- ki18n("Project Lead, Developer, Italian translation"),
+ ki18n("Project Lead, Developer"),
"adjam7@gmail.com",
"http://www.adjam.org");
about.addAuthor(ki18n("Domrachev Alexandr"),
- ki18n("Developer, Russian translation"),
+ ki18n("Developer"),
"alexandr.domrachev@gmail.com",
"");
@@ -62,26 +62,6 @@ int main(int argc, char **argv)
"kojots350@gmail.com",
"");
- about.addAuthor(ki18n("Panagiotis Papadopoulos"),
- ki18n("German translation"),
- "pano_90@gmx.net",
- "");
-
- about.addAuthor(ki18n("Juan Pablo Scaletti"),
- ki18n("Spanish translation"),
- "juanpablo@jpscaletti.com",
- "");
-
- about.addAuthor(ki18n("Eelko Berkenpies"),
- ki18n("Dutch translation"),
- "kaboon@gmail.com",
- "");
-
- about.addAuthor(ki18n("Alain Laporte"),
- ki18n("French translation"),
- "alain_laporte123@yahoo.fr",
- "");
-
// Initialize command line args
KCmdLineArgs::init(argc, argv, &about);
diff --git a/src/mainview.h b/src/mainview.h
index d3d4948d..16d450d3 100644
--- a/src/mainview.h
+++ b/src/mainview.h
@@ -152,7 +152,7 @@ private slots:
void windowCloseRequested();
/**
- * This functions move tab informations "from index to index"
+ * This functions move tab info "from index to index"
*
* @param fromIndex the index from which we move
*
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp
index 5ffaa208..adc6fc87 100644
--- a/src/mainwindow.cpp
+++ b/src/mainwindow.cpp
@@ -68,6 +68,7 @@
#include <QtCore/QRect>
#include <QtCore/QSize>
#include <QtCore/QList>
+#include <QtCore/QPointer>
#include <QtGui/QWidget>
#include <QtGui/QVBoxLayout>
@@ -497,12 +498,13 @@ void MainWindow::slotPreferences()
return;
// we didn't find an instance of this dialog, so lets create it
- SettingsDialog *s = new SettingsDialog(this);
+ QPointer<SettingsDialog> s = new SettingsDialog(this);
// keep us informed when the user changes settings
connect(s, SIGNAL(settingsChanged(const QString&)), this, SLOT(slotUpdateBrowser()));
s->exec();
+ delete s;
}
@@ -571,9 +573,13 @@ void MainWindow::printRequested(QWebFrame *frame)
{
QPrinter printer;
- QPrintDialog *dialog = KdePrint::createPrintDialog(&printer, this);
+ QPointer<QPrintDialog> dialog = KdePrint::createPrintDialog(&printer, this);
if (dialog->exec() != QDialog::Accepted)
+ {
+ delete dialog;
return;
+ }
+ delete dialog;
frame->print(&printer);
}
@@ -946,4 +952,3 @@ QAction *MainWindow::actionByName(const QString name)
return new QAction(this); // return empty object instead of NULL pointer
}
-
diff --git a/src/networkaccessmanager.cpp b/src/networkaccessmanager.cpp
index deae42dd..0de1dde0 100644
--- a/src/networkaccessmanager.cpp
+++ b/src/networkaccessmanager.cpp
@@ -39,13 +39,16 @@
#include <KStandardDirs>
// Qt Includes
-#include <QDialog>
-#include <QStyle>
-#include <QTextDocument>
-#include <QAuthenticator>
-#include <QNetworkProxy>
-#include <QNetworkReply>
-#include <QSslError>
+#include <QtCore/QPointer>
+
+#include <QtGui/QDialog>
+#include <QtGui/QStyle>
+#include <QtGui/QTextDocument>
+
+#include <QtNetwork/QAuthenticator>
+#include <QtNetwork/QNetworkProxy>
+#include <QtNetwork/QNetworkReply>
+#include <QtNetwork/QSslError>
NetworkAccessManager::NetworkAccessManager(QObject *parent)
@@ -97,14 +100,14 @@ void NetworkAccessManager::authenticationRequired(QNetworkReply *reply, QAuthent
{
MainWindow *mainWindow = Application::instance()->mainWindow();
- KDialog dialog(mainWindow, Qt::Sheet);
- dialog.setButtons(KDialog::Ok | KDialog::Cancel);
+ QPointer<KDialog> dialog = new KDialog(mainWindow, Qt::Sheet);
+ dialog->setButtons(KDialog::Ok | KDialog::Cancel);
Ui::passwordWidget passwordWidget;
QWidget widget;
passwordWidget.setupUi(&widget);
- dialog.setMainWidget(&widget);
+ dialog->setMainWidget(&widget);
passwordWidget.iconLabel->setText(QString());
passwordWidget.iconLabel->setPixmap(mainWindow->style()->standardIcon(QStyle::SP_MessageBoxQuestion, 0, mainWindow).pixmap(32, 32));
@@ -115,11 +118,12 @@ void NetworkAccessManager::authenticationRequired(QNetworkReply *reply, QAuthent
passwordWidget.introLabel->setText(introMessage);
passwordWidget.introLabel->setWordWrap(true);
- if (dialog.exec() == QDialog::Accepted)
+ if (dialog->exec() == QDialog::Accepted)
{
auth->setUser(passwordWidget.userNameLineEdit->text());
auth->setPassword(passwordWidget.passwordLineEdit->text());
}
+ delete dialog;
}
@@ -127,14 +131,14 @@ void NetworkAccessManager::proxyAuthenticationRequired(const QNetworkProxy &prox
{
MainWindow *mainWindow = Application::instance()->mainWindow();
- KDialog dialog(mainWindow, Qt::Sheet);
- dialog.setButtons(KDialog::Ok | KDialog::Cancel);
+ QPointer<KDialog> dialog = new KDialog(mainWindow, Qt::Sheet);
+ dialog->setButtons(KDialog::Ok | KDialog::Cancel);
Ui::proxyWidget proxyWdg;
QWidget widget;
proxyWdg.setupUi(&widget);
- dialog.setMainWidget(&widget);
+ dialog->setMainWidget(&widget);
proxyWdg.iconLabel->setText(QString());
proxyWdg.iconLabel->setPixmap(mainWindow->style()->standardIcon(QStyle::SP_MessageBoxQuestion, 0, mainWindow).pixmap(32, 32));
@@ -143,11 +147,12 @@ void NetworkAccessManager::proxyAuthenticationRequired(const QNetworkProxy &prox
proxyWdg.introLabel->setText(introMessage);
proxyWdg.introLabel->setWordWrap(true);
- if (dialog.exec() == QDialog::Accepted)
+ if (dialog->exec() == QDialog::Accepted)
{
auth->setUser(proxyWdg.userNameLineEdit->text());
auth->setPassword(proxyWdg.passwordLineEdit->text());
}
+ delete dialog;
}
diff --git a/src/searchbar.cpp b/src/searchbar.cpp
index 2110b4d9..9f6b306d 100644
--- a/src/searchbar.cpp
+++ b/src/searchbar.cpp
@@ -55,7 +55,7 @@ SearchBar::SearchBar(QWidget *parent) :
setClearButtonShown(true);
// better solution than using QPalette(s)..
- setClickMessage(i18n("Search.."));
+ setClickMessage(i18n("Search..."));
// setting QNetworkAccessManager..
connect(m_networkAccessManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(handleNetworkData(QNetworkReply*)));
diff --git a/src/settings.cpp b/src/settings.cpp
index bf1f2e38..198ab3e0 100644
--- a/src/settings.cpp
+++ b/src/settings.cpp
@@ -51,6 +51,7 @@
#include <KUrl>
// Qt Includes
+#include <QtCore/QPointer>
#include <QtGui/QWidget>
@@ -142,11 +143,11 @@ SettingsDialog::~SettingsDialog()
void SettingsDialog::setWebSettingsToolTips()
{
d->webkitUi.kcfg_autoLoadImages->setToolTip(i18n("Specifies whether images are automatically loaded in web pages"));
- d->webkitUi.kcfg_javascriptEnabled->setToolTip(i18n("Enables the running of JavaScript programs."));
+ d->webkitUi.kcfg_javascriptEnabled->setToolTip(i18n("Enables the execution of JavaScript programs."));
d->webkitUi.kcfg_javaEnabled->setToolTip(i18n("Enables Java applets."));
d->webkitUi.kcfg_pluginsEnabled->setToolTip(i18n("Enables plugins in web pages."));
- d->webkitUi.kcfg_javascriptCanOpenWindows->setToolTip(i18n("Allows JavaScript programs to opening new windows."));
- d->webkitUi.kcfg_javascriptCanAccessClipboard->setToolTip(i18n("Allows JavaScript programs to reading/writing to the clipboard."));
+ d->webkitUi.kcfg_javascriptCanOpenWindows->setToolTip(i18n("Allows JavaScript programs to open new windows."));
+ d->webkitUi.kcfg_javascriptCanAccessClipboard->setToolTip(i18n("Allows JavaScript programs to read from and to write to the clipboard."));
d->webkitUi.kcfg_linksIncludedInFocusChain->setToolTip(i18n("Includes hyperlinks in the keyboard focus chain."));
d->webkitUi.kcfg_zoomTextOnly->setToolTip(i18n("Applies the zoom factor on a frame to only the text or all content."));
d->webkitUi.kcfg_printElementBackgrounds->setToolTip(i18n("Draws also background color and images when the page is printed."));
@@ -190,15 +191,17 @@ void SettingsDialog::saveSettings()
void SettingsDialog::showCookies()
{
- CookiesDialog *dialog = new CookiesDialog(Application::cookieJar(), this);
+ QPointer<CookiesDialog> dialog = new CookiesDialog(Application::cookieJar(), this);
dialog->exec();
+ delete dialog;
}
void SettingsDialog::showExceptions()
{
- CookiesExceptionsDialog *dialog = new CookiesExceptionsDialog(Application::cookieJar(), this);
+ QPointer<CookiesExceptionsDialog> dialog = new CookiesExceptionsDialog(Application::cookieJar(), this);
dialog->exec();
+ delete dialog;
}
diff --git a/src/settings_general.ui b/src/settings_general.ui
index 44561b02..f9d272c6 100644
--- a/src/settings_general.ui
+++ b/src/settings_general.ui
@@ -23,7 +23,7 @@
<item row="0" column="0">
<widget class="QLabel" name="label_3">
<property name="text">
- <string>Home Page:</string>
+ <string>Home page:</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
@@ -80,7 +80,7 @@
<item row="3" column="1">
<widget class="QCheckBox" name="kcfg_downloadToDefaultDir">
<property name="text">
- <string>ask where saving downloads</string>
+ <string>ask where to save downloads</string>
</property>
</widget>
</item>
diff --git a/src/settings_webkit.ui b/src/settings_webkit.ui
index 56ce7839..32a9c0c9 100644
--- a/src/settings_webkit.ui
+++ b/src/settings_webkit.ui
@@ -20,7 +20,7 @@
<item row="0" column="0">
<widget class="QCheckBox" name="kcfg_autoLoadImages">
<property name="text">
- <string>Auto Load Images</string>
+ <string>Autoload Images</string>
</property>
</widget>
</item>
diff --git a/src/webview.cpp b/src/webview.cpp
index 4ae3986f..055f2f7d 100644
--- a/src/webview.cpp
+++ b/src/webview.cpp
@@ -143,7 +143,7 @@ bool WebPage::acceptNavigationRequest(QWebFrame *frame, const QNetworkRequest &r
// should be nothing..
default:
- kDebug() << "Default NON existant case..";
+ kDebug() << "Default NON extant case..";
break;
}