diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/browsertab.cpp | 7 | ||||
| -rw-r--r-- | src/fingerclient.cpp | 2 |
2 files changed, 8 insertions, 1 deletions
diff --git a/src/browsertab.cpp b/src/browsertab.cpp index 7f6c642..cec5e19 100644 --- a/src/browsertab.cpp +++ b/src/browsertab.cpp @@ -292,6 +292,13 @@ void BrowserTab::on_requestComplete(const QByteArray &data, const QString &mime) this->current_location, doc_style); } + else if(not plaintext_only and mime.startsWith("text/finger")) { + document = std::make_unique<QTextDocument>(); + + document->setDefaultFont(doc_style.preformatted_font); + document->setDefaultStyleSheet(doc_style.toStyleSheet()); + document->setPlainText(QString::fromUtf8(data)); + } else if(not plaintext_only and mime.startsWith("text/html")) { document = std::make_unique<QTextDocument>(); diff --git a/src/fingerclient.cpp b/src/fingerclient.cpp index b696341..8d0ea60 100644 --- a/src/fingerclient.cpp +++ b/src/fingerclient.cpp @@ -58,7 +58,7 @@ void FingerClient::on_finished() { if(not was_cancelled) { - emit this->requestComplete(this->body, "text/plain"); + emit this->requestComplete(this->body, "text/finger"); was_cancelled = true; } body.clear(); |
