MCPcopy Create free account
hub / github.com/KDE/labplot / ~Project

Method ~Project

src/backend/core/Project.cpp:209–232  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

207}
208
209Project::~Project() {
210 Q_D(Project);
211 Q_EMIT aboutToClose();
212#ifndef SDK
213 // if the project is being closed and the live data sources still continue reading the data,
214 // the dependent objects (columns, etc.), which are already deleted maybe here, are still being notified about the changes.
215 //->stop reading the live data sources prior to deleting all objects.
216 for (auto* lds : children<LiveDataSource>())
217 lds->pauseReading();
218
219#ifdef HAVE_MQTT
220 for (auto* client : children<MQTTClient>())
221 client->pauseReading();
222#endif
223#endif
224 // if the project is being closed, in Worksheet the scene items are being removed and the selection in the view can change.
225 // don't react on these changes since this can lead crashes (worksheet object is already in the destructor).
226 //->notify all worksheets about the project being closed.
227 for (auto* w : children<Worksheet>(ChildIndexFlag::Recursive))
228 w->setIsClosing();
229
230 d->undo_stack.clear();
231 delete d;
232}
233
234QString Project::version() {
235 return ProjectPrivate::version();

Callers

nothing calls this directly

Calls 3

pauseReadingMethod · 0.45
setIsClosingMethod · 0.45
clearMethod · 0.45

Tested by

no test coverage detected