comparison common.cpp @ 0:a9098eba2ee5

Initial commit.
author Jari Korhonen <jtkorhonen@gmail.com>
date Thu, 22 Apr 2010 03:15:35 +0300
parents
children 45bfb8dc1faf
comparison
equal deleted inserted replaced
-1:000000000000 0:a9098eba2ee5
1 //** Copyright (C) Jari Korhonen, 2010 (under lgpl)
2
3
4 #include "common.h"
5
6 QString getSystem()
7 {
8 #ifdef Q_WS_X11
9 return QString("Linux");
10 #endif
11
12 #ifdef Q_WS_MAC
13 return QString("Mac");
14 #endif
15
16 #ifdef Q_WS_WIN
17 return QString("Windows");
18 #endif
19
20 return QString("");
21 }
22
23 QString getHgBinaryName()
24 {
25 if (getSystem() == "Windows")
26 return QString("hg.exe");
27 else
28 return QString("hg");
29 }
30
31 QString getDiffMergeDefaultPath()
32 {
33 if (getSystem() == "Windows")
34 return QString("c:\\program files\\sourcegear\\diffmerge\\diffmerge.exe");
35 else
36 return QString("/usr/bin/diffmerge");
37 }
38
39
40 QString getHgDirName()
41 {
42 if (getSystem() == "Windows")
43 {
44 return QString(".hg\\");
45 }
46 else
47 {
48 return QString(".hg/");
49 }
50 }
51
52
53
54
55
56