//
//
// QPerforce is a gui interface to the perforce revision control
// system. It is based on the qt library, and should be easily portable
// across any platform that has this toolkit available.
//
// Copyright (C) 2002 Jacob Gladish
//
// TODO: find legit copyright.
//
#include "P4Process.h"
#include "BranchSpec.h"
#include "ConfigOptions.h"
#include "qperforceWindow.h"
#include "Change.h"
#include <qstring.h>
#include <qapplication.h>
static const QString ROOT_COMMAND = "p4";
P4Process::P4Process()
{
}
P4Process::~P4Process()
{
}
void P4Process::exec( const QString& args, bool forceSupressOutput )
{
#if 0
// print to status pane of configuration is set.
ConfigOptions* opts = ConfigOptions::getInstance();
if (opts->showP4Commands() && !forceSupressOutput) {
QString msg;
msg.sprintf( "<img src=\"img.exec\" height=12 width=12/> <b>Executing:</b> "
" <code>%s</code>", args.latin1() );
qperforceWindow* win = qperforceWindow::getInstance();
win->appendUserMessage( msg );
}
qDebug( "Setting wait cursor." );
QApplication::setOverrideCursor( Qt::waitCursor );
#ifdef WIN32
_win32Exec( args );
#else
// other platofrm code here.
// use QProcess if we get qt > 3.x
#endif
qDebug( "Setting arrow cursor." );
QApplication::restoreOverrideCursor();
#endif
}