| 245 | } |
| 246 | |
| 247 | void BuilderJob::start() |
| 248 | { |
| 249 | // Automatically save all documents before starting to build |
| 250 | // might need an option to turn off at some point |
| 251 | // Also should be moved into the builder and there try to find target(s) for the given item and then just save the documents of that target -> list?? |
| 252 | if (ICore::self()->activeSession()->config()->group(QStringLiteral("Project Manager")).readEntry("Save All Documents Before Building", true)) |
| 253 | { |
| 254 | if (!ICore::self()->documentController()->saveAllDocuments( |
| 255 | IDocumentController::SaveSelectionMode::DontAskUser)) { |
| 256 | setError(CouldNotSaveAllDocumentsError); |
| 257 | emitResult(); |
| 258 | return; |
| 259 | } |
| 260 | } |
| 261 | |
| 262 | ExecuteCompositeJob::start(); |
| 263 | } |
| 264 | |
| 265 | #include "moc_builderjob.cpp" |