• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdepimlibs API Reference
  • KDE Home
  • Contact Us
 

akonadi/kmime

  • sources
  • kde-4.14
  • kdepimlibs
  • akonadi
  • kmime
util.cpp
1 /*
2  Copyright (c) 2010 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com
3  Copyright (c) 2010 Andras Mantia <andras@kdab.com>
4 
5  This library is free software; you can redistribute it and/or
6  modify it under the terms of the GNU Lesser General Public
7  License as published by the Free Software Foundation; either
8  version 2.1 of the License, or (at your option) any later version.
9 
10  This library is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  Lesser General Public License for more details.
14 
15  You should have received a copy of the GNU Lesser General Public
16  License along with this library; if not, write to the Free Software
17  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18 */
19 
20 #include "util_p.h"
21 #include "../dbusconnectionpool.h"
22 #include "imapsettings.h"
23 #include "akonadi/servermanager.h"
24 
25 #include <assert.h>
26 #include <kio/jobclasses.h>
27 #include <KDebug>
28 #include <KIO/JobUiDelegate>
29 
30 namespace Util
31 {
33 void showJobError(KJob *job)
34 {
35  assert(job);
36  // we can be called from the KJob::kill, where we are no longer a KIO::Job
37  // so better safe than sorry
38  KIO::Job *kiojob = dynamic_cast<KIO::Job *>(job);
39  if (kiojob && kiojob->ui()) {
40  kiojob->ui()->showErrorMessage();
41  } else {
42  kWarning() << "There is no GUI delegate set for a kjob, and it failed with error:" << job->errorString();
43  }
44 }
45 
46 OrgKdeAkonadiImapSettingsInterface *createImapSettingsInterface(const QString &ident)
47 {
48  //NOTE(Andras): from kmail/util.cpp
49  return new OrgKdeAkonadiImapSettingsInterface(Akonadi::ServerManager::agentServiceName(Akonadi::ServerManager::Resource, ident),
50  QString::fromLatin1("/Settings"),
51  Akonadi::DBusConnectionPool::threadConnection());
52 }
53 
54 }
QString
QString::fromLatin1
QString fromLatin1(const char *str, int size)
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:38:24 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

akonadi/kmime

Skip menu "akonadi/kmime"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • Related Pages

kdepimlibs API Reference

Skip menu "kdepimlibs API Reference"
  • akonadi
  •   contact
  •   kmime
  •   socialutils
  • kabc
  • kalarmcal
  • kblog
  • kcal
  • kcalcore
  • kcalutils
  • kholidays
  • kimap
  • kioslave
  •   imap4
  •   mbox
  •   nntp
  • kldap
  • kmbox
  • kmime
  • kontactinterface
  • kpimidentities
  • kpimtextedit
  • kpimutils
  • kresources
  • ktnef
  • kxmlrpcclient
  • mailtransport
  • microblog
  • qgpgme
  • syndication
  •   atom
  •   rdf
  •   rss2

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal