Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
PIM
KAlarm
Commits
75390bae
Commit
75390bae
authored
Aug 27, 2014
by
Laurent Montel
😁
Browse files
Rename as KIdentityManagement
parent
8d102611
Changes
4
Hide whitespace changes
Inline
Side-by-side
CMakeLists.txt
View file @
75390bae
...
...
@@ -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
(
KF5
Pim
Identit
ies
${
KDEPIMLIBS_VERSION
}
CONFIG REQUIRED
)
find_package
(
KF5Identit
yManagement
${
KDEPIMLIBS_VERSION
}
CONFIG REQUIRED
)
find_package
(
KF5Holidays
${
KDEPIMLIBS_VERSION
}
CONFIG REQUIRED
)
endif
()
...
...
src/CMakeLists.txt
View file @
75390bae
...
...
@@ -27,7 +27,7 @@ add_library(KF5::AlarmCalendar ALIAS KF5AlarmCalendar)
target_link_libraries
(
KF5AlarmCalendar
PUBLIC
KF5::Holidays
KF5::
Pim
Identit
ies
KF5::Identit
yManagement
KF5::CoreAddons
KF5::CalendarCore
KF5::AkonadiCore
...
...
src/identities.cpp
View file @
75390bae
...
...
@@ -25,17 +25,17 @@
#include <identitymanager.h>
#include <identity.h>
static
K
PIM
Identit
ies
::
IdentityManager
*
mIdentityManager
=
0
;
static
KIdentit
yManagement
::
IdentityManager
*
mIdentityManager
=
0
;
namespace
KAlarmCal
{
namespace
Identities
{
K
PIM
Identit
ies
::
IdentityManager
*
identityManager
()
KIdentit
yManagement
::
IdentityManager
*
identityManager
()
{
if
(
!
mIdentityManager
)
{
mIdentityManager
=
new
K
PIM
Identit
ies
::
IdentityManager
(
true
);
// create a read-only kmail identity manager
mIdentityManager
=
new
KIdentit
yManagement
::
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
(
K
PIM
Identit
ies
::
IdentityManager
::
ConstIterator
it
=
mIdentityManager
->
begin
();
for
(
KIdentit
yManagement
::
IdentityManager
::
ConstIterator
it
=
mIdentityManager
->
begin
();
it
!=
mIdentityManager
->
end
();
++
it
)
{
if
((
*
it
).
identityName
()
==
identityUoidOrName
)
{
id
=
(
*
it
).
uoid
();
...
...
src/identities.h
View file @
75390bae
...
...
@@ -28,7 +28,7 @@
class
QString
;
namespace
K
PIM
Identit
ies
namespace
KIdentit
yManagement
{
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
K
PIM
Identit
ies
::
IdentityManager
*
identityManager
();
KALARMCAL_EXPORT
KIdentit
yManagement
::
IdentityManager
*
identityManager
();
/** Return whether any identities exist. */
KALARMCAL_EXPORT
bool
identitiesExist
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment