-----------------------------------------------------------------------------
| 26 | { |
| 27 | //----------------------------------------------------------------------------- |
| 28 | QString 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 | //----------------------------------------------------------------------------- |
| 46 | QString GetSwapFilename(const QString& filepath) |
no test coverage detected