we also want the qbytearray version; use it with QWebFrame::setContent is all. this prevents unecessary QString/QByteArray conversions.
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=821515
This commit is contained in:
parent
289941dece
commit
28a27433a4
@ -62,6 +62,14 @@ void WebContent::setUrl(const QUrl &url)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void WebContent::setHtml(const QByteArray &html, const QUrl &baseUrl)
|
||||||
|
{
|
||||||
|
d->loaded = false;
|
||||||
|
if (d->page) {
|
||||||
|
d->page->mainFrame()->setContent(html, QString(), baseUrl);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void WebContent::setHtml(const QString &html, const QUrl &baseUrl)
|
void WebContent::setHtml(const QString &html, const QUrl &baseUrl)
|
||||||
{
|
{
|
||||||
d->loaded = false;
|
d->loaded = false;
|
||||||
|
@ -52,7 +52,16 @@ class PLASMA_EXPORT WebContent : public QGraphicsWidget
|
|||||||
* Sets the html to be shown along with a base URL to be used
|
* Sets the html to be shown along with a base URL to be used
|
||||||
* to resolve relative references.
|
* to resolve relative references.
|
||||||
*
|
*
|
||||||
* @param html the html to display in the content area
|
* @param html the html (in utf8) to display in the content area
|
||||||
|
* @param baseUrl the base url for relative references
|
||||||
|
*/
|
||||||
|
void setHtml(const QByteArray &html, const QUrl &baseUrl = QUrl());
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the html to be shown along with a base URL to be used
|
||||||
|
* to resolve relative references.
|
||||||
|
*
|
||||||
|
* @param html the html (in utf8) to display in the content area
|
||||||
* @param baseUrl the base url for relative references
|
* @param baseUrl the base url for relative references
|
||||||
*/
|
*/
|
||||||
void setHtml(const QString &html, const QUrl &baseUrl = QUrl());
|
void setHtml(const QString &html, const QUrl &baseUrl = QUrl());
|
||||||
|
Loading…
x
Reference in New Issue
Block a user