diff -up arora-0.10.1/src/adblock/adblockpage.cpp.trunk-qtwebkit arora-0.10.1/src/adblock/adblockpage.cpp
--- arora-0.10.1/src/adblock/adblockpage.cpp.trunk-qtwebkit 2009-10-05 05:31:48.000000000 +0200
+++ arora-0.10.1/src/adblock/adblockpage.cpp 2009-11-18 17:38:10.876586573 +0100
@@ -85,7 +85,7 @@ void AdBlockPage::checkRule(const AdBloc
Q_UNUSED(page);
#if QT_VERSION >= 0x040600
QWebElement document = page->mainFrame()->documentElement();
- QList<QWebElement> elements = document.findAll(selectorQuery);
+ QWebElementCollection elements = document.findAll(selectorQuery);
#if defined(ADBLOCKPAGE_DEBUG)
if (elements.count() != 0)
qDebug() << "AdBlockPage::" << __FUNCTION__ << "blocking" << elements.count() << "items" << selectorQuery << elements.count() << "rule:" << rule->filter();
diff -up arora-0.10.1/src/qwebplugins/clicktoflash/clicktoflash.cpp.trunk-qtwebkit arora-0.10.1/src/qwebplugins/clicktoflash/clicktoflash.cpp
--- arora-0.10.1/src/qwebplugins/clicktoflash/clicktoflash.cpp.trunk-qtwebkit 2009-10-05 05:31:48.000000000 +0200
+++ arora-0.10.1/src/qwebplugins/clicktoflash/clicktoflash.cpp 2009-11-18 17:38:10.876586573 +0100
@@ -116,7 +116,7 @@ void ClickToFlash::load(bool loadAll)
QWebFrame *frame = frames.takeFirst();
QWebElement docElement = frame->documentElement();
- QList<QWebElement> elements;
+ QWebElementCollection elements;
elements.append(docElement.findAll(selector.arg(QLatin1String("object"))));
elements.append(docElement.findAll(selector.arg(QLatin1String("embed"))));
diff -up arora-0.10.1/src/tabwidget.cpp.trunk-qtwebkit arora-0.10.1/src/tabwidget.cpp
--- arora-0.10.1/src/tabwidget.cpp.trunk-qtwebkit 2009-10-05 05:31:48.000000000 +0200
+++ arora-0.10.1/src/tabwidget.cpp 2009-11-18 17:38:10.877706037 +0100
@@ -618,7 +618,10 @@ void TabWidget::closeTab(int index)
m_recentlyClosedTabsAction->setEnabled(true);
m_recentlyClosedTabs.prepend(tab->url());
#if QT_VERSION >= 0x040600
- m_recentlyClosedTabsHistory.prepend(tab->history()->saveState());
+ QByteArray tabHistory;
+ QDataStream tabHistoryStream(&tabHistory, QIODevice::WriteOnly);
+ tabHistoryStream << tab->history();
+ m_recentlyClosedTabsHistory.prepend(tabHistory);
#else
m_recentlyClosedTabsHistory.prepend(QByteArray());
#endif
@@ -859,7 +862,11 @@ QUrl TabWidget::guessUrlFromString(const
if (url.isValid())
return url;
+#if QT_VERSION >= 0x040600
+ url = QUrl::fromUserInput(string);
+#else
url = WebView::guessUrlFromString(string);
+#endif
if (url.scheme() == QLatin1String("about")
&& url.path() == QLatin1String("home"))
@@ -1066,10 +1073,14 @@ QByteArray TabWidget::saveState() const
if (WebView *tab = webView(i)) {
tabs.append(QString::fromUtf8(tab->url().toEncoded()));
#if QT_VERSION >= 0x040600
- if (tab->history()->count() != 0)
- tabsHistory.append(tab->history()->saveState());
- else
- tabsHistory.append(QByteArray());
+ if (tab->history()->count() != 0) {
+ QByteArray tabHistory;
+ QDataStream tabHistoryStream(&tabHistory, QIODevice::WriteOnly);
+ tabHistoryStream << tab->history();
+ tabsHistory.append(tabHistory);
+ } else {
+ tabsHistory << QByteArray();
+ }
#else
tabsHistory.append(QByteArray());
#endif
@@ -1131,8 +1142,10 @@ bool TabWidget::restoreState(const QByte
void TabWidget::createTab(const QByteArray &historyState, TabWidget::OpenUrlIn tab)
{
#if QT_VERSION >= 0x040600
- if (WebView *webView = getView(tab, currentWebView()))
- webView->history()->restoreState(historyState);
+ if (WebView *webView = getView(tab, currentWebView())) {
+ QDataStream historyStream(historyState);
+ historyStream >> *webView->history();
+ }
#else
qWarning() << "Warning: TabWidget::createTab should not be called, but it is...";
Q_UNUSED(historyState);
diff -up arora-0.10.1/src/webpage.cpp.trunk-qtwebkit arora-0.10.1/src/webpage.cpp
--- arora-0.10.1/src/webpage.cpp.trunk-qtwebkit 2009-10-05 05:31:48.000000000 +0200
+++ arora-0.10.1/src/webpage.cpp 2009-11-18 17:38:10.878705942 +0100
@@ -128,7 +128,7 @@ QList<WebPageLinkedResource> WebPage::li
#if QT_VERSION >= 0x040600 || defined(WEBKIT_TRUNK)
QUrl baseUrl = mainFrame()->baseUrl();
- QList<QWebElement> linkElements = mainFrame()->findAllElements(QLatin1String("html > head > link"));
+ QWebElementCollection linkElements = mainFrame()->findAllElements(QLatin1String("html > head > link"));
foreach (const QWebElement &linkElement, linkElements) {
QString rel = linkElement.attribute(QLatin1String("rel"));
diff -up arora-0.10.1/src/webview.cpp.trunk-qtwebkit arora-0.10.1/src/webview.cpp
--- arora-0.10.1/src/webview.cpp.trunk-qtwebkit 2009-10-05 05:31:48.000000000 +0200
+++ arora-0.10.1/src/webview.cpp 2009-11-18 17:38:10.879705998 +0100
@@ -439,7 +439,7 @@ void WebView::addSearchEngine()
QUrl searchUrl(page()->mainFrame()->baseUrl().resolved(QUrl(formElement.attribute(QLatin1String("action")))));
QMap<QString, QString> searchEngines;
- QList<QWebElement> inputFields = formElement.findAll(QLatin1String("input"));
+ QWebElementCollection inputFields = formElement.findAll(QLatin1String("input"));
foreach (QWebElement inputField, inputFields) {
QString type = inputField.attribute(QLatin1String("type"), QLatin1String("text"));
QString name = inputField.attribute(QLatin1String("name"));
@@ -461,14 +461,14 @@ void WebView::addSearchEngine()
}
}
- QList<QWebElement> selectFields = formElement.findAll(QLatin1String("select"));
+ QWebElementCollection selectFields = formElement.findAll(QLatin1String("select"));
foreach (QWebElement selectField, selectFields) {
QString name = selectField.attribute(QLatin1String("name"));
int selectedIndex = selectField.evaluateJavaScript(QLatin1String("this.selectedIndex")).toInt();
if (selectedIndex == -1)
continue;
- QList<QWebElement> options = selectField.findAll(QLatin1String("option"));
+ QWebElementCollection options = selectField.findAll(QLatin1String("option"));
QString value = options.at(selectedIndex).toPlainText();
searchUrl.addQueryItem(name, value);
}
@@ -485,8 +485,8 @@ void WebView::addSearchEngine()
}
QString engineName;
- QList<QWebElement> labels = formElement.findAll(QString(QLatin1String("label[for=\"%1\"]")).arg(elementName));
- if (!labels.isEmpty())
+ QWebElementCollection labels = formElement.findAll(QString(QLatin1String("label[for=\"%1\"]")).arg(elementName));
+ if (labels.count() > 0)
engineName = labels.at(0).toPlainText();
engineName = QInputDialog::getText(this, tr("Engine name"), tr("Type in a name for the engine"),
@@ -824,7 +824,7 @@ void WebView::showAccessKeys()
// Priority first goes to elements with accesskey attributes
QList<QWebElement> alreadyLabeled;
foreach (const QString &elementType, supportedElement) {
- QList<QWebElement> result = page()->mainFrame()->findAllElements(elementType);
+ QList<QWebElement> result = page()->mainFrame()->findAllElements(elementType).toList();
foreach (const QWebElement &element, result) {
const QRect geometry = element.geometry();
if (geometry.size().isEmpty()
@@ -853,7 +853,7 @@ void WebView::showAccessKeys()
// Pick an access key first from the letters in the text and then from the
// list of unused access keys
foreach (const QString &elementType, supportedElement) {
- QList<QWebElement> result = page()->mainFrame()->findAllElements(elementType);
+ QWebElementCollection result = page()->mainFrame()->findAllElements(elementType);
foreach (const QWebElement &element, result) {
const QRect geometry = element.geometry();
if (unusedKeys.isEmpty()