mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-25 17:14:59 +02:00
Review comments
This commit is contained in:
parent
0748682119
commit
423f26f669
3 changed files with 2 additions and 9 deletions
|
@ -3462,7 +3462,7 @@ void Application::reloadAllScripts() {
|
|||
|
||||
void Application::uploadFST() {
|
||||
FstReader reader;
|
||||
if(reader.zip()) {
|
||||
if (reader.zip()) {
|
||||
reader.send();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -31,7 +31,6 @@ Q_DECLARE_METATYPE(OAuthAccessToken)
|
|||
Q_DECLARE_METATYPE(DataServerAccountInfo)
|
||||
Q_DECLARE_METATYPE(QNetworkAccessManager::Operation)
|
||||
Q_DECLARE_METATYPE(JSONCallbackParameters)
|
||||
Q_DECLARE_METATYPE(QHttpMultiPart)
|
||||
|
||||
const QString ACCOUNTS_GROUP = "accounts";
|
||||
|
||||
|
|
|
@ -38,9 +38,7 @@ FstReader::FstReader() :
|
|||
}
|
||||
|
||||
FstReader::~FstReader() {
|
||||
if (_dataMultiPart) {
|
||||
delete _dataMultiPart;
|
||||
}
|
||||
delete _dataMultiPart;
|
||||
}
|
||||
|
||||
bool FstReader::zip() {
|
||||
|
@ -87,7 +85,6 @@ bool FstReader::zip() {
|
|||
QHttpPart textPart;
|
||||
textPart.setHeader(QNetworkRequest::ContentDispositionHeader, "form-data;"
|
||||
" name=\"model_name\"");
|
||||
//textPart.setRawHeader("name", "\"model_name\"");
|
||||
textPart.setBody(line[1].toUtf8());
|
||||
_dataMultiPart->append(textPart);
|
||||
} else if (line.first() == FILENAME_FIELD) {
|
||||
|
@ -141,7 +138,6 @@ bool FstReader::send() {
|
|||
|
||||
AccountManager::getInstance().authenticatedRequest(MODEL_URL, QNetworkAccessManager::PostOperation, JSONCallbackParameters(), QByteArray(), _dataMultiPart);
|
||||
|
||||
_dataMultiPart = NULL;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -213,8 +209,6 @@ bool FstReader::addPart(const QString &path, const QString& name) {
|
|||
_dataMultiPart->append(part);
|
||||
file->setParent(_dataMultiPart);
|
||||
|
||||
qDebug() << QFileInfo(*file).fileName().toUtf8();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue