[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-pim
Subject:    Re: [Kde-pim] Cyclic link dependencies in kdepimlibs - how to
From:       Thomas McGuire <mcguire () kde ! org>
Date:       2009-05-05 13:01:30
Message-ID: 200905051501.37336.mcguire () kde ! org
[Download RAW message or body]

[Attachment #2 (multipart/signed)]

[Attachment #4 (multipart/mixed)]


Hi,

On Tuesday 05 May 2009 01:24:39 Christophe Giboudeaux wrote:
> On Tuesday 05 May 2009 00:40:10 Thomas McGuire wrote:
> > now that KPIMTextEdit is basically complete, I wanted to support images
> > in signatures.
> > The signature editor is in kpimidentities, so kpimidentities needs to
> > link to kpimtextedit so that the signature editor there can support
> > images.
> >
> > Problem is, kpimtextedit already links to kpimidentities, because it has
> > some functions to insert signatures into the text edit.
> >
> > So there is a link cycle between kpimtextedit and kpimidentities, and
> > CMake won't let me do that.
> >
> > Any idea how to resolve that? One idea would be to move all of
> > kpimtextedit (two classes at the moment) to kpimidentities and get rid of
> > the kpimtextedit library altogether.
> > The downside of this is that a text edit doesn't really fit there.
>
> Can you attach the diff to this thread please ? I'd like to test a few
> things

Here you go.
Although I think it is the best to move all signature-related functions to 
kpimidentities, like Volker suggests.

Regards,
Thomas


["link.diff" (text/x-patch)]

Index: kpimidentities/signatureconfigurator.cpp
===================================================================
--- kpimidentities/signatureconfigurator.cpp	(revision 961567)
+++ kpimidentities/signatureconfigurator.cpp	(working copy)
@@ -26,12 +26,13 @@
 #include <kdialog.h>
 #include <klineedit.h>
 #include <kurlrequester.h>
-#include <krichtextwidget.h>
 #include <kshellcompletion.h>
 #include <ktoolbar.h>
 #include <krun.h>
 #include <KComboBox>
 
+#include <kpimtextedit/textedit.h>
+
 #include <QCheckBox>
 #include <QDir>
 #include <QFileInfo>
@@ -141,7 +142,7 @@
     mFormatToolBar->setToolButtonStyle( Qt::ToolButtonIconOnly );
     page_vlay->addWidget( mFormatToolBar, 1 );
 
-    mTextEdit = new KRichTextWidget( this );
+    mTextEdit = new KPIMTextEdit::TextEdit( this );
     page_vlay->addWidget( mTextEdit, 2 );
     mTextEdit->setWhatsThis( i18n("Use this field to enter an arbitrary static \
signature."));  // exclude SupportToPlainText.
Index: kpimidentities/signatureconfigurator.h
===================================================================
--- kpimidentities/signatureconfigurator.h	(revision 961567)
+++ kpimidentities/signatureconfigurator.h	(working copy)
@@ -153,7 +153,8 @@
     KLineEdit       * mCommandEdit;
     KToolBar        * mEditToolBar;
     KToolBar        * mFormatToolBar;
-    KRichTextWidget * mTextEdit;
+    KRichTextWidget * mTextEdit;      // Grmbl, why is this not in the private \
class?  +                                      // This is a KPIMTextEdit::TextEdit, \
really.  
   private:
     //@cond PRIVATE
Index: kpimidentities/CMakeLists.txt
===================================================================
--- kpimidentities/CMakeLists.txt	(revision 961567)
+++ kpimidentities/CMakeLists.txt	(working copy)
@@ -7,7 +7,7 @@
 
 kde4_add_library(kpimidentities SHARED ${kpimidentities_LIB_SRCS})
 
-target_link_libraries(kpimidentities ${QT_AND_KDECORE_LIBS}  kpimutils \
${KDE4_KIO_LIBS} ) +target_link_libraries(kpimidentities ${QT_AND_KDECORE_LIBS}  \
kpimutils ${KDE4_KIO_LIBS} kpimtextedit )  
 set_target_properties(kpimidentities PROPERTIES VERSION ${GENERIC_LIB_VERSION} \
SOVERSION ${GENERIC_LIB_SOVERSION} )  install(TARGETS kpimidentities EXPORT \
kdepimlibsLibraryTargets ${INSTALL_TARGETS_DEFAULT_ARGS})


["signature.asc" (application/pgp-signature)]

_______________________________________________
KDE PIM mailing list kde-pim@kde.org
https://mail.kde.org/mailman/listinfo/kde-pim
KDE PIM home page at http://pim.kde.org/

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic