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

kmail

  • sources
  • kde-4.12
  • kdepim
  • kmail
kmstartup.cpp
Go to the documentation of this file.
1 /*
2  This file is part of KMail, the KDE mail client.
3  Copyright (c) 2000 Don Sanders <sanders@kde.org>
4 
5  KMail is free software; you can redistribute it and/or modify it
6  under the terms of the GNU General Public License, version 2, as
7  published by the Free Software Foundation.
8 
9  KMail is distributed in the hope that it will be useful, but
10  WITHOUT ANY WARRANTY; without even the implied warranty of
11  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12  General Public License for more details.
13 
14  You should have received a copy of the GNU General Public License
15  along with this program; if not, write to the Free Software
16  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
17 */
18 
19 
20 #include "kmstartup.h"
21 
22 #include "kmkernel.h" //control center
23 
24 #include <klocale.h>
25 #include <kstandarddirs.h>
26 #include <kglobal.h>
27 #include <kaboutdata.h>
28 #include <kiconloader.h>
29 
30 #undef Status // stupid X headers
31 
32 namespace KMail {
33 
34 void checkConfigUpdates() {
35  static const char * const updates[] = {
36  "9",
37  "3.1-update-identities",
38  "3.1-use-identity-uoids",
39  "3.1-new-mail-notification",
40  "3.2-update-loop-on-goto-unread-settings",
41  "3.1.4-dont-use-UOID-0-for-any-identity", //krazy:exclude=spelling
42  "3.2-misc",
43  "3.2-moves",
44  "3.3-use-ID-for-accounts",
45  "3.3-update-filter-rules",
46  "3.3-move-identities-to-own-file",
47  "3.3-aegypten-kpgprc-to-kmailrc",
48  "3.3-aegypten-kpgprc-to-libkleopatrarc",
49  "3.3-aegypten-emailidentities-split-sign-encr-keys",
50  "3.3-misc",
51  "3.3b1-misc",
52  "3.4-misc",
53  "3.4a",
54  "3.4b",
55  "3.4.1",
56  "3.5.4",
57  "3.5.7-imap-flag-migration",
58  "4.0-misc",
59  "4.2",
60  "4.4-akonadi",
61  "4.12"
62  };
63  static const int numUpdates = sizeof updates / sizeof *updates;
64  // Warning: do not remove entries in the above array, or the update-level check below will break
65 
66  KSharedConfig::Ptr config = KMKernel::self()->config();
67  const int configUpdateLevel = GlobalSettings::self()->updateLevel();
68  if ( configUpdateLevel == numUpdates ) // Optimize for the common case that everything is OK
69  return;
70 
71  for ( int i = configUpdateLevel ; i < numUpdates ; ++i ) {
72  config->checkUpdate( QLatin1String(updates[i]), QLatin1String("kmail.upd") );
73  }
74  GlobalSettings::self()->setUpdateLevel( numUpdates );
75 }
76 
77 void insertLibraryCataloguesAndIcons() {
78  static const char * const catalogs[] = {
79  "libkdepim",
80  "libksieve",
81  "libkleopatra",
82  "libkpgp",
83  "libkmime",
84  "libmessagelist",
85  "libmessageviewer",
86  "libmessagecore",
87  "libmessagecomposer",
88  "libpimcommon",
89  "libmailcommon",
90  "libtemplateparser",
91  "libakonadi_next",
92  "libakonadi-kde",
93  "libakonadi-kmime",
94  "libkpimtextedit",
95  "libkpimutils",
96  "akonadicontact",
97  "kabc",
98  "akonadi_sendlater_agent",
99  "akonadi_folderagent_agent"
100  };
101 
102  KLocale * l = KGlobal::locale();
103  KIconLoader * il = KIconLoader::global();
104  for ( unsigned int i = 0 ; i < sizeof catalogs / sizeof *catalogs ; ++i ) {
105  l->insertCatalog( QLatin1String(catalogs[i]) );
106  il->addAppDir( QLatin1String(catalogs[i]) );
107  }
108 
109 }
110 
111 }
KMKernel::self
static KMKernel * self()
normal control stuff
Definition: kmkernel.cpp:1451
KMKernel::config
KSharedConfig::Ptr config()
Definition: kmkernel.cpp:1456
GlobalSettings::self
static GlobalSettings * self()
Definition: globalsettings.cpp:30
kmkernel.h
kmstartup.h
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:58:52 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

kmail

Skip menu "kmail"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members

kdepim API Reference

Skip menu "kdepim API Reference"
  • akonadi_next
  • akregator
  • blogilo
  • calendarsupport
  • console
  •   kabcclient
  •   konsolekalendar
  • kaddressbook
  • kalarm
  •   lib
  • kdgantt2
  • kjots
  • kleopatra
  • kmail
  • knode
  • knotes
  • kontact
  • korgac
  • korganizer
  • ktimetracker
  • libkdepim
  • libkleo
  • libkpgp
  • mailcommon
  • messagelist
  • messageviewer

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