From 92de31840ed3ec7cc8ec90fe58b1955278a8acff Mon Sep 17 00:00:00 2001 From: link2xt Date: Sun, 4 Jul 2021 22:31:32 +0300 Subject: Replace Accounts.importAccount() with Context.importBackup() dc_accounts_import_account() is going to be removed from the core. --- context.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'context.cpp') diff --git a/context.cpp b/context.cpp index ea9c5c4..fbd4129 100644 --- a/context.cpp +++ b/context.cpp @@ -224,3 +224,10 @@ Context::newMessage(int viewtype) dc_msg_t *message = dc_msg_new(m_context, viewtype); return new DcMessage{message}; } + +void +Context::importBackup(QString tarfile) +{ + QByteArray utf8Text = tarfile.toUtf8(); + return dc_imex(m_context, DC_IMEX_IMPORT_BACKUP, utf8Text.constData(), NULL); +} -- cgit v1.2.3-70-g09d2