Fix firmware install filter

This commit is contained in:
elecpower
2022-09-06 09:29:41 +10:00
committed by Peter Feerick
parent 4f089acf65
commit 316ab766fa
2 changed files with 6 additions and 3 deletions
+4 -1
View File
@@ -64,7 +64,10 @@ bool UpdateFirmware::asyncInstall()
if (!assets->subDirectory().isEmpty())
destPath.append("/" % assets->subDirectory());
QRegularExpression filter(runParams->data.assets.at(0).copyFilter, QRegularExpression::CaseInsensitiveOption);
const UpdateParameters::AssetParams &ap = runParams->data.assets.at(0);
QString pattern(runParams->buildFilterPattern(ap.copyFilterType, ap.copyFilter));
QRegularExpression filter(pattern, QRegularExpression::CaseInsensitiveOption);
QDirIterator it(destPath);
+2 -2
View File
@@ -96,7 +96,7 @@ UpdateParameters::AssetParams & UpdateParameters::addAsset()
return data.assets[data.assets.size() - 1];
}
QString UpdateParameters::buildFilterPattern(const UpdateParameters::UpdateFilterType filterType, const QString & filter)
QString UpdateParameters::buildFilterPattern(const UpdateFilterType filterType, const QString & filter)
{
QString pattern(filter);
@@ -330,7 +330,7 @@ void UpdateInterface::progressMessage(const QString & text)
void UpdateInterface::criticalMsg(const QString & msg)
{
QMessageBox::critical(nullptr, CPN_STR_APP_NAME % ": " % tr("Update Interface"), msg);
QMessageBox::critical(nullptr, tr("Update Interface"), msg);
}
void UpdateInterface::setName(QString name)