mirror of
https://gitea.msk.dinamika-avia.ru/Constanta-Design/RRJServer.git
synced 2026-03-28 19:55:48 +03:00
Merge branch 'bugfix-version-info' into merge-task-and-verController
This commit is contained in:
@@ -12,13 +12,12 @@ kanban-plugin: board
|
|||||||
|
|
||||||
## bugs
|
## bugs
|
||||||
|
|
||||||
- [ ] При старт стопе не сканится шэред дата
|
|
||||||
|
|
||||||
|
|
||||||
## feature client Unity
|
## feature client Unity
|
||||||
|
|
||||||
- [ ] Добавить обновление инструктора, если он перелогинился
|
- [ ] Добавить обновление инструктора, если он перелогинился
|
||||||
- [ ] убрать функционал смены версии с клиента
|
- [ ] При нажатии на кнопку обновить, менять надпись на Загрузка
|
||||||
|
|
||||||
|
|
||||||
## feature client QT
|
## feature client QT
|
||||||
@@ -38,11 +37,16 @@ kanban-plugin: board
|
|||||||
|
|
||||||
## NOW
|
## NOW
|
||||||
|
|
||||||
- [ ] добавить информацию Авторе и изменяемая версия или нет
|
|
||||||
|
|
||||||
|
|
||||||
## Complete
|
## Complete
|
||||||
|
|
||||||
|
- [ ] Уведомление о том, что версия сервера неизменяемая и инструкция, что нужно переключить версию сервера, подтянуть изменяемую версию и перекинуть файлы + путь
|
||||||
|
- [ ] Qt ClientЖ отключать виджет версии при разьединении
|
||||||
|
- [ ] Отображать версию на сервере
|
||||||
|
- [ ] При удалении с клиента не удаляется папка на сервере
|
||||||
|
- [ ] убрать функционал смены версии с клиента
|
||||||
|
- [ ] добавить информацию Авторе и изменяемая версия или нет
|
||||||
- [ ] отправлять сигнал на пересчет хэша с саб частью
|
- [ ] отправлять сигнал на пересчет хэша с саб частью
|
||||||
- [ ] GUI server: при неподключенном сервере, отключать попытку изменить версию
|
- [ ] GUI server: при неподключенном сервере, отключать попытку изменить версию
|
||||||
- [ ] добавить автоматическое выключение после создания копии
|
- [ ] добавить автоматическое выключение после создания копии
|
||||||
@@ -304,6 +308,7 @@ kanban-plugin: board
|
|||||||
|
|
||||||
## Cancel
|
## Cancel
|
||||||
|
|
||||||
|
- [ ] При старт стопе не сканится шэред дата
|
||||||
- [ ] разделения на серверное и GUI приложение
|
- [ ] разделения на серверное и GUI приложение
|
||||||
- [ ] gui thread должен жить один
|
- [ ] gui thread должен жить один
|
||||||
- [ ] подготовить фасад для ui сервера
|
- [ ] подготовить фасад для ui сервера
|
||||||
|
|||||||
@@ -11,6 +11,6 @@ void NotifyController::showWarning(QString text)
|
|||||||
warning.setText(text);
|
warning.setText(text);
|
||||||
|
|
||||||
warning.setIcon(QMessageBox::Warning);
|
warning.setIcon(QMessageBox::Warning);
|
||||||
warning.setWindowTitle(tr("Ошибка"));
|
warning.setWindowTitle(tr("Error"));
|
||||||
warning.exec();
|
warning.exec();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -364,17 +364,17 @@ void RecognizeSystem::xmlParser(QByteArray array)
|
|||||||
|
|
||||||
if (value == "BASEDELETETRY")
|
if (value == "BASEDELETETRY")
|
||||||
{
|
{
|
||||||
emit sigNotify(tr("Нельзя удалять базовую версию"));
|
emit sigNotify(tr("You cannot delete the basic version!"));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (value == "TRYACTIVEDELETE")
|
if (value == "TRYACTIVEDELETE")
|
||||||
{
|
{
|
||||||
emit sigNotify(tr("Нельзя удалять активную версию"));
|
emit sigNotify(tr("You cannot delete the active version"));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (value == "DUPLICATEVERNAME")
|
if (value == "DUPLICATEVERNAME")
|
||||||
{
|
{
|
||||||
emit sigNotify(tr("Такое имя уже существет"));
|
emit sigNotify(tr("This name already exists"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -171,7 +171,7 @@ void InstructorsAndTraineesWidget::checkLoginResult(ServerAuthorization *serverA
|
|||||||
ui->btnAuthorizationInstructor->setText(tr("Deauthorization Instructor"));
|
ui->btnAuthorizationInstructor->setText(tr("Deauthorization Instructor"));
|
||||||
|
|
||||||
updateLabelLoggedInInstructor(serverAuth->Login, serverAuth->ClientName);
|
updateLabelLoggedInInstructor(serverAuth->Login, serverAuth->ClientName);
|
||||||
connectorToServer->setLoginName(loginInstructorLoggedInLocal);
|
connectorToServer->setLoginName(nameInstructorLoggedInLocal);
|
||||||
QMessageBox::information(this, tr("Instructor authorization"), tr("Successfully!"));
|
QMessageBox::information(this, tr("Instructor authorization"), tr("Successfully!"));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>325</width>
|
<width>344</width>
|
||||||
<height>200</height>
|
<height>200</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
@@ -61,18 +61,24 @@
|
|||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="prevVerTitle">
|
<widget class="QLabel" name="prevVerTitle">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="Minimum" vsizetype="Minimum">
|
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||||
<horstretch>0</horstretch>
|
<horstretch>0</horstretch>
|
||||||
<verstretch>0</verstretch>
|
<verstretch>0</verstretch>
|
||||||
</sizepolicy>
|
</sizepolicy>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Базовая версия:</string>
|
<string>Basic version:</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="prevVerValue">
|
<widget class="QLabel" name="prevVerValue">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||||
|
<horstretch>150</horstretch>
|
||||||
|
<verstretch>30</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>TextLabel</string>
|
<string>TextLabel</string>
|
||||||
</property>
|
</property>
|
||||||
@@ -92,15 +98,27 @@
|
|||||||
<number>5</number>
|
<number>5</number>
|
||||||
</property>
|
</property>
|
||||||
<property name="rightMargin">
|
<property name="rightMargin">
|
||||||
<number>20</number>
|
<number>5</number>
|
||||||
</property>
|
</property>
|
||||||
<property name="bottomMargin">
|
<property name="bottomMargin">
|
||||||
<number>5</number>
|
<number>5</number>
|
||||||
</property>
|
</property>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="newNameVersionTitle">
|
<widget class="QLabel" name="newNameVersionTitle">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||||
|
<horstretch>99</horstretch>
|
||||||
|
<verstretch>40</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>0</width>
|
||||||
|
<height>0</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Новое название:</string>
|
<string>New name version:</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
@@ -108,8 +126,8 @@
|
|||||||
<widget class="QLineEdit" name="lineEdit">
|
<widget class="QLineEdit" name="lineEdit">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||||
<horstretch>0</horstretch>
|
<horstretch>150</horstretch>
|
||||||
<verstretch>0</verstretch>
|
<verstretch>30</verstretch>
|
||||||
</sizepolicy>
|
</sizepolicy>
|
||||||
</property>
|
</property>
|
||||||
<property name="minimumSize">
|
<property name="minimumSize">
|
||||||
@@ -126,6 +144,19 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item>
|
||||||
|
<spacer name="horizontalSpacer_4">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>40</width>
|
||||||
|
<height>20</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
@@ -158,7 +189,7 @@
|
|||||||
</sizepolicy>
|
</sizepolicy>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Создать</string>
|
<string>Create</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
@@ -187,7 +218,7 @@
|
|||||||
</sizepolicy>
|
</sizepolicy>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Отмена</string>
|
<string>Cancel</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ void VersionSelectWidget::initialize(SendSystem *sendSystem,VersionContainer *ve
|
|||||||
connect(this,&VersionSelectWidget::sigSendNotify,notifyController,&NotifyController::showWarning,Qt::AutoConnection);
|
connect(this,&VersionSelectWidget::sigSendNotify,notifyController,&NotifyController::showWarning,Qt::AutoConnection);
|
||||||
this->versionContainer = versionContainer;
|
this->versionContainer = versionContainer;
|
||||||
hide();
|
hide();
|
||||||
setWindowTitle(tr("Управление версиями"));
|
setWindowTitle(tr("Version control"));
|
||||||
}
|
}
|
||||||
|
|
||||||
void VersionSelectWidget::fillView(QList<StreamingVersionData *> *serverData)
|
void VersionSelectWidget::fillView(QList<StreamingVersionData *> *serverData)
|
||||||
@@ -44,10 +44,10 @@ void VersionSelectWidget::on_verListView_itemDoubleClicked(QListWidgetItem *item
|
|||||||
{
|
{
|
||||||
if(data->getViewName() == item->text())
|
if(data->getViewName() == item->text())
|
||||||
{
|
{
|
||||||
QString info = "Имя версии: " + data->getViewName() + "\n";
|
QString info = tr("Version name: ") + data->getViewName() + "\n";
|
||||||
info.append("Создан: " + data->getCreateData().toString() + "\n");
|
info.append(tr("Created: ") + data->getCreateData().toString() + "\n");
|
||||||
info.append("Изменяемый: " + changableText(data->getIsChangeable()) + "\n");
|
info.append(tr("Changeable: ") + changableText(data->getIsChangeable()) + "\n");
|
||||||
info.append("Автор: " + data->getAuthor());
|
info.append(tr("Author: ") + data->getAuthor());
|
||||||
ui->infoValue->setText(info);
|
ui->infoValue->setText(info);
|
||||||
selectedVersion = data;
|
selectedVersion = data;
|
||||||
}
|
}
|
||||||
@@ -56,8 +56,8 @@ void VersionSelectWidget::on_verListView_itemDoubleClicked(QListWidgetItem *item
|
|||||||
|
|
||||||
QString VersionSelectWidget::changableText(bool flag)
|
QString VersionSelectWidget::changableText(bool flag)
|
||||||
{
|
{
|
||||||
if(flag) return tr("Да");
|
if(flag) return tr("Yes");
|
||||||
else return tr("Нет");
|
else return tr("No");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -74,7 +74,7 @@ void VersionSelectWidget::sendCopyEmit(QString newName)
|
|||||||
|
|
||||||
if (selectedVersion == nullptr)
|
if (selectedVersion == nullptr)
|
||||||
{
|
{
|
||||||
sigSendNotify(tr("Версия не выбрана"));
|
sigSendNotify(tr("Version not selected"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -86,7 +86,7 @@ void VersionSelectWidget::on_DeleteVersionButton_clicked()
|
|||||||
{
|
{
|
||||||
if (selectedVersion == nullptr)
|
if (selectedVersion == nullptr)
|
||||||
{
|
{
|
||||||
sigSendNotify(tr("Версия не выбрана"));
|
sigSendNotify(tr("Version not selected"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -97,7 +97,7 @@ void VersionSelectWidget::on_switchServerVersionButton_clicked()
|
|||||||
{
|
{
|
||||||
if (selectedVersion == nullptr)
|
if (selectedVersion == nullptr)
|
||||||
{
|
{
|
||||||
sigSendNotify(tr("Версия не выбрана"));
|
sigSendNotify(tr("Version not selected"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -48,15 +48,15 @@
|
|||||||
<widget class="QLabel" name="verListTitle">
|
<widget class="QLabel" name="verListTitle">
|
||||||
<property name="font">
|
<property name="font">
|
||||||
<font>
|
<font>
|
||||||
<family>Calibri</family>
|
<family>MS Shell Dlg 2</family>
|
||||||
<pointsize>12</pointsize>
|
<pointsize>8</pointsize>
|
||||||
</font>
|
</font>
|
||||||
</property>
|
</property>
|
||||||
<property name="contextMenuPolicy">
|
<property name="contextMenuPolicy">
|
||||||
<enum>Qt::PreventContextMenu</enum>
|
<enum>Qt::PreventContextMenu</enum>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Доступные версии на сервере</string>
|
<string>Available versions on the server:</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
@@ -103,7 +103,7 @@
|
|||||||
</font>
|
</font>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Создать копию</string>
|
<string>Create copy</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
@@ -127,7 +127,7 @@
|
|||||||
</font>
|
</font>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Удалить</string>
|
<string>Delete</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
@@ -147,7 +147,7 @@
|
|||||||
</font>
|
</font>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Переключить версию сервера</string>
|
<string>Change server version</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
@@ -175,7 +175,7 @@
|
|||||||
</sizepolicy>
|
</sizepolicy>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Информация:</string>
|
<string>Info:</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="alignment">
|
<property name="alignment">
|
||||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
|
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
|
||||||
@@ -185,7 +185,7 @@
|
|||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="infoValue">
|
<widget class="QLabel" name="infoValue">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Тут будет информация о версии...</string>
|
<string>Double click on the version to see information...</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="alignment">
|
<property name="alignment">
|
||||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
|
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
|
||||||
@@ -220,7 +220,7 @@
|
|||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="verTitle">
|
<widget class="QLabel" name="verTitle">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Текущая версия сервера:</string>
|
<string>Current server version:</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
|||||||
@@ -13,13 +13,21 @@ public:
|
|||||||
this->viewName = viewName;
|
this->viewName = viewName;
|
||||||
this->createData = data;
|
this->createData = data;
|
||||||
this->size = size;
|
this->size = size;
|
||||||
this->isChangeable = true;
|
this->isChangeable = false;
|
||||||
this->author = "";
|
|
||||||
}
|
}
|
||||||
StreamingVersionData(){};
|
StreamingVersionData(){};
|
||||||
|
|
||||||
~StreamingVersionData();
|
~StreamingVersionData();
|
||||||
|
|
||||||
|
void fill(StreamingVersionData* data)
|
||||||
|
{
|
||||||
|
this->absolutePath = data->getAbsolutPath();
|
||||||
|
this->viewName = data->getViewName();
|
||||||
|
this->createData = data->getCreateData();
|
||||||
|
this->size = data->getSize();
|
||||||
|
this->isChangeable = data->getIsChangeable();
|
||||||
|
this->author = data->getAuthor();
|
||||||
|
}
|
||||||
QString getAbsolutPath() const
|
QString getAbsolutPath() const
|
||||||
{
|
{
|
||||||
return absolutePath;
|
return absolutePath;
|
||||||
|
|||||||
@@ -59,6 +59,10 @@ void ProcessParser::read(ClientHandler *client, QByteArray array)
|
|||||||
|
|
||||||
clientNotify(xmlReader,client);
|
clientNotify(xmlReader,client);
|
||||||
}
|
}
|
||||||
|
else if(xmlReader.name() == "DataInfo")
|
||||||
|
{
|
||||||
|
clientDataInfo(xmlReader,client);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
emit sigLogMessage("XmlParser: unrecognized tag");
|
emit sigLogMessage("XmlParser: unrecognized tag");
|
||||||
@@ -69,6 +73,25 @@ void ProcessParser::read(ClientHandler *client, QByteArray array)
|
|||||||
}//while(!xmlReader.atEnd())
|
}//while(!xmlReader.atEnd())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ProcessParser::clientDataInfo(QXmlStreamReader &xmlReader,ClientHandler *client)
|
||||||
|
{
|
||||||
|
DataInfo *dataInfo = new DataInfo;
|
||||||
|
|
||||||
|
foreach(const QXmlStreamAttribute &attr, xmlReader.attributes())
|
||||||
|
{
|
||||||
|
QString name = attr.name().toString();
|
||||||
|
QString value = attr.value().toString();
|
||||||
|
|
||||||
|
if(name == "path")
|
||||||
|
dataInfo->path= value.toUtf8();
|
||||||
|
|
||||||
|
if(name == "size")
|
||||||
|
dataInfo->size = value.toLong();
|
||||||
|
}
|
||||||
|
|
||||||
|
processingSystem->setCurrentDataInfo(dataInfo);
|
||||||
|
|
||||||
|
}
|
||||||
void ProcessParser::clientAuth(QXmlStreamReader &xmlReader,ClientHandler *client)
|
void ProcessParser::clientAuth(QXmlStreamReader &xmlReader,ClientHandler *client)
|
||||||
{
|
{
|
||||||
ClientAutorization clientAutorization;
|
ClientAutorization clientAutorization;
|
||||||
|
|||||||
@@ -2,9 +2,9 @@
|
|||||||
#define PROCESSPARSER_H
|
#define PROCESSPARSER_H
|
||||||
|
|
||||||
#include <QObject>
|
#include <QObject>
|
||||||
#include <Data/typesDataServerClient.h>
|
|
||||||
#include <qxmlstream.h>
|
#include <qxmlstream.h>
|
||||||
#include <clienthandler.h>
|
#include <clienthandler.h>
|
||||||
|
#include "Data/typesDataServerClient.h"
|
||||||
|
|
||||||
class ProcessParser : public QObject
|
class ProcessParser : public QObject
|
||||||
{
|
{
|
||||||
@@ -26,6 +26,7 @@ private:
|
|||||||
void queryTasksXML(QXmlStreamReader &xmlReader,ClientHandler *client);
|
void queryTasksXML(QXmlStreamReader &xmlReader,ClientHandler *client);
|
||||||
void clientMessage(QXmlStreamReader &xmlReader,ClientHandler *client);
|
void clientMessage(QXmlStreamReader &xmlReader,ClientHandler *client);
|
||||||
void clientNotify(QXmlStreamReader &xmlReader,ClientHandler *client);
|
void clientNotify(QXmlStreamReader &xmlReader,ClientHandler *client);
|
||||||
|
void clientDataInfo(QXmlStreamReader &xmlReader, ClientHandler *client);
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // PROCESSPARSER_H
|
#endif // PROCESSPARSER_H
|
||||||
|
|||||||
@@ -170,22 +170,13 @@ void AssetsManager::addVersion(StreamingVersionData *data)
|
|||||||
void AssetsManager::createCopyVersion(QString versionName,QString newVersionName,QString author)
|
void AssetsManager::createCopyVersion(QString versionName,QString newVersionName,QString author)
|
||||||
{
|
{
|
||||||
qDebug() << "assetManager thread ID " << QThread::currentThreadId();
|
qDebug() << "assetManager thread ID " << QThread::currentThreadId();
|
||||||
QListIterator<StreamingVersionData*> iterator(*datas);
|
|
||||||
StreamingVersionData* data = new StreamingVersionData;
|
StreamingVersionData* data = new StreamingVersionData;
|
||||||
|
|
||||||
while (iterator.hasNext())
|
data->setAbsolutePath(Tools::createSharedPath("/" + newVersionName));
|
||||||
{
|
|
||||||
StreamingVersionData *version = iterator.next();
|
|
||||||
|
|
||||||
if (version->getViewName() == versionName)
|
|
||||||
{
|
|
||||||
data->setAbsolutePath(version->getAbsolutPath());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
data->setAuthor(author);
|
data->setAuthor(author);
|
||||||
data->setIsChangeable(true);
|
data->setIsChangeable(true);
|
||||||
data->setViewName(newVersionName);
|
data->setViewName(newVersionName);
|
||||||
|
data->setCreateData(QDateTime::currentDateTime());
|
||||||
datas->append(data);
|
datas->append(data);
|
||||||
|
|
||||||
qDebug() << "Version for copy " << versionName;
|
qDebug() << "Version for copy " << versionName;
|
||||||
@@ -282,7 +273,7 @@ void AssetsManager::copyAllRecurse(QString source,QString destination)
|
|||||||
void AssetsManager::writeVersionsToFile(QList<StreamingVersionData*> version,bool isFirst)
|
void AssetsManager::writeVersionsToFile(QList<StreamingVersionData*> version,bool isFirst)
|
||||||
{
|
{
|
||||||
QList<SXmlAnswerTag> listTag;
|
QList<SXmlAnswerTag> listTag;
|
||||||
|
datas->clear();
|
||||||
QFile file(versionListFile);
|
QFile file(versionListFile);
|
||||||
|
|
||||||
foreach(StreamingVersionData* ver,version)
|
foreach(StreamingVersionData* ver,version)
|
||||||
@@ -295,7 +286,9 @@ void AssetsManager::writeVersionsToFile(QList<StreamingVersionData*> version,boo
|
|||||||
if(isFirst)
|
if(isFirst)
|
||||||
{
|
{
|
||||||
attribute3 = {"isChangeable",QString::number(false)};
|
attribute3 = {"isChangeable",QString::number(false)};
|
||||||
attribute4 = {"author",tr("Константа-дизайн")};
|
QString author = tr("Константа-дизайн");
|
||||||
|
attribute4 = {"author",author};
|
||||||
|
ver->setAuthor(author);
|
||||||
}else
|
}else
|
||||||
{
|
{
|
||||||
attribute3 ={"isChangeable",QString::number(ver->getIsChangeable())};
|
attribute3 ={"isChangeable",QString::number(ver->getIsChangeable())};
|
||||||
@@ -337,7 +330,7 @@ void AssetsManager::writeVersionsToFile(QList<StreamingVersionData*> version,boo
|
|||||||
void AssetsManager::createFirstVersionListXML(QList<StreamingVersionData*> version) //TODO: переименовать и перебросить в AssetManager
|
void AssetsManager::createFirstVersionListXML(QList<StreamingVersionData*> version) //TODO: переименовать и перебросить в AssetManager
|
||||||
{
|
{
|
||||||
QFile file(versionListFile);
|
QFile file(versionListFile);
|
||||||
|
QList<StreamingVersionData*> *temp = new QList<StreamingVersionData*>();
|
||||||
if(!file.exists())
|
if(!file.exists())
|
||||||
{
|
{
|
||||||
writeVersionsToFile(version,true);
|
writeVersionsToFile(version,true);
|
||||||
@@ -353,16 +346,20 @@ void AssetsManager::createFirstVersionListXML(QList<StreamingVersionData*> versi
|
|||||||
{
|
{
|
||||||
if(ver->getViewName() == data->getViewName())
|
if(ver->getViewName() == data->getViewName())
|
||||||
{
|
{
|
||||||
data->setAbsolutePath(ver->getAbsolutPath());
|
StreamingVersionData *tempData = new StreamingVersionData;
|
||||||
|
|
||||||
|
tempData->fill(data);
|
||||||
|
tempData->setAbsolutePath(ver->getAbsolutPath());
|
||||||
|
temp->append(tempData);
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
writeVersionsToFile(*datas,false);
|
writeVersionsToFile(*temp,false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void AssetsManager::saveVersionToFile(StreamingVersionData *streamingVersion) //TODO: переименовать и перебросить в AssetManager
|
void AssetsManager::saveVersionToFile(StreamingVersionData *streamingVersion) //TODO: переименовать и перебросить в AssetManager
|
||||||
|
|||||||
@@ -24,6 +24,7 @@ void ProcessingSystem::initialize(ServerLMSWidget *server,
|
|||||||
|
|
||||||
connect(this,&ProcessingSystem::sigAuthChanged,commonClientHandler, &CommonClientHandler::slot_AuthChanged,Qt::AutoConnection);
|
connect(this,&ProcessingSystem::sigAuthChanged,commonClientHandler, &CommonClientHandler::slot_AuthChanged,Qt::AutoConnection);
|
||||||
connect(this,&ProcessingSystem::sigUpdateListClients,server, &ServerLMSWidget::slotUpdateListClients,Qt::AutoConnection);
|
connect(this,&ProcessingSystem::sigUpdateListClients,server, &ServerLMSWidget::slotUpdateListClients,Qt::AutoConnection);
|
||||||
|
connect(this,&ProcessingSystem::sigSetData,updateController,&UpdateController::setDataInfo,Qt::AutoConnection);
|
||||||
connect(this,&ProcessingSystem::signal_msgToClientReady,commonClientHandler, &CommonClientHandler::slot_msgToClientFromGUI);
|
connect(this,&ProcessingSystem::signal_msgToClientReady,commonClientHandler, &CommonClientHandler::slot_msgToClientFromGUI);
|
||||||
connect(this,&ProcessingSystem::signal_msgFromClientReady,commonClientHandler, &CommonClientHandler::slot_msgToGUIfromClient);
|
connect(this,&ProcessingSystem::signal_msgFromClientReady,commonClientHandler, &CommonClientHandler::slot_msgToGUIfromClient);
|
||||||
connect(this,&ProcessingSystem::sigLogMessage,logger,&Logger::addTextToLogger,Qt::QueuedConnection);
|
connect(this,&ProcessingSystem::sigLogMessage,logger,&Logger::addTextToLogger,Qt::QueuedConnection);
|
||||||
@@ -335,5 +336,10 @@ void ProcessingSystem::processingClientNotify(ClientHandler *client, ClientNotif
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ProcessingSystem::setCurrentDataInfo(DataInfo *dataInfo)
|
||||||
|
{
|
||||||
|
emit sigSetData(dataInfo);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -38,6 +38,7 @@ public:
|
|||||||
void processingFromClientMessage(ClientHandler *client, ClientMessage clientMessage);
|
void processingFromClientMessage(ClientHandler *client, ClientMessage clientMessage);
|
||||||
void processingClientNotify(ClientHandler *client, ClientNotify clientNotify);
|
void processingClientNotify(ClientHandler *client, ClientNotify clientNotify);
|
||||||
|
|
||||||
|
void setCurrentDataInfo(DataInfo *dataInfo);
|
||||||
signals:
|
signals:
|
||||||
void sigUpdateListClients();
|
void sigUpdateListClients();
|
||||||
void sigAuthChanged();
|
void sigAuthChanged();
|
||||||
@@ -45,6 +46,7 @@ signals:
|
|||||||
void sigAddToMessanger(QString login,QString text);
|
void sigAddToMessanger(QString login,QString text);
|
||||||
void signal_msgToClientReady(QString login, QString text);
|
void signal_msgToClientReady(QString login, QString text);
|
||||||
void signal_msgFromClientReady(QString login, QString text);
|
void signal_msgFromClientReady(QString login, QString text);
|
||||||
|
void sigSetData(DataInfo *dataInfo);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
CommonClientHandler *commonClientServer;
|
CommonClientHandler *commonClientServer;
|
||||||
|
|||||||
@@ -66,6 +66,11 @@ QString Tools::createStreamingToRealPath(QString path,StreamingVersionData* stre
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QString Tools::createVersionHashFilepath(QString fileName)
|
||||||
|
{
|
||||||
|
return staticDataFolderName + "/" + fileName + "Hash.xml";
|
||||||
|
}
|
||||||
|
|
||||||
QString Tools::createUpdateFilePath(QString path)
|
QString Tools::createUpdateFilePath(QString path)
|
||||||
{
|
{
|
||||||
//qDebug() << "Full path: " << path;
|
//qDebug() << "Full path: " << path;
|
||||||
|
|||||||
@@ -56,6 +56,7 @@ public:
|
|||||||
static QString createSharedPath(QString path);
|
static QString createSharedPath(QString path);
|
||||||
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);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -193,6 +193,11 @@ void UpdateController::setUpCurrentServerHash()
|
|||||||
saveHash(hashFileName,fileList);
|
saveHash(hashFileName,fileList);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void UpdateController::setDataInfo(DataInfo *value)
|
||||||
|
{
|
||||||
|
dataInfo = value;
|
||||||
|
}
|
||||||
|
|
||||||
QString UpdateController::getCurrentStreamingPath() const
|
QString UpdateController::getCurrentStreamingPath() const
|
||||||
{
|
{
|
||||||
return currentStreamingPath;
|
return currentStreamingPath;
|
||||||
@@ -428,7 +433,7 @@ void UpdateController::calculateSharedHash()
|
|||||||
if (fileInfo.fileName() == "." || fileInfo.fileName() == "..")
|
if (fileInfo.fileName() == "." || fileInfo.fileName() == "..")
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
QString fileName = staticDataFolderName + "/" + fileInfo.fileName() + "Hash.xml";
|
QString fileName = Tools::createVersionHashFilepath(fileInfo.fileName());
|
||||||
|
|
||||||
fileList = calculateHash(fileInfo.absoluteFilePath());
|
fileList = calculateHash(fileInfo.absoluteFilePath());
|
||||||
saveHash(fileName,fileList);
|
saveHash(fileName,fileList);
|
||||||
|
|||||||
@@ -56,6 +56,8 @@ public:
|
|||||||
QString getPathAdditionalFile(QString name);
|
QString getPathAdditionalFile(QString name);
|
||||||
|
|
||||||
StreamingVersionData *getCurrentVersion();
|
StreamingVersionData *getCurrentVersion();
|
||||||
|
void setDataInfo(DataInfo *value);
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
void changeAssetVersion(QString versionName);
|
void changeAssetVersion(QString versionName);
|
||||||
void createCopyVersion(QString versionName,QString newVersionName,QString author);
|
void createCopyVersion(QString versionName,QString newVersionName,QString author);
|
||||||
|
|||||||
Reference in New Issue
Block a user