aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorFelix Queißner <git@mq32.de>2020-06-08 15:36:11 +0200
committerFelix Queißner <git@mq32.de>2020-06-08 15:36:11 +0200
commit0ad2367f1bcfb307810b256835d7d952930f5857 (patch)
treeb06f1bdabe29b11774a7bc95dd192c77db510d09 /src
parent25fcf4a129545cdcdceb87ca8deaeabaf2239e03 (diff)
downloadkristall-0ad2367f1bcfb307810b256835d7d952930f5857.tar.gz
Ubuntu20.04 patch commit. Happy hacking!
Diffstat (limited to 'src')
-rw-r--r--src/browsertab.cpp4
-rw-r--r--src/browsertab.hpp1
-rw-r--r--src/geminirenderer.hpp1
-rw-r--r--src/gophermaprenderer.hpp1
-rw-r--r--src/mainwindow.cpp5
5 files changed, 9 insertions, 3 deletions
diff --git a/src/browsertab.cpp b/src/browsertab.cpp
index 722b655..3c36ff2 100644
--- a/src/browsertab.cpp
+++ b/src/browsertab.cpp
@@ -332,15 +332,13 @@ void BrowserTab::on_requestComplete(const QByteArray &data, const QString &mime)
document->setDefaultFont(doc_style.standard_font);
document->setDefaultStyleSheet(doc_style.toStyleSheet());
- document->setMarkdown(QString(R"md(You accessed an unsupported media type!
+ document->setPlainText(QString(R"md(You accessed an unsupported media type!
Use the *File* menu to save the file to your local disk or navigate somewhere else. I cannot display this for you. ☹
Info:
-```
MIME Type: %1
File Size: %2
-```
)md").arg(mime).arg(size_human(data.size())));
}
diff --git a/src/browsertab.hpp b/src/browsertab.hpp
index a7bda50..815f239 100644
--- a/src/browsertab.hpp
+++ b/src/browsertab.hpp
@@ -1,6 +1,7 @@
#ifndef BROWSERTAB_HPP
#define BROWSERTAB_HPP
+#include <memory>
#include <QWidget>
#include <QUrl>
#include <QGraphicsScene>
diff --git a/src/geminirenderer.hpp b/src/geminirenderer.hpp
index 07deec6..7173d50 100644
--- a/src/geminirenderer.hpp
+++ b/src/geminirenderer.hpp
@@ -1,6 +1,7 @@
#ifndef GEMINIRENDERER_HPP
#define GEMINIRENDERER_HPP
+#include <memory>
#include <QTextDocument>
#include <QColor>
#include <QSettings>
diff --git a/src/gophermaprenderer.hpp b/src/gophermaprenderer.hpp
index 1141c34..3835cec 100644
--- a/src/gophermaprenderer.hpp
+++ b/src/gophermaprenderer.hpp
@@ -3,6 +3,7 @@
#include "documentstyle.hpp"
+#include <memory>
#include <QTextDocument>
struct GophermapRenderer
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp
index f2c4390..a2cb1ab 100644
--- a/src/mainwindow.cpp
+++ b/src/mainwindow.cpp
@@ -322,10 +322,15 @@ void MainWindow::on_actionSave_as_triggered()
{
BrowserTab * tab = qobject_cast<BrowserTab*>(this->ui->browser_tabs->currentWidget());
if(tab != nullptr) {
+#if (QT_VERSION >= QT_VERSION_CHECK(5, 14, 0))
QFileDialog::saveFileContent(
tab->current_buffer,
tab->current_location.fileName()
);
+#else
+ // TODO: Implement without saveFileContent
+ QMessageBox::warning(this, "Kristall", "Not support in your Qt version.");
+#endif
}
}