Changeset View
Changeset View
Standalone View
Standalone View
mainWindow/kpMainWindow_File.cpp
Show All 20 Lines | 1 | /* | |||
---|---|---|---|---|---|
21 | INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | 21 | INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
22 | NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | 22 | NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | ||
23 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | 23 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | ||
24 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 24 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
25 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF | 25 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF | ||
26 | THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 26 | THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
27 | */ | 27 | */ | ||
28 | 28 | | |||
29 | | ||||
30 | #include "kpMainWindow.h" | 29 | #include "kpMainWindow.h" | ||
31 | #include "kpMainWindowPrivate.h" | 30 | #include "kpMainWindowPrivate.h" | ||
32 | 31 | | |||
33 | #include <QAction> | 32 | #include <QAction> | ||
34 | #include <QDataStream> | 33 | #include <QDataStream> | ||
35 | #include <QDesktopWidget> | 34 | #include <QDesktopWidget> | ||
36 | #include <QDialog> | 35 | #include <QDialog> | ||
37 | #include <QDialogButtonBox> | 36 | #include <QDialogButtonBox> | ||
▲ Show 20 Lines • Show All 698 Lines • ▼ Show 20 Line(s) | 731 | QUrl kpMainWindow::askForSaveURL (const QString &caption, | |||
736 | const kpDocumentMetaInfo &docMetaInfo, | 735 | const kpDocumentMetaInfo &docMetaInfo, | ||
737 | const QString &forcedSaveOptionsGroup, | 736 | const QString &forcedSaveOptionsGroup, | ||
738 | bool localOnly, | 737 | bool localOnly, | ||
739 | kpDocumentSaveOptions *chosenSaveOptions, | 738 | kpDocumentSaveOptions *chosenSaveOptions, | ||
740 | bool isSavingForFirstTime, | 739 | bool isSavingForFirstTime, | ||
741 | bool *allowOverwritePrompt, | 740 | bool *allowOverwritePrompt, | ||
742 | bool *allowLossyPrompt) | 741 | bool *allowLossyPrompt) | ||
743 | { | 742 | { | ||
744 | #if DEBUG_KP_MAIN_WINDOW | | |||
745 | qCDebug(kpLogMainWindow) << "kpMainWindow::askForURL() startURL=" << startURL; | 743 | qCDebug(kpLogMainWindow) << "kpMainWindow::askForURL() startURL=" << startURL; | ||
746 | startSaveOptions.printDebug ("\tstartSaveOptions"); | 744 | startSaveOptions.printDebug ("\tstartSaveOptions"); | ||
747 | #endif | | |||
748 | 745 | | |||
749 | bool reparsedConfiguration = false; | 746 | bool reparsedConfiguration = false; | ||
750 | 747 | | |||
751 | // KConfig::readEntry() does not actually reread from disk, hence doesn't | 748 | // KConfig::readEntry() does not actually reread from disk, hence doesn't | ||
752 | // realize what other processes have done e.g. Settings / Show Path | 749 | // realize what other processes have done e.g. Settings / Show Path | ||
753 | // so reparseConfiguration() must be called | 750 | // so reparseConfiguration() must be called | ||
754 | #define SETUP_READ_CFG() \ | 751 | #define SETUP_READ_CFG() \ | ||
755 | if (!reparsedConfiguration) \ | 752 | if (!reparsedConfiguration) \ | ||
▲ Show 20 Lines • Show All 634 Lines • ▼ Show 20 Line(s) | 1366 | { | |||
1390 | } | 1387 | } | ||
1391 | } | 1388 | } | ||
1392 | 1389 | | |||
1393 | //--------------------------------------------------------------------- | 1390 | //--------------------------------------------------------------------- | ||
1394 | 1391 | | |||
1395 | // private virtual [base KMainWindow] | 1392 | // private virtual [base KMainWindow] | ||
1396 | bool kpMainWindow::queryClose () | 1393 | bool kpMainWindow::queryClose () | ||
1397 | { | 1394 | { | ||
1398 | #if DEBUG_KP_MAIN_WINDOW | | |||
1399 | qCDebug(kpLogMainWindow) << "kpMainWindow::queryClose()"; | 1395 | qCDebug(kpLogMainWindow) << "kpMainWindow::queryClose()"; | ||
1400 | #endif | | |||
1401 | toolEndShape (); | 1396 | toolEndShape (); | ||
1402 | 1397 | | |||
1403 | if (!queryCloseDocument ()) | 1398 | if (!queryCloseDocument ()) | ||
1404 | return false; | 1399 | return false; | ||
1405 | 1400 | | |||
1406 | if (!queryCloseColors ()) | 1401 | if (!queryCloseColors ()) | ||
1407 | return false; | 1402 | return false; | ||
1408 | 1403 | | |||
Show All 27 Lines |