App: Fix header uniformity, trailing whitespace, and doxygen headers

This commit is contained in:
luz paz
2020-11-18 15:17:49 -05:00
committed by wwmayer
parent 11c7c4d303
commit bfdffb50be
57 changed files with 886 additions and 850 deletions

View File

@@ -174,9 +174,9 @@ PyMethodDef Application::Methods[] = {
"active transaction causes any document changes to open a transaction with\n"
"the given name and ID."},
{"getActiveTransaction", (PyCFunction) Application::sGetActiveTransaction, METH_VARARGS,
"getActiveTransaction() -> (name,id) return the current active transaction name and ID"},
"getActiveTransaction() -> (name,id) return the current active transaction name and ID"},
{"closeActiveTransaction", (PyCFunction) Application::sCloseActiveTransaction, METH_VARARGS,
"closeActiveTransaction(abort=False) -- commit or abort current active transaction"},
"closeActiveTransaction(abort=False) -- commit or abort current active transaction"},
{"isRestoring", (PyCFunction) Application::sIsRestoring, METH_VARARGS,
"isRestoring() -> Bool -- Test if the application is opening some document"},
{"checkAbort", (PyCFunction) Application::sCheckAbort, METH_VARARGS,
@@ -877,7 +877,7 @@ PyObject *Application::sGetLinksTo(PyObject * /*self*/, PyObject *args)
auto links = GetApplication().getLinksTo(obj,options,count);
Py::Tuple ret(links.size());
int i=0;
for(auto o : links)
for(auto o : links)
ret.setItem(i++,Py::Object(o->getPyObject(),true));
return Py::new_reference_to(ret);
}PY_CATCH;
@@ -901,7 +901,7 @@ PyObject *Application::sGetDependentObjects(PyObject * /*self*/, PyObject *args)
objs.push_back(static_cast<DocumentObjectPy*>(seq[i].ptr())->getDocumentObjectPtr());
}
}else if(!PyObject_TypeCheck(obj,&DocumentObjectPy::Type)) {
PyErr_SetString(PyExc_TypeError,
PyErr_SetString(PyExc_TypeError,
"Expect first argument to be either a document object or sequence of document objects");
return 0;
}else
@@ -911,7 +911,7 @@ PyObject *Application::sGetDependentObjects(PyObject * /*self*/, PyObject *args)
auto ret = App::Document::getDependencyList(objs,options);
Py::Tuple tuple(ret.size());
for(size_t i=0;i<ret.size();++i)
for(size_t i=0;i<ret.size();++i)
tuple.setItem(i,Py::Object(ret[i]->getPyObject(),true));
return Py::new_reference_to(tuple);
} PY_CATCH;
@@ -924,7 +924,7 @@ PyObject *Application::sSetActiveTransaction(PyObject * /*self*/, PyObject *args
PyObject *persist = Py_False;
if (!PyArg_ParseTuple(args, "s|O", &name,&persist))
return 0;
PY_TRY {
Py::Int ret(GetApplication().setActiveTransaction(name,PyObject_IsTrue(persist)));
return Py::new_reference_to(ret);
@@ -935,7 +935,7 @@ PyObject *Application::sGetActiveTransaction(PyObject * /*self*/, PyObject *args
{
if (!PyArg_ParseTuple(args, ""))
return 0;
PY_TRY {
int id = 0;
const char *name = GetApplication().getActiveTransaction(&id);
@@ -954,7 +954,7 @@ PyObject *Application::sCloseActiveTransaction(PyObject * /*self*/, PyObject *ar
int id = 0;
if (!PyArg_ParseTuple(args, "|Oi", &abort,&id))
return 0;
PY_TRY {
GetApplication().closeActiveTransaction(PyObject_IsTrue(abort),id);
Py_Return;