MCPcopy Create free account
hub / github.com/commontk/CTK / getDataFile

Method getDataFile

Libs/PluginFramework/ctkPluginContext.cpp:105–118  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

103
104//----------------------------------------------------------------------------
105QFileInfo ctkPluginContext::getDataFile(const QString& filename)
106{
107 Q_D(ctkPluginContext);
108 d->isPluginContextValid();
109 QDir dataRoot(d->plugin->getDataRoot().absolutePath());
110 if (!dataRoot.exists())
111 {
112 if (!dataRoot.mkpath(dataRoot.absolutePath()))
113 {
114 qWarning() << "Could not create persistent storage area:" << dataRoot.absolutePath();
115 }
116 }
117 return QFileInfo(dataRoot.absolutePath() + '/' + filename);
118}
119
120//----------------------------------------------------------------------------
121ctkServiceRegistration ctkPluginContext::registerService(const QStringList& clazzes, QObject* service, const ctkDictionary& properties)

Callers 1

ctkConfigurationStoreMethod · 0.80

Calls 3

isPluginContextValidMethod · 0.80
getDataRootMethod · 0.80
existsMethod · 0.45

Tested by

no test coverage detected