on, by setting the involved folderstorage's search pointers to 0 and
checking them. Can't use a QGuardedPtr, since the searchpatterns aren't
QObjects. Const-ify patterns and some detabification.
svn path=/trunk/KDE/kdepim/; revision=432984
here: http://lists.kde.org/?l=kmail-devel&m=111945756024656&w=2
I've changed the KMMsgDict::instance() to return a pointer instead of a
reference, compared to the patch I posted, after valid criticism from
Marc that the pattern is generally used with a pointer, in KDE, so it's
better not to surprise people here.
svn path=/trunk/KDE/kdepim/; revision=428560
Before when we selected a folder == "Local Folder" as that it was not a folder
search button was disable, and when we select "Search in all local folder"
Search button was never enabled :(
svn path=/trunk/KDE/kdepim/; revision=424582
http://lists.kde.org/?l=kde-cvs&m=110511548007484&w=2
which introduced "Sorting by date in search results dialog is broken"
http://bugs.kde.org/show_bug.cgi?id=100247
--Volker_Krause_Cookies;
++Hasso_Tepper_Cookies;
CCMAIL:100247-done@bugs.kde.org
Volker if you read this then firstly let me say hi, thanks for making an
effort to contribute to KMail, secondly please be more careful and check
that you don't introduce any (obvious) regressions like this one when
committing code to KMail.
svn path=/trunk/kdepim/; revision=398016
dialog and include it in the RMB menu of the foldertree. To make the check if the menu
should be shown a bit easier the folderstorage got a new "isMoveable()" function.
I noticed that moving of imap folders crashes again when the messages are moved (sigh)
but this is not related so I'll fix it afterwards.
svn path=/trunk/kdepim/; revision=385541
and <body> searches not working on online imap folders.
remove the <body> and <message> fields from the 'rule'
comboboxes when an online imap folder is selected for searching.
Unless the 'search in all local folders' check box is checked in
which case <body> and <message> searching is always available, as
is sensible.
It would have been nicer to disable the <body> and <message> items
rather than hide/remove them but I can't see an easy way of doing
that.
This commit should be reverted once support for <message> and <body>
searching is implemented for online imap folders.
There are also some corner cases left. e.g. the user can explicitly
type <message> or <body> into the rule field even when an imap folder is
selected.
svn path=/trunk/kdepim/; revision=328587
used to since ages, I just improved the detection of dialogs for 3.2),
but that's probably wrong, and should be done only for modals.
Reset the property pointing to the dialog's mainwindow, which fools KWin;
HEAD should get this fixed properly.
svn path=/trunk/kdepim/; revision=299893
name. Searching a search folder set the name to "Last Search" instead of
the real name. Two folderstorage regressions of the more subtle variety.
And now Mr Terry Gilliam will sing for you: "I've got two legs"
I've got two legs from my hips to the ground and
when I move 'em they walk around.
When I lift them they climb the stairs and
when I shave 'em they ain't got hairs.
Thank you very much.
svn path=/trunk/kdepim/; revision=287257
Yes I can reproduce this, looks like a little folder storage regression.
Hopefully should be fixed now, thanks for your bug report Ron.
svn path=/trunk/kdepim/; revision=285472
#define kernel KMKernel::self()
to
#define kmkernel KMKernel::self()
because 'kernel' was a much to general term. We really shouldn't repeat the mistakes of the X developers.
I noticed this problem when I played around with KImageEffects. kimageeffects.h contains 'kernel' as parameter of some methods and so the compilation had to fail. We won't need KImageEffects in the near future, but at least we are now prepared and a clash with another 'kernel' can't happen anymore.
svn path=/trunk/kdepim/; revision=252621
Implement KMSearchPattern::requiresBody for more efficient filtering.
Fix a crash when double searching, had a small conflict there.
svn path=/trunk/kdepim/; revision=251452
reenable it when the search is finished. This helps with two issues:
- the items are appended to the list view, so that hits that are already
there are not constantly sorted away and can be looked at while the search
is still running
- the constant resorting (using the standard klistviewitem keys and therefor
string compares) becomes unbearably slow with searches with many hits. For
example a search with 9900 items in a folder producing 150 hits takes 25
seconds, roughly, a search on the same folder with 9500 hits takes a
whooping 7 minutes. With this change, that goes down to roughly 45 seconds
10 of which are used for the (only) sort on completion of the search.
Ideally, klistviewitem should be subclassed and proper compare functions
written, I guess, but this makes it useable at least.
svn path=/trunk/kdepim/; revision=243537
This patch mostly concerns itself with the following two things:
1. Move code out from kmreaderwin (see new class CSSHelper, whose files
have already been committed).
Into this category fall the simplification and readability
enhancements of the HTML code (adding some newlines, simplifying the
HTML in favour of complicating the CSS a bit, using @media print)
2. Change the semantics of the mCodec member of KMMessage and
KMReaderWin.
To make it short: mCodec is not mOverrideCodec and only ever set to a
non-NULL value iff the codec is forced by the user selecting an
encoding from the Message menu. In all other cases, it's now
calculated from the message(parts). For that, the codec() and
setBodyFromUnicode() and bodyToUnicode() methods have been duplicated
in KMMessage from KMMsgPart (don't you just hate that?).
Walkthrough of the patch:
kmreaderwin.{h,cpp}
- Replace all c* and m*Font members by a single CSSHelper instance.
- readColorConfig(), parts of readConfg(), quoteFontTag() and htmlHead()
were moved from here to CSSHelper
- rename codec()/setCodec() to overrideCodec()/setOverrideCodec()
and provide an autoDetectEncoding() convenience method.
- Remove the QTextCodec parameter from setMsgPart. It now uses
overrideCodec() or the msgPart's own codec.
- s/isfixedFont/isFixedFont/
- split parseMsg( KMMessage*, bool ) into one for
onlyProcessHeaders=false (called again parseMsg(KMMessage*)) and one
for oPH=true (called parseMsgHeader()). The latter then reduces to
writeMsgHeader(), provided one accepts the minor regression that the
[vPart] link is not shown _for *nested*_ messages. This can be readded
later, once KMReaderWin is void of formatting code and OTP is
independent of a KMReaderWin parent. I've left the commented
parseMsgHeader in the momnt of it's death in commented out, so you can
see what I how I came to kill it off for an explicit writeMsgHeader().
- In the old new parseMsg(KMMessage*), there also happened significant
code simplification, mostly by realizing that the the colorbar and tmp
file handling belongs into parseMsg(void) and by removing the oPH=true
case. There's also an instance of simplifying code by using
bodyToUnicode(). At last, the <div id="header"></div> around
writeMsgHeader is superfluous (and wrong, since there is and never was
a div#header CSS selector), since the HeaderStyle's add that already.
- Apply "Inline Method" to writeHTMLStr()
- remove the QTextCodec param from showVCard(). This method is now a
nice one and uses bodyToUnicode()
- rename all fooCodec to fooOverrideCodec
- currently, mCSSHelper is destroyed and re-created whenever it the
config changes. I intend to make CSSHelper a fully functional
ConfigManager later.
- setOverrideCodec now calls update(true) only if the codec was actually
changed.
- In setMsgPart, there's code that "forgets" to strip off <head>, <body>
and <html> tags from HTML parts. I didn't do anything about that yet,
only added a triple-hash.
- Simplify slotAtmSave() by using more guard clauses and esp. by using
QString::section() and QString::replace(QChar,QChar) instead of
rolling our owns.
objecttreeparser.{h,cpp}:
- Use CSShelper
- Create a new CSS class "htmlWarn" for the HTML warning frame to get
rid of the embedded style information.
- simplify quotedHTML() by using new nonQuotedFontTag().
headerstyle.cpp:
- We begin by inserting some newlines to ease the reading of the
resultant HTML code.
- In the fancy header department, we remove almost all class attributes
from the HTML tags. Instead (see csshelper.cpp), we use CSS Selectors
to address the inner tags of the enclosing <div class="fancy header">
Note how that tag matches both the div.header (setting the margin) and
div.fancy.header selectors in csshelper.cpp
- We end with removing the workaround for the apparently long-standing
khtml bug that makes it ignore "padding" on <table>, viz. another
<div></div> pair around the table.
kmfldsearch.cpp:
- Reap fruits of (2).
kmmainwin.cpp:
- Consequence of setCodec -> setOverrideCodec() renaming
- move an #include up to the top
kmmessage.{h,cpp}:
- Copy setBodyFromUnicode(), bodyToUnicode() and rename fooCodec to
fooOverrideCodec.
- Note how the double housekeeping (mAutoDetectEncoding) goes away with
this.
- In html2source(), don't emit <br />, but <br> (we're using HTML 4.01,
not XHTML) and quote ' with ' (well, that's more XHTML-like)
kmreadermainwin.{h,cpp}:
- Since the QTextCodec* parameter was removed from
KMReaderWin::setMsgPart(), use now the explicit setOverrideCodec()
method to set the user-defined codec.
- Remove unused mCodec member
svn path=/trunk/kdepim/; revision=236540
search
o fix display of message size in search folders for searches on imap folders
o fix getMsgString for imap folders
svn path=/trunk/kdepim/; revision=225471
o Remove unneeded #include from header file.
o Give KMSearchRule copy- and (field,func,contents)-ctor and operator=.
o Protect operator= against self-assignment.
o Remove all publix KMSearchRule::init()'s; port callers to use ctors.
o Make KMSearchRuleWidget::ruleFieldToEnglish() static and return a
QCString instead of QString.
o Plug a few mem leaks resulting from not delete'ing the
mBmHeaderField on init().
o Fix KMSearchRule::setField() not updating mBmHeaderField.
o Fix KMSearchRule::init() constructing a DwBoyerMoore object even for
pseudo headers (<size>, <recipients>, <message>, etc).
o Fix KMSearchPattern::operator=() not clearing it's rule list before
append()ing from the other patterns'.
After DwBoyerMoore::FindIn() has been made const-correct...
o ...replace the mBmEndHeader* KMSearchRule members with static const
versions in ::matches().
o ...make all other DwBoyerMoore objects const or static const.
If BoyerMoore gives any speed increase over QCString::find() for
"\nTo:" and "\nCc:" (which I doubt if I listen to my HD while
searching), it was probably eaten away by the permanent re-creation of
both objects for _every_ matches() call.
svn path=/trunk/kdepim/; revision=224610