From kde-commits Thu Oct 15 21:01:26 2015 From: Alex Fiestas Date: Thu, 15 Oct 2015 21:01:26 +0000 To: kde-commits Subject: [kaccounts-providers] jobs: Add support for runnerid and configure only once Message-Id: X-MARC-Message: https://marc.info/?l=kde-commits&m=144494403725482 Git commit 50fc74b6e0bd97684ebe66362036a15d2641b26b by Alex Fiestas. Committed on 24/05/2012 at 12:31. Pushed by mklapetek into branch 'master'. Add support for runnerid and configure only once M +10 -7 jobs/ocreatecontact.cpp http://commits.kde.org/kaccounts-providers/50fc74b6e0bd97684ebe66362036a15d= 2641b26b diff --git a/jobs/ocreatecontact.cpp b/jobs/ocreatecontact.cpp index a3707cc..0a6620e 100644 --- a/jobs/ocreatecontact.cpp +++ b/jobs/ocreatecontact.cpp @@ -115,9 +115,6 @@ void OCreateContact::resourceCreated(KJob* job) settings->setDisplayName(m_config.name()); settings->setSettingsVersion(2); = - settings->writeConfig(); - agent.reconfigure(); - WId windowId =3D 0; if (qApp->activeWindow()) { windowId =3D qApp->activeWindow()->winId(); @@ -130,9 +127,15 @@ void OCreateContact::resourceCreated(KJob* job) return; } = - QString password; + QString password, prefix; + if (m_config.readEntry("type", "owncloud") =3D=3D "runnerid") { + prefix =3D "runnerid"; + } else { + prefix =3D "owncloud"; + } + wallet->setFolder("WebAccounts"); - wallet->readPassword("owncloud-" + m_config.name(), password); + wallet->readPassword(prefix + "-" + m_config.name(), password); = QString key (agent.identifier()); key.append(",$default$"); @@ -140,7 +143,8 @@ void OCreateContact::resourceCreated(KJob* job) wallet->setFolder(Wallet::PasswordFolder()); wallet->writePassword(key, password); = - agent.synchronize(); + settings->writeConfig(); + agent.reconfigure(); = emitResult(); } @@ -166,7 +170,6 @@ void OCreateContact::useCalendarResource() } = instance.reconfigure(); - instance.synchronize(); = emitResult(); } \ No newline at end of file