Fix some copyright issues reported by luzpaz
Fix some typos reported by kkremitzi Remove resetTouched which was dead code following update on Document management
This commit is contained in:
committed by
wmayer
parent
1ac6d74c4b
commit
dda591ec6e
@@ -1295,24 +1295,6 @@ void Document::emptyDocument()
|
||||
this->d->lastObjectId = 0;
|
||||
}
|
||||
|
||||
void Document::resetTouched()
|
||||
{
|
||||
/*
|
||||
for (std::map<std::string,DocumentObject*>::iterator It= this->d->objectMap.begin();It!=this->d->objectMap.end();++It) {
|
||||
It->second->connectRelabelSignals();
|
||||
try {
|
||||
It->second->onDocumentRestored();
|
||||
It->second->ExpressionEngine.onDocumentRestored();
|
||||
}
|
||||
catch (const Base::Exception& e) {
|
||||
Base::Console().Error("Error in %s: %s\n", It->second->Label.getValue(), e.what());
|
||||
}
|
||||
It->second->purgeTouched();
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
|
||||
|
||||
void Document::clearUndos()
|
||||
{
|
||||
|
||||
@@ -180,7 +180,6 @@ public:
|
||||
//@}
|
||||
|
||||
|
||||
void resetTouched();
|
||||
void emptyDocument();
|
||||
|
||||
/** @name File handling of the document */
|
||||
|
||||
@@ -263,7 +263,7 @@ Cloud::CloudReader::CloudReader(const char* Url, const char* AccessKey, const ch
|
||||
sprintf(header_data,"Date: %s", date_formatted);
|
||||
chunk = curl_slist_append(chunk, header_data);
|
||||
chunk = curl_slist_append(chunk, "Content-Type: application/xml");
|
||||
std::string digest_str;
|
||||
std::string digest_str;
|
||||
digest_str=Base::base64_encode(digest,strlen((const char *)digest));
|
||||
sprintf(header_data,"Authorization: AWS %s:%s", this->AccessKey,
|
||||
digest_str.c_str());
|
||||
@@ -329,7 +329,7 @@ void Cloud::CloudReader::DownloadFile(Cloud::CloudReader::FileEntry *entry)
|
||||
|
||||
// CHANGEME
|
||||
sprintf(StringToSign,"GET\n\napplication/octet-stream\n%s\n/%s/%s", date_formatted, this->Bucket, entry->FileName);
|
||||
|
||||
printf("Reading %s\n",entry->FileName);
|
||||
// We have to use HMAC encoding and SHA1
|
||||
digest=HMAC(EVP_sha1(),this->SecretKey,strlen(this->SecretKey),
|
||||
(const unsigned char *)&StringToSign,strlen(StringToSign),NULL,NULL);
|
||||
@@ -357,6 +357,7 @@ void Cloud::CloudReader::DownloadFile(Cloud::CloudReader::FileEntry *entry)
|
||||
sprintf(header_data,"%s:%s/%s/%s", this->Url,this->TcpPort,
|
||||
this->Bucket,entry->FileName);
|
||||
curl_easy_setopt(curl, CURLOPT_URL, header_data);
|
||||
curl_easy_setopt(curl, CURLOPT_VERBOSE, 1);
|
||||
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, CurlWrite_CallbackFunc_StdString);
|
||||
curl_easy_setopt(curl, CURLOPT_WRITEDATA, &s);
|
||||
// curl read a file not a memory buffer (it shall be able to do it)
|
||||
@@ -617,6 +618,7 @@ void readFiles(Cloud::CloudReader reader, Base::XMLReader *xmlreader)
|
||||
|
||||
std::vector<Base::XMLReader::FileEntry>::const_iterator it = xmlreader->FileList.begin();
|
||||
while ( it != xmlreader->FileList.end()) {
|
||||
printf("Reading in ReadFiles %s\n",it->FileName.c_str());
|
||||
if ( reader.isTouched(it->FileName.c_str()) == 0 )
|
||||
{
|
||||
Base::Reader localreader(reader.GetEntry(it->FileName.c_str())->FileStream,it->FileName, xmlreader->FileVersion);
|
||||
@@ -680,10 +682,7 @@ bool Cloud::Module::cloudRestore (const char *BucketName)
|
||||
|
||||
// reset all touched
|
||||
|
||||
doc->resetTouched();
|
||||
|
||||
// if(!doc->delaySignal)
|
||||
doc->afterRestore(true);
|
||||
doc->afterRestore(true);
|
||||
|
||||
GetApplication().signalFinishRestoreDocument(*doc);
|
||||
doc->setStatus(Document::Restoring, false);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/***************************************************************************
|
||||
* Copyright (c) YEAR YOUR NAME <Your e-mail address> *
|
||||
* Copyright (c) 2019 jmverdun3@gmail.com *
|
||||
* *
|
||||
* This file is part of the FreeCAD CAx development system. *
|
||||
* *
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/***************************************************************************
|
||||
* Copyright (c) YEAR YOUR NAME <Your e-mail address> *
|
||||
* Copyright (c) 2019 jmverdun3@gmail.com *
|
||||
* *
|
||||
* This file is part of the FreeCAD CAx development system. *
|
||||
* *
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/***************************************************************************
|
||||
* Copyright (c) YEAR YOUR NAME <Your e-mail address> *
|
||||
* Copyright (c) 2019 jmverdun3@gmail.com *
|
||||
* *
|
||||
* This file is part of the FreeCAD CAx development system. *
|
||||
* *
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/***************************************************************************
|
||||
* Copyright (c) YEAR YOUR NAME <Your e-mail address> *
|
||||
* Copyright (c) 2019 jmverdun3@gmail.com *
|
||||
* *
|
||||
* This file is part of the FreeCAD CAx development system. *
|
||||
* *
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/***************************************************************************
|
||||
* Copyright (c) YEAR YOUR NAME <Your e-mail address> *
|
||||
* Copyright (c) 2019 jmverdun3@gmail.com *
|
||||
* *
|
||||
* This file is part of the FreeCAD CAx development system. *
|
||||
* *
|
||||
|
||||
Reference in New Issue
Block a user