MCPcopy Create free account
hub / github.com/Serial-Studio/Serial-Studio / setCommentCodec

Method setCommentCodec

lib/QuaZip/qztest/testquazip.cpp:361–376  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

359}
360
361void TestQuaZip::setCommentCodec()
362{
363 QuaZip zip("commentCodec.zip");
364 QVERIFY(zip.open(QuaZip::mdCreate));
365 zip.setCommentCodec("WINDOWS-1251");
366 zip.setComment(QString::fromUtf8("Вопрос"));
367 QuaZipFile zipFile(&zip);
368 QVERIFY(zipFile.open(QIODevice::WriteOnly, QuaZipNewInfo("test.txt")));
369 zipFile.close();
370 zip.close();
371 QVERIFY(zip.open(QuaZip::mdUnzip));
372 zip.setCommentCodec(QTextCodec::codecForName("KOI8-R"));
373 QCOMPARE(zip.getComment(), QString::fromUtf8("бНОПНЯ"));
374 zip.close();
375 QDir().remove(zip.getZipName());
376}
377
378void TestQuaZip::setAutoClose()
379{

Callers

nothing calls this directly

Calls 6

setCommentMethod · 0.80
getCommentMethod · 0.80
openMethod · 0.45
closeMethod · 0.45
removeMethod · 0.45
getZipNameMethod · 0.45

Tested by

no test coverage detected