MCPcopy Create free account
hub / github.com/LibrePCB/LibrePCB / duplicateLibraryElement

Function duplicateLibraryElement

libs/librepcb/editor/mainwindow.cpp:136–141  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

134
135template <typename T>
136static void duplicateLibraryElement(T& element, const T& other) {
137 element.duplicateFrom(other);
138 element.setCreated(QDateTime::currentDateTime());
139 element.setVersion(Version::fromString("0.1"));
140 element.setNames(copyLibraryElementNames(other.getNames()));
141}
142
143/*******************************************************************************
144 * Constructors / Destructor

Callers 1

Calls 5

copyLibraryElementNamesFunction · 0.85
duplicateFromMethod · 0.45
setCreatedMethod · 0.45
setVersionMethod · 0.45
setNamesMethod · 0.45

Tested by

no test coverage detected