Commit 0b087bd5 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Rename as KIdentityManagement

parent 0b5f9763
cmake_minimum_required(VERSION 2.8.12)
project(KPimIdentities)
project(KIdentityManagement)
# 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}/kpimidentities_version.h"
PACKAGE_VERSION_FILE "${CMAKE_CURRENT_BINARY_DIR}/KF5PimIdentitiesConfigVersion.cmake"
VERSION_HEADER "${CMAKE_CURRENT_BINARY_DIR}/kidentitymanagement_version.h"
PACKAGE_VERSION_FILE "${CMAKE_CURRENT_BINARY_DIR}/KF5IdentityManagementConfig.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 "${KPimIdentities_SOURCE_DIR}")
if("${CMAKE_SOURCE_DIR}" STREQUAL "${KIdentityManagement_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}/KF5PimIdentities")
set(CMAKECONFIG_INSTALL_DIR "${CMAKECONFIG_INSTALL_PREFIX}/KF5IdentityManagement")
ecm_configure_package_config_file(
"${CMAKE_CURRENT_SOURCE_DIR}/KF5PimIdentitiesConfig.cmake.in"
"${CMAKE_CURRENT_BINARY_DIR}/KF5PimIdentitiesConfig.cmake"
"${CMAKE_CURRENT_SOURCE_DIR}/KF5IdentityManagementConfig.cmake.in"
"${CMAKE_CURRENT_BINARY_DIR}/KF5IdentityManagementConfig.cmake"
INSTALL_DESTINATION ${CMAKECONFIG_INSTALL_DIR}
)
install(FILES
"${CMAKE_CURRENT_BINARY_DIR}/KF5PimIdentitiesConfig.cmake"
"${CMAKE_CURRENT_BINARY_DIR}/KF5PimIdentitiesConfigVersion.cmake"
"${CMAKE_CURRENT_BINARY_DIR}/KF5IdentityManagementConfig.cmake"
"${CMAKE_CURRENT_BINARY_DIR}/KF5IdentityManagementVersion.cmake"
DESTINATION "${CMAKECONFIG_INSTALL_DIR}"
COMPONENT Devel
)
install(EXPORT KF5PimIdentitiesTargets
install(EXPORT KF5IdentityManagementTargets
DESTINATION "${CMAKECONFIG_INSTALL_DIR}"
FILE KF5PimIdentitiesTargets.cmake
FILE KF5IdentityManagementTargets.cmake
NAMESPACE KF5::
)
install(FILES
${CMAKE_CURRENT_BINARY_DIR}/kpimidentities_version.h
${CMAKE_CURRENT_BINARY_DIR}/kidentitymanagement_version.h
DESTINATION ${KF5_INCLUDE_INSTALL_DIR}
COMPONENT Devel
)
if ("${CMAKE_BINARY_DIR}" STREQUAL "${KPimIdentities_BINARY_DIR}")
if ("${CMAKE_BINARY_DIR}" STREQUAL "${KIdentityManagement_BINARY_DIR}")
feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES)
endif()
......@@ -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 KF5PimIdentities KF5::PimTextEdit Qt5::Test KF5::ConfigCore KF5::TextWidgets KF5::XmlGui KF5::IconThemes)
ecm_add_tests( identitytest.cpp signaturetest.cpp NAME_PREFIX "kpimidentity-" LINK_LIBRARIES KF5IdentityManagement KF5::PimTextEdit Qt5::Test KF5::ConfigCore KF5::TextWidgets KF5::XmlGui KF5::IconThemes)
......@@ -24,7 +24,7 @@
#include <KConfig>
#include <KConfigGroup>
using namespace KPIMIdentities;
using namespace KIdentityManagement;
QTEST_GUILESS_MAIN(IdentityTester)
......
......@@ -32,7 +32,7 @@
#include <QStandardPaths>
#include <KConfig>
#include <QDir>
using namespace KPIMIdentities;
using namespace KIdentityManagement;
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(KPIMIdentities::Signature::End, Signature::AddSeparator | Signature::AddNewLines,
sig2.insertIntoTextEdit(KIdentityManagement::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"));
......
set(kpimidentities_SRCS
set(kidentitymanagement_SRCS
identity.cpp
identitycombo.cpp
identitymanager.cpp
......@@ -6,18 +6,18 @@ set(kpimidentities_SRCS
signatureconfigurator.cpp
)
qt5_add_dbus_adaptor(kpimidentities_SRCS org.kde.pim.IdentityManager.xml identitymanager.h KPIMIdentities::IdentityManager )
qt5_add_dbus_adaptor(kidentitymanagement_SRCS org.kde.pim.IdentityManager.xml identitymanager.h KIdentityManagement::IdentityManager )
add_library(KF5PimIdentities ${kpimidentities_SRCS})
add_library(KF5IdentityManagement ${kidentitymanagement_SRCS})
generate_export_header(KF5PimIdentities BASE_NAME kpimidentities)
generate_export_header(KF5IdentityManagement BASE_NAME kidentitymanagement)
add_library(KF5::PimIdentities ALIAS KF5PimIdentities)
add_library(KF5::IdentityManagement ALIAS KF5IdentityManagement)
target_include_directories(KF5PimIdentities INTERFACE "$<INSTALL_INTERFACE:${KF5_INCLUDE_INSTALL_DIR}/KPIMIdentities;${KF5_INCLUDE_INSTALL_DIR}/KPIMIdentities/kpimidentities;>")
target_include_directories(KF5PimIdentities PUBLIC "$<BUILD_INTERFACE:${KPimIdentities_SOURCE_DIR}/src;${KPimIdentities_BINARY_DIR}/src>")
target_include_directories(KF5IdentityManagement INTERFACE "$<INSTALL_INTERFACE:${KF5_INCLUDE_INSTALL_DIR}/KIdentityManagement;${KF5_INCLUDE_INSTALL_DIR}/KIdentityManagement/kidentitymanagement;>")
target_include_directories(KF5IdentityManagement PUBLIC "$<BUILD_INTERFACE:${KIdentityManagement_SOURCE_DIR}/src;${KIdentityManagement_BINARY_DIR}/src>")
target_link_libraries(KF5PimIdentities
target_link_libraries(KF5IdentityManagement
PUBLIC
KF5::CoreAddons
KF5::PimTextEdit
......@@ -33,41 +33,41 @@ PRIVATE
KF5::ConfigCore
)
set_target_properties(KF5PimIdentities PROPERTIES
set_target_properties(KF5IdentityManagement PROPERTIES
VERSION ${KPIMIDENTITIES_VERSION_STRING}
SOVERSION ${KPIMIDENTITIES_SOVERSION}
EXPORT_NAME PimIdentities
EXPORT_NAME IdentityManagement
)
install(TARGETS KF5PimIdentities EXPORT KF5PimIdentitiesTargets ${KF5_INSTALL_TARGETS_DEFAULT_ARGS})
install(TARGETS KF5IdentityManagement EXPORT KF5IdentityManagementTargets ${KF5_INSTALL_TARGETS_DEFAULT_ARGS})
########### Generate Headers ###############
ecm_generate_headers(KPimIdentities_CamelCase_HEADERS
ecm_generate_headers(KIdentityManagement_CamelCase_HEADERS
HEADER_NAMES
Identity
IdentityCombo
IdentityManager
Signature
SignatureConfigurator
PREFIX KPIMIdentities
REQUIRED_HEADERS KPimIdentities_HEADERS
PREFIX KIdentityManagement
REQUIRED_HEADERS KIdentityManagement_HEADERS
)
########### install files ###############
install(FILES
${CMAKE_CURRENT_BINARY_DIR}/kpimidentities_export.h
${KPimIdentities_HEADERS}
DESTINATION ${KF5_INCLUDE_INSTALL_DIR}/KPIMIdentities/kpimidentities
${CMAKE_CURRENT_BINARY_DIR}/kidentitymanagement_export.h
${KIdentityManagement_HEADERS}
DESTINATION ${KF5_INCLUDE_INSTALL_DIR}/KIdentityManagement/kidentitymanagement
COMPONENT Devel
)
install(FILES ${KPimIdentities_CamelCase_HEADERS}
DESTINATION ${KF5_INCLUDE_INSTALL_DIR}/KPIMIdentities/KPIMIdentities/
install(FILES ${KIdentityManagement_CamelCase_HEADERS}
DESTINATION ${KF5_INCLUDE_INSTALL_DIR}/KIdentityManagement/KIdentityManagement/
COMPONENT Devel
)
install(FILES org.kde.pim.IdentityManager.xml DESTINATION ${DBUS_INTERFACES_INSTALL_DIR})
ecm_generate_pri_file(BASE_NAME KPimIdentities LIB_NAME KF5PimIdentities DEPS "CoreAddons PimTextEdit" FILENAME_VAR PRI_FILENAME INCLUDE_INSTALL_DIR ${KF5_INCLUDE_INSTALL_DIR}/KPIMIdentities)
ecm_generate_pri_file(BASE_NAME KIdentityManagement LIB_NAME KF5IdentityManagement DEPS "CoreAddons PimTextEdit" FILENAME_VAR PRI_FILENAME INCLUDE_INSTALL_DIR ${KF5_INCLUDE_INSTALL_DIR}/KIdentityManagement)
install(FILES ${PRI_FILENAME} DESTINATION ${ECM_MKSPECS_INSTALL_DIR})
......@@ -4,7 +4,7 @@ index 1d81e4c..258f138 100644
+++ b/kpimidentities/src/signature.cpp
@@ -40,11 +40,24 @@
using namespace KPIMIdentities;
using namespace KIdentityManagement;
-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 KPIMIdentities::Signature::Private
+class KIdentityManagement::Signature::Private
+{
+public:
+ Private(Signature *qq)
......@@ -109,7 +109,7 @@ index 1d81e4c..258f138 100644
+ d->mInlinedHtml = false;
+}
void Signature::assignFrom ( const KPIMIdentities::Signature &that )
void Signature::assignFrom ( const KIdentityManagement::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 KPIMIdentities::Signature & that )
@@ -141,12 +135,12 @@ Signature& Signature::operator= ( const KIdentityManagement::Signature & that )
Signature::~Signature()
{
......@@ -355,16 +355,16 @@ index 1d81e4c..258f138 100644
}
}
@@ -565,7 +559,7 @@ void Signature::insertPlainSignatureIntoTextEdit( const QString &signature, KRic
QDataStream &KPIMIdentities::operator<<
( QDataStream &stream, const KPIMIdentities::Signature &sig )
QDataStream &KIdentityManagement::operator<<
( QDataStream &stream, const KIdentityManagement::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 &KPIMIdentities::operator>>
( QDataStream &stream, KPIMIdentities::Signature &sig )
@@ -573,36 +567,36 @@ QDataStream &KIdentityManagement::operator>>
( QDataStream &stream, KIdentityManagement::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 KPIMIdentities
@@ -280,7 +280,9 @@ namespace KIdentityManagement
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 KPIMIdentities
@@ -310,12 +312,10 @@ namespace KIdentityManagement
QString textFromFile( bool *ok ) const;
QString textFromCommand( bool *ok ) const;
......
......@@ -29,7 +29,7 @@
#include <QByteArray>
#include <QHostInfo>
using namespace KPIMIdentities;
using namespace KIdentityManagement;
// TODO: should use a kstaticdeleter?
static Identity *identityNull = 0;
......@@ -162,8 +162,8 @@ Identity Identity::fromMimeData(const QMimeData *md)
// ------------------ Operators --------------------------//
QDataStream &KPIMIdentities::operator<<
(QDataStream &stream, const KPIMIdentities::Identity &i)
QDataStream &KIdentityManagement::operator<<
(QDataStream &stream, const KIdentityManagement::Identity &i)
{
return stream << static_cast<quint32>(i.uoid())
<< i.identityName()
......@@ -194,8 +194,8 @@ QDataStream &KPIMIdentities::operator<<
<< i.defaultDomainName();
}
QDataStream &KPIMIdentities::operator>>
(QDataStream &stream, KPIMIdentities::Identity &i)
QDataStream &KIdentityManagement::operator>>
(QDataStream &stream, KIdentityManagement::Identity &i)
{
quint32 uoid;
stream
......
......@@ -22,7 +22,7 @@
#ifndef KPIMIDENTITES_IDENTITY_H
#define KPIMIDENTITES_IDENTITY_H
#include "kpimidentities_export.h"
#include "kidentitymanagement_export.h"
#include "signature.h"
#include <QtCore/QString>
......@@ -31,7 +31,7 @@
#include <QtCore/QHash>
#include <QtCore/QVariant>
namespace KPIMIdentities
namespace KIdentityManagement
{
class Identity;
class Signature;
......@@ -40,7 +40,7 @@ class KConfigGroup;
class QDataStream;
class QMimeData;
namespace KPIMIdentities
namespace KIdentityManagement
{
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";
KPIMIDENTITIES_EXPORT QDataStream &operator<<
(QDataStream &stream, const KPIMIdentities::Identity &ident);
KPIMIDENTITIES_EXPORT QDataStream &operator>>
(QDataStream &stream, KPIMIdentities::Identity &ident);
KIDENTITYMANAGEMENT_EXPORT QDataStream &operator<<
(QDataStream &stream, const KIdentityManagement::Identity &ident);
KIDENTITYMANAGEMENT_EXPORT QDataStream &operator>>
(QDataStream &stream, KIdentityManagement::Identity &ident);
/** User identity information */
class KPIMIDENTITIES_EXPORT Identity
class KIDENTITYMANAGEMENT_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 KPIMIDENTITIES_EXPORT QDataStream &operator<<
(QDataStream &stream, const KPIMIdentities::Identity &ident);
friend KPIMIDENTITIES_EXPORT QDataStream &operator>>
(QDataStream &stream, KPIMIdentities::Identity &ident);
friend KIDENTITYMANAGEMENT_EXPORT QDataStream &operator<<
(QDataStream &stream, const KIdentityManagement::Identity &ident);
friend KIDENTITYMANAGEMENT_EXPORT QDataStream &operator>>
(QDataStream &stream, KIdentityManagement::Identity &ident);
public:
typedef QList<Identity> List;
......
......@@ -35,14 +35,14 @@
#include <assert.h>
using namespace KPIMIdentities;
using namespace KIdentityManagement;
/**
Private class that helps to provide binary compatibility between releases.
@internal
*/
//@cond PRIVATE
class KPIMIdentities::IdentityCombo::Private
class KIdentityManagement::IdentityCombo::Private
{
public:
Private(IdentityManager *manager, IdentityCombo *qq)
......@@ -59,7 +59,7 @@ public:
IdentityCombo *q;
};
void KPIMIdentities::IdentityCombo::Private::reloadCombo()
void KIdentityManagement::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 KPIMIdentities::IdentityCombo::Private::reloadUoidList()
void KIdentityManagement::IdentityCombo::Private::reloadUoidList()
{
mUoidList.clear();
IdentityManager::ConstIterator it;
......
......@@ -30,18 +30,18 @@
#ifndef KPIMIDENTITIES_IDENTITYCOMBO_H
#define KPIMIDENTITIES_IDENTITYCOMBO_H
#include "kpimidentities_export.h"
#include "kidentitymanagement_export.h"
#include <KComboBox>
class QString;
namespace KPIMIdentities
namespace KIdentityManagement
{
class IdentityManager;
class Identity;
class KPIMIDENTITIES_EXPORT IdentityCombo : public KComboBox
class KIDENTITYMANAGEMENT_EXPORT IdentityCombo : public KComboBox
{
Q_OBJECT
public:
......
......@@ -42,7 +42,7 @@ static const char configKeyDefaultIdentity[] = "Default Identity";
#include "identitymanageradaptor.h"
namespace KPIMIdentities
namespace KIdentityManagement
{
static QString newDBusObjectName()
......@@ -61,10 +61,10 @@ static QString newDBusObjectName()
* @internal
*/
//@cond PRIVATE
class KPIMIdentities::IdentityManager::Private
class KIdentityManagement::IdentityManager::Private
{
public:
Private(KPIMIdentities::IdentityManager *);
Private(KIdentityManagement::IdentityManager *);
void writeConfig() const;
void readConfig(KConfig *config);
void createDefaultIdentity();
......@@ -79,10 +79,10 @@ public:
int newUoid();
bool mReadOnly;
KPIMIdentities::IdentityManager *q;
KIdentityManagement::IdentityManager *q;
};
IdentityManager::Private::Private(KPIMIdentities::IdentityManager *manager)
IdentityManager::Private::Private(KIdentityManagement::IdentityManager *manager)
: q(manager)
{
}
......@@ -263,7 +263,7 @@ int IdentityManager::Private::newUoid()
void IdentityManager::Private::slotIdentitiesChanged(const QString &id)
{
qDebug() << " KPIMIdentities::IdentityManager::slotIdentitiesChanged :" << id;
qDebug() << " KIdentityManagement::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 KPIMIdentities::IdentityManager::allEmails() const
QStringList KIdentityManagement::IdentityManager::allEmails() const
{
QStringList lst;
for (ConstIterator it = begin(); it != end(); ++it) {
......@@ -685,7 +685,7 @@ QStringList KPIMIdentities::IdentityManager::allEmails() const
return lst;
}
void KPIMIdentities::IdentityManager::slotRollback()
void KIdentityManagement::IdentityManager::slotRollback()
{
rollback();
}
......
......@@ -20,13 +20,13 @@
#ifndef KPIMIDENTITIES_IDENTITYMANAGER_H
#define KPIMIDENTITIES_IDENTITYMANAGER_H
#include <kpimidentities_export.h>
#include <kidentitymanagement_export.h>
#include <kconfiggroup.h>
#include <QtCore/QObject>
class QStringList;
namespace KPIMIdentities
namespace KIdentityManagement
{
class Identity;
......@@ -34,7 +34,7 @@ class Identity;
* @short Manages the list of identities.
* @author Marc Mutz <mutz@kde.org>
**/
class KPIMIDENTITIES_EXPORT IdentityManager : public QObject
class KIDENTITYMANAGEMENT_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 KPIMIdentities::Identity &ident);
void changed(const KIdentityManagement::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 KPIMIdentities::Identity &ident);
void added(const KIdentityManagement::Identity &ident);
protected:
/**
......
......@@ -38,7 +38,7 @@
#include <QtCore/QDir>
#include <kpimtextedit/textedit.h>
using namespace KPIMIdentities;
using namespace KIdentityManagement;
class SignaturePrivate
{
......@@ -112,7 +112,7 @@ Signature::Signature(const QString &url, bool isExecutable)
mInlinedHtml(false)
{}
void Signature::assignFrom(const KPIMIdentities::Signature &that)
void Signature::assignFrom(const KIdentityManagement::Signature &that)
{
mUrl = that.mUrl;
mInlinedHtml = that.mInlinedHtml;
......@@ -128,7 +128,7 @@ Signature::Signature(const Signature &that)
assignFrom(that);
}
Signature &Signature::operator= (const KPIMIdentities::Signature &that)
Signature &Signature::operator= (const KIdentityManagement::Signature &that)
{
if (this == &that) {
return *this;
......@@ -514,7 +514,7 @@ void Signature::insertIntoTextEdit(KRichTextEdit *textEdit,
}
insertSignatureHelper(signature, textEdit, placement,
(isInlinedHtml() &&
type() == KPIMIdentities::Signature::Inlined),
type() == KIdentityManagement::Signature::Inlined),
true);
}
......@@ -539,7 +539,7 @@ void Signature::insertSignatureText(Placement placement, AddedText addedText, KP
}
insertSignatureHelper(signature, textEdit, placement,
(isInlinedHtml() &&
type() == KPIMIdentities::Signature::Inlined),
type() == KIdentityManagement::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 &KPIMIdentities::operator<<
(QDataStream &stream, const KPIMIdentities::Signature &sig)
QDataStream &KIdentityManagement::operator<<
(QDataStream &stream, const KIdentityManagement::Signature &sig)
{
return stream << static_cast<quint8>(sig.mType) << sig.mUrl << sig.mText
<< d(&sig)->saveLocation << d(&sig)->embeddedImages << d(&sig)->enabled;
}
QDataStream &KPIMIdentities::operator>>
(QDataStream &stream, KPIMIdentities::Signature &sig)
QDataStream &KIdentityManagement::operator>>
(QDataStream &stream, KIdentityManagement::Signature &sig)
{
quint8 s;
stream >> s >> sig.mUrl >> sig.mText >> d(&sig)->saveLocation >> d(&sig)->embeddedImages >> d(&sig)->enabled;
......
......@@ -23,7 +23,7 @@
#ifndef KPIMIDENTITIES_SIGNATURE_H
#define KPIMIDENTITIES_SIGNATURE_H
#include "kpimidentities_export.h"
#include "kidentitymanagement_export.h"
#include <QtCore/QString>
#include <QtCore/QStringList>
......@@ -31,7 +31,7 @@
#include <QtCore/QHash>
#include <QtCore/QVariant>
namespace KPIMIdentities
namespace KIdentityManagement
{
class Signature;
class Identity;
......@@ -44,13 +44,13 @@ namespace KPIMTextEdit
class TextEdit;
}
namespace KPIMIdentities
namespace KIdentityManagement
{
KPIMIDENTITIES_EXPORT QDataStream &operator<<
(QDataStream &stream, const KPIMIdentities::Signature &sig);
KPIMIDENTITIES_EXPORT QDataStream &operator>>
(QDataStream &stream, KPIMIdentities::Signature &sig);
KIDENTITYMANAGEMENT_EXPORT QDataStream &operator<<
(QDataStream &stream, const KIdentityManagement::Signature &sig);
KIDENTITYMANAGEMENT_EXPORT QDataStream &operator>>
(QDataStream &stream, KIdentityManagement::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( KPIMIdentities::Signature::End,
* KPIMIdentities::Signature::AddSeparator, &edit );
* htmlSig.insertIntoTextEdit( KIdentityManagement::Signature::End,
* KIdentityManagement::Signature::AddSeparator, &edit );
* @endcode
*/
class KPIMIDENTITIES_EXPORT Signature
class KIDENTITYMANAGEMENT_EXPORT Signature
{
friend class Identity;
friend KPIMIDENTITIES_EXPORT QDataStream &operator<< (QDataStream &stream, const Signature &sig);
friend KPIMIDENTITIES_EXPORT QDataStream &operator>> (QDataStream &stream, Signature &sig);
friend KIDENTITYMANAGEMENT_EXPORT QDataStream &operator<< (QDataStream &stream, const Signature &sig);
friend KIDENTITYMANAGEMENT_EXPORT QDataStream &operator>> (QDataStream &stream, Signature &sig);
public:
/** Type of signature (ie. way to obtain the signature text) */
......@@ -214,7 +214,7 @@ public: