| 824 | } |
| 825 | |
| 826 | QString BaseApplication::getCTKFrameworkStorageDir() const |
| 827 | { |
| 828 | QString storageDir; |
| 829 | |
| 830 | if (this->getSingleMode()) |
| 831 | { |
| 832 | // This function checks if an instance is already running and either sends a message to |
| 833 | // it containing the command line arguments or checks if a new instance was forced by |
| 834 | // providing the BlueBerry.newInstance command line argument. In the latter case, a path |
| 835 | // to a temporary directory for the new application's storage directory is returned. |
| 836 | storageDir = handleNewAppInstance(static_cast<QtSingleApplication *>(d->m_QApp), |
| 837 | d->m_Argc, d->m_Argv, ARG_NEWINSTANCE); |
| 838 | } |
| 839 | |
| 840 | if (storageDir.isEmpty()) |
| 841 | { |
| 842 | // This is a new instance and no other instance is already running. We specify the |
| 843 | // storage directory here (this is the same code as in berryInternalPlatform.cpp) |
| 844 | // so that we can re-use the location for the persistent data location of the |
| 845 | // the CppMicroServices library. |
| 846 | |
| 847 | // Append a hash value of the absolute path of the executable to the data location. |
| 848 | // This allows to start the same application from different build or install trees. |
| 849 | storageDir = QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation) + "/" + |
| 850 | this->getOrganizationName() + "/" + this->getApplicationName() + '_'; |
| 851 | storageDir += QString::number(qHash(QCoreApplication::applicationDirPath())) + "/"; |
| 852 | } |
| 853 | |
| 854 | return storageDir; |
| 855 | } |
| 856 | |
| 857 | void BaseApplication::initializeCppMicroServices() |
| 858 | { |
no test coverage detected