2 This file is part of KOrganizer.
4 Copyright (c) 1997-1999 Preston Brown <pbrown@kde.org>
5 Copyright (c) 2001,2003 Cornelius Schumacher <schumacher@kde.org>
7 This program is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 2 of the License, or
10 (at your option) any later version.
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with this program; if not, write to the Free Software
19 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
21 As a special exception, permission is given to link this program
22 with any edition of Qt, and distribute the resulting executable,
23 without including the source code for Qt in the source distribution.
27 #include "aboutdata.h"
29 #include <akonadi/control.h>
32 #include <kaboutdata.h>
33 #include <kcmdlineargs.h>
36 #include "korganizer.h"
37 #include "korganizer_options.h"
39 int main ( int argc
, char **argv
)
41 KOrg::AboutData aboutData
;
43 KCmdLineArgs::init( argc
, argv
, &aboutData
);
44 KCmdLineArgs::addCmdLineOptions( korganizer_options() );
45 KUniqueApplication::addCmdLineOptions();
47 KUniqueApplication::StartFlags flags
;
48 //flags |= KUniqueApplication::NonUniqueInstance;
49 if ( !KOrganizerApp::start(flags
) ) {
55 KGlobal::locale()->insertCatalog( "libkcal" );
56 KGlobal::locale()->insertCatalog( "libkdepim" );
57 KGlobal::locale()->insertCatalog( "kdgantt1" );
58 KGlobal::locale()->insertCatalog( "libkresources" );
60 if ( app
.isSessionRestored() ) {
64 if ( !Akonadi::Control::start() ) {
65 //TODO: add message box after string freeze
66 kWarning() << "Unable to start Akonadi server, exit application";