fix #1278
This commit is contained in:
parent
cff455af12
commit
2d7907c22f
@ -1863,7 +1863,8 @@ UpdatedArticles DatabaseQueries::updateMessages(const QSqlDatabase& db,
|
||||
.replace(QSL(":author"), DatabaseFactory::escapeQuery(unnulifyString(msg->m_author)))
|
||||
.replace(QSL(":date_created"), QString::number(msg->m_created.toMSecsSinceEpoch()))
|
||||
.replace(QSL(":contents"), DatabaseFactory::escapeQuery(unnulifyString(msg->m_contents)))
|
||||
.replace(QSL(":enclosures"), Enclosures::encodeEnclosuresToString(msg->m_enclosures))
|
||||
.replace(QSL(":enclosures"),
|
||||
DatabaseFactory::escapeQuery(Enclosures::encodeEnclosuresToString(msg->m_enclosures)))
|
||||
.replace(QSL(":custom_id"), DatabaseFactory::escapeQuery(unnulifyString(msg->m_customId)))
|
||||
.replace(QSL(":custom_hash"), unnulifyString(msg->m_customHash))
|
||||
.replace(QSL(":score"), QString::number(msg->m_score))
|
||||
|
@ -259,6 +259,17 @@ void TextBrowserViewer::loadMessages(const QList<Message>& messages, RootItem* r
|
||||
|
||||
html_messages.m_html = html_messages.m_html.replace(exp_symbols, QString());
|
||||
|
||||
/*
|
||||
// Replace base64 images.
|
||||
QRegularExpression exp_base64("src=\"data: ?image\\/[^;]+;base64,([^\"]+)\"");
|
||||
QRegularExpressionMatch exp_base64_match;
|
||||
|
||||
while ((exp_base64_match = exp_base64.match(html_messages.m_html)).hasMatch()) {
|
||||
QString base64_img = exp_base64_match.captured(1);
|
||||
QByteArray data_img = QByteArray::fromBase64Encoding(base64_img);
|
||||
}
|
||||
*/
|
||||
|
||||
#if !defined(NDEBUG)
|
||||
// IOFactory::writeFile("aaa.html", html_messages.m_html.toUtf8());
|
||||
#endif
|
||||
@ -537,7 +548,8 @@ void TextBrowserViewer::resourceDownloaded(const QUrl& url,
|
||||
downloadNextNeededResource();
|
||||
}
|
||||
|
||||
PreparedHtml TextBrowserViewer::prepareLegacyHtmlForMessage(const QList<Message>& messages, RootItem* selected_item) const {
|
||||
PreparedHtml TextBrowserViewer::prepareLegacyHtmlForMessage(const QList<Message>& messages,
|
||||
RootItem* selected_item) const {
|
||||
PreparedHtml html;
|
||||
bool acc_displays_enclosures =
|
||||
selected_item == nullptr || selected_item->getParentServiceRoot()->displaysEnclosures();
|
||||
|
@ -44,7 +44,7 @@
|
||||
#include <QThreadPool>
|
||||
#include <QTimer>
|
||||
|
||||
#if defined(MEDIAPLAYER_LIBMPV_OPENGL)
|
||||
#if defined(NO_LITE) && defined(MEDIAPLAYER_LIBMPV_OPENGL)
|
||||
#include <QQuickWindow>
|
||||
#endif
|
||||
|
||||
@ -84,7 +84,7 @@
|
||||
Application::Application(const QString& id, int& argc, char** argv, const QStringList& raw_cli_args)
|
||||
: SingleApplication(id, argc, argv), m_rawCliArgs(raw_cli_args), m_updateFeedsLock(new Mutex()) {
|
||||
|
||||
#if defined(MEDIAPLAYER_LIBMPV_OPENGL)
|
||||
#if defined(NO_LITE) && defined(MEDIAPLAYER_LIBMPV_OPENGL)
|
||||
// HACK: Force rendering system to use OpenGL backend.
|
||||
#if QT_VERSION_MAJOR < 6
|
||||
QQuickWindow::setSceneGraphBackend(QSGRendererInterface::GraphicsApi::OpenGL);
|
||||
|
Loading…
x
Reference in New Issue
Block a user