-----------------------------------------------------------------------------
| 223 | |
| 224 | //----------------------------------------------------------------------------- |
| 225 | void pqPVApplicationCore::loadStateFromPythonFile( |
| 226 | const QString& filename, pqServer* server, vtkTypeUInt32 location) |
| 227 | { |
| 228 | #if VTK_MODULE_ENABLE_ParaView_pqPython |
| 229 | Q_EMIT this->aboutToReadState(filename); |
| 230 | |
| 231 | pqPythonManager* pythonMgr = this->pythonManager(); |
| 232 | this->clearViewsForLoadingState(server); |
| 233 | // comment in pqApplicationCore says this->LoadingState is unreliable, but it is still |
| 234 | // necessary to avoid warning messages |
| 235 | this->LoadingState = true; |
| 236 | pythonMgr->executeScriptAndRender(filename, location); |
| 237 | this->LoadingState = false; |
| 238 | |
| 239 | Q_EMIT this->stateLoaded(nullptr, nullptr); |
| 240 | #else |
| 241 | // Avoid unused parameter warnings |
| 242 | (void)filename; |
| 243 | (void)server; |
| 244 | (void)location; |
| 245 | qCritical() << "Cannot load a python state file since ParaView was not built with Python."; |
| 246 | #endif |
| 247 | } |
| 248 | |
| 249 | //----------------------------------------------------------------------------- |
| 250 | void pqPVApplicationCore::instantiateLiveSourceManager() |
no test coverage detected