[Bug 142483] Shift-R (Blank Reply) includes quote header.
Thomas McGuire
Thomas.McGuire at gmx.net
Wed Aug 15 13:22:23 BST 2007
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
http://bugs.kde.org/show_bug.cgi?id=142483
Thomas.McGuire gmx net changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
------- Additional Comments From Thomas.McGuire gmx net 2007-08-15 14:22 -------
SVN commit 700384 by tmcguire:
Make blank replys (Shift+R) work again.
Instead of skipping some template tags like QUOTE or HEADERS, now the whole
template is skipped when doing a blank reply.
BUG: 142483
M +2 -2 kmcommands.cpp
M +1 -1 kmfilteraction.cpp
M +6 -6 kmkernel.cpp
M +4 -4 kmmainwidget.cpp
M +15 -8 kmmessage.cpp
M +7 -7 templateparser.cpp
M +1 -2 templateparser.h
--- trunk/KDE/kdepim/kmail/kmcommands.cpp #700383:700384
@ -1314,7 +1314,7 @
{
KMMessage *msg = *it;
TemplateParser parser( fwdMsg, TemplateParser::Forward,
- msg->body(), false, false, false, false);
+ msg->body(), false, false, false );
parser.process( msg, 0, true );
fwdMsg->link( (*it), MessageStatus::statusForwarded() );
@ -1539,7 +1539,7 @
{
KMMessage *msg = *it;
TemplateParser parser( fwdMsg, TemplateParser::Forward,
- msg->body(), false, false, false, false);
+ msg->body(), false, false, false );
parser.process( msg, 0, true );
fwdMsg->link( msg, MessageStatus::statusForwarded() );
--- trunk/KDE/kdepim/kmail/kmfilteraction.cpp #700383:700384
@ -1475,7 +1475,7 @
// QString st = QString::fromUtf8( aMsg->createForwardBody() );
TemplateParser parser( msg, TemplateParser::Forward,
- aMsg->body(), false, false, false, false);
+ aMsg->body(), false, false, false);
parser.process( aMsg );
QByteArray
--- trunk/KDE/kdepim/kmail/kmkernel.cpp #700383:700384
@ -393,7 +393,7 @
}
else {
TemplateParser parser( msg, TemplateParser::NewMessage,
- "", false, false, false, false );
+ QString(), false, false, false );
parser.process( NULL, NULL );
}
}
@ -402,7 +402,7 @
}
else {
TemplateParser parser( msg, TemplateParser::NewMessage,
- "", false, false, false, false );
+ QString(), false, false, false );
parser.process( NULL, NULL );
}
@ -464,7 +464,7 @
msg->setBody(body.toUtf8());
} else {
TemplateParser parser( msg, TemplateParser::NewMessage,
- "", false, false, false, false );
+ QString(), false, false, false );
parser.process( NULL, NULL );
}
@ -565,7 +565,7 @
msg->setBody(body.toUtf8());
} else {
TemplateParser parser( msg, TemplateParser::NewMessage,
- "", false, false, false, false );
+ QString(), false, false, false );
parser.process( NULL, NULL );
}
@ -615,12 +615,12 @
if ( useFolderId ) {
TemplateParser parser( msg, TemplateParser::NewMessage,
- "", false, false, false, false );
+ QString(), false, false, false );
parser.process( NULL, folder );
win = makeComposer( msg, id );
} else {
TemplateParser parser( msg, TemplateParser::NewMessage,
- "", false, false, false, false );
+ QString(), false, false, false );
parser.process( NULL, NULL );
win = makeComposer( msg );
}
--- trunk/KDE/kdepim/kmail/kmmainwidget.cpp #700383:700384
@ -1003,13 +1003,13 @
if ( mFolder ) {
msg->initHeader( mFolder->identity() );
TemplateParser parser( msg, TemplateParser::NewMessage,
- "", false, false, false, false );
+ QString(), false, false, false );
parser.process( NULL, mFolder );
win = KMail::makeComposer( msg, mFolder->identity() );
} else {
msg->initHeader();
TemplateParser parser( msg, TemplateParser::NewMessage,
- "", false, false, false, false );
+ QString(), false, false, false );
parser.process( NULL, NULL );
win = KMail::makeComposer( msg );
}
@ -1583,7 +1583,7 @
QString text = mMsgView? mMsgView->copyText() : "";
KMCommand *command = new KMReplyListCommand( this, mHeaders->currentMsg(),
- text );
+ text );
command->start();
}
@ -3091,7 +3091,7 @
mFilterMenu = new KActionMenu(KIcon("search-filter"), i18n("&Create Filter"), this);
actionCollection()->addAction("create_filter", mFilterMenu );
connect( mFilterMenu, SIGNAL(activated()), this,
- SLOT(slotFilter()) );
+ SLOT(slotFilter()) );
mSubjectFilterAction = new KAction(i18n("Filter on &Subject..."), this);
actionCollection()->addAction("subject_filter", mSubjectFilterAction );
connect(mSubjectFilterAction, SIGNAL(triggered(bool) ), SLOT(slotSubjectFilter()));
--- trunk/KDE/kdepim/kmail/kmmessage.cpp #700383:700384
@ -1045,10 +1045,15 @
msg->setSubject( replySubject() );
- TemplateParser parser( msg, (replyAll ? TemplateParser::ReplyAll : TemplateParser::Reply),
- selection, sSmartQuote, noQuote, allowDecryption, selectionIsBody );
- if ( !tmpl.isEmpty() ) parser.process( tmpl, this );
- else parser.process( this );
+ // If the reply shouldn't be blank, apply the template to the message
+ if ( !noQuote ) {
+ TemplateParser parser( msg, (replyAll ? TemplateParser::ReplyAll : TemplateParser::Reply),
+ selection, sSmartQuote, allowDecryption, selectionIsBody );
+ if ( !tmpl.isEmpty() )
+ parser.process( tmpl, this );
+ else
+ parser.process( this );
+ }
msg->link( this, MessageStatus::statusReplied() );
@ -1264,10 +1269,12 @
msg->setSubject( forwardSubject() );
TemplateParser parser( msg, TemplateParser::Forward,
- asPlainText( false, false ),
- false, false, false, false);
- if ( !tmpl.isEmpty() ) parser.process( tmpl, this );
- else parser.process( this );
+ asPlainText( false, false ),
+ false, false, false);
+ if ( !tmpl.isEmpty() )
+ parser.process( tmpl, this );
+ else
+ parser.process( this );
// QByteArray encoding = autoDetectCharset(charset(), sPrefCharsets, msg->body());
// if (encoding.isEmpty()) encoding = "utf-8";
--- trunk/KDE/kdepim/kmail/templateparser.cpp #700383:700384
@ -51,10 +51,10 @
TemplateParser::TemplateParser( KMMessage *amsg, const Mode amode,
const QString &aselection,
- bool asmartQuote, bool anoQuote,
- bool aallowDecryption, bool aselectionIsBody ) :
+ bool asmartQuote, bool aallowDecryption,
+ bool aselectionIsBody ) :
mMode( amode ), mFolder( 0 ), mIdentity( 0 ), mSelection( aselection ),
- mSmartQuote( asmartQuote ), mNoQuote( anoQuote ),
+ mSmartQuote( asmartQuote ),
mAllowDecryption( aallowDecryption ), mSelectionIsBody( aselectionIsBody ),
mDebug( false ), mQuoteString( "> " ), mAppend( false )
{
@ -282,7 +282,7 @
int len = parseQuotes( "QUOTEPIPE=", cmd, q );
i += len;
QString pipe_cmd = q;
- if ( mOrigMsg && !mNoQuote ) {
+ if ( mOrigMsg ) {
QString str = pipe( pipe_cmd, mSelection );
QString quote = mOrigMsg->asQuotedString( "", mQuoteString, str,
mSmartQuote, mAllowDecryption );
@ -292,7 +292,7 @
} else if ( cmd.startsWith( "QUOTE" ) ) {
kDebug(5006) <<"Command: QUOTE";
i += strlen( "QUOTE" );
- if ( mOrigMsg && !mNoQuote ) {
+ if ( mOrigMsg ) {
QString quote = mOrigMsg->asQuotedString( "", mQuoteString, mSelection,
mSmartQuote, mAllowDecryption );
body.append( quote );
@ -301,7 +301,7 @
} else if ( cmd.startsWith( "QHEADERS" ) ) {
kDebug(5006) <<"Command: QHEADERS";
i += strlen( "QHEADERS" );
- if ( mOrigMsg && !mNoQuote ) {
+ if ( mOrigMsg ) {
QString quote = mOrigMsg->asQuotedString( "", mQuoteString,
mOrigMsg->headerAsSendableString(),
mSmartQuote, false );
@ -311,7 +311,7 @
} else if ( cmd.startsWith( "HEADERS" ) ) {
kDebug(5006) <<"Command: HEADERS";
i += strlen( "HEADERS" );
- if ( mOrigMsg && !mNoQuote ) {
+ if ( mOrigMsg ) {
QString str = mOrigMsg->headerAsSendableString();
body.append( str );
}
--- trunk/KDE/kdepim/kmail/templateparser.h #700383:700384
@ -44,7 +44,7 @
public:
TemplateParser( KMMessage *amsg, const Mode amode, const QString &aselection,
- bool aSmartQuote, bool anoQuote, bool aallowDecryption,
+ bool aSmartQuote, bool aallowDecryption,
bool aselectionIsBody );
virtual void process( KMMessage *aorig_msg, KMFolder *afolder = NULL, bool append = false );
@ -66,7 +66,6 @
KMMessage *mOrigMsg;
QString mSelection;
bool mSmartQuote;
- bool mNoQuote;
bool mAllowDecryption;
bool mSelectionIsBody;
bool mDebug;
More information about the Kdepim-bugs
mailing list