Version 2.6
[qgit4/redivivus.git] / src / qgit.cpp
blob266a7b87bd459141a8e9f9f1464b2db12cd7476a
1 /*
2 Author: Marco Costalba (C) 2005-2007
4 Copyright: See COPYING file that comes with this distribution
6 */
7 #include <QSettings>
8 #include "common.h"
9 #include "mainimpl.h"
11 #if defined(_MSC_VER) && defined(NDEBUG)
12 #pragma comment(linker,"/entry:mainCRTStartup")
13 #pragma comment(linker,"/subsystem:windows")
14 #endif
16 using namespace QGit;
18 int main(int argc, char* argv[]) {
20 QApplication app(argc, argv);
21 QCoreApplication::setOrganizationName(ORG_KEY);
22 QCoreApplication::setApplicationName(APP_KEY);
24 /* On Windows msysgit exec directory is set up
25 * during installation so to always find git.exe
26 * also if not in PATH
28 QSettings set;
29 GIT_DIR = set.value(GIT_DIR_KEY).toString();
31 initMimePix();
33 MainImpl* mainWin = new MainImpl;
34 mainWin->show();
35 QObject::connect(&app, SIGNAL(lastWindowClosed()), &app, SLOT(quit()));
36 bool ret = app.exec();
38 freeMimePix();
39 return ret;