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:
2785 files changed
+18754
-18316
No files matched your search
+38
-40
@@ -36,7 +36,7 @@
|
||||
|
||||
|
||||
#ifndef ELOG
|
||||
#define ELOG ERROR_LOG(m_logger)
|
||||
#define ELOG ERROR_LOG()
|
||||
#endif
|
||||
|
||||
|
||||
@@ -47,7 +47,6 @@ namespace TakeHomePackageManager
|
||||
HttpProcess::HttpProcess(ExportedScriptInformation &&esi, QObject *parent)
|
||||
: QObject(parent)
|
||||
, m_esi(esi)
|
||||
, m_logger(getLogger("ExportedScriptsDialog.HttpProcess"))
|
||||
, m_process(new ProcessOverlay)
|
||||
, m_nam(new QNetworkAccessManager(this))
|
||||
, m_timeout(new QTimer(this))
|
||||
@@ -55,7 +54,7 @@ HttpProcess::HttpProcess(ExportedScriptInformation &&esi, QObject *parent)
|
||||
connect(m_process, &ProcessOverlay::signalCancel,
|
||||
this, [this]()
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "m_wasCanceled!!";
|
||||
DEBUG_LOG() << "m_wasCanceled!!";
|
||||
m_wasCanceled = true;
|
||||
m_process->setCancelEnabled(false);
|
||||
});
|
||||
@@ -72,12 +71,12 @@ HttpProcess::HttpProcess(ExportedScriptInformation &&esi, QObject *parent)
|
||||
bool k = false;
|
||||
int _timeout = timeoutVar.toInt(&k);
|
||||
|
||||
DEBUG_LOG(m_logger) << "TPM.Timeout debug value set! k = " << k << "_timeout = " << _timeout;
|
||||
DEBUG_LOG() << "TPM.Timeout debug value set! k = " << k << "_timeout = " << _timeout;
|
||||
|
||||
if (k)
|
||||
{
|
||||
timeout = _timeout;
|
||||
DEBUG_LOG(m_logger) << "new timeout set to " << timeout;
|
||||
DEBUG_LOG() << "new timeout set to " << timeout;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -90,7 +89,7 @@ HttpProcess::HttpProcess(ExportedScriptInformation &&esi, QObject *parent)
|
||||
{
|
||||
stopTimeout();
|
||||
new LtsWidgets::LtsMessageDialogNew(qobject_cast<QWidget *>(this->parent()), tr("Timeout occured during the operation - aborted"));
|
||||
WARNING_LOG(m_logger) << "Timeout occured during the operation - aborted";
|
||||
WARNING_LOG() << "Timeout occured during the operation - aborted";
|
||||
m_isTimeout = true;
|
||||
|
||||
emit signalTimeout();
|
||||
@@ -100,7 +99,7 @@ HttpProcess::HttpProcess(ExportedScriptInformation &&esi, QObject *parent)
|
||||
|
||||
HttpProcess::~HttpProcess()
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "~HttpProcess";
|
||||
DEBUG_LOG() << "~HttpProcess";
|
||||
delete m_process;
|
||||
|
||||
}
|
||||
@@ -176,7 +175,7 @@ QNetworkReply *HttpProcess::deleteResource(const QString &path, const QUrlQuery
|
||||
|
||||
void HttpProcess::slotSuccess()
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "success";
|
||||
DEBUG_LOG() << "success";
|
||||
|
||||
stopTimeout();
|
||||
if (!m_isError && !m_wasCanceled && !m_isTimeout)
|
||||
@@ -186,7 +185,7 @@ void HttpProcess::slotSuccess()
|
||||
|
||||
void HttpProcess::slotError()
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "error";
|
||||
DEBUG_LOG() << "error";
|
||||
|
||||
stopTimeout();
|
||||
|
||||
@@ -208,7 +207,7 @@ void HttpProcess::slotError()
|
||||
|
||||
void HttpProcess::slotReadyRead()
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "readyRead";
|
||||
DEBUG_LOG() << "readyRead";
|
||||
resetTimeout();
|
||||
|
||||
QNetworkReply *r = qobject_cast<QNetworkReply *>(sender());
|
||||
@@ -355,23 +354,23 @@ UploadProcess::UploadProcess(const QString &rootFolder, ExportedScriptInformatio
|
||||
|
||||
|
||||
|
||||
DEBUG_LOG(m_logger) << "TPM.TestBigFile? " << LtsSessionData::LtsSessionData::getInstance()->debugFlagValue(QStringLiteral("TPM.TestBigFile")).toString();
|
||||
DEBUG_LOG(m_logger) << "TPM.TestBigFile check? "
|
||||
DEBUG_LOG() << "TPM.TestBigFile? " << LtsSessionData::LtsSessionData::getInstance()->debugFlagValue(QStringLiteral("TPM.TestBigFile")).toString();
|
||||
DEBUG_LOG() << "TPM.TestBigFile check? "
|
||||
<< (LtsSessionData::LtsSessionData::getInstance()->debugFlagValue(QStringLiteral("TPM.TestBigFile")) == QVariant(true));
|
||||
|
||||
#ifndef LTS_DEBUG
|
||||
if (LtsSessionData::LtsSessionData::getInstance()->debugFlagValue(QStringLiteral("TPM.TestBigFile")) == QVariant(true))
|
||||
#endif
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "TPM.TestBigFile!!";
|
||||
DEBUG_LOG() << "TPM.TestBigFile!!";
|
||||
|
||||
if (QGuiApplication::queryKeyboardModifiers() == Qt::ControlModifier)
|
||||
{
|
||||
QFile test(QStringLiteral("%1/%2/big.file").arg(ExportedScriptsDialog::getContentFolder(m_rootDir, m_esi.exerciseId), dstDir));
|
||||
DEBUG_LOG(m_logger) << ">>> BIG FILE ACTIVE ("<<test.fileName()<<")";
|
||||
DEBUG_LOG() << ">>> BIG FILE ACTIVE ("<<test.fileName()<<")";
|
||||
|
||||
bool ret = test.open(QIODevice::ReadWrite);
|
||||
DEBUG_LOG(m_logger) << "ret? " << ret;
|
||||
DEBUG_LOG() << "ret? " << ret;
|
||||
Q_ASSERT(ret);
|
||||
|
||||
|
||||
@@ -381,7 +380,7 @@ UploadProcess::UploadProcess(const QString &rootFolder, ExportedScriptInformatio
|
||||
QFile rng(QStringLiteral("/dev/urandom"));
|
||||
|
||||
ret = rng.open(QIODevice::ReadOnly);
|
||||
DEBUG_LOG(m_logger) << "ret? " << ret;
|
||||
DEBUG_LOG() << "ret? " << ret;
|
||||
Q_ASSERT(ret);
|
||||
|
||||
int times = 1024 * 1024;
|
||||
@@ -392,15 +391,15 @@ UploadProcess::UploadProcess(const QString &rootFolder, ExportedScriptInformatio
|
||||
int _times = LtsSessionData::LtsSessionData::getInstance()->debugFlagValue(bigFileSize).toInt(&k);
|
||||
|
||||
if (!k)
|
||||
DEBUG_LOG(m_logger) << "Invalid value for " << bigFileSize;
|
||||
DEBUG_LOG() << "Invalid value for " << bigFileSize;
|
||||
else
|
||||
{
|
||||
times = _times;
|
||||
DEBUG_LOG(m_logger) << "big file size was set to " << times;
|
||||
DEBUG_LOG() << "big file size was set to " << times;
|
||||
}
|
||||
}
|
||||
else
|
||||
DEBUG_LOG(m_logger) << "TPM.TestBigFile.Size not set - using default of " << times;
|
||||
DEBUG_LOG() << "TPM.TestBigFile.Size not set - using default of " << times;
|
||||
|
||||
|
||||
for (int i = 0; i < times; i++)
|
||||
@@ -412,7 +411,7 @@ UploadProcess::UploadProcess(const QString &rootFolder, ExportedScriptInformatio
|
||||
test.flush();
|
||||
|
||||
m_tempFile->setAutoRemove(false);
|
||||
DEBUG_LOG(m_logger) << "big compressed file: " << m_tempFile->fileName();
|
||||
DEBUG_LOG() << "big compressed file: " << m_tempFile->fileName();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -420,9 +419,9 @@ UploadProcess::UploadProcess(const QString &rootFolder, ExportedScriptInformatio
|
||||
connect(m_compress, &NGL::Compress::finished,
|
||||
this, &UploadProcess::compressionDone);
|
||||
|
||||
DEBUG_LOG(m_logger) << "compress called...";
|
||||
DEBUG_LOG() << "compress called...";
|
||||
m_compress->compress(m_tempFile, srcDir, dstDir);
|
||||
DEBUG_LOG(m_logger) << "...!";
|
||||
DEBUG_LOG() << "...!";
|
||||
}
|
||||
|
||||
|
||||
@@ -437,17 +436,17 @@ void UploadProcess::abortCompress()
|
||||
|
||||
void UploadProcess::compressionDone()
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "m_wasCanceled = " << m_wasCanceled << ", compress success = " << m_compress->success();
|
||||
DEBUG_LOG() << "m_wasCanceled = " << m_wasCanceled << ", compress success = " << m_compress->success();
|
||||
stopTimeout();
|
||||
|
||||
if (!m_compress->success() || m_wasCanceled)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "compression aborted";
|
||||
DEBUG_LOG() << "compression aborted";
|
||||
deleteLater();
|
||||
return;
|
||||
}
|
||||
|
||||
DEBUG_LOG(m_logger) << "okay";
|
||||
DEBUG_LOG() << "okay";
|
||||
|
||||
QUrlQuery q;
|
||||
q.addQueryItem(QStringLiteral("exerciseId"), QString::number(m_esi.exerciseId));
|
||||
@@ -456,7 +455,7 @@ void UploadProcess::compressionDone()
|
||||
q.addQueryItem(QStringLiteral("name"), m_esi.scriptName);
|
||||
|
||||
|
||||
DEBUG_LOG(m_logger) << "posting file of size " << m_tempFile->size();
|
||||
DEBUG_LOG() << "posting file of size " << m_tempFile->size();
|
||||
m_tempFile->seek(0);
|
||||
|
||||
QNetworkReply *rep = post(QStringLiteral("/thp"), m_tempFile, q);
|
||||
@@ -464,7 +463,7 @@ void UploadProcess::compressionDone()
|
||||
connect(this, &HttpProcess::signalSuccess,
|
||||
this, [this]()
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "Uploaded script successfully";
|
||||
DEBUG_LOG() << "Uploaded script successfully";
|
||||
new LtsWidgets::LtsMessageDialogNew(qobject_cast<QWidget *>(parent()), tr("Uploaded script successfully"));
|
||||
deleteLater();
|
||||
});
|
||||
@@ -613,7 +612,7 @@ void DownloadProcess::downloadFinished()
|
||||
{
|
||||
stopTimeout();
|
||||
|
||||
DEBUG_LOG(m_logger) << "m_compress->success()? " << m_compress->success() << ", m_wasCanceled? " << m_wasCanceled << ", m_isError? " << m_isError;
|
||||
DEBUG_LOG() << "m_compress->success()? " << m_compress->success() << ", m_wasCanceled? " << m_wasCanceled << ", m_isError? " << m_isError;
|
||||
if (m_compress->success() && !m_wasCanceled && !m_isError)
|
||||
{
|
||||
new LtsWidgets::LtsMessageDialogNew(qobject_cast<QWidget *>(parent()), tr("Downloaded script successfully"));
|
||||
@@ -673,7 +672,6 @@ ExportedScriptsDialog::ExportedScriptsDialog(QWidget *parent)
|
||||
, m_ui(new Ui::ExportedScriptsDialog)
|
||||
, m_session(nullptr)
|
||||
, m_fsWatcher(new QFileSystemWatcher(this))
|
||||
, m_logger(getLogger("ExportedScriptsDialog"))
|
||||
{
|
||||
m_ui->setupUi(this);
|
||||
|
||||
@@ -860,7 +858,7 @@ bool ExportedScriptsDialog::init(LtsSession::LtsSession *session)
|
||||
if (!QDir().mkpath(getContentFolder(m_exerciseId)))
|
||||
{
|
||||
QString msg(tr("Cannot create script folder at %1").arg(getContentFolder(m_exerciseId)));
|
||||
ERROR_LOG(m_logger) << msg;
|
||||
ERROR_LOG() << msg;
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -877,7 +875,7 @@ bool ExportedScriptsDialog::init(LtsSession::LtsSession *session)
|
||||
#else
|
||||
NGL::Settings *s = new NGL::Settings(NGL::findProjectConfigFile());
|
||||
const QString hostname = s->getString(QStringLiteral("TabOC"), QStringLiteral("remoteServerHostname"), QStringLiteral("exctds01"));
|
||||
WARNING_LOG(m_logger) << "Hostname used for THP: " << hostname;
|
||||
WARNING_LOG() << "Hostname used for THP: " << hostname;
|
||||
sock->open(QUrl(QStringLiteral("ws://%1:%2/thp").arg(hostname).arg(NGL::Connections::port(NGL::Connections::eConnection::FLM_THP_SERVER))));
|
||||
delete s;
|
||||
#endif
|
||||
@@ -906,7 +904,7 @@ bool ExportedScriptsDialog::init(LtsSession::LtsSession *session)
|
||||
connect(sock, &QWebSocket::disconnected,
|
||||
this, [this, sock, openFn]()
|
||||
{
|
||||
WARNING_LOG(m_logger) << "disconnected from ws... reconnecting in 3...";
|
||||
WARNING_LOG() << "disconnected from ws... reconnecting in 3...";
|
||||
setWsConnectionStatus(WsConnectionStatus::Disconnected);
|
||||
|
||||
QTimer *t = new QTimer(sock);
|
||||
@@ -927,7 +925,7 @@ bool ExportedScriptsDialog::init(LtsSession::LtsSession *session)
|
||||
connect(sock, &QWebSocket::textMessageReceived,
|
||||
this, [this](const QString &msg)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "new msg: '" << msg << "'";
|
||||
DEBUG_LOG() << "new msg: '" << msg << "'";
|
||||
m_lastServerContent = msg;
|
||||
m_model->setServerContent(msg);
|
||||
onSelectionChanged();
|
||||
@@ -940,7 +938,7 @@ bool ExportedScriptsDialog::init(LtsSession::LtsSession *session)
|
||||
|
||||
bool ExportedScriptsDialog::initModel()
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "(re)initModel !!";
|
||||
DEBUG_LOG() << "(re)initModel !!";
|
||||
|
||||
QString rootDirectory(getRootFolder());
|
||||
|
||||
@@ -1019,7 +1017,7 @@ void ExportedScriptsDialog::downloadScript()
|
||||
|
||||
if (!mi.isValid())
|
||||
{
|
||||
ERROR_LOG(m_logger) << "could not update model data after download! cover up..";
|
||||
ERROR_LOG() << "could not update model data after download! cover up..";
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1055,7 +1053,7 @@ void ExportedScriptsDialog::removeScriptFromServer()
|
||||
|
||||
if (!mi.isValid())
|
||||
{
|
||||
ERROR_LOG(m_logger) << "could not update model data after deletion! cover up..";
|
||||
ERROR_LOG() << "could not update model data after deletion! cover up..";
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1092,7 +1090,7 @@ void ExportedScriptsDialog::removeScriptLocal()
|
||||
m_buttonBox->getButton(LtsWidgets::DialogButton::Show)->setEnabled(false);
|
||||
|
||||
QString currentDirectory = QStringLiteral("%1/%2").arg(getContentFolder(esi.exerciseId), QString::number(esi.scriptId));
|
||||
DEBUG_LOG(m_logger) << "currentDirectory=" << currentDirectory;
|
||||
DEBUG_LOG() << "currentDirectory=" << currentDirectory;
|
||||
|
||||
QDir d(currentDirectory);
|
||||
if (!d.removeRecursively())
|
||||
@@ -1120,7 +1118,7 @@ void ExportedScriptsDialog::removeScriptLocal()
|
||||
if (err.error != QJsonParseError::NoError)
|
||||
{
|
||||
new LtsWidgets::LtsMessageDialogNew(this, tr("Cannot read index file"), removingScriptFailedText);
|
||||
ERROR_LOG(m_logger) << "Cannot read index file at offset" << err.offset << ": " << err.errorString();
|
||||
ERROR_LOG() << "Cannot read index file at offset" << err.offset << ": " << err.errorString();
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1147,7 +1145,7 @@ void ExportedScriptsDialog::removeScriptLocal()
|
||||
|
||||
if (scriptId == -1)
|
||||
{
|
||||
WARNING_LOG(m_logger) << "cannot find scriptId in presentations array object from data.json";
|
||||
WARNING_LOG() << "cannot find scriptId in presentations array object from data.json";
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -1194,7 +1192,7 @@ void ExportedScriptsDialog::openScript()
|
||||
args.append(QStringLiteral("-t"));
|
||||
args.append(pathToScript);
|
||||
|
||||
DEBUG_LOG(m_logger) << "pathToScript: " << pathToScript;
|
||||
DEBUG_LOG() << "pathToScript: " << pathToScript;
|
||||
|
||||
#ifndef WIN32
|
||||
QProcess().startDetached(QLatin1String("./thp_viewer"), args, QCoreApplication::applicationDirPath());
|
||||
|
||||
-2
@@ -78,7 +78,6 @@ protected:
|
||||
|
||||
ExportedScriptInformation m_esi;
|
||||
bool m_isError { false };
|
||||
NGL::INGLLogger &m_logger;
|
||||
ProcessOverlay *m_process;
|
||||
bool m_wasCanceled { false };
|
||||
bool m_isTimeout { false };
|
||||
@@ -201,6 +200,5 @@ private:
|
||||
QFileSystemWatcher *m_fsWatcher;
|
||||
QString m_lastServerContent;
|
||||
WsConnectionStatus m_wsStatus { WsConnectionStatus::NotConnected };
|
||||
NGL::INGLLogger &m_logger;
|
||||
};
|
||||
}
|
||||
Reference in new issue
Block a user