History

clean code in GeometryCache around the FBX file loader

Sam Gateau committed 11 years ago

Commit f4e1af61 parent 94cdae01 file · +2 −5Browse files

Showing the changes to interface/src/renderer/GeometryCache.cpp (1 of 1 file). Show all

Unified · Split

interface/src/renderer/GeometryCache.cpp+2−5
@@ -832,7 +832,6 @@ void GeometryReader::run() { · 831 unmodified lines
832 if (!_reply) {832 if (!_reply) {
833 throw QString("Reply is NULL ?!");833 throw QString("Reply is NULL ?!");
834 }834 }
835 QString urlnameQ = _url.path().toLower();
836 std::string urlname = _url.path().toLower().toStdString();835 std::string urlname = _url.path().toLower().toStdString();
837 bool urlValid = true;836 bool urlValid = true;
838 urlValid &= !urlname.empty();837 urlValid &= !urlname.empty();
@@ -841,8 +840,7 @@ void GeometryReader::run() { · 2 unmodified lines
841 || _url.path().toLower().endsWith(".svo");840 || _url.path().toLower().endsWith(".svo");
842 841
843 if (urlValid) {842 if (urlValid) {
844 QString urlnameQ = _url.path().toLower();843 // Let's read the binaries from the network
845 std::string urlnameQstd = urlnameQ.toStdString();
846 QByteArray fileBinary = _reply->readAll();844 QByteArray fileBinary = _reply->readAll();
847 if (fileBinary.isEmpty() || fileBinary.isNull()) {845 if (fileBinary.isEmpty() || fileBinary.isNull()) {
848 throw QString("Read File binary is empty?!");846 throw QString("Read File binary is empty?!");
@@ -868,8 +866,7 @@ void GeometryReader::run() { · 19 unmodified lines
868 } else {866 } else {
869 throw QString("url is invalid");867 throw QString("url is invalid");
870 }868 }
871 // _url.path().toLower().endsWith(".svo") ? readSVO(_reply->readAll()) : readFBX(_reply->readAll(), _mapping)));869
872
873 } catch (const QString& error) {870 } catch (const QString& error) {
874 qDebug() << "Error reading " << _url << ": " << error;871 qDebug() << "Error reading " << _url << ": " << error;
875 QMetaObject::invokeMethod(geometry.data(), "finishedLoading", Q_ARG(bool, false));872 QMetaObject::invokeMethod(geometry.data(), "finishedLoading", Q_ARG(bool, false));