Commit 75390bae authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Rename as KIdentityManagement

parent 8d102611
......@@ -31,7 +31,7 @@ find_package(KF5KDELibs4Support ${KF5_VERSION} CONFIG REQUIRED)
if(${CMAKE_SOURCE_DIR} STREQUAL ${KAlarmCal_SOURCE_DIR})
find_package(KF5Akonadi ${KDEPIMLIBS_VERSION} CONFIG REQUIRED)
find_package(KF5CalendarCore ${KDEPIMLIBS_VERSION} CONFIG REQUIRED)
find_package(KF5PimIdentities ${KDEPIMLIBS_VERSION} CONFIG REQUIRED)
find_package(KF5IdentityManagement ${KDEPIMLIBS_VERSION} CONFIG REQUIRED)
find_package(KF5Holidays ${KDEPIMLIBS_VERSION} CONFIG REQUIRED)
endif()
......
......@@ -27,7 +27,7 @@ add_library(KF5::AlarmCalendar ALIAS KF5AlarmCalendar)
target_link_libraries(KF5AlarmCalendar
PUBLIC
KF5::Holidays
KF5::PimIdentities
KF5::IdentityManagement
KF5::CoreAddons
KF5::CalendarCore
KF5::AkonadiCore
......
......@@ -25,17 +25,17 @@
#include <identitymanager.h>
#include <identity.h>
static KPIMIdentities::IdentityManager *mIdentityManager = 0;
static KIdentityManagement::IdentityManager *mIdentityManager = 0;
namespace KAlarmCal
{
namespace Identities
{
KPIMIdentities::IdentityManager *identityManager()
KIdentityManagement::IdentityManager *identityManager()
{
if (!mIdentityManager) {
mIdentityManager = new KPIMIdentities::IdentityManager(true); // create a read-only kmail identity manager
mIdentityManager = new KIdentityManagement::IdentityManager(true); // create a read-only kmail identity manager
}
return mIdentityManager;
}
......@@ -58,7 +58,7 @@ uint identityUoid(const QString &identityUoidOrName)
uint id = identityUoidOrName.toUInt(&ok);
if (!ok || identityManager()->identityForUoid(id).isNull()) {
identityManager(); // fetch it if not already done
for (KPIMIdentities::IdentityManager::ConstIterator it = mIdentityManager->begin();
for (KIdentityManagement::IdentityManager::ConstIterator it = mIdentityManager->begin();
it != mIdentityManager->end(); ++it) {
if ((*it).identityName() == identityUoidOrName) {
id = (*it).uoid();
......
......@@ -28,7 +28,7 @@
class QString;
namespace KPIMIdentities
namespace KIdentityManagement
{
class IdentityManager;
}
......@@ -44,7 +44,7 @@ namespace KAlarmCal
namespace Identities
{
/** Return the unique identity manager instance. It is created if it does not already exist. */
KALARMCAL_EXPORT KPIMIdentities::IdentityManager *identityManager();
KALARMCAL_EXPORT KIdentityManagement::IdentityManager *identityManager();
/** Return whether any identities exist. */
KALARMCAL_EXPORT bool identitiesExist();
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment