Mailinglist Archive: opensuse-commit (999 mails)

< Previous Next >
commit kde4-webkitpart for openSUSE:Factory
  • From: root@xxxxxxxxxxxxxxx (h_root)
  • Date: Fri, 24 Jul 2009 16:42:28 +0200
  • Message-id: <20090724144228.6AE5C631A@xxxxxxxxxxxxxxx>

Hello community,

here is the log from the commit of package kde4-webkitpart for openSUSE:Factory
checked in at Fri Jul 24 16:42:28 CEST 2009.


--------
--- KDE/kde4-webkitpart/kde4-webkitpart.changes 2009-06-03 09:38:49.000000000
+0200
+++ kde4-webkitpart/kde4-webkitpart.changes 2009-07-24 01:31:50.000000000
+0200
@@ -1,0 +2,5 @@
+Fri Jul 24 01:24:02 CEST 2009 - beineri@xxxxxxxxxxxx
+
+- update to SVN 1001692
+
+-------------------------------------------------------------------

calling whatdependson for head-i586


++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ kde4-webkitpart.spec ++++++
--- /var/tmp/diff_new_pack.6MfF7O/_old 2009-07-24 16:42:10.000000000 +0200
+++ /var/tmp/diff_new_pack.6MfF7O/_new 2009-07-24 16:42:10.000000000 +0200
@@ -1,5 +1,5 @@
#
-# spec file for package kde4-webkitpart (Version 4.2.4.svn976977)
+# spec file for package kde4-webkitpart (Version 4.3.0.svn1001692)
#
# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
@@ -20,10 +20,10 @@

Name: kde4-webkitpart
BuildRequires: Mesa-devel cups-devel glew-devel kdebase4-workspace-devel
libQtWebKit-devel sqlite-devel
-License: LGPL v2.0 or later; LGPL v2.1 or later
+License: LGPL v2.0 or later ; LGPL v2.1 or later
Group: System/GUI/KDE
Summary: WebKit render engine for Konqueror
-Version: 4.2.4.svn976977
+Version: 4.3.0.svn1001692
Release: 1
Source0: libs.tar.bz2
BuildRoot: %{_tmppath}/%{name}-%{version}-build
@@ -39,7 +39,7 @@
The KDE Team <kde@xxxxxxx>

%package devel
-License: LGPL v2.0 or later; LGPL v2.1 or later
+License: LGPL v2.0 or later ; LGPL v2.1 or later
Group: System/GUI/KDE
Summary: WebKit render engine for Konqueror
Requires: kde4-webkitpart = %version

