Added a dcop method that takes a QString instead of a KURL so that it's

possible to use the dcop client to add messages to folders.
Note that you shouldn't use K-classes in dcop methods if you expect them
to be called using the dcop shell, as dcop doesn't link against kdecore.
Anyway, I've left the method that uses KURL in case any application is
already using it.

svn path=/trunk/kdenetwork/kmail/; revision=76277
wilder-work
Antonio Larrosa Jimenez 26 years ago
parent 0d62f85ce9
commit d82ad339f1
  1. 2
      kmailIface.h
  2. 5
      kmkernel.cpp
  3. 1
      kmkernel.h

@ -43,6 +43,8 @@ k_dcop:
// =-2, couldn't read messageFile.
// =-3, Can't allocate memory.
// =-4, Message already exists in folder.
virtual int dcopAddMessage(const QString & foldername,
const QString & messagefile) = 0;
virtual int dcopAddMessage(const QString & foldername,
const KURL & messagefile) = 0;
};

@ -150,6 +150,11 @@ void KMKernel::compactAllFolders ()
kdDebug() << "KMKernel::compactAllFolders finished" << endl;
}
int KMKernel::dcopAddMessage(const QString & foldername,const QString & msgUrlString)
{
return dcopAddMessage(foldername, KURL(msgUrlString));
}
int KMKernel::dcopAddMessage(const QString & foldername,const KURL & msgUrl)
{
int retval;

@ -45,6 +45,7 @@ public:
int addAttachment(int composerId, KURL url, QString comment);
int setBody (int composerId, QString body);
void compactAllFolders();
int dcopAddMessage(const QString & foldername, const QString & messageFile);
int dcopAddMessage(const QString & foldername, const KURL & messageFile);
// normal control stuff

Loading…
Cancel
Save