App: improve whitespaces

This commit is contained in:
wmayer
2022-08-01 01:29:47 +02:00
parent 1a457d0fb9
commit a7172cd730
8 changed files with 21 additions and 20 deletions

View File

@@ -30,10 +30,10 @@ using namespace App;
PROPERTY_SOURCE(App::Annotation, App::DocumentObject)
Annotation::Annotation()
Annotation::Annotation()
{
ADD_PROPERTY(LabelText ,(""));
ADD_PROPERTY(Position,(Base::Vector3d()));
ADD_PROPERTY(LabelText, (""));
ADD_PROPERTY(Position, (Base::Vector3d()));
}
Annotation::~Annotation() = default;
@@ -43,11 +43,11 @@ Annotation::~Annotation() = default;
PROPERTY_SOURCE(App::AnnotationLabel, App::DocumentObject)
AnnotationLabel::AnnotationLabel()
AnnotationLabel::AnnotationLabel()
{
ADD_PROPERTY_TYPE(LabelText,(""),"Label",Prop_Output,"Text label of the annotation");
ADD_PROPERTY_TYPE(BasePosition,(Base::Vector3d()),"Label",Prop_Output,"Base position");
ADD_PROPERTY_TYPE(TextPosition,(Base::Vector3d()),"Label",Prop_Output,"Text position");
ADD_PROPERTY_TYPE(LabelText, (""), "Label",Prop_Output, "Text label of the annotation");
ADD_PROPERTY_TYPE(BasePosition, (Base::Vector3d()), "Label", Prop_Output, "Base position");
ADD_PROPERTY_TYPE(TextPosition, (Base::Vector3d()), "Label", Prop_Output, "Text position");
}
AnnotationLabel::~AnnotationLabel() = default;

View File

@@ -140,7 +140,7 @@
# include <new>
#endif
FC_LOG_LEVEL_INIT("App",true,true)
FC_LOG_LEVEL_INIT("App", true, true)
using namespace App;
using namespace Base;
@@ -159,7 +159,7 @@ ParameterManager *App::Application::_pcUserParamMngr;
Base::ConsoleObserverStd *Application::_pConsoleObserverStd = nullptr;
Base::ConsoleObserverFile *Application::_pConsoleObserverFile = nullptr;
AppExport std::map<std::string,std::string> Application::mConfig;
AppExport std::map<std::string, std::string> Application::mConfig;
// Custom Python exception types
BaseExport extern PyObject* Base::PyExc_FC_GeneralError;

View File

@@ -253,8 +253,8 @@ void DocumentObserverPython::slotCloseTransaction(bool abort)
}
}
void DocumentObserverPython::slotBeforeChangeDocument(const App::Document& Doc, const App::Property& Prop)
{
void DocumentObserverPython::slotBeforeChangeDocument(const App::Document& Doc, const App::Property& Prop)
{
Base::PyGILStateLocker lock;
try {
Py::Tuple args(2);
@@ -273,7 +273,7 @@ void DocumentObserverPython::slotBeforeChangeDocument(const App::Document& Doc,
}
}
void DocumentObserverPython::slotChangedDocument(const App::Document& Doc, const App::Property& Prop)
void DocumentObserverPython::slotChangedDocument(const App::Document& Doc, const App::Property& Prop)
{
Base::PyGILStateLocker lock;
try {
@@ -487,7 +487,7 @@ void DocumentObserverPython::slotRemoveDynamicProperty(const App::Property& Prop
catch (Py::Exception&) {
Base::PyException e; // extract the Python error text
e.ReportException();
}
}
}
void DocumentObserverPython::slotChangePropertyEditor(const App::Document &, const App::Property& Prop)

View File

@@ -172,7 +172,7 @@ Property* DynamicProperty::addDynamicProperty(PropertyContainer &pc, const char*
if(prop && prop->getContainer()==&pc)
FC_THROWM(Base::NameError, "Property " << pc.getFullName() << '.' << name << " already exists");
if(Base::Tools::getIdentifier(name) != name)
if(Base::Tools::getIdentifier(name) != name)
FC_THROWM(Base::NameError, "Invalid property name '" << name << "'");
Base::Type propType = Base::Type::getTypeIfDerivedFrom(type, App::Property::getClassTypeId(), true);

View File

@@ -909,7 +909,7 @@ ExpressionDeps Expression::getDeps(int option) const {
}
void Expression::getDepObjects(
std::map<App::DocumentObject*,bool> &deps, std::vector<std::string> *labels) const
std::map<App::DocumentObject*,bool> &deps, std::vector<std::string> *labels) const
{
for(auto &v : getIdentifiers()) {
bool hidden = v.second;

View File

@@ -63,12 +63,12 @@ public:
virtual App::PropertyLinkBase* getPropertyLink() {return nullptr;}
protected:
void getIdentifiers(Expression &e, std::map<App::ObjectIdentifier, bool> &);
void getIdentifiers(Expression &e, std::map<App::ObjectIdentifier, bool> &);
bool adjustLinks(Expression &e, const std::set<App::DocumentObject*> &inList);
bool relabeledDocument(Expression &e, const std::string &oldName, const std::string &newName);
bool renameObjectIdentifier(Expression &e,
const std::map<ObjectIdentifier,ObjectIdentifier> &, const ObjectIdentifier &);
void collectReplacement(Expression &e, std::map<ObjectIdentifier,ObjectIdentifier> &,
void collectReplacement(Expression &e, std::map<ObjectIdentifier,ObjectIdentifier> &,
const App::DocumentObject *parent, App::DocumentObject *oldObj, App::DocumentObject *newObj) const;
bool updateElementReference(Expression &e, App::DocumentObject *feature,bool reverse);
void importSubNames(Expression &e, const ObjectIdentifier::SubNameMap &subNameMap);

View File

@@ -25,6 +25,7 @@
#define APP_MERGEDOCUMENTS_H
#include <Base/Persistence.h>
#include <boost/signals2.hpp>
namespace zipios {
class ZipInputStream;

View File

@@ -274,10 +274,10 @@ void PropertyVectorList::setValue(double x, double y, double z)
PyObject *PropertyVectorList::getPyObject()
{
PyObject* list = PyList_New( getSize() );
PyObject* list = PyList_New(getSize());
for (int i = 0;i<getSize(); i++)
PyList_SetItem( list, i, new VectorPy( _lValueList[i]));
for (int i = 0;i < getSize(); i++)
PyList_SetItem(list, i, new VectorPy(_lValueList[i]));
return list;
}