Commit 919d81b8 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Fix class name

parent 7b0489bc
......@@ -188,7 +188,7 @@ void AbstractImportExportJob::storeArchiveInfoResources(const KArchiveDirectory
if (lst.count() >= 2) {
const QString archPath(prefix + QLatin1Char('/') + entryName + QLatin1Char('/'));
resourceFiles files;
ResourceFiles files;
for (const QString &name : lst) {
if (isAConfigFile(name)) {
files.akonadiConfigFile = archPath + name;
......@@ -356,7 +356,7 @@ QStringList AbstractImportExportJob::restoreResourceFile(const QString &resource
const QString copyToDirName(mTempDirName + QLatin1Char('/') + defaultPath);
for (int i = 0, total = mListResourceFile.size(); i < total; ++i) {
resourceFiles value = mListResourceFile.at(i);
ResourceFiles value = mListResourceFile.at(i);
QMap<QString, QVariant> settings;
if (value.akonadiConfigFile.contains(resourceBaseName + QLatin1Char('_'))) {
const KArchiveEntry *fileResouceEntry = mArchiveDirectory->entry(value.akonadiConfigFile);
......
......@@ -110,7 +110,7 @@ protected:
void importDataSubdirectory(const QString &subdirectoryRelativePath);
QHash<QString, Akonadi::Collection::Id> mHashConvertPathCollectionId;
QVector<resourceFiles> mListResourceFile;
QVector<ResourceFiles> mListResourceFile;
QString mTempDirName;
Utils::StoredTypes mTypeSelected;
......
......@@ -66,7 +66,7 @@ void ImportAddressbookJobInterfaceImpl::restoreResources()
const int numberOfResourceFile = mListResourceFile.size();
for (int i = 0; i < numberOfResourceFile; ++i) {
resourceFiles value = mListResourceFile.at(i);
ResourceFiles value = mListResourceFile.at(i);
QMap<QString, QVariant> settings;
if (value.akonadiConfigFile.contains(QLatin1String("akonadi_vcarddir_resource_"))
|| value.akonadiConfigFile.contains(QLatin1String("akonadi_contacts_resource_"))) {
......
......@@ -65,7 +65,7 @@ void ImportAlarmJobInterfaceImpl::restoreResources()
const int numberOfResourceFile = mListResourceFile.size();
for (int i = 0; i < numberOfResourceFile; ++i) {
resourceFiles value = mListResourceFile.at(i);
ResourceFiles value = mListResourceFile.at(i);
QMap<QString, QVariant> settings;
if (value.akonadiConfigFile.contains(QLatin1String("akonadi_kalarm_dir_resource_"))
|| value.akonadiConfigFile.contains(QLatin1String("akonadi_kalarm_resource_"))) {
......
......@@ -36,5 +36,10 @@ Akonadi::Collection::Id ResourceConverterTest::convertFolderPathToCollectionId(c
{
QString str = path;
str.remove(QStringLiteral("foo/bla bla/bli"));
return str.toLongLong();
auto result = str.toLongLong();
//Make sure that we use another number.
if (result != -1) {
result += 10;
}
return result;
}
......@@ -76,7 +76,7 @@ void ImportCalendarJobInterfaceImpl::restoreResources()
const int numberOfResourceFile = mListResourceFile.size();
for (int i = 0; i < numberOfResourceFile; ++i) {
resourceFiles value = mListResourceFile.at(i);
ResourceFiles value = mListResourceFile.at(i);
QMap<QString, QVariant> settings;
if (value.akonadiConfigFile.contains(QLatin1String("akonadi_icaldir_resource_"))
|| value.akonadiConfigFile.contains(QLatin1String("akonadi_ical_resource_"))) {
......
......@@ -133,7 +133,7 @@ void ImportMailJobInterface::storeMailArchiveResource(const KArchiveDirectory *d
const QStringList lst = resourceDir->entries();
if (lst.count() >= 2) {
const QString archPath(prefix + QLatin1Char('/') + entryName + QLatin1Char('/'));
resourceFiles files;
ResourceFiles files;
for (const QString &name : lst) {
if (name.endsWith(QLatin1String("rc"))
&& (name.contains(QLatin1String("akonadi_mbox_resource_"))
......@@ -545,7 +545,7 @@ void ImportMailJobInterface::restoreMails()
const QString copyToDirName(mTempDirName + QLatin1Char('/') + Utils::mailsPath());
const int numberOfResourceFile = mListResourceFile.size();
for (int i = 0; i < numberOfResourceFile; ++i) {
resourceFiles value = mListResourceFile.at(i);
ResourceFiles value = mListResourceFile.at(i);
value.debug();
const QString resourceFile = value.akonadiConfigFile;
const KArchiveEntry *fileResouceEntry = mArchiveDirectory->entry(resourceFile);
......
......@@ -62,7 +62,7 @@ void ImportNotesJobInterfaceImpl::restoreResources()
const QString copyToDirName(mTempDirName + QLatin1Char('/') + Utils::notePath());
const int numberOfResourceFile = mListResourceFile.size();
for (int i = 0; i < numberOfResourceFile; ++i) {
resourceFiles value = mListResourceFile.at(i);
ResourceFiles value = mListResourceFile.at(i);
QMap<QString, QVariant> settings;
if (value.akonadiConfigFile.contains(QLatin1String("akonadi_akonotes_resource_"))) {
const KArchiveEntry *fileResouceEntry = mArchiveDirectory->entry(value.akonadiConfigFile);
......
......@@ -28,7 +28,7 @@ namespace Akonadi {
class AgentInstance;
}
struct resourceFiles {
struct ResourceFiles {
QString akonadiConfigFile;
QString akonadiResources;
QString akonadiAgentConfigFile;
......
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