MCPcopy Create free account
hub / github.com/Kitware/ParaView / GetSwapDir

Function GetSwapDir

Qt/Python/pqPythonFileIO.cxx:28–43  ·  view source on GitHub ↗

-----------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

26{
27//-----------------------------------------------------------------------------
28QString GetSwapDir()
29{
30 QString swapDir = pqCoreUtilities::getParaViewUserDirectory() + "/PythonSwap";
31 const QDir existCheck(swapDir);
32 if (!existCheck.mkpath(swapDir))
33 {
34 QMessageBox::warning(nullptr, QCoreApplication::translate("pqPythonFileIO", "Sorry!"),
35 qPrintable(QCoreApplication::translate(
36 "pqPythonFileIO", "Could not create user PythonSwap directory: %1.")
37 .arg(swapDir)));
38
39 return {};
40 }
41
42 return swapDir;
43}
44
45//-----------------------------------------------------------------------------
46QString GetSwapFilename(const QString& filepath)

Callers 1

GetSwapFilenameFunction · 0.85

Calls 1

translateFunction · 0.85

Tested by

no test coverage detected