Raw -> Smart Pointers for mupp, qt5/qt6.
This commit is contained in:
@@ -291,10 +291,10 @@ bool PParamDataHandler::ReadParamFile(const QStringList fln, QString &errorMsg)
|
||||
|
||||
// make sure that the system environment variables are properly set
|
||||
QString cmd("");
|
||||
fProc = new QProcess(this);
|
||||
connect( fProc, SIGNAL( readyReadStandardOutput() ), this, SLOT( readFromStdOut() ) );
|
||||
connect( fProc, SIGNAL( readyReadStandardError() ), this, SLOT( readFromStdErr() ) );
|
||||
connect( fProc, SIGNAL( finished(int, QProcess::ExitStatus) ), this, SLOT( processDone(int, QProcess::ExitStatus) ) );
|
||||
fProc = std::make_unique<QProcess>(this);
|
||||
connect( fProc.get(), SIGNAL( readyReadStandardOutput() ), this, SLOT( readFromStdOut() ) );
|
||||
connect( fProc.get(), SIGNAL( readyReadStandardError() ), this, SLOT( readFromStdErr() ) );
|
||||
connect( fProc.get(), SIGNAL( finished(int, QProcess::ExitStatus) ), this, SLOT( processDone(int, QProcess::ExitStatus) ) );
|
||||
|
||||
QProcessEnvironment env = QProcessEnvironment::systemEnvironment();
|
||||
#if defined(Q_OS_DARWIN)
|
||||
|
||||
@@ -30,6 +30,8 @@
|
||||
#ifndef _PMUPP_H_
|
||||
#define _PMUPP_H_
|
||||
|
||||
#include <memory>
|
||||
|
||||
#include <QObject>
|
||||
#include <QString>
|
||||
#include <QVector>
|
||||
@@ -156,7 +158,7 @@ class PParamDataHandler : public QObject {
|
||||
void newData();
|
||||
|
||||
private:
|
||||
QProcess *fProc; ///< this will be needed if msr2data needs to be called
|
||||
std::unique_ptr<QProcess> fProc; ///< this will be needed if msr2data needs to be called
|
||||
QVector<PmuppCollection> fCollection; ///< all the collections handeled
|
||||
|
||||
bool analyzeFileList(const QStringList &fln, QString &collectionName,
|
||||
|
||||
@@ -2199,7 +2199,7 @@ void PmuppGui::plot()
|
||||
}
|
||||
|
||||
// start native ROOT parameter plot application if not already running
|
||||
if (fMuppPlot == 0) { // not running yet
|
||||
if (fMuppPlot == nullptr) { // not running yet
|
||||
startMuppPlot();
|
||||
} else {
|
||||
// check if mupp_plot is still running
|
||||
|
||||
Reference in New Issue
Block a user