Adds immediate migration results in progress
This commit is contained in:
2102 files changed
+17482
-15071
No files matched your search
+31
-31
@@ -68,7 +68,7 @@
|
||||
#endif
|
||||
|
||||
#ifndef ELOG
|
||||
#define ELOG ERROR_LOG()
|
||||
#define ELOG ERROR_LOG(m_logger)
|
||||
#endif
|
||||
|
||||
|
||||
@@ -431,7 +431,7 @@ void USBDialog::initUsbModel()
|
||||
if (!m_usbThpModel->init(m_usbRoot))
|
||||
{
|
||||
new LtsWidgets::LtsMessageDialogNew(this, tr("The directory '%1' doesn't contain valid THP data.").arg(m_usbRoot));
|
||||
ERROR_LOG() << "cannot initialize usb thp model from usb root" << m_usbRoot;
|
||||
ERROR_LOG(m_logger) << "cannot initialize usb thp model from usb root" << m_usbRoot;
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -519,7 +519,7 @@ void USBDialog::slotChangePath()
|
||||
if (!m_usbThpModel->createDataJson(m_usbRoot, exmDtc, asmDtc, m_exerciseId))
|
||||
{
|
||||
|
||||
ERROR_LOG() << "Failed to initialize data.json";
|
||||
ERROR_LOG(m_logger) << "Failed to initialize data.json";
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -550,7 +550,7 @@ void USBDialog::slotCopyMaps()
|
||||
|
||||
if (!dstDir.exists())
|
||||
{
|
||||
ERROR_LOG() << "dst dir " << m_usbRoot << " is not accessible";
|
||||
ERROR_LOG(m_logger) << "dst dir " << m_usbRoot << " is not accessible";
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -559,7 +559,7 @@ void USBDialog::slotCopyMaps()
|
||||
return;
|
||||
|
||||
|
||||
DEBUG_LOG() << "mil.size()" << mil.size();
|
||||
DEBUG_LOG(m_logger) << "mil.size()" << mil.size();
|
||||
|
||||
|
||||
|
||||
@@ -602,13 +602,13 @@ void USBDialog::onNextMap()
|
||||
auto path = m_files.firstKey();
|
||||
{
|
||||
QString src(path);
|
||||
DEBUG_LOG() << "src" << src;
|
||||
DEBUG_LOG(m_logger) << "src" << src;
|
||||
|
||||
QDir srcDir(src);
|
||||
|
||||
if (!srcDir.exists())
|
||||
{
|
||||
ERROR_LOG() << "src dir " << src << " is not accessible";
|
||||
ERROR_LOG(m_logger) << "src dir " << src << " is not accessible";
|
||||
return;
|
||||
}
|
||||
QDir dstDir(getContentFolder(m_usbRoot) + QDir::separator() + QStringLiteral("Maps"));
|
||||
@@ -710,12 +710,12 @@ void USBDialog::generateLayerMappingXML()
|
||||
|
||||
if (!layersMapping.open(QIODevice::WriteOnly))
|
||||
{
|
||||
WARNING_LOG() << "Couldn't open save file.";
|
||||
WARNING_LOG(m_logger) << "Couldn't open save file.";
|
||||
return;
|
||||
}
|
||||
if (!layersMappingAtMaps.open(QIODevice::WriteOnly))
|
||||
{
|
||||
WARNING_LOG() << "Couldn't open save file in folder Maps.";
|
||||
WARNING_LOG(m_logger) << "Couldn't open save file in folder Maps.";
|
||||
return;
|
||||
}
|
||||
QJsonDocument doc(layers);
|
||||
@@ -763,13 +763,13 @@ void USBDialog::slotCopyWinBin()
|
||||
|
||||
if (!srcDir.exists())
|
||||
{
|
||||
ERROR_LOG() << "src dir " << src << " is not accessible";
|
||||
ERROR_LOG(m_logger) << "src dir " << src << " is not accessible";
|
||||
return;
|
||||
}
|
||||
|
||||
QFileInfoList fil;
|
||||
fil = prepareFileInfoListForFolder(src, fil);
|
||||
DEBUG_LOG() << "XXXXXXXXXXX filsize is: " << fil.size();
|
||||
DEBUG_LOG(m_logger) << "XXXXXXXXXXX filsize is: " << fil.size();
|
||||
|
||||
auto cp = new CopyProcess(srcDir, dstDir, fil, false, this);
|
||||
setOverlay(cp->process());
|
||||
@@ -804,19 +804,19 @@ void USBDialog::slotCopyWinBinP2()
|
||||
|
||||
if (initFilePath.isEmpty())
|
||||
{
|
||||
ERROR_LOG() << "sitmap init is not accessible";
|
||||
ERROR_LOG(m_logger) << "sitmap init is not accessible";
|
||||
return;
|
||||
}
|
||||
|
||||
QFileInfo fileInfo(initFilePath);
|
||||
QFileInfoList fil2;
|
||||
fil2.append(fileInfo);
|
||||
DEBUG_LOG() << "XXXXXXXXXXX sitmap is: " << fileInfo.absoluteFilePath();
|
||||
ERROR_LOG() << "XXXXXXXXXXX filsize is: " << fil2.size();
|
||||
DEBUG_LOG(m_logger) << "XXXXXXXXXXX sitmap is: " << fileInfo.absoluteFilePath();
|
||||
ERROR_LOG(m_logger) << "XXXXXXXXXXX filsize is: " << fil2.size();
|
||||
|
||||
|
||||
const QDir dstDir2(dstDir.absolutePath() + QDir::separator() + QStringLiteral("thp") + QDir::separator() + QStringLiteral("share") + QDir::separator() + QStringLiteral("LTS") + QDir::separator() + QStringLiteral("situation_Map")) ;
|
||||
DEBUG_LOG() << "XXXXXXXXXXX sitmap dst is: " << dstDir2.absolutePath();
|
||||
DEBUG_LOG(m_logger) << "XXXXXXXXXXX sitmap dst is: " << dstDir2.absolutePath();
|
||||
|
||||
auto cp2 = new CopyProcess(fileInfo.absoluteDir(), dstDir2, fil2, false, this);
|
||||
setOverlay(cp2->process());
|
||||
@@ -849,15 +849,15 @@ void USBDialog::slotCopyWinBinP3()
|
||||
const QString autorunFile = NGL::findFile(NGL::FileType::ConfigFile, QStringLiteral("autorun.inf"));
|
||||
if (autorunFile.isEmpty())
|
||||
{
|
||||
ERROR_LOG() << "autorunFile init is not accessible";
|
||||
ERROR_LOG(m_logger) << "autorunFile init is not accessible";
|
||||
return;
|
||||
}
|
||||
|
||||
QFileInfo fileInfo2(autorunFile);
|
||||
QFileInfoList fil;
|
||||
fil = prepareFileInfoListForFolder(fileInfo2.absoluteDir().path(), fil);
|
||||
DEBUG_LOG() << "XXXXXXXXXXX autofinFile is: " << fileInfo2.absoluteDir().path();
|
||||
DEBUG_LOG() << "XXXXXXXXXXX filsize is: " << fil.size();
|
||||
DEBUG_LOG(m_logger) << "XXXXXXXXXXX autofinFile is: " << fileInfo2.absoluteDir().path();
|
||||
DEBUG_LOG(m_logger) << "XXXXXXXXXXX filsize is: " << fil.size();
|
||||
|
||||
auto cp3 = new CopyProcess(fileInfo2.absoluteDir(), dstDir, fil, false, this);
|
||||
setOverlay(cp3->process());
|
||||
@@ -1206,7 +1206,7 @@ void USBDialog::scriptDeleted(int scriptId)
|
||||
const QFileInfoList fil(dir.entryInfoList());
|
||||
if (fil.isEmpty())
|
||||
{
|
||||
DEBUG_LOG() << "no scripts left";
|
||||
DEBUG_LOG(m_logger) << "no scripts left";
|
||||
|
||||
|
||||
|
||||
@@ -1220,7 +1220,7 @@ void USBDialog::scriptDeleted(int scriptId)
|
||||
}
|
||||
catch (const QString &str)
|
||||
{
|
||||
ERROR_LOG() << "ExerciseJsonHandler failed: " << str;
|
||||
ERROR_LOG(m_logger) << "ExerciseJsonHandler failed: " << str;
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1234,7 +1234,7 @@ void USBDialog::scriptDeleted(int scriptId)
|
||||
}
|
||||
catch (const QString &str)
|
||||
{
|
||||
ERROR_LOG() << "DataJsonHandler failed: " << str;
|
||||
ERROR_LOG(m_logger) << "DataJsonHandler failed: " << str;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1276,7 +1276,7 @@ void USBDialog::scriptCopied(int )
|
||||
}
|
||||
catch (const QString &str)
|
||||
{
|
||||
ERROR_LOG() << "DataJsonHandler failed: " << str;
|
||||
ERROR_LOG(m_logger) << "DataJsonHandler failed: " << str;
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1319,7 +1319,7 @@ void USBDialog::slotCopy()
|
||||
|
||||
if (!dstDir.exists())
|
||||
{
|
||||
ERROR_LOG() << "dst dir " << m_usbRoot << " is not accessible";
|
||||
ERROR_LOG(m_logger) << "dst dir " << m_usbRoot << " is not accessible";
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1327,7 +1327,7 @@ void USBDialog::slotCopy()
|
||||
|
||||
if (!dstDir.mkpath(dstDir.absolutePath()))
|
||||
{
|
||||
ERROR_LOG() << "Could not create destination path " << dstDir.absolutePath();
|
||||
ERROR_LOG(m_logger) << "Could not create destination path " << dstDir.absolutePath();
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1343,14 +1343,14 @@ void USBDialog::slotCopy()
|
||||
return;
|
||||
|
||||
QString src(getScriptFolder(esi.rootDirectory, esi.exerciseId, esi.scriptId));
|
||||
DEBUG_LOG() << "src" << src;
|
||||
DEBUG_LOG(m_logger) << "src" << src;
|
||||
|
||||
QDir srcDir(src);
|
||||
QDir bldgDir( QStringLiteral("%1/BuildingModels").arg(getContentFolder(esi.rootDirectory, esi.exerciseId)));
|
||||
|
||||
if (!srcDir.exists())
|
||||
{
|
||||
ERROR_LOG() << "src dir " << src << " is not accessible";
|
||||
ERROR_LOG(m_logger) << "src dir " << src << " is not accessible";
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1395,7 +1395,7 @@ void USBDialog::slotRemove()
|
||||
return;
|
||||
|
||||
|
||||
DEBUG_LOG() << "mil.size()" << mil.size();
|
||||
DEBUG_LOG(m_logger) << "mil.size()" << mil.size();
|
||||
|
||||
|
||||
for (const QModelIndex &idx : mil)
|
||||
@@ -1421,7 +1421,7 @@ void USBDialog::slotRemoveMaps()
|
||||
|
||||
if (!dir.exists())
|
||||
{
|
||||
ERROR_LOG() << "dir " << m_usbRoot << " is not accessible";
|
||||
ERROR_LOG(m_logger) << "dir " << m_usbRoot << " is not accessible";
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1430,12 +1430,12 @@ void USBDialog::slotRemoveMaps()
|
||||
return;
|
||||
|
||||
|
||||
DEBUG_LOG() << "mil.size()" << mil.size();
|
||||
DEBUG_LOG(m_logger) << "mil.size()" << mil.size();
|
||||
|
||||
|
||||
for (const QModelIndex &idx : mil)
|
||||
{
|
||||
DEBUG_LOG() << "rm" << idx.data().toString();
|
||||
DEBUG_LOG(m_logger) << "rm" << idx.data().toString();
|
||||
QFile::remove(dir.absolutePath() + QDir::separator() + idx.data().toString());
|
||||
}
|
||||
|
||||
@@ -1515,7 +1515,7 @@ void USBDialog::retranslate()
|
||||
|
||||
void USBDialog::initModel()
|
||||
{
|
||||
DEBUG_LOG() << "(re)initModel !!";
|
||||
DEBUG_LOG(m_logger) << "(re)initModel !!";
|
||||
|
||||
|
||||
|
||||
|
||||
+4
@@ -91,6 +91,10 @@ private slots:
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
|
||||
NGL::INGLLogger &m_logger;
|
||||
enum class What
|
||||
{
|
||||
ScriptWasDeletedFromExercise,
|
||||
|
||||
Reference in new issue
Block a user