MCPcopy Create free account
hub / github.com/QNapi/qnapi / sigHandler

Function sigHandler

gui/src/main.cpp:217–239  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

215}
216
217void sigHandler(int sig) {
218 Q_UNUSED(sig);
219
220 std::cout << std::endl
221 << QObject::tr("QNapi: deleting temporary files...").toStdString()
222 << std::endl;
223
224 const QNapiConfig config = LibQNapi::loadConfig();
225 QString tmpPath = config.generalConfig().tmpPath();
226 QDir tmpDir(tmpPath);
227
228 QStringList filters;
229 filters << "QNapi-*-rc";
230 filters << "QNapi.*.tmp";
231
232 QFileInfoList files = tmpDir.entryInfoList(filters);
233
234 foreach (QFileInfo file, files) { QFile::remove(file.filePath()); }
235
236 std::cout << QObject::tr("QNapi: finished.").toStdString() << std::endl;
237
238 exit(666);
239}

Callers

nothing calls this directly

Calls 2

tmpPathMethod · 0.80
generalConfigMethod · 0.80

Tested by

no test coverage detected