Commit 27e0ff97 authored by Daniel Vrátil's avatar Daniel Vrátil 🤖
Browse files

Always display decompressed payload in Browser

parent 5758e4db
Pipeline #41240 canceled with stage
......@@ -47,7 +47,7 @@ set(KDEPIM_LIB_SOVERSION "5")
set(AKONADI_CONTACT_VERSION "5.15.90")
set(CALENDARSUPPORT_LIB_VERSION "5.15.90")
set(AKONADI_VERSION "5.15.90")
set(AKONADI_VERSION "5.15.91")
set(AKONADI_SEARCH_VERSION "5.15.90")
set(QT_REQUIRED_VERSION "5.13.0")
......
......@@ -36,6 +36,7 @@
#include <AkonadiCore/TagFetchScope>
#include <AkonadiXml/XmlWriteJob>
#include <KViewStateMaintainer>
#include <akonadi/private/compressionstream_p.h>
#include <kcontacts/addressee.h>
#include <kcontacts/contactgroup.h>
......@@ -61,6 +62,7 @@
#include <QMenu>
#include <QFileDialog>
#include <QSqlError>
#include <QBuffer>
#ifdef ENABLE_CONTENTVIEWS
#include <CalendarSupport/IncidenceViewer>
......@@ -332,6 +334,14 @@ void BrowserWidget::setItem(const Akonadi::Item &item)
contentUi.saveButton->setEnabled(false);
QByteArray data = item.payloadData();
QBuffer buffer(&data);
buffer.open(QIODevice::ReadOnly);
if (Akonadi::CompressionStream::isCompressed(&buffer)) {
Akonadi::CompressionStream stream(&buffer);
stream.open(QIODevice::ReadOnly);
data = stream.readAll();
}
// Note that this is true for *all* items as soon as the binary format is enabled.
// Independently from how they are actually stored in the database.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment