fix #422, therefore do not use specific base URL for message preview
This commit is contained in:
parent
e5685513f1
commit
ad265dfbd6
@ -53,9 +53,7 @@ WebPage* WebViewer::page() const {
|
||||
}
|
||||
|
||||
void WebViewer::displayMessage() {
|
||||
setContent(m_messageContents.toUtf8(), "text/html", QUrl::fromUserInput(INTERNAL_URL_MESSAGE));
|
||||
|
||||
//setHtml(m_messageContents, QUrl::fromUserInput(INTERNAL_URL_MESSAGE));
|
||||
setHtml(m_messageContents /*, QUrl::fromUserInput(INTERNAL_URL_MESSAGE)*/);
|
||||
}
|
||||
|
||||
bool WebViewer::increaseWebPageZoom() {
|
||||
|
@ -62,13 +62,14 @@ bool WebPage::acceptNavigationRequest(const QUrl& url, NavigationType type, bool
|
||||
return false;
|
||||
}
|
||||
|
||||
if (url.host() == INTERNAL_URL_MESSAGE_HOST) {
|
||||
setHtml(view()->messageContents(), QUrl(INTERNAL_URL_MESSAGE));
|
||||
return true;
|
||||
}
|
||||
else {
|
||||
return QWebEnginePage::acceptNavigationRequest(url, type, is_main_frame);
|
||||
}
|
||||
/*if (url.host() == INTERNAL_URL_MESSAGE_HOST) {
|
||||
setHtml(view()->messageContents(), QUrl(INTERNAL_URL_MESSAGE));
|
||||
return true;
|
||||
}
|
||||
else {*/
|
||||
return QWebEnginePage::acceptNavigationRequest(url, type, is_main_frame);
|
||||
|
||||
//}
|
||||
}
|
||||
|
||||
void WebPage::javaScriptConsoleMessage(JavaScriptConsoleMessageLevel level, const QString& message,
|
||||
|
Loading…
x
Reference in New Issue
Block a user