diff --git a/src/mailimporter/othermailerutil.cpp b/src/mailimporter/othermailerutil.cpp index 3cf73c5..64f2add 100644 --- a/src/mailimporter/othermailerutil.cpp +++ b/src/mailimporter/othermailerutil.cpp @@ -1,48 +1,58 @@ /* Copyright (c) 2013-2017 Montel Laurent This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2, as published by the Free Software Foundation. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ #include "othermailerutil.h" #include #include #include using namespace MailImporter; QStringList OtherMailerUtil::isMailerFound() { QStringList lst; QDir directory(OtherMailerUtil::trojitaDefaultPath()); if (directory.exists()) { lst << i18nc("name of trojira application", "Trojita"); } directory = OtherMailerUtil::gearyDefaultPath(); if (directory.exists()) { lst << i18nc("name of geary application", "Geary"); } + directory = OtherMailerUtil::nylasMailDefaultPath(); + if (directory.exists()) { + lst << i18nc("name of geary application", "Geary"); + } return lst; } QString OtherMailerUtil::trojitaDefaultPath() { const QString path = QStandardPaths::writableLocation(QStandardPaths::GenericConfigLocation) + QLatin1String("/flaska.net/"); return path; } QString OtherMailerUtil::gearyDefaultPath() { const QString path = QStandardPaths::writableLocation(QStandardPaths::GenericConfigLocation) + QLatin1String("/geary/"); return path; } + +QString OtherMailerUtil::nylasMailDefaultPath() +{ + const QString path = QDir::homePath() + QLatin1String("/.nylas-mail/"); + return path; +} diff --git a/src/mailimporter/othermailerutil.h b/src/mailimporter/othermailerutil.h index 5422c76..953e438 100644 --- a/src/mailimporter/othermailerutil.h +++ b/src/mailimporter/othermailerutil.h @@ -1,32 +1,33 @@ /* Copyright (c) 2013-2017 Montel Laurent This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2, as published by the Free Software Foundation. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef OTHERMAILERUTIL_H #define OTHERMAILERUTIL_H #include #include "mailimporter_export.h" namespace MailImporter { namespace OtherMailerUtil { MAILIMPORTER_EXPORT QString trojitaDefaultPath(); MAILIMPORTER_EXPORT QString gearyDefaultPath(); MAILIMPORTER_EXPORT QStringList isMailerFound(); +MAILIMPORTER_EXPORT QString nylasMailDefaultPath(); } } #endif // OTHERMAILERUTIL_H