aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/bookmarks/bookmarkswidget.cpp1
-rw-r--r--lib/bookmarks/xbel.cpp4
-rw-r--r--plugins/ProfileEditor/forms/profileview.cpp5
-rw-r--r--src/webengine/webpage.cpp7
-rw-r--r--src/webengine/webpage.h2
-rw-r--r--src/webengine/webview.cpp1
6 files changed, 15 insertions, 5 deletions
diff --git a/lib/bookmarks/bookmarkswidget.cpp b/lib/bookmarks/bookmarkswidget.cpp
index a027518..c46c420 100644
--- a/lib/bookmarks/bookmarkswidget.cpp
+++ b/lib/bookmarks/bookmarkswidget.cpp
@@ -42,6 +42,7 @@ BookmarksWidget::BookmarksWidget(const QString &path, QWidget *parent)
// open bookmark action
connect(ui->treeWidget, &QTreeWidget::itemActivated, this, [this](QTreeWidgetItem *item, int column) {
+ Q_UNUSED(column);
if(ui->treeWidget->itemType(item) == BookmarksView::Bookmark)
emit openUrl(QUrl::fromUserInput(item->text(1)));
});
diff --git a/lib/bookmarks/xbel.cpp b/lib/bookmarks/xbel.cpp
index 0f84447..cd17f2d 100644
--- a/lib/bookmarks/xbel.cpp
+++ b/lib/bookmarks/xbel.cpp
@@ -70,14 +70,16 @@ void writeChildElements(QXmlStreamWriter &writer, BookmarksView *treeWidget, QTr
}
writer.writeEndElement();
-
break;
+
case BookmarksView::Bookmark:
writer.writeStartElement("bookmark");
writer.writeAttribute("href", parentItem->text(1));
writer.writeTextElement("title", parentItem->text(0));
writer.writeEndElement();
+ break;
+ case BookmarksView::Invalid:
break;
}
}
diff --git a/plugins/ProfileEditor/forms/profileview.cpp b/plugins/ProfileEditor/forms/profileview.cpp
index 6f61db1..87546e5 100644
--- a/plugins/ProfileEditor/forms/profileview.cpp
+++ b/plugins/ProfileEditor/forms/profileview.cpp
@@ -153,7 +153,10 @@ void ProfileView::cookieAdded(const QNetworkCookie &cookie)
ui->cookies->setItem(index, 0, item);
ui->cookies->setItem(index, 1, new QTableWidgetItem(cookie.domain()));
ui->cookies->setItem(index, 2, new QTableWidgetItem(cookie.path()));
- ui->cookies->setItem(index, 3, new QTableWidgetItem(cookie.expirationDate().toString(Qt::RFC2822Date)));
+ if(cookie.isSessionCookie())
+ ui->cookies->setItem(index, 3, new QTableWidgetItem(tr("session")));
+ else
+ ui->cookies->setItem(index, 3, new QTableWidgetItem(cookie.expirationDate().toString(Qt::RFC2822Date)));
}
void ProfileView::cookieRemoved(const QNetworkCookie &cookie)
diff --git a/src/webengine/webpage.cpp b/src/webengine/webpage.cpp
index 6fba97c..7358223 100644
--- a/src/webengine/webpage.cpp
+++ b/src/webengine/webpage.cpp
@@ -32,6 +32,7 @@ QString feature_toString(QWebEnginePage::Feature feature)
case QWebEnginePage::DesktopAudioVideoCapture:
return QObject::tr("Desktop Audio and Video Capture");
}
+ return QString();
}
WebPage::WebPage(QWebEngineProfile *profile, QObject *parent)
@@ -72,13 +73,13 @@ bool WebPage::certificateError(const QWebEngineCertificateError &certificateErro
return resp == QMessageBox::Ignore;
}
+#ifdef QTBUG_68224_WORKAROUND
bool WebPage::acceptNavigationRequest(const QUrl &url, NavigationType type, bool isMainFrame)
{
-
/* Workaround for https://bugreports.qt.io/browse/QTBUG-68224
* Only affects 5.11.0; should be fixed in 5.11.1
*/
-#ifdef QTBUG_68224_WORKAROUND
+
auto *layout = this->view()->layout();
auto count = layout->count();
@@ -94,10 +95,10 @@ bool WebPage::acceptNavigationRequest(const QUrl &url, NavigationType type, bool
}
}
}
-#endif
return true;
}
+#endif
void WebPage::featurePermissionDialog(const QUrl &securityOrigin, QWebEnginePage::Feature feature)
{
diff --git a/src/webengine/webpage.h b/src/webengine/webpage.h
index 2232d26..3e5ce34 100644
--- a/src/webengine/webpage.h
+++ b/src/webengine/webpage.h
@@ -19,7 +19,9 @@ public:
protected:
bool certificateError(const QWebEngineCertificateError &certificateError) override;
+#ifdef QTBUG_68224_WORKAROUND
bool acceptNavigationRequest(const QUrl &url, NavigationType type, bool isMainFrame) override;
+#endif
private slots:
void featurePermissionDialog(const QUrl &securityOrigin, QWebEnginePage::Feature feature);
diff --git a/src/webengine/webview.cpp b/src/webengine/webview.cpp
index c6fd4a4..f1b52b7 100644
--- a/src/webengine/webview.cpp
+++ b/src/webengine/webview.cpp
@@ -106,6 +106,7 @@ void WebView::triggerViewAction(WebView::ViewAction action)
switch(action) {
case GoHome:
load(m_profile->homepage());
+ break;
case BookmarkPage:
emit newBookmark(this->title(), this->url());
break;