Changeset View
Changeset View
Standalone View
Standalone View
mainWindow/kpMainWindow_File.cpp
Show First 20 Lines • Show All 468 Lines • ▼ Show 20 Line(s) | 437 | { | |||
---|---|---|---|---|---|
469 | if ( allowMultipleURLs ) { | 469 | if ( allowMultipleURLs ) { | ||
470 | fd.setFileMode(QFileDialog::ExistingFiles); | 470 | fd.setFileMode(QFileDialog::ExistingFiles); | ||
471 | } | 471 | } | ||
472 | 472 | | |||
473 | if ( fd.exec() ) { | 473 | if ( fd.exec() ) { | ||
474 | return fd.selectedUrls(); | 474 | return fd.selectedUrls(); | ||
475 | } | 475 | } | ||
476 | 476 | | |||
477 | return QList<QUrl>(); | 477 | return {}; | ||
478 | } | 478 | } | ||
479 | 479 | | |||
480 | //--------------------------------------------------------------------- | 480 | //--------------------------------------------------------------------- | ||
481 | 481 | | |||
482 | // private slot | 482 | // private slot | ||
483 | void kpMainWindow::slotOpen () | 483 | void kpMainWindow::slotOpen () | ||
484 | { | 484 | { | ||
485 | toolEndShape (); | 485 | toolEndShape (); | ||
▲ Show 20 Lines • Show All 340 Lines • ▼ Show 20 Line(s) | 825 | #if DEBUG_KP_MAIN_WINDOW | |||
826 | QStringList sortedMimeTypes = mimeTypes; | 826 | QStringList sortedMimeTypes = mimeTypes; | ||
827 | sortedMimeTypes.sort (); | 827 | sortedMimeTypes.sort (); | ||
828 | qCDebug(kpLogMainWindow) << "\tmimeTypes=" << mimeTypes | 828 | qCDebug(kpLogMainWindow) << "\tmimeTypes=" << mimeTypes | ||
829 | << "\tsortedMimeTypes=" << sortedMimeTypes; | 829 | << "\tsortedMimeTypes=" << sortedMimeTypes; | ||
830 | #endif | 830 | #endif | ||
831 | if (mimeTypes.isEmpty ()) | 831 | if (mimeTypes.isEmpty ()) | ||
832 | { | 832 | { | ||
833 | qCCritical(kpLogMainWindow) << "No output mimetypes!"; | 833 | qCCritical(kpLogMainWindow) << "No output mimetypes!"; | ||
834 | return QUrl (); | 834 | return {}; | ||
835 | } | 835 | } | ||
836 | 836 | | |||
837 | #define MIME_TYPE_IS_VALID() (!fdSaveOptions.mimeTypeIsInvalid () && \ | 837 | #define MIME_TYPE_IS_VALID() (!fdSaveOptions.mimeTypeIsInvalid () && \ | ||
838 | mimeTypes.contains (fdSaveOptions.mimeType ())) | 838 | mimeTypes.contains (fdSaveOptions.mimeType ())) | ||
839 | if (!MIME_TYPE_IS_VALID ()) | 839 | if (!MIME_TYPE_IS_VALID ()) | ||
840 | { | 840 | { | ||
841 | #if DEBUG_KP_MAIN_WINDOW | 841 | #if DEBUG_KP_MAIN_WINDOW | ||
842 | qCDebug(kpLogMainWindow) << "\tmimeType=" << fdSaveOptions.mimeType () | 842 | qCDebug(kpLogMainWindow) << "\tmimeType=" << fdSaveOptions.mimeType () | ||
▲ Show 20 Lines • Show All 110 Lines • ▼ Show 20 Line(s) | 886 | #endif | |||
953 | 953 | | |||
954 | 954 | | |||
955 | #if DEBUG_KP_MAIN_WINDOW | 955 | #if DEBUG_KP_MAIN_WINDOW | ||
956 | qCDebug(kpLogMainWindow) << "\tselectedUrl=" << fd.selectedUrl (); | 956 | qCDebug(kpLogMainWindow) << "\tselectedUrl=" << fd.selectedUrl (); | ||
957 | #endif | 957 | #endif | ||
958 | return fd.selectedUrl (); | 958 | return fd.selectedUrl (); | ||
959 | } | 959 | } | ||
960 | 960 | | |||
961 | return QUrl (); | 961 | return {}; | ||
962 | #undef SETUP_READ_CFG | 962 | #undef SETUP_READ_CFG | ||
963 | } | 963 | } | ||
964 | 964 | | |||
965 | //--------------------------------------------------------------------- | 965 | //--------------------------------------------------------------------- | ||
966 | 966 | | |||
967 | // private slot | 967 | // private slot | ||
968 | bool kpMainWindow::saveAs (bool localOnly) | 968 | bool kpMainWindow::saveAs (bool localOnly) | ||
969 | { | 969 | { | ||
▲ Show 20 Lines • Show All 555 Lines • Show Last 20 Lines |