Mercurial > hg > easyhg
annotate common.cpp @ 57:f583e44d9d31
* Update copyrights; add debug header
author | Chris Cannam |
---|---|
date | Tue, 16 Nov 2010 13:57:30 +0000 |
parents | 5986d0758069 |
children | 68aebc316898 |
rev | line source |
---|---|
Chris@57 | 1 /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */ |
Chris@57 | 2 |
Chris@57 | 3 /* |
Chris@57 | 4 EasyMercurial |
Chris@57 | 5 |
Chris@57 | 6 Based on HgExplorer by Jari Korhonen |
Chris@57 | 7 Copyright (c) 2010 Jari Korhonen |
Chris@57 | 8 Copyright (c) 2010 Chris Cannam |
Chris@57 | 9 Copyright (c) 2010 Queen Mary, University of London |
Chris@57 | 10 |
Chris@57 | 11 This program is free software; you can redistribute it and/or |
Chris@57 | 12 modify it under the terms of the GNU General Public License as |
Chris@57 | 13 published by the Free Software Foundation; either version 2 of the |
Chris@57 | 14 License, or (at your option) any later version. See the file |
Chris@57 | 15 COPYING included with this distribution for more information. |
Chris@57 | 16 */ |
jtkorhonen@0 | 17 |
jtkorhonen@0 | 18 |
jtkorhonen@0 | 19 #include "common.h" |
jtkorhonen@0 | 20 |
jtkorhonen@0 | 21 QString getSystem() |
jtkorhonen@0 | 22 { |
jtkorhonen@0 | 23 #ifdef Q_WS_X11 |
jtkorhonen@0 | 24 return QString("Linux"); |
jtkorhonen@0 | 25 #endif |
jtkorhonen@0 | 26 |
jtkorhonen@0 | 27 #ifdef Q_WS_MAC |
jtkorhonen@0 | 28 return QString("Mac"); |
jtkorhonen@0 | 29 #endif |
jtkorhonen@0 | 30 |
jtkorhonen@0 | 31 #ifdef Q_WS_WIN |
jtkorhonen@0 | 32 return QString("Windows"); |
jtkorhonen@0 | 33 #endif |
jtkorhonen@0 | 34 |
jtkorhonen@0 | 35 return QString(""); |
jtkorhonen@0 | 36 } |
jtkorhonen@0 | 37 |
jtkorhonen@0 | 38 QString getHgBinaryName() |
jtkorhonen@0 | 39 { |
jtkorhonen@0 | 40 if (getSystem() == "Windows") |
jtkorhonen@0 | 41 return QString("hg.exe"); |
jtkorhonen@0 | 42 else |
jtkorhonen@0 | 43 return QString("hg"); |
jtkorhonen@0 | 44 } |
jtkorhonen@0 | 45 |
jtkorhonen@0 | 46 |
jtkorhonen@0 | 47 QString getHgDirName() |
jtkorhonen@0 | 48 { |
jtkorhonen@0 | 49 if (getSystem() == "Windows") |
jtkorhonen@0 | 50 { |
jtkorhonen@0 | 51 return QString(".hg\\"); |
jtkorhonen@0 | 52 } |
jtkorhonen@0 | 53 else |
jtkorhonen@0 | 54 { |
jtkorhonen@0 | 55 return QString(".hg/"); |
jtkorhonen@0 | 56 } |
jtkorhonen@0 | 57 } |
jtkorhonen@0 | 58 |
jtkorhonen@0 | 59 |
jtkorhonen@0 | 60 |
jtkorhonen@0 | 61 |
jtkorhonen@0 | 62 |
jtkorhonen@0 | 63 |