Bug 153448 - cannot search in account, only in sub-folders
Summary: cannot search in account, only in sub-folders
Status: RESOLVED FIXED
Alias: None
Product: kmail
Classification: Applications
Component: search (show other bugs)
Version: SVN (3.5 branch)
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
: 122621 (view as bug list)
Depends on:
Blocks:
 
Reported: 2007-12-04 20:59 UTC by Thorsten Staerk
Modified: 2007-12-14 01:36 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments
return from the search (1.37 KB, patch)
2007-12-09 13:43 UTC, Thorsten Staerk
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Thorsten Staerk 2007-12-04 20:59:43 UTC
Version:           1.9.7 (using KDE Devel)
Installed from:    Compiled sources
OS:                Linux

When I chose "Find Messages", I can chose "Search only in" -> MyAccount/MyFolder, it finds 42 e-Mails. But if I chose "Search only in" -> MyAccount, the search just stalls and finds no single e-Mail. How can we narrow down this problem ?
Comment 1 Thorsten Staerk 2007-12-06 20:14:17 UTC
This problem occurs on all imap servers I tested: cyrus and exchange.

If I add 
  if ( !mFolder->imapPath().contains("tho") ) return;
to SearchJob::searchCompleteFolder(), then it works for me, as all my sub-folders contain "tho". I see, as soon as you create a KIO::SimpleJob with the URL for your ACCOUNT, your imap kioslave blocks. You have to hand over a FOLDER in the URL to KIO::SimpleJob.
Comment 2 Thorsten Staerk 2007-12-06 20:51:36 UTC
SVN commit 745678 by tstaerk:

Do not stall if a search contains the "/" folder of an imap account.
CCBUGS:153448
CCMAIL:spamgate@staerk.de


 M  +3 -0      searchjob.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=745678
Comment 3 Till Adam 2007-12-07 05:43:30 UTC
SVN commit 745806 by tilladam:

Merged revisions 745678 via svnmerge from 
svn+ssh://tilladam@svn.kde.org/home/kde/branches/KDE/3.5/kdepim

........
  r745678 | tstaerk | 2007-12-07 01:21:20 +0530 (Fri, 07 Dec 2007) | 4 lines
  
  Do not stall if a search contains the "/" folder of an imap account.
  CCBUGS:153448
  CCMAIL:spamgate@staerk.de
........


 _M            . (directory)  


WebSVN link: http://websvn.kde.org/?view=rev&revision=745806
Comment 4 Till Adam 2007-12-07 05:43:48 UTC
SVN commit 745807 by tilladam:

Merged revisions 745678 via svnmerge from 
svn+ssh://tilladam@svn.kde.org/home/kde/branches/KDE/3.5/kdepim

........
  r745678 | tstaerk | 2007-12-07 01:21:20 +0530 (Fri, 07 Dec 2007) | 4 lines
  
  Do not stall if a search contains the "/" folder of an imap account.
  CCBUGS:153448
  CCMAIL:spamgate@staerk.de
........


 M  +3 -0      searchjob.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=745807
Comment 5 Thorsten Staerk 2007-12-07 07:40:01 UTC
I want to stress out that this change allows me to 

* have a virtual folder "all e-mails"
* search within all my company e-mails
* as a result of the above, do my work

for the first time.

Next steps before setting this bug to FIXED:

* commit to trunk if needed
* see if we can improve the kioslave
Comment 6 Thorsten Staerk 2007-12-07 22:23:42 UTC
SVN commit 746103 by tstaerk:

Do not stall when searching in the "/ folder" of an imap account.
BUGS:153448


 M  +13 -10    searchjob.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=746103
Comment 7 Thorsten Staerk 2007-12-09 13:43:46 UTC
Created attachment 22427 [details]
return from the search
Comment 8 Thorsten Staerk 2007-12-09 14:11:32 UTC
Indeed the problem is that assignJobToSlave makes the kioslave stall. The job itself may even start executing, this does not block anything, it just comes back with no answer.
Comment 9 Thorsten Staerk 2007-12-09 14:12:28 UTC
I want to commit the last patch, so the search will return. Anyway, I first want to test in an enterprise-environment.
Comment 10 Thomas McGuire 2007-12-09 15:23:37 UTC
A very minor style nitpick: 
>KIO::Scheduler::assignJobToSlave(mAccount->slave(), job);
should be
>KIO::Scheduler::assignJobToSlave( mAccount->slave(), job );

This is in more places, please respect the KMail coding style a bit more.
Otherwise, thank you very much for working on these issues and especially for also porting them to trunk.

I trust that you test those patches well, so always feel free to commit.
Comment 11 Thorsten Staerk 2007-12-09 18:23:10 UTC
SVN commit 746616 by tstaerk:

kioslave does not block and mail search returns.
CCBUGS:153448


 M  +13 -8     searchjob.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=746616
Comment 12 Thorsten Staerk 2007-12-12 23:32:17 UTC
*** Bug 122621 has been marked as a duplicate of this bug. ***
Comment 13 Thorsten Staerk 2007-12-13 00:07:35 UTC
SVN commit 747792 by tstaerk:

kioslave does not block and mail search returns.
CCBUGS:153448


 M  +11 -6     searchjob.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=747792
Comment 14 Thorsten Staerk 2007-12-14 01:36:49 UTC
SVN commit 748275 by tstaerk:

kioslave no longer blocks, search returns
BUGS:153448


 M  +10 -5     searchjob.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=748275