https://bugs.kde.org/show_bug.cgi?id=261016
Tobias Koenig <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED --- Comment #2 from Tobias Koenig <tokoe kde org> 2010-12-23 10:25:26 --- commit 7075946cef95a33ec2df67743ab08cec9a388dd1 branch master Author: Tobias Koenig <[email protected]> Date: Thu Dec 23 10:25:44 2010 +0100 Do not trigger signature replacement twice Both, the signature controller and the ComposerView::identityChanged slot will update the signature if the identity has been changed. To prevent this disable identity tracking in signature controller (via suspend()) and let Message::ComposerViewBase::identityChanged handle the signature update. BUG: 261016 diff --git a/mobile/mail/composerview.cpp b/mobile/mail/composerview.cpp index 2308402..c1d19f5 100644 --- a/mobile/mail/composerview.cpp +++ b/mobile/mail/composerview.cpp @@ -61,6 +61,7 @@ #include <KCMultiDialog> #include <KNotification> +#include <QtCore/QTimer> #include <qdeclarativecontext.h> #include <qdeclarativeengine.h> @@ -264,9 +265,17 @@ void ComposerView::qmlLoaded ( QDeclarativeView::Status status ) Message::SignatureController *signatureController = new Message::SignatureController( this ); signatureController->setEditor( m_composerBase->editor() ); signatureController->setIdentityCombo( m_composerBase->identityCombo() ); - signatureController->applyCurrentSignature(); + signatureController->suspend(); // ComposerView::identityChanged will update the signature m_composerBase->setSignatureController( signatureController ); + if ( MessageComposer::MessageComposerSettings::self()->autoTextSignature() == QLatin1String( "auto" ) ) { + if ( MessageComposer::MessageComposerSettings::self()->prependSignature() ) { + QTimer::singleShot( 0, m_composerBase->signatureController(), SLOT( prependSignature() ) ); + } else { + QTimer::singleShot( 0, m_composerBase->signatureController(), SLOT( appendSignature() ) ); + } + } + connect( actionCollection()->action( "composer_clean_spaces" ), SIGNAL(triggered(bool)), signatureController, SLOT( cleanSpace() ) ); connect( actionCollection()->action( "composer_append_signature" ), SIGNAL(triggered(bool)), signatureController, SLOT( appendSignature() ) ); connect( actionCollection()->action( "composer_prepend_signature" ), SIGNAL(triggered(bool)), signatureController, SLOT( prependSignature() ) ); -- Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug. _______________________________________________ Kdepim-bugs mailing list [email protected] https://mail.kde.org/mailman/listinfo/kdepim-bugs
