Complete Qt6 migration: full clean build green across groups G1-G12 incl. runtime plugin set
new_docker_build.sh gains Group 12 (212 GUI/Data plugins); fixes LtsUtilsGuiDds visibility (LTO-stripped exports), LtsProjectionWorkstation unity name shadow, 6 unity-off dirs (dup file-scope statics, ddsftc INTERFACE sources) and reconfigures BUILD_FILTERMANAGEMENT/BUILD_PLUGINS_SERVICEMONITOR=ON
This commit is contained in:
1 parent
eb1d949edc
commit
815e16368e
1718 files changed
+126739
-18495
No files matched your search
@@ -33,6 +33,11 @@ NGL_WRAP_UI(msg_messaging_gui_SRCS
|
||||
)
|
||||
|
||||
NGL_ADD_LIBRARY(WS MsgMessageingGuiPlugin MODULE ${msg_messaging_gui_SRCS})
|
||||
# msg_new_message_dialog.cpp includes LtsWidgets/ui_requirement.h (a handwritten header,
|
||||
# not a UI file). Qt6's strict AUTOUIC auto-scan then demands a requirement.ui that does
|
||||
# not exist and fails the autogen step. The real .ui files are wrapped explicitly above
|
||||
# via NGL_WRAP_UI (qt6_wrap_ui), so disable the auto-scan (same approach as LtsWidgets).
|
||||
set_target_properties(MsgMessageingGuiPlugin PROPERTIES AUTOUIC OFF)
|
||||
if(QT6_GUI_AVAILABLE)
|
||||
NGL_TARGET_LINK_LIBRARIES(MsgMessageingGuiPlugin
|
||||
LtsPrinting
|
||||
|
||||
+3
-2
@@ -17,6 +17,7 @@ namespace Messaging
|
||||
|
||||
MessagingView::MessagingView(const QString &menuGroup, LtsSession::LtsSession *session, QWidget *parent)
|
||||
: LtsWidgets::LtsDialog(parent, LtsWidgets::ButtonCombination::CloseOnly)
|
||||
, m_logger(getLogger("MessagingDialog"))
|
||||
, m_menuGroup(menuGroup)
|
||||
, m_model(nullptr)
|
||||
, m_box(MessagingModel::Box::InBox)
|
||||
@@ -127,7 +128,7 @@ void MessagingView::onShowMessage()
|
||||
ShowMessageDialog *dialog = new ShowMessageDialog(m_session, this);
|
||||
dialog->init(m_dtc, m_ftc, m_opmCbxDtc, m_box, operatorMessage, m_menuGroup);
|
||||
|
||||
addDialog(dialog, m_menuGroup, QStringLiteral("msgShowMessage%1").arg(operatorMessage.id()), LtsWidgets::LayoutArea::eDialogTab);
|
||||
addDialog(dialog, m_menuGroup, QStringLiteral("msgShowMessage%1").arg(operatorMessage.id), LtsWidgets::LayoutArea::eDialogTab);
|
||||
|
||||
}
|
||||
|
||||
@@ -145,7 +146,7 @@ void MessagingView::onRemoveMessage()
|
||||
{
|
||||
m_requestHelper->startSingleRequest([this]()
|
||||
{
|
||||
return m_ftc->modifyOperatorMessageRequest(ModifyOperatorMessageRequest(m_model->getRowData(m_ui->widget->currentIndex().row()).id(), false, false, true), this);
|
||||
return m_ftc->modifyOperatorMessageRequest(ModifyOperatorMessageRequest(m_model->getRowData(m_ui->widget->currentIndex().row()).id, false, false, true), this);
|
||||
});
|
||||
|
||||
|
||||
|
||||
+11
-11
@@ -123,15 +123,15 @@ void InterfaceImpl::initializeMessaging()
|
||||
void InterfaceImpl::slotOperatorMessageChanged(const Messaging::OperatorMessage &msg, const DataModification &mod)
|
||||
{
|
||||
|
||||
if (!isMyMessage(msg.recipientId(), msg.recipientType()))
|
||||
if (!isMyMessage(msg.recipientId, msg.recipientType))
|
||||
return;
|
||||
|
||||
if (!msg.isRead() && mod == DataModification::eAdded)
|
||||
if (!msg.isRead && mod == DataModification::eAdded)
|
||||
{
|
||||
|
||||
if (!m_unreadMessages.contains(msg.id()))
|
||||
if (!m_unreadMessages.contains(msg.id))
|
||||
{
|
||||
m_unreadMessages.append(msg.id());
|
||||
m_unreadMessages.append(msg.id);
|
||||
|
||||
const QString openMessageLink(QStringLiteral("OpenMessages"));
|
||||
int msgCount = m_unreadMessages.count();
|
||||
@@ -145,8 +145,8 @@ void InterfaceImpl::slotOperatorMessageChanged(const Messaging::OperatorMessage
|
||||
}
|
||||
}
|
||||
|
||||
if ((msg.isRead() && (mod == DataModification::eModified)) || mod == DataModification::eRemoved)
|
||||
m_unreadMessages.removeAll(msg.id());
|
||||
if ((msg.isRead && (mod == DataModification::eModified)) || mod == DataModification::eRemoved)
|
||||
m_unreadMessages.removeAll(msg.id);
|
||||
|
||||
updateUnreadCount();
|
||||
}
|
||||
@@ -159,9 +159,9 @@ void InterfaceImpl::slotSpecificsEquipmentChanged(const TrainingAreaBaseOC::Spec
|
||||
if (m_session->app() == LtsAppDescriptor::App::OC)
|
||||
{
|
||||
int oldParticipantId = m_ownParticipantId;
|
||||
m_ownParticipantId = m_ppmDtc->participantIdByEquipmentNumber(data.equipmentNumber());
|
||||
m_ownParticipantId = m_ppmDtc->participantIdByEquipmentNumber(data.equipmentNumber);
|
||||
if (m_ownParticipantId <= 0)
|
||||
WARNING_LOG(m_logger) << "EquipmentNumber " << data.equipmentNumber() << " is not present in current set of PPM-participants.";
|
||||
WARNING_LOG(m_logger) << "EquipmentNumber " << data.equipmentNumber << " is not present in current set of PPM-participants.";
|
||||
|
||||
if (oldParticipantId != m_ownParticipantId)
|
||||
evaluateMessages();
|
||||
@@ -270,9 +270,9 @@ void InterfaceImpl::evaluateMessages()
|
||||
m_unreadMessages.clear();
|
||||
auto cb = [this](const Messaging::OperatorMessage & msg)
|
||||
{
|
||||
if (this->isMyMessage(msg.recipientId(), msg.recipientType())
|
||||
&& !msg.isRead())
|
||||
m_unreadMessages.append(msg.id());
|
||||
if (this->isMyMessage(msg.recipientId, msg.recipientType)
|
||||
&& !msg.isRead)
|
||||
m_unreadMessages.append(msg.id);
|
||||
};
|
||||
m_dtc->operatorMessages(cb);
|
||||
|
||||
|
||||
+18
-17
@@ -23,6 +23,7 @@ MessagingModel::MessagingModel(QObject *parent)
|
||||
tr("Subject")
|
||||
},
|
||||
parent)
|
||||
, m_logger(getLogger("MessagingModel"))
|
||||
, m_dtc(nullptr)
|
||||
, m_box(MessagingModel::Box::InBox)
|
||||
, m_operatorId(0)
|
||||
@@ -71,18 +72,18 @@ QVariant MessagingModel::data(const QModelIndex &index, int role) const
|
||||
bool setBold = false;
|
||||
if (m_box == Box::InBox)
|
||||
{
|
||||
if (!operatorMessage.isRead())
|
||||
if (!operatorMessage.isRead)
|
||||
setBold = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (m_app == LtsAppDescriptor::App::OC)
|
||||
{
|
||||
const int opMsgId = operatorMessage.id();
|
||||
const int opMsgId = operatorMessage.id;
|
||||
std::function<bool(const Messaging::OperatorMessage&)> cb = [&setBold, opMsgId] (const Messaging::OperatorMessage &message) -> bool
|
||||
{
|
||||
if (message.correspondingOutboxMessageId() == opMsgId &&
|
||||
!message.isSend())
|
||||
if (message.correspondingOutboxMessageId == opMsgId &&
|
||||
!message.isSend)
|
||||
{
|
||||
setBold = true;
|
||||
return true;
|
||||
@@ -105,19 +106,19 @@ QVariant MessagingModel::data(const QModelIndex &index, int role) const
|
||||
switch (index.column())
|
||||
{
|
||||
case MessagingModel::OperatorId:
|
||||
return operatorMessage.id();
|
||||
return operatorMessage.id;
|
||||
case MessagingModel::TimeStamp:
|
||||
return QDateTime::fromMSecsSinceEpoch(operatorMessage.timeStamp());
|
||||
return QDateTime::fromMSecsSinceEpoch(operatorMessage.timeStamp);
|
||||
case MessagingModel::SenderText:
|
||||
return QString::fromStdString(operatorMessage.senderText());
|
||||
return QString::fromStdString(operatorMessage.senderText);
|
||||
case MessagingModel::SenderType:
|
||||
return Messaging::toString(operatorMessage.senderType());
|
||||
return Messaging::toString(operatorMessage.senderType);
|
||||
case MessagingModel::RecipientText:
|
||||
return QString::fromStdString(operatorMessage.recipientText());
|
||||
return QString::fromStdString(operatorMessage.recipientText);
|
||||
case MessagingModel::RecipientType:
|
||||
return Messaging::toString(operatorMessage.recipientType());
|
||||
return Messaging::toString(operatorMessage.recipientType);
|
||||
case MessagingModel::Subject:
|
||||
return QString::fromStdString(operatorMessage.subject());
|
||||
return QString::fromStdString(operatorMessage.subject);
|
||||
}
|
||||
}
|
||||
return QVariant();
|
||||
@@ -131,12 +132,12 @@ bool MessagingModel::isFiltered(const OperatorMessage &msg, DataModification mod
|
||||
switch (m_box)
|
||||
{
|
||||
case Box::InBox:
|
||||
if (((msg.recipientType() == Messaging::AddressType::Operator) && (m_operatorId != msg.recipientId())) ||
|
||||
((msg.recipientType() == Messaging::AddressType::ObserverController) && (m_ownParticipantId != msg.recipientId())))
|
||||
if (((msg.recipientType == Messaging::AddressType::Operator) && (m_operatorId != msg.recipientId)) ||
|
||||
((msg.recipientType == Messaging::AddressType::ObserverController) && (m_ownParticipantId != msg.recipientId)))
|
||||
return true;
|
||||
break;
|
||||
case Box::OutBox:
|
||||
return (m_operatorId != msg.senderId() || msg.correspondingOutboxMessageId() > 0);
|
||||
return (m_operatorId != msg.senderId || msg.correspondingOutboxMessageId > 0);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@@ -149,9 +150,9 @@ void MessagingModel::onSpecificsEquipmentChanged(const TrainingAreaBaseOC::Speci
|
||||
if (m_app == LtsAppDescriptor::App::OC)
|
||||
{
|
||||
int oldParticipantId = m_ownParticipantId;
|
||||
m_ownParticipantId = m_ppmDtc->participantIdByEquipmentNumber(data.equipmentNumber());
|
||||
m_ownParticipantId = m_ppmDtc->participantIdByEquipmentNumber(data.equipmentNumber);
|
||||
if (m_ownParticipantId <= 0)
|
||||
WARNING_LOG(m_logger) << "EquipmentNumber " << data.equipmentNumber() << " is not present in current set of PPM-participants.";
|
||||
WARNING_LOG(m_logger) << "EquipmentNumber " << data.equipmentNumber << " is not present in current set of PPM-participants.";
|
||||
|
||||
if (oldParticipantId != m_ownParticipantId)
|
||||
reInitModel();
|
||||
@@ -188,7 +189,7 @@ bool MessagingProxyModel::lessThan(const QModelIndex &source_left, const QModelI
|
||||
switch (source_left.column())
|
||||
{
|
||||
case MessagingModel::TimeStamp:
|
||||
return dataLeft.timeStamp() < dataRight.timeStamp();
|
||||
return dataLeft.timeStamp < dataRight.timeStamp;
|
||||
case MessagingModel::OperatorId:
|
||||
case MessagingModel::SenderText:
|
||||
case MessagingModel::SenderType:
|
||||
|
||||
+32
-31
@@ -5,7 +5,7 @@
|
||||
#include <utility>
|
||||
#include "ui_msg_new_message_dialog.h"
|
||||
#include <LtsSession/lts_session_data.h>
|
||||
#include <LtsWidgets/requirement_widget.h>
|
||||
#include <LtsWidgets/ui_requirement.h>
|
||||
|
||||
namespace Messaging
|
||||
{
|
||||
@@ -92,6 +92,7 @@ NewMessageDialog::NewMessageDialog(LtsSession::LtsSession *session, QWidget *par
|
||||
, m_recipientModel(new RecipientModel(this))
|
||||
, m_requestHelper(new LtsUtils::RequestHelper(this))
|
||||
, m_session(session)
|
||||
, m_logger(getLogger("NewMessageDialog"))
|
||||
{
|
||||
INFO_LOG(m_logger) << "NewMessageDialog::Konstruktor";
|
||||
m_ui->setupUi(this);
|
||||
@@ -120,7 +121,7 @@ NewMessageDialog::NewMessageDialog(LtsSession::LtsSession *session, QWidget *par
|
||||
|
||||
m_ui->lblCharsLeft->setText(tr("Characters left: %1").arg(MAX_CHARS));
|
||||
QFontMetricsF fm(m_ui->lblCharsLeft->font());
|
||||
m_ui->lblCharsLeft->setFixedWidth(fm.width(m_ui->lblCharsLeft->text()));
|
||||
m_ui->lblCharsLeft->setFixedWidth(fm.horizontalAdvance(m_ui->lblCharsLeft->text()));
|
||||
|
||||
|
||||
connect(m_ui->addrListView, &QListView::clicked,
|
||||
@@ -174,24 +175,24 @@ bool NewMessageDialog::init(const std::shared_ptr<Messaging::Interface::Dtc> &dt
|
||||
|
||||
bool NewMessageDialog::initAnswerDialog(const Messaging::OperatorMessage &msg)
|
||||
{
|
||||
m_ui->leSubject->setText(tr("Re: %1").arg(QString::fromStdString(msg.subject())));
|
||||
if (msg.senderType() == Messaging::AddressType::ObserverController)
|
||||
m_ui->leSubject->setText(tr("Re: %1").arg(QString::fromStdString(msg.subject)));
|
||||
if (msg.senderType == Messaging::AddressType::ObserverController)
|
||||
m_ui->cbxAddrType->setChecked(true);
|
||||
fillAddressBox();
|
||||
|
||||
if (msg.senderType() == Messaging::AddressType::ObserverController)
|
||||
if (msg.senderType == Messaging::AddressType::ObserverController)
|
||||
{
|
||||
int idx = m_ui->cmbOperators->findData(0-msg.senderId());
|
||||
INFO_LOG(m_logger) << "senderId=" << 0-msg.senderId()
|
||||
int idx = m_ui->cmbOperators->findData(0-msg.senderId);
|
||||
INFO_LOG(m_logger) << "senderId=" << 0-msg.senderId
|
||||
<< " idx = " << idx;
|
||||
m_ui->cmbOperators->setCurrentIndex(idx);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (msg.correspondingOutboxMessageId() <= 0)
|
||||
if (msg.correspondingOutboxMessageId <= 0)
|
||||
return false;
|
||||
const Messaging::OperatorMessage &senderMsg = m_dtc->operatorMessage(msg.correspondingOutboxMessageId());
|
||||
int idx = m_ui->cmbOperators->findData(senderMsg.senderId());
|
||||
const Messaging::OperatorMessage &senderMsg = m_dtc->operatorMessage(msg.correspondingOutboxMessageId);
|
||||
int idx = m_ui->cmbOperators->findData(senderMsg.senderId);
|
||||
m_ui->cmbOperators->setCurrentIndex(idx);
|
||||
}
|
||||
addAddr();
|
||||
@@ -199,15 +200,15 @@ bool NewMessageDialog::initAnswerDialog(const Messaging::OperatorMessage &msg)
|
||||
const QString msgStr =
|
||||
QLatin1String("\n\n\n")
|
||||
+ QLatin1String("-----------------------------------\n")
|
||||
+ tr("from: %1").arg(QString::fromStdString(msg.senderText()))
|
||||
+ tr("from: %1").arg(QString::fromStdString(msg.senderText))
|
||||
+ QLatin1Char('\n')
|
||||
+ tr("sent: %1").arg(QDateTime::fromMSecsSinceEpoch(msg.timeStamp()).toString())
|
||||
+ tr("sent: %1").arg(QDateTime::fromMSecsSinceEpoch(msg.timeStamp).toString())
|
||||
+ QLatin1Char('\n')
|
||||
+ tr("to: %1").arg(QString::fromStdString(msg.recipientText()))
|
||||
+ tr("to: %1").arg(QString::fromStdString(msg.recipientText))
|
||||
+ QLatin1Char('\n')
|
||||
+ tr("subject: %1").arg(QString::fromStdString(msg.subject()))
|
||||
+ tr("subject: %1").arg(QString::fromStdString(msg.subject))
|
||||
+ QLatin1String("\n\n")
|
||||
+ QString::fromStdString(msg.message());
|
||||
+ QString::fromStdString(msg.message);
|
||||
|
||||
m_ui->teMessage->setText(msgStr);
|
||||
emit m_ui->teMessage->textChanged();
|
||||
@@ -239,17 +240,17 @@ bool NewMessageDialog::apply()
|
||||
CreateOperatorMessageRequest comr;
|
||||
|
||||
DEBUG_LOG(m_logger) << "request for Operators";
|
||||
comr.senderId(LtsSessionData::LtsSessionData::getInstance()->getOperatorId());
|
||||
comr.subject(subject.toStdString());
|
||||
comr.senderType(Messaging::AddressType::Operator);
|
||||
comr.message(message.toStdString());
|
||||
comr.recipientType() = Messaging::AddressType::Operator;
|
||||
comr.recipientIds().reserve(recvOperators.size());
|
||||
comr.senderId = LtsSessionData::LtsSessionData::getInstance()->getOperatorId();
|
||||
comr.subject = subject.toStdString();
|
||||
comr.senderType = Messaging::AddressType::Operator;
|
||||
comr.message = message.toStdString();
|
||||
comr.recipientType = Messaging::AddressType::Operator;
|
||||
comr.recipientIds.reserve(recvOperators.size());
|
||||
|
||||
comr.exerciseId(m_session->exerciseId());
|
||||
comr.exerciseId = m_session->exerciseId();
|
||||
for (const RecipientModel::Recipient &r : recvOperators)
|
||||
{
|
||||
comr.recipientIds().push_back(r.recipientId);
|
||||
comr.recipientIds.push_back(r.recipientId);
|
||||
DEBUG_LOG(m_logger) << "recipientId =" << r.recipientId;
|
||||
}
|
||||
m_requestHelper->addRequest([comr, this]()
|
||||
@@ -265,16 +266,16 @@ bool NewMessageDialog::apply()
|
||||
CreateOperatorMessageRequest comrOC;
|
||||
|
||||
DEBUG_LOG(m_logger) << "request for OCs";
|
||||
comrOC.senderId(LtsSessionData::LtsSessionData::getInstance()->getOperatorId());
|
||||
comrOC.subject(subject.toStdString());
|
||||
comrOC.senderType(Messaging::AddressType::Operator);
|
||||
comrOC.message(message.toStdString());
|
||||
comrOC.recipientType() = Messaging::AddressType::ObserverController;
|
||||
comrOC.recipientIds().reserve(recvOperators.size());
|
||||
comrOC.exerciseId(m_session->exerciseId());
|
||||
comrOC.senderId = LtsSessionData::LtsSessionData::getInstance()->getOperatorId();
|
||||
comrOC.subject = subject.toStdString();
|
||||
comrOC.senderType = Messaging::AddressType::Operator;
|
||||
comrOC.message = message.toStdString();
|
||||
comrOC.recipientType = Messaging::AddressType::ObserverController;
|
||||
comrOC.recipientIds.reserve(recvOperators.size());
|
||||
comrOC.exerciseId = m_session->exerciseId();
|
||||
for (const RecipientModel::Recipient &r : recvOCs)
|
||||
{
|
||||
comrOC.recipientIds().push_back(r.recipientId);
|
||||
comrOC.recipientIds.push_back(r.recipientId);
|
||||
DEBUG_LOG(m_logger) << "recipientId OC =" << r.recipientId;
|
||||
}
|
||||
m_requestHelper->addRequest([comrOC, this]()
|
||||
|
||||
+15
-14
@@ -26,6 +26,7 @@ ShowMessageDialog::ShowMessageDialog(LtsSession::LtsSession *session, QWidget *p
|
||||
, m_opmCbxDtc(nullptr)
|
||||
, m_requestHelper(new LtsUtils::RequestHelper(this))
|
||||
, m_session(session)
|
||||
, m_logger(getLogger("MessagingDialog"))
|
||||
{
|
||||
m_ui->setupUi(this);
|
||||
setUnchangeable();
|
||||
@@ -43,7 +44,7 @@ ShowMessageDialog::~ShowMessageDialog()
|
||||
|
||||
void ShowMessageDialog::retranslate()
|
||||
{
|
||||
translate(m_ui, QString::fromStdString(m_operatorMessage.subject()), false , tr("Message"));
|
||||
translate(m_ui, QString::fromStdString(m_operatorMessage.subject), false , tr("Message"));
|
||||
}
|
||||
|
||||
bool ShowMessageDialog::init(const std::shared_ptr<Interface::Dtc> &dtc,
|
||||
@@ -64,23 +65,23 @@ bool ShowMessageDialog::init(const std::shared_ptr<Interface::Dtc> &dtc,
|
||||
m_ui->time->clear();
|
||||
m_ui->msgContent->clear();
|
||||
|
||||
m_ui->from->setText(QString::fromStdString(operatorMessage.senderText()));
|
||||
m_ui->to->setText(QString::fromStdString(operatorMessage.recipientText()));
|
||||
m_ui->subject->setText(QString::fromStdString(operatorMessage.subject()));
|
||||
m_ui->from->setText(QString::fromStdString(operatorMessage.senderText));
|
||||
m_ui->to->setText(QString::fromStdString(operatorMessage.recipientText));
|
||||
m_ui->subject->setText(QString::fromStdString(operatorMessage.subject));
|
||||
|
||||
QDateTime qDateTime;
|
||||
qDateTime.setMSecsSinceEpoch(operatorMessage.timeStamp());
|
||||
qDateTime.setMSecsSinceEpoch(operatorMessage.timeStamp);
|
||||
QString time = qDateTime.toUTC().toString();
|
||||
INFO_LOG(m_logger) << " time = " << time;
|
||||
|
||||
m_ui->time->setText(time);
|
||||
m_ui->msgContent->append(QString::fromStdString(operatorMessage.message()));
|
||||
m_ui->msgContent->append(QString::fromStdString(operatorMessage.message));
|
||||
QTextCursor cursor = m_ui->msgContent->textCursor();
|
||||
cursor.setPosition(0);
|
||||
m_ui->msgContent->setTextCursor(cursor);
|
||||
|
||||
m_buttonBox->setButtonVisible(LtsWidgets::DialogButton::Add, ((operatorMessage.recipientId() > 0) && (operatorMessage.correspondingOutboxMessageId() > 0))
|
||||
|| (operatorMessage.recipientId() == Messaging::AddressType::ObserverController));
|
||||
m_buttonBox->setButtonVisible(LtsWidgets::DialogButton::Add, ((operatorMessage.recipientId > 0) && (operatorMessage.correspondingOutboxMessageId > 0))
|
||||
|| (operatorMessage.recipientId == static_cast<int>(Messaging::AddressType::ObserverController)));
|
||||
m_buttonBox->setText(LtsWidgets::DialogButton::Add, tr("Answer"));
|
||||
if (box == MessagingModel::Box::InBox)
|
||||
m_buttonBox->setButtonEnabled(LtsWidgets::DialogButton::Add, true);
|
||||
@@ -99,7 +100,7 @@ bool ShowMessageDialog::init(const std::shared_ptr<Interface::Dtc> &dtc,
|
||||
void ShowMessageDialog::showEvent(QShowEvent *e)
|
||||
{
|
||||
LtsDialog::showEvent(e);
|
||||
if (m_operatorMessage.recipientId() > 0)
|
||||
if (m_operatorMessage.recipientId > 0)
|
||||
QTimer::singleShot(200, this, &ShowMessageDialog::slotMarkMessageAsRead);
|
||||
}
|
||||
|
||||
@@ -108,16 +109,16 @@ void ShowMessageDialog::showEvent(QShowEvent *e)
|
||||
void ShowMessageDialog::slotMarkMessageAsRead()
|
||||
{
|
||||
|
||||
if (!m_operatorMessage.isRead())
|
||||
if (!m_operatorMessage.isRead)
|
||||
{
|
||||
bool isRead = true;
|
||||
bool isSend = m_operatorMessage.isSend();
|
||||
bool isSend = m_operatorMessage.isSend;
|
||||
bool isDeleted = false;
|
||||
|
||||
m_requestHelper->setCustomWaitMessage(tr("Marking message as read"));
|
||||
m_requestHelper->startSingleRequest([&]()
|
||||
{
|
||||
return m_ftc->modifyOperatorMessageRequest(ModifyOperatorMessageRequest(m_operatorMessage.id(), isRead, isSend, isDeleted), this);
|
||||
return m_ftc->modifyOperatorMessageRequest(ModifyOperatorMessageRequest(m_operatorMessage.id, isRead, isSend, isDeleted), this);
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -146,8 +147,8 @@ void ShowMessageDialog::onModifyOperatorMessageReply(const Core::FunctionReplyOb
|
||||
{
|
||||
|
||||
|
||||
if (!replyObject.error())
|
||||
m_operatorMessage.isRead(true);
|
||||
if (!replyObject.error())
|
||||
m_operatorMessage.isRead = true;
|
||||
|
||||
m_requestHelper->requestReply(replyObject);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user