- training_area_telegrams.cpp: Fixed QJsonObject initializer syntax (Qt6 requires {{}} not ({}))
- training_area_telegrams.cpp: Fixed fromJson() methods to access m_* members directly
- training_area_telegrams.cpp: Fixed brace mismatches in multiple toJson() methods
- training_area_telegrams.h: Changed Header struct to public members for consistency
- tx_mixin.cpp: Fixed getEquipmentNumber() template for direct member access
- lts_coordinate.cpp: Added missing #include <iomanip>
- MIGRATION_STATUS.md: Added migration progress tracking document
C++17 constraint enforced due to RTI Connext DDS 7.7.0 incompatibility with C++20+
Build status: BUILD_RTI=OFF successful (0 errors, warnings only)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
63 lines
1.7 KiB
C++
Executable File
63 lines
1.7 KiB
C++
Executable File
/*
|
|
* @RDE_HEADER@
|
|
* Copy exercise from server to evaluation server
|
|
* $Id$
|
|
* $HeadURL$
|
|
* $Author$
|
|
* Created by Christian Ehrlicher, NLSE, 2018-07-31
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <QtCore/QObject>
|
|
#include <QtCore/QProcess>
|
|
|
|
#include "logger.h"
|
|
|
|
namespace OcBaseDownload
|
|
{
|
|
class CopyDatabase : public QObject
|
|
{
|
|
Q_OBJECT
|
|
public:
|
|
explicit CopyDatabase(NGL::INGLLogger &logger, QObject *parent = nullptr);
|
|
|
|
bool init(const QString &dbHost, const QString &srcDbName, const QString &dstDbName);
|
|
bool doCopy();
|
|
|
|
bool dropDatabase(const QString &dbName);
|
|
|
|
Q_SIGNALS:
|
|
void copyDbFailed();
|
|
void copyDbFinished();
|
|
void dropDatabaseFailed();
|
|
void dropDatabaseFinished();
|
|
private:
|
|
NGL::INGLLogger &m_logger;
|
|
bool runDropDb(const QString &dbName);
|
|
void onDropDbFinished(int exitCode, QProcess::ExitStatus exitStatus);
|
|
void runGrant();
|
|
bool runPgDump();
|
|
void onPgDumpFinished(int exitCode, QProcess::ExitStatus exitStatus);
|
|
void runCreatedb();
|
|
void onCreateDbFinished(int exitCode, QProcess::ExitStatus exitStatus);
|
|
void runPgLoad();
|
|
void onPgLoadFinished(int exitCode, QProcess::ExitStatus exitStatus);
|
|
void runPgSetGrant();
|
|
void onPgSetGrantFinished(int exitCode, QProcess::ExitStatus exitStatus);
|
|
QString getDumpFile() const;
|
|
|
|
void handleProcInit(const QString &program, const QStringList &args);
|
|
void handleProcFinished(int exitCode, QProcess::ExitStatus exitStatus);
|
|
void onErrorOccured(QProcess::ProcessError error);
|
|
|
|
QString executablePath(const QString &program);
|
|
private:
|
|
NGL::INGLLogger &m_logger;
|
|
QString m_dbHost;
|
|
QString m_srcDbName;
|
|
QString m_dstDbName;
|
|
QProcess *m_proc;
|
|
};
|
|
} // namespace OcBaseDownload
|