mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-10-16 18:54:13 +02:00
Merge pull request #1483 from ispyisail/fix/qetz-1472-followups
Fix saving to a read-only folder, and the #1472 review follow-ups
This commit is contained in:
@@ -17,7 +17,7 @@ class tst_qetzip : public QObject
|
||||
static QList<QetZip::Entry> sample()
|
||||
{
|
||||
QList<QetZip::Entry> entries;
|
||||
entries.append({QStringLiteral("mimetype"), QByteArray("application/x-qelectrotech-project+zip"), false});
|
||||
entries.append({QStringLiteral("mimetype"), QByteArray("application/x-qet-project+zip"), false});
|
||||
QByteArray xml("<project>");
|
||||
for (int i = 0 ; i < 2000 ; ++i) xml += "<element name=\"K1\"/>";
|
||||
xml += "</project>";
|
||||
@@ -65,7 +65,7 @@ private slots:
|
||||
QCOMPARE(out.at(i).compress, in.at(i).compress);
|
||||
}
|
||||
// mimetype first and stored: its bytes appear as is after the header
|
||||
QCOMPARE(zip.indexOf("application/x-qelectrotech-project+zip"), 30 + int(qstrlen("mimetype")));
|
||||
QCOMPARE(zip.indexOf("application/x-qet-project+zip"), 30 + int(qstrlen("mimetype")));
|
||||
}
|
||||
|
||||
void sameBytesTwice()
|
||||
|
||||
Reference in New Issue
Block a user