Переместил две ф-и в Tools

This commit is contained in:
2025-07-03 09:55:35 +03:00
parent c46ae86791
commit a36dfe35fb
4 changed files with 24 additions and 25 deletions

View File

@@ -202,7 +202,7 @@ void RecognizeSystem::recognize()
continue;
}
filePath = createFullPath(filePath);
filePath = Tools::createFullPath(filePath);
}
@@ -292,7 +292,7 @@ void RecognizeSystem::recognize()
if(!stream.commitTransaction()) continue;
filePath = createFullPath(filePath);
filePath = Tools::createFullPath(filePath);
socket->waitForReadyRead(100);
break;
}
@@ -462,31 +462,11 @@ void RecognizeSystem::packetTypeInit(PacketType packet,Client *client)
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()
{
return updateController->getCurrentVersion()->getIsChangeable();
}
bool RecognizeSystem::checkNonStaticData(QString path)
{
if(path.contains(sharedDataFolderName)) return true;
return false;
}
RecognizeSystem::~RecognizeSystem()
{

View File

@@ -60,8 +60,7 @@ private:
void packetTypeInit(PacketType packet,Client *client);
void packetTypeInit(PacketType type);
QString createFullPath(QString path);
bool checkIsChangeable();
bool checkNonStaticData(QString path);
};
#endif // RECOGNIZESYSTEM_H

View File

@@ -91,4 +91,22 @@ QString Tools::createFolderPath(QString path)
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;
}

View File

@@ -59,6 +59,8 @@ public:
static QString createRealPath(QString path,StreamingVersionData* currentVersionData);
static QString createStreamingToRealPath(QString path, StreamingVersionData *streamingVersionData);
static QString createVersionHashFilepath(QString fileName);
static QString createFullPath(QString path);
static bool checkNonStaticData(QString path);
};