Changeset View
Changeset View
Standalone View
Standalone View
shell/documentcontroller.cpp
Show First 20 Lines • Show All 807 Lines • ▼ Show 20 Line(s) | 800 | foreach (IDocument* doc, modifiedDocuments(list)) { | |||
---|---|---|---|---|---|
808 | // TODO if (!ret) showErrorDialog() ? | 808 | // TODO if (!ret) showErrorDialog() ? | ||
809 | } | 809 | } | ||
810 | 810 | | |||
811 | } else { | 811 | } else { | ||
812 | // Ask the user which documents to save | 812 | // Ask the user which documents to save | ||
813 | QList<IDocument*> checkSave = modifiedDocuments(list); | 813 | QList<IDocument*> checkSave = modifiedDocuments(list); | ||
814 | 814 | | |||
815 | if (!checkSave.isEmpty()) { | 815 | if (!checkSave.isEmpty()) { | ||
816 | KSaveSelectDialog dialog(checkSave, qApp->activeWindow()); | 816 | QPointer<KSaveSelectDialog> dialog = | ||
817 | if (dialog.exec() == QDialog::Rejected) | 817 | new KSaveSelectDialog(checkSave, qApp->activeWindow()); | ||
818 | return false; | 818 | bool saved = dialog->exec(); | ||
819 | delete dialog; | ||||
820 | | ||||
821 | return saved; | ||||
819 | } | 822 | } | ||
820 | } | 823 | } | ||
821 | 824 | | |||
822 | return true; | 825 | return true; | ||
823 | } | 826 | } | ||
824 | 827 | | |||
825 | QList< IDocument * > KDevelop::DocumentController::visibleDocumentsInWindow(MainWindow * mw) const | 828 | QList< IDocument * > KDevelop::DocumentController::visibleDocumentsInWindow(MainWindow * mw) const | ||
826 | { | 829 | { | ||
▲ Show 20 Lines • Show All 407 Lines • Show Last 20 Lines |