mirror of
https://gitea.msk.dinamika-avia.ru/Constanta-Design/RRJServer.git
synced 2026-03-27 19:45:43 +03:00
Переместил две ф-и в Tools
This commit is contained in:
@@ -202,7 +202,7 @@ void RecognizeSystem::recognize()
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
filePath = createFullPath(filePath);
|
filePath = Tools::createFullPath(filePath);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -292,7 +292,7 @@ void RecognizeSystem::recognize()
|
|||||||
|
|
||||||
if(!stream.commitTransaction()) continue;
|
if(!stream.commitTransaction()) continue;
|
||||||
|
|
||||||
filePath = createFullPath(filePath);
|
filePath = Tools::createFullPath(filePath);
|
||||||
socket->waitForReadyRead(100);
|
socket->waitForReadyRead(100);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -462,31 +462,11 @@ void RecognizeSystem::packetTypeInit(PacketType packet,Client *client)
|
|||||||
packetType = PacketType::TYPE_NONE;
|
packetType = PacketType::TYPE_NONE;
|
||||||
}
|
}
|
||||||
|
|
||||||
QString RecognizeSystem::createFullPath(QString path)
|
|
||||||
{
|
|
||||||
QString fullPath;
|
|
||||||
qint8 pos = path.indexOf("Application");
|
|
||||||
|
|
||||||
QString localPath = path.remove(0,--pos);
|
|
||||||
|
|
||||||
//qDebug() << "CLIENT: localPath" << localPath;
|
|
||||||
fullPath = QDir::currentPath() + localPath;
|
|
||||||
|
|
||||||
return fullPath;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool RecognizeSystem::checkIsChangeable()
|
bool RecognizeSystem::checkIsChangeable()
|
||||||
{
|
{
|
||||||
return updateController->getCurrentVersion()->getIsChangeable();
|
return updateController->getCurrentVersion()->getIsChangeable();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool RecognizeSystem::checkNonStaticData(QString path)
|
|
||||||
{
|
|
||||||
if(path.contains(sharedDataFolderName)) return true;
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
RecognizeSystem::~RecognizeSystem()
|
RecognizeSystem::~RecognizeSystem()
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|||||||
@@ -60,8 +60,7 @@ private:
|
|||||||
|
|
||||||
void packetTypeInit(PacketType packet,Client *client);
|
void packetTypeInit(PacketType packet,Client *client);
|
||||||
void packetTypeInit(PacketType type);
|
void packetTypeInit(PacketType type);
|
||||||
QString createFullPath(QString path);
|
|
||||||
bool checkIsChangeable();
|
bool checkIsChangeable();
|
||||||
bool checkNonStaticData(QString path);
|
|
||||||
};
|
};
|
||||||
#endif // RECOGNIZESYSTEM_H
|
#endif // RECOGNIZESYSTEM_H
|
||||||
|
|||||||
@@ -91,4 +91,22 @@ QString Tools::createFolderPath(QString path)
|
|||||||
return folderPath;
|
return folderPath;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QString Tools::createFullPath(QString path)
|
||||||
|
{
|
||||||
|
QString fullPath;
|
||||||
|
qint8 pos = path.indexOf("Application");
|
||||||
|
|
||||||
|
QString localPath = path.remove(0,--pos);
|
||||||
|
|
||||||
|
//qDebug() << "CLIENT: localPath" << localPath;
|
||||||
|
fullPath = QDir::currentPath() + localPath;
|
||||||
|
|
||||||
|
return fullPath;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool Tools::checkNonStaticData(QString path)
|
||||||
|
{
|
||||||
|
if(path.contains(sharedDataFolderName)) return true;
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|||||||
@@ -59,6 +59,8 @@ public:
|
|||||||
static QString createRealPath(QString path,StreamingVersionData* currentVersionData);
|
static QString createRealPath(QString path,StreamingVersionData* currentVersionData);
|
||||||
static QString createStreamingToRealPath(QString path, StreamingVersionData *streamingVersionData);
|
static QString createStreamingToRealPath(QString path, StreamingVersionData *streamingVersionData);
|
||||||
static QString createVersionHashFilepath(QString fileName);
|
static QString createVersionHashFilepath(QString fileName);
|
||||||
|
static QString createFullPath(QString path);
|
||||||
|
static bool checkNonStaticData(QString path);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user