From 501b84b13a05f560bd63bec79bf6973896139c27 Mon Sep 17 00:00:00 2001 From: semenov Date: Mon, 4 Aug 2025 09:23:03 +0300 Subject: [PATCH] feat: change message and contac list attribute --- DOCS/Алексей/Board.md | 6 +-- DataBaseLMS/CMakeLists.txt | 1 + DataBaseLMS/contactModel.h | 52 +++++++++++++++++++ .../connectorToServer/Core/dataparser.cpp | 9 ++-- .../connectorToServer/Core/dataparser.h | 2 +- .../Core/recognizesystem.cpp | 7 ++- .../connectorToServer/Core/recognizesystem.h | 2 +- .../connectorToServer/Datas.h | 9 ++++ .../connectorToServer/connectortoserver.cpp | 12 ++--- .../connectorToServer/connectortoserver.h | 6 +-- .../instructorsandtraineeswidget.cpp | 2 + .../messanger/messangerwidget.cpp | 9 ++-- .../messanger/messangerwidget.h | 4 +- ServerLMS/CMakeLists.txt | 1 + ServerLMS/Data/typesDataServerClient.h | 10 +++- ServerLMS/Data/userType.h | 9 ++++ .../Systems/Parsers/clientanswerparser.cpp | 4 +- .../Systems/Parsers/clientanswerparser.h | 2 +- ServerLMS/Systems/Parsers/dbanswerparser.cpp | 6 ++- ServerLMS/Systems/Parsers/dbanswerparser.h | 3 +- ServerLMS/Systems/Parsers/processparser.cpp | 2 + ServerLMS/Systems/chatsystem.cpp | 6 +-- ServerLMS/Systems/processingsystem.cpp | 8 +-- ServerLMS/Systems/sendsystem.h | 2 +- ServerLMS/serverlmswidget.cpp | 1 + 25 files changed, 134 insertions(+), 41 deletions(-) create mode 100644 DataBaseLMS/contactModel.h create mode 100644 ServerLMS/Data/userType.h diff --git a/DOCS/Алексей/Board.md b/DOCS/Алексей/Board.md index 3422d5a..cdee597 100644 --- a/DOCS/Алексей/Board.md +++ b/DOCS/Алексей/Board.md @@ -20,8 +20,6 @@ kanban-plugin: board ## feature client Unity -- [ ] Добавить обновление инструктора, если он перелогинился -- [ ] FIM проверять на null задачу - [ ] Если staticData не найдена, грузится как оффлайн, проверять просто иконки билда - [ ] Делить по группам номер группы - [ ] добавить тестово логины в строку контактов @@ -40,7 +38,6 @@ kanban-plugin: board - [ ] добавить генерацию пустых файлов, если shared не найден - [ ] ПЕРЕВЕСТИ все действия под операции и формировать процент ПРИ загрузке из них -- [ ] Добавить - фильтрацию trainees или instructor - [ ] убрать clientMap из serverLMS Widget в мультитред сервер @@ -50,6 +47,8 @@ kanban-plugin: board ## Complete +- [ ] FIM проверять на null задачу +- [ ] Добавить - фильтрацию trainees или instructor - [ ] выбор версии на один клик - [ ] сделать header полупрозрачным прозрачным - [ ] на старте все мониторы должны быть активны @@ -334,6 +333,7 @@ kanban-plugin: board ## Cancel +- [ ] Добавить обновление инструктора, если он перелогинился - [ ] добавить в settings адрес и булку мат модели - [ ] Иерархия проекта - папка application, папка updater и линк на основной экзешник - [ ] добавить подключение без DB diff --git a/DataBaseLMS/CMakeLists.txt b/DataBaseLMS/CMakeLists.txt index b5c50e1..1a7dd55 100644 --- a/DataBaseLMS/CMakeLists.txt +++ b/DataBaseLMS/CMakeLists.txt @@ -27,6 +27,7 @@ add_library(DataBaseLMS SHARED typeQueryToDB.h timingoftrainee.cpp timingoftrainee.h + contactModel.h ) target_link_libraries(DataBaseLMS PRIVATE Qt5::Widgets) diff --git a/DataBaseLMS/contactModel.h b/DataBaseLMS/contactModel.h new file mode 100644 index 0000000..dd49a5a --- /dev/null +++ b/DataBaseLMS/contactModel.h @@ -0,0 +1,52 @@ +#ifndef CONTACTMODEL_H +#define CONTACTMODEL_H + +#include "instructor.h" +#include "trainee.h" +#include "user.h" + +class ContactModel +{ +public: + ContactModel(Instructor instructor) + { + login = instructor.getLogin(); + name = instructor.getName(); + type = 0; + loggedIn = instructor.getLoggedIn(); + id = instructor.getID(); + }; + + ContactModel(Trainee trainee) + { + login = trainee.getLogin(); + name = trainee.getName(); + type = 1; + loggedIn = trainee.getLoggedIn(); + id = trainee.getID(); + } + + void setType(int type){this->type = type;} + int getType(){return type;} + + void setName(QString name){this->name = name;} + QString getName(){return name;} + + void setLoggedIn(bool loggedIn){this->loggedIn = loggedIn;} + bool getLoggedIn(){return loggedIn;} + + void setLogin(QString login){this->login = login;} + QString getLogin(){return login;} + + void setID(int id){this->id = id;} + int getID(){return id;} + + private: + QString login; + QString name; + bool loggedIn; + int type; + int id; +}; + +#endif // CONTACTMODEL_H diff --git a/InstructorsAndTrainees/connectorToServer/Core/dataparser.cpp b/InstructorsAndTrainees/connectorToServer/Core/dataparser.cpp index bff0715..f1f35de 100644 --- a/InstructorsAndTrainees/connectorToServer/Core/dataparser.cpp +++ b/InstructorsAndTrainees/connectorToServer/Core/dataparser.cpp @@ -76,7 +76,7 @@ QByteArray DataParser::createAuthMessage(ClientAutorization *auth) return array; } -QByteArray DataParser::createMessage(ClientMessage *clientMessage) +QByteArray DataParser::createMessage(ClientMessage clientMessage) { QByteArray array; QXmlStreamWriter xmlWriter(&array); @@ -85,9 +85,10 @@ QByteArray DataParser::createMessage(ClientMessage *clientMessage) xmlWriter.writeStartDocument(); xmlWriter.writeStartElement("ClientMessage"); - xmlWriter.writeAttribute("From",clientMessage->fromId); - xmlWriter.writeAttribute("To", clientMessage->toId); - xmlWriter.writeAttribute("Text", clientMessage->Text); + xmlWriter.writeAttribute("From",clientMessage.fromId); + xmlWriter.writeAttribute("To", clientMessage.toId); + xmlWriter.writeAttribute("Text", clientMessage.Text); + xmlWriter.writeAttribute("UserType",clientMessage.UserType); xmlWriter.writeEndElement(); xmlWriter.writeEndElement(); diff --git a/InstructorsAndTrainees/connectorToServer/Core/dataparser.h b/InstructorsAndTrainees/connectorToServer/Core/dataparser.h index bf236e6..42bbfac 100644 --- a/InstructorsAndTrainees/connectorToServer/Core/dataparser.h +++ b/InstructorsAndTrainees/connectorToServer/Core/dataparser.h @@ -23,7 +23,7 @@ public: void createFileDataList(QList fileDataList,QString filename); QByteArray createAuthMessage(ClientAutorization *auth); - QByteArray createMessage(ClientMessage *toClientMessage); + QByteArray createMessage(ClientMessage toClientMessage); QByteArray createQueryToDBMessage(ClientQueryToDB *queryToDB, int id = 0, void* data = nullptr); QByteArray createQueryTasksXMLMessage(QString type); QByteArray createDeAuthMessage(ClientDeAutorization *deAuth); diff --git a/InstructorsAndTrainees/connectorToServer/Core/recognizesystem.cpp b/InstructorsAndTrainees/connectorToServer/Core/recognizesystem.cpp index 41dc9cc..93e12d0 100644 --- a/InstructorsAndTrainees/connectorToServer/Core/recognizesystem.cpp +++ b/InstructorsAndTrainees/connectorToServer/Core/recognizesystem.cpp @@ -526,9 +526,14 @@ void RecognizeSystem::xmlParser(QByteArray array) if (name == "Text"){ clientMessage->Text = value; } + + if (name == "UserType") + { + clientMessage->UserType = value; + } } - emit signal_ReceiveMessage(clientMessage->fromId, clientMessage->toId,clientMessage->Text); + emit signal_ReceiveMessage(*clientMessage); } if(xmlReader.name() == "ServerDeAuthorization"){ diff --git a/InstructorsAndTrainees/connectorToServer/Core/recognizesystem.h b/InstructorsAndTrainees/connectorToServer/Core/recognizesystem.h index fee5b75..034e69b 100644 --- a/InstructorsAndTrainees/connectorToServer/Core/recognizesystem.h +++ b/InstructorsAndTrainees/connectorToServer/Core/recognizesystem.h @@ -41,7 +41,7 @@ signals: void sigSocketWaitForReadyRead(int waitTime); void sigStartCompare(); - void signal_ReceiveMessage(QString fromId,QString toId, QString text); + void signal_ReceiveMessage(ClientMessage clientMessage); void sigAnswerQueryToDB_ListInstructors(QList listInstructors); void sigAnswerQueryToDB_ListGroups(QList listGroups); diff --git a/InstructorsAndTrainees/connectorToServer/Datas.h b/InstructorsAndTrainees/connectorToServer/Datas.h index dbc3353..0312211 100644 --- a/InstructorsAndTrainees/connectorToServer/Datas.h +++ b/InstructorsAndTrainees/connectorToServer/Datas.h @@ -77,6 +77,15 @@ public: QString fromId; QString toId; QString Text; + QString UserType; + ClientMessage(){} + ClientMessage(QString fromId, QString toId, QString text, QString UserType) + { + this->fromId = fromId; + this->toId = toId; + this->Text = text; + this->UserType = UserType; + } }; class ServerTask diff --git a/InstructorsAndTrainees/connectorToServer/connectortoserver.cpp b/InstructorsAndTrainees/connectorToServer/connectortoserver.cpp index 34160bc..71c46db 100644 --- a/InstructorsAndTrainees/connectorToServer/connectortoserver.cpp +++ b/InstructorsAndTrainees/connectorToServer/connectortoserver.cpp @@ -81,18 +81,12 @@ bool ConnectorToServer::sendQueryToDB(TypeQueryToDB typeQuery, int id, void* dat return true; } -bool ConnectorToServer::sendMessage(QString fromId, QString toId, QString text) +bool ConnectorToServer::sendMessage(ClientMessage clientMessage) { if (!client->getIsConnected()) { return false; } - - ClientMessage *clientMessage = new ClientMessage; - clientMessage->fromId = fromId; - clientMessage->toId = toId; - clientMessage->Text = text; - QByteArray array = dataParser->createMessage(clientMessage); emit signal_sendXMLmsgGUItoServer(array); @@ -372,9 +366,9 @@ void ConnectorToServer::slot_AnswerQueryTasksXML_AMM(QByteArray array) emit signal_UpdateTasksAMM(); } -void ConnectorToServer::slot_sendMessage(QString fromId, QString toId, QString text) +void ConnectorToServer::slot_sendMessage(ClientMessage clientMessage) { - sendMessage(fromId, toId, text); + sendMessage(clientMessage); } void ConnectorToServer::showServerList(QList *serverList) diff --git a/InstructorsAndTrainees/connectorToServer/connectortoserver.h b/InstructorsAndTrainees/connectorToServer/connectortoserver.h index 254bf5c..d490fb5 100644 --- a/InstructorsAndTrainees/connectorToServer/connectortoserver.h +++ b/InstructorsAndTrainees/connectorToServer/connectortoserver.h @@ -27,7 +27,7 @@ public: bool deAuthorizationInstructorLocal(QString login); bool sendQueryToDB(TypeQueryToDB typeQuery, int id = 0, void* data = nullptr); - bool sendMessage(QString fromId, QString toId, QString text); + bool sendMessage(ClientMessage clientMessage); bool sendQueryTasksXML(QString type); @@ -81,7 +81,7 @@ public slots: void slot_AnswerQueryTasksXML_FIM(QByteArray array); void slot_AnswerQueryTasksXML_AMM(QByteArray array); - void slot_sendMessage(QString fromId, QString toId, QString text); + void slot_sendMessage(ClientMessage clientMessage); void showServerList(QList *serverList); void slot_HashReady(); @@ -110,7 +110,7 @@ signals: void signal_InitMessanger(QList listTrainees); - void signal_receiveMessage(QString fromId, QString toId, QString text); + void signal_receiveMessage(ClientMessage clientMessage); void sigSendAnswerToServer(QByteArray array); private: diff --git a/InstructorsAndTrainees/instructorsandtraineeswidget.cpp b/InstructorsAndTrainees/instructorsandtraineeswidget.cpp index 0b95077..1e3cce9 100644 --- a/InstructorsAndTrainees/instructorsandtraineeswidget.cpp +++ b/InstructorsAndTrainees/instructorsandtraineeswidget.cpp @@ -40,6 +40,7 @@ InstructorsAndTraineesWidget::InstructorsAndTraineesWidget(QWidget *parent) : qRegisterMetaType>("QList"); qRegisterMetaType>("QList"); qRegisterMetaType>("QList"); + qRegisterMetaType("ClientMessage"); qDebug() << "InstructorsAndTraineesWidget init thread ID " << QThread::currentThreadId(); @@ -218,6 +219,7 @@ void InstructorsAndTraineesWidget::checkLoginResult(ServerAuthorization *serverA connectorToServer->sendQueryTasksXML("fim"); connectorToServer->sendQueryTasksXML("amm"); + messangerWidget->initialize(serverAuth->Id); //QMessageBox::information(this, tr("Instructor authorization"), tr("Successfully!")); } else diff --git a/InstructorsAndTrainees/messanger/messangerwidget.cpp b/InstructorsAndTrainees/messanger/messangerwidget.cpp index de1e2b9..a63abc3 100644 --- a/InstructorsAndTrainees/messanger/messangerwidget.cpp +++ b/InstructorsAndTrainees/messanger/messangerwidget.cpp @@ -153,8 +153,9 @@ void MessangerWidget::clear() void MessangerWidget::on_btnSend_clicked() { QString text = ui->editMsg->toPlainText(); + ClientMessage message = ClientMessage(currClientId,selectedUserId,text,"0"); - emit signal_sendMessage(currClientId, selectedUserId, text); + emit signal_sendMessage(message); ui->editMsg->clear(); @@ -226,13 +227,13 @@ void MessangerWidget::slot_InitMessanger(QList listTrainees) } } -void MessangerWidget::slot_showMessage(QString fromId, QString toId, QString text) +void MessangerWidget::slot_showMessage(ClientMessage clientMessage) { for(Trainee trainee: listTrainees) { - if(QString::number(trainee.getID()) == fromId) + if(QString::number(trainee.getID()) == clientMessage.fromId) { - addMsgFromClient(trainee, text); + addMsgFromClient(trainee, clientMessage.Text); break; } } diff --git a/InstructorsAndTrainees/messanger/messangerwidget.h b/InstructorsAndTrainees/messanger/messangerwidget.h index f0c5ea9..0b38bde 100644 --- a/InstructorsAndTrainees/messanger/messangerwidget.h +++ b/InstructorsAndTrainees/messanger/messangerwidget.h @@ -46,7 +46,7 @@ private slots: signals: //сигнал о готовности нового сообщения на отправку клиенту - void signal_sendMessage(QString fromId, QString toId, QString text); + void signal_sendMessage(ClientMessage clientMessage); //сигнал об изменении вкладки диалога с клиентом (TabDialogMessenger) void signal_tabMessengerChanged(QString login); @@ -58,7 +58,7 @@ public slots: //слот обработки сигнала о выборе обучаемого void slot_traineeSelected(QString login); //слот о приходе нового сообщения от клиента - void slot_showMessage(QString fromId, QString toId, QString text); + void slot_showMessage(ClientMessage clientMessage); private: virtual void keyPressEvent(QKeyEvent *event) override; diff --git a/ServerLMS/CMakeLists.txt b/ServerLMS/CMakeLists.txt index 04adf40..f725f7c 100644 --- a/ServerLMS/CMakeLists.txt +++ b/ServerLMS/CMakeLists.txt @@ -41,6 +41,7 @@ add_library(ServerLMS SHARED Systems/tools.h Systems/chatsystem.cpp Systems/chatsystem.h + Data/usertype.h providerdblms.cpp providerdblms.h resources.qrc diff --git a/ServerLMS/Data/typesDataServerClient.h b/ServerLMS/Data/typesDataServerClient.h index a948d39..f2bda0f 100644 --- a/ServerLMS/Data/typesDataServerClient.h +++ b/ServerLMS/Data/typesDataServerClient.h @@ -48,6 +48,12 @@ enum TypeClientAutorization{ TYPE_GUI = 10 }; +enum UserType +{ + INSTRUCTOR, + TRAINEE +}; + class ClientAutorization { public: @@ -101,13 +107,15 @@ public: QString From; QString To; QString Text; + QString Type; //ТИП ЮЗЕРА К КОТОРОМУ ПРИХОДИТ СООБЩЕНИЕ ClientMessage(){} - ClientMessage(QString from,QString to,QString text) + ClientMessage(QString from,QString to,QString text,QString userType) { From = from; To = to; Text = text; + Type = userType; } }; diff --git a/ServerLMS/Data/userType.h b/ServerLMS/Data/userType.h new file mode 100644 index 0000000..2eb90cf --- /dev/null +++ b/ServerLMS/Data/userType.h @@ -0,0 +1,9 @@ +#ifndef USERTYPE_H +#define USERTYPE_H + +enum UserType{ + INSTRUCTOR, + TRAINEES +}; + +#endif // USERTYPE_H diff --git a/ServerLMS/Systems/Parsers/clientanswerparser.cpp b/ServerLMS/Systems/Parsers/clientanswerparser.cpp index e1ce8b3..c3ad24c 100644 --- a/ServerLMS/Systems/Parsers/clientanswerparser.cpp +++ b/ServerLMS/Systems/Parsers/clientanswerparser.cpp @@ -43,7 +43,7 @@ QByteArray ClientAnswerParser::deAuthorization(bool result, QString login) return dataParser->xmlAnswer(listTag); } -QByteArray ClientAnswerParser::message(QString loginFrom,QString loginTo,QString text) +QByteArray ClientAnswerParser::message(QString loginFrom,QString loginTo,QString text,QString type) { QList listTag; QList listAttr; @@ -54,6 +54,8 @@ QByteArray ClientAnswerParser::message(QString loginFrom,QString loginTo,QString listAttr.append(attribute1); attribute1 = {"Text",text}; listAttr.append(attribute1); + attribute1 = {"UserType",type}; + listAttr.append(attribute1); SXmlAnswerTag tag = {"ClientMessage", listAttr}; diff --git a/ServerLMS/Systems/Parsers/clientanswerparser.h b/ServerLMS/Systems/Parsers/clientanswerparser.h index 423b4e5..80cfc77 100644 --- a/ServerLMS/Systems/Parsers/clientanswerparser.h +++ b/ServerLMS/Systems/Parsers/clientanswerparser.h @@ -16,7 +16,7 @@ public: QByteArray authorization(bool result, QString instructorName, QString clientName, QString accessType, QString login, int id); QByteArray deAuthorization(bool result, QString login); - QByteArray message(QString loginFrom,QString loginTo,QString text); + QByteArray message(QString loginFrom,QString loginTo,QString text, QString userType); QByteArray task(QString text); QByteArray notify(QString code); QByteArray tasks(QStringList listTasks); diff --git a/ServerLMS/Systems/Parsers/dbanswerparser.cpp b/ServerLMS/Systems/Parsers/dbanswerparser.cpp index ae7f232..78d35cd 100644 --- a/ServerLMS/Systems/Parsers/dbanswerparser.cpp +++ b/ServerLMS/Systems/Parsers/dbanswerparser.cpp @@ -102,20 +102,22 @@ QByteArray DBAnswerParser::listClassrooms(bool result, QList *listCla return QByteArray(); } -QByteArray DBAnswerParser::listContacts(bool result, QList *listContacts) +QByteArray DBAnswerParser::listContacts(bool result, QList *listContacts) { QDomDocument doc; QDomProcessingInstruction xmlDecl = doc.createProcessingInstruction("xml", "version='1.0' encoding='utf-8'"); doc.insertBefore(xmlDecl,doc.firstChild()); QDomElement root = doc.createElement("ContactArray"); - for(User entity : *listContacts) + for(ContactModel entity : *listContacts) { QDomElement contact = doc.createElement("ContactData"); contact.toElement().setAttribute("name",entity.getName()); contact.toElement().setAttribute("id",entity.getID()); QString isLogged = entity.getLoggedIn() ? "1" : "0"; contact.toElement().setAttribute("isOnline",isLogged); + contact.toElement().setAttribute("UserType",entity.getType()); + contact.toElement().setAttribute("Login",entity.getLogin()); root.appendChild(contact); } diff --git a/ServerLMS/Systems/Parsers/dbanswerparser.h b/ServerLMS/Systems/Parsers/dbanswerparser.h index a025f8f..801535c 100644 --- a/ServerLMS/Systems/Parsers/dbanswerparser.h +++ b/ServerLMS/Systems/Parsers/dbanswerparser.h @@ -6,6 +6,7 @@ #include #include +#include class DBAnswerParser : public QObject { @@ -18,7 +19,7 @@ public: QByteArray listTrainees(bool result, QList *listTrainees); QByteArray listComputers(bool result, QList *listComputers); QByteArray listClassrooms(bool result, QList *listClassrooms); - QByteArray listContacts(bool result, QList *listContacts); + QByteArray listContacts(bool result, QList *listContacts); QByteArray listTasksAMMofTrainee(bool result, QList *listTasks, int trainee_id, bool full_list); QByteArray listTasksFIMofTrainee(bool result, QList *listTasks, int trainee_id, bool full_list); diff --git a/ServerLMS/Systems/Parsers/processparser.cpp b/ServerLMS/Systems/Parsers/processparser.cpp index 42cf7b7..b1bade8 100644 --- a/ServerLMS/Systems/Parsers/processparser.cpp +++ b/ServerLMS/Systems/Parsers/processparser.cpp @@ -498,6 +498,8 @@ void ProcessParser::clientMessage(QXmlStreamReader &xmlReader,ClientHandler *cli clientMessage.From = value; if (name == "To") clientMessage.To = value; + if (name == "UserType") + clientMessage.Type = value; } processingSystem->processingSendMessage(clientMessage); diff --git a/ServerLMS/Systems/chatsystem.cpp b/ServerLMS/Systems/chatsystem.cpp index 5602e4b..962e491 100644 --- a/ServerLMS/Systems/chatsystem.cpp +++ b/ServerLMS/Systems/chatsystem.cpp @@ -13,9 +13,9 @@ void ChatSystem::initialize(CommonClientHandler *commonClientHandler, DataParser clientNotSendedMessage = new QMap*>; auto stack = new QStack; - auto clientMessage1 = ClientMessage("1","102","Сообщение 1"); + auto clientMessage1 = ClientMessage("1","102","Сообщение 1","1"); stack->append(clientMessage1); - auto clientMessage2 = ClientMessage("1","102","Сообщение 2"); + auto clientMessage2 = ClientMessage("1","102","Сообщение 2","1"); stack->append(clientMessage2); clientNotSendedMessage->insert("102", stack); @@ -23,7 +23,7 @@ void ChatSystem::initialize(CommonClientHandler *commonClientHandler, DataParser bool ChatSystem::sendTo(ClientMessage message) { - QByteArray byteArrayMsg = dataParser->ClientAnswer()->message(message.From,message.To,message.Text); + QByteArray byteArrayMsg = dataParser->ClientAnswer()->message(message.From,message.To,message.Text,message.Type); foreach(int idSocket, clientsMap->keys()) { diff --git a/ServerLMS/Systems/processingsystem.cpp b/ServerLMS/Systems/processingsystem.cpp index ed655ce..5f9c54a 100644 --- a/ServerLMS/Systems/processingsystem.cpp +++ b/ServerLMS/Systems/processingsystem.cpp @@ -464,18 +464,20 @@ void ProcessingSystem::processingClientQueryToDB(ClientHandler *client, ClientQu case TypeQueryToDB::TYPE_QUERY_GET_CONTACT_LIST: { - QList entitylist; + QList entitylist; QList listInstructor = providerDBLMS->GetListAllInstructors(); QList listTrainees = providerDBLMS->GetListAllTrainees(); for (Instructor instructor : listInstructor) { - entitylist.append(static_cast(instructor)); + ContactModel model = ContactModel(instructor); + entitylist.append(model); } for (Trainee trainee : listTrainees) { - entitylist.append(static_cast(trainee)); + ContactModel model = ContactModel(trainee); + entitylist.append(model); } QByteArray arrayAnswer; diff --git a/ServerLMS/Systems/sendsystem.h b/ServerLMS/Systems/sendsystem.h index 9055b94..cd5474a 100644 --- a/ServerLMS/Systems/sendsystem.h +++ b/ServerLMS/Systems/sendsystem.h @@ -50,7 +50,7 @@ public slots: signals: void sigLoadHash(); void sigSendToLogger(QString message); - QByteArray sigSendXMLmessage(QString loginFrom, QString loginTo, QString text); + QByteArray sigSendXMLmessage(QString loginFrom, QString loginTo, QString text, QString userType); QByteArray sigSendNotify(QString message); QByteArray sigSendVersion(); diff --git a/ServerLMS/serverlmswidget.cpp b/ServerLMS/serverlmswidget.cpp index 3f436d3..4ff227f 100644 --- a/ServerLMS/serverlmswidget.cpp +++ b/ServerLMS/serverlmswidget.cpp @@ -26,6 +26,7 @@ ServerLMSWidget::ServerLMSWidget(QWidget *parent) : ui->setupUi(this); qRegisterMetaType("PacketType"); + qRegisterMetaType("UserType"); errorCode = 0; ui->btnStopServer->setEnabled(false);