| 914 | } |
| 915 | |
| 916 | bool KDiff3App::queryClose() |
| 917 | { |
| 918 | saveOptions(KSharedConfig::openConfig()); |
| 919 | |
| 920 | if(m_bOutputModified) |
| 921 | { |
| 922 | KMessageBox::ButtonCode result = Compat::warningTwoActionsCancel(this, |
| 923 | i18n("The merge result has not been saved."), |
| 924 | i18nc("Error dialog title", "Warning"), |
| 925 | KGuiItem(i18n("Save && Quit")), |
| 926 | KGuiItem(i18n("Quit Without Saving"))); |
| 927 | if(result == KMessageBox::Cancel) |
| 928 | return false; |
| 929 | else if(result == Compat::PrimaryAction) |
| 930 | { |
| 931 | slotFileSave(); |
| 932 | if(m_bOutputModified) |
| 933 | { |
| 934 | KMessageBox::error(this, i18n("Saving the merge result failed."), i18nc("Error dialog title", "Warning")); |
| 935 | return false; |
| 936 | } |
| 937 | } |
| 938 | } |
| 939 | |
| 940 | m_bOutputModified = false; |
| 941 | |
| 942 | if(m_pDirectoryMergeWindow->isDirectoryMergeInProgress()) |
| 943 | { |
| 944 | qint32 result = Compat::warningTwoActions(this, |
| 945 | i18n("You are currently doing a folder merge. Are you sure, you want to abort?"), |
| 946 | i18nc("Error dialog title", "Warning"), |
| 947 | KStandardGuiItem::quit(), |
| 948 | KStandardGuiItem::cont() /* i18n("Continue Merging") */); |
| 949 | if(result != Compat::PrimaryAction) |
| 950 | return false; |
| 951 | } |
| 952 | |
| 953 | return true; |
| 954 | } |
| 955 | |
| 956 | ///////////////////////////////////////////////////////////////////// |
| 957 | // SLOT IMPLEMENTATION |
nothing calls this directly
no test coverage detected