fix MSVC compiler warnings

This commit is contained in:
wmayer
2019-08-17 19:35:21 +02:00
parent ea49e40b78
commit 1c234373d6
3 changed files with 7 additions and 4 deletions

View File

@@ -3892,7 +3892,8 @@ void PropertyXLinkSubList::setPyObject(PyObject *value)
s.reserve(s.size()+subs.size());
s.insert(s.end(),subs.begin(),subs.end());
}
}catch(Base::Exception &e){
}
catch(Base::Exception&){
throw Base::TypeError("Invalid type inside sequence. Must be type of (DocumentObject, (subname...))");
}
setValues(std::move(values));

View File

@@ -768,7 +768,8 @@ void Command::_copyVisual(const char *file, int line, const App::DocumentObject
_doCommand(file,line,Gui,
"%s.ViewObject.%s=getattr(%s.getLinkedObject(True).ViewObject,'%s',%s.ViewObject.%s)",
objCmd.c_str(),attr_to,getObjectCmd(from).c_str(),attr_from,objCmd.c_str(),attr_to);
}catch(Base::Exception &e) {
}
catch(Base::Exception& /*e*/) {
// e.ReportException();
}
}

View File

@@ -1296,9 +1296,10 @@ void StdCmdRefresh::activated(int iMsg)
App::AutoTransaction trans("Recompute");
try {
doCommand(Doc,"App.activeDocument().recompute(None,True,True)");
} catch(Base::Exception &e) {
}
catch (Base::Exception& /*e*/) {
int ret = QMessageBox::warning(getMainWindow(), QObject::tr("Dependency error"),
QObject::tr("The document contains dependency cycles.\n"
qApp->translate("Std_Refresh", "The document contains dependency cycles.\n"
"Please check the Report View for more details.\n\n"
"Do you still want to proceed?"),
QMessageBox::Yes, QMessageBox::No);