Commit 8ff282b9 authored by Halla Rempt's avatar Halla Rempt
Browse files

Show the happy bunny!

Krita's use of KoStore is pretty old-fashioned, and we don't need the
name expansion used by the unfinished, 10-year old filter-in-filter
feature that presumably is the reason for doing weird things to paths
in a store of they start with a digit.

KoStore needs a thorough clean-up, but for now, setting disallowNameExpansion
is enough.

BUG:289242
parent 4b171074
......@@ -72,6 +72,7 @@ KoFilter::ConversionStatus KisODGImport::convert(const QByteArray& from, const Q
delete store;
return KoFilter::BadConversionGraph;
}
store->disallowNameExpansion();
doc -> prepareForImport();
......
......@@ -60,6 +60,7 @@ KisImageBuilder_Result OraConverter::buildImage(const KUrl& uri)
if (!store) {
return KisImageBuilder_RESULT_FAILURE;
}
store->disallowNameExpansion();
OraLoadContext olc(store);
KisOpenRasterStackLoadVisitor orslv(m_doc, &olc);
......@@ -92,7 +93,7 @@ KisImageBuilder_Result OraConverter::buildFile(const KUrl& uri, KisImageWSP imag
if (!store) {
return KisImageBuilder_RESULT_FAILURE;
}
store->disallowNameExpansion();
OraSaveContext osc(store);
KisOpenRasterStackSaveVisitor orssv(&osc);
......
......@@ -85,6 +85,7 @@ void KisClipboard::setClip(KisPaintDeviceSP dev, const QPoint& topLeft)
KoStore* store = KoStore::createStore(&buffer, KoStore::Write, mimeType);
Q_ASSERT(store);
Q_ASSERT(!store->bad());
store->disallowNameExpansion();
// Layer data
if (store->open("layerdata")) {
......@@ -193,6 +194,7 @@ KisPaintDeviceSP KisClipboard::clip(const QPoint& topLeftHint)
QByteArray encodedData = cbData->data(mimeType);
QBuffer buffer(&encodedData);
KoStore* store = KoStore::createStore(&buffer, KoStore::Read, mimeType);
store->disallowNameExpansion();
const KoColorProfile *profile = 0;
QString csDepth, csModel;
......
......@@ -75,8 +75,8 @@ QVariant KisMimeData::retrieveData(const QString &mimetype, QVariant::Type prefe
QByteArray ba;
QBuffer buf(&ba);
KoStore *store = KoStore::createStore(&buf, KoStore::Write);
Q_ASSERT(!store->bad());
store->disallowNameExpansion();
KisDoc2 doc;
......
Supports Markdown
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