Hello community,
here is the log from the commit of package kde4-webkitpart
checked in at Mon Sep 15 17:56:19 CEST 2008.
--------
--- KDE/kde4-webkitpart/kde4-webkitpart.changes 2008-08-23 20:09:24.000000000 +0200
+++ /mounts/work_src_done/STABLE/kde4-webkitpart/kde4-webkitpart.changes 2008-09-02 11:37:15.000000000 +0200
@@ -1,0 +2,5 @@
+Tue Sep 2 11:36:37 CEST 2008 - stbinner@suse.de
+
+- update to SVN r856106
+
+-------------------------------------------------------------------
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ kde4-webkitpart.spec ++++++
--- /var/tmp/diff_new_pack.bd7023/_old 2008-09-15 17:56:12.000000000 +0200
+++ /var/tmp/diff_new_pack.bd7023/_new 2008-09-15 17:56:12.000000000 +0200
@@ -1,5 +1,5 @@
#
-# spec file for package kde4-webkitpart (Version 4.1.0.svn851465)
+# spec file for package kde4-webkitpart (Version 4.1.1.svn856106)
#
# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
@@ -23,7 +23,7 @@
License: LGPL v2.0 or later; LGPL v2.1 or later
Group: System/GUI/KDE
Summary: WebKit render engine for Konqueror
-Version: 4.1.0.svn851465
+Version: 4.1.1.svn856106
Release: 1
Source0: libs.tar.bz2
BuildRoot: %{_tmppath}/%{name}-%{version}-build
@@ -63,15 +63,25 @@
%defattr(-,root,root)
/usr/include/KDE/WebKitKde
/usr/include/webkitkde
+/usr/include/KDE/KdeNetwork/KNetworkAccessManager
+/usr/include/KDE/KdeNetwork/KNetworkReply
+/usr/include/kdenetwork/knetworkaccessmanager.h
+/usr/include/kdenetwork/knetworkreply.h
/usr/%_lib/kde4/webkitkdepart.so
/usr/%_lib/libkdewebkit.so
/usr/%_lib/libkdewebkit.so.*
+/usr/%_lib/libkdenetwork.so
+/usr/%_lib/libkdenetwork.so.*
+/usr/%_lib/libwebkitkde.so
+/usr/%_lib/libwebkitkde.so.*
/usr/share/kde4/apps/cmake/modules/FindWebKitKde.cmake
/usr/share/kde4/apps/webkitpart
/usr/share/kde4/services/webkitpart.desktop
/usr/share/icons/hicolor/*/apps/webkit.*
%changelog
+* Tue Sep 02 2008 stbinner@suse.de
+- update to SVN r856106
* Sat Aug 23 2008 stbinner@suse.de
- update to SVN r851465
* Fri Jul 25 2008 stbinner@suse.de
++++++ libs.tar.bz2 ++++++
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libs/webkitkde/cmake/modules/FindWebKitKde.cmake new/libs/webkitkde/cmake/modules/FindWebKitKde.cmake
--- old/libs/webkitkde/cmake/modules/FindWebKitKde.cmake 2008-08-23 19:01:02.000000000 +0200
+++ new/libs/webkitkde/cmake/modules/FindWebKitKde.cmake 2008-09-01 21:02:40.000000000 +0200
@@ -32,14 +32,24 @@
PATH_SUFFIXES webkitkde
)
-FIND_LIBRARY(WEBKITKDE_LIBRARIES NAMES kdewebkit
+FIND_LIBRARY(WEBKITKDE_LIBRARY NAMES webkitkde
PATHS
${_WebKitKdeLinkDir}
${KDE4_LIB_INSTALL_DIR}
)
+FIND_LIBRARY(KDEWEBKIT_LIBRARY NAMES kdewebkit
+ PATHS
+ ${_WebKitKdeLinkDir}
+ ${KDE4_LIB_INSTALL_DIR}
+)
+
+if( KDEWEBKIT_LIBRARY AND WEBKITKDE_LIBRARY)
+ set(WEBKITKDE_LIBRARIES ${KDEWEBKIT_LIBRARY} ${WEBKITKDE_LIBRARY})
+endif( KDEWEBKIT_LIBRARY AND WEBKITKDE_LIBRARY)
+
include(FindPackageHandleStandardArgs)
-FIND_PACKAGE_HANDLE_STANDARD_ARGS(WebKitKde DEFAULT_MSG WEBKITKDE_INCLUDE_DIR WEBKITKDE_LIBARIES )
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(WebKitKde DEFAULT_MSG WEBKITKDE_INCLUDE_DIR WEBKITKDE_LIBRARIES )
# show the WEBKITKDE_INCLUDE_DIR and WEBKITKDE_LIBRARIES variables only in the advanced view
MARK_AS_ADVANCED(WEBKITKDE_INCLUDE_DIR WEBKITKDE_LIBRARIES)
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libs/webkitkde/CMakeLists.txt new/libs/webkitkde/CMakeLists.txt
--- old/libs/webkitkde/CMakeLists.txt 2008-08-23 19:01:02.000000000 +0200
+++ new/libs/webkitkde/CMakeLists.txt 2008-09-01 21:02:40.000000000 +0200
@@ -19,16 +19,27 @@
${CMAKE_CURRENT_SOURCE_DIR}/kdewebkit/
)
-set(webkitpart_SRCS
+set(webkitkde_LIB_SRCS
webkitpart.cpp
webview.cpp
webpage.cpp
- webkitpartfactory.cpp
-)
+ )
+
+kde4_add_library(webkitkde SHARED ${webkitkde_LIB_SRCS})
+
+target_link_libraries(webkitkde kdewebkit ${KDE4_KPARTS_LIBS} ${QT_QTWEBKIT_LIBRARY})
+
+set_target_properties(webkitkde PROPERTIES VERSION 1.0.0 SOVERSION 1)
+
+install(TARGETS webkitkde ${INSTALL_TARGETS_DEFAULT_ARGS})
+
+
+
+kde4_add_plugin(webkitkdepart webkitpartfactory.cpp)
-kde4_add_plugin(webkitkdepart ${webkitpart_SRCS})
+target_link_libraries(webkitkdepart webkitkde)
-target_link_libraries(webkitkdepart kdewebkit ${KDE4_KPARTS_LIBS})
+target_link_libraries(webkitkdepart kdewebkit ${KDE4_KPARTS_LIBS} ${QT_QTWEBKIT_LIBRARY})
install(FILES
webkitkde_export.h
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libs/webkitkde/includes/CMakeLists.txt new/libs/webkitkde/includes/CMakeLists.txt
--- old/libs/webkitkde/includes/CMakeLists.txt 2008-08-23 06:39:59.000000000 +0200
+++ new/libs/webkitkde/includes/CMakeLists.txt 2008-08-27 01:39:32.000000000 +0200
@@ -1,7 +1,4 @@
install(FILES
WebKitPart
WebView
- KWebView
- KWebPage
- KWebPluginFactory
DESTINATION ${INCLUDE_INSTALL_DIR}/KDE/WebKitKde)
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libs/webkitkde/includes/KWebPage new/libs/webkitkde/includes/KWebPage
--- old/libs/webkitkde/includes/KWebPage 2008-08-04 20:16:45.000000000 +0200
+++ new/libs/webkitkde/includes/KWebPage 1970-01-01 01:00:00.000000000 +0100
@@ -1,2 +0,0 @@
-#include "../../webkitkde/kwebpage.h"
-
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libs/webkitkde/includes/KWebPluginFactory new/libs/webkitkde/includes/KWebPluginFactory
--- old/libs/webkitkde/includes/KWebPluginFactory 2008-08-23 06:39:59.000000000 +0200
+++ new/libs/webkitkde/includes/KWebPluginFactory 1970-01-01 01:00:00.000000000 +0100
@@ -1,2 +0,0 @@
-#include "../../webkitkde/kwebpluginfactory.h"
-
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libs/webkitkde/includes/KWebView new/libs/webkitkde/includes/KWebView
--- old/libs/webkitkde/includes/KWebView 2008-08-04 20:16:45.000000000 +0200
+++ new/libs/webkitkde/includes/KWebView 1970-01-01 01:00:00.000000000 +0100
@@ -1,2 +0,0 @@
-#include "../../webkitkde/kwebview.h"
-
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libs/webkitkde/kdewebkit/CMakeLists.txt new/libs/webkitkde/kdewebkit/CMakeLists.txt
--- old/libs/webkitkde/kdewebkit/CMakeLists.txt 2008-08-23 18:51:12.000000000 +0200
+++ new/libs/webkitkde/kdewebkit/CMakeLists.txt 2008-09-01 22:55:45.000000000 +0200
@@ -1,14 +1,23 @@
project(kdewebkit)
+# search packages used by KDE
+find_package(KDE4 REQUIRED)
+include(KDE4Defaults)
+include(MacroLibrary)
+
+include_directories(${KDE4_INCLUDES})
+add_definitions(${QT_DEFINITIONS} ${KDE4_DEFINITIONS})
+
+add_subdirectory(includes)
+add_subdirectory(network)
+
set(kdewebkit_LIB_SRCS
kwebview.cpp
kwebpage.cpp
kwebpluginfactory.cpp
- network/knetworkreply.cpp
- network/knetworkaccessmanager.cpp
searchbar.cpp
settings/webkitsettings.cpp
- webkitglobal.cpp
+ settings/khtml_filter.cpp
)
kde4_add_ui_files(kdewebkit_LIB_SRCS
@@ -18,9 +27,11 @@
kde4_add_library(kdewebkit SHARED ${kdewebkit_LIB_SRCS})
target_link_libraries(kdewebkit
+ kdenetwork
${KDE4_KPARTS_LIBS}
${QT_QTWEBKIT_LIBRARY}
${QT_QTUITOOLS_LIBRARY}
+ ${QT_QTXML_LIBRARY}
)
#set_target_properties(kdewebkit PROPERTIES VERSION ${GENERIC_LIB_VERSION} SOVERSION ${GENERIC_LIB_SOVERSION})
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libs/webkitkde/kdewebkit/includes/CMakeLists.txt new/libs/webkitkde/kdewebkit/includes/CMakeLists.txt
--- old/libs/webkitkde/kdewebkit/includes/CMakeLists.txt 1970-01-01 01:00:00.000000000 +0100
+++ new/libs/webkitkde/kdewebkit/includes/CMakeLists.txt 2008-08-27 01:39:32.000000000 +0200
@@ -0,0 +1,5 @@
+install(FILES
+ KWebView
+ KWebPage
+ KWebPluginFactory
+ DESTINATION ${INCLUDE_INSTALL_DIR}/KDE/WebKitKde)
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libs/webkitkde/kdewebkit/includes/KWebPage new/libs/webkitkde/kdewebkit/includes/KWebPage
--- old/libs/webkitkde/kdewebkit/includes/KWebPage 1970-01-01 01:00:00.000000000 +0100
+++ new/libs/webkitkde/kdewebkit/includes/KWebPage 2008-08-27 01:39:32.000000000 +0200
@@ -0,0 +1,2 @@
+#include "../../webkitkde/kwebpage.h"
+
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libs/webkitkde/kdewebkit/includes/KWebPluginFactory new/libs/webkitkde/kdewebkit/includes/KWebPluginFactory
--- old/libs/webkitkde/kdewebkit/includes/KWebPluginFactory 1970-01-01 01:00:00.000000000 +0100
+++ new/libs/webkitkde/kdewebkit/includes/KWebPluginFactory 2008-08-27 01:39:32.000000000 +0200
@@ -0,0 +1,2 @@
+#include "../../webkitkde/kwebpluginfactory.h"
+
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libs/webkitkde/kdewebkit/includes/KWebView new/libs/webkitkde/kdewebkit/includes/KWebView
--- old/libs/webkitkde/kdewebkit/includes/KWebView 1970-01-01 01:00:00.000000000 +0100
+++ new/libs/webkitkde/kdewebkit/includes/KWebView 2008-08-27 01:39:32.000000000 +0200
@@ -0,0 +1,2 @@
+#include "../../webkitkde/kwebview.h"
+
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libs/webkitkde/kdewebkit/kwebpage.cpp new/libs/webkitkde/kdewebkit/kwebpage.cpp
--- old/libs/webkitkde/kdewebkit/kwebpage.cpp 2008-08-23 19:44:11.000000000 +0200
+++ new/libs/webkitkde/kdewebkit/kwebpage.cpp 2008-08-25 03:16:44.000000000 +0200
@@ -24,7 +24,6 @@
#include "kwebpage.h"
#include "network/knetworkaccessmanager.h"
-#include "webkitglobal.h"
#include "settings/webkitsettings.h"
#include
@@ -101,8 +100,6 @@
settings()->setWebGraphic(QWebSettings::MissingImageGraphic, KIcon("image-missing").pixmap(32, 32));
settings()->setWebGraphic(QWebSettings::DefaultFrameIconGraphic, KIcon("applications-internet").pixmap(32, 32));
const QString host = mainFrame()->url().host();
- settings()->setAttribute(QWebSettings::PluginsEnabled, WebKitGlobal::settings()->isPluginsEnabled(host));
- settings()->setAttribute(QWebSettings::DeveloperExtrasEnabled, WebKitGlobal::settings()->isJavaScriptDebugEnabled(host));
connect(this, SIGNAL(downloadRequested(const QNetworkRequest &)),
this, SLOT(slotDownloadRequested(const QNetworkRequest &)));
@@ -238,7 +235,7 @@
KWebPage *KWebPage::createWindow(WebWindowType type)
{
- if (WebKitGlobal::settings()->windowOpenPolicy(mainFrame()->url().host()) != WebKitSettings::KJSWindowOpenDeny)
+ if (WebKitSettings::self()->windowOpenPolicy(mainFrame()->url().host()) != WebKitSettings::KJSWindowOpenDeny)
return 0;
return newWindow(type);
}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libs/webkitkde/kdewebkit/kwebpluginfactory.cpp new/libs/webkitkde/kdewebkit/kwebpluginfactory.cpp
--- old/libs/webkitkde/kdewebkit/kwebpluginfactory.cpp 2008-08-23 19:44:11.000000000 +0200
+++ new/libs/webkitkde/kdewebkit/kwebpluginfactory.cpp 2008-08-25 03:48:11.000000000 +0200
@@ -35,6 +35,7 @@
{
public:
KWebPluginFactoryPrivate() {}
+ QListKWebPluginFactory::Plugin plugins;
};
KWebPluginFactory::KWebPluginFactory(QObject* parent)
@@ -45,6 +46,7 @@
KWebPluginFactory::~KWebPluginFactory()
{
+ delete d;
}
QObject* KWebPluginFactory::create(const QString& mimeType, const QUrl& url, const QStringList& argumentNames, const QStringList& argumentValues) const
@@ -61,6 +63,7 @@
QListKWebPluginFactory::Plugin KWebPluginFactory::plugins() const
{
+ if (!d->plugins.isEmpty()) return d->plugins;
QList<Plugin> plugins;
KService::List services = KServiceTypeTrader::self()->query("KParts/ReadOnlyPart");
kDebug() << "Asked for list of plugins. Got:";
@@ -87,6 +90,7 @@
plugins.append(plugin);
}
kDebug() << "Total:" << plugins.count();
+ d->plugins = plugins;
return plugins;
}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libs/webkitkde/kdewebkit/network/CMakeLists.txt new/libs/webkitkde/kdewebkit/network/CMakeLists.txt
--- old/libs/webkitkde/kdewebkit/network/CMakeLists.txt 1970-01-01 01:00:00.000000000 +0100
+++ new/libs/webkitkde/kdewebkit/network/CMakeLists.txt 2008-09-01 22:56:23.000000000 +0200
@@ -0,0 +1,33 @@
+project(kdenetwork)
+
+# search packages used by KDE
+find_package(KDE4 REQUIRED)
+include(KDE4Defaults)
+include(MacroLibrary)
+
+include_directories(${KDE4_INCLUDES})
+add_definitions(${QT_DEFINITIONS} ${KDE4_DEFINITIONS})
+
+add_subdirectory(includes)
+
+set(kdenetwork_LIB_SRCS
+ knetworkreply.cpp
+ knetworkaccessmanager.cpp
+)
+
+kde4_add_library(kdenetwork SHARED ${kdenetwork_LIB_SRCS})
+
+target_link_libraries(kdenetwork
+ ${KDE4_KIO_LIBS}
+ ${QT_QTNETWORK_LIBRARY}
+)
+
+#set_target_properties(kdenetwork PROPERTIES VERSION ${GENERIC_LIB_VERSION} SOVERSION ${GENERIC_LIB_SOVERSION})
+set_target_properties(kdenetwork PROPERTIES VERSION 1.0.0 SOVERSION 1) # for the moment keep something low...
+
+install(TARGETS kdenetwork ${INSTALL_TARGETS_DEFAULT_ARGS})
+
+install(FILES
+ knetworkaccessmanager.h
+ knetworkreply.h
+ DESTINATION ${INCLUDE_INSTALL_DIR}/kdenetwork/ COMPONENT Devel)
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libs/webkitkde/kdewebkit/network/includes/CMakeLists.txt new/libs/webkitkde/kdewebkit/network/includes/CMakeLists.txt
--- old/libs/webkitkde/kdewebkit/network/includes/CMakeLists.txt 1970-01-01 01:00:00.000000000 +0100
+++ new/libs/webkitkde/kdewebkit/network/includes/CMakeLists.txt 2008-09-01 22:56:23.000000000 +0200
@@ -0,0 +1,4 @@
+install(FILES
+ KNetworkReply
+ KNetworkAccessManager
+ DESTINATION ${INCLUDE_INSTALL_DIR}/KDE/KdeNetwork)
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libs/webkitkde/kdewebkit/network/includes/KNetworkAccessManager new/libs/webkitkde/kdewebkit/network/includes/KNetworkAccessManager
--- old/libs/webkitkde/kdewebkit/network/includes/KNetworkAccessManager 1970-01-01 01:00:00.000000000 +0100
+++ new/libs/webkitkde/kdewebkit/network/includes/KNetworkAccessManager 2008-09-01 22:56:23.000000000 +0200
@@ -0,0 +1,2 @@
+#include "../../kdenetwork/knetworkaccessmanager.h"
+
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libs/webkitkde/kdewebkit/network/includes/KNetworkReply new/libs/webkitkde/kdewebkit/network/includes/KNetworkReply
--- old/libs/webkitkde/kdewebkit/network/includes/KNetworkReply 1970-01-01 01:00:00.000000000 +0100
+++ new/libs/webkitkde/kdewebkit/network/includes/KNetworkReply 2008-09-01 22:56:23.000000000 +0200
@@ -0,0 +1,2 @@
+#include "../../kdenetwork/knetworkreply.h"
+
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libs/webkitkde/kdewebkit/network/knetworkaccessmanager.cpp new/libs/webkitkde/kdewebkit/network/knetworkaccessmanager.cpp
--- old/libs/webkitkde/kdewebkit/network/knetworkaccessmanager.cpp 2008-08-23 19:31:46.000000000 +0200
+++ new/libs/webkitkde/kdewebkit/network/knetworkaccessmanager.cpp 2008-09-01 22:55:45.000000000 +0200
@@ -23,9 +23,8 @@
#include "knetworkaccessmanager.h"
-#include "webkitglobal.h"
-#include "network/knetworkreply.h"
-#include "settings/webkitsettings.h"
+#include "knetworkreply.h"
+//#include "settings/webkitsettings.h"
#include <QNetworkRequest>
#include <QNetworkReply>
@@ -40,9 +39,9 @@
QNetworkReply *KNetworkAccessManager::createRequest(Operation op, const QNetworkRequest &req, QIODevice *outgoingData)
{
- if (WebKitGlobal::settings()->isAdFilterEnabled() && WebKitGlobal::settings()->isAdFiltered(req.url().toString())) {
- return new KNetworkReply(req, 0, this);
- }
+// if (WebKitSettings::self()->isAdFilterEnabled() && WebKitSettings::self()->isAdFiltered(req.url().toString())) {
+// return new KNetworkReply(req, 0, this);
+// }
KIO::Job *kioJob = 0;
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libs/webkitkde/kdewebkit/network/knetworkaccessmanager.h new/libs/webkitkde/kdewebkit/network/knetworkaccessmanager.h
--- old/libs/webkitkde/kdewebkit/network/knetworkaccessmanager.h 2008-06-29 01:46:13.000000000 +0200
+++ new/libs/webkitkde/kdewebkit/network/knetworkaccessmanager.h 2008-09-01 22:55:45.000000000 +0200
@@ -23,11 +23,13 @@
#ifndef KNETWORKACCESSMANAGER_H
#define KNETWORKACCESSMANAGER_H
+#include
+
#include <QNetworkAccessManager>
#include
-class KNetworkAccessManager : public QNetworkAccessManager
+class KDE_EXPORT KNetworkAccessManager : public QNetworkAccessManager
{
Q_OBJECT
public:
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libs/webkitkde/kdewebkit/network/knetworkreply.h new/libs/webkitkde/kdewebkit/network/knetworkreply.h
--- old/libs/webkitkde/kdewebkit/network/knetworkreply.h 2008-08-16 13:48:14.000000000 +0200
+++ new/libs/webkitkde/kdewebkit/network/knetworkreply.h 2008-09-01 22:55:45.000000000 +0200
@@ -25,12 +25,14 @@
#include <QNetworkReply>
+#include
+
namespace KIO
{
class Job;
}
-class KNetworkReply : public QNetworkReply
+class KDE_EXPORT KNetworkReply : public QNetworkReply
{
Q_OBJECT
public:
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libs/webkitkde/kdewebkit/searchbar.cpp new/libs/webkitkde/kdewebkit/searchbar.cpp
--- old/libs/webkitkde/kdewebkit/searchbar.cpp 2008-08-22 22:50:23.000000000 +0200
+++ new/libs/webkitkde/kdewebkit/searchbar.cpp 2008-08-30 07:04:47.000000000 +0200
@@ -62,6 +62,11 @@
ui.nextButton->setIcon(KIcon("go-down-search"));
ui.nextButton->setToolButtonStyle(Qt::ToolButtonTextBesideIcon);
ui.searchInfo->setText(QString());
+ if (ui.searchAsYouType->checkState() == Qt::Checked) {
+ connect(ui.searchLineEdit, SIGNAL(textChanged(const QString&)),
+ this, SIGNAL(searchChanged(const QString&)));
+ }
+ connect(ui.searchAsYouType, SIGNAL(stateChanged(int)), this, SLOT(searchAsYouTypeChanged(int)));
connect(ui.nextButton, SIGNAL(clicked()),
this, SIGNAL(findNextClicked()));
connect(ui.previousButton, SIGNAL(clicked()),
@@ -154,5 +159,15 @@
ui.searchLineEdit->setStyleSheet(QString());
}
}
+void SearchBar::searchAsYouTypeChanged(int state)
+{
+ if (state == 0) {
+ disconnect(ui.searchLineEdit, SIGNAL(textChanged(const QString&)),
+ this, SIGNAL(searchChanged(const QString&)));
+ } else {
+ connect(ui.searchLineEdit, SIGNAL(textChanged(const QString&)),
+ this, SIGNAL(searchChanged(const QString&)));
+ }
+}
#include "searchbar.moc"
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libs/webkitkde/kdewebkit/searchbar.h new/libs/webkitkde/kdewebkit/searchbar.h
--- old/libs/webkitkde/kdewebkit/searchbar.h 2008-08-22 22:50:23.000000000 +0200
+++ new/libs/webkitkde/kdewebkit/searchbar.h 2008-08-29 04:29:37.000000000 +0200
@@ -71,6 +71,7 @@
private Q_SLOTS:
void slotHide();
+ void searchAsYouTypeChanged(int state);
};
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libs/webkitkde/kdewebkit/searchbar.ui new/libs/webkitkde/kdewebkit/searchbar.ui
--- old/libs/webkitkde/kdewebkit/searchbar.ui 2008-08-22 22:50:23.000000000 +0200
+++ new/libs/webkitkde/kdewebkit/searchbar.ui 2008-08-29 04:29:37.000000000 +0200
@@ -71,6 +71,13 @@
</widget>
</item>
<item>
+ <widget class="QCheckBox" name="searchAsYouType" >
+ <property name="text" >
+ <string>Search Automatically</string>
+ </property>
+ </widget>
+ </item>
+ <item>
<spacer name="horizontalSpacer" >
<property name="orientation" >
<enum>Qt::Horizontal</enum>
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libs/webkitkde/kdewebkit/settings/khtml_filter.cpp new/libs/webkitkde/kdewebkit/settings/khtml_filter.cpp
--- old/libs/webkitkde/kdewebkit/settings/khtml_filter.cpp 1970-01-01 01:00:00.000000000 +0100
+++ new/libs/webkitkde/kdewebkit/settings/khtml_filter.cpp 2008-08-26 22:51:02.000000000 +0200
@@ -0,0 +1,266 @@
+/* This file is part of the KDE project
+
+ Copyright (C) 2005 Ivor Hewitt
+ Copyright (C) 2008 Maksim Orlovich
+ Copyright (C) 2008 Vyacheslav Tokarev
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include "khtml_filter_p.h"
+#include <QDebug>
+
+// rolling hash parameters
+#define HASH_P (1997)
+#define HASH_Q (17509)
+// HASH_MOD = (HASH_P^7) % HASH_Q
+#define HASH_MOD (523)
+
+namespace khtml {
+
+void FilterSet::addFilter(const QString& filterStr)
+{
+ QString filter = filterStr;
+
+ if (filter.startsWith(QLatin1Char('!')))
+ return;
+
+ // Strip leading @@
+ int first = 0;
+ int last = filter.length() - 1;
+ if (filter.startsWith(QLatin1String("@@")))
+ first = 2;
+
+ // Strip options, we ignore them for now.
+ int dollar = filter.lastIndexOf(QLatin1Char('$'));
+ if (dollar != -1)
+ last = dollar - 1;
+
+ // Perhaps nothing left?
+ if (first > last)
+ return;
+
+ filter = filter.mid(first, last - first + 1);
+
+ // Is it a regexp filter?
+ if (filter.length()>2 && filter.startsWith(QLatin1Char('/')) && filter.endsWith(QLatin1Char('/')))
+ {
+ QString inside = filter.mid(1, filter.length()-2);
+ QRegExp rx(inside);
+ reFilters.append(rx);
+// qDebug() << "R:" << inside;
+ }
+ else
+ {
+ // Nope, a wildcard one.
+ // Note: For these, we also need to handle |.
+
+ // Strip wildcards at the ends
+ first = 0;
+ last = filter.length() - 1;
+
+ while (first < filter.length() && filter[first] == QLatin1Char('*'))
+ ++first;
+
+ while (last >= 0 && filter[last] == QLatin1Char('*'))
+ --last;
+
+ if (first > last)
+ filter = QLatin1String("*"); // erm... Well, they asked for it.
+ else
+ filter = filter.mid(first, last - first + 1);
+
+ // Now, do we still have any wildcard stuff left?
+ if (filter.contains("*") || filter.contains("?"))
+ {
+// qDebug() << "W:" << filter;
+ // check if we can use RK first (and then check full RE for the rest) for better performance
+ int aPos = filter.indexOf('*');
+ if (aPos < 0)
+ aPos = filter.length();
+ int qPos = filter.indexOf('?');
+ if (qPos < 0)
+ qPos = filter.length();
+ int pos = qMin(aPos, qPos);
+ if (pos > 7) {
+ QRegExp rx;
+
+ rx.setPatternSyntax(QRegExp::Wildcard);
+ rx.setPattern(filter.mid(pos));
+
+ stringFiltersMatcher.addWildedString(filter.mid(0, pos), rx);
+
+ } else {
+ QRegExp rx;
+
+ rx.setPatternSyntax(QRegExp::Wildcard);
+ rx.setPattern(filter);
+ reFilters.append(rx);
+ }
+ }
+ else
+ {
+ // Fast path
+ stringFiltersMatcher.addString(filter);
+ }
+ }
+}
+
+bool FilterSet::isUrlMatched(const QString& url)
+{
+ if (stringFiltersMatcher.isMatched(url))
+ return true;
+
+ for (int c = 0; c < reFilters.size(); ++c)
+ {
+ if (url.contains(reFilters[c]))
+ return true;
+ }
+
+ return false;
+}
+
+void FilterSet::clear()
+{
+ reFilters.clear();
+ stringFiltersMatcher.clear();
+}
+
+
+void StringsMatcher::addString(const QString& pattern)
+{
+ if (pattern.length() < 8) {
+ // handle short string differently
+ shortStringFilters.append(pattern);
+ } else {
+ // use modified Rabin-Karp's algorithm with 8-length string hash
+ // i.e. store hash of first 8 chars in the HashMap for fast look-up
+ stringFilters.append(pattern);
+ int ind = stringFilters.size() - 1;
+ int current = 0;
+
+ // compute hash using rolling hash
+ // hash for string: x0,x1,x2...xn-1 will be:
+ // (p^(n-1)*x0 + p^(n-2)*x1 + ... + p * xn-2 + xn-1) % q
+ // where p and q some wisely-chosen integers
+ /*for (int k = 0; k < 8; ++k)*/
+ int len = pattern.length();
+ for (int k = len - 8; k < len; ++k)
+ current = (current * HASH_P + pattern[k].unicode()) % HASH_Q;
+
+ // insert computed hash value into HashMap
+ QHash::iterator it = stringFiltersHash.find(current + 1);
+ if (it == stringFiltersHash.end()) {
+ QVector<int> list;
+ list.append(ind);
+ stringFiltersHash.insert(current + 1, list);
+ fastLookUp.setBit(current);
+ } else {
+ it.value().append(ind);
+ }
+ }
+}
+
+void StringsMatcher::addWildedString(const QString& prefix, const QRegExp& rx)
+{
+ rePrefixes.append(prefix);
+ reFilters.append(rx);
+ int index = -rePrefixes.size();
+
+ int current = 0;
+ for (int k = 0; k < 8; ++k)
+ current = (current * HASH_P + prefix[k].unicode()) % HASH_Q;
+
+ // insert computed hash value into HashMap
+ QHash::iterator it = stringFiltersHash.find(current + 1);
+ if (it == stringFiltersHash.end()) {
+ QVector<int> list;
+ list.append(index);
+ stringFiltersHash.insert(current + 1, list);
+ fastLookUp.setBit(current);
+ } else {
+ it.value().append(index);
+ }
+}
+
+bool StringsMatcher::isMatched(const QString& str) const
+{
+ // check short strings first
+ for (int i = 0; i < shortStringFilters.size(); ++i) {
+ if (str.contains(shortStringFilters[i]))
+ return true;
+ }
+
+ int len = str.length();
+ int k;
+
+ int current = 0;
+ int next = 0;
+ // compute hash for first 8 characters
+ for (k = 0; k < 8 && k < len; ++k)
+ current = (current * HASH_P + str[k].unicode()) % HASH_Q;
+
+ QHash::const_iterator hashEnd = stringFiltersHash.end();
+ // main Rabin-Karp's algorithm loop
+ for (k = 7; k < len; ++k, current = next) {
+ // roll the hash if not at the end
+ // (calculate hash for the next iteration)
+ if (k + 1 < len)
+ next = (HASH_P * ((current + HASH_Q - ((HASH_MOD * str[k - 7].unicode()) % HASH_Q)) % HASH_Q) + str[k + 1].unicode()) % HASH_Q;
+
+ if (!fastLookUp.testBit(current))
+ continue;
+
+ // look-up the hash in the HashMap and check all strings
+ QHash::const_iterator it = stringFiltersHash.find(current + 1);
+
+ // check possible strings
+ if (it != hashEnd) {
+ for (int j = 0; j < it.value().size(); ++j) {
+ int index = it.value()[j];
+ // check if we got simple string or REs prefix
+ if (index >= 0) {
+ int flen = stringFilters[index].length();
+ if (k - flen + 1 >= 0 && stringFilters[index] == str.midRef(k - flen + 1 , flen))
+ return true;
+ } else {
+ index = -index - 1;
+ int flen = rePrefixes[index].length();
+ if (k - 8 + flen < len && rePrefixes[index] == str.midRef(k - 7, flen) &&
+ str.indexOf(reFilters[index], k - 7 + flen) == k - 7 + flen)
+ return true;
+ }
+ }
+ }
+ }
+
+ return false;
+}
+
+void StringsMatcher::clear()
+{
+ stringFilters.clear();
+ shortStringFilters.clear();
+ reFilters.clear();
+ rePrefixes.clear();
+ stringFiltersHash.clear();
+ fastLookUp.resize(HASH_Q);
+ fastLookUp.fill(0, 0, HASH_Q);
+}
+
+}
+
+// kate: indent-width 4; replace-tabs on; tab-width 4; space-indent on;
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libs/webkitkde/kdewebkit/settings/khtml_filter_p.h new/libs/webkitkde/kdewebkit/settings/khtml_filter_p.h
--- old/libs/webkitkde/kdewebkit/settings/khtml_filter_p.h 1970-01-01 01:00:00.000000000 +0100
+++ new/libs/webkitkde/kdewebkit/settings/khtml_filter_p.h 2008-08-26 22:51:02.000000000 +0200
@@ -0,0 +1,74 @@
+/* This file is part of the KDE project
+
+ Copyright (C) 2005 Ivor Hewitt
+ Copyright (C) 2008 Maksim Orlovich
+ Copyright (C) 2008 Vyacheslav Tokarev
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+#include <QString>
+#include <QRegExp>
+#include <QVector>
+#include <QHash>
+#include <QBitArray>
+
+namespace khtml {
+
+// Updateable Multi-String Matcher based on Rabin-Karp's algorithm
+class StringsMatcher {
+public:
+ // add filter to matching set
+ void addString(const QString& pattern);
+
+ // check if string match at least one string from matching set
+ bool isMatched(const QString& str) const;
+
+ // add filter to matching set with wildcards (*,?) in it
+ void addWildedString(const QString& prefix, const QRegExp& rx);
+
+ void clear();
+
+private:
+ QVector<QString> stringFilters;
+ QVector<QString> shortStringFilters;
+ QVector<QRegExp> reFilters;
+ QVector<QString> rePrefixes;
+ QBitArray fastLookUp;
+
+ QHash stringFiltersHash;
+};
+
+// This represents a set of filters that may match URLs.
+// Currently it supports a subset of AddBlock Plus functionality.
+class FilterSet {
+public:
+ // Parses and registers a filter. This will also strip @@ for exclusion rules, skip comments, etc.
+ // The user does have to split black and white lists into separate sets, however
+ void addFilter(const QString& filter);
+
+ bool isUrlMatched(const QString& url);
+
+ void clear();
+
+private:
+ QVector<QRegExp> reFilters;
+ StringsMatcher stringFiltersMatcher;
+};
+
+}
+
+// kate: indent-width 4; replace-tabs on; tab-width 4; space-indent on;
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libs/webkitkde/kdewebkit/settings/webkitsettings.cpp new/libs/webkitkde/kdewebkit/settings/webkitsettings.cpp
--- old/libs/webkitkde/kdewebkit/settings/webkitsettings.cpp 2008-07-27 20:06:03.000000000 +0200
+++ new/libs/webkitkde/kdewebkit/settings/webkitsettings.cpp 2008-08-26 22:51:02.000000000 +0200
@@ -20,6 +20,8 @@
#include "webkitsettings.h"
#include "webkitdefaults.h"
+#include "khtml_filter_p.h"
+
#include
#include
#include
@@ -28,6 +30,8 @@
#include
#include
+#include <QWebSettings>
+
#include
/**
@@ -108,7 +112,8 @@
QStringList fonts;
QStringList defaultFonts;
- QVector<QRegExp> adFilters;
+ khtml::FilterSet adBlackList;
+ khtml::FilterSet adWhiteList;
QList< QPair< QString, QChar > > m_fallbackAccessKeysAssignments;
};
@@ -299,6 +304,7 @@
return;
init( local.data(), false );
+
}
void WebKitSettings::init( KConfig * config, bool reset )
@@ -325,40 +331,22 @@
d->m_adFilterEnabled = cgFilter.readEntry("Enabled", false);
d->m_hideAdsEnabled = cgFilter.readEntry("Shrink", false);
- d->adFilters.clear();
+ d->adBlackList.clear();
+ d->adWhiteList.clear();
QMap entryMap = cgFilter.entryMap();
QMap::ConstIterator it;
- d->adFilters.reserve(entryMap.count());
for( it = entryMap.constBegin(); it != entryMap.constEnd(); ++it )
{
QString name = it.key();
QString url = it.value();
- if (url.startsWith('!'))
- continue;
-
if (name.startsWith("Filter"))
{
- if (url.length()>2 && url[0]=='/' && url[url.length()-1] == '/')
- {
- QString inside = url.mid(1, url.length()-2);
- QRegExp rx(inside);
- d->adFilters.append(rx);
- }
+ if (url.startsWith(QLatin1String("@@")))
+ d->adWhiteList.addFilter(url);
else
- {
- QRegExp rx;
- int left,right;
-
- for (right=url.length(); right>0 && url[right-1]=='*' ; --right) ;
- for (left=0; leftadFilters.append(rx);
- }
+ d->adBlackList.addFilter(url);
}
}
}
@@ -647,6 +635,26 @@
#endif
}
}
+
+ // Sync with QWebSettings.
+ if (!userStyleSheet().isEmpty()) {
+ QWebSettings::globalSettings()->setUserStyleSheetUrl(QUrl(userStyleSheet()));
+ }
+ QWebSettings::globalSettings()->setAttribute(QWebSettings::AutoLoadImages, autoLoadImages());
+ QWebSettings::globalSettings()->setAttribute(QWebSettings::JavascriptEnabled, isJavaScriptEnabled());
+ QWebSettings::globalSettings()->setAttribute(QWebSettings::JavaEnabled, isJavaEnabled());
+ QWebSettings::globalSettings()->setAttribute(QWebSettings::PluginsEnabled, isPluginsEnabled());
+ QWebSettings::globalSettings()->setAttribute(QWebSettings::JavascriptCanOpenWindows,
+ windowOpenPolicy() != WebKitSettings::KJSWindowOpenDeny);
+
+ QWebSettings::globalSettings()->setFontFamily(QWebSettings::StandardFont, stdFontName());
+ QWebSettings::globalSettings()->setFontFamily(QWebSettings::FixedFont, fixedFontName());
+ QWebSettings::globalSettings()->setFontFamily(QWebSettings::SerifFont, serifFontName());
+ QWebSettings::globalSettings()->setFontFamily(QWebSettings::SansSerifFont, sansSerifFontName());
+ QWebSettings::globalSettings()->setFontFamily(QWebSettings::CursiveFont, cursiveFontName());
+ QWebSettings::globalSettings()->setFontFamily(QWebSettings::FantasyFont, fantasyFontName());
+ QWebSettings::globalSettings()->setFontSize(QWebSettings::MinimumFontSize, minFontSize());
+ QWebSettings::globalSettings()->setFontSize(QWebSettings::DefaultFontSize, mediumFontSize());
}
@@ -739,16 +747,8 @@
{
if (!url.startsWith("data:"))
{
- QVector<QRegExp>::const_iterator it(d->adFilters.constBegin());
- QVector<QRegExp>::const_iterator end(d->adFilters.constEnd());
- for (; it != end; ++it)
- {
- if ((*it).indexIn(url) != -1)
- {
- kDebug( 6080 ) << "Filtered: " << url;
- return true;
- }
- }
+ // Check the blacklist, and only if that matches, the whitelist
+ return d->adBlackList.isUrlMatched(url) && !d->adWhiteList.isUrlMatched(url);
}
}
return false;
@@ -759,6 +759,9 @@
KConfigGroup config = KSharedConfig::openConfig( "khtmlrc", KConfig::NoGlobals )->group( "Filter Settings" );
QRegExp rx;
+
+ // Try compiling to avoid invalid stuff. Only support the basic syntax here...
+ // ### refactor somewhat
if (url.length()>2 && url[0]=='/' && url[url.length()-1] == '/')
{
QString inside = url.mid(1, url.length()-2);
@@ -766,13 +769,8 @@
}
else
{
- int left,right;
-
rx.setPatternSyntax(QRegExp::Wildcard);
- for (right=url.length(); right>0 && url[right-1]=='*' ; --right) ;
- for (left=0; leftadFilters.append(rx);
+ d->adBlackList.addFilter(url);
}
else
{
@@ -1078,3 +1076,11 @@
{
return d->m_jsPopupBlockerPassivePopup;
}
+
+K_GLOBAL_STATIC(WebKitSettings, s_webKitSettings)
+
+WebKitSettings* WebKitSettings::self()
+{
+ return s_webKitSettings;
+}
+
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libs/webkitkde/kdewebkit/settings/webkitsettings.h new/libs/webkitkde/kdewebkit/settings/webkitsettings.h
--- old/libs/webkitkde/kdewebkit/settings/webkitsettings.h 2008-08-23 18:51:12.000000000 +0200
+++ new/libs/webkitkde/kdewebkit/settings/webkitsettings.h 2008-08-26 01:26:00.000000000 +0200
@@ -102,12 +102,6 @@
};
/**
- * @internal Constructor
- */
- WebKitSettings();
- WebKitSettings(const WebKitSettings &other);
-
- /**
* Called by constructor and reparseConfiguration
*/
void init();
@@ -225,6 +219,14 @@
void setJSPopupBlockerPassivePopup(bool enabled);
bool jsPopupBlockerPassivePopup() const;
+ // Global config object stuff.
+ static WebKitSettings* self();
+ /**
+ * @internal Constructor
+ */
+ WebKitSettings();
+ WebKitSettings(const WebKitSettings &other);
+
private:
QString lookupFont(int i) const;
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libs/webkitkde/kdewebkit/webkitglobal.cpp new/libs/webkitkde/kdewebkit/webkitglobal.cpp
--- old/libs/webkitkde/kdewebkit/webkitglobal.cpp 2008-08-23 19:09:39.000000000 +0200
+++ new/libs/webkitkde/kdewebkit/webkitglobal.cpp 1970-01-01 01:00:00.000000000 +0100
@@ -1,139 +0,0 @@
-/*
- * This file is part of the KDE project.
- *
- * Copyright (C) 2008 Laurent Montel
- * Copyright (C) 2008 Michael Howell
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this library; see the file COPYING.LIB. If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- *
- */
-
-#include "webkitglobal.h"
-#include "settings/webkitsettings.h"
-#include "settings/webkitdefaults.h"
-
-#include <QLinkedList>
-#include <QWebSettings>
-
-#include
-#include
-#include
-#include
-#include
-#include
-
-WebKitGlobal *WebKitGlobal::s_self = 0;
-unsigned long int WebKitGlobal::s_refcnt = 0;
-KAboutData *WebKitGlobal::s_about = 0;
-KComponentData *WebKitGlobal::s_componentData = 0;
-K_GLOBAL_STATIC(WebKitSettings, s_webKitSettings)
-
-WebKitGlobal::WebKitGlobal()
-{
- Q_ASSERT(!s_self);
- s_self = this;
- ref();
-}
-
-WebKitGlobal::~WebKitGlobal()
-{
- if (s_self == this) {
- delete s_componentData;
- delete s_about;
- s_componentData = 0;
- s_about = 0;
- } else
- deref();
-}
-
-
-
-void WebKitGlobal::ref()
-{
- if (!s_refcnt && !s_self) {
- // we can't use a staticdeleter here, because that would mean
- // that the WebKitGlobal instance gets deleted from within a qPostRoutine, called
- // from the QApplication destructor. That however is too late, because
- // we want to destruct a KComponentData object, which involves destructing
- // a KConfig object, which might call KGlobal::dirs() (in sync()) which
- // probably is not going to work ;-)
- // well, perhaps I'm wrong here, but as I'm unsure I try to stay on the
- // safe side ;-) -> let's use a simple reference counting scheme
- // (Simon)
- WebKitGlobal *webkitglobal = new WebKitGlobal; // does initial ref()
- webkitglobal->initGlobalSettings();
- } else {
- ++s_refcnt;
- }
-}
-
-void WebKitGlobal::deref()
-{
- if (!--s_refcnt && s_self) {
- delete s_self;
- s_self = 0;
- }
-}
-
-void WebKitGlobal::initGlobalSettings()
-{
- kDebug();
- if (!settings()->userStyleSheet().isEmpty()) {
- QWebSettings::globalSettings()->setUserStyleSheetUrl(QUrl(settings()->userStyleSheet()));
- }
- QWebSettings::globalSettings()->setAttribute(QWebSettings::AutoLoadImages, settings()->autoLoadImages());
- QWebSettings::globalSettings()->setAttribute(QWebSettings::JavascriptEnabled, settings()->isJavaScriptEnabled());
- QWebSettings::globalSettings()->setAttribute(QWebSettings::JavaEnabled, settings()->isJavaEnabled());
- QWebSettings::globalSettings()->setAttribute(QWebSettings::PluginsEnabled, settings()->isPluginsEnabled());
- QWebSettings::globalSettings()->setAttribute(QWebSettings::JavascriptCanOpenWindows,
- settings()->windowOpenPolicy() != WebKitSettings::KJSWindowOpenDeny);
-
- QWebSettings::globalSettings()->setFontFamily(QWebSettings::StandardFont, settings()->stdFontName());
- QWebSettings::globalSettings()->setFontFamily(QWebSettings::FixedFont, settings()->fixedFontName());
- QWebSettings::globalSettings()->setFontFamily(QWebSettings::SerifFont, settings()->serifFontName());
- QWebSettings::globalSettings()->setFontFamily(QWebSettings::SansSerifFont, settings()->sansSerifFontName());
- QWebSettings::globalSettings()->setFontFamily(QWebSettings::CursiveFont, settings()->cursiveFontName());
- QWebSettings::globalSettings()->setFontFamily(QWebSettings::FantasyFont, settings()->fantasyFontName());
-
- QWebSettings::globalSettings()->setFontSize(QWebSettings::MinimumFontSize, settings()->minFontSize());
- QWebSettings::globalSettings()->setFontSize(QWebSettings::DefaultFontSize, settings()->mediumFontSize());
-}
-
-WebKitSettings *WebKitGlobal::settings()
-{
- return s_webKitSettings;
-}
-
-const KComponentData &WebKitGlobal::componentData()
-{
- Q_ASSERT(s_self);
-
- if (!s_componentData) {
- s_about = new KAboutData("webkitkde", 0, ki18n("Webkit HTML Component"),
- /*version*/ "0.1", ki18n(/*shortDescription*/ ""),
- KAboutData::License_LGPL,
- ki18n("(c) 2008, Urs Wolfer\n"
- "(c) 2007 Trolltech ASA"));
-
- s_about->addAuthor(ki18n("Laurent Montel"), KLocalizedString(), "montel@kde.org");
- s_about->addAuthor(ki18n("Michael Howell"), KLocalizedString(), "mhowell123@gmail.com");
- s_about->addAuthor(ki18n("Urs Wolfer"), KLocalizedString(), "uwolfer@kde.org");
- s_about->addAuthor(ki18n("Dirk Mueller"), KLocalizedString(), "mueller@kde.org");
- s_componentData = new KComponentData(s_about);
- }
-
- return *s_componentData;
-}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libs/webkitkde/kdewebkit/webkitglobal.h new/libs/webkitkde/kdewebkit/webkitglobal.h
--- old/libs/webkitkde/kdewebkit/webkitglobal.h 2008-08-23 18:51:12.000000000 +0200
+++ new/libs/webkitkde/kdewebkit/webkitglobal.h 1970-01-01 01:00:00.000000000 +0100
@@ -1,53 +0,0 @@
-/*
- * This file is part of the KDE project.
- *
- * Copyright (C) 2008 Laurent Montel
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this library; see the file COPYING.LIB. If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- *
- */
-
-#ifndef WEBKITGLOBAL_H
-#define WEBKITGLOBAL_H
-
-class WebKitGlobal;
-class KAboutData;
-class WebKitSettings;
-
-#include <KComponentData>
-
-class KDE_EXPORT WebKitGlobal
-{
-public:
- WebKitGlobal();
- ~WebKitGlobal();
-
- void initGlobalSettings();
- static const KComponentData &componentData();
- static WebKitSettings *settings();
-
-private:
- static void ref();
- static void deref();
-private:
- static unsigned long s_refcnt;
- static WebKitGlobal *s_self;
- static KAboutData *s_about;
- static KComponentData *s_componentData;
-};
-
-#endif /* WEBKITGLOBAL_H */
-
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libs/webkitkde/webkitpart.cpp new/libs/webkitkde/webkitpart.cpp
--- old/libs/webkitkde/webkitpart.cpp 2008-08-23 18:51:12.000000000 +0200
+++ new/libs/webkitkde/webkitpart.cpp 2008-08-26 23:14:12.000000000 +0200
@@ -25,7 +25,6 @@
#include "webkitpart.h"
#include "webview.h"
-#include "kdewebkit/webkitglobal.h"
#include
#include
@@ -58,7 +57,20 @@
m_webView = new WebView(this, widget());
lay->addWidget(m_webView);
lay->addWidget(m_webView->searchBar());
- setComponentData(WebKitGlobal::componentData());
+
+ KAboutData* about = new KAboutData("webkitpart", 0, ki18n("WebKit HTML Component"),
+ /*version*/ "0.1", ki18n(/*shortDescription*/ ""),
+ KAboutData::License_LGPL,
+ ki18n("(c) 2008, Urs Wolfer\n"
+ "(c) 2007 Trolltech ASA"));
+
+ about->addAuthor(ki18n("Laurent Montel"), KLocalizedString(), "montel@kde.org");
+ about->addAuthor(ki18n("Michael Howell"), KLocalizedString(), "mhowell123@gmail.com");
+ about->addAuthor(ki18n("Urs Wolfer"), KLocalizedString(), "uwolfer@kde.org");
+ about->addAuthor(ki18n("Dirk Mueller"), KLocalizedString(), "mueller@kde.org");
+ KComponentData componentData(about);
+ setComponentData(componentData);
+
connect(m_webView, SIGNAL(loadStarted()),
this, SLOT(loadStarted()));
connect(m_webView, SIGNAL(loadFinished(bool)),
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libs/webkitkde/webpage.cpp new/libs/webkitkde/webpage.cpp
--- old/libs/webkitkde/webpage.cpp 2008-08-23 18:51:12.000000000 +0200
+++ new/libs/webkitkde/webpage.cpp 2008-08-25 03:33:33.000000000 +0200
@@ -26,7 +26,6 @@
#include "webkitpart.h"
#include "webview.h"
#include "network/knetworkaccessmanager.h"
-#include "kdewebkit/webkitglobal.h"
#include "kdewebkit/settings/webkitsettings.h"
#include
@@ -92,7 +91,7 @@
{
const QString host = mainFrame()->url().host();
- if (WebKitGlobal::settings()->windowMovePolicy(host) == WebKitSettings::KJSWindowMoveAllow) { // Why doesn't this work?
+ if (WebKitSettings::self()->windowMovePolicy(host) == WebKitSettings::KJSWindowMoveAllow) { // Why doesn't this work?
emit m_part->browserExtension()->moveTopLevelWidget(rect.x(), rect.y());
}
@@ -113,7 +112,7 @@
return;
}
- if (WebKitGlobal::settings()->windowResizePolicy(host) == WebKitSettings::KJSWindowResizeAllow) {
+ if (WebKitSettings::self()->windowResizePolicy(host) == WebKitSettings::KJSWindowResizeAllow) {
kDebug() << "resizing to " << width << "x" << height;
emit m_part->browserExtension()->resizeTopLevelWidget(width, height);
}
@@ -129,7 +128,7 @@
if (bottom > sg.bottom())
moveByY = - bottom + sg.bottom(); // always <0
if ((moveByX || moveByY) &&
- WebKitGlobal::settings()->windowMovePolicy(host) == WebKitSettings::KJSWindowMoveAllow) {
+ WebKitSettings::self()->windowMovePolicy(host) == WebKitSettings::KJSWindowMoveAllow) {
emit m_part->browserExtension()->moveTopLevelWidget(view()->x() + moveByX, view()->y() + moveByY);
}
}
@@ -148,7 +147,7 @@
void WebPage::slotStatusBarMessage(const QString &message)
{
- if (WebKitGlobal::settings()->windowStatusPolicy(mainFrame()->url().host()) == WebKitSettings::KJSWindowStatusAllow) {
+ if (WebKitSettings::self()->windowStatusPolicy(mainFrame()->url().host()) == WebKitSettings::KJSWindowStatusAllow) {
m_part->setStatusBarTextProxy(message);
}
}
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
---------------------------------------------------------------------
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org