mirror of
https://gitea.msk.dinamika-avia.ru/Constanta-Design/RRJServer.git
synced 2026-03-28 19:55:48 +03:00
refact 0
This commit is contained in:
@@ -151,16 +151,18 @@ bool MultiThreadServer::slot_BlockAutorization(bool block, QString whoFullName,
|
||||
{
|
||||
bool res = true;
|
||||
bool blockRes = false;
|
||||
QString key = whoFullName + " [type:" + type + "]";
|
||||
QString strTypes = "";
|
||||
|
||||
if(block)
|
||||
{
|
||||
this->blockAutorization();
|
||||
blockersMap.insert(whoFullName, type);
|
||||
blockersMap.insert(key, type);
|
||||
blockRes = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
blockersMap.take(whoFullName);
|
||||
blockersMap.take(key);
|
||||
if(!blockersMap.count())
|
||||
{
|
||||
this->unBlockAutorization();
|
||||
@@ -177,7 +179,14 @@ bool MultiThreadServer::slot_BlockAutorization(bool block, QString whoFullName,
|
||||
else
|
||||
emit signal_sendPacketToAllClients(PacketType::FREE);
|
||||
|
||||
emit signal_BlockAutorizationIndicate(block, whoFullName, type);
|
||||
foreach(QString keyLocal, blockersMap.keys())
|
||||
{
|
||||
if(strTypes != "")
|
||||
strTypes += ", ";
|
||||
strTypes += (blockersMap[keyLocal]);
|
||||
}
|
||||
|
||||
emit signal_BlockAutorizationIndicate(block, key, strTypes);
|
||||
}
|
||||
|
||||
return res;
|
||||
|
||||
@@ -46,7 +46,7 @@ signals:
|
||||
UpdateController *updateController, DataParser *dataParser);
|
||||
void signalStopSendFile();
|
||||
|
||||
void signal_BlockAutorizationIndicate(bool block, QString whoFullName, QString type);
|
||||
void signal_BlockAutorizationIndicate(bool block, QString blocker, QString types);
|
||||
void signal_sendPacketToAllClients(PacketType packetType);
|
||||
|
||||
public slots:
|
||||
|
||||
Reference in New Issue
Block a user