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