Gui: fix cppcoreguidelines-non-private-member-variables-in-classes
This commit is contained in:
@@ -55,7 +55,7 @@ DlgEditFileIncludePropertyExternal::~DlgEditFileIncludePropertyExternal()
|
||||
}
|
||||
|
||||
|
||||
int DlgEditFileIncludePropertyExternal::Do()
|
||||
int DlgEditFileIncludePropertyExternal::processFile()
|
||||
{
|
||||
QFileInfo file = QString::fromUtf8(Prop.getValue());
|
||||
assert(file.exists());
|
||||
@@ -64,11 +64,11 @@ int DlgEditFileIncludePropertyExternal::Do()
|
||||
QString TempFile = tmp.absoluteFilePath(file.fileName());
|
||||
QFile::remove(TempFile);
|
||||
|
||||
QFile::copy(file.absoluteFilePath(),TempFile);
|
||||
QFile::copy(file.absoluteFilePath(), TempFile);
|
||||
|
||||
arguments.append(TempFile);
|
||||
addArgument(TempFile);
|
||||
|
||||
int ret = DlgRunExternal::Do();
|
||||
int ret = DlgRunExternal::runProcess();
|
||||
|
||||
if (ret == QDialog::Accepted)
|
||||
Prop.setValue(TempFile.toUtf8());
|
||||
|
||||
@@ -39,13 +39,12 @@ class GuiExport DlgEditFileIncludePropertyExternal : public DlgRunExternal
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
DlgEditFileIncludePropertyExternal( App::PropertyFileIncluded& Prop, QWidget* parent = nullptr, Qt::WindowFlags fl = Qt::WindowFlags() );
|
||||
DlgEditFileIncludePropertyExternal(App::PropertyFileIncluded& Prop, QWidget* parent = nullptr, Qt::WindowFlags fl = Qt::WindowFlags());
|
||||
~DlgEditFileIncludePropertyExternal() override;
|
||||
|
||||
int Do();
|
||||
int processFile();
|
||||
|
||||
protected Q_SLOTS:
|
||||
protected:
|
||||
private:
|
||||
App::PropertyFileIncluded& Prop;
|
||||
};
|
||||
|
||||
|
||||
@@ -67,7 +67,12 @@ DlgRunExternal::~DlgRunExternal()
|
||||
delete ui;
|
||||
}
|
||||
|
||||
int DlgRunExternal::Do()
|
||||
void DlgRunExternal::addArgument(const QString& arg)
|
||||
{
|
||||
arguments.append(arg);
|
||||
}
|
||||
|
||||
int DlgRunExternal::runProcess()
|
||||
{
|
||||
QFileInfo ifo (ProcName);
|
||||
|
||||
|
||||
@@ -44,10 +44,8 @@ public:
|
||||
explicit DlgRunExternal(QWidget* parent = nullptr, Qt::WindowFlags fl = Qt::WindowFlags());
|
||||
~DlgRunExternal() override;
|
||||
|
||||
int Do();
|
||||
|
||||
QString ProcName;
|
||||
QStringList arguments;
|
||||
void addArgument(const QString&);
|
||||
int runProcess();
|
||||
|
||||
protected Q_SLOTS:
|
||||
void reject() override;
|
||||
@@ -57,11 +55,11 @@ protected Q_SLOTS:
|
||||
void finished (int exitCode, QProcess::ExitStatus exitStatus);
|
||||
void onChooseProgramClicked();
|
||||
|
||||
protected:
|
||||
private:
|
||||
QString ProcName;
|
||||
QStringList arguments;
|
||||
QProcess process;
|
||||
bool advancedHidden;
|
||||
|
||||
private:
|
||||
Ui_DlgRunExternal* ui;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user