[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: extragear/pim/mailody/src
From: Thomas McGuire <mcguire () kde ! org>
Date: 2009-05-27 9:08:43
Message-ID: 1243415323.473025.3568.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 973460 by tmcguire:
Port Mailody to use KPIMTextEdit
http://reviewboard.kde.org/r/770/
M +17 -1 CMakeLists.txt
M +6 -6 composer.cpp
M +1 -1 composertextedit.cpp
M +2 -2 composertextedit.h
--- trunk/extragear/pim/mailody/src/CMakeLists.txt #973459:973460
@@ -83,7 +83,23 @@
kde4_add_plugin(mailodypart ${mailodypart_PART_SRCS} ${mailody_SRCS} )
-TARGET_LINK_LIBRARIES(mailodypart ${KDE4_KPARTS_LIBS} ${KDE4_SOLID_LIBS} \
${KDE4_AKONADI_LIBS} ${KDE4_AKONADI_KMIME_LIBS} ${KDE4_KABC_LIBS} \
${KDE4_KPIMUTILS_LIBS} ${KDE4_KIMAP_LIBS} ${KDE4_KMIME_LIBS} \
${KDE4_MAILTRANSPORT_LIBS} ${KDE4_KPIMIDENTITIES_LIBS} ${KDE4_KNOTIFYCONFIG_LIBS} \
${KDE4_KFILE_LIBS} ${KDE4_KUTILS_LIBS} ${QT_QTWEBKIT_LIBRARY} ${NEPOMUK_LIBRARIES} ) \
+TARGET_LINK_LIBRARIES(mailodypart + ${KDE4_KPARTS_LIBS}
+ ${KDE4_SOLID_LIBS}
+ ${KDE4_AKONADI_LIBS}
+ ${KDE4_AKONADI_KMIME_LIBS}
+ ${KDE4_KABC_LIBS}
+ ${KDE4_KPIMUTILS_LIBS}
+ ${KDE4_KIMAP_LIBS}
+ ${KDE4_KMIME_LIBS}
+ ${KDE4_MAILTRANSPORT_LIBS}
+ ${KDE4_KPIMIDENTITIES_LIBS}
+ ${KDE4_KPIMTEXTEDIT_LIBS}
+ ${KDE4_KNOTIFYCONFIG_LIBS}
+ ${KDE4_KFILE_LIBS}
+ ${KDE4_KUTILS_LIBS}
+ ${QT_QTWEBKIT_LIBRARY}
+ ${NEPOMUK_LIBRARIES} )
if (MARBLEWIDGET_FOUND)
TARGET_LINK_LIBRARIES(mailodypart ${TARGET_LINK_LIBRARIES} \
${LIBMARBLEWIDGET_LIBRARY} )
--- trunk/extragear/pim/mailody/src/composer.cpp #973459:973460
@@ -705,7 +705,7 @@
return;
// Remove the current placeholder
- QString msg = m_text->toPlainText();
+ QString msg = m_text->toPlainText(); // ### doesn't this remove all HTML \
formatting? msg.remove( "@@sig@@" );
// Add a new one if needed.
@@ -987,9 +987,9 @@
addRecipients( toSend );
toSend->addAttachments( m_attachview->attachments() );
- QString plain= m_text->toPlainText();
+ QString plain= m_text->toCleanPlainText();
QString html;
- if ( m_text->textMode() == KRichTextWidget::Rich )
+ if ( m_text->isFormattingUsed() )
html = m_text->toCleanHtml();
toSend->setSubject( m_subject->text() );
@@ -1008,9 +1008,9 @@
addRecipients( toSend );
toSend->addAttachments( m_attachview->attachments() );
- QString plain= m_text->toPlainText();
+ QString plain= m_text->toCleanPlainText();
QString html;
- if ( m_text->textMode() == KRichTextWidget::Rich )
+ if ( m_text->isFormattingUsed() )
html = m_text->toCleanHtml();
KMime::Message* kmimeMessage = toSend->compileMessage( SendMessage::Draft,
@@ -1058,7 +1058,7 @@
void Composer::slotHTMLMode( bool toggle )
{
- if ( !toggle && m_text->textMode() == KRichTextEdit::Rich && \
!m_text->toPlainText().isEmpty() ) { + if ( !toggle && \
!m_text->toPlainText().isEmpty() && m_text->isFormattingUsed() ) {
int choice = KMessageBox::warningContinueCancel( this, i18n( "Switching from \
HTML mode "
"to Plain mode will cause the text to lose the formatting. Are \
you sure?" ),
i18n( "Lose the formatting?" ), KStandardGuiItem::cont(), \
KStandardGuiItem::cancel(),
--- trunk/extragear/pim/mailody/src/composertextedit.cpp #973459:973460
@@ -24,7 +24,7 @@
using namespace Mailody;
ComposerTextEdit::ComposerTextEdit( QWidget* parent )
- : KRichTextWidget( parent )
+ : KPIMTextEdit::TextEdit( parent )
{
setAcceptDrops( true );
setCheckSpellingEnabled( true );
--- trunk/extragear/pim/mailody/src/composertextedit.h #973459:973460
@@ -20,7 +20,7 @@
#ifndef COMPOSERTEXTEDIT_H
#define COMPOSERTEXTEDIT_H
-#include <krichtextwidget.h>
+#include <KPIMTextEdit/TextEdit>
#include <KUrl>
class QDropEvent;
@@ -34,7 +34,7 @@
* when a file is dropped on it.
* @author Tom Albers <tomalbers@kde.nl>
*/
-class ComposerTextEdit : public KRichTextWidget
+class ComposerTextEdit : public KPIMTextEdit::TextEdit
{
Q_OBJECT
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic