Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
PIM
KIdentityManagement
Commits
0b087bd5
Commit
0b087bd5
authored
Aug 27, 2014
by
Laurent Montel
Browse files
Rename as KIdentityManagement
parent
0b5f9763
Changes
17
Hide whitespace changes
Inline
Side-by-side
CMakeLists.txt
View file @
0b087bd5
cmake_minimum_required
(
VERSION 2.8.12
)
project
(
K
Pim
Identit
ies
)
project
(
KIdentit
yManagement
)
# ECM setup
find_package
(
ECM 1.1.0 CONFIG REQUIRED
)
...
...
@@ -21,8 +21,8 @@ set(KF5_VERSION "5.1.0")
set
(
KDEPIMLIBS_VERSION
"4.70.0"
)
ecm_setup_version
(
${
KDEPIMLIBS_VERSION
}
VARIABLE_PREFIX KPIMIDENTITIES
VERSION_HEADER
"
${
CMAKE_CURRENT_BINARY_DIR
}
/k
pim
identit
ies
_version.h"
PACKAGE_VERSION_FILE
"
${
CMAKE_CURRENT_BINARY_DIR
}
/KF5
Pim
Identit
iesConfigVersion
.cmake"
VERSION_HEADER
"
${
CMAKE_CURRENT_BINARY_DIR
}
/kidentit
ymanagement
_version.h"
PACKAGE_VERSION_FILE
"
${
CMAKE_CURRENT_BINARY_DIR
}
/KF5Identit
yManagementConfig
.cmake"
SOVERSION 5
)
...
...
@@ -39,7 +39,7 @@ find_package(KF5KIO ${KF5_VERSION} CONFIG REQUIRED)
find_package
(
KF5Config
${
KF5_VERSION
}
CONFIG REQUIRED
)
find_package
(
KF5Emoticons
${
KF5_VERSION
}
CONFIG REQUIRED
)
if
(
"
${
CMAKE_SOURCE_DIR
}
"
STREQUAL
"
${
K
Pim
Identit
ies
_SOURCE_DIR
}
"
)
if
(
"
${
CMAKE_SOURCE_DIR
}
"
STREQUAL
"
${
KIdentit
yManagement
_SOURCE_DIR
}
"
)
find_package
(
KF5PimTextEdit
${
KDEPIMLIBS_VERSION
}
CONFIG REQUIRED
)
find_package
(
KF5PimUtils
${
KDEPIMLIBS_VERSION
}
CONFIG REQUIRED
)
endif
()
...
...
@@ -51,33 +51,33 @@ add_subdirectory(src)
add_subdirectory
(
autotests
)
########### CMake Config Files ###########
set
(
CMAKECONFIG_INSTALL_DIR
"
${
CMAKECONFIG_INSTALL_PREFIX
}
/KF5
Pim
Identit
ies
"
)
set
(
CMAKECONFIG_INSTALL_DIR
"
${
CMAKECONFIG_INSTALL_PREFIX
}
/KF5Identit
yManagement
"
)
ecm_configure_package_config_file
(
"
${
CMAKE_CURRENT_SOURCE_DIR
}
/KF5
Pim
Identit
ies
Config.cmake.in"
"
${
CMAKE_CURRENT_BINARY_DIR
}
/KF5
Pim
Identit
ies
Config.cmake"
"
${
CMAKE_CURRENT_SOURCE_DIR
}
/KF5Identit
yManagement
Config.cmake.in"
"
${
CMAKE_CURRENT_BINARY_DIR
}
/KF5Identit
yManagement
Config.cmake"
INSTALL_DESTINATION
${
CMAKECONFIG_INSTALL_DIR
}
)
install
(
FILES
"
${
CMAKE_CURRENT_BINARY_DIR
}
/KF5
Pim
Identit
ies
Config.cmake"
"
${
CMAKE_CURRENT_BINARY_DIR
}
/KF5
Pim
Identit
iesConfig
Version.cmake"
"
${
CMAKE_CURRENT_BINARY_DIR
}
/KF5Identit
yManagement
Config.cmake"
"
${
CMAKE_CURRENT_BINARY_DIR
}
/KF5Identit
yManagement
Version.cmake"
DESTINATION
"
${
CMAKECONFIG_INSTALL_DIR
}
"
COMPONENT Devel
)
install
(
EXPORT KF5
Pim
Identit
ies
Targets
install
(
EXPORT KF5Identit
yManagement
Targets
DESTINATION
"
${
CMAKECONFIG_INSTALL_DIR
}
"
FILE KF5
Pim
Identit
ies
Targets.cmake
FILE KF5Identit
yManagement
Targets.cmake
NAMESPACE KF5::
)
install
(
FILES
${
CMAKE_CURRENT_BINARY_DIR
}
/k
pim
identit
ies
_version.h
${
CMAKE_CURRENT_BINARY_DIR
}
/kidentit
ymanagement
_version.h
DESTINATION
${
KF5_INCLUDE_INSTALL_DIR
}
COMPONENT Devel
)
if
(
"
${
CMAKE_BINARY_DIR
}
"
STREQUAL
"
${
K
Pim
Identit
ies
_BINARY_DIR
}
"
)
if
(
"
${
CMAKE_BINARY_DIR
}
"
STREQUAL
"
${
KIdentit
yManagement
_BINARY_DIR
}
"
)
feature_summary
(
WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES
)
endif
()
KF5
Pim
Identit
ies
Config.cmake.in
→
KF5Identit
yManagement
Config.cmake.in
View file @
0b087bd5
File moved
autotests/CMakeLists.txt
View file @
0b087bd5
...
...
@@ -3,4 +3,4 @@ set(QT_REQUIRED_VERSION "5.2.0")
find_package
(
Qt5Test
${
QT_REQUIRED_VERSION
}
CONFIG REQUIRED
)
ecm_add_tests
(
identitytest.cpp signaturetest.cpp NAME_PREFIX
"kpimidentity-"
LINK_LIBRARIES KF5
Pim
Identit
ies
KF5::PimTextEdit Qt5::Test KF5::ConfigCore KF5::TextWidgets KF5::XmlGui KF5::IconThemes
)
ecm_add_tests
(
identitytest.cpp signaturetest.cpp NAME_PREFIX
"kpimidentity-"
LINK_LIBRARIES KF5Identit
yManagement
KF5::PimTextEdit Qt5::Test KF5::ConfigCore KF5::TextWidgets KF5::XmlGui KF5::IconThemes
)
autotests/identitytest.cpp
View file @
0b087bd5
...
...
@@ -24,7 +24,7 @@
#include
<KConfig>
#include
<KConfigGroup>
using
namespace
K
PIM
Identit
ies
;
using
namespace
KIdentit
yManagement
;
QTEST_GUILESS_MAIN
(
IdentityTester
)
...
...
autotests/signaturetest.cpp
View file @
0b087bd5
...
...
@@ -32,7 +32,7 @@
#include
<QStandardPaths>
#include
<KConfig>
#include
<QDir>
using
namespace
K
PIM
Identit
ies
;
using
namespace
KIdentit
yManagement
;
using
namespace
KPIMTextEdit
;
QTEST_MAIN
(
SignatureTester
)
...
...
@@ -222,7 +222,7 @@ void SignatureTester::testImages()
// read the images, and it does not mess up
MySignature
sig2
;
sig2
.
readConfig
(
group1
);
sig2
.
insertIntoTextEdit
(
K
PIM
Identit
ies
::
Signature
::
End
,
Signature
::
AddSeparator
|
Signature
::
AddNewLines
,
sig2
.
insertIntoTextEdit
(
KIdentit
yManagement
::
Signature
::
End
,
Signature
::
AddSeparator
|
Signature
::
AddNewLines
,
&
edit
);
QCOMPARE
(
edit
.
embeddedImages
().
count
(),
2
);
QCOMPARE
(
sig2
.
text
(),
QStringLiteral
(
"Bla<img src=
\"
folder-new.png
\"
>Bla<img src=
\"
arrow-up.png
\"
>Bla"
));
...
...
src/CMakeLists.txt
View file @
0b087bd5
set
(
k
pim
identit
ies
_SRCS
set
(
kidentit
ymanagement
_SRCS
identity.cpp
identitycombo.cpp
identitymanager.cpp
...
...
@@ -6,18 +6,18 @@ set(kpimidentities_SRCS
signatureconfigurator.cpp
)
qt5_add_dbus_adaptor
(
k
pim
identit
ies
_SRCS org.kde.pim.IdentityManager.xml identitymanager.h K
PIM
Identit
ies
::IdentityManager
)
qt5_add_dbus_adaptor
(
kidentit
ymanagement
_SRCS org.kde.pim.IdentityManager.xml identitymanager.h KIdentit
yManagement
::IdentityManager
)
add_library
(
KF5
Pim
Identit
ies
${
k
pim
identit
ies
_SRCS
}
)
add_library
(
KF5Identit
yManagement
${
kidentit
ymanagement
_SRCS
}
)
generate_export_header
(
KF5
Pim
Identit
ies
BASE_NAME k
pim
identit
ies
)
generate_export_header
(
KF5Identit
yManagement
BASE_NAME kidentit
ymanagement
)
add_library
(
KF5::
Pim
Identit
ies
ALIAS KF5
Pim
Identit
ies
)
add_library
(
KF5::Identit
yManagement
ALIAS KF5Identit
yManagement
)
target_include_directories
(
KF5
Pim
Identit
ies
INTERFACE
"$<INSTALL_INTERFACE:
${
KF5_INCLUDE_INSTALL_DIR
}
/K
PIM
Identit
ies
;
${
KF5_INCLUDE_INSTALL_DIR
}
/K
PIM
Identit
ies/kpimidentities
;>"
)
target_include_directories
(
KF5
Pim
Identit
ies
PUBLIC
"$<BUILD_INTERFACE:
${
K
Pim
Identit
ies
_SOURCE_DIR
}
/src;
${
K
Pim
Identit
ies
_BINARY_DIR
}
/src>"
)
target_include_directories
(
KF5Identit
yManagement
INTERFACE
"$<INSTALL_INTERFACE:
${
KF5_INCLUDE_INSTALL_DIR
}
/KIdentit
yManagement
;
${
KF5_INCLUDE_INSTALL_DIR
}
/KIdentit
yManagement/kidentitymanagement
;>"
)
target_include_directories
(
KF5Identit
yManagement
PUBLIC
"$<BUILD_INTERFACE:
${
KIdentit
yManagement
_SOURCE_DIR
}
/src;
${
KIdentit
yManagement
_BINARY_DIR
}
/src>"
)
target_link_libraries
(
KF5
Pim
Identit
ies
target_link_libraries
(
KF5Identit
yManagement
PUBLIC
KF5::CoreAddons
KF5::PimTextEdit
...
...
@@ -33,41 +33,41 @@ PRIVATE
KF5::ConfigCore
)
set_target_properties
(
KF5
Pim
Identit
ies
PROPERTIES
set_target_properties
(
KF5Identit
yManagement
PROPERTIES
VERSION
${
KPIMIDENTITIES_VERSION_STRING
}
SOVERSION
${
KPIMIDENTITIES_SOVERSION
}
EXPORT_NAME
Pim
Identit
ies
EXPORT_NAME Identit
yManagement
)
install
(
TARGETS KF5
Pim
Identit
ies
EXPORT KF5
Pim
Identit
ies
Targets
${
KF5_INSTALL_TARGETS_DEFAULT_ARGS
}
)
install
(
TARGETS KF5Identit
yManagement
EXPORT KF5Identit
yManagement
Targets
${
KF5_INSTALL_TARGETS_DEFAULT_ARGS
}
)
########### Generate Headers ###############
ecm_generate_headers
(
K
Pim
Identit
ies
_CamelCase_HEADERS
ecm_generate_headers
(
KIdentit
yManagement
_CamelCase_HEADERS
HEADER_NAMES
Identity
IdentityCombo
IdentityManager
Signature
SignatureConfigurator
PREFIX K
PIM
Identit
ies
REQUIRED_HEADERS K
Pim
Identit
ies
_HEADERS
PREFIX KIdentit
yManagement
REQUIRED_HEADERS KIdentit
yManagement
_HEADERS
)
########### install files ###############
install
(
FILES
${
CMAKE_CURRENT_BINARY_DIR
}
/k
pim
identit
ies
_export.h
${
K
Pim
Identit
ies
_HEADERS
}
DESTINATION
${
KF5_INCLUDE_INSTALL_DIR
}
/K
PIM
Identit
ies/kpimidentities
${
CMAKE_CURRENT_BINARY_DIR
}
/kidentit
ymanagement
_export.h
${
KIdentit
yManagement
_HEADERS
}
DESTINATION
${
KF5_INCLUDE_INSTALL_DIR
}
/KIdentit
yManagement/kidentitymanagement
COMPONENT Devel
)
install
(
FILES
${
K
Pim
Identit
ies
_CamelCase_HEADERS
}
DESTINATION
${
KF5_INCLUDE_INSTALL_DIR
}
/K
PIM
Identit
ies/KPIMIdentities
/
install
(
FILES
${
KIdentit
yManagement
_CamelCase_HEADERS
}
DESTINATION
${
KF5_INCLUDE_INSTALL_DIR
}
/KIdentit
yManagement/KIdentityManagement
/
COMPONENT Devel
)
install
(
FILES org.kde.pim.IdentityManager.xml DESTINATION
${
DBUS_INTERFACES_INSTALL_DIR
}
)
ecm_generate_pri_file
(
BASE_NAME K
Pim
Identit
ies
LIB_NAME KF5
Pim
Identit
ies
DEPS
"CoreAddons PimTextEdit"
FILENAME_VAR PRI_FILENAME INCLUDE_INSTALL_DIR
${
KF5_INCLUDE_INSTALL_DIR
}
/K
PIM
Identit
ies
)
ecm_generate_pri_file
(
BASE_NAME KIdentit
yManagement
LIB_NAME KF5Identit
yManagement
DEPS
"CoreAddons PimTextEdit"
FILENAME_VAR PRI_FILENAME INCLUDE_INSTALL_DIR
${
KF5_INCLUDE_INSTALL_DIR
}
/KIdentit
yManagement
)
install
(
FILES
${
PRI_FILENAME
}
DESTINATION
${
ECM_MKSPECS_INSTALL_DIR
}
)
src/dpointersignature
View file @
0b087bd5
...
...
@@ -4,7 +4,7 @@ index 1d81e4c..258f138 100644
+++ b/kpimidentities/src/signature.cpp
@@ -40,11 +40,24 @@
using namespace K
PIM
Identit
ies
;
using namespace KIdentit
yManagement
;
-class SignaturePrivate
+QDataStream &operator<< ( QDataStream &stream, const Signature::Private::EmbeddedImagePtr &img )
...
...
@@ -20,7 +20,7 @@ index 1d81e4c..258f138 100644
+ return stream >> img->image >> img->name;
+}
+
+class K
PIM
Identit
ies
::Signature::Private
+class KIdentit
yManagement
::Signature::Private
+{
+public:
+ Private(Signature *qq)
...
...
@@ -109,7 +109,7 @@ index 1d81e4c..258f138 100644
+ d->mInlinedHtml = false;
+}
void Signature::assignFrom ( const K
PIM
Identit
ies
::Signature &that )
void Signature::assignFrom ( const KIdentit
yManagement
::Signature &that )
{
- mUrl = that.mUrl;
- mInlinedHtml = that.mInlinedHtml;
...
...
@@ -128,7 +128,7 @@ index 1d81e4c..258f138 100644
}
Signature::Signature ( const Signature &that )
@@ -141,12 +135,12 @@
Signature& Signature::operator= ( const K
PIM
Identit
ies
::Signature & that )
@@ -141,12 +135,12 @@
Signature& Signature::operator= ( const KIdentit
yManagement
::Signature & that )
Signature::~Signature()
{
...
...
@@ -355,16 +355,16 @@ index 1d81e4c..258f138 100644
}
}
@@ -565,7 +559,7 @@
void Signature::insertPlainSignatureIntoTextEdit( const QString &signature, KRic
QDataStream &K
PIM
Identit
ies
::operator<<
( QDataStream &stream, const K
PIM
Identit
ies
::Signature &sig )
QDataStream &KIdentit
yManagement
::operator<<
( QDataStream &stream, const KIdentit
yManagement
::Signature &sig )
{
- return stream << static_cast<quint8>( sig.mType ) << sig.mUrl << sig.mText
+ return stream << static_cast<quint8>( sig.type() ) << sig.url() << sig.text()
<< d( &sig )->saveLocation << d( &sig )->embeddedImages << d( &sig )->enabled;
}
@@ -573,36 +567,36 @@
QDataStream &K
PIM
Identit
ies
::operator>>
( QDataStream &stream, K
PIM
Identit
ies
::Signature &sig )
@@ -573,36 +567,36 @@
QDataStream &KIdentit
yManagement
::operator>>
( QDataStream &stream, KIdentit
yManagement
::Signature &sig )
{
quint8 s;
- stream >> s >> sig.mUrl >> sig.mText >> d( &sig )->saveLocation >> d( &sig )->embeddedImages >>d( &sig )->enabled;
...
...
@@ -489,7 +489,7 @@ diff --git a/kpimidentities/src/signature.h b/kpimidentities/src/signature.h
index 116d17c..b8de09a 100644
--- a/kpimidentities/src/signature.h
+++ b/kpimidentities/src/signature.h
@@ -280,7 +280,9 @@
namespace K
PIM
Identit
ies
@@ -280,7 +280,9 @@
namespace KIdentit
yManagement
Placement placement = End,
bool isHtml = false );
...
...
@@ -500,7 +500,7 @@ index 116d17c..b8de09a 100644
// TODO: KDE5: BIC: Move all to private class
void writeConfig( KConfigGroup &config ) const;
@@ -310,12 +312,10 @@
namespace K
PIM
Identit
ies
@@ -310,12 +312,10 @@
namespace KIdentit
yManagement
QString textFromFile( bool *ok ) const;
QString textFromCommand( bool *ok ) const;
...
...
src/identity.cpp
View file @
0b087bd5
...
...
@@ -29,7 +29,7 @@
#include
<QByteArray>
#include
<QHostInfo>
using
namespace
K
PIM
Identit
ies
;
using
namespace
KIdentit
yManagement
;
// TODO: should use a kstaticdeleter?
static
Identity
*
identityNull
=
0
;
...
...
@@ -162,8 +162,8 @@ Identity Identity::fromMimeData(const QMimeData *md)
// ------------------ Operators --------------------------//
QDataStream
&
K
PIM
Identit
ies
::
operator
<<
(
QDataStream
&
stream
,
const
K
PIM
Identit
ies
::
Identity
&
i
)
QDataStream
&
KIdentit
yManagement
::
operator
<<
(
QDataStream
&
stream
,
const
KIdentit
yManagement
::
Identity
&
i
)
{
return
stream
<<
static_cast
<
quint32
>
(
i
.
uoid
())
<<
i
.
identityName
()
...
...
@@ -194,8 +194,8 @@ QDataStream &KPIMIdentities::operator<<
<<
i
.
defaultDomainName
();
}
QDataStream
&
K
PIM
Identit
ies
::
operator
>>
(
QDataStream
&
stream
,
K
PIM
Identit
ies
::
Identity
&
i
)
QDataStream
&
KIdentit
yManagement
::
operator
>>
(
QDataStream
&
stream
,
KIdentit
yManagement
::
Identity
&
i
)
{
quint32
uoid
;
stream
...
...
src/identity.h
View file @
0b087bd5
...
...
@@ -22,7 +22,7 @@
#ifndef KPIMIDENTITES_IDENTITY_H
#define KPIMIDENTITES_IDENTITY_H
#include
"k
pim
identit
ies
_export.h"
#include
"kidentit
ymanagement
_export.h"
#include
"signature.h"
#include
<QtCore/QString>
...
...
@@ -31,7 +31,7 @@
#include
<QtCore/QHash>
#include
<QtCore/QVariant>
namespace
K
PIM
Identit
ies
namespace
KIdentit
yManagement
{
class
Identity
;
class
Signature
;
...
...
@@ -40,7 +40,7 @@ class KConfigGroup;
class
QDataStream
;
class
QMimeData
;
namespace
K
PIM
Identit
ies
namespace
KIdentit
yManagement
{
static
const
char
s_uoid
[]
=
"uoid"
;
...
...
@@ -72,23 +72,23 @@ static const char s_disabledFcc[] = "Disable Fcc";
static
const
char
s_pgpautosign
[]
=
"Pgp Auto Sign"
;
static
const
char
s_defaultDomainName
[]
=
"Default Domain"
;
K
PIM
IDENTIT
IES
_EXPORT
QDataStream
&
operator
<<
(
QDataStream
&
stream
,
const
K
PIM
Identit
ies
::
Identity
&
ident
);
K
PIM
IDENTIT
IES
_EXPORT
QDataStream
&
operator
>>
(
QDataStream
&
stream
,
K
PIM
Identit
ies
::
Identity
&
ident
);
KIDENTIT
YMANAGEMENT
_EXPORT
QDataStream
&
operator
<<
(
QDataStream
&
stream
,
const
KIdentit
yManagement
::
Identity
&
ident
);
KIDENTIT
YMANAGEMENT
_EXPORT
QDataStream
&
operator
>>
(
QDataStream
&
stream
,
KIdentit
yManagement
::
Identity
&
ident
);
/** User identity information */
class
K
PIM
IDENTIT
IES
_EXPORT
Identity
class
KIDENTIT
YMANAGEMENT
_EXPORT
Identity
{
// only the identity manager should be able to construct and
// destruct us, but then we get into problems with using
// QValueList<Identity> and especially qHeapSort().
friend
class
IdentityManager
;
friend
K
PIM
IDENTIT
IES
_EXPORT
QDataStream
&
operator
<<
(
QDataStream
&
stream
,
const
K
PIM
Identit
ies
::
Identity
&
ident
);
friend
K
PIM
IDENTIT
IES
_EXPORT
QDataStream
&
operator
>>
(
QDataStream
&
stream
,
K
PIM
Identit
ies
::
Identity
&
ident
);
friend
KIDENTIT
YMANAGEMENT
_EXPORT
QDataStream
&
operator
<<
(
QDataStream
&
stream
,
const
KIdentit
yManagement
::
Identity
&
ident
);
friend
KIDENTIT
YMANAGEMENT
_EXPORT
QDataStream
&
operator
>>
(
QDataStream
&
stream
,
KIdentit
yManagement
::
Identity
&
ident
);
public:
typedef
QList
<
Identity
>
List
;
...
...
src/identitycombo.cpp
View file @
0b087bd5
...
...
@@ -35,14 +35,14 @@
#include
<assert.h>
using
namespace
K
PIM
Identit
ies
;
using
namespace
KIdentit
yManagement
;
/**
Private class that helps to provide binary compatibility between releases.
@internal
*/
//@cond PRIVATE
class
K
PIM
Identit
ies
::
IdentityCombo
::
Private
class
KIdentit
yManagement
::
IdentityCombo
::
Private
{
public:
Private
(
IdentityManager
*
manager
,
IdentityCombo
*
qq
)
...
...
@@ -59,7 +59,7 @@ public:
IdentityCombo
*
q
;
};
void
K
PIM
Identit
ies
::
IdentityCombo
::
Private
::
reloadCombo
()
void
KIdentit
yManagement
::
IdentityCombo
::
Private
::
reloadCombo
()
{
const
QStringList
identities
=
mIdentityManager
->
identities
();
// the IM should prevent this from happening:
...
...
@@ -68,7 +68,7 @@ void KPIMIdentities::IdentityCombo::Private::reloadCombo()
q
->
addItems
(
identities
);
}
void
K
PIM
Identit
ies
::
IdentityCombo
::
Private
::
reloadUoidList
()
void
KIdentit
yManagement
::
IdentityCombo
::
Private
::
reloadUoidList
()
{
mUoidList
.
clear
();
IdentityManager
::
ConstIterator
it
;
...
...
src/identitycombo.h
View file @
0b087bd5
...
...
@@ -30,18 +30,18 @@
#ifndef KPIMIDENTITIES_IDENTITYCOMBO_H
#define KPIMIDENTITIES_IDENTITYCOMBO_H
#include
"k
pim
identit
ies
_export.h"
#include
"kidentit
ymanagement
_export.h"
#include
<KComboBox>
class
QString
;
namespace
K
PIM
Identit
ies
namespace
KIdentit
yManagement
{
class
IdentityManager
;
class
Identity
;
class
K
PIM
IDENTIT
IES
_EXPORT
IdentityCombo
:
public
KComboBox
class
KIDENTIT
YMANAGEMENT
_EXPORT
IdentityCombo
:
public
KComboBox
{
Q_OBJECT
public:
...
...
src/identitymanager.cpp
View file @
0b087bd5
...
...
@@ -42,7 +42,7 @@ static const char configKeyDefaultIdentity[] = "Default Identity";
#include
"identitymanageradaptor.h"
namespace
K
PIM
Identit
ies
namespace
KIdentit
yManagement
{
static
QString
newDBusObjectName
()
...
...
@@ -61,10 +61,10 @@ static QString newDBusObjectName()
* @internal
*/
//@cond PRIVATE
class
K
PIM
Identit
ies
::
IdentityManager
::
Private
class
KIdentit
yManagement
::
IdentityManager
::
Private
{
public:
Private
(
K
PIM
Identit
ies
::
IdentityManager
*
);
Private
(
KIdentit
yManagement
::
IdentityManager
*
);
void
writeConfig
()
const
;
void
readConfig
(
KConfig
*
config
);
void
createDefaultIdentity
();
...
...
@@ -79,10 +79,10 @@ public:
int
newUoid
();
bool
mReadOnly
;
K
PIM
Identit
ies
::
IdentityManager
*
q
;
KIdentit
yManagement
::
IdentityManager
*
q
;
};
IdentityManager
::
Private
::
Private
(
K
PIM
Identit
ies
::
IdentityManager
*
manager
)
IdentityManager
::
Private
::
Private
(
KIdentit
yManagement
::
IdentityManager
*
manager
)
:
q
(
manager
)
{
}
...
...
@@ -263,7 +263,7 @@ int IdentityManager::Private::newUoid()
void
IdentityManager
::
Private
::
slotIdentitiesChanged
(
const
QString
&
id
)
{
qDebug
()
<<
" K
PIM
Identit
ies
::IdentityManager::slotIdentitiesChanged :"
<<
id
;
qDebug
()
<<
" KIdentit
yManagement
::IdentityManager::slotIdentitiesChanged :"
<<
id
;
const
QString
ourIdentifier
=
QString
::
fromLatin1
(
"%1/%2"
).
arg
(
QDBusConnection
::
sessionBus
().
baseService
()).
arg
(
q
->
property
(
"uniqueDBusPath"
).
toString
());
...
...
@@ -673,7 +673,7 @@ Identity &IdentityManager::newFromExisting(const Identity &other, const QString
return
result
;
}
QStringList
K
PIM
Identit
ies
::
IdentityManager
::
allEmails
()
const
QStringList
KIdentit
yManagement
::
IdentityManager
::
allEmails
()
const
{
QStringList
lst
;
for
(
ConstIterator
it
=
begin
();
it
!=
end
();
++
it
)
{
...
...
@@ -685,7 +685,7 @@ QStringList KPIMIdentities::IdentityManager::allEmails() const
return
lst
;
}
void
K
PIM
Identit
ies
::
IdentityManager
::
slotRollback
()
void
KIdentit
yManagement
::
IdentityManager
::
slotRollback
()
{
rollback
();
}
...
...
src/identitymanager.h
View file @
0b087bd5
...
...
@@ -20,13 +20,13 @@
#ifndef KPIMIDENTITIES_IDENTITYMANAGER_H
#define KPIMIDENTITIES_IDENTITYMANAGER_H
#include
<k
pim
identit
ies
_export.h>
#include
<kidentit
ymanagement
_export.h>
#include
<kconfiggroup.h>
#include
<QtCore/QObject>
class
QStringList
;
namespace
K
PIM
Identit
ies
namespace
KIdentit
yManagement
{
class
Identity
;
...
...
@@ -34,7 +34,7 @@ class Identity;
* @short Manages the list of identities.
* @author Marc Mutz <mutz@kde.org>
**/
class
K
PIM
IDENTIT
IES
_EXPORT
IdentityManager
:
public
QObject
class
KIDENTIT
YMANAGEMENT
_EXPORT
IdentityManager
:
public
QObject
{
Q_OBJECT
public:
...
...
@@ -196,13 +196,13 @@ Q_SIGNALS:
/** Emitted whenever the identity @p ident changed. Useful for more
fine-grained change notifications than what is possible with the
standard @ref changed() signal. */
void
changed
(
const
K
PIM
Identit
ies
::
Identity
&
ident
);
void
changed
(
const
KIdentit
yManagement
::
Identity
&
ident
);
/** Emitted on @ref commit() for each deleted identity. At the time
this signal is emitted, the identity does still exist and can be
retrieved by @ref identityForUoid() if needed */
void
deleted
(
uint
uoid
);
/** Emitted on @ref commit() for each new identity */
void
added
(
const
K
PIM
Identit
ies
::
Identity
&
ident
);
void
added
(
const
KIdentit
yManagement
::
Identity
&
ident
);
protected:
/**
...
...
src/signature.cpp
View file @
0b087bd5
...
...
@@ -38,7 +38,7 @@
#include
<QtCore/QDir>
#include
<kpimtextedit/textedit.h>
using
namespace
K
PIM
Identit
ies
;
using
namespace
KIdentit
yManagement
;
class
SignaturePrivate
{
...
...
@@ -112,7 +112,7 @@ Signature::Signature(const QString &url, bool isExecutable)
mInlinedHtml
(
false
)
{}
void
Signature
::
assignFrom
(
const
K
PIM
Identit
ies
::
Signature
&
that
)
void
Signature
::
assignFrom
(
const
KIdentit
yManagement
::
Signature
&
that
)
{
mUrl
=
that
.
mUrl
;
mInlinedHtml
=
that
.
mInlinedHtml
;
...
...
@@ -128,7 +128,7 @@ Signature::Signature(const Signature &that)
assignFrom
(
that
);
}
Signature
&
Signature
::
operator
=
(
const
K
PIM
Identit
ies
::
Signature
&
that
)
Signature
&
Signature
::
operator
=
(
const
KIdentit
yManagement
::
Signature
&
that
)
{
if
(
this
==
&
that
)
{
return
*
this
;
...
...
@@ -514,7 +514,7 @@ void Signature::insertIntoTextEdit(KRichTextEdit *textEdit,
}
insertSignatureHelper
(
signature
,
textEdit
,
placement
,
(
isInlinedHtml
()
&&
type
()
==
K
PIM
Identit
ies
::
Signature
::
Inlined
),
type
()
==
KIdentit
yManagement
::
Signature
::
Inlined
),
true
);
}
...
...
@@ -539,7 +539,7 @@ void Signature::insertSignatureText(Placement placement, AddedText addedText, KP
}
insertSignatureHelper
(
signature
,
textEdit
,
placement
,
(
isInlinedHtml
()
&&
type
()
==
K
PIM
Identit
ies
::
Signature
::
Inlined
),
type
()
==
KIdentit
yManagement
::
Signature
::
Inlined
),
(
addedText
&
AddNewLines
));
// We added the text of the signature above, now it is time to add the images as well.
...
...
@@ -558,15 +558,15 @@ void Signature::insertPlainSignatureIntoTextEdit(const QString &signature, KRich
// --------------------- Operators -------------------//
QDataStream
&
K
PIM
Identit
ies
::
operator
<<
(
QDataStream
&
stream
,
const
K
PIM
Identit
ies
::
Signature
&
sig
)
QDataStream
&
KIdentit
yManagement
::
operator
<<
(
QDataStream
&
stream
,
const
KIdentit
yManagement
::
Signature
&
sig
)
{
return
stream
<<
static_cast
<
quint8
>
(
sig
.
mType
)
<<
sig
.
mUrl
<<
sig
.
mText
<<
d
(
&
sig
)
->
saveLocation
<<
d
(
&
sig
)
->
embeddedImages
<<
d
(
&
sig
)
->
enabled
;
}
QDataStream
&
K
PIM
Identit
ies
::
operator
>>
(
QDataStream
&
stream
,
K
PIM
Identit
ies
::
Signature
&
sig
)
QDataStream
&
KIdentit
yManagement
::
operator
>>
(
QDataStream
&
stream
,
KIdentit
yManagement
::
Signature
&
sig
)
{
quint8
s
;
stream
>>
s
>>
sig
.
mUrl
>>
sig
.
mText
>>
d
(
&
sig
)
->
saveLocation
>>
d
(
&
sig
)
->
embeddedImages
>>
d
(
&
sig
)
->
enabled
;
...
...
src/signature.h
View file @
0b087bd5
...
...
@@ -23,7 +23,7 @@
#ifndef KPIMIDENTITIES_SIGNATURE_H
#define KPIMIDENTITIES_SIGNATURE_H
#include
"k
pim
identit
ies
_export.h"
#include
"kidentit
ymanagement
_export.h"
#include
<QtCore/QString>
#include
<QtCore/QStringList>
...
...
@@ -31,7 +31,7 @@
#include
<QtCore/QHash>
#include
<QtCore/QVariant>
namespace
K
PIM
Identit
ies
namespace
KIdentit
yManagement
{
class
Signature
;
class
Identity
;
...
...
@@ -44,13 +44,13 @@ namespace KPIMTextEdit
class
TextEdit
;
}
namespace
K
PIM
Identit
ies
namespace
KIdentit
yManagement
{
K
PIM
IDENTIT
IES
_EXPORT
QDataStream
&
operator
<<
(
QDataStream
&
stream
,
const
K
PIM
Identit
ies
::
Signature
&
sig
);
K
PIM
IDENTIT
IES
_EXPORT
QDataStream
&
operator
>>
(
QDataStream
&
stream
,
K
PIM
Identit
ies
::
Signature
&
sig
);
KIDENTIT
YMANAGEMENT
_EXPORT
QDataStream
&
operator
<<
(
QDataStream
&
stream
,
const
KIdentit
yManagement
::
Signature
&
sig
);
KIDENTIT
YMANAGEMENT
_EXPORT
QDataStream
&
operator
>>
(
QDataStream
&
stream
,
KIdentit
yManagement
::
Signature
&
sig
);
/**
* @short Abstraction of a signature (aka "footer").
...
...
@@ -80,16 +80,16 @@ KPIMIDENTITIES_EXPORT QDataStream &operator>>
* htmlSig.addImage( image, "hello.png" );
* ...
* KTextEdit edit;
* htmlSig.insertIntoTextEdit( K
PIM
Identit
ies
::Signature::End,
* K
PIM
Identit
ies
::Signature::AddSeparator, &edit );
* htmlSig.insertIntoTextEdit( KIdentit
yManagement
::Signature::End,
* KIdentit
yManagement
::Signature::AddSeparator, &edit );
* @endcode
*/
class
K
PIM
IDENTIT
IES
_EXPORT
Signature
class
KIDENTIT
YMANAGEMENT
_EXPORT
Signature
{
friend
class
Identity
;
friend
K
PIM
IDENTIT
IES
_EXPORT
QDataStream
&
operator
<<
(
QDataStream
&
stream
,
const
Signature
&
sig
);
friend
K
PIM
IDENTIT
IES
_EXPORT
QDataStream
&
operator
>>
(
QDataStream
&
stream
,
Signature
&
sig
);
friend
KIDENTIT
YMANAGEMENT
_EXPORT
QDataStream
&
operator
<<
(
QDataStream
&
stream
,
const
Signature
&
sig
);
friend
KIDENTIT
YMANAGEMENT
_EXPORT
QDataStream
&
operator
>>
(
QDataStream
&
stream
,
Signature
&
sig
);