mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-23 23:45:35 +08:00
QTBUG-53833 - which caused a console application to launch with a console if it was started with QProcess::startDetached - is fixed in 5.8.0. There were use cases for both options - with and without console - but not offered by Qt API. Therefore CProcessCtrl is refactored as a wrapper to offer both options. If no console is required, it defaults to QProcess::startDetached. Otherwise uses its own implementation. refs #866
38 lines
1.0 KiB
C++
38 lines
1.0 KiB
C++
/* 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 startDetached(const QString &program, const QStringList &arguments, bool withConsoleWindow);
|
|
};
|
|
} // ns
|
|
|
|
#endif // guard
|