++++++ libs.tar.bz2 ++++++
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 2009-04-16 13:39:15.000000000 +0200
+++ new/libs/webkitkde/CMakeLists.txt 2009-07-08 21:44:10.000000000 +0200
@@ -18,3 +18,4 @@
add_subdirectory(icons)
add_subdirectory(kdewebkit)
add_subdirectory(part)
+add_subdirectory(kdelauncher)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/libs/webkitkde/kdelauncher/CMakeLists.txt
new/libs/webkitkde/kdelauncher/CMakeLists.txt
--- old/libs/webkitkde/kdelauncher/CMakeLists.txt 1970-01-01
01:00:00.000000000 +0100
+++ new/libs/webkitkde/kdelauncher/CMakeLists.txt 2009-07-19
18:57:47.000000000 +0200
@@ -0,0 +1,26 @@
+project(kdelauncher)
+
+find_package(KDE4 REQUIRED)
+include(KDE4Defaults)
+
+include_directories(${KDE4_INCLUDES} ${CMAKE_SOURCE_DIR}/kdenetwork
${CMAKE_CURRENT_SOURCE_DIR}/../kdewebkit)
+link_directories(${KDE4_LIB_DIR} ${CMAKE_SOURCE_DIR}/kdenetwork
${CMAKE_CURRENT_SOURCE_DIR}/../kdewebkit)
+add_definitions(${QT_DEFINITIONS} ${KDE4_DEFINITIONS})
+
+if(${KDE_VERSION_MINOR} EQUAL "2" AND ${KDE_VERSION_RELEASE} GREATER "69")
+else(${KDE_VERSION_MINOR} EQUAL "2" AND ${KDE_VERSION_RELEASE} GREATER "69")
+ # QtWebKit uses QtNetwork, to KdeWebKit uses....
+ # Starting from kdelibs 4.2.70, KIO does contain the network part.
+ find_package(KdeNetwork REQUIRED)
+ include_directories(${KDENETWORK_INCLUDE_DIR})
+endif(${KDE_VERSION_MINOR} EQUAL "2" AND ${KDE_VERSION_RELEASE} GREATER "69")
+
+#qt4_add_resources( kdelauncher_SRCS kdelauncher.qrc )
+
+kde4_add_executable(kdelauncher main.cpp )
+target_link_libraries( kdelauncher ${KDE4_KDEUI_LIBS} kdewebkit )
+
+if(${KDE_VERSION_MINOR} EQUAL "2" AND ${KDE_VERSION_RELEASE} GREATER "69")
+else(${KDE_VERSION_MINOR} EQUAL "2" AND ${KDE_VERSION_RELEASE} GREATER "69")
+ target_link_libraries(kdelauncher ${KDENETWORK_LIBRARIES})
+endif(${KDE_VERSION_MINOR} EQUAL "2" AND ${KDE_VERSION_RELEASE} GREATER "69")
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/libs/webkitkde/kdelauncher/main.cpp
new/libs/webkitkde/kdelauncher/main.cpp
--- old/libs/webkitkde/kdelauncher/main.cpp 1970-01-01 01:00:00.000000000
+0100
+++ new/libs/webkitkde/kdelauncher/main.cpp 2009-07-19 19:34:16.000000000
+0200
@@ -0,0 +1,450 @@
+/*
+ * Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies)
+ * Copyright (C) 2006 George Staikos <staikos@xxxxxxx>
+ * Copyright (C) 2006 Dirk Mueller <mueller@xxxxxxx>
+ * Copyright (C) 2006 Zack Rusin <zack@xxxxxxx>
+ * Copyright (C) 2006 Simon Hausmann <hausmann@xxxxxxx>
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include <kwebpage.h>
+#include <kwebview.h>
+#include <kapplication.h>
+#include <kaboutdata.h>
+#include <kcmdlineargs.h>
+
+#include <qwebframe.h>
+#include <qwebsettings.h>
+#if QT_VERSION >= 0x040600
+#include <qwebelement.h>
+#endif
+
+#include <QtGui>
+#include <QDebug>
+#if QT_VERSION >= 0x040400 && !defined(QT_NO_PRINTER)
+#include <QPrintPreviewDialog>
+#endif
+
+#include <QtUiTools/QUiLoader>
+
+#include <QVector>
+#include <QTextStream>
+#include <QFile>
+#include <cstdio>
+
+class WebPage : public KWebPage
+{
+public:
+ WebPage(QWidget *parent) : KWebPage(parent) {}
+
+ virtual KWebPage *createWindow(QWebPage::WebWindowType);
+ virtual QObject* createPlugin(const QString&, const QUrl&, const
QStringList&, const QStringList&);
+};
+
+class MainWindow : public QMainWindow
+{
+ Q_OBJECT
+public:
+ MainWindow(const QString& url = QString()): currentZoom(100) {
+ view = new KWebView(this);
+ setCentralWidget(view);
+
+ view->setPage(new WebPage(view));
+
+ connect(view, SIGNAL(loadFinished(bool)),
+ this, SLOT(loadFinished()));
+ connect(view, SIGNAL(titleChanged(const QString&)),
+ this, SLOT(setWindowTitle(const QString&)));
+ connect(view->page(), SIGNAL(linkHovered(const QString&, const
QString&, const QString &)),
+ this, SLOT(showLinkHover(const QString&, const QString&)));
+ connect(view->page(), SIGNAL(windowCloseRequested()), this,
SLOT(deleteLater()));
+
+ setupUI();
+
+#if QT_VERSION >= 0x040600
+ QUrl qurl = view->guessUrlFromString(url);
+#else
+ QUrl qurl(url);
+#endif
+ if (qurl.isValid()) {
+ urlEdit->setText(qurl.toEncoded());
+ view->load(qurl);
+
+ // the zoom values are chosen to be like in Mozilla Firefox 3
+ zoomLevels << 30 << 50 << 67 << 80 << 90;
+ zoomLevels << 100;
+ zoomLevels << 110 << 120 << 133 << 150 << 170 << 200 << 240 << 300;
+ }
+ }
+
+ KWebPage* webPage() const {
+ return view->page();
+ }
+
+ KWebView* webView() const {
+ return view;
+ }
+
+protected slots:
+
+ void changeLocation() {
+ QString string = urlEdit->text();
+#if QT_VERSION >= 0x040600
+ QUrl url = view->guessUrlFromString(string);
+#else
+ QUrl url(string);
+#endif
+ if (!url.isValid())
+ url = QUrl("http://"; + string + "/");
+ urlEdit->setText(url.toEncoded());
+ view->load(url);
+ view->setFocus(Qt::OtherFocusReason);
+ }
+
+ void loadFinished() {
+ urlEdit->setText(view->url().toString());
+
+ QUrl::FormattingOptions opts;
+ opts |= QUrl::RemoveScheme;
+ opts |= QUrl::RemoveUserInfo;
+ opts |= QUrl::StripTrailingSlash;
+ QString s = view->url().toString(opts);
+ s = s.mid(2);
+ if (s.isEmpty())
+ return;
+
+ if (!urlList.contains(s))
+ urlList += s;
+ urlModel.setStringList(urlList);
+ }
+
+ void showLinkHover(const QString &link, const QString &toolTip) {
+ statusBar()->showMessage(link);
+#ifndef QT_NO_TOOLTIP
+ if (!toolTip.isEmpty())
+ QToolTip::showText(QCursor::pos(), toolTip);
+#endif
+ }
+
+ void zoomIn() {
+ int i = zoomLevels.indexOf(currentZoom);
+ Q_ASSERT(i >= 0);
+ if (i < zoomLevels.count() - 1)
+ currentZoom = zoomLevels[i + 1];
+
+ view->setZoomFactor(qreal(currentZoom)/100.0);
+ }
+
+ void zoomOut() {
+ int i = zoomLevels.indexOf(currentZoom);
+ Q_ASSERT(i >= 0);
+ if (i > 0)
+ currentZoom = zoomLevels[i - 1];
+
+ view->setZoomFactor(qreal(currentZoom)/100.0);
+ }
+
+ void resetZoom()
+ {
+ currentZoom = 100;
+ view->setZoomFactor(1.0);
+ }
+
+ void toggleZoomTextOnly(bool b)
+ {
+ view->page()->settings()->setAttribute(QWebSettings::ZoomTextOnly, b);
+ }
+
+ void print() {
+#if QT_VERSION >= 0x040400 && !defined(QT_NO_PRINTER)
+ QPrintPreviewDialog dlg(this);
+ connect(&dlg, SIGNAL(paintRequested(QPrinter *)),
+ view, SLOT(print(QPrinter *)));
+ dlg.exec();
+#endif
+ }
+
+ void setEditable(bool on) {
+ view->page()->setContentEditable(on);
+ formatMenuAction->setVisible(on);
+ }
+
+ void dumpHtml() {
+ qDebug() << "HTML: " << view->page()->mainFrame()->toHtml();
+ }
+
+ void selectElements() {
+ bool ok;
+ QString str = QInputDialog::getText(this, i18n("Select elements"),
i18n("Choose elements"),
+ QLineEdit::Normal, "a", &ok);
+ if (ok && !str.isEmpty()) {
+#if QT_VERSION >= 0x040600
+ QList<QWebElement> result =
view->page()->mainFrame()->findAllElements(str);
+ foreach (QWebElement e, result)
+ e.setStyleProperty("background-color", "yellow");
+ statusBar()->showMessage(i18n("%1 element(s)
selected",result.count()), 5000);
+#endif
+ }
+ }
+
+public slots:
+
+ void newWindow(const QString &url = QString()) {
+ MainWindow *mw = new MainWindow(url);
+ mw->show();
+ }
+
+private:
+
+ QVector<int> zoomLevels;
+ int currentZoom;
+
+ // create the status bar, tool bar & menu
+ void setupUI() {
+ progress = new QProgressBar(this);
+ progress->setRange(0, 100);
+ progress->setMinimumSize(100, 20);
+ progress->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum);
+ progress->hide();
+ statusBar()->addPermanentWidget(progress);
+
+ connect(view, SIGNAL(loadProgress(int)), progress, SLOT(show()));
+ connect(view, SIGNAL(loadProgress(int)), progress,
SLOT(setValue(int)));
+ connect(view, SIGNAL(loadFinished(bool)), progress, SLOT(hide()));
+
+ urlEdit = new QLineEdit(this);
+ urlEdit->setSizePolicy(QSizePolicy::Expanding,
urlEdit->sizePolicy().verticalPolicy());
+ connect(urlEdit, SIGNAL(returnPressed()),
+ SLOT(changeLocation()));
+ QCompleter *completer = new QCompleter(this);
+ urlEdit->setCompleter(completer);
+ completer->setModel(&urlModel);
+
+ QToolBar *bar = addToolBar("Navigation");
+ bar->addAction(view->pageAction(QWebPage::Back));
+ bar->addAction(view->pageAction(QWebPage::Forward));
+ bar->addAction(view->pageAction(QWebPage::Reload));
+ bar->addAction(view->pageAction(QWebPage::Stop));
+ bar->addWidget(urlEdit);
+
+ QMenu *fileMenu = menuBar()->addMenu(i18n("&File"));
+ QAction *newWindow = fileMenu->addAction(i18n("New Window"), this,
SLOT(newWindow()));
+#if QT_VERSION >= 0x040400
+ fileMenu->addAction(i18n("Print"), this, SLOT(print()));
+#endif
+ fileMenu->addAction(i18n("Close"), this, SLOT(close()));
+
+ QMenu *editMenu = menuBar()->addMenu(i18n("&Edit"));
+ editMenu->addAction(view->pageAction(QWebPage::Undo));
+ editMenu->addAction(view->pageAction(QWebPage::Redo));
+ editMenu->addSeparator();
+ editMenu->addAction(view->pageAction(QWebPage::Cut));
+ editMenu->addAction(view->pageAction(QWebPage::Copy));
+ editMenu->addAction(view->pageAction(QWebPage::Paste));
+ editMenu->addSeparator();
+ QAction *setEditable = editMenu->addAction(i18n("Set Editable"), this,
SLOT(setEditable(bool)));
+ setEditable->setCheckable(true);
+
+ QMenu *viewMenu = menuBar()->addMenu(i18n("&View"));
+ viewMenu->addAction(view->pageAction(QWebPage::Stop));
+ viewMenu->addAction(view->pageAction(QWebPage::Reload));
+ viewMenu->addSeparator();
+ QAction *zoomIn = viewMenu->addAction(i18n("Zoom &In"), this,
SLOT(zoomIn()));
+ QAction *zoomOut = viewMenu->addAction(i18n("Zoom &Out"), this,
SLOT(zoomOut()));
+ QAction *resetZoom = viewMenu->addAction(i18n("Reset Zoom"), this,
SLOT(resetZoom()));
+ QAction *zoomTextOnly = viewMenu->addAction(i18n("Zoom Text Only"),
this, SLOT(toggleZoomTextOnly(bool)));
+ zoomTextOnly->setCheckable(true);
+ zoomTextOnly->setChecked(false);
+ viewMenu->addSeparator();
+ viewMenu->addAction(i18n("Dump HTML"), this, SLOT(dumpHtml()));
+
+ QMenu *formatMenu = new QMenu(i18n("F&ormat"));
+ formatMenuAction = menuBar()->addMenu(formatMenu);
+ formatMenuAction->setVisible(false);
+ formatMenu->addAction(view->pageAction(QWebPage::ToggleBold));
+ formatMenu->addAction(view->pageAction(QWebPage::ToggleItalic));
+ formatMenu->addAction(view->pageAction(QWebPage::ToggleUnderline));
+ QMenu *writingMenu = formatMenu->addMenu(i18n("Writing Direction"));
+
writingMenu->addAction(view->pageAction(QWebPage::SetTextDirectionDefault));
+
writingMenu->addAction(view->pageAction(QWebPage::SetTextDirectionLeftToRight));
+
writingMenu->addAction(view->pageAction(QWebPage::SetTextDirectionRightToLeft));
+
+ newWindow->setShortcut(QKeySequence(Qt::CTRL | Qt::Key_N));
+ view->pageAction(QWebPage::Back)->setShortcut(QKeySequence::Back);
+ view->pageAction(QWebPage::Stop)->setShortcut(Qt::Key_Escape);
+
view->pageAction(QWebPage::Forward)->setShortcut(QKeySequence::Forward);
+ view->pageAction(QWebPage::Reload)->setShortcut(QKeySequence::Refresh);
+ view->pageAction(QWebPage::Undo)->setShortcut(QKeySequence::Undo);
+ view->pageAction(QWebPage::Redo)->setShortcut(QKeySequence::Redo);
+ view->pageAction(QWebPage::Cut)->setShortcut(QKeySequence::Cut);
+ view->pageAction(QWebPage::Copy)->setShortcut(QKeySequence::Copy);
+ view->pageAction(QWebPage::Paste)->setShortcut(QKeySequence::Paste);
+ zoomIn->setShortcut(QKeySequence(Qt::CTRL | Qt::Key_Plus));
+ zoomOut->setShortcut(QKeySequence(Qt::CTRL | Qt::Key_Minus));
+ resetZoom->setShortcut(QKeySequence(Qt::CTRL | Qt::Key_0));
+
view->pageAction(QWebPage::ToggleBold)->setShortcut(QKeySequence(Qt::CTRL |
Qt::Key_B));
+
view->pageAction(QWebPage::ToggleItalic)->setShortcut(QKeySequence(Qt::CTRL |
Qt::Key_I));
+
view->pageAction(QWebPage::ToggleUnderline)->setShortcut(QKeySequence(Qt::CTRL
| Qt::Key_U));
+
+ QMenu *toolsMenu = menuBar()->addMenu(i18n("&Tools"));
+ toolsMenu->addAction(i18n("Select elements..."), this,
SLOT(selectElements()));
+
+ }
+
+ KWebView *view;
+ QLineEdit *urlEdit;
+ QProgressBar *progress;
+
+ QAction *formatMenuAction;
+
+ QStringList urlList;
+ QStringListModel urlModel;
+};
+
+KWebPage *WebPage::createWindow(QWebPage::WebWindowType)
+{
+ MainWindow *mw = new MainWindow;
+ return mw->webPage();
+}
+
+QObject *WebPage::createPlugin(const QString &classId, const QUrl &url, const
QStringList &paramNames, const QStringList &paramValues)
+{
+ Q_UNUSED(url);
+ Q_UNUSED(paramNames);
+ Q_UNUSED(paramValues);
+ QUiLoader loader;
+ return loader.createWidget(classId, view());
+}
+
+class URLLoader : public QObject
+{
+ Q_OBJECT
+public:
+ URLLoader(KWebView* view, const QString& inputFileName)
+ : m_view(view)
+ , m_stdOut(stdout)
+ {
+ init(inputFileName);
+ }
+
+public slots:
+ void loadNext()
+ {
+ QString qstr;
+ if (getUrl(qstr)) {
+ QUrl url(qstr, QUrl::StrictMode);
+ if (url.isValid()) {
+ m_stdOut << "Loading " << qstr << " ......" << endl;
+ m_view->load(url);
+ } else
+ loadNext();
+ } else
+ disconnect(m_view, 0, this, 0);
+ }
+
+private:
+ void init(const QString& inputFileName)
+ {
+ QFile inputFile(inputFileName);
+ if (inputFile.open(QIODevice::ReadOnly | QIODevice::Text)) {
+ QTextStream stream(&inputFile);
+ QString line;
+ while (true) {
+ line = stream.readLine();
+ if (line.isNull())
+ break;
+ m_urls.append(line);
+ }
+ } else {
+ qDebug() << "Cant't open list file";
+ exit(0);
+ }
+ m_index = 0;
+ inputFile.close();
+ }
+
+ bool getUrl(QString& qstr)
+ {
+ if (m_index == m_urls.size())
+ return false;
+
+ qstr = m_urls[m_index++];
+ return true;
+ }
+
+private:
+ QVector<QString> m_urls;
+ int m_index;
+ KWebView* m_view;
+ QTextStream m_stdOut;
+};
+
+#include "main.moc"
+
+int main(int argc, char **argv)
+{
+ KAboutData about("KDELauncher", 0, ki18n("KDELauncher"), "0.0000013");
+ KCmdLineArgs::init(argc, argv, &about);
+
+ KApplication app;
+ QString url =
QString("%1/%2").arg(QDir::homePath()).arg(QLatin1String("index.html"));
+
+ QWebSettings::setMaximumPagesInCache(4);
+
+ QWebSettings::setObjectCacheCapacities((16*1024*1024) / 8, (16*1024*1024)
/ 8, 16*1024*1024);
+
+ QWebSettings::globalSettings()->setAttribute(QWebSettings::PluginsEnabled,
true);
+
QWebSettings::globalSettings()->setAttribute(QWebSettings::DeveloperExtrasEnabled,
true);
+
+ const QStringList args = app.arguments();
+
+ if (args.contains(QLatin1String("-r"))) {
+ // robotized
+ QString listFile = args.at(2);
+ if (!(args.count() == 3) && QFile::exists(listFile)) {
+ qDebug() << "Usage: KDELauncher -r listfile";
+ exit(0);
+ }
+ MainWindow window;
+ KWebView *view = window.webView();
+ URLLoader loader(view, listFile);
+ QObject::connect(view, SIGNAL(loadFinished(bool)), &loader,
SLOT(loadNext()));
+ loader.loadNext();
+ window.show();
+ return app.exec();
+ } else {
+ if (args.count() > 1)
+ url = args.at(1);
+
+ MainWindow window(url);
+
+ // Opens every given urls in new windows
+ for (int i = 2; i < args.count(); i++)
+ window.newWindow(args.at(i));
+
+ window.show();
+ return app.exec();
+ }
+}
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 2009-05-29 02:41:53.000000000
+0200
+++ new/libs/webkitkde/kdewebkit/kwebpage.cpp 2009-07-19 22:09:51.000000000
+0200
@@ -55,10 +55,10 @@
{
public:
NullNetworkReply() { QTimer::singleShot(0, this, SIGNAL(finished())); }
- virtual void abort() {};
- virtual qint64 bytesAvailable() const { return -1; };
+ virtual void abort() {}
+ virtual qint64 bytesAvailable() const { return -1; }
protected:
- virtual qint64 readData(char*, qint64) { return -1; };
+ virtual qint64 readData(char*, qint64) { return -1; }
};

#if KDE_IS_VERSION(4, 2, 70)
@@ -234,21 +234,28 @@
void KWebPage::slotHandleUnsupportedContent(QNetworkReply *reply)
{
const KUrl url(reply->request().url());
- kDebug() << "title:" << url;
- kDebug() << "error:" << reply->errorString();
-
- KParts::BrowserRun::AskSaveResult res = KParts::BrowserRun::askEmbedOrSave(
- url,
-
reply->header(QNetworkRequest::ContentTypeHeader).toString(),
-
d->getFileNameForDownload(reply->request(), reply));
- switch (res) {
- case KParts::BrowserRun::Save:
- slotDownloadRequested(reply->request(), reply);
- return;
- case KParts::BrowserRun::Cancel:
- return;
- default: // Open
- break;
+ kDebug() << "url:" << reply->request().url();
+ kDebug() << "location:" <<
reply->header(QNetworkRequest::LocationHeader).toString();
+ kDebug() << "error:" << reply->error();
+
+ // TODO: Determine out why the unsupportedContent signal is emitted with
+ // with a QNetworkReply that contains invalid (read: empty) url and error
message
+ // set to "Unknown error". For now ignore all such signals...
+ if (url.isValid())
+ {
+ KParts::BrowserRun::AskSaveResult res =
KParts::BrowserRun::askEmbedOrSave(
+ url,
+
reply->header(QNetworkRequest::ContentTypeHeader).toString(),
+
d->getFileNameForDownload(reply->request(), reply));
+ switch (res) {
+ case KParts::BrowserRun::Save:
+ slotDownloadRequested(reply->request(), reply);
+ return;
+ case KParts::BrowserRun::Cancel:
+ return;
+ default: // Open
+ break;
+ }
}
}

diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/libs/webkitkde/kdewebkit/kwebview.cpp
new/libs/webkitkde/kdewebkit/kwebview.cpp
--- old/libs/webkitkde/kdewebkit/kwebview.cpp 2009-05-11 23:26:22.000000000
+0200
+++ new/libs/webkitkde/kdewebkit/kwebview.cpp 2009-07-08 21:42:09.000000000
+0200
@@ -192,7 +192,7 @@
d->searchBar->setFoundMatch(status);
}

-void KWebView::load(const KUrl &url, const KParts::OpenUrlArguments &args,
const KParts::BrowserArguments &bargs)
+void KWebView::loadUrl(const KUrl &url, const KParts::OpenUrlArguments &args,
const KParts::BrowserArguments &bargs)
{
QNetworkRequest req;

diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/libs/webkitkde/kdewebkit/kwebview.h
new/libs/webkitkde/kdewebkit/kwebview.h
--- old/libs/webkitkde/kdewebkit/kwebview.h 2009-05-11 23:22:45.000000000
+0200
+++ new/libs/webkitkde/kdewebkit/kwebview.h 2009-07-08 21:42:09.000000000
+0200
@@ -65,7 +65,7 @@
/**
* similar to load(const QNetworkRequest&,
QNetworkAccessManager::Operation), but for KParts-style arguments instead.
*/
- void load(const KUrl &url, const KParts::OpenUrlArguments &args, const
KParts::BrowserArguments &bargs);
+ void loadUrl(const KUrl &url, const KParts::OpenUrlArguments &args, const
KParts::BrowserArguments &bargs);

