File indexing completed on 2024-12-15 04:55:36
0001 /* 0002 SPDX-FileCopyrightText: 2016-2024 Laurent Montel <montel@kde.org> 0003 0004 SPDX-License-Identifier: GPL-2.0-or-later 0005 */ 0006 0007 #pragma once 0008 0009 #include "abstractimapsettingscheckjob.h" 0010 #include "libsieveeditor_private_export.h" 0011 class LIBSIEVEEDITOR_TESTS_EXPORT ImportImapSettingsThunderbirdCheckJob : public AbstractImapSettingsCheckJob 0012 { 0013 Q_OBJECT 0014 public: 0015 explicit ImportImapSettingsThunderbirdCheckJob(QObject *parent = nullptr); 0016 ~ImportImapSettingsThunderbirdCheckJob() override; 0017 0018 void start() override; 0019 [[nodiscard]] bool settingsCanBeImported() const override; 0020 [[nodiscard]] QString name() const override; 0021 0022 private: 0023 [[nodiscard]] bool importSettings(const QString &directory, const QString &defaultProfile); 0024 [[nodiscard]] QMap<QString, QString> listProfile(QString ¤tProfile, const QString &defaultSettingPath); 0025 [[nodiscard]] QString defaultPath() const; 0026 void insertIntoMap(const QString &line); 0027 void addAuth(SieveEditorUtil::SieveServerConfig &config, const QString &accountName); 0028 void encryption(SieveEditorUtil::SieveServerConfig &config, const QString &accountName); 0029 0030 QHash<QString, QVariant> mHashConfig; 0031 };