contactsplugin: save vcards in Contacts folder provided by Windows

This commit is contained in:
Piyush Aggarwal 2021-06-13 06:58:12 +05:30
parent ee6e427137
commit d22c6641b4

View file

@ -58,9 +58,14 @@ class QObject;
* Where the synchronizer will write vcards and other metadata * Where the synchronizer will write vcards and other metadata
* TODO: Per-device folders since each device *will* have different uIDs * TODO: Per-device folders since each device *will* have different uIDs
*/ */
Q_GLOBAL_STATIC_WITH_ARGS(
QString, vcardsLocation, #ifdef Q_OS_WIN
Q_GLOBAL_STATIC_WITH_ARGS(QString, vcardsLocation,
(QStandardPaths::writableLocation(QStandardPaths::HomeLocation) + QString::fromLatin1("/Contacts")))
#else
Q_GLOBAL_STATIC_WITH_ARGS(QString, vcardsLocation,
(QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation) + QString::fromLatin1("/kpeoplevcard"))) (QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation) + QString::fromLatin1("/kpeoplevcard")))
#endif
#define VCARD_EXTENSION QStringLiteral(".vcf") #define VCARD_EXTENSION QStringLiteral(".vcf")
#define METADATA_EXTENSION QStringLiteral(".meta") #define METADATA_EXTENSION QStringLiteral(".meta")