diff options
Diffstat (limited to 'src/libs')
-rw-r--r-- | src/libs/utils/abstractprocess.cpp | 75 | ||||
-rw-r--r-- | src/libs/utils/abstractprocess.h | 14 | ||||
-rw-r--r-- | src/libs/utils/utils-lib.pri | 1 |
3 files changed, 84 insertions, 6 deletions
diff --git a/src/libs/utils/abstractprocess.cpp b/src/libs/utils/abstractprocess.cpp new file mode 100644 index 0000000000..dadae6826a --- /dev/null +++ b/src/libs/utils/abstractprocess.cpp @@ -0,0 +1,75 @@ +/************************************************************************** +** +** This file is part of Qt Creator +** +** Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies). +** +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** No Commercial Usage +** +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +**************************************************************************/ + +#include "abstractprocess.h" + +#include <QtCore/QCoreApplication> + +namespace Utils { + +AbstractProcess::AbstractProcess() +{ +} + +AbstractProcess::~AbstractProcess() +{ +} + +QString AbstractProcess::workingDirectory() const +{ + return m_workingDir; +} + +void AbstractProcess::setWorkingDirectory(const QString &dir) +{ + m_workingDir = dir; +} + +void AbstractProcess::setEnvironment(const Environment &env) +{ + m_environment = env; +} + +Environment AbstractProcess::environment() const +{ + return m_environment; +} + +QString AbstractProcess::msgWinCannotRetrieveDebuggingOutput() +{ + return QCoreApplication::translate("Utils::AbstractProcess", "Cannot retrieve debugging output."); +} + +} // namespace Utils + + diff --git a/src/libs/utils/abstractprocess.h b/src/libs/utils/abstractprocess.h index 36e30adf92..499ddd6db5 100644 --- a/src/libs/utils/abstractprocess.h +++ b/src/libs/utils/abstractprocess.h @@ -45,14 +45,14 @@ namespace Utils { class QTCREATOR_UTILS_EXPORT AbstractProcess { public: - AbstractProcess() {} - virtual ~AbstractProcess() {} + AbstractProcess(); + virtual ~AbstractProcess(); - QString workingDirectory() const { return m_workingDir; } - void setWorkingDirectory(const QString &dir) { m_workingDir = dir; } + QString workingDirectory() const; + void setWorkingDirectory(const QString &dir); - void setEnvironment(const Environment &env) { m_environment = env; } - Environment environment() const { return m_environment; } + void setEnvironment(const Environment &env); + Environment environment() const; virtual bool start(const QString &program, const QString &args) = 0; virtual void stop() = 0; @@ -61,6 +61,8 @@ public: virtual qint64 applicationPID() const = 0; virtual int exitCode() const = 0; + static QString msgWinCannotRetrieveDebuggingOutput(); + //signals: virtual void processMessage(const QString &error, bool isError) = 0; diff --git a/src/libs/utils/utils-lib.pri b/src/libs/utils/utils-lib.pri index 00041b7818..00106c8b4e 100644 --- a/src/libs/utils/utils-lib.pri +++ b/src/libs/utils/utils-lib.pri @@ -10,6 +10,7 @@ QT += network SOURCES += $$PWD/environment.cpp \ $$PWD/environmentmodel.cpp \ $$PWD/qtcprocess.cpp \ + $$PWD/abstractprocess.cpp \ $$PWD/reloadpromptutils.cpp \ $$PWD/stringutils.cpp \ $$PWD/filesearch.cpp \ |