Merged revisions 830406,831603 via svnmerge from
svn+ssh://tmcguire@svn.kde.org/home/kde/branches/kdepim/enterprise4/kdepim
........
r830406 | staniek | 2008-07-10 13:07:35 +0200 (Thu, 10 Jul 2008) | 24 lines
Printing emails on Windows
The code (before patching) works on Linux (?) only by accident,
I guess (probably thanks to different strategy of handling QTimers with 0 delay [2]).
Explanation: KMReaderWin::printMsg() _can_ be executed before the timer
handling slotWriteNextHtmlChunk() finishes. And it is, on Windows.
- added KHtmlPartHtmlWriter::finished() signal, connected to KMReaderWin::slotPrintMsg().
- previous KMReaderWin::printMsg() code splitted into two pieces:
1st - KMReaderWin::printMsg( KMMessage* aMsg ) - connects the finished()
signal and calls setMsg(),
2nd - KMReaderWin::slotPrintMsg() - is a response for finished() signal,
calls mViewer->view()->print() and deletesLater() the KMReaderWin.
- at KMPrintCommand level, we keep QPointer<KMReaderWin> s_printerWin
globally until the KMReaderWin object is destroyed;
- on KMPrintCommand::execute() we call s_printerWin->htmlWriter()->reset()
to stop any previous processing
- added KMReaderWin::mPartHtmlWriter which is needed for connecting it's
signal to a slot
(reviewed)
........
r831603 | staniek | 2008-07-13 00:54:47 +0200 (Sun, 13 Jul 2008) | 23 lines
Printing emails:
Possible fix for Windows issue, reported at
http://intevation.de/roundup/kolab/issue2647
The code (before patching) works on Linux (?) only by accident, I guess
(probably thanks to different strategy of handling QTimers with 0 delay:
mHtmlTimer.start( 0 )).
Explanation: KMReaderWin::printMsg() _can_ be executed before
the timer handling slotWriteNextHtmlChunk() finishes. And it is, on Windows.
Details:
- added KHtmlPartHtmlWriter::finished() signal, connected to KMReaderWin::slotPrintMsg().
- previous KMReaderWin::printMsg() code splitted into two pieces:
1st - KMReaderWin::printMsg( KMMessage* aMsg ) - connects the finished()
signal and calls setMsg(),
2nd - KMReaderWin::slotPrintMsg() - is a response for finished() signal,
calls mViewer->view()->print() and deletesLater() the KMReaderWin.
- added KMReaderWin::mPartHtmlWriter which is needed for connecting its
signal to a slot
........
svn path=/branches/KDE/4.1/kdepim/; revision=835459
svn+ssh://tmcguire@svn.kde.org/home/kde/branches/kdepim/enterprise4/kdepim
........
r830406 | staniek | 2008-07-10 13:07:35 +0200 (Thu, 10 Jul 2008) | 24 lines
Printing emails on Windows
The code (before patching) works on Linux (?) only by accident,
I guess (probably thanks to different strategy of handling QTimers with 0 delay [2]).
Explanation: KMReaderWin::printMsg() _can_ be executed before the timer
handling slotWriteNextHtmlChunk() finishes. And it is, on Windows.
- added KHtmlPartHtmlWriter::finished() signal, connected to KMReaderWin::slotPrintMsg().
- previous KMReaderWin::printMsg() code splitted into two pieces:
1st - KMReaderWin::printMsg( KMMessage* aMsg ) - connects the finished()
signal and calls setMsg(),
2nd - KMReaderWin::slotPrintMsg() - is a response for finished() signal,
calls mViewer->view()->print() and deletesLater() the KMReaderWin.
- at KMPrintCommand level, we keep QPointer<KMReaderWin> s_printerWin
globally until the KMReaderWin object is destroyed;
- on KMPrintCommand::execute() we call s_printerWin->htmlWriter()->reset()
to stop any previous processing
- added KMReaderWin::mPartHtmlWriter which is needed for connecting it's
signal to a slot
(reviewed)
........
r831603 | staniek | 2008-07-13 00:54:47 +0200 (Sun, 13 Jul 2008) | 23 lines
Printing emails:
Possible fix for Windows issue, reported at
http://intevation.de/roundup/kolab/issue2647
The code (before patching) works on Linux (?) only by accident, I guess
(probably thanks to different strategy of handling QTimers with 0 delay:
mHtmlTimer.start( 0 )).
Explanation: KMReaderWin::printMsg() _can_ be executed before
the timer handling slotWriteNextHtmlChunk() finishes. And it is, on Windows.
Details:
- added KHtmlPartHtmlWriter::finished() signal, connected to KMReaderWin::slotPrintMsg().
- previous KMReaderWin::printMsg() code splitted into two pieces:
1st - KMReaderWin::printMsg( KMMessage* aMsg ) - connects the finished()
signal and calls setMsg(),
2nd - KMReaderWin::slotPrintMsg() - is a response for finished() signal,
calls mViewer->view()->print() and deletesLater() the KMReaderWin.
- added KMReaderWin::mPartHtmlWriter which is needed for connecting its
signal to a slot
........
svn path=/trunk/KDE/kdepim/; revision=834651
- Fix FIXME added by me in the separate reader window when viewing
text/plain attachments.
- Comment out mShowCompleteMessage from reader win. The only usage of
it is in the ObjectTreeParser, and I don't see any regressions with
simply assuming it to always be true. It certainly doesn't break the
claimed usage of this hack.
- group fonts/color member variables together.
- Refactor HTML head composition from parseMsg() into htmlHead()
- Use new htmlHead() to fix#60688
CCMAIL:60688-done@bugs.kde.org
ObjectTreeParser:
- Moved mIsFirstTextPart member variable from readerwin to here
- Removed the hack that maps app/pgp to text/plain. Instead, just call
the t/p method from the app/pgp case.
- At the end of parseObjectTree(), change the last
htmlWriter()->write() to htmlWriter()->queue(), since everything
that is called in between uses queue(), too (see below)
KHtmlHtmlWriter:
- Keep state to be able to warn about incorrect usage patterns
- Move html view init/finish to begin() and end() from kmreaderwin
and objecttreeparser
svn path=/trunk/kdepim/; revision=235256
HTML-Escaping is a job for HtmlFormatter.
- KHtmlPartHtmlWriter now operates directly on KHTMLPart, not any longer
via KMReaderWin.
- inline KHtmlPartHtmlWriter::queuedHtml() into KHtmlPartHtmlWriter::queue()
svn path=/trunk/kdepim/; revision=201111
KHtmlPartHtmlWriter, which therefore becomes a QObject.
Add a new HtmlWriter::reset() method that KHtmlPartHtmlWriter
uses to stop it's timer and empty the html queue.
Don't delete mHtmlWriter in KMReaderWin dtor anymore, but rely on QObjects
destroying it's parents.
svn path=/trunk/kdepim/; revision=201105
First (and - apart from debugging purposes - probably only) implementation
KHtmlPartHtmlWriter, which currently still depends on KMReaderWin for the
queueHtml handling. Queued HTML writing will move to KHtmlPartHtmlWriter.
svn path=/trunk/kdenetwork/kmail/; revision=199819