Fix crash if key bindings specified in profile cannot be found. Improve
[personal-kdebase.git] / apps / kfind / main.cpp
blob60856d01cc786470e6dadf53a95ddec15e4310d4
1 #include <QtCore/QDir>
2 #include <QtCore/QFile>
4 #include <kapplication.h>
5 #include <klocale.h>
6 #include <kcmdlineargs.h>
7 #include <kaboutdata.h>
9 #include "kfinddlg.h"
10 #include "version.h"
12 static const char description[] = I18N_NOOP("KDE file find utility");
14 int main( int argc, char ** argv )
16 KAboutData aboutData( "kfind", "kfindpart", ki18n("KFind"),
17 KFIND_VERSION, ki18n(description), KAboutData::License_GPL,
18 ki18n("(c) 1998-2003, The KDE Developers"));
20 aboutData.addAuthor(ki18n("Eric Coquelle"), ki18n("Current Maintainer"), "coquelle@caramail.com");
21 aboutData.addAuthor(ki18n("Mark W. Webb"), ki18n("Developer"), "markwebb@adelphia.net");
22 aboutData.addAuthor(ki18n("Beppe Grimaldi"), ki18n("UI Design & more search options"), "grimalkin@ciaoweb.it");
23 aboutData.addAuthor(ki18n("Martin Hartig"));
24 aboutData.addAuthor(ki18n("Stephan Kulow"), KLocalizedString(), "coolo@kde.org");
25 aboutData.addAuthor(ki18n("Mario Weilguni"),KLocalizedString(), "mweilguni@sime.com");
26 aboutData.addAuthor(ki18n("Alex Zepeda"),KLocalizedString(), "zipzippy@sonic.net");
27 aboutData.addAuthor(ki18n("Miroslav FlĂ­dr"),KLocalizedString(), "flidr@kky.zcu.cz");
28 aboutData.addAuthor(ki18n("Harri Porten"),KLocalizedString(), "porten@kde.org");
29 aboutData.addAuthor(ki18n("Dima Rogozin"),KLocalizedString(), "dima@mercury.co.il");
30 aboutData.addAuthor(ki18n("Carsten Pfeiffer"),KLocalizedString(), "pfeiffer@kde.org");
31 aboutData.addAuthor(ki18n("Hans Petter Bieker"), KLocalizedString(), "bieker@kde.org");
32 aboutData.addAuthor(ki18n("Waldo Bastian"), ki18n("UI Design"), "bastian@kde.org");
33 aboutData.addAuthor(ki18n("Alexander Neundorf"), KLocalizedString(), "neundorf@kde.org");
34 aboutData.addAuthor(ki18n("Clarence Dang"), KLocalizedString(), "dang@kde.org");
36 KCmdLineArgs::init( argc, argv, &aboutData );
38 KCmdLineOptions options;
39 options.add("+[searchpath]", ki18n("Path(s) to search"));
40 KCmdLineArgs::addCmdLineOptions( options );
42 KApplication app;
44 KCmdLineArgs *args= KCmdLineArgs::parsedArgs();
46 KUrl url;
47 if (args->count() > 0)
48 url = args->url(0);
49 if (url.isEmpty())
50 url = QDir::currentPath();
51 if (url.isEmpty())
52 url = QDir::homePath();
53 args->clear();
55 KfindDlg kfinddlg(url);
56 return kfinddlg.exec();