view common.cpp @ 32:4f307720272f

Version 0.5.0: Added "Copy comment" context menu to "parents" list.
author Jari Korhonen <jtkorhonen@gmail.com>
date Tue, 15 Jun 2010 03:16:40 +0300
parents 45bfb8dc1faf
children 5986d0758069
line wrap: on
line source
/****************************************************************************
** Copyright (C) Jari Korhonen, 2010 (under lgpl)
****************************************************************************/


#include "common.h"

QString getSystem()
{
    #ifdef Q_WS_X11
    return QString("Linux");
    #endif

    #ifdef Q_WS_MAC
    return QString("Mac");
    #endif

    #ifdef Q_WS_WIN
    return QString("Windows");
    #endif

    return QString("");
}

QString getHgBinaryName()
{
    if (getSystem() == "Windows")
        return QString("hg.exe");
    else
        return QString("hg");
}

QString getDiffMergeDefaultPath()
{
    if (getSystem() == "Windows")
        return QString("c:\\program files\\sourcegear\\diffmerge\\diffmerge.exe");
    else
        return QString("/usr/bin/diffmerge");
}


QString getHgDirName()
{
    if (getSystem() == "Windows")
    {
        return QString(".hg\\");
    }
    else
    {
        return QString(".hg/");
    }
}