[prev in list] [next in list] [prev in thread] [next in thread]
List: kmail-devel
Subject: Re: [Bug 30707] Support for namespaces
From: Mario Teijeiro Otero <emeteo () escomposlinux ! org>
Date: 2005-05-12 12:50:41
Message-ID: 200505121450.46235.emeteo () escomposlinux ! org
[Download RAW message or body]
[Attachment #2 (multipart/signed)]
[Attachment #4 (multipart/mixed)]
On Thursday 12 May 2005 12:37, Mario Teijeiro Otero wrote:
> I just found another bug.
>
> Normally I made a imap accout for the user cyrus. BTW I can administer the
> folders, persmissions etc.
>
> With namespaces patch, I can't see the folders in the server. The
> debug output say:
> kmail: slotListNamespaces
> kmail: 0 namespaces fetched
> kmail: slotSaveNamespaces cyrus
>
> And no folders are listed.
Attached go the patch. It consists of ListJob( ......, "/") if the list of
Namespaces is empty.
Regards.
["without_ns.diff" (text/x-diff)]
Index: kmfolderimap.cpp
===================================================================
--- kmfolderimap.cpp (revisiĆ³n: 412531)
+++ kmfolderimap.cpp (copia de trabajo)
@@ -576,22 +576,25 @@
ImapAccountBase::nsMap map = mAccount->namespaces();
QStringList personal = map[ImapAccountBase::PersonalNS];
+ bool hasSomeNS=false;
// start personal namespace listing and send it directly to slotListResult
for ( QStringList::Iterator it = personal.begin(); it != personal.end(); ++it )
{
+ hasSomeNS=true;
ListJob* job = new ListJob( mAccount, type, this, mAccount->addPathToNamespace( *it ) );
connect( job, SIGNAL(receivedFolders(const QStringList&, const QStringList&,
const QStringList&, const QStringList&, const ImapAccountBase::jobData&)),
this, SLOT(slotListResult(const QStringList&, const QStringList&,
const QStringList&, const QStringList&, const ImapAccountBase::jobData&)));
job->start();
- }
+ }
// and now we list all other namespaces and check them ourself
QStringList ns = map[ImapAccountBase::OtherUsersNS];
ns += map[ImapAccountBase::SharedNS];
for ( QStringList::Iterator it = ns.begin(); it != ns.end(); ++it )
{
+ hasSomeNS=true;
ListJob* job = new ListJob( mAccount, type, this, mAccount->addPathToNamespace( *it ) );
connect( job, SIGNAL(receivedFolders(const QStringList&, const QStringList&,
const QStringList&, const QStringList&, const ImapAccountBase::jobData&)),
@@ -599,6 +602,18 @@
const QStringList&, const QStringList&, const ImapAccountBase::jobData&)));
job->start();
}
+ if ( !hasSomeNS )
+ {
+ kdDebug( 5006 )<<"Server has not any namespace, requesting \"/\" "<< endl;
+ ListJob* job = new ListJob( mAccount, type, this, "/" );
+ connect( job, SIGNAL(receivedFolders(const QStringList&, const QStringList&,
+ const QStringList&, const QStringList&, const ImapAccountBase::jobData&)),
+ this, SLOT(slotListResult(const QStringList&, const QStringList&,
+ const QStringList&, const QStringList&, const ImapAccountBase::jobData&)));
+
+ job->start();
+ }
+
}
//-----------------------------------------------------------------------------
[Attachment #8 (application/pgp-signature)]
_______________________________________________
KMail developers mailing list
KMail-devel@kde.org
https://mail.kde.org/mailman/listinfo/kmail-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic