File indexing completed on 2024-12-22 05:01:15
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 <KMessageBox> 0008 #include <MailCommon/MailUtil> 0009 #include <QApplication> 0010 0011 int main(int argc, char **argv) 0012 { 0013 QApplication app(argc, argv); 0014 QStringList listOfMailerFound = MailCommon::Util::foundMailer(); 0015 if (!listOfMailerFound.isEmpty()) { 0016 if (KMessageBox::questionTwoActionsList(nullptr, 0017 QStringLiteral("Another mailer was found on system. Do you want to import data from it?"), 0018 listOfMailerFound, 0019 QString(), 0020 KGuiItem(QStringLiteral("Import"), QStringLiteral("document-import")), 0021 KGuiItem(QStringLiteral("Do Not Import"), QStringLiteral("dialog-cancel"))) 0022 == KMessageBox::ButtonCode::PrimaryAction) { 0023 qDebug() << " launch importwizard"; 0024 } else { 0025 qDebug() << " no importing"; 0026 } 0027 } else { 0028 qDebug() << "no mailer found"; 0029 } 0030 0031 return 0; 0032 }