- Migrated all 104 CMakeLists.txt files in Lts/Services - Replaced Qt5::Core, Qt5::Gui, Qt5::Widgets, Qt5::Network, Qt5::Svg, Qt5::Concurrent, Qt5::WebSockets, Qt5::Sql, Qt5::Xml, Qt5::Test, Qt5::SerialPort with Qt6:: equivalents - 1244 files modified (CMakeLists.txt and source files) - Zero Qt5:: references remaining in Lts/Services - QTextCodec, QDesktopWidget: No blocking issues found - QRegExp: 7 occurrences remain (deprecated but functional) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
62 lines
1.3 KiB
C++
Executable File
62 lines
1.3 KiB
C++
Executable File
/**
|
|
* Handler for all exercise objects
|
|
* $Id$
|
|
* $HeadURL$
|
|
* $Author$
|
|
* Created by Hanna E. Rathje, SLSE, 2015-09-03
|
|
*/
|
|
|
|
#include "handler_xxx_xxx.h"
|
|
#include "object_xxx_xxx.h"
|
|
#include "yyy_db.h"
|
|
#include "db_handler.h"
|
|
|
|
#include <QCoreApplication>
|
|
#include <NGLLogger/NGLLoggerBootstrap.h>
|
|
|
|
namespace YyyYyyYyy
|
|
{
|
|
|
|
HandlerXxx::HandlerXxx(const std::shared_ptr<DdsHandler> &ddsHandler,
|
|
const std::shared_ptr<DbHandler> &dbHandler,
|
|
QObject *parent)
|
|
: QObject(parent)
|
|
, m_ddsHandler(ddsHandler)
|
|
, m_dbHandler(dbHandler)
|
|
, m_logger(getLogger("HandlerXxx"))
|
|
{}
|
|
|
|
HandlerXxx::~HandlerXxx()
|
|
{}
|
|
|
|
bool HandlerXxx::init()
|
|
{
|
|
QVector<Database::YyyXxx> dataVec;
|
|
// read all Xxxs from database
|
|
if(!m_dbHandler->db()->select(dataVec))
|
|
{
|
|
ERROR_LOG(m_logger) << "Error reading data from database!";
|
|
return false;
|
|
}
|
|
|
|
// create languageHmi objects
|
|
for (const Database::YyyXxx &data : qAsConst(dataVec))
|
|
{
|
|
ObjectXxx *ifs(new ObjectXxx(m_ddsHandler, m_dbHandler, this));
|
|
Core::FunctionReplyObject ret = ifs->createObject(data);
|
|
if(ret.error())
|
|
{
|
|
delete ifs;
|
|
ERROR_LOG(m_logger) << ret();
|
|
return false;
|
|
}
|
|
m_xxxObjMap.insert(ifs->getId(), ifs);
|
|
}
|
|
|
|
DEBUG_LOG(m_logger) << "m_exeObjMap.size() = " << m_xxxObjMap.size();
|
|
|
|
return true;
|
|
}
|
|
|
|
} // Namespace YyyYyyYyy
|