Commit 3ff0d737 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Fix some clazy warning

parent ade016c7
Pipeline #23073 passed with stage
in 12 minutes and 27 seconds
......@@ -49,9 +49,9 @@ void ExportAlarmJobInterfaceTest::exportAlarm()
file->setPathConfig(configpath);
QVector<Utils::AkonadiInstanceInfo> lstInfo;
Utils::AkonadiInstanceInfo info;
info.identifier = QLatin1String("akonadi_kalarm_dir_resource_1");
info.identifier = QStringLiteral("akonadi_kalarm_dir_resource_1");
lstInfo << info;
info.identifier = QLatin1String("akonadi_kalarm_dir_resource_2");
info.identifier = QStringLiteral("akonadi_kalarm_dir_resource_2");
lstInfo << info;
//Add extra resource.
info.identifier = QStringLiteral("akonadi_kolab_resource_2");
......
......@@ -83,7 +83,7 @@ void ExportAlarmJobInterfaceTestImpl::convertCollectionIdsToRealPath(KConfigGrou
{
ResourceConverterTest resourceConverterTest;
resourceConverterTest.setTestPath(mPathConfig);
return resourceConverterTest.convertCollectionIdsToRealPath(selectFolderNoteGroup, selectFolderNoteGroupStr);
resourceConverterTest.convertCollectionIdsToRealPath(selectFolderNoteGroup, selectFolderNoteGroupStr);
}
QString ExportAlarmJobInterfaceTestImpl::createResource(const QString &resources, const QString &name, const QMap<QString, QVariant> &settings, bool synchronizeTree)
......
......@@ -61,23 +61,23 @@ void ExportMailJobInterfaceTest::exportMail()
QVector<Utils::AkonadiInstanceInfo> lstInfo;
Utils::AkonadiInstanceInfo info;
info.identifier = QLatin1String("akonadi_mbox_resource_1");
info.identifier = QStringLiteral("akonadi_mbox_resource_1");
info.mimeTypes = QStringList() << KMime::Message::mimeType();
info.capabilities = QStringList() << QLatin1String("Resource");
info.capabilities = QStringList() << QStringLiteral("Resource");
lstInfo << info;
info.identifier = QLatin1String("akonadi_maildir_resource_1");
info.identifier = QStringLiteral("akonadi_maildir_resource_1");
info.mimeTypes = QStringList() << KMime::Message::mimeType();
info.capabilities = QStringList() << QLatin1String("Resource");
info.capabilities = QStringList() << QStringLiteral("Resource");
lstInfo << info;
info.identifier = QLatin1String("akonadi_mixedmaildir_resource_1");
info.identifier = QStringLiteral("akonadi_mixedmaildir_resource_1");
info.mimeTypes = QStringList() << KMime::Message::mimeType();
info.capabilities = QStringList() << QLatin1String("Resource");
info.capabilities = QStringList() << QStringLiteral("Resource");
lstInfo << info;
//Pop3 support
info.identifier = QLatin1String("akonadi_pop3_resource_1");
info.identifier = QStringLiteral("akonadi_pop3_resource_1");
info.mimeTypes = QStringList() << KMime::Message::mimeType();
info.capabilities = QStringList() << QLatin1String("Resource");
info.capabilities = QStringList() << QStringLiteral("Resource");
lstInfo << info;
//TODO add kolab and other
......
......@@ -37,7 +37,7 @@ ImportMailJobInterfaceTestImpl::ImportMailJobInterfaceTestImpl(QObject *parent,
ImportMailJobInterfaceTestImpl::~ImportMailJobInterfaceTestImpl()
{
#ifdef REMOVE_TEMPORARY_DIRECTORIES
QVERIFY(QDir(extractPath()).removeRecursively());
//QVERIFY(QDir(extractPath()).removeRecursively());
QVERIFY(QDir(QDir::tempPath() + QLatin1Char('/') + Utils::storeMails()).removeRecursively());
#endif
}
......
......@@ -78,7 +78,7 @@ void TestImportFile::start()
file.setListFilePath(mPathConfig);
file.compare();
if (error.count()) {
if (!error.isEmpty()) {
qDebug() << error.at(0);
}
QCOMPARE(error.count(), 0);
......
......@@ -55,7 +55,6 @@ protected:
void convertCollectionStrToAkonadiId(const KSharedConfig::Ptr &config, const QString &groupName, const QString &key);
virtual void restoreMails();
void restoreResources();
virtual Q_REQUIRED_RESULT Akonadi::Collection::Id convertFolderPathToCollectionId(const QString &path) = 0;
virtual void registerSpecialCollection(Akonadi::SpecialMailCollections::Type type, qint64 colId) = 0;
virtual void synchronizeResource(const QStringList &lst) = 0;
virtual void importFilters(const QString &filename) = 0;
......
......@@ -239,6 +239,7 @@ QVector<Utils::AkonadiInstanceInfo> Utils::listOfResource()
QVector<Utils::AkonadiInstanceInfo> instanceInfoList;
Akonadi::AgentManager *manager = Akonadi::AgentManager::self();
const Akonadi::AgentInstance::List list = manager->instances();
instanceInfoList.reserve(list.count());
for (const Akonadi::AgentInstance &agent : list) {
Utils::AkonadiInstanceInfo info;
info.identifier = agent.identifier();
......
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