Qt6 Migration: DDS-Stubs, Logger-Fixes, Export-Header Korrekturen

- NGL_ADD_LIBRARY2: 87 CMakeLists.txt konvertiert für Export-Header Generierung
- 44 Export-Header Include-Pfade korrigiert (_export.h)
- 81 DDS-Stub-Header generiert (*_dtc.h, *_fts.h, *_dts.h, *_ftc.h)
- INGLLogger: Duplikat gelöscht, m_logger Member entfernt, variadische Makros
- Q_FUNC_INFO Redefinition behoben (Qt6 definiert bereits)
- FATAL_LOG Makro hinzugefügt
- InfrastructureManagement DDS-Stubs (ism.hpp, ism_enums.hpp, ism_ftc.h)
- FilterManagement DDS-Stubs (flt_ftc.h, flt_dts.h)
- AreaEffectSimulation DDS-Stubs (aes.hpp, aes_enums.hpp)
- SymbolAppearance Klasse vollständig definiert mit content() Methode
- BuildingComponentFilter Klasse definiert mit Copy-Konstruktor
- Ftc Factory: nullptr Return (abstract class)
- AesFilter Klasse in aes.hpp hinzugefügt
- Dtc Klasse in ppm.hpp mit participantChanged Signal
- AesType Enum: alle 15 At* Werte definiert
- AesEffectState_def: EsReceived hinzugefügt
- DataModification Enum: eAdded/eModified/eRemoved
- function_reply_object.h → core_types.h Include-Pfad (72 Dateien)
- Enum-Class-Streaming Template-Operator in INGLLogger.h
- ism_mounting_point.h: QImage → QtGui/QImage, QGuiApplication/QScreen
- ism_data_plugin_interface.h: QSet Include, Include-Reihenfolge
- QRegExp → QRegularExpression in tpm_js_parser.cpp
- .underlying() Aufrufe zu direktem Enum-Vergleich korrigiert
- Include-Pfade: aes.hpp in symbol_appearance_settings_impl.h und aes_display_filter_impl.h

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
torstenandCopilot committed 2026-08-19 06:06:24 +02:00
1 parent 010f91928a
commit b774f4035c
2785 files changed
+18754 -18316

No files matched your search

