File indexing completed on 2024-12-15 04:55:35

0001 /*
0002    SPDX-FileCopyrightText: 2017-2024 Laurent Montel <montel@kde.org>
0003 
0004    SPDX-License-Identifier: GPL-2.0-or-later
0005 */
0006 
0007 #include "importimapsettingspasswordtest.h"
0008 
0009 ImportImapSettingsPasswordTest::ImportImapSettingsPasswordTest() = default;
0010 
0011 void ImportImapSettingsPasswordTest::importPasswords(const SieveEditorUtil::SieveServerConfig &_config, const QString &filename, bool reuseImapSettings)
0012 {
0013     SieveEditorUtil::SieveServerConfig config = _config;
0014     const QString password = QStringLiteral("password_imap");
0015     const QString customPassword = QStringLiteral("password_custom_sieve_imap");
0016     config.sieveImapAccountSettings.setPassword(password);
0017     if (reuseImapSettings) {
0018         config.sieveSettings.password = password;
0019     } else {
0020         config.sieveSettings.password = customPassword;
0021     }
0022     Q_EMIT importPasswordDone(config, filename);
0023 }