MCPcopy Create free account
hub / github.com/Codeya-IDE/deepin-ide / openFileForWrite

Method openFileForWrite

src/common/util/downloadutil.cpp:80–94  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

78
79
80std::unique_ptr<QFile> DownloadUtil::openFileForWrite(const QString& fileName)
81{
82 std::unique_ptr<QFile> file(new QFile(fileName));
83 if (!file->open(QIODevice::WriteOnly)) {
84
85#ifdef DEBUG_INFO
86 qInfo() << QString("Unable to save the file %1: %2.")
87 .arg(QDir::toNativeSeparators(fileName), file->errorString());
88#endif
89
90 return nullptr;
91 }
92
93 return file;
94}
95
96
97void DownloadUtil::startRequest(const QUrl& url)

Callers

nothing calls this directly

Calls 3

QStringClass · 0.70
openMethod · 0.45
errorStringMethod · 0.45

Tested by

no test coverage detected