@@ -15,7 +15,7 @@ SET(nglcomp_SRCS
nglcomp_tarfilter.cpp
nglcomp_tarfilter.h
)
NGL_ADD_LIBRARY(WS nglcompression SHARED ${nglcomp_SRCS})
NGL_ADD_LIBRARY2(WS nglcompression SHARED ${nglcomp_SRCS})
NGL_TARGET_LINK_LIBRARIES(nglcompression
PUBLIC
Qt6::Core
@@ -47,9 +47,8 @@ Compress::Compress(QObject *parent)
: QObject(parent)
, m_u2_memFiles()
, m_aborted(0)
, m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger().getNGLLogger("nglcompress"))
{
DEBUG_LOG(m_logger) << "c_tor";
DEBUG_LOG() << "c_tor";
@@ -70,29 +69,29 @@ Compress::~Compress()
qWarning() << "## COMPRESS DTOR!!!!";
DEBUG_LOG(m_logger) << "~";
DEBUG_LOG() << "~";
abort();
m_future.waitForFinished();
DEBUG_LOG(m_logger) << "~ finished";
DEBUG_LOG() << "~ finished";
}
void Compress::abort()
{
DEBUG_LOG(m_logger) << "ABORT";
DEBUG_LOG() << "ABORT";
m_aborted = 1;
m_lastError = tr("Aborted");
if (m_currentTarFilter != nullptr)
{
DEBUG_LOG(m_logger) << "aborting tar";
DEBUG_LOG() << "aborting tar";
m_currentTarFilter->abort();
}
if (m_currentBzipDevice != nullptr)
{
DEBUG_LOG(m_logger) << "aborting bzip";
DEBUG_LOG() << "aborting bzip";
m_currentBzipDevice->abort();
}
}
@@ -103,7 +102,7 @@ void Compress::compress(QIODevice *out,
const QVector<FileInformations> &memFiles,
const QString &destRootDir)
{
DEBUG_LOG(m_logger) << "compress #2";
DEBUG_LOG() << "compress #2";
reset();
setupFutureWatcher(QtConcurrent::run([this, out, filesRootDir, files, memFiles, destRootDir]() {
return this->_compress(out, filesRootDir, files, memFiles, destRootDir);
@@ -112,7 +111,7 @@ void Compress::compress(QIODevice *out,
void Compress::compress(QIODevice *out, const QString &sourceDir, const QString &destRootDir)
{
DEBUG_LOG(m_logger) << "compress #1 source dir: " << sourceDir << ", destRootDir: " << destRootDir;
DEBUG_LOG() << "compress #1 source dir: " << sourceDir << ", destRootDir: " << destRootDir;
reset();
QVector<Compress::FileInformations> inFiles = directoryFileList(sourceDir, true);
@@ -125,10 +124,10 @@ void Compress::compress(QIODevice *out, const QString &sourceDir, const QString
{
fi.inputFileName = fi.inputFileName.mid(len);
fi.bAbsInputPath = false;
DEBUG_LOG(m_logger) << "fi: ifm = " << fi.inputFileName << ", abs = " << fi.bAbsInputPath;
DEBUG_LOG() << "fi: ifm = " << fi.inputFileName << ", abs = " << fi.bAbsInputPath;
}
DEBUG_LOG(m_logger) << "FI list size: " << inFiles.count();
DEBUG_LOG() << "FI list size: " << inFiles.count();
compress(out, sourceDir, inFiles, {}, destRootDir);
}
@@ -141,7 +140,7 @@ bool Compress::_compress(QIODevice *output,
{
std::shared_ptr<int> invalidatePointersOnScopeLeave(nullptr, [this](int *)
{
DEBUG_LOG(m_logger) << "invalidatePointersOnScopeLeave #1";
DEBUG_LOG() << "invalidatePointersOnScopeLeave #1";
m_currentTarFilter = nullptr;
m_currentBzipDevice = nullptr;
});
@@ -151,7 +150,7 @@ bool Compress::_compress(QIODevice *output,
if (!output || !output->isWritable())
{
m_lastError = tr("Device is not writeable");
ERROR_LOG(m_logger) << "compress failed: " << m_lastError;;
ERROR_LOG() << "compress failed: " << m_lastError;;
return false;
}
@@ -162,7 +161,7 @@ bool Compress::_compress(QIODevice *output,
const qint64 maxCount = files.count() + memFiles.count();
qint64 count = 0;
DEBUG_LOG(m_logger) << "destRootDir = " << destRootDir << ", maxCount = " << maxCount << ", count = " << count;
DEBUG_LOG() << "destRootDir = " << destRootDir << ", maxCount = " << maxCount << ", count = " << count;
BZip2IODevice bzip2(output, 9);
m_currentBzipDevice = &bzip2;
@@ -170,7 +169,7 @@ bool Compress::_compress(QIODevice *output,
if (!bzip2.open(QIODevice::WriteOnly))
{
m_lastError = bzip2.errorString();
ERROR_LOG(m_logger) << "compress failed: " << m_lastError;
ERROR_LOG() << "compress failed: " << m_lastError;
return false;
}
@@ -193,7 +192,7 @@ bool Compress::_compress(QIODevice *output,
QString currentFileName;
auto readCallback = [this, &maxCount, &count, &currentFileSize, &currentFileName, &bytesTotal](const qint64 iSize)
{
DEBUG_LOG(m_logger) << "readCallback: maxCount = " << maxCount << ", count = " << count
DEBUG_LOG() << "readCallback: maxCount = " << maxCount << ", count = " << count
<< ", currentFileSize = " << currentFileSize << ", currentFileName = " << currentFileName << ", iSize = " << iSize;
emit compressInfoEx(maxCount, count, currentFileSize, (currentFileSize - iSize), currentFileName, bytesTotal);
};
@@ -205,10 +204,10 @@ bool Compress::_compress(QIODevice *output,
QString curPath;
DEBUG_LOG(m_logger) << "prepairing tar filter";
DEBUG_LOG() << "prepairing tar filter";
for (const QString &path : paths)
{
DEBUG_LOG(m_logger) << "path = " << path;
DEBUG_LOG() << "path = " << path;
if (m_aborted) return false;
if (curPath.isEmpty())
@@ -216,14 +215,14 @@ bool Compress::_compress(QIODevice *output,
else
curPath += path + QLatin1Char('/');
DEBUG_LOG(m_logger) << "curPath = " << curPath << ", filesRootDir.isEmpty() = " << filesRootDir.isEmpty();
DEBUG_LOG() << "curPath = " << curPath << ", filesRootDir.isEmpty() = " << filesRootDir.isEmpty();
if (filesRootDir.isEmpty())
{
if (!tf.addData(curPath, QByteArray(), true))
{
m_lastError = tf.lastError();
ERROR_LOG(m_logger) << "compress failed: " << m_lastError;
ERROR_LOG() << "compress failed: " << m_lastError;
return false;
}
@@ -233,7 +232,7 @@ bool Compress::_compress(QIODevice *output,
if (!tf.addFile(filesRootDir, curPath))
{
m_lastError = tf.lastError();
ERROR_LOG(m_logger) << "compress failed: " << m_lastError;
ERROR_LOG() << "compress failed: " << m_lastError;
return false;
}
@@ -243,7 +242,7 @@ bool Compress::_compress(QIODevice *output,
m_c_sizeInfo.realSize = 0;
for (const FileInformations &file : std::as_const(files))
{
DEBUG_LOG(m_logger) << "file = " << file.inputFileName;
DEBUG_LOG() << "file = " << file.inputFileName;
emit compressInfo(maxCount, ++count, file.inputFileName);
if (m_aborted) return false;
@@ -251,7 +250,7 @@ bool Compress::_compress(QIODevice *output,
QString in = file.bAbsInputPath ? file.inputFileName : filesRootDir + QLatin1Char('/') + file.inputFileName;
QString out = destRootDir + (file.outputFileName.isEmpty() ? file.inputFileName : file.outputFileName);
DEBUG_LOG(m_logger) << "in = " << in << ", out = " << out;
DEBUG_LOG() << "in = " << in << ", out = " << out;
QFileInfo fi(in);
@@ -259,12 +258,12 @@ bool Compress::_compress(QIODevice *output,
currentFileSize = fi.size();
m_c_sizeInfo.realSize += currentFileSize;
DEBUG_LOG(m_logger) << "currentFileName = " << currentFileName << ", currentFileSize = " << currentFileSize << "m_c_sizeInfo.realSize" << m_c_sizeInfo.realSize;
DEBUG_LOG() << "currentFileName = " << currentFileName << ", currentFileSize = " << currentFileSize << "m_c_sizeInfo.realSize" << m_c_sizeInfo.realSize;
if (!tf.addFile(in, out))
{
m_lastError = tf.lastError();
ERROR_LOG(m_logger) << "compress failed: " << m_lastError;
ERROR_LOG() << "compress failed: " << m_lastError;
return false;
}
@@ -272,7 +271,7 @@ bool Compress::_compress(QIODevice *output,
for (const FileInformations &file : std::as_const(memFiles))
{
DEBUG_LOG(m_logger) << "(mem) file = " << file.inputFileName;
DEBUG_LOG() << "(mem) file = " << file.inputFileName;
emit compressInfo(maxCount, ++count, file.inputFileName);
if (m_aborted) return false;
@@ -281,48 +280,48 @@ bool Compress::_compress(QIODevice *output,
currentFileSize = file.fileData.size();
m_c_sizeInfo.compressedSize += currentFileSize;
DEBUG_LOG(m_logger) << "(mem) currentFileName = " << currentFileName << ", currentFileSize = " << currentFileSize << "m_c_sizeInfo.realSize" << m_c_sizeInfo.realSize;
DEBUG_LOG() << "(mem) currentFileName = " << currentFileName << ", currentFileSize = " << currentFileSize << "m_c_sizeInfo.realSize" << m_c_sizeInfo.realSize;
if (!tf.addData(file.inputFileName, file.fileData))
{
m_lastError = tf.lastError();
ERROR_LOG(m_logger) << "compress failed: " << m_lastError;
ERROR_LOG() << "compress failed: " << m_lastError;
return false;
}
}
DEBUG_LOG(m_logger) << "writing eos";
DEBUG_LOG() << "writing eos";
tf.writeEOS();
DEBUG_LOG(m_logger) << "closing bzip";
DEBUG_LOG() << "closing bzip";
bzip2.close();
m_c_sizeInfo.compressedSize = output->size();
DEBUG_LOG(m_logger) << "m_c_sizeInfo.compressedSize = " << m_c_sizeInfo.compressedSize;
DEBUG_LOG() << "m_c_sizeInfo.compressedSize = " << m_c_sizeInfo.compressedSize;
m_success = true;
DEBUG_LOG(m_logger) << "DONE!";
DEBUG_LOG() << "DONE!";
return true;
}
void Compress::uncompress(QIODevice *in, const QString &outDir)
{
DEBUG_LOG(m_logger) << "uncompress #1";
DEBUG_LOG() << "uncompress #1";
reset();
setupFutureWatcher(QtConcurrent::run([this, in, outDir](){ return this->_uncompressDirectory(in, outDir); }));
}
bool Compress::_uncompressDirectory(QIODevice *input, const QString &outDir)
{
DEBUG_LOG(m_logger) << "_uncompressDirectory";
DEBUG_LOG() << "_uncompressDirectory";
std::shared_ptr<int> invalidatePointersOnScopeLeave(nullptr, [this](int *)
{
DEBUG_LOG(m_logger) << "invalidatePointersOnScopeLeave #2";
DEBUG_LOG() << "invalidatePointersOnScopeLeave #2";
m_currentTarFilter = nullptr;
m_currentBzipDevice = nullptr;
});
@@ -332,7 +331,7 @@ bool Compress::_uncompressDirectory(QIODevice *input, const QString &outDir)
if (!input || !input->isReadable())
{
m_lastError = tr("Device is not readable");
ERROR_LOG(m_logger) << "compress failed: " << m_lastError;
ERROR_LOG() << "compress failed: " << m_lastError;
return false;
}
@@ -342,7 +341,7 @@ bool Compress::_uncompressDirectory(QIODevice *input, const QString &outDir)
if (!bzip2.open(QIODevice::ReadOnly))
{
m_lastError = bzip2.errorString();
ERROR_LOG(m_logger) << "compress failed: " << m_lastError;
ERROR_LOG() << "compress failed: " << m_lastError;
return false;
}
@@ -352,23 +351,23 @@ bool Compress::_uncompressDirectory(QIODevice *input, const QString &outDir)
TarFilter::FileInformations tfi;
QDir dir(outDir);
DEBUG_LOG(m_logger) << "dir = " << dir.path();
DEBUG_LOG() << "dir = " << dir.path();
while (tf.getData(tfi))
{
DEBUG_LOG(m_logger) << "tfi.fileName = " << tfi.fileName;
DEBUG_LOG() << "tfi.fileName = " << tfi.fileName;
emit uncompressInfo(input->size(), input->pos(), tfi.fileName);
if (m_aborted) return false;
QString path = outDir + QLatin1Char('/') + tfi.fileName;
DEBUG_LOG(m_logger) << "path = " << path;
DEBUG_LOG() << "path = " << path;
if (tfi.fileType == TarFilter::directory)
{
DEBUG_LOG(m_logger) << "tfi.fileType == TarFilter::directory";
DEBUG_LOG() << "tfi.fileType == TarFilter::directory";
if (!dir.exists(path) && !dir.mkpath(path))
{
m_lastError = tr("Error creating directory %1").arg(outDir);
ERROR_LOG(m_logger) << "compress failed: " << m_lastError;
ERROR_LOG() << "compress failed: " << m_lastError;
return false;
}
@@ -380,7 +379,7 @@ bool Compress::_uncompressDirectory(QIODevice *input, const QString &outDir)
if (!dir.exists(pathName) && !dir.mkpath(pathName))
{
m_lastError = tr("Error creating directory %1").arg(pathName);
ERROR_LOG(m_logger) << "compress failed: " << m_lastError;
ERROR_LOG() << "compress failed: " << m_lastError;
return false;
}
@@ -388,39 +387,39 @@ bool Compress::_uncompressDirectory(QIODevice *input, const QString &outDir)
if (!f.open(QIODevice::WriteOnly))
{
m_lastError = tr("Error opening %1 for writing (%2)").arg(path, f.errorString());
ERROR_LOG(m_logger) << "compress failed: " << m_lastError;
ERROR_LOG() << "compress failed: " << m_lastError;
return false;
}
if (!tf.getData(&f))
{
m_lastError = tf.lastError();
ERROR_LOG(m_logger) << "compress failed: " << m_lastError;
ERROR_LOG() << "compress failed: " << m_lastError;
return false;
}
}
}
DEBUG_LOG(m_logger) << "uncompress done!";
DEBUG_LOG() << "uncompress done!";
m_success = true;
return true;
}
void Compress::uncompress(QIODevice *in)
{
DEBUG_LOG(m_logger) << "uncompress #2!";
DEBUG_LOG() << "uncompress #2!";
reset();
setupFutureWatcher(QtConcurrent::run([this, in](){ return this->_uncompressBuffer(in); }));
}
bool Compress::_uncompressBuffer(QIODevice *input)
{
DEBUG_LOG(m_logger) << "uncompressBuffer";
DEBUG_LOG() << "uncompressBuffer";
std::shared_ptr<int> invalidatePointersOnScopeLeave(nullptr, [this](int *)
{
DEBUG_LOG(m_logger) << "invalidatePointersOnScopeLeave #2";
DEBUG_LOG() << "invalidatePointersOnScopeLeave #2";
m_currentTarFilter = nullptr;
m_currentBzipDevice = nullptr;
});
@@ -430,7 +429,7 @@ bool Compress::_uncompressBuffer(QIODevice *input)
if (!input->isReadable())
{
m_lastError = tr("Device is not readable");
ERROR_LOG(m_logger) << "compress failed: " << m_lastError;
ERROR_LOG() << "compress failed: " << m_lastError;
return false;
}
@@ -440,7 +439,7 @@ bool Compress::_uncompressBuffer(QIODevice *input)
if (!bzip2.open(QIODevice::ReadOnly))
{
m_lastError = bzip2.errorString();
ERROR_LOG(m_logger) << "compress failed: " << m_lastError;
ERROR_LOG() << "compress failed: " << m_lastError;
return false;
}
@@ -450,43 +449,43 @@ bool Compress::_uncompressBuffer(QIODevice *input)
TarFilter::FileInformations tfi;
while (tf.getData(tfi))
{
DEBUG_LOG(m_logger) << "tfi.fileName = " << tfi.fileName;
DEBUG_LOG() << "tfi.fileName = " << tfi.fileName;
emit uncompressInfo(input->size(), input->pos(), tfi.fileName);
if (m_aborted) return false;
FileInformations fi;
fi.outputFileName = tfi.fileName;
DEBUG_LOG(m_logger) << "fi.outputFileName = " << fi.outputFileName;
DEBUG_LOG() << "fi.outputFileName = " << fi.outputFileName;
if (tfi.fileType == TarFilter::directory)
{
fi.outputFileName += QLatin1Char('/');
DEBUG_LOG(m_logger) << "> fi.outputFileName = " << fi.outputFileName;
DEBUG_LOG() << "> fi.outputFileName = " << fi.outputFileName;
}
else
{
DEBUG_LOG(m_logger) << "stuff";
DEBUG_LOG() << "stuff";
QBuffer buf(&fi.fileData);
if (!buf.open(QIODevice::WriteOnly))
{
m_lastError = tr("Error opening buffer for writing (%1)").arg(buf.errorString());
ERROR_LOG(m_logger) << "compress failed: " << m_lastError;
ERROR_LOG() << "compress failed: " << m_lastError;
return false;
}
if (!tf.getData(&buf))
{
m_lastError = tf.lastError();
ERROR_LOG(m_logger) << "compress failed: " << m_lastError;
ERROR_LOG() << "compress failed: " << m_lastError;
return false;
}
}
fi.bAbsInputPath = fi.outputFileName.startsWith(QLatin1Char('/'));
DEBUG_LOG(m_logger) << "added fi.bAbsInputPath = " << fi.bAbsInputPath;
DEBUG_LOG() << "added fi.bAbsInputPath = " << fi.bAbsInputPath;
m_u2_memFiles += fi;
}
@@ -497,8 +496,8 @@ bool Compress::_uncompressBuffer(QIODevice *input)
bool Compress::success() const
{
ERROR_LOG(m_logger) << "success? " << (m_future.isFinished() && !m_future.isCanceled() && m_success);
ERROR_LOG(m_logger) << "success details: "
ERROR_LOG() << "success? " << (m_future.isFinished() && !m_future.isCanceled() && m_success);
ERROR_LOG() << "success details: "
<< "success m_future.isFinished() = " << (m_future.isFinished())
<< " !m_future.isCanceled() = " << !m_future.isCanceled()
<< " m_success = " << m_success;
@@ -507,22 +506,22 @@ bool Compress::success() const
bool Compress::waitForFinished()
{
DEBUG_LOG(m_logger) << "waitForFinished...";
DEBUG_LOG() << "waitForFinished...";
m_future.waitForFinished();
DEBUG_LOG(m_logger) << "waitForFinished... done!";
DEBUG_LOG() << "waitForFinished... done!";
return success();
}
QVector<Compress::FileInformations> Compress::directoryFileList(const QString &dir, bool recursive)
{
DEBUG_LOG(m_logger) << "directoryFileList";
DEBUG_LOG() << "directoryFileList";
QVector<FileInformations> sl_absolute;
QDir d(dir);
if (d.exists())
{
DEBUG_LOG(m_logger) << "exists";
DEBUG_LOG() << "exists";
const auto entries = d.entryList(QDir::Files);
sl_absolute.reserve(sl_absolute.size() + entries.size());
for (const QString &entry : entries)
@@ -531,20 +530,20 @@ QVector<Compress::FileInformations> Compress::directoryFileList(const QString &d
if (recursive)
{
DEBUG_LOG(m_logger) << "recursive";
DEBUG_LOG() << "recursive";
const auto entries = d.entryList(QDir::Dirs | QDir::NoDotAndDotDot);
sl_absolute.reserve(sl_absolute.size() + entries.size());
for (const QString &s : entries)
sl_absolute << directoryFileList(dir + QLatin1Char('/') + s, true);
}
DEBUG_LOG(m_logger) << "done";
DEBUG_LOG() << "done";
return sl_absolute;
}
void Compress::reset()
{
DEBUG_LOG(m_logger) << "reset";
DEBUG_LOG() << "reset";
m_u2_memFiles.clear();
m_lastError.clear();
@@ -557,13 +556,13 @@ void Compress::reset()
void Compress::setupFutureWatcher(const QFuture<bool> &future)
{
DEBUG_LOG(m_logger) << "setupFutureWatcher";
DEBUG_LOG() << "setupFutureWatcher";
m_future = future;
QFutureWatcher<bool> *fw = new QFutureWatcher<bool>(this);
QObject::connect(fw, &QObject::destroyed, this, [this]() { DEBUG_LOG(m_logger) << "Future Watcher destroyed"; });
QObject::connect(fw, &QObject::destroyed, this, [this]() { DEBUG_LOG() << "Future Watcher destroyed"; });
QObject::connect(fw, &QFutureWatcher<bool>::finished, this, &Compress::finished);
QObject::connect(fw, &QFutureWatcher<bool>::finished, fw, &QObject::deleteLater);
QObject::connect(fw, &QFutureWatcher<bool>::finished, fw, [this]() { DEBUG_LOG(m_logger) << "Future Watcher about to be deleted"; });
QObject::connect(fw, &QFutureWatcher<bool>::finished, fw, [this]() { DEBUG_LOG() << "Future Watcher about to be deleted"; });
fw->setFuture(m_future);
}
@@ -2,7 +2,7 @@
#pragma once
#include "nglcomp_export.h"
#include "nglcompression_export.h"
#include <NGLLogger/INGLLogger.h>
@@ -133,7 +133,6 @@ private:
QFuture<bool> m_future;
bool m_success { false };
NGL::INGLLogger &m_logger;
};
}
Q_DECLARE_TYPEINFO(NGL::Compress::FileInformations, Q_MOVABLE_TYPE);