Mercurial > hg > easyhg
comparison main.cpp @ 145:644bd31e8301
* Include the uncommitted item in general graph layout (in case it is not at the head, when other items will need to avoid it)
author | Chris Cannam |
---|---|
date | Wed, 01 Dec 2010 17:41:14 +0000 |
parents | 1928f9b408e6 |
children | edab92f3ea0b |
comparison
equal
deleted
inserted
replaced
143:f61f032b06f9 | 145:644bd31e8301 |
---|---|
13 published by the Free Software Foundation; either version 2 of the | 13 published by the Free Software Foundation; either version 2 of the |
14 License, or (at your option) any later version. See the file | 14 License, or (at your option) any later version. See the file |
15 COPYING included with this distribution for more information. | 15 COPYING included with this distribution for more information. |
16 */ | 16 */ |
17 | 17 |
18 #include <QApplication> | |
19 | |
20 #include "mainwindow.h" | 18 #include "mainwindow.h" |
21 #include "common.h" | 19 #include "common.h" |
22 #include "debug.h" | 20 #include "debug.h" |
21 | |
22 #include <QApplication> | |
23 #include <QDir> | |
23 | 24 |
24 int main(int argc, char *argv[]) | 25 int main(int argc, char *argv[]) |
25 { | 26 { |
26 QApplication::setOrganizationName("easymercurial"); | 27 QApplication::setOrganizationName("easymercurial"); |
27 QApplication::setOrganizationDomain("easymercurial.org"); | 28 QApplication::setOrganizationDomain("easymercurial.org"); |
32 loseControllingTerminal(); | 33 loseControllingTerminal(); |
33 | 34 |
34 installSignalHandlers(); | 35 installSignalHandlers(); |
35 | 36 |
36 QApplication app(argc, argv); | 37 QApplication app(argc, argv); |
38 QStringList args = app.arguments(); | |
37 MainWindow mainWin; | 39 MainWindow mainWin; |
38 mainWin.show(); | 40 mainWin.show(); |
41 | |
42 if (args.size() == 2) { | |
43 QString path = args[1]; | |
44 DEBUG << "Opening " << args[1] << endl; | |
45 if (QDir(path).exists()) { | |
46 path = QDir(path).canonicalPath(); | |
47 mainWin.open(path); | |
48 } | |
49 } | |
50 | |
39 return app.exec(); | 51 return app.exec(); |
40 } | 52 } |