MCPcopy Create free account
hub / github.com/KDE/kdevelop / openWriteAndCloseTemporaryFile

Method openWriteAndCloseTemporaryFile

kdevplatform/tests/temporaryfilehelpers.cpp:14–25  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

12#include <QTest>
13
14void KDevelop::openWriteAndCloseTemporaryFile(QTemporaryFile& file, QStringView fileContents)
15{
16 QVERIFY(file.open());
17
18 file.write(fileContents.toUtf8());
19 QCOMPARE(file.error(), QFileDevice::NoError);
20
21 QVERIFY(file.flush());
22
23 file.close();
24 QCOMPARE(file.error(), QFileDevice::NoError);
25}

Callers

nothing calls this directly

Calls 4

openMethod · 0.45
writeMethod · 0.45
errorMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected