Commit cd7a41cd authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Fix resourcePath

parent 8e9885f4
......@@ -30,7 +30,6 @@ public:
ResourceConverterBase();
virtual ~ResourceConverterBase();
Q_REQUIRED_RESULT QString agentFileName(const QString &filename);
Q_REQUIRED_RESULT QString resourcePath(const KSharedConfigPtr &resourceConfig, const QString &defaultPath = QString());
void convertCollectionToRealPath(KConfigGroup &group, const QString &currentKey);
void convertCollectionListToRealPath(KConfigGroup &group, const QString &currentKey);
void convertCollectionIdsToRealPath(KConfigGroup &group, const QString &currentKey, const QString &prefixCollection = QString());
......@@ -38,6 +37,7 @@ public:
virtual Q_REQUIRED_RESULT QString convertToFullCollectionPath(const qlonglong collectionValue) = 0;
virtual Q_REQUIRED_RESULT Akonadi::Collection::Id convertFolderPathToCollectionId(const QString &path) = 0;
virtual Q_REQUIRED_RESULT QString resourcePath(const QString &agentIdentifier, const QString &defaultPath = QString()) = 0;
virtual Q_REQUIRED_RESULT QString resourcePath(const KSharedConfigPtr &resourceConfig, const QString &defaultPath = QString());
};
#endif // RESOURCECONVERTER_H
......@@ -45,7 +45,14 @@ QString ResourceConverterImpl::resourcePath(const QString &agentIdentifier, cons
qDebug() << "configFileName " << configFileName;
KSharedConfigPtr resourceConfig = KSharedConfig::openConfig(configFileName);
const QString url = ResourceConverterBase::resourcePath(resourceConfig, defaultPath);
const QString url = resourcePath(resourceConfig, defaultPath);
qDebug() << " resourcePath " << url;
return url;
}
QString ResourceConverterImpl::resourcePath(const KSharedConfigPtr &resourceConfig, const QString &defaultPath)
{
QString url = ResourceConverterBase::resourcePath(resourceConfig, defaultPath);
//TODO adapt path for test
return url;
}
......@@ -30,6 +30,8 @@ public:
Q_REQUIRED_RESULT QString convertToFullCollectionPath(const qlonglong collectionValue) override;
Q_REQUIRED_RESULT Akonadi::Collection::Id convertFolderPathToCollectionId(const QString &path) override;
Q_REQUIRED_RESULT QString resourcePath(const QString &agentIdentifier, const QString &defaultPath = QString()) override;
Q_REQUIRED_RESULT QString resourcePath(const KSharedConfigPtr &resourceConfig, const QString &defaultPath = QString()) override;
protected:
};
#endif // RESOURCECONVERTERIMPL_H
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment