mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-02 06:35:52 +08:00
CProcessCtrl
Derives from QProcess and adds a static method to start a detached application without a console window. refs #615
This commit is contained in:
37
src/blackmisc/processctrl.h
Normal file
37
src/blackmisc/processctrl.h
Normal file
@@ -0,0 +1,37 @@
|
||||
/* Copyright (C) 2016
|
||||
* swift project Community / Contributors
|
||||
*
|
||||
* This file is part of swift project. It is subject to the license terms in the LICENSE file found in the top-level
|
||||
* directory of this distribution and at http://www.swift-project.org/license.html. No part of swift project,
|
||||
* including this file, may be copied, modified, propagated, or distributed except according to the terms
|
||||
* contained in the LICENSE file.
|
||||
*/
|
||||
|
||||
//! \file
|
||||
|
||||
#ifndef BLACKMISC_PROCESS_H
|
||||
#define BLACKMISC_PROCESS_H
|
||||
|
||||
#include "blackmiscexport.h"
|
||||
#include <QProcess>
|
||||
|
||||
namespace BlackMisc
|
||||
{
|
||||
/*!
|
||||
* Wrapper around QProcess with additional features
|
||||
*/
|
||||
class BLACKMISC_EXPORT CProcessCtrl : public QProcess
|
||||
{
|
||||
public:
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
//! Constructor.
|
||||
CProcessCtrl(QObject *parent = nullptr);
|
||||
|
||||
//! Start a programm detached and without any console window
|
||||
static bool startDetachedWithoutConsole(const QString &program, const QStringList &arguments);
|
||||
};
|
||||
} // ns
|
||||
|
||||
#endif // guard
|
||||
Reference in New Issue
Block a user