Hello community, here is the log from the commit of package khtml for openSUSE:Factory checked in at 2014-04-02 17:22:03 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/khtml (Old) and /work/SRC/openSUSE:Factory/.khtml.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "khtml" Changes: -------- --- /work/SRC/openSUSE:Factory/khtml/khtml.changes 2014-03-28 16:24:13.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.khtml.new/khtml.changes 2014-04-02 17:22:12.000000000 +0200 @@ -1,0 +2,9 @@ +Sat Mar 29 19:47:38 UTC 2014 - hrvoje.senjan@gmail.com + +- Update to 4.98.0 + * API improvements and cleanups + * Buildsystem fixes + * For more details please see: + http://www.kde.org/announcements/announce-frameworks5-beta1.php + +------------------------------------------------------------------- Old: ---- khtml-4.97.0.tar.xz New: ---- khtml-4.98.0.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ khtml.spec ++++++ --- /var/tmp/diff_new_pack.UY7eR0/_old 2014-04-02 17:22:14.000000000 +0200 +++ /var/tmp/diff_new_pack.UY7eR0/_new 2014-04-02 17:22:14.000000000 +0200 @@ -18,10 +18,10 @@ %define lname libKF5KHtml5 Name: khtml -Version: 4.97.0 +Version: 4.98.0 Release: 0 BuildRequires: cmake >= 2.8.12 -BuildRequires: extra-cmake-modules >= 0.0.11 +BuildRequires: extra-cmake-modules >= 0.0.12 BuildRequires: fdupes BuildRequires: giflib-devel BuildRequires: karchive-devel >= %{_kf5_version} @@ -135,7 +135,7 @@ %{_kf5_servicesdir}/kmultipart.desktop %{_kf5_datadir}/kjava/ %{_kf5_datadir}/khtml/ -%_kf5_configdir/khtmlrc +%config %{_kf5_configdir}/khtmlrc %files devel %defattr(-,root,root) ++++++ khtml-4.97.0.tar.xz -> khtml-4.98.0.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/khtml-4.97.0/CMakeLists.txt new/khtml-4.98.0/CMakeLists.txt --- old/khtml-4.97.0/CMakeLists.txt 2014-03-01 12:50:52.000000000 +0100 +++ new/khtml-4.98.0/CMakeLists.txt 2014-03-29 08:19:09.000000000 +0100 @@ -2,7 +2,7 @@ project(KHtml) -find_package(ECM 0.0.11 REQUIRED NO_MODULE) +find_package(ECM 0.0.12 REQUIRED NO_MODULE) set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH} ${ECM_KDE_MODULE_DIR}) include(FeatureSummary) include(GenerateExportHeader) @@ -16,7 +16,7 @@ include(KDEFrameworkCompilerSettings) include(KDECMakeSettings) -set(KF5_VERSION "4.97.0") +set(KF5_VERSION "4.98.0") find_package(KF5Archive ${KF5_VERSION} REQUIRED) find_package(KF5Codecs ${KF5_VERSION} REQUIRED) find_package(KF5GlobalAccel ${KF5_VERSION} REQUIRED) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/khtml-4.97.0/src/BUILDING-TESTREGRESSION new/khtml-4.98.0/src/BUILDING-TESTREGRESSION --- old/khtml-4.97.0/src/BUILDING-TESTREGRESSION 2014-03-01 12:50:52.000000000 +0100 +++ new/khtml-4.98.0/src/BUILDING-TESTREGRESSION 2014-03-29 08:19:09.000000000 +0100 @@ -1,3 +1,5 @@ +FIXME: update these docs for Qt5 / KF5 + In order to be able to use testregression, you have to build your Qt and kdelibs in a special manner. Here are the needed steps. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/khtml-4.97.0/src/CMakeLists.txt new/khtml-4.98.0/src/CMakeLists.txt --- old/khtml-4.97.0/src/CMakeLists.txt 2014-03-01 12:50:52.000000000 +0100 +++ new/khtml-4.98.0/src/CMakeLists.txt 2014-03-29 08:19:09.000000000 +0100 @@ -532,11 +532,6 @@ # Fairly certain this isn't used anywhere # qt5_generate_dbus_interface(khtml_iface.h org.kde.KHtmlPart.xml) -if(kdelibs_SOURCE_DIR) - qt5_generate_dbus_interface(${CMAKE_SOURCE_DIR}/tier3/kio/src/ioslaves/http/kcookiejar/kcookieserver.h org.kde.KCookieServer.xml) - set(KCookieServer_DBUS_INTERFACE ${CMAKE_CURRENT_BINARY_DIR}/org.kde.KCookieServer.xml) -endif() - qt5_add_dbus_interface(khtml_LIB_SRCS ${KCookieServer_DBUS_INTERFACE} kcookiejar_interface) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/khtml-4.97.0/src/Messages.sh new/khtml-4.98.0/src/Messages.sh --- old/khtml-4.97.0/src/Messages.sh 1970-01-01 01:00:00.000000000 +0100 +++ new/khtml-4.98.0/src/Messages.sh 2014-03-29 08:19:09.000000000 +0100 @@ -0,0 +1,18 @@ +#!/bin/sh + +# Invoke the extractrc script on all .ui, .rc, and .kcfg files in the sources. +# The results are stored in a pseudo .cpp file to be picked up by xgettext. +lst=`find . -name \*.rc -o -name \*.ui -o -name \*.kcfg` +if [ -n "$lst" ] ; then + $EXTRACTRC $lst >> rc.cpp +fi + +# If your framework contains tips-of-the-day, call preparetips as well. +if [ -f "data/tips" ] ; then + ( cd data && $PREPARETIPS > ../tips.cpp ) +fi + +# Extract strings from all source files. +# If your framework depends on KI18n, use $XGETTEXT. If it uses Qt translation +# system, use $EXTRACT_TR_STRINGS. +$XGETTEXT `find . -name \*.cpp -o -name \*.h -name \*.qml` -o $podir/khtml5.pot diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/khtml-4.97.0/src/dom/dom_node.cpp new/khtml-4.98.0/src/dom/dom_node.cpp --- old/khtml-4.97.0/src/dom/dom_node.cpp 2014-03-01 12:50:52.000000000 +0100 +++ new/khtml-4.98.0/src/dom/dom_node.cpp 2014-03-29 08:19:09.000000000 +0100 @@ -260,7 +260,7 @@ if (!impl) { return 0; } - return impl->childNodes(); + return impl->childNodes().get(); } Node Node::firstChild() const diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/khtml-4.97.0/src/dom/html_form.h new/khtml-4.98.0/src/dom/html_form.h --- old/khtml-4.97.0/src/dom/html_form.h 2014-03-01 12:50:52.000000000 +0100 +++ new/khtml-4.98.0/src/dom/html_form.h 2014-03-29 08:19:09.000000000 +0100 @@ -188,9 +188,7 @@ ~HTMLFieldSetElement(); - /** - * ### KDE 4.0: remove. - */ + // TODO: deprecate/remove? HTMLFormElement form() const; }; @@ -394,9 +392,7 @@ */ void setDefaultChecked(bool); - /** - * ### KDE 4.0: remove. - */ + // TODO: deprecate/remove? HTMLFormElement form() const; /** @@ -787,9 +783,7 @@ ~HTMLLegendElement(); - /** - * ### KDE 4.0: remove - */ + // TODO: deprecate/remove? HTMLFormElement form() const; /** @@ -940,9 +934,7 @@ */ long length() const; - /** - * ### KDE 4.0: remove. - */ + // TODO: deprecate/remove? HTMLFormElement form() const; /** @@ -1094,9 +1086,7 @@ */ void setDefaultValue(const DOMString &); - /** - * ### KDE 4.0: remove. - */ + // TODO: deprecate/remove? HTMLFormElement form() const; /** @@ -1293,9 +1283,7 @@ ~HTMLOptionElement(); - /** - * ### KDE 4.0: remove - */ + // TODO: deprecate/remove? HTMLFormElement form() const; /** @@ -1414,9 +1402,7 @@ ~HTMLIsIndexElement(); - /** - * ### KDE 4.0: remove - */ + // TODO: deprecate/remove? HTMLFormElement form() const; /** diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/khtml-4.97.0/src/ecma/debugger/breakpointsdock.cpp new/khtml-4.98.0/src/ecma/debugger/breakpointsdock.cpp --- old/khtml-4.97.0/src/ecma/debugger/breakpointsdock.cpp 2014-03-01 12:50:52.000000000 +0100 +++ new/khtml-4.98.0/src/ecma/debugger/breakpointsdock.cpp 2014-03-29 08:19:09.000000000 +0100 @@ -27,7 +27,7 @@ { BreakpointsDock::BreakpointsDock(QWidget *parent) - : QDockWidget("", parent) //### KDE4.1: restore title + : QDockWidget("", parent) // TODO: restore title { setFeatures(DockWidgetMovable | DockWidgetFloatable); QListWidget *widget = new QListWidget; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/khtml-4.97.0/src/ecma/debugger/scriptsdock.cpp new/khtml-4.98.0/src/ecma/debugger/scriptsdock.cpp --- old/khtml-4.97.0/src/ecma/debugger/scriptsdock.cpp 2014-03-01 12:50:52.000000000 +0100 +++ new/khtml-4.98.0/src/ecma/debugger/scriptsdock.cpp 2014-03-29 08:19:09.000000000 +0100 @@ -91,7 +91,7 @@ QString favicon; if (document->url().isEmpty()) { - domain = "????"; // ### KDE4.1: proper i18n'able string + domain = "????"; // TODO: proper i18n'able string } else { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/khtml-4.97.0/src/ecma/kjs_dom.cpp new/khtml-4.98.0/src/ecma/kjs_dom.cpp --- old/khtml-4.97.0/src/ecma/kjs_dom.cpp 2014-03-01 12:50:52.000000000 +0100 +++ new/khtml-4.98.0/src/ecma/kjs_dom.cpp 2014-03-29 08:19:09.000000000 +0100 @@ -279,7 +279,7 @@ case ParentElement: // IE only apparently return getDOMNode(exec, node.parentNode()); case ChildNodes: - return getDOMNodeList(exec, node.childNodes()); + return getDOMNodeList(exec, node.childNodes().get()); case FirstChild: return getDOMNode(exec, node.firstChild()); case LastChild: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/khtml-4.97.0/src/ecma/kjs_html.cpp new/khtml-4.98.0/src/ecma/kjs_html.cpp --- old/khtml-4.97.0/src/ecma/kjs_html.cpp 2014-03-01 12:50:52.000000000 +0100 +++ new/khtml-4.98.0/src/ecma/kjs_html.cpp 2014-03-29 08:19:09.000000000 +0100 @@ -1884,7 +1884,7 @@ QString href = getURLArg(ATTR_HREF); switch (token) { case AnchorHash: { - const QString encodedHash = QUrl(href).fragment(); + const QString encodedHash = QUrl(href).fragment(QUrl::FullyEncoded); if (encodedHash.isEmpty()) { return jsString(""); } @@ -1967,7 +1967,7 @@ case AreaHref: return jsString(url.url()); case AreaHash: { - const QString encodedHash = url.fragment(); + const QString encodedHash = url.fragment(QUrl::FullyEncoded); if (encodedHash.isEmpty()) { return jsString(""); } @@ -2634,8 +2634,9 @@ // read-only: text <--- According to the DOM, but JavaScript and JScript both allow changes. // So, we'll do it here and not add it to our DOM headers. case OptionText: { - SharedPtr<DOM::NodeListImpl> nl(option.childNodes()); - for (unsigned int i = 0; i < nl->length(); i++) { + RefPtr<DOM::NodeListImpl> nl(option.childNodes()); + const unsigned int length = nl->length(); + for (unsigned int i = 0; i < length; ++i) { if (nl->item(i)->nodeType() == DOM::Node::TEXT_NODE) { static_cast<DOM::TextImpl *>(nl->item(i))->setData(str, exception); return; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/khtml-4.97.0/src/ecma/kjs_navigator.cpp new/khtml-4.98.0/src/ecma/kjs_navigator.cpp --- old/khtml-4.97.0/src/ecma/kjs_navigator.cpp 2014-03-01 12:50:52.000000000 +0100 +++ new/khtml-4.98.0/src/ecma/kjs_navigator.cpp 2014-03-29 08:19:09.000000000 +0100 @@ -27,6 +27,7 @@ #include <kconfig.h> #include <kconfiggroup.h> +#include <ksharedconfig.h> #include <QDebug> #include <kprotocolmanager.h> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/khtml-4.97.0/src/ecma/kjs_window.cpp new/khtml-4.98.0/src/ecma/kjs_window.cpp --- old/khtml-4.97.0/src/ecma/kjs_window.cpp 2014-03-01 12:50:52.000000000 +0100 +++ new/khtml-4.98.0/src/ecma/kjs_window.cpp 2014-03-29 08:19:09.000000000 +0100 @@ -2553,8 +2553,7 @@ ////////////////////// ScheduledAction //////////////////////// -// KDE 4: Make those parameters const ... & -ScheduledAction::ScheduledAction(JSObject *_func, List _args, DateTimeMS _nextTime, int _interval, bool _singleShot, +ScheduledAction::ScheduledAction(JSObject *_func, const List &_args, const DateTimeMS &_nextTime, int _interval, bool _singleShot, int _timerId) { //qDebug() << "ScheduledAction::ScheduledAction(isFunction) " << this; @@ -2568,8 +2567,7 @@ timerId = _timerId; } -// KDE 4: Make it const QString & -ScheduledAction::ScheduledAction(QString _code, DateTimeMS _nextTime, int _interval, bool _singleShot, int _timerId) +ScheduledAction::ScheduledAction(const QString &_code, const DateTimeMS &_nextTime, int _interval, bool _singleShot, int _timerId) { //qDebug() << "ScheduledAction::ScheduledAction(!isFunction) " << this; //func = 0; @@ -2994,7 +2992,7 @@ QUrl url = m_frame->m_part->url(); switch (token) { case Hash: { - const QString encodedHash = url.fragment(); + const QString encodedHash = url.fragment(QUrl::FullyEncoded); if (encodedHash.isEmpty()) { return jsString(""); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/khtml-4.97.0/src/ecma/kjs_window.h new/khtml-4.98.0/src/ecma/kjs_window.h --- old/khtml-4.97.0/src/ecma/kjs_window.h 2014-03-01 12:50:52.000000000 +0100 +++ new/khtml-4.98.0/src/ecma/kjs_window.h 2014-03-29 08:19:09.000000000 +0100 @@ -292,8 +292,8 @@ class ScheduledAction { public: - ScheduledAction(JSObject *_func, List _args, DateTimeMS _nextTime, int _interval, bool _singleShot, int _timerId); - ScheduledAction(QString _code, DateTimeMS _nextTime, int _interval, bool _singleShot, int _timerId); + ScheduledAction(JSObject *_func, const List &_args, const DateTimeMS &_nextTime, int _interval, bool _singleShot, int _timerId); + ScheduledAction(const QString &_code, const DateTimeMS &_nextTime, int _interval, bool _singleShot, int _timerId); ~ScheduledAction(); bool execute(Window *window); void mark(); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/khtml-4.97.0/src/ecma/xmlhttprequest.cpp new/khtml-4.98.0/src/ecma/xmlhttprequest.cpp --- old/khtml-4.97.0/src/ecma/xmlhttprequest.cpp 2014-03-01 12:50:52.000000000 +0100 +++ new/khtml-4.98.0/src/ecma/xmlhttprequest.cpp 2014-03-29 08:19:09.000000000 +0100 @@ -227,14 +227,14 @@ // Token according to RFC 2616 static bool isValidFieldName(const QString &name) { - int l = name.length(); + const int l = name.length(); if (l == 0) { return false; } const QChar *c = name.constData(); for (int i = 0; i < l; ++i, ++c) { - int u = c->unicode(); + ushort u = c->unicode(); if (u < 32 || u > 126) { return false; } @@ -254,14 +254,14 @@ static bool isValidFieldValue(const QString &name) { - int l = name.length(); + const int l = name.length(); if (l == 0) { return true; } const QChar *c = name.constData(); for (int i = 0; i < l; ++i, ++c) { - int u = c->unicode(); + ushort u = c->unicode(); if (u == '\n' || u == '\r') { return false; } @@ -273,36 +273,35 @@ static bool canSetRequestHeader(const QString &name) { - static QSet<CaseInsensitiveString> forbiddenHeaders; + if (name.startsWith(QLatin1String("sec-"), Qt::CaseInsensitive) || + name.startsWith(QLatin1String("proxy-"), Qt::CaseInsensitive)) { + return false; + } + static QSet<CaseInsensitiveString> forbiddenHeaders; if (forbiddenHeaders.isEmpty()) { static const char *const hdrs[] = { "accept-charset", "accept-encoding", + "access-control-request-headers", + "access-control-request-method", + "connection", "content-length", - "connect", - "copy", + "content-transfer-encoding", + "cookie", + "cookie2", "date", - "delete", + "dnt", "expect", - "head", "host", "keep-alive", - "lock", - "mkcol", - "move", - "options", - "put", - "propfind", - "proppatch", - "proxy-authorization", + "origin", "referer", "te", - "trace", "trailer", "transfer-encoding", - "unlock", "upgrade", + "user-agent", "via" }; for (size_t i = 0; i < sizeof(hdrs) / sizeof(char *); ++i) { @@ -495,19 +494,12 @@ // We need to use a POST-like setup even for non-post whenever we // have a payload. - if (m_method == QLatin1String("POST") || !_body.isEmpty()) { - + const bool havePayload = !_body.isEmpty(); + if (m_method == QLatin1String("POST") || havePayload) { // FIXME: determine post encoding correctly by looking in headers // for charset. QByteArray buf = _body.toUtf8(); - job = KIO::storedHttpPost(buf, url, KIO::HideProgressInfo); - if (contentType.isNull()) { - job->addMetaData("content-type", "Content-type: text/plain"); - } else { - job->addMetaData("content-type", contentType); - } - } else { job = KIO::storedGet(url, KIO::NoReload, KIO::HideProgressInfo); } @@ -515,6 +507,14 @@ // Regardless of job type, make sure the method is set job->addMetaData("CustomHTTPMethod", m_method); + // Set headers + + if (!contentType.isNull()) { + job->addMetaData("content-type", contentType); + } else if (havePayload) { + job->addMetaData("content-type", "Content-type: text/plain"); + } + if (!m_requestHeaders.isEmpty()) { QString rh; HTTPHeaderMap::ConstIterator begin = m_requestHeaders.constBegin(); @@ -621,45 +621,26 @@ ec = DOMException::SYNTAX_ERR; return; } - QString name = _name.toLower(); + QString value = _value.trimmed(); - if (value.isEmpty()) { - return; - } // Content-type needs to be set separately from the other headers - if (name == "content-type") { + if (_name.compare(QLatin1String("content-type"), Qt::CaseInsensitive) == 0) { contentType = "Content-type: " + value; return; } - // Sanitize the referrer header to protect against spoofing... - if (name == "referer") { - QUrl referrerURL(value); - if (urlMatchesDocumentDomain(referrerURL)) { - m_requestHeaders[name] = referrerURL.url(); - } - return; - } - - // Sanitize the request headers below and handle them as if they are - // calls to open. Otherwise, we will end up ignoring them all together! - // TODO: Do something about "put" which kio_http sort of supports and - // the webDAV headers such as PROPFIND etc... - if (name == "get" || name == "post") { - QUrl reqURL(doc->URL().resolved(QUrl(value))); - open(name, reqURL, async, ec); - return; - } - // Reject all banned headers. if (!canSetRequestHeader(_name)) { - qWarning() << "Refusing to set unsafe XMLHttpRequest header " - << name << endl; + qWarning() << "Refusing to set unsafe XMLHttpRequest header" << _name; return; } - m_requestHeaders[_name] = value; + if (m_requestHeaders.contains(_name)) { + m_requestHeaders[_name] += (QLatin1String(", ") + value); + } else { + m_requestHeaders[_name] = value; + } } JSValue *XMLHttpRequest::getAllResponseHeaders(int &ec) const @@ -987,16 +968,10 @@ if (args.size() < 2) { return throwError(exec, SyntaxError, "Not enough arguments"); } - JSValue *keyArgument = args[0]; - JSValue *valArgument = args[1]; - QString key, val; - if (!keyArgument->isUndefined() && !keyArgument->isNull()) { - key = keyArgument->toString(exec).qstring(); - } - if (!valArgument->isUndefined() && !valArgument->isNull()) { - val = valArgument->toString(exec).qstring(); - } - request->setRequestHeader(key, val, ec); + + QString headerFieldName = args[0]->toString(exec).qstring(); + QString headerFieldValue = args[1]->toString(exec).qstring(); + request->setRequestHeader(headerFieldName, headerFieldValue, ec); setDOMException(exec, ec); return jsUndefined(); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/khtml-4.97.0/src/editing/htmlediting_impl.cpp new/khtml-4.98.0/src/editing/htmlediting_impl.cpp --- old/khtml-4.97.0/src/editing/htmlediting_impl.cpp 2014-03-01 12:50:52.000000000 +0100 +++ new/khtml-4.98.0/src/editing/htmlediting_impl.cpp 2014-03-29 08:19:09.000000000 +0100 @@ -2416,8 +2416,8 @@ assert(m_parent); m_parent->ref(); - NodeListImpl *children = m_parent->childNodes(); - for (int i = children->length(); i >= 0; i--) { + RefPtr<DOM::NodeListImpl> children = m_parent->childNodes(); + for (long i = children->length() - 1; i >= 0; --i) { NodeImpl *node = children->item(i); if (node == m_removeChild) { break; @@ -2523,9 +2523,9 @@ void RemoveNodePreservingChildrenCommandImpl::doApply() { - NodeListImpl *children = node()->childNodes(); - int length = children->length(); - for (int i = 0; i < length; i++) { + RefPtr<DOM::NodeListImpl> children = node()->childNodes(); + const unsigned int length = children->length(); + for (unsigned int i = 0; i < length; ++i) { NodeImpl *child = children->item(0); removeNode(child); insertNodeBefore(child, node()); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/khtml-4.97.0/src/html/html_documentimpl.cpp new/khtml-4.98.0/src/html/html_documentimpl.cpp --- old/khtml-4.97.0/src/html/html_documentimpl.cpp 2014-03-01 12:50:52.000000000 +0100 +++ new/khtml-4.98.0/src/html/html_documentimpl.cpp 2014-03-29 08:19:09.000000000 +0100 @@ -103,7 +103,7 @@ } org::kde::KCookieServer kcookiejar("org.kde.kded5", "/modules/kcookiejar", QDBusConnection::sessionBus()); - QDBusReply<QString> reply = kcookiejar.findDOMCookies(URL().url(), qlonglong(windowId)); + QDBusReply<QString> reply = kcookiejar.findDOMCookies(URL().url()); if (!reply.isValid()) { qWarning() << "Can't communicate with cookiejar!"; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/khtml-4.97.0/src/html/html_headimpl.cpp new/khtml-4.98.0/src/html/html_headimpl.cpp --- old/khtml-4.97.0/src/html/html_headimpl.cpp 2014-03-01 12:50:52.000000000 +0100 +++ new/khtml-4.98.0/src/html/html_headimpl.cpp 2014-03-29 08:19:09.000000000 +0100 @@ -836,17 +836,15 @@ void HTMLTitleElementImpl::setText(const DOMString &str) { int exceptioncode = 0; - // Look for an existing text child node - DOM::NodeListImpl *nl(childNodes()); - if (nl) { - for (unsigned int i = 0; i < nl->length(); i++) { - if (nl->item(i)->nodeType() == DOM::Node::TEXT_NODE) { - static_cast<DOM::TextImpl *>(nl->item(i))->setData(str, exceptioncode); - return; - } + RefPtr<DOM::NodeListImpl> nl = childNodes(); + const unsigned int length = nl->length(); + for (unsigned int i = 0; i < length; ++i) { + if (nl->item(i)->nodeType() == DOM::Node::TEXT_NODE) { + static_cast<DOM::TextImpl *>(nl->item(i))->setData(str, exceptioncode); + return; } - delete nl; } + // No child text node found, creating one DOM::TextImpl *t = document()->createTextNode(str.implementation()); appendChild(t, exceptioncode); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/khtml-4.97.0/src/html/kopenssl.cpp new/khtml-4.98.0/src/html/kopenssl.cpp --- old/khtml-4.97.0/src/html/kopenssl.cpp 2014-03-01 12:50:52.000000000 +0100 +++ new/khtml-4.98.0/src/html/kopenssl.cpp 2014-03-29 08:19:09.000000000 +0100 @@ -26,9 +26,9 @@ #include <kconfig.h> #include <kconfiggroup.h> -#include <klibrary.h> #include <QtCore/QCoreApplication> #include <QtCore/QFile> +#include <QtCore/QLibrary> #include <QtCore/QRegExp> extern "C" { @@ -203,8 +203,8 @@ : sslLib(0), cryptoLib(0), ok(false) {} - KLibrary *sslLib; - KLibrary *cryptoLib; + QLibrary *sslLib; + QLibrary *cryptoLib; bool ok; static KOpenSSLProxy *sSelf; @@ -298,7 +298,7 @@ } #ifdef Q_OS_WIN - d->cryptoLib = new KLibrary("libeay32.dll"); + d->cryptoLib = new QLibrary("libeay32.dll"); if (!d->cryptoLib->load()) { delete d->cryptoLib; d->cryptoLib = 0; @@ -307,7 +307,7 @@ { QString libname = findMostRecentLib("/usr/lib" KDELIBSUFF, "crypto"); if (!libname.isNull()) { - d->cryptoLib = new KLibrary(libname); + d->cryptoLib = new QLibrary(libname); d->cryptoLib->setLoadHints(QLibrary::ExportExternalSymbolsHint); if (!d->cryptoLib->load()) { delete d->cryptoLib; @@ -391,7 +391,7 @@ QString tmpStr(alib); tmpStr.remove(QRegExp("\\(.*\\)")); if (QFile(tmpStr).isReadable()) { - d->cryptoLib = new KLibrary(alib); + d->cryptoLib = new QLibrary(alib); d->cryptoLib->setLoadHints(QLibrary::ExportExternalSymbolsHint); } if (d->cryptoLib && d->cryptoLib->load()) { @@ -408,133 +408,133 @@ if (d->cryptoLib) { #if KSSL_HAVE_SSL - K_X509_free = (void (*)(X509 *)) d->cryptoLib->resolveFunction("X509_free"); - K_RAND_egd = (int (*)(const char *)) d->cryptoLib->resolveFunction("RAND_egd"); - K_RAND_load_file = (int (*)(const char *, long)) d->cryptoLib->resolveFunction("RAND_load_file"); - K_RAND_file_name = (const char *(*)(char *, size_t)) d->cryptoLib->resolveFunction("RAND_file_name"); - K_RAND_write_file = (int (*)(const char *)) d->cryptoLib->resolveFunction("RAND_write_file"); - K_CRYPTO_free = (void (*)(void *)) d->cryptoLib->resolveFunction("CRYPTO_free"); - K_d2i_X509 = (X509 * (*)(X509 **, unsigned char **, long)) d->cryptoLib->resolveFunction("d2i_X509"); - K_i2d_X509 = (int (*)(X509 *, unsigned char **)) d->cryptoLib->resolveFunction("i2d_X509"); - K_X509_cmp = (int (*)(X509 *, X509 *)) d->cryptoLib->resolveFunction("X509_cmp"); - K_X509_STORE_CTX_new = (X509_STORE_CTX * (*)(void)) d->cryptoLib->resolveFunction("X509_STORE_CTX_new"); - K_X509_STORE_CTX_free = (void (*)(X509_STORE_CTX *)) d->cryptoLib->resolveFunction("X509_STORE_CTX_free"); - K_X509_verify_cert = (int (*)(X509_STORE_CTX *)) d->cryptoLib->resolveFunction("X509_verify_cert"); - K_X509_STORE_new = (X509_STORE * (*)(void)) d->cryptoLib->resolveFunction("X509_STORE_new"); - K_X509_STORE_free = (void (*)(X509_STORE *)) d->cryptoLib->resolveFunction("X509_STORE_free"); - K_X509_NAME_oneline = (char *(*)(X509_NAME *, char *, int)) d->cryptoLib->resolveFunction("X509_NAME_oneline"); - K_X509_get_subject_name = (X509_NAME * (*)(X509 *)) d->cryptoLib->resolveFunction("X509_get_subject_name"); - K_X509_get_issuer_name = (X509_NAME * (*)(X509 *)) d->cryptoLib->resolveFunction("X509_get_issuer_name"); - K_X509_STORE_add_lookup = (X509_LOOKUP * (*)(X509_STORE *, X509_LOOKUP_METHOD *)) d->cryptoLib->resolveFunction("X509_STORE_add_lookup"); - K_X509_LOOKUP_file = (X509_LOOKUP_METHOD * (*)(void)) d->cryptoLib->resolveFunction("X509_LOOKUP_file"); - K_X509_LOOKUP_free = (void (*)(X509_LOOKUP *)) d->cryptoLib->resolveFunction("X509_LOOKUP_free"); - K_X509_LOOKUP_ctrl = (int (*)(X509_LOOKUP *, int, const char *, long, char **)) d->cryptoLib->resolveFunction("X509_LOOKUP_ctrl"); - K_X509_STORE_CTX_init = (void (*)(X509_STORE_CTX *, X509_STORE *, X509 *, STACK_OF(X509) *)) d->cryptoLib->resolveFunction("X509_STORE_CTX_init"); - K_X509_dup = (X509 * (*)(X509 *)) d->cryptoLib->resolveFunction("X509_dup"); - K_BIO_s_mem = (BIO_METHOD * (*)(void)) d->cryptoLib->resolveFunction("BIO_s_mem"); - K_BIO_new = (BIO * (*)(BIO_METHOD *)) d->cryptoLib->resolveFunction("BIO_new"); - K_BIO_new_fp = (BIO * (*)(FILE *, int)) d->cryptoLib->resolveFunction("BIO_new_fp"); - K_BIO_new_mem_buf = (BIO * (*)(void *, int)) d->cryptoLib->resolveFunction("BIO_new_mem_buf"); - K_BIO_free = (int (*)(BIO *)) d->cryptoLib->resolveFunction("BIO_free"); - K_BIO_ctrl = (long(*)(BIO *, int, long, void *)) d->cryptoLib->resolveFunction("BIO_ctrl"); - K_BIO_write = (int (*)(BIO * b, const void *data, int len)) d->cryptoLib->resolveFunction("BIO_write"); - K_PEM_ASN1_write_bio = (int (*)(int (*)(), const char *, BIO *, char *, const EVP_CIPHER *, unsigned char *, int, pem_password_cb *, void *)) d->cryptoLib->resolveFunction("PEM_ASN1_write_bio"); + K_X509_free = (void (*)(X509 *)) d->cryptoLib->resolve("X509_free"); + K_RAND_egd = (int (*)(const char *)) d->cryptoLib->resolve("RAND_egd"); + K_RAND_load_file = (int (*)(const char *, long)) d->cryptoLib->resolve("RAND_load_file"); + K_RAND_file_name = (const char *(*)(char *, size_t)) d->cryptoLib->resolve("RAND_file_name"); + K_RAND_write_file = (int (*)(const char *)) d->cryptoLib->resolve("RAND_write_file"); + K_CRYPTO_free = (void (*)(void *)) d->cryptoLib->resolve("CRYPTO_free"); + K_d2i_X509 = (X509 * (*)(X509 **, unsigned char **, long)) d->cryptoLib->resolve("d2i_X509"); + K_i2d_X509 = (int (*)(X509 *, unsigned char **)) d->cryptoLib->resolve("i2d_X509"); + K_X509_cmp = (int (*)(X509 *, X509 *)) d->cryptoLib->resolve("X509_cmp"); + K_X509_STORE_CTX_new = (X509_STORE_CTX * (*)(void)) d->cryptoLib->resolve("X509_STORE_CTX_new"); + K_X509_STORE_CTX_free = (void (*)(X509_STORE_CTX *)) d->cryptoLib->resolve("X509_STORE_CTX_free"); + K_X509_verify_cert = (int (*)(X509_STORE_CTX *)) d->cryptoLib->resolve("X509_verify_cert"); + K_X509_STORE_new = (X509_STORE * (*)(void)) d->cryptoLib->resolve("X509_STORE_new"); + K_X509_STORE_free = (void (*)(X509_STORE *)) d->cryptoLib->resolve("X509_STORE_free"); + K_X509_NAME_oneline = (char *(*)(X509_NAME *, char *, int)) d->cryptoLib->resolve("X509_NAME_oneline"); + K_X509_get_subject_name = (X509_NAME * (*)(X509 *)) d->cryptoLib->resolve("X509_get_subject_name"); + K_X509_get_issuer_name = (X509_NAME * (*)(X509 *)) d->cryptoLib->resolve("X509_get_issuer_name"); + K_X509_STORE_add_lookup = (X509_LOOKUP * (*)(X509_STORE *, X509_LOOKUP_METHOD *)) d->cryptoLib->resolve("X509_STORE_add_lookup"); + K_X509_LOOKUP_file = (X509_LOOKUP_METHOD * (*)(void)) d->cryptoLib->resolve("X509_LOOKUP_file"); + K_X509_LOOKUP_free = (void (*)(X509_LOOKUP *)) d->cryptoLib->resolve("X509_LOOKUP_free"); + K_X509_LOOKUP_ctrl = (int (*)(X509_LOOKUP *, int, const char *, long, char **)) d->cryptoLib->resolve("X509_LOOKUP_ctrl"); + K_X509_STORE_CTX_init = (void (*)(X509_STORE_CTX *, X509_STORE *, X509 *, STACK_OF(X509) *)) d->cryptoLib->resolve("X509_STORE_CTX_init"); + K_X509_dup = (X509 * (*)(X509 *)) d->cryptoLib->resolve("X509_dup"); + K_BIO_s_mem = (BIO_METHOD * (*)(void)) d->cryptoLib->resolve("BIO_s_mem"); + K_BIO_new = (BIO * (*)(BIO_METHOD *)) d->cryptoLib->resolve("BIO_new"); + K_BIO_new_fp = (BIO * (*)(FILE *, int)) d->cryptoLib->resolve("BIO_new_fp"); + K_BIO_new_mem_buf = (BIO * (*)(void *, int)) d->cryptoLib->resolve("BIO_new_mem_buf"); + K_BIO_free = (int (*)(BIO *)) d->cryptoLib->resolve("BIO_free"); + K_BIO_ctrl = (long(*)(BIO *, int, long, void *)) d->cryptoLib->resolve("BIO_ctrl"); + K_BIO_write = (int (*)(BIO * b, const void *data, int len)) d->cryptoLib->resolve("BIO_write"); + K_PEM_ASN1_write_bio = (int (*)(int (*)(), const char *, BIO *, char *, const EVP_CIPHER *, unsigned char *, int, pem_password_cb *, void *)) d->cryptoLib->resolve("PEM_ASN1_write_bio"); K_ASN1_item_i2d_fp = (int (*)(ASN1_ITEM *, FILE *, unsigned char *)) - d->cryptoLib->resolveFunction("ASN1_item_i2d_fp"); - K_NETSCAPE_X509_it = (ASN1_ITEM *) d->cryptoLib->resolveFunction("NETSCAPE_X509_it"); - K_X509_print_fp = (int (*)(FILE *, X509 *)) d->cryptoLib->resolveFunction("X509_print_fp"); - K_i2d_PKCS12 = (int (*)(PKCS12 *, unsigned char **)) d->cryptoLib->resolveFunction("i2d_PKCS12"); - K_i2d_PKCS12_fp = (int (*)(FILE *, PKCS12 *)) d->cryptoLib->resolveFunction("i2d_PKCS12_fp"); - K_PKCS12_newpass = (int (*)(PKCS12 *, char *, char *)) d->cryptoLib->resolveFunction("PKCS12_newpass"); - K_d2i_PKCS12_fp = (PKCS12 * (*)(FILE *, PKCS12 **)) d->cryptoLib->resolveFunction("d2i_PKCS12_fp"); - K_PKCS12_new = (PKCS12 * (*)()) d->cryptoLib->resolveFunction("PKCS12_new"); - K_PKCS12_free = (void (*)(PKCS12 *)) d->cryptoLib->resolveFunction("PKCS12_free"); + d->cryptoLib->resolve("ASN1_item_i2d_fp"); + K_NETSCAPE_X509_it = (ASN1_ITEM *) d->cryptoLib->resolve("NETSCAPE_X509_it"); + K_X509_print_fp = (int (*)(FILE *, X509 *)) d->cryptoLib->resolve("X509_print_fp"); + K_i2d_PKCS12 = (int (*)(PKCS12 *, unsigned char **)) d->cryptoLib->resolve("i2d_PKCS12"); + K_i2d_PKCS12_fp = (int (*)(FILE *, PKCS12 *)) d->cryptoLib->resolve("i2d_PKCS12_fp"); + K_PKCS12_newpass = (int (*)(PKCS12 *, char *, char *)) d->cryptoLib->resolve("PKCS12_newpass"); + K_d2i_PKCS12_fp = (PKCS12 * (*)(FILE *, PKCS12 **)) d->cryptoLib->resolve("d2i_PKCS12_fp"); + K_PKCS12_new = (PKCS12 * (*)()) d->cryptoLib->resolve("PKCS12_new"); + K_PKCS12_free = (void (*)(PKCS12 *)) d->cryptoLib->resolve("PKCS12_free"); K_PKCS12_parse = (int (*)(PKCS12 *, const char *, EVP_PKEY **, - X509 **, STACK_OF(X509) **)) d->cryptoLib->resolveFunction("PKCS12_parse"); - K_EVP_PKEY_free = (void (*)(EVP_PKEY *)) d->cryptoLib->resolveFunction("EVP_PKEY_free"); - K_EVP_PKEY_new = (EVP_PKEY * (*)()) d->cryptoLib->resolveFunction("EVP_PKEY_new"); - K_X509_REQ_free = (void (*)(X509_REQ *)) d->cryptoLib->resolveFunction("X509_REQ_free"); - K_X509_REQ_new = (X509_REQ * (*)()) d->cryptoLib->resolveFunction("X509_REQ_new"); - K_X509_STORE_CTX_set_chain = (void (*)(X509_STORE_CTX *, STACK_OF(X509) *)) d->cryptoLib->resolveFunction("X509_STORE_CTX_set_chain"); - K_X509_STORE_CTX_set_purpose = (void (*)(X509_STORE_CTX *, int)) d->cryptoLib->resolveFunction("X509_STORE_CTX_set_purpose"); - K_sk_free = (void (*)(STACK *)) d->cryptoLib->resolveFunction("sk_free"); - K_sk_num = (int (*)(STACK *)) d->cryptoLib->resolveFunction("sk_num"); - K_sk_pop = (char *(*)(STACK *)) d->cryptoLib->resolveFunction("sk_pop"); - K_sk_value = (char *(*)(STACK *, int)) d->cryptoLib->resolveFunction("sk_value"); - K_sk_new = (STACK * (*)(int (*)())) d->cryptoLib->resolveFunction("sk_new"); - K_sk_push = (int (*)(STACK *, char *)) d->cryptoLib->resolveFunction("sk_push"); - K_sk_dup = (STACK * (*)(STACK *)) d->cryptoLib->resolveFunction("sk_dup"); - K_i2s_ASN1_INTEGER = (char *(*)(X509V3_EXT_METHOD *, ASN1_INTEGER *)) d->cryptoLib->resolveFunction("i2s_ASN1_INTEGER"); - K_X509_get_serialNumber = (ASN1_INTEGER * (*)(X509 *)) d->cryptoLib->resolveFunction("X509_get_serialNumber"); - K_X509_get_pubkey = (EVP_PKEY * (*)(X509 *)) d->cryptoLib->resolveFunction("X509_get_pubkey"); - K_i2d_PublicKey = (int (*)(EVP_PKEY *, unsigned char **)) d->cryptoLib->resolveFunction("i2d_PublicKey"); - K_X509_check_private_key = (int (*)(X509 *, EVP_PKEY *)) d->cryptoLib->resolveFunction("X509_check_private_key"); - K_BN_bn2hex = (char *(*)(const BIGNUM *)) d->cryptoLib->resolveFunction("BN_bn2hex"); - K_X509_digest = (int (*)(const X509 *, const EVP_MD *, unsigned char *, unsigned int *)) d->cryptoLib->resolveFunction("X509_digest"); - K_EVP_md5 = (EVP_MD * (*)()) d->cryptoLib->resolveFunction("EVP_md5"); - K_ASN1_INTEGER_free = (void (*)(ASN1_INTEGER *)) d->cryptoLib->resolveFunction("ASN1_INTEGER_free"); - K_OBJ_obj2nid = (int (*)(ASN1_OBJECT *)) d->cryptoLib->resolveFunction("OBJ_obj2nid"); - K_OBJ_nid2ln = (const char *(*)(int)) d->cryptoLib->resolveFunction("OBJ_nid2ln"); - K_X509_get_ext_count = (int (*)(X509 *)) d->cryptoLib->resolveFunction("X509_get_ext_count"); - K_X509_get_ext_by_NID = (int (*)(X509 *, int, int)) d->cryptoLib->resolveFunction("X509_get_ext_by_NID"); - K_X509_get_ext_by_OBJ = (int (*)(X509 *, ASN1_OBJECT *, int)) d->cryptoLib->resolveFunction("X509_get_ext_by_OBJ"); - K_X509_get_ext = (X509_EXTENSION * (*)(X509 *, int)) d->cryptoLib->resolveFunction("X509_get_ext"); - K_X509_delete_ext = (X509_EXTENSION * (*)(X509 *, int)) d->cryptoLib->resolveFunction("X509_delete_ext"); - K_X509_add_ext = (int (*)(X509 *, X509_EXTENSION *, int)) d->cryptoLib->resolveFunction("X509_add_ext"); - K_X509_get_ext_d2i = (void *(*)(X509 *, int, int *, int *)) d->cryptoLib->resolveFunction("X509_get_ext_d2i"); - K_i2s_ASN1_OCTET_STRING = (char *(*)(X509V3_EXT_METHOD *, ASN1_OCTET_STRING *)) d->cryptoLib->resolveFunction("i2s_ASN1_OCTET_STRING"); - K_ASN1_BIT_STRING_get_bit = (int (*)(ASN1_BIT_STRING *, int)) d->cryptoLib->resolveFunction("ASN1_BIT_STRING_get_bit"); - K_PKCS7_new = (PKCS7 * (*)()) d->cryptoLib->resolveFunction("PKCS7_new"); - K_PKCS7_free = (void (*)(PKCS7 *)) d->cryptoLib->resolveFunction("PKCS7_free"); - K_PKCS7_content_free = (void (*)(PKCS7 *)) d->cryptoLib->resolveFunction("PKCS7_content_free"); - K_i2d_PKCS7 = (int (*)(PKCS7 *, unsigned char **)) d->cryptoLib->resolveFunction("i2d_PKCS7"); - K_i2d_PKCS7_fp = (int (*)(FILE *, PKCS7 *)) d->cryptoLib->resolveFunction("i2d_PKCS7_fp"); - K_i2d_PKCS7_bio = (int (*)(BIO * bp, PKCS7 * p7)) d->cryptoLib->resolveFunction("i2d_PKCS7_bio"); - K_d2i_PKCS7 = (PKCS7 * (*)(PKCS7 **, unsigned char **, long)) d->cryptoLib->resolveFunction("d2i_PKCS7"); - K_d2i_PKCS7_fp = (PKCS7 * (*)(FILE *, PKCS7 **)) d->cryptoLib->resolveFunction("d2i_PKCS7_fp"); - K_d2i_PKCS7_bio = (PKCS7 * (*)(BIO * bp, PKCS7 **p7)) d->cryptoLib->resolveFunction("d2i_PKCS7_bio"); - K_PKCS7_dup = (PKCS7 * (*)(PKCS7 *)) d->cryptoLib->resolveFunction("PKCS7_dup"); - K_PKCS7_sign = (PKCS7 * (*)(X509 *, EVP_PKEY *, STACK_OF(X509) *, BIO *, int)) d->cryptoLib->resolveFunction("PKCS7_sign"); - K_PKCS7_verify = (int (*)(PKCS7 *, STACK_OF(X509) *, X509_STORE *, BIO *, BIO *, int)) d->cryptoLib->resolveFunction("PKCS7_verify"); - K_PKCS7_get0_signers = (STACK_OF(X509) * (*)(PKCS7 *, STACK_OF(X509) *, int)) d->cryptoLib->resolveFunction("PKCS7_get0_signers"); - K_PKCS7_encrypt = (PKCS7 * (*)(STACK_OF(X509) *, BIO *, EVP_CIPHER *, int)) d->cryptoLib->resolveFunction("PKCS7_encrypt"); - K_PKCS7_decrypt = (int (*)(PKCS7 *, EVP_PKEY *, X509 *, BIO *, int)) d->cryptoLib->resolveFunction("PKCS7_decrypt"); - K_PEM_X509_INFO_read = (STACK_OF(X509_INFO) * (*)(FILE *, STACK_OF(X509_INFO) *, pem_password_cb *, void *)) d->cryptoLib->resolveFunction("PEM_X509_INFO_read"); - K_ASN1_d2i_fp = (char *(*)(char *(*)(), char *(*)(), FILE *, unsigned char **)) d->cryptoLib->resolveFunction("ASN1_d2i_fp"); - K_X509_new = (X509 * (*)()) d->cryptoLib->resolveFunction("X509_new"); - K_X509_PURPOSE_get_count = (int (*)()) d->cryptoLib->resolveFunction("X509_PURPOSE_get_count"); - K_X509_PURPOSE_get_id = (int (*)(X509_PURPOSE *)) d->cryptoLib->resolveFunction("X509_PURPOSE_get_id"); - K_X509_check_purpose = (int (*)(X509 *, int, int)) d->cryptoLib->resolveFunction("X509_check_purpose"); - K_X509_PURPOSE_get0 = (X509_PURPOSE * (*)(int)) d->cryptoLib->resolveFunction("X509_PURPOSE_get0"); - K_EVP_PKEY_assign = (int (*)(EVP_PKEY *, int, char *)) d->cryptoLib->resolveFunction("EVP_PKEY_assign"); - K_X509_REQ_set_pubkey = (int (*)(X509_REQ *, EVP_PKEY *)) d->cryptoLib->resolveFunction("X509_REQ_set_pubkey"); - K_RSA_generate_key = (RSA * (*)(int, unsigned long, void (*)(int, int, void *), void *)) d->cryptoLib->resolveFunction("RSA_generate_key"); - K_i2d_X509_REQ_fp = (int (*)(FILE *, X509_REQ *)) d->cryptoLib->resolveFunction("i2d_X509_REQ_fp"); - K_ERR_clear_error = (void (*)()) d->cryptoLib->resolveFunction("ERR_clear_error"); - K_ERR_get_error = (unsigned long(*)()) d->cryptoLib->resolveFunction("ERR_get_error"); - K_ERR_print_errors_fp = (void (*)(FILE *)) d->cryptoLib->resolveFunction("ERR_print_errors_fp"); - K_X509_get1_email = (STACK * (*)(X509 * x)) d->cryptoLib->resolveFunction("X509_get1_email"); - K_X509_email_free = (void (*)(STACK * sk)) d->cryptoLib->resolveFunction("X509_email_free"); - K_EVP_des_ede3_cbc = (EVP_CIPHER * (*)()) d->cryptoLib->resolveFunction("EVP_des_ede3_cbc"); - K_EVP_des_cbc = (EVP_CIPHER * (*)()) d->cryptoLib->resolveFunction("EVP_des_cbc"); - K_EVP_rc2_cbc = (EVP_CIPHER * (*)()) d->cryptoLib->resolveFunction("EVP_rc2_cbc"); - K_EVP_rc2_64_cbc = (EVP_CIPHER * (*)()) d->cryptoLib->resolveFunction("EVP_rc2_64_cbc"); - K_EVP_rc2_40_cbc = (EVP_CIPHER * (*)()) d->cryptoLib->resolveFunction("EVP_rc2_40_cbc"); - K_i2d_PrivateKey_fp = (int (*)(FILE *, EVP_PKEY *)) d->cryptoLib->resolveFunction("i2d_PrivateKey_fp"); - K_i2d_PKCS8PrivateKey_fp = (int (*)(FILE *, EVP_PKEY *, const EVP_CIPHER *, char *, int, pem_password_cb *, void *)) d->cryptoLib->resolveFunction("i2d_PKCS8PrivateKey_fp"); - K_RSA_free = (void (*)(RSA *)) d->cryptoLib->resolveFunction("RSA_free"); - K_EVP_bf_cbc = (EVP_CIPHER * (*)()) d->cryptoLib->resolveFunction("EVP_bf_cbc"); - K_X509_REQ_sign = (int (*)(X509_REQ *, EVP_PKEY *, const EVP_MD *)) d->cryptoLib->resolveFunction("X509_REQ_sign"); - K_X509_NAME_add_entry_by_txt = (int (*)(X509_NAME *, char *, int, unsigned char *, int, int, int)) d->cryptoLib->resolveFunction("X509_NAME_add_entry_by_txt"); - K_X509_NAME_new = (X509_NAME * (*)()) d->cryptoLib->resolveFunction("X509_NAME_new"); - K_X509_REQ_set_subject_name = (int (*)(X509_REQ *, X509_NAME *)) d->cryptoLib->resolveFunction("X509_REQ_set_subject_name"); - K_ASN1_STRING_data = (unsigned char *(*)(ASN1_STRING *)) d->cryptoLib->resolveFunction("ASN1_STRING_data"); - K_ASN1_STRING_length = (int (*)(ASN1_STRING *)) d->cryptoLib->resolveFunction("ASN1_STRING_length"); + X509 **, STACK_OF(X509) **)) d->cryptoLib->resolve("PKCS12_parse"); + K_EVP_PKEY_free = (void (*)(EVP_PKEY *)) d->cryptoLib->resolve("EVP_PKEY_free"); + K_EVP_PKEY_new = (EVP_PKEY * (*)()) d->cryptoLib->resolve("EVP_PKEY_new"); + K_X509_REQ_free = (void (*)(X509_REQ *)) d->cryptoLib->resolve("X509_REQ_free"); + K_X509_REQ_new = (X509_REQ * (*)()) d->cryptoLib->resolve("X509_REQ_new"); + K_X509_STORE_CTX_set_chain = (void (*)(X509_STORE_CTX *, STACK_OF(X509) *)) d->cryptoLib->resolve("X509_STORE_CTX_set_chain"); + K_X509_STORE_CTX_set_purpose = (void (*)(X509_STORE_CTX *, int)) d->cryptoLib->resolve("X509_STORE_CTX_set_purpose"); + K_sk_free = (void (*)(STACK *)) d->cryptoLib->resolve("sk_free"); + K_sk_num = (int (*)(STACK *)) d->cryptoLib->resolve("sk_num"); + K_sk_pop = (char *(*)(STACK *)) d->cryptoLib->resolve("sk_pop"); + K_sk_value = (char *(*)(STACK *, int)) d->cryptoLib->resolve("sk_value"); + K_sk_new = (STACK * (*)(int (*)())) d->cryptoLib->resolve("sk_new"); + K_sk_push = (int (*)(STACK *, char *)) d->cryptoLib->resolve("sk_push"); + K_sk_dup = (STACK * (*)(STACK *)) d->cryptoLib->resolve("sk_dup"); + K_i2s_ASN1_INTEGER = (char *(*)(X509V3_EXT_METHOD *, ASN1_INTEGER *)) d->cryptoLib->resolve("i2s_ASN1_INTEGER"); + K_X509_get_serialNumber = (ASN1_INTEGER * (*)(X509 *)) d->cryptoLib->resolve("X509_get_serialNumber"); + K_X509_get_pubkey = (EVP_PKEY * (*)(X509 *)) d->cryptoLib->resolve("X509_get_pubkey"); + K_i2d_PublicKey = (int (*)(EVP_PKEY *, unsigned char **)) d->cryptoLib->resolve("i2d_PublicKey"); + K_X509_check_private_key = (int (*)(X509 *, EVP_PKEY *)) d->cryptoLib->resolve("X509_check_private_key"); + K_BN_bn2hex = (char *(*)(const BIGNUM *)) d->cryptoLib->resolve("BN_bn2hex"); + K_X509_digest = (int (*)(const X509 *, const EVP_MD *, unsigned char *, unsigned int *)) d->cryptoLib->resolve("X509_digest"); + K_EVP_md5 = (EVP_MD * (*)()) d->cryptoLib->resolve("EVP_md5"); + K_ASN1_INTEGER_free = (void (*)(ASN1_INTEGER *)) d->cryptoLib->resolve("ASN1_INTEGER_free"); + K_OBJ_obj2nid = (int (*)(ASN1_OBJECT *)) d->cryptoLib->resolve("OBJ_obj2nid"); + K_OBJ_nid2ln = (const char *(*)(int)) d->cryptoLib->resolve("OBJ_nid2ln"); + K_X509_get_ext_count = (int (*)(X509 *)) d->cryptoLib->resolve("X509_get_ext_count"); + K_X509_get_ext_by_NID = (int (*)(X509 *, int, int)) d->cryptoLib->resolve("X509_get_ext_by_NID"); + K_X509_get_ext_by_OBJ = (int (*)(X509 *, ASN1_OBJECT *, int)) d->cryptoLib->resolve("X509_get_ext_by_OBJ"); + K_X509_get_ext = (X509_EXTENSION * (*)(X509 *, int)) d->cryptoLib->resolve("X509_get_ext"); + K_X509_delete_ext = (X509_EXTENSION * (*)(X509 *, int)) d->cryptoLib->resolve("X509_delete_ext"); + K_X509_add_ext = (int (*)(X509 *, X509_EXTENSION *, int)) d->cryptoLib->resolve("X509_add_ext"); + K_X509_get_ext_d2i = (void *(*)(X509 *, int, int *, int *)) d->cryptoLib->resolve("X509_get_ext_d2i"); + K_i2s_ASN1_OCTET_STRING = (char *(*)(X509V3_EXT_METHOD *, ASN1_OCTET_STRING *)) d->cryptoLib->resolve("i2s_ASN1_OCTET_STRING"); + K_ASN1_BIT_STRING_get_bit = (int (*)(ASN1_BIT_STRING *, int)) d->cryptoLib->resolve("ASN1_BIT_STRING_get_bit"); + K_PKCS7_new = (PKCS7 * (*)()) d->cryptoLib->resolve("PKCS7_new"); + K_PKCS7_free = (void (*)(PKCS7 *)) d->cryptoLib->resolve("PKCS7_free"); + K_PKCS7_content_free = (void (*)(PKCS7 *)) d->cryptoLib->resolve("PKCS7_content_free"); + K_i2d_PKCS7 = (int (*)(PKCS7 *, unsigned char **)) d->cryptoLib->resolve("i2d_PKCS7"); + K_i2d_PKCS7_fp = (int (*)(FILE *, PKCS7 *)) d->cryptoLib->resolve("i2d_PKCS7_fp"); + K_i2d_PKCS7_bio = (int (*)(BIO * bp, PKCS7 * p7)) d->cryptoLib->resolve("i2d_PKCS7_bio"); + K_d2i_PKCS7 = (PKCS7 * (*)(PKCS7 **, unsigned char **, long)) d->cryptoLib->resolve("d2i_PKCS7"); + K_d2i_PKCS7_fp = (PKCS7 * (*)(FILE *, PKCS7 **)) d->cryptoLib->resolve("d2i_PKCS7_fp"); + K_d2i_PKCS7_bio = (PKCS7 * (*)(BIO * bp, PKCS7 **p7)) d->cryptoLib->resolve("d2i_PKCS7_bio"); + K_PKCS7_dup = (PKCS7 * (*)(PKCS7 *)) d->cryptoLib->resolve("PKCS7_dup"); + K_PKCS7_sign = (PKCS7 * (*)(X509 *, EVP_PKEY *, STACK_OF(X509) *, BIO *, int)) d->cryptoLib->resolve("PKCS7_sign"); + K_PKCS7_verify = (int (*)(PKCS7 *, STACK_OF(X509) *, X509_STORE *, BIO *, BIO *, int)) d->cryptoLib->resolve("PKCS7_verify"); + K_PKCS7_get0_signers = (STACK_OF(X509) * (*)(PKCS7 *, STACK_OF(X509) *, int)) d->cryptoLib->resolve("PKCS7_get0_signers"); + K_PKCS7_encrypt = (PKCS7 * (*)(STACK_OF(X509) *, BIO *, EVP_CIPHER *, int)) d->cryptoLib->resolve("PKCS7_encrypt"); + K_PKCS7_decrypt = (int (*)(PKCS7 *, EVP_PKEY *, X509 *, BIO *, int)) d->cryptoLib->resolve("PKCS7_decrypt"); + K_PEM_X509_INFO_read = (STACK_OF(X509_INFO) * (*)(FILE *, STACK_OF(X509_INFO) *, pem_password_cb *, void *)) d->cryptoLib->resolve("PEM_X509_INFO_read"); + K_ASN1_d2i_fp = (char *(*)(char *(*)(), char *(*)(), FILE *, unsigned char **)) d->cryptoLib->resolve("ASN1_d2i_fp"); + K_X509_new = (X509 * (*)()) d->cryptoLib->resolve("X509_new"); + K_X509_PURPOSE_get_count = (int (*)()) d->cryptoLib->resolve("X509_PURPOSE_get_count"); + K_X509_PURPOSE_get_id = (int (*)(X509_PURPOSE *)) d->cryptoLib->resolve("X509_PURPOSE_get_id"); + K_X509_check_purpose = (int (*)(X509 *, int, int)) d->cryptoLib->resolve("X509_check_purpose"); + K_X509_PURPOSE_get0 = (X509_PURPOSE * (*)(int)) d->cryptoLib->resolve("X509_PURPOSE_get0"); + K_EVP_PKEY_assign = (int (*)(EVP_PKEY *, int, char *)) d->cryptoLib->resolve("EVP_PKEY_assign"); + K_X509_REQ_set_pubkey = (int (*)(X509_REQ *, EVP_PKEY *)) d->cryptoLib->resolve("X509_REQ_set_pubkey"); + K_RSA_generate_key = (RSA * (*)(int, unsigned long, void (*)(int, int, void *), void *)) d->cryptoLib->resolve("RSA_generate_key"); + K_i2d_X509_REQ_fp = (int (*)(FILE *, X509_REQ *)) d->cryptoLib->resolve("i2d_X509_REQ_fp"); + K_ERR_clear_error = (void (*)()) d->cryptoLib->resolve("ERR_clear_error"); + K_ERR_get_error = (unsigned long(*)()) d->cryptoLib->resolve("ERR_get_error"); + K_ERR_print_errors_fp = (void (*)(FILE *)) d->cryptoLib->resolve("ERR_print_errors_fp"); + K_X509_get1_email = (STACK * (*)(X509 * x)) d->cryptoLib->resolve("X509_get1_email"); + K_X509_email_free = (void (*)(STACK * sk)) d->cryptoLib->resolve("X509_email_free"); + K_EVP_des_ede3_cbc = (EVP_CIPHER * (*)()) d->cryptoLib->resolve("EVP_des_ede3_cbc"); + K_EVP_des_cbc = (EVP_CIPHER * (*)()) d->cryptoLib->resolve("EVP_des_cbc"); + K_EVP_rc2_cbc = (EVP_CIPHER * (*)()) d->cryptoLib->resolve("EVP_rc2_cbc"); + K_EVP_rc2_64_cbc = (EVP_CIPHER * (*)()) d->cryptoLib->resolve("EVP_rc2_64_cbc"); + K_EVP_rc2_40_cbc = (EVP_CIPHER * (*)()) d->cryptoLib->resolve("EVP_rc2_40_cbc"); + K_i2d_PrivateKey_fp = (int (*)(FILE *, EVP_PKEY *)) d->cryptoLib->resolve("i2d_PrivateKey_fp"); + K_i2d_PKCS8PrivateKey_fp = (int (*)(FILE *, EVP_PKEY *, const EVP_CIPHER *, char *, int, pem_password_cb *, void *)) d->cryptoLib->resolve("i2d_PKCS8PrivateKey_fp"); + K_RSA_free = (void (*)(RSA *)) d->cryptoLib->resolve("RSA_free"); + K_EVP_bf_cbc = (EVP_CIPHER * (*)()) d->cryptoLib->resolve("EVP_bf_cbc"); + K_X509_REQ_sign = (int (*)(X509_REQ *, EVP_PKEY *, const EVP_MD *)) d->cryptoLib->resolve("X509_REQ_sign"); + K_X509_NAME_add_entry_by_txt = (int (*)(X509_NAME *, char *, int, unsigned char *, int, int, int)) d->cryptoLib->resolve("X509_NAME_add_entry_by_txt"); + K_X509_NAME_new = (X509_NAME * (*)()) d->cryptoLib->resolve("X509_NAME_new"); + K_X509_REQ_set_subject_name = (int (*)(X509_REQ *, X509_NAME *)) d->cryptoLib->resolve("X509_REQ_set_subject_name"); + K_ASN1_STRING_data = (unsigned char *(*)(ASN1_STRING *)) d->cryptoLib->resolve("ASN1_STRING_data"); + K_ASN1_STRING_length = (int (*)(ASN1_STRING *)) d->cryptoLib->resolve("ASN1_STRING_length"); #endif } #ifdef Q_OS_WIN - d->sslLib = new KLibrary("ssleay32.dll"); + d->sslLib = new QLibrary("ssleay32.dll"); if (!d->sslLib->load()) { delete d->sslLib; d->sslLib = 0; @@ -543,7 +543,7 @@ { QString libname = findMostRecentLib("/usr/lib", "ssl"); if (!libname.isNull()) { - d->sslLib = new KLibrary(libname); + d->sslLib = new QLibrary(libname); d->sslLib->setLoadHints(QLibrary::ExportExternalSymbolsHint); if (!d->sslLib->load()) { delete d->sslLib; @@ -566,7 +566,7 @@ QString tmpStr(alib); tmpStr.remove(QRegExp("\\(.*\\)")); if (QFile(tmpStr).isReadable()) { - d->sslLib = new KLibrary(alib); + d->sslLib = new QLibrary(alib); d->sslLib->setLoadHints(QLibrary::ExportExternalSymbolsHint); } if (d->sslLib && d->sslLib->load()) { @@ -585,88 +585,88 @@ if (d->sslLib) { #if KSSL_HAVE_SSL // stand back from your monitor and look at this. it's fun! :) - K_SSL_connect = (int (*)(SSL *)) d->sslLib->resolveFunction("SSL_connect"); - K_SSL_accept = (int (*)(SSL *)) d->sslLib->resolveFunction("SSL_accept"); - K_SSL_read = (int (*)(SSL *, void *, int)) d->sslLib->resolveFunction("SSL_read"); + K_SSL_connect = (int (*)(SSL *)) d->sslLib->resolve("SSL_connect"); + K_SSL_accept = (int (*)(SSL *)) d->sslLib->resolve("SSL_accept"); + K_SSL_read = (int (*)(SSL *, void *, int)) d->sslLib->resolve("SSL_read"); K_SSL_write = (int (*)(SSL *, const void *, int)) - d->sslLib->resolveFunction("SSL_write"); - K_SSL_new = (SSL * (*)(SSL_CTX *)) d->sslLib->resolveFunction("SSL_new"); - K_SSL_free = (void (*)(SSL *)) d->sslLib->resolveFunction("SSL_free"); - K_SSL_shutdown = (int (*)(SSL *)) d->sslLib->resolveFunction("SSL_shutdown"); - K_SSL_CTX_new = (SSL_CTX * (*)(SSL_METHOD *)) d->sslLib->resolveFunction("SSL_CTX_new"); - K_SSL_CTX_free = (void (*)(SSL_CTX *)) d->sslLib->resolveFunction("SSL_CTX_free"); - K_SSL_set_fd = (int (*)(SSL *, int)) d->sslLib->resolveFunction("SSL_set_fd"); - K_SSL_pending = (int (*)(SSL *)) d->sslLib->resolveFunction("SSL_pending"); + d->sslLib->resolve("SSL_write"); + K_SSL_new = (SSL * (*)(SSL_CTX *)) d->sslLib->resolve("SSL_new"); + K_SSL_free = (void (*)(SSL *)) d->sslLib->resolve("SSL_free"); + K_SSL_shutdown = (int (*)(SSL *)) d->sslLib->resolve("SSL_shutdown"); + K_SSL_CTX_new = (SSL_CTX * (*)(SSL_METHOD *)) d->sslLib->resolve("SSL_CTX_new"); + K_SSL_CTX_free = (void (*)(SSL_CTX *)) d->sslLib->resolve("SSL_CTX_free"); + K_SSL_set_fd = (int (*)(SSL *, int)) d->sslLib->resolve("SSL_set_fd"); + K_SSL_pending = (int (*)(SSL *)) d->sslLib->resolve("SSL_pending"); K_SSL_CTX_set_cipher_list = (int (*)(SSL_CTX *, const char *)) - d->sslLib->resolveFunction("SSL_CTX_set_cipher_list"); - K_SSL_CTX_set_verify = (void (*)(SSL_CTX *, int, int (*)(int, X509_STORE_CTX *))) d->sslLib->resolveFunction("SSL_CTX_set_verify"); + d->sslLib->resolve("SSL_CTX_set_cipher_list"); + K_SSL_CTX_set_verify = (void (*)(SSL_CTX *, int, int (*)(int, X509_STORE_CTX *))) d->sslLib->resolve("SSL_CTX_set_verify"); K_SSL_use_certificate = (int (*)(SSL *, X509 *)) - d->sslLib->resolveFunction("SSL_CTX_use_certificate"); + d->sslLib->resolve("SSL_CTX_use_certificate"); K_SSL_get_current_cipher = (SSL_CIPHER * (*)(SSL *)) - d->sslLib->resolveFunction("SSL_get_current_cipher"); + d->sslLib->resolve("SSL_get_current_cipher"); K_SSL_ctrl = (long(*)(SSL *, int, long, char *)) - d->sslLib->resolveFunction("SSL_ctrl"); - K_TLSv1_client_method = (SSL_METHOD * (*)()) d->sslLib->resolveFunction("TLSv1_client_method"); - K_SSLv23_client_method = (SSL_METHOD * (*)()) d->sslLib->resolveFunction("SSLv23_client_method"); - K_SSL_get_peer_certificate = (X509 * (*)(SSL *)) d->sslLib->resolveFunction("SSL_get_peer_certificate"); - K_SSL_CIPHER_get_bits = (int (*)(SSL_CIPHER *, int *)) d->sslLib->resolveFunction("SSL_CIPHER_get_bits"); - K_SSL_CIPHER_get_version = (char *(*)(SSL_CIPHER *)) d->sslLib->resolveFunction("SSL_CIPHER_get_version"); - K_SSL_CIPHER_get_name = (const char *(*)(SSL_CIPHER *)) d->sslLib->resolveFunction("SSL_CIPHER_get_name"); - K_SSL_CIPHER_description = (char *(*)(SSL_CIPHER *, char *, int)) d->sslLib->resolveFunction("SSL_CIPHER_description"); - K_SSL_CTX_use_PrivateKey = (int (*)(SSL_CTX *, EVP_PKEY *)) d->sslLib->resolveFunction("SSL_CTX_use_PrivateKey"); - K_SSL_CTX_use_certificate = (int (*)(SSL_CTX *, X509 *)) d->sslLib->resolveFunction("SSL_CTX_use_certificate"); - K_SSL_get_error = (int (*)(SSL *, int)) d->sslLib->resolveFunction("SSL_get_error"); - K_SSL_get_peer_cert_chain = (STACK_OF(X509) * (*)(SSL *)) d->sslLib->resolveFunction("SSL_get_peer_cert_chain"); - K_SSL_load_client_CA_file = (STACK_OF(X509_NAME) * (*)(const char *)) d->sslLib->resolveFunction("SSL_load_client_CA_file"); - K_SSL_peek = (int (*)(SSL *, void *, int)) d->sslLib->resolveFunction("SSL_peek"); - K_SSL_get1_session = (SSL_SESSION * (*)(SSL *)) d->sslLib->resolveFunction("SSL_get1_session"); - K_SSL_SESSION_free = (void (*)(SSL_SESSION *)) d->sslLib->resolveFunction("SSL_SESSION_free"); - K_SSL_set_session = (int (*)(SSL *, SSL_SESSION *)) d->sslLib->resolveFunction("SSL_set_session"); - K_d2i_SSL_SESSION = (SSL_SESSION * (*)(SSL_SESSION **, unsigned char **, long)) d->sslLib->resolveFunction("d2i_SSL_SESSION"); - K_i2d_SSL_SESSION = (int (*)(SSL_SESSION *, unsigned char **)) d->sslLib->resolveFunction("i2d_SSL_SESSION"); - K_SSL_get_ciphers = (STACK_OF(SSL_CIPHER) * (*)(const SSL *)) d->sslLib->resolveFunction("SSL_get_ciphers"); + d->sslLib->resolve("SSL_ctrl"); + K_TLSv1_client_method = (SSL_METHOD * (*)()) d->sslLib->resolve("TLSv1_client_method"); + K_SSLv23_client_method = (SSL_METHOD * (*)()) d->sslLib->resolve("SSLv23_client_method"); + K_SSL_get_peer_certificate = (X509 * (*)(SSL *)) d->sslLib->resolve("SSL_get_peer_certificate"); + K_SSL_CIPHER_get_bits = (int (*)(SSL_CIPHER *, int *)) d->sslLib->resolve("SSL_CIPHER_get_bits"); + K_SSL_CIPHER_get_version = (char *(*)(SSL_CIPHER *)) d->sslLib->resolve("SSL_CIPHER_get_version"); + K_SSL_CIPHER_get_name = (const char *(*)(SSL_CIPHER *)) d->sslLib->resolve("SSL_CIPHER_get_name"); + K_SSL_CIPHER_description = (char *(*)(SSL_CIPHER *, char *, int)) d->sslLib->resolve("SSL_CIPHER_description"); + K_SSL_CTX_use_PrivateKey = (int (*)(SSL_CTX *, EVP_PKEY *)) d->sslLib->resolve("SSL_CTX_use_PrivateKey"); + K_SSL_CTX_use_certificate = (int (*)(SSL_CTX *, X509 *)) d->sslLib->resolve("SSL_CTX_use_certificate"); + K_SSL_get_error = (int (*)(SSL *, int)) d->sslLib->resolve("SSL_get_error"); + K_SSL_get_peer_cert_chain = (STACK_OF(X509) * (*)(SSL *)) d->sslLib->resolve("SSL_get_peer_cert_chain"); + K_SSL_load_client_CA_file = (STACK_OF(X509_NAME) * (*)(const char *)) d->sslLib->resolve("SSL_load_client_CA_file"); + K_SSL_peek = (int (*)(SSL *, void *, int)) d->sslLib->resolve("SSL_peek"); + K_SSL_get1_session = (SSL_SESSION * (*)(SSL *)) d->sslLib->resolve("SSL_get1_session"); + K_SSL_SESSION_free = (void (*)(SSL_SESSION *)) d->sslLib->resolve("SSL_SESSION_free"); + K_SSL_set_session = (int (*)(SSL *, SSL_SESSION *)) d->sslLib->resolve("SSL_set_session"); + K_d2i_SSL_SESSION = (SSL_SESSION * (*)(SSL_SESSION **, unsigned char **, long)) d->sslLib->resolve("d2i_SSL_SESSION"); + K_i2d_SSL_SESSION = (int (*)(SSL_SESSION *, unsigned char **)) d->sslLib->resolve("i2d_SSL_SESSION"); + K_SSL_get_ciphers = (STACK_OF(SSL_CIPHER) * (*)(const SSL *)) d->sslLib->resolve("SSL_get_ciphers"); #endif // Initialize the library (once only!) - KLibrary::void_function_ptr x; - x = d->sslLib->resolveFunction("SSL_library_init"); + QFunctionPointer x; + x = d->sslLib->resolve("SSL_library_init"); if (d->cryptoLib) { if (x) { ((int (*)())x)(); } - x = d->cryptoLib->resolveFunction("OpenSSL_add_all_algorithms"); + x = d->cryptoLib->resolve("OpenSSL_add_all_algorithms"); if (!x) { - x = d->cryptoLib->resolveFunction("OPENSSL_add_all_algorithms"); + x = d->cryptoLib->resolve("OPENSSL_add_all_algorithms"); } if (x) { ((void (*)())x)(); } else { - x = d->cryptoLib->resolveFunction("OpenSSL_add_all_algorithms_conf"); + x = d->cryptoLib->resolve("OpenSSL_add_all_algorithms_conf"); if (!x) { - x = d->cryptoLib->resolveFunction("OPENSSL_add_all_algorithms_conf"); + x = d->cryptoLib->resolve("OPENSSL_add_all_algorithms_conf"); } if (x) { ((void (*)())x)(); } else { - x = d->cryptoLib->resolveFunction("OpenSSL_add_all_algorithms_noconf"); + x = d->cryptoLib->resolve("OpenSSL_add_all_algorithms_noconf"); if (!x) { - x = d->cryptoLib->resolveFunction("OPENSSL_add_all_algorithms_noconf"); + x = d->cryptoLib->resolve("OPENSSL_add_all_algorithms_noconf"); } if (x) { ((void (*)())x)(); } } } - x = d->cryptoLib->resolveFunction("OpenSSL_add_all_ciphers"); + x = d->cryptoLib->resolve("OpenSSL_add_all_ciphers"); if (!x) { - x = d->cryptoLib->resolveFunction("OPENSSL_add_all_ciphers"); + x = d->cryptoLib->resolve("OPENSSL_add_all_ciphers"); } if (x) { ((void (*)())x)(); } - x = d->cryptoLib->resolveFunction("OpenSSL_add_all_digests"); + x = d->cryptoLib->resolve("OpenSSL_add_all_digests"); if (!x) { - x = d->cryptoLib->resolveFunction("OPENSSL_add_all_digests"); + x = d->cryptoLib->resolve("OPENSSL_add_all_digests"); } if (x) { ((void (*)())x)(); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/khtml-4.97.0/src/java/kjavaappletviewer.desktop new/khtml-4.98.0/src/java/kjavaappletviewer.desktop --- old/khtml-4.97.0/src/java/kjavaappletviewer.desktop 2014-03-01 12:50:52.000000000 +0100 +++ new/khtml-4.98.0/src/java/kjavaappletviewer.desktop 2014-03-29 08:19:09.000000000 +0100 @@ -12,7 +12,7 @@ Name[br]=Lenner enframmet eus arloadigoù Java Name[bs]=Ugrađeni prikazivač java Applet-a Name[ca]=Visor de la miniaplicació Java incrustada -Name[ca@valencia]=Visor de la miniaplicació Java encastada +Name[ca@valencia]=Visor de la miniaplicació Java incrustada Name[cs]=Zabudovaný prohlížeč Java appletů Name[csb]=Wbùdowóny przezérnik apletów Java Name[cy]=Gwelydd Rhaglennig Java Mewnadeiladedig diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/khtml-4.97.0/src/khtml.desktop new/khtml-4.98.0/src/khtml.desktop --- old/khtml-4.97.0/src/khtml.desktop 2014-03-01 12:50:52.000000000 +0100 +++ new/khtml-4.98.0/src/khtml.desktop 2014-03-29 08:19:09.000000000 +0100 @@ -13,7 +13,7 @@ Comment[br]=Parzh HTML gweler enframmus Comment[bs]=Ugnezdiva komponenta za prikaz HTML‑a Comment[ca]=Component incrustable per a visualitzar HTML -Comment[ca@valencia]=Component encastable per a visualitzar HTML +Comment[ca@valencia]=Component incrustable per a visualitzar HTML Comment[cs]=Komponenta pro zobrazování HTML Comment[csb]=Kòmpònent do przezeraniô lopków HTML Comment[cy]=Cydran gweld HTML mewnadeiladadwy diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/khtml-4.97.0/src/khtml_ext.cpp new/khtml-4.98.0/src/khtml_ext.cpp --- old/khtml-4.97.0/src/khtml_ext.cpp 2014-03-01 12:50:52.000000000 +0100 +++ new/khtml-4.98.0/src/khtml_ext.cpp 2014-03-29 08:19:09.000000000 +0100 @@ -49,6 +49,7 @@ #include <assert.h> #include <kconfiggroup.h> +#include <ksharedconfig.h> #include <QDebug> #include <klocalizedstring.h> #include <kjobuidelegate.h> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/khtml-4.97.0/src/khtml_part.cpp new/khtml-4.98.0/src/khtml_part.cpp --- old/khtml-4.97.0/src/khtml_part.cpp 2014-03-01 12:50:52.000000000 +0100 +++ new/khtml-4.98.0/src/khtml_part.cpp 2014-03-29 08:19:09.000000000 +0100 @@ -139,6 +139,7 @@ #include "rendering/render_form.h" #include <kwindowsystem.h> #include <kconfiggroup.h> +#include <ksharedconfig.h> #ifdef KJS_DEBUGGER #include "ecma/debugger/debugwindow.h" @@ -679,8 +680,8 @@ } DOM::HashChangeEventImpl *hashChangeEvImpl = 0; - const QString &oldRef = q->url().fragment(); - const QString &newRef = url.fragment(); + const QString &oldRef = q->url().fragment(QUrl::FullyEncoded); + const QString &newRef = url.fragment(QUrl::FullyEncoded); if ((oldRef != newRef) || (oldRef.isNull() && newRef.isEmpty())) { hashChangeEvImpl = new DOM::HashChangeEventImpl(); hashChangeEvImpl->initHashChangeEvent("hashchange", @@ -692,7 +693,7 @@ } if (!q->gotoAnchor(url.fragment(QUrl::FullyEncoded))) { - q->gotoAnchor(url.fragment()); + q->gotoAnchor(url.fragment(QUrl::FullyDecoded)); } q->setUrl(url); @@ -703,9 +704,8 @@ } } -bool KHTMLPart::openUrl(const QUrl &_url) +bool KHTMLPart::openUrl(const QUrl &url) { - QUrl url(_url); // qDebug() << this << "opening" << url; #ifndef KHTML_NO_WALLET @@ -815,7 +815,7 @@ emit started(0); if (!gotoAnchor(url.fragment(QUrl::FullyEncoded))) { - gotoAnchor(url.fragment()); + gotoAnchor(url.fragment(QUrl::FullyDecoded)); } d->m_bComplete = true; @@ -950,8 +950,8 @@ // If this was an explicit reload and the user style sheet should be used, // do a stat to see whether the stylesheet was changed in the meanwhile. if (args.reload() && !settings()->userStyleSheet().isEmpty()) { - QUrl url(settings()->userStyleSheet()); - KIO::StatJob *job = KIO::stat(url, KIO::HideProgressInfo); + QUrl userStyleSheetUrl(settings()->userStyleSheet()); + KIO::StatJob *job = KIO::stat(userStyleSheetUrl, KIO::HideProgressInfo); connect(job, SIGNAL(result(KJob*)), this, SLOT(slotUserSheetStatDone(KJob*))); } @@ -1332,7 +1332,7 @@ { QStringList args; args << "khtml_java_js"; - KToolInvocation::kdeinitExec("kcmshell4", args); + KToolInvocation::kdeinitExec("kcmshell5", args); } QVariant KHTMLPart::executeScript(const QString &filename, int baseLine, const DOM::Node &n, const QString &script) @@ -7281,8 +7281,8 @@ if (!d->m_doc || !d->m_doc->parsing()) { disconnect(d->m_view, SIGNAL(finishedLayout()), this, SLOT(restoreScrollPosition())); } - if (!gotoAnchor(QUrl(url()).fragment())) { - gotoAnchor(url().fragment()); + if (!gotoAnchor(url().fragment(QUrl::FullyEncoded))) { + gotoAnchor(url().fragment(QUrl::FullyDecoded)); } return; } @@ -7291,7 +7291,7 @@ // offsets. If the document has been fully loaded, force the new coordinates, // even if the canvas is too short (can happen when user resizes the window // during loading). - if (d->m_view->contentsHeight() - d->m_view->visibleHeight() >= args.yOffset() + if ((d->m_view->contentsHeight() - d->m_view->visibleHeight()) >= args.yOffset() || d->m_bComplete) { d->m_view->setContentsPos(args.xOffset(), args.yOffset()); disconnect(d->m_view, SIGNAL(finishedLayout()), this, SLOT(restoreScrollPosition())); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/khtml-4.97.0/src/khtml_part.h new/khtml-4.98.0/src/khtml_part.h --- old/khtml-4.97.0/src/khtml_part.h 2014-03-01 12:50:52.000000000 +0100 +++ new/khtml-4.98.0/src/khtml_part.h 2014-03-29 08:19:09.000000000 +0100 @@ -1190,8 +1190,8 @@ /** * If form notification is on, this will be emitted either for a form * submit or before the form submit according to the setting. - * ### KDE4 remove me */ + // TODO: remove/deprecate? void formSubmitNotification(const char *action, const QString &url, const QByteArray &formData, const QString &target, const QString &contentType, const QString &boundary); @@ -1376,9 +1376,9 @@ */ void setCaretVisible(bool show); - // ### KDE4 FIXME: - // Remove this and make the one below protected+virtual slot. - // Warning: this is effectively "internal". Be careful. + // ### FIXME: + // Remove this and make the one below protected+virtual slot. + // Warning: this is effectively "internal". Be careful. void submitFormProxy(const char *action, const QString &url, const QByteArray &formData, const QString &target, @@ -1720,13 +1720,13 @@ /** * @internal */ - // ### KDE4 FIXME: - // It is desirable to be able to filter form submissions as well. - // For instance, forms can have a target and an inheriting class - // might want to filter based on the target. Make this protected - // and virtual, or provide a better solution. - // See the web_module for the sidebar for an example where this is - // necessary. + // ### FIXME: + // It is desirable to be able to filter form submissions as well. + // For instance, forms can have a target and an inheriting class + // might want to filter based on the target. Make this protected + // and virtual, or provide a better solution. + // See the web_module for the sidebar for an example where this is + // necessary. void submitForm(const char *action, const QString &url, const QByteArray &formData, const QString &target, const QString &contentType = QString(), const QString &boundary = QString()); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/khtml-4.97.0/src/khtmlimage.desktop new/khtml-4.98.0/src/khtmlimage.desktop --- old/khtml-4.97.0/src/khtmlimage.desktop 2014-03-01 12:50:52.000000000 +0100 +++ new/khtml-4.98.0/src/khtmlimage.desktop 2014-03-29 08:19:09.000000000 +0100 @@ -13,7 +13,7 @@ Comment[br]=Parzh skeudenn gweler enframmus Comment[bs]=Ugnezdiva komponenta za prikaz slika Comment[ca]=Component incrustable per a visualitzar imatges -Comment[ca@valencia]=Component encastable per a visualitzar imatges +Comment[ca@valencia]=Component incrustable per a visualitzar imatges Comment[cs]=Komponenta pro zobrazování obrázků Comment[csb]=Kòmpònent do przezeraniô òbrôzów Comment[cy]=Cydran Gweld Delwedd Mewnadeiladadwy @@ -109,7 +109,7 @@ Name[br]=Gweler Skeudennoù Enklozet Name[bs]=Ugradivi prikazivač slika Name[ca]=Visor incrustable d'imatges -Name[ca@valencia]=Visor encastable d'imatges +Name[ca@valencia]=Visor incrustable d'imatges Name[cs]=Zabudovaný prohlížeč obrázků Name[csb]=Wbùdowóny przezérnik òbrôzów Name[cy]=Gwelydd Delweddau Mewnadeiladadwy diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/khtml-4.97.0/src/khtmlpart_p.h new/khtml-4.98.0/src/khtmlpart_p.h --- old/khtml-4.97.0/src/khtmlpart_p.h 2014-03-01 12:50:52.000000000 +0100 +++ new/khtml-4.98.0/src/khtmlpart_p.h 2014-03-29 08:19:09.000000000 +0100 @@ -261,7 +261,6 @@ bool m_restoreScrollPosition; bool m_statusMessagesEnabled; bool m_bWalletOpened; - bool m_urlSelectedOpenedURL; // KDE4: remove bool m_bDNSPrefetchIsDefault; int m_DNSPrefetchTimer; int m_DNSTTLTimer; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/khtml-4.97.0/src/khtmlview.cpp new/khtml-4.98.0/src/khtmlview.cpp --- old/khtml-4.97.0/src/khtmlview.cpp 2014-03-01 12:50:52.000000000 +0100 +++ new/khtml-4.98.0/src/khtmlview.cpp 2014-03-29 08:19:09.000000000 +0100 @@ -70,6 +70,7 @@ #include <kstringhandler.h> #include <kconfiggroup.h> +#include <ksharedconfig.h> #include <QBitmap> #include <QDialog> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/khtml-4.97.0/src/kmultipart/kmultipart.desktop new/khtml-4.98.0/src/kmultipart/kmultipart.desktop --- old/khtml-4.97.0/src/kmultipart/kmultipart.desktop 2014-03-01 12:50:52.000000000 +0100 +++ new/khtml-4.98.0/src/kmultipart/kmultipart.desktop 2014-03-29 08:19:09.000000000 +0100 @@ -13,7 +13,7 @@ Name[bn_IN]=মাল্টিপার্ট/মিক্সড-র জন্য এমবেড করার যোগ্য সামগ্রী Name[bs]=Ugradiva komponenta za višedijelni/mješoviti MIME Name[ca]=Component incrustable per a multipart/mescla -Name[ca@valencia]=Component encastable per a multipart/mescla +Name[ca@valencia]=Component incrustable per a multipart/mescla Name[cs]=Pohltitelné komponenty pro 'multipart/mixed' Name[csb]=Składowi kòmpònent dlô multipart/mixed Name[da]=Indlejrbar komponent for multipart/mixed diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/khtml-4.97.0/src/misc/AtomicString.cpp new/khtml-4.98.0/src/misc/AtomicString.cpp --- old/khtml-4.97.0/src/misc/AtomicString.cpp 2014-03-01 12:50:52.000000000 +0100 +++ new/khtml-4.98.0/src/misc/AtomicString.cpp 2014-03-29 08:19:09.000000000 +0100 @@ -172,7 +172,7 @@ } init(); - UCharBuffer buf = { s, length }; + UCharBuffer buf = { s, static_cast<uint>(length) }; std::pair<HashSet<DOMStringImpl *>::iterator, bool> addResult = stringTable->add<UCharBuffer, UCharBufferTranslator>(buf); if (!addResult.second) { return *addResult.first; @@ -196,7 +196,7 @@ } init(); - UCharBuffer buf = {s, length}; + UCharBuffer buf = {s, static_cast<uint>(length)}; std::pair<HashSet<DOMStringImpl *>::iterator, bool> addResult = stringTable->add<UCharBuffer, UCharBufferTranslator>(buf); if (!addResult.second) { return *addResult.first; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/khtml-4.97.0/src/rendering/break_lines.cpp new/khtml-4.98.0/src/rendering/break_lines.cpp --- old/khtml-4.97.0/src/rendering/break_lines.cpp 2014-03-01 12:50:52.000000000 +0100 +++ new/khtml-4.98.0/src/rendering/break_lines.cpp 2014-03-29 08:19:09.000000000 +0100 @@ -1,5 +1,5 @@ #include <break_lines.h> -#include <klibrary.h> +#include <QtCore/QLibrary> #include <QtCore/QTextCodec> #include <stdio.h> #include <stdlib.h> @@ -46,7 +46,7 @@ int *isbreakable; int allocated; int numwbrpos, numisbreakable; - KLibrary *library; + QLibrary *library; }; static ThaiCache *cache = 0; @@ -66,13 +66,13 @@ #ifndef HAVE_LIBTHAI - KLibrary *lib = new KLibrary(QLatin1String("libthai")); + QLibrary *lib = new QLibrary(QLatin1String("libthai")); /* load libthai dynamically */ if ((!th_brk) && thaiCodec) { printf("Try to load libthai dynamically...\n"); if (lib->load()) { - th_brk = (th_brk_def) lib->resolveFunction("th_brk"); + th_brk = (th_brk_def) lib->resolve("th_brk"); } if (!th_brk) { // indication that loading failed and we shouldn't try to load again diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/khtml-4.97.0/src/rendering/render_flow.cpp new/khtml-4.98.0/src/rendering/render_flow.cpp --- old/khtml-4.97.0/src/rendering/render_flow.cpp 2014-03-01 12:50:52.000000000 +0100 +++ new/khtml-4.98.0/src/rendering/render_flow.cpp 2014-03-29 08:19:09.000000000 +0100 @@ -58,7 +58,7 @@ return result; } -RenderFlow *RenderFlow::continuationBefore(RenderObject *beforeChild) +RenderFlow *RenderFlow::continuationBefore(const RenderObject *beforeChild) { if (beforeChild && beforeChild->parent() == this) { return this; @@ -89,11 +89,14 @@ void RenderFlow::addChildWithContinuation(RenderObject *newChild, RenderObject *beforeChild) { RenderFlow *flow = continuationBefore(beforeChild); - while (beforeChild && beforeChild->parent() != flow && !beforeChild->parent()->isAnonymousBlock()) { + + RenderObject *bc = beforeChild; + while (bc && bc->parent() != flow && !bc->parent()->isAnonymousBlock()) { // skip implicit containers around beforeChild - beforeChild = beforeChild->parent(); + bc = bc->parent(); } - RenderFlow *beforeChildParent = beforeChild ? static_cast<RenderFlow *>(beforeChild->parent()) : + + RenderFlow *beforeChildParent = bc ? static_cast<RenderFlow *>(bc->parent()) : (flow->continuation() ? flow->continuation() : flow); if (newChild->isFloatingOrPositioned()) { @@ -350,12 +353,16 @@ { if (isRenderInline() && isInlineFlow()) { QList<QRectF> list; - for (InlineFlowBox *child = firstLineBox(); child; child = child->nextFlowBox()) { - QRectF rect(parent()->offsetLeft() + child->xPos(), - parent()->offsetTop() + child->yPos(), - child->width(), child->height()); - list.append(clientRectToViewport(rect)); + InlineFlowBox *child = firstLineBox(); + if (child) { + int x = 0, y = 0; + absolutePosition(x,y); + do { + QRectF rect(x + child->xPos(), y + child->yPos(), child->width(), child->height()); + list.append(clientRectToViewport(rect)); + child = child->nextFlowBox(); + } while (child); } // In case our flow is splitted by blocks diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/khtml-4.97.0/src/rendering/render_flow.h new/khtml-4.98.0/src/rendering/render_flow.h --- old/khtml-4.97.0/src/rendering/render_flow.h 2014-03-01 12:50:52.000000000 +0100 +++ new/khtml-4.98.0/src/rendering/render_flow.h 2014-03-29 08:19:09.000000000 +0100 @@ -60,7 +60,7 @@ { m_continuation = c; } - RenderFlow *continuationBefore(RenderObject *beforeChild); + RenderFlow *continuationBefore(const RenderObject *beforeChild); void addChildWithContinuation(RenderObject *newChild, RenderObject *beforeChild); virtual void addChildToFlow(RenderObject *newChild, RenderObject *beforeChild) = 0; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/khtml-4.97.0/src/rendering/render_image.cpp new/khtml-4.98.0/src/rendering/render_image.cpp --- old/khtml-4.97.0/src/rendering/render_image.cpp 2014-03-01 12:50:52.000000000 +0100 +++ new/khtml-4.98.0/src/rendering/render_image.cpp 2014-03-29 08:19:09.000000000 +0100 @@ -119,7 +119,7 @@ iw = br.width(); } //#ifdef __GNUC__ -// #warning "KDE4: hack for testregression, remove (use above instead) when main branch" +// #warning "FIXME: hack for testregression, remove (use above instead)" //#endif // iw = br.width() + qMax(-fm.minLeftBearing(), 0) + qMax(-fm.minRightBearing(), 0); @@ -290,7 +290,7 @@ //BEGIN HACK #if 0 #ifdef __GNUC__ -#warning "KDE4: hack for testregression, remove when main branch" +#warning "FIXME: hack for testregression, remove" #endif ax += qMax(-fm.minLeftBearing(), 0); cWidth -= qMax(-fm.minLeftBearing(), 0); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/khtml-4.97.0/src/rendering/render_list.cpp new/khtml-4.98.0/src/rendering/render_list.cpp --- old/khtml-4.97.0/src/rendering/render_list.cpp 2014-03-01 12:50:52.000000000 +0100 +++ new/khtml-4.98.0/src/rendering/render_list.cpp 2014-03-29 08:19:09.000000000 +0100 @@ -376,7 +376,7 @@ if (listPositionInside()) { //BEGIN HACK #ifdef __GNUC__ -#warning "KDE4: hack for testregression, remove when main branch" +#warning "FIXME: hack for testregression, remove" #endif _tx += qMax(-fm.minLeftBearing(), 0); //END HACK @@ -399,7 +399,7 @@ } else { //BEGIN HACK #ifdef __GNUC__ -#warning "KDE4: hack for testregression, remove when main branch" +#warning "FIXME: hack for testregression, remove" #endif _tx += qMax(-fm.minLeftBearing(), 0); //END HACK diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/khtml-4.97.0/src/xml/dom2_eventsimpl.cpp new/khtml-4.98.0/src/xml/dom2_eventsimpl.cpp --- old/khtml-4.97.0/src/xml/dom2_eventsimpl.cpp 2014-03-01 12:50:52.000000000 +0100 +++ new/khtml-4.98.0/src/xml/dom2_eventsimpl.cpp 2014-03-29 08:19:09.000000000 +0100 @@ -54,7 +54,7 @@ QList<RegisteredEventListener> listeners = *m_regdListeners.listeners; QList<RegisteredEventListener>::iterator it; for (it = listeners.begin(); it != listeners.end(); ++it) { - //Check whether this got removed...KDE4: use Java-style iterators + //Check whether this got removed... TODO: use Java-style iterators if (!m_regdListeners.stillContainsListener(*it)) { continue; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/khtml-4.97.0/src/xml/dom2_eventsimpl.h new/khtml-4.98.0/src/xml/dom2_eventsimpl.h --- old/khtml-4.97.0/src/xml/dom2_eventsimpl.h 2014-03-01 12:50:52.000000000 +0100 +++ new/khtml-4.98.0/src/xml/dom2_eventsimpl.h 2014-03-29 08:19:09.000000000 +0100 @@ -115,7 +115,7 @@ bool hasEventListener(EventName id); void clear(); - //### KDE4: should disappear + // TODO: remove/deprecate? bool stillContainsListener(const RegisteredEventListener &listener); QList<RegisteredEventListener> *listeners;//The actual listener list - may be 0 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/khtml-4.97.0/src/xml/dom_docimpl.h new/khtml-4.98.0/src/xml/dom_docimpl.h --- old/khtml-4.97.0/src/xml/dom_docimpl.h 2014-03-01 12:50:52.000000000 +0100 +++ new/khtml-4.98.0/src/xml/dom_docimpl.h 2014-03-29 08:19:09.000000000 +0100 @@ -145,8 +145,8 @@ /** * @internal A cache of element name (or id) to pointer - * ### KDE4, QHash: better to store values here */ +// TODO: QHash: better to store values here class ElementMappingCache { public: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/khtml-4.97.0/src/xml/dom_nodeimpl.cpp new/khtml-4.98.0/src/xml/dom_nodeimpl.cpp --- old/khtml-4.97.0/src/xml/dom_nodeimpl.cpp 2014-03-01 12:50:52.000000000 +0100 +++ new/khtml-4.98.0/src/xml/dom_nodeimpl.cpp 2014-03-29 08:19:09.000000000 +0100 @@ -126,7 +126,7 @@ return 0; } -NodeListImpl *NodeImpl::childNodes() +WTF::PassRefPtr<DOM::NodeListImpl> NodeImpl::childNodes() { return new ChildNodeListImpl(this); } @@ -407,16 +407,14 @@ { evt->setTarget(this); - // Since event handling code could cause this object to be deleted, grab a reference to the view now - KHTMLView *view = document()->view(); - dispatchGenericEvent(evt, exceptioncode); + KHTMLPart *part = document()->part(); // If tempEvent is true, this means that the DOM implementation will not be storing a reference to the event, i.e. // there is no way to retrieve it from javascript if a script does not already have a reference to it in a variable. // So there is no need for the interpreter to keep the event in its cache - if (tempEvent && view && view->part() && view->part()->jScript()) { - view->part()->jScript()->finishedWithEvent(evt); + if (tempEvent && part && part->jScript()) { + part->jScript()->finishedWithEvent(evt); } } @@ -424,9 +422,10 @@ { // ### check that type specified + ref(); + // work out what nodes to send event to QList<EventTargetImpl *> nodeChain; - NodeImpl *n; if (evt->target()->eventTargetType() != DOM_NODE) { // The target is the only thing that goes into the chain. @@ -439,7 +438,7 @@ evt->setTarget(document()); } } else if (inDocument()) { - for (n = this; n; n = n->parentNode()) { + for (NodeImpl *n = this; n; n = n->parentNode()) { n->ref(); nodeChain.prepend(n); } @@ -519,10 +518,6 @@ } } - // copy this over into a local variable, as the following deref() calls might cause this to be deleted. - DocumentImpl *doc = m_document.get(); - doc->ref(); - // deref all nodes in chain it.toFront(); while (it.hasNext()) { @@ -530,7 +525,8 @@ } DocumentImpl::updateDocumentsRendering(); - doc->deref(); + + deref(); } bool NodeImpl::dispatchHTMLEvent(int _id, bool canBubbleArg, bool cancelableArg) @@ -552,24 +548,20 @@ void NodeImpl::dispatchWindowEvent(EventImpl *evt) { - DocumentImpl *doc = document(); - doc->ref(); + evt->setTarget(document()->windowEventTarget()); + evt->ref(); int exceptioncode = 0; - - evt->setTarget(doc->windowEventTarget()); - evt->ref(); dispatchGenericEvent(evt, exceptioncode); if (evt->id() == EventImpl::LOAD_EVENT) { // Trigger Load Event on the enclosing frame if there is one - DOM::HTMLPartContainerElementImpl *elt = doc->ownerElement(); + DOM::HTMLPartContainerElementImpl *elt = document()->ownerElement(); if (elt) { elt->slotEmitLoadEvent(); } } - doc->deref(); evt->deref(); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/khtml-4.97.0/src/xml/dom_nodeimpl.h new/khtml-4.98.0/src/xml/dom_nodeimpl.h --- old/khtml-4.97.0/src/xml/dom_nodeimpl.h 2014-03-01 12:50:52.000000000 +0100 +++ new/khtml-4.98.0/src/xml/dom_nodeimpl.h 2014-03-29 08:19:09.000000000 +0100 @@ -102,7 +102,7 @@ { return m_next; } - virtual NodeListImpl *childNodes(); + virtual WTF::PassRefPtr<NodeListImpl> childNodes(); virtual NodeImpl *firstChild() const; virtual NodeImpl *lastChild() const; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/khtml-4.97.0/src/xml/dom_stringimpl.h new/khtml-4.98.0/src/xml/dom_stringimpl.h --- old/khtml-4.97.0/src/xml/dom_stringimpl.h 2014-03-01 12:50:52.000000000 +0100 +++ new/khtml-4.98.0/src/xml/dom_stringimpl.h 2014-03-29 08:19:09.000000000 +0100 @@ -32,8 +32,8 @@ #include "misc/khtmllayout.h" #include "misc/shared.h" -#define QT_ALLOC_QCHAR_VEC( N ) (QChar*) new char[ sizeof(QChar)*( N ) ] -#define QT_DELETE_QCHAR_VEC( P ) delete[] ((char*)( P )) +#define QT_ALLOC_QCHAR_VEC( N ) reinterpret_cast<QChar*>(new char[ sizeof(QChar)*( N ) ]) +#define QT_DELETE_QCHAR_VEC( P ) delete[] (reinterpret_cast<char*>( P )) namespace DOM { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/khtml-4.97.0/tests/pics/CMakeLists.txt new/khtml-4.98.0/tests/pics/CMakeLists.txt --- old/khtml-4.97.0/tests/pics/CMakeLists.txt 2014-03-01 12:50:52.000000000 +0100 +++ new/khtml-4.98.0/tests/pics/CMakeLists.txt 1970-01-01 01:00:00.000000000 +0100 @@ -1,9 +0,0 @@ - -########### install files ############### - -#define exclude file from local/global -kde4_install_icons( ${DATA_INSTALL_DIR}/khtml/icons ) - - - - -- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org