2
* Copyright 2013 Canonical Ltd.
4
* This library is free software; you can redistribute it and/or
5
* modify it under the terms of version 3 of the GNU Lesser General Public
6
* License as published by the Free Software Foundation.
8
* This program is distributed in the hope that it will be useful,
9
* but WITHOUT ANY WARRANTY; without even the implied warranty of
10
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11
* General Public License for more details.
13
* You should have received a copy of the GNU Lesser General Public
14
* License along with this library; if not, write to the
15
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
16
* Boston, MA 02110-1301, USA.
19
#include "fakeprocess.h"
21
#include <QTextStream>
24
namespace UpdatePlugin {
26
FakeProcess::FakeProcess(QObject *parent) :
31
void FakeProcess::start(QString command, QStringList args)
34
if(command == "click") {
35
QString path = QDir::currentPath();
36
path.append("/click.result");
38
this->m_content.clear();
40
file.open(QIODevice::ReadOnly);
41
QTextStream in(&file);
43
QString line = in.readLine();
44
this->m_content.append(line);
48
emit this->finished(0);
52
QString FakeProcess::readAllStandardOutput()
54
return this->m_content;
57
void FakeProcess::startDetached(QString command, QStringList args)