[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: playground/network/rekonq/src
From: Andrea Diamantini <adjam7 () gmail ! com>
Date: 2009-08-09 23:28:46
Message-ID: 1249860526.214642.21264.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 1009424 by adjam:
- Last Krazy fixes
- removed old unuseful cookie classes
- fixed popup bugs
M +0 -3 CMakeLists.txt
M +9 -5 application.cpp
M +2 -0 autosaver.cpp
D edittableview.cpp
D edittableview.h
D edittreeview.cpp
D edittreeview.h
M +4 -0 history.cpp
M +1 -0 mainview.cpp
M +3 -3 mainview.h
M +8 -5 mainwindow.cpp
M +3 -3 networkaccessmanager.cpp
M +14 -7 networkaccessmanager.h
M +2 -2 password.ui
M +2 -2 proxy.ui
M +5 -5 rekonq.kcfg
M +0 -8 settings.cpp
M +2 -1 settings.h
M +58 -0 settings_general.ui
D settings_privacy.ui
M +1 -8 settings_proxy.ui
M +0 -6 tabbar.cpp
M +1 -1 urlbar.cpp
M +2 -2 webview.cpp
--- trunk/playground/network/rekonq/src/CMakeLists.txt #1009423:1009424
@@ -8,8 +8,6 @@
mainview.cpp
tabbar.cpp
cookiejar.cpp
- edittableview.cpp
- edittreeview.cpp
history.cpp
historymenu.cpp
bookmarks.cpp
@@ -32,7 +30,6 @@
proxy.ui
settings_general.ui
settings_fonts.ui
- settings_privacy.ui
settings_proxy.ui
settings_webkit.ui
cleardata.ui
--- trunk/playground/network/rekonq/src/application.cpp #1009423:1009424
@@ -284,7 +284,7 @@
}
else
{
- loadingUrl.setUrl(fn);
+ loadingUrl.setUrl(url.fileName());
loadingUrl.setScheme("gg");
}
}
@@ -298,7 +298,7 @@
{
loadingUrl = data.uri().url();
}
-
+
if ( !KProtocolInfo::isKnownProtocol( loadingUrl ) )
{
KMessageBox::error(0, i18n("Protocol not supported\n%1", url.protocol()));
@@ -306,25 +306,29 @@
}
WebView *webView;
-
+
switch(type)
{
case Rekonq::SettingOpenTab:
webView = m_mainWindow->mainView()->newTab(!ReKonfig::openTabsBack());
+ if (!ReKonfig::openTabsBack())
+ {
+ m_mainWindow->mainView()->currentUrlBar()->setUrl(loadingUrl.prettyUrl());
+ }
break;
case Rekonq::NewCurrentTab:
webView = m_mainWindow->mainView()->newTab(true);
+ m_mainWindow->mainView()->currentUrlBar()->setUrl(loadingUrl.prettyUrl());
break;
case Rekonq::NewBackTab:
webView = m_mainWindow->mainView()->newTab(false);
break;
case Rekonq::CurrentTab:
webView = m_mainWindow->mainView()->currentWebView();
+ m_mainWindow->mainView()->currentUrlBar()->setUrl(loadingUrl.prettyUrl());
break;
};
- m_mainWindow->mainView()->currentUrlBar()->setUrl(loadingUrl.prettyUrl());
-
if (webView)
{
webView->setFocus();
--- trunk/playground/network/rekonq/src/autosaver.cpp #1009423:1009424
@@ -51,7 +51,9 @@
AutoSaver::~AutoSaver()
{
if (m_timer.isActive())
+ {
kWarning() << "AutoSaver: still active when destroyed, changes not saved.";
+ }
}
--- trunk/playground/network/rekonq/src/history.cpp #1009423:1009424
@@ -408,9 +408,13 @@
if (saveAll)
{
if (historyFile.exists() && !historyFile.remove())
+ {
kWarning() << "History: error removing old history." << \
historyFile.errorString(); + }
if (!tempFile.rename(historyFile.fileName()))
+ {
kWarning() << "History: error moving new history over old." << \
tempFile.errorString() << historyFile.fileName(); + }
}
m_lastSavedUrl = m_history.value(0).url;
}
--- trunk/playground/network/rekonq/src/mainview.cpp #1009423:1009424
@@ -324,6 +324,7 @@
emit setCurrentTitle(webView->title());
m_urlBars->setCurrentIndex(index);
+ currentUrlBar()->setUrl(webView->url());
emit showStatusBarMessage(webView->lastStatusBarText());
// set focus to the current webview
--- trunk/playground/network/rekonq/src/mainview.h #1009423:1009424
@@ -26,8 +26,8 @@
* ============================================================ */
-#ifndef TABWIDGET_H
-#define TABWIDGET_H
+#ifndef MAINVIEW_H
+#define MAINVIEW_H
// Local Includes
#include "webview.h"
@@ -179,4 +179,4 @@
QToolButton *m_addTabButton;
};
-#endif
+#endif // MAINVIEW_H
--- trunk/playground/network/rekonq/src/mainwindow.cpp #1009423:1009424
@@ -367,7 +367,7 @@
void MainWindow::setupSidePanel()
{
// Setup history side panel
- m_sidePanel = new SidePanel(i18n("History"), this);
+ m_sidePanel = new SidePanel(i18n("History Panel"), this);
connect(m_sidePanel, SIGNAL(openUrl(const KUrl&)), Application::instance(), \
SLOT(loadUrl(const KUrl&)));
connect(m_sidePanel, SIGNAL(destroyed()), Application::instance(), \
SLOT(slotSaveConfiguration()));
@@ -375,7 +375,6 @@
// setup side panel actions
KAction* a = (KAction *) m_sidePanel->toggleViewAction();
- a->setText( i18n("History Panel") );
a->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_H)); // WARNING : is this the \
right shortcut ?? a->setIcon(KIcon("view-history"));
actionCollection()->addAction(QLatin1String("show_history_panel"), a);
@@ -451,7 +450,6 @@
// ====== load Settings on main classes
Application::networkAccessManager()->loadSettings();
-// FIXME (?) Application::cookieJar()->loadSettings();
Application::historyManager()->loadSettings();
}
@@ -908,12 +906,13 @@
return;
}
- if(m_popup)
- delete m_popup;
+ KPassivePopup *popup_sav = m_popup;
m_popup = new KPassivePopup(this);
m_popup->setAutoDelete(true);
+ connect(Application::instance(), SIGNAL(focusChanged(QWidget*,QWidget*)), \
m_popup, SLOT(hide())); +
QPixmap px;
QString pixPath;
@@ -953,6 +952,10 @@
QPoint p(x,y);
m_popup->show(p);
+
+ if(popup_sav)
+ delete popup_sav;
+
}
--- trunk/playground/network/rekonq/src/networkaccessmanager.cpp #1009423:1009424
@@ -56,7 +56,7 @@
NetworkAccessManager::NetworkAccessManager(QObject *parent)
- : QNetworkAccessManager(parent)
+ : RekonqAccessManager(parent)
, m_diskCache(0)
{
connect(this, SIGNAL(authenticationRequired(QNetworkReply*, QAuthenticator*)),
@@ -153,7 +153,7 @@
auth->setUser(passwordWidget.userNameLineEdit->text());
auth->setPassword(passwordWidget.passwordLineEdit->text());
}
- delete dialog;
+ dialog->deleteLater();
}
@@ -182,7 +182,7 @@
auth->setUser(proxyWdg.userNameLineEdit->text());
auth->setPassword(proxyWdg.passwordLineEdit->text());
}
- delete dialog;
+ dialog->deleteLater();
}
--- trunk/playground/network/rekonq/src/networkaccessmanager.h #1009423:1009424
@@ -24,18 +24,25 @@
* ============================================================ */
-#ifndef NETWORKMANAGER_H
-#define NETWORKMANAGER_H
+#ifndef NETWORKACCESSMANAGER_H
+#define NETWORKACCESSMANAGER_H
-// KDE Includes
-// #include <KIO/AccessManager>
-#include <QtNetwork/QNetworkAccessManager>
+#include <kdeversion.h>
+#if KDE_IS_VERSION(4, 2, 70)
+ #include <kio/accessmanager.h>
+ using namespace KIO;
+ typedef AccessManager RekonqAccessManager;
+#else
+ #include <QtNetwork/QNetworkAccessManager>
+ typedef QNetworkAccessManager RekonqAccessManager;
+#endif
+
// Forward Declarations
class QNetworkDiskCache;
-class NetworkAccessManager : public QNetworkAccessManager
+class NetworkAccessManager : public RekonqAccessManager
{
Q_OBJECT
@@ -59,4 +66,4 @@
QNetworkDiskCache *m_diskCache;
};
-#endif // NETWORKMANAGER_H
+#endif // NETWORKACCESSMANAGER_H
--- trunk/playground/network/rekonq/src/password.ui #1009423:1009424
@@ -43,7 +43,7 @@
</widget>
</item>
<item row="1" column="1">
- <widget class="QLineEdit" name="userNameLineEdit"/>
+ <widget class="KLineEdit" name="userNameLineEdit"/>
</item>
<item row="2" column="0">
<widget class="QLabel" name="lblPassword">
@@ -53,7 +53,7 @@
</widget>
</item>
<item row="2" column="1">
- <widget class="QLineEdit" name="passwordLineEdit">
+ <widget class="KLineEdit" name="passwordLineEdit">
<property name="echoMode">
<enum>QLineEdit::Password</enum>
</property>
--- trunk/playground/network/rekonq/src/proxy.ui #1009423:1009424
@@ -36,7 +36,7 @@
</widget>
</item>
<item row="1" column="2">
- <widget class="QLineEdit" name="userNameLineEdit"/>
+ <widget class="KLineEdit" name="userNameLineEdit"/>
</item>
<item row="2" column="0" colspan="2">
<widget class="QLabel" name="passwordLabel">
@@ -46,7 +46,7 @@
</widget>
</item>
<item row="2" column="2">
- <widget class="QLineEdit" name="passwordLineEdit">
+ <widget class="KLineEdit" name="passwordLineEdit">
<property name="echoMode">
<enum>QLineEdit::Password</enum>
</property>
--- trunk/playground/network/rekonq/src/rekonq.kcfg #1009423:1009424
@@ -1,14 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
-<kcfg xmlns="http://www.kde.org/standards/kcfg/1.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://www.kde.org/standards/kcfg/1.0
- http://www.kde.org/standards/kcfg/1.0/kcfg.xsd" >
- <kcfgfile name="rekonqrc"/>
+<!DOCTYPE kcfg SYSTEM "http://www.kde.org/standards/kcfg/1.0/kcfg.dtd">
+<kcfg>
<!-- Includes -->
<include>QtWebKit</include>
<include>KUrl</include>
+<kcfgfile name="rekonqrc"/>
+
+
<!-- General Settings -->
<group name="General">
<entry name="homePage" type="String">
--- trunk/playground/network/rekonq/src/settings.cpp #1009423:1009424
@@ -43,7 +43,6 @@
//Ui Includes
#include "ui_settings_general.h"
#include "ui_settings_fonts.h"
-#include "ui_settings_privacy.h"
#include "ui_settings_proxy.h"
#include "ui_settings_webkit.h"
@@ -65,7 +64,6 @@
private:
Ui::general generalUi;
Ui::fonts fontsUi;
- Ui::privacy privacyUi;
Ui::proxy proxyUi;
Ui::webkit webkitUi;
KCModuleProxy *ebrowsingModule;
@@ -94,12 +92,6 @@
pageItem = parent->addPage(widget , i18n("Fonts"));
pageItem->setIcon(KIcon("preferences-desktop-font"));
- widget = new QWidget;
- privacyUi.setupUi(widget);
- widget->layout()->setMargin(0);
- pageItem = parent->addPage(widget , i18n("History"));
- pageItem->setIcon(KIcon("view-history"));
-
KCModuleInfo cookiesInfo("cookies.desktop");
cookiesModule = new KCModuleProxy(cookiesInfo,parent);
pageItem = parent->addPage(cookiesModule, \
i18n(cookiesInfo.moduleName().toLocal8Bit()));
--- trunk/playground/network/rekonq/src/settings.h #1009423:1009424
@@ -43,7 +43,8 @@
public:
SettingsDialog(QWidget *parent = 0);
~SettingsDialog();
- virtual bool hasChanged ();
+
+ virtual bool hasChanged();
private:
Private* const d;
--- trunk/playground/network/rekonq/src/settings_general.ui #1009423:1009424
@@ -107,6 +107,59 @@
</widget>
</item>
<item>
+ <widget class="QGroupBox" name="groupBox_4">
+ <property name="title">
+ <string>History</string>
+ </property>
+ <layout class="QGridLayout" name="gridLayout_2">
+ <item row="0" column="0">
+ <widget class="QLabel" name="label_4">
+ <property name="text">
+ <string>Remove history items:</string>
+ </property>
+ <property name="alignment">
+ <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="1">
+ <widget class="KComboBox" name="kcfg_expireHistory">
+ <item>
+ <property name="text">
+ <string>After one day</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>After one week</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>After two weeks</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>After one month</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>After one year</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Manually</string>
+ </property>
+ </item>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ <item>
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
@@ -127,6 +180,11 @@
<extends>QLineEdit</extends>
<header>klineedit.h</header>
</customwidget>
+ <customwidget>
+ <class>KComboBox</class>
+ <extends>QComboBox</extends>
+ <header>kcombobox.h</header>
+ </customwidget>
</customwidgets>
<resources/>
<connections/>
--- trunk/playground/network/rekonq/src/settings_proxy.ui #1009423:1009424
@@ -37,7 +37,7 @@
</widget>
</item>
<item row="1" column="1" colspan="2" >
- <widget class="QComboBox" name="kcfg_proxyType" >
+ <widget class="KComboBox" name="kcfg_proxyType" >
<item>
<property name="text" >
<string>SOCKS 5</string>
@@ -140,13 +140,6 @@
</item>
</layout>
</widget>
- <customwidgets>
- <customwidget>
- <class>KLineEdit</class>
- <extends>QLineEdit</extends>
- <header>klineedit.h</header>
- </customwidget>
- </customwidgets>
<resources/>
<connections/>
</ui>
--- trunk/playground/network/rekonq/src/tabbar.cpp #1009423:1009424
@@ -60,12 +60,6 @@
setMovable(true);
connect(this, SIGNAL(customContextMenuRequested(const QPoint &)), this,
SLOT(contextMenuRequested(const QPoint &)));
-
- // tabbar font
- QFont standardFont = KGlobalSettings::generalFont();
- QString fontFamily = standardFont.family();
- int dim = standardFont.pointSize();
- setFont(QFont(fontFamily, dim - 1));
}
--- trunk/playground/network/rekonq/src/urlbar.cpp #1009423:1009424
@@ -225,7 +225,7 @@
painter.setPen(Qt::transparent);
QRect backgroundRect = lineEdit()->frameGeometry();
- int mid = backgroundRect.width() / 100 * m_progress;
+ int mid = backgroundRect.width() * m_progress / 100;
QRect progressRect(backgroundRect.x(), backgroundRect.y(), mid, \
backgroundRect.height()); painter.drawRect(progressRect);
painter.end();
--- trunk/playground/network/rekonq/src/webview.cpp #1009423:1009424
@@ -164,7 +164,7 @@
QString keywordDelimiter = cg.readEntry("KeywordDelimiter", ":");
KService::Ptr service;
KUriFilterData data;
- foreach (QString engine, favoriteEngines)
+ foreach (const QString &engine, favoriteEngines)
{
service = \
KService::serviceByDesktopPath(QString("searchproviders/%1.desktop").arg(engine));
const QString searchProviderPrefix = \
*(service->property("Keys").toStringList().begin()) + keywordDelimiter; @@ -208,7 \
+208,7 @@ QString keywordDelimiter = cg.readEntry("KeywordDelimiter", ":");
KService::Ptr service;
KUriFilterData data;
- foreach (QString engine, favoriteEngines)
+ foreach (const QString &engine, favoriteEngines)
{
service = \
KService::serviceByDesktopPath(QString("searchproviders/%1.desktop").arg(engine));
const QString searchProviderPrefix = \
*(service->property("Keys").toStringList().begin()) + keywordDelimiter;
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic