Changeset View
Changeset View
Standalone View
Standalone View
shell/documentcontroller.cpp
Show First 20 Lines • Show All 48 Lines • ▼ Show 20 Line(s) | |||||
49 | #include <sublime/view.h> | 49 | #include <sublime/view.h> | ||
50 | #include <interfaces/iplugincontroller.h> | 50 | #include <interfaces/iplugincontroller.h> | ||
51 | #include <interfaces/iprojectcontroller.h> | 51 | #include <interfaces/iprojectcontroller.h> | ||
52 | #include <interfaces/ibuddydocumentfinder.h> | 52 | #include <interfaces/ibuddydocumentfinder.h> | ||
53 | #include <interfaces/iproject.h> | 53 | #include <interfaces/iproject.h> | ||
54 | #include <interfaces/iselectioncontroller.h> | 54 | #include <interfaces/iselectioncontroller.h> | ||
55 | #include <interfaces/context.h> | 55 | #include <interfaces/context.h> | ||
56 | #include <project/projectmodel.h> | 56 | #include <project/projectmodel.h> | ||
57 | #include <util/scopeddialog.h> | ||||
57 | #include <util/path.h> | 58 | #include <util/path.h> | ||
58 | 59 | | |||
59 | #include "core.h" | 60 | #include "core.h" | ||
60 | #include "mainwindow.h" | 61 | #include "mainwindow.h" | ||
61 | #include "textdocument.h" | 62 | #include "textdocument.h" | ||
62 | #include "uicontroller.h" | 63 | #include "uicontroller.h" | ||
63 | #include "partcontroller.h" | 64 | #include "partcontroller.h" | ||
64 | #include "savedialog.h" | 65 | #include "savedialog.h" | ||
▲ Show 20 Lines • Show All 743 Lines • ▼ Show 20 Line(s) | 801 | foreach (IDocument* doc, modifiedDocuments(list)) { | |||
808 | // TODO if (!ret) showErrorDialog() ? | 809 | // TODO if (!ret) showErrorDialog() ? | ||
809 | } | 810 | } | ||
810 | 811 | | |||
811 | } else { | 812 | } else { | ||
812 | // Ask the user which documents to save | 813 | // Ask the user which documents to save | ||
813 | QList<IDocument*> checkSave = modifiedDocuments(list); | 814 | QList<IDocument*> checkSave = modifiedDocuments(list); | ||
814 | 815 | | |||
815 | if (!checkSave.isEmpty()) { | 816 | if (!checkSave.isEmpty()) { | ||
816 | KSaveSelectDialog dialog(checkSave, qApp->activeWindow()); | 817 | ScopedDialog<KSaveSelectDialog> dialog(checkSave, qApp->activeWindow()); | ||
817 | if (dialog.exec() == QDialog::Rejected) | 818 | return dialog->exec(); | ||
818 | return false; | | |||
819 | } | 819 | } | ||
820 | } | 820 | } | ||
821 | 821 | | |||
822 | return true; | 822 | return true; | ||
823 | } | 823 | } | ||
824 | 824 | | |||
825 | QList< IDocument * > KDevelop::DocumentController::visibleDocumentsInWindow(MainWindow * mw) const | 825 | QList< IDocument * > KDevelop::DocumentController::visibleDocumentsInWindow(MainWindow * mw) const | ||
826 | { | 826 | { | ||
▲ Show 20 Lines • Show All 407 Lines • Show Last 20 Lines |