aboutsummaryrefslogtreecommitdiff
path: root/context.cpp
diff options
context:
space:
mode:
authorlink2xt <link2xt@testrun.org>2021-08-15 12:18:52 +0000
committerlink2xt <link2xt@testrun.org>2021-08-15 12:18:52 +0000
commitf6f3e9de77e9b67dab7c2869dc94389f0252caa9 (patch)
tree765741b46bea74af0f4c35e1788d6f721de5983e /context.cpp
parent0114c54ff12d7f9cecf4637ba1d43b5e887a736f (diff)
downloadkdeltachat-f6f3e9de77e9b67dab7c2869dc94389f0252caa9.tar.gz
kdeltachat-f6f3e9de77e9b67dab7c2869dc94389f0252caa9.zip
Add Context::createContact
Diffstat (limited to 'context.cpp')
-rw-r--r--context.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/context.cpp b/context.cpp
index 7c0bcc3..a4e58db 100644
--- a/context.cpp
+++ b/context.cpp
@@ -168,6 +168,14 @@ Context::getContact(uint32_t contactId)
return new DcContact{contact};
}
+uint32_t
+Context::createContact(QString name, QString addr)
+{
+ QByteArray utf8name = name.toUtf8();
+ QByteArray utf8addr = addr.toUtf8();
+ return dc_create_contact(m_context, utf8name.constData(), utf8addr.constData());
+}
+
QString
Context::getBlobdir()
{