Q_SIGNALS:
void showContextMenu(QContextMenuEvent *event);
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 2009-05-11
23:18:58.000000000 +0200
+++ new/libs/webkitkde/kdewebkit/settings/webkitsettings.cpp 2009-07-09
13:43:55.000000000 +0200
@@ -655,6 +655,7 @@
#if QT_VERSION >= 0x040500
QWebSettings::globalSettings()->setAttribute(QWebSettings::ZoomTextOnly,
zoomTextOnly());
#endif
+
QWebSettings::globalSettings()->setAttribute(QWebSettings::DeveloperExtrasEnabled,
isJavaScriptDebugEnabled());
QWebSettings::globalSettings()->setFontFamily(QWebSettings::StandardFont,
stdFontName());
QWebSettings::globalSettings()->setFontFamily(QWebSettings::FixedFont,
fixedFontName());
QWebSettings::globalSettings()->setFontFamily(QWebSettings::SerifFont,
serifFontName());
@@ -775,7 +776,7 @@
// ### refactor somewhat
if (url.length()>2 && url[0]=='/' && url[url.length()-1] == '/')
{
- QString inside = url.mid(1, url.length()-2);
+ const QString inside = url.mid(1, url.length()-2);
rx.setPattern(inside);
}
else
@@ -787,7 +788,7 @@
if (rx.isValid())
{
int last=config.readEntry("Count", 0);
- QString key = "Filter-" + QString::number(last);
+ const QString key = "Filter-" + QString::number(last);
config.writeEntry(key, url);
config.writeEntry("Count",last+1);
config.sync();
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/libs/webkitkde/part/webkitpart.cpp
new/libs/webkitkde/part/webkitpart.cpp
--- old/libs/webkitkde/part/webkitpart.cpp 2009-05-11 23:26:22.000000000
+0200
+++ new/libs/webkitkde/part/webkitpart.cpp 2009-07-09 13:43:55.000000000
+0200
@@ -161,7 +161,7 @@
{
setUrl(url);

- m_webView->load(url, arguments(), browserExtension()->browserArguments());
+ m_webView->loadUrl(url, arguments(),
browserExtension()->browserArguments());

return true;
}
@@ -384,7 +384,8 @@
{
QList<KUrl> urls;
urls.append(part->view()->contextMenuResult().imageUrl());
- for (int i = 0; i != urls.count(); i++) {
+ const int nbUrls = urls.count();
+ for (int i = 0; i != nbUrls; i++) {
QString file = KFileDialog::getSaveFileName(KUrl(), QString(),
part->widget());
KIO::NetAccess::file_copy(urls.at(i), file, part->widget());
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/libs/webkitkde/part/webkitpart.desktop
new/libs/webkitkde/part/webkitpart.desktop
--- old/libs/webkitkde/part/webkitpart.desktop 2009-05-26 16:24:22.000000000
+0200
+++ new/libs/webkitkde/part/webkitpart.desktop 2009-07-15 22:34:14.000000000
+0200
@@ -1,6 +1,7 @@
[Desktop Entry]
Type=Service
Comment=Embeddable HTML component
+Comment[bg]=Компонент на HTML за вграждане
Comment[de]=Einbettungsfähige HTML-Komponente
Comment[es]=Componente de HTML empotrable
Comment[et]=Põimitav HTML-komponent
@@ -10,8 +11,10 @@
Comment[km]=សមាសធាតុ HTML ដែល​អាច​បង្កប់​បាន
Comment[lt]=Įdedamas HTML komponentas
Comment[ml]=എംബഡബിള്‍ ആയിട്ടുള്ള എച്ച്ടിഎംഎല്‍ ഘടകം
+Comment[ms]=Komponen HTML boleh lekap
Comment[nds]=Inbettbor HTML-Komponent
Comment[nl]=Inbedbare HTML-component
+Comment[nn]=Innebyggbar HTML-komponent
Comment[pa]=ਇੰਬੈੱਡਡ HTML ਭਾਗ
Comment[pt]=Componente de HTML incorporada
Comment[pt_BR]=Componente HTML que pode ser embutido
@@ -23,6 +26,7 @@
Comment[uk]=Вмонтований HTML-компонент
Comment[x-test]=xxEmbeddable HTML componentxx
Comment[zh_CN]=嵌入式 HTML 组件
+Comment[zh_TW]=可內嵌的 HTML 元件
MimeType=text/html;application/xml;application/xhtml+xml;
Icon=webkit
Name=WebKit
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/libs/webkitkde/part/webview.cpp
new/libs/webkitkde/part/webview.cpp
--- old/libs/webkitkde/part/webview.cpp 2009-05-11 23:26:22.000000000 +0200
+++ new/libs/webkitkde/part/webview.cpp 2009-07-09 13:43:55.000000000 +0200
@@ -162,6 +162,10 @@
partActions.append(action);
}

+ if (settings()->testAttribute(QWebSettings::DeveloperExtrasEnabled)) {
+ partActions.append(pageAction(QWebPage::InspectElement));
+ }
+
partGroupMap.insert("partactions", partActions);
}

@@ -250,7 +254,7 @@

QString name;
if (KUriFilter::self()->filterUri(data, list)) {
- QString iconPath = KStandardDirs::locate("cache",
KMimeType::favIconForUrl(data.uri()) + ".png");
+ const QString iconPath = KStandardDirs::locate("cache",
KMimeType::favIconForUrl(data.uri()) + ".png");
if (iconPath.isEmpty())
icon = KIcon("edit-find");
else
@@ -288,7 +292,7 @@
data.setData(searchProviderPrefix + "some keyword");

if (KUriFilter::self()->filterUri(data, list)) {
- QString iconPath = KStandardDirs::locate("cache",
KMimeType::favIconForUrl(data.uri()) + ".png");
+ const QString iconPath = KStandardDirs::locate("cache",
KMimeType::favIconForUrl(data.uri()) + ".png");
if (iconPath.isEmpty())
icon = KIcon("edit-find");
else
@@ -335,3 +339,4 @@

emit
d->part->browserExtension()->openUrlRequest(d->selectedTextAsOneLine(),
KParts::OpenUrlArguments(), browserArgs);
}
+


++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++



Remember to have fun...

--
To unsubscribe, e-mail: opensuse-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse-commit+help@xxxxxxxxxxxx

< Previous Next >
This Thread
  • No further messages