Mercurial > hg > easyhg
annotate common.cpp @ 53:3c46b2ac45d3
* Put proper labels &c in changeset items; colour branches and users; etc
author | Chris Cannam |
---|---|
date | Fri, 12 Nov 2010 16:48:18 +0000 |
parents | 5986d0758069 |
children | f583e44d9d31 |
rev | line source |
---|---|
jtkorhonen@30 | 1 /**************************************************************************** |
jtkorhonen@30 | 2 ** Copyright (C) Jari Korhonen, 2010 (under lgpl) |
jtkorhonen@30 | 3 ****************************************************************************/ |
jtkorhonen@0 | 4 |
jtkorhonen@0 | 5 |
jtkorhonen@0 | 6 #include "common.h" |
jtkorhonen@0 | 7 |
jtkorhonen@0 | 8 QString getSystem() |
jtkorhonen@0 | 9 { |
jtkorhonen@0 | 10 #ifdef Q_WS_X11 |
jtkorhonen@0 | 11 return QString("Linux"); |
jtkorhonen@0 | 12 #endif |
jtkorhonen@0 | 13 |
jtkorhonen@0 | 14 #ifdef Q_WS_MAC |
jtkorhonen@0 | 15 return QString("Mac"); |
jtkorhonen@0 | 16 #endif |
jtkorhonen@0 | 17 |
jtkorhonen@0 | 18 #ifdef Q_WS_WIN |
jtkorhonen@0 | 19 return QString("Windows"); |
jtkorhonen@0 | 20 #endif |
jtkorhonen@0 | 21 |
jtkorhonen@0 | 22 return QString(""); |
jtkorhonen@0 | 23 } |
jtkorhonen@0 | 24 |
jtkorhonen@0 | 25 QString getHgBinaryName() |
jtkorhonen@0 | 26 { |
jtkorhonen@0 | 27 if (getSystem() == "Windows") |
jtkorhonen@0 | 28 return QString("hg.exe"); |
jtkorhonen@0 | 29 else |
jtkorhonen@0 | 30 return QString("hg"); |
jtkorhonen@0 | 31 } |
jtkorhonen@0 | 32 |
jtkorhonen@0 | 33 |
jtkorhonen@0 | 34 QString getHgDirName() |
jtkorhonen@0 | 35 { |
jtkorhonen@0 | 36 if (getSystem() == "Windows") |
jtkorhonen@0 | 37 { |
jtkorhonen@0 | 38 return QString(".hg\\"); |
jtkorhonen@0 | 39 } |
jtkorhonen@0 | 40 else |
jtkorhonen@0 | 41 { |
jtkorhonen@0 | 42 return QString(".hg/"); |
jtkorhonen@0 | 43 } |
jtkorhonen@0 | 44 } |
jtkorhonen@0 | 45 |
jtkorhonen@0 | 46 |
jtkorhonen@0 | 47 |
jtkorhonen@0 | 48 |
jtkorhonen@0 | 49 |
jtkorhonen@0 | 50 |