From 9eb6d45a027b0447cec50eeb71cc9d5742866889 Mon Sep 17 00:00:00 2001 From: Edric Milaret <edric.ladent-milaret@savoirfairelinux.com> Date: Wed, 13 Jan 2016 13:42:18 -0500 Subject: [PATCH] im: fix missing lib_export and self photo return Change-Id: I73f8b32d3498e52c7b71270d75f3647ca6e47cbb Tuleap: #152 --- src/globalinstances.h | 18 +++++++++--------- src/media/textrecording.cpp | 6 ++++-- 2 files changed, 13 insertions(+), 11 deletions(-) diff --git a/src/globalinstances.h b/src/globalinstances.h index c166db6a..30ef7801 100644 --- a/src/globalinstances.h +++ b/src/globalinstances.h @@ -44,14 +44,14 @@ class ActionExtenderI; namespace GlobalInstances { Interfaces::AccountListColorizerI& accountListColorizer(); -void setAccountListColorizer(std::unique_ptr<Interfaces::AccountListColorizerI> instance); +void LIB_EXPORT setAccountListColorizer(std::unique_ptr<Interfaces::AccountListColorizerI> instance); /** * LRC does not provide a default implementation of this interface, thus an exception will be thrown * if this getter is called without an instance being set by the client */ Interfaces::ContactMethodSelectorI& contactMethodSelector(); -void setContactMethodSelector(std::unique_ptr<Interfaces::ContactMethodSelectorI> instance); +void LIB_EXPORT setContactMethodSelector(std::unique_ptr<Interfaces::ContactMethodSelectorI> instance); Interfaces::DBusErrorHandlerI& dBusErrorHandler(); void setDBusErrorHandler(std::unique_ptr<Interfaces::DBusErrorHandlerI> instance); @@ -61,13 +61,13 @@ void setDBusErrorHandler(std::unique_ptr<Interfaces::DBusErrorHandlerI> instance * if this getter is called without an instance being set by the client */ Interfaces::ItemModelStateSerializerI& itemModelStateSerializer(); -void setItemModelStateSerializer(std::unique_ptr<Interfaces::ItemModelStateSerializerI> instance); +void LIB_EXPORT setItemModelStateSerializer(std::unique_ptr<Interfaces::ItemModelStateSerializerI> instance); Interfaces::PixmapManipulatorI& pixmapManipulator(); -void setPixmapManipulator(std::unique_ptr<Interfaces::PixmapManipulatorI> instance); +void LIB_EXPORT setPixmapManipulator(std::unique_ptr<Interfaces::PixmapManipulatorI> instance); Interfaces::PresenceSerializerI& presenceSerializer(); -void setPresenceSerializer(std::unique_ptr<Interfaces::PresenceSerializerI> instance); +void LIB_EXPORT setPresenceSerializer(std::unique_ptr<Interfaces::PresenceSerializerI> instance); /** * TODO: LRC has a default implementation of this interface; however profiles are still in an @@ -75,13 +75,13 @@ void setPresenceSerializer(std::unique_ptr<Interfaces::PresenceSerializerI> inst * client */ Interfaces::ProfilePersisterI& profilePersister(); -void setProfilePersister(std::unique_ptr<Interfaces::ProfilePersisterI> instance); +void LIB_EXPORT setProfilePersister(std::unique_ptr<Interfaces::ProfilePersisterI> instance); Interfaces::ShortcutCreatorI& shortcutCreator(); -void setShortcutCreator(std::unique_ptr<Interfaces::ShortcutCreatorI> instance); +void LIB_EXPORT setShortcutCreator(std::unique_ptr<Interfaces::ShortcutCreatorI> instance); Interfaces::ActionExtenderI& actionExtender(); -void setActionExtender(std::unique_ptr<Interfaces::ActionExtenderI> instance); +void LIB_EXPORT setActionExtender(std::unique_ptr<Interfaces::ActionExtenderI> instance); @@ -106,7 +106,7 @@ void setInterfaceInternal(Interfaces::ActionExtenderI *); * can be passed. */ template<class I, typename ...Ts> -void setInterface(Ts... args) +void LIB_EXPORT setInterface(Ts... args) { try { auto i = new I(args...); diff --git a/src/media/textrecording.cpp b/src/media/textrecording.cpp index c2a0d8f4..f0611031 100644 --- a/src/media/textrecording.cpp +++ b/src/media/textrecording.cpp @@ -566,11 +566,13 @@ QVariant InstantMessagingModel::data( const QModelIndex& idx, int role) const return QVariant(n->m_pMessage->m_PlainText); case Qt::DecorationRole : if (n->m_pMessage->direction == Media::Media::Direction::IN) - return GlobalInstances::pixmapManipulator().callPhoto(n->m_pContactMethod,QSize(48,48)); + return GlobalInstances::pixmapManipulator().decorationRole(n->m_pContactMethod); else if (m_pRecording->call() && m_pRecording->call()->account() && m_pRecording->call()->account()->contactMethod()->contact()) { auto cm = m_pRecording->call()->account()->contactMethod(); - return GlobalInstances::pixmapManipulator().callPhoto(cm,QSize(48,48)); + return GlobalInstances::pixmapManipulator().decorationRole(cm); + } else if (n->m_pMessage->direction == Media::Media::Direction::OUT){ + return GlobalInstances::pixmapManipulator().decorationRole(n->m_pContactMethod->account()->contactMethod()); } break; case (int)Media::TextRecording::Role::Direction : -- GitLab