MCPcopy Create free account
hub / github.com/KDE/kdevelop / save

Method save

kdevplatform/shell/savedialog.cpp:80–101  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

78}
79
80void KSaveSelectDialog::save( )
81{
82 auto resultCode = DialogCode::Accepted;
83
84 const QPointer thisGuard(this);
85 for (int i = 0, count = m_listWidget->count(); i < count; ++i) {
86 auto* item = static_cast<DocumentItem*>(m_listWidget->item(i));
87 if (item->data(Qt::CheckStateRole).toBool()) {
88 if (!item->doc()->save()) {
89 if (!thisGuard) {
90 return; // already destroyed (KDevelop is probably exiting now)
91 }
92 // Reject because the user canceled saving a document.
93 // Keep saving the remaining selected documents, because the user opted
94 // to save them all, and we assume this canceled document is an exception.
95 resultCode = DialogCode::Rejected;
96 }
97 }
98 }
99
100 done(resultCode);
101}
102
103#include "moc_savedialog.cpp"

Callers 6

saveSomeDocumentsMethod · 0.45
paintFunction · 0.45
slotProjectClosingMethod · 0.45
saveAreaMethod · 0.45
contentMethod · 0.45
applyMethod · 0.45

Calls 4

countMethod · 0.45
itemMethod · 0.45
dataMethod · 0.45
docMethod · 0.45

Tested by

no test coverage detected