MailImporter

othermailerutil.cpp
1/*
2 SPDX-FileCopyrightText: 2013-2024 Laurent Montel <montel@kde.org>
3
4 SPDX-License-Identifier: GPL-2.0-or-later
5*/
6
7#include "othermailerutil.h"
8#include <KLocalizedString>
9#include <QDir>
10#include <QStandardPaths>
11
12using namespace MailImporter;
13QStringList OtherMailerUtil::isMailerFound()
14{
15 QStringList lst;
16 QDir directory(OtherMailerUtil::trojitaDefaultPath());
17 if (directory.exists()) {
18 lst << i18nc("name of trojira application", "Trojita");
19 }
20 directory = OtherMailerUtil::gearyDefaultPath();
21 if (directory.exists()) {
22 lst << i18nc("name of geary application", "Geary");
23 }
24 directory = OtherMailerUtil::nylasMailDefaultPath();
25 if (directory.exists()) {
26 lst << i18nc("name of geary application", "Geary");
27 }
28 return lst;
29}
30
31QString OtherMailerUtil::trojitaDefaultPath()
32{
34 return path;
35}
36
37QString OtherMailerUtil::gearyDefaultPath()
38{
40 return path;
41}
42
43QString OtherMailerUtil::nylasMailDefaultPath()
44{
45 const QString path = QDir::homePath() + QLatin1StringView("/.nylas-mail/");
46 return path;
47}
QString i18nc(const char *context, const char *text, const TYPE &arg...)
QString path(const QString &relativePath)
QString homePath()
QString writableLocation(StandardLocation type)
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:14:55 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.