diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt --- a/src/core/CMakeLists.txt +++ b/src/core/CMakeLists.txt @@ -150,6 +150,7 @@ Qt5::Xml # davjob.cpp uses QDom KF5::I18n KF5::DBusAddons # KDEInitInterface + KF5::WidgetsAddons ) if (UNIX) diff --git a/src/core/copyjob.cpp b/src/core/copyjob.cpp --- a/src/core/copyjob.cpp +++ b/src/core/copyjob.cpp @@ -46,6 +46,8 @@ #include +#include + #ifdef Q_OS_UNIX #include #endif @@ -884,7 +886,35 @@ slotReport(); qCDebug(KIO_COPYJOB_DEBUG)<<"Stating finished. To copy:"< m_freeSpace) { + SimpleJobPrivate *sjp; + int msgRes; + msgRes = sjp->requestMessageBox(JobUiDelegateExtension::WarningYesNo, + QString("Warning!"), + QString("Yes"), + QString("No"), + i18n("You do not have sufficient space available at %1 (%2 required but only %3 available)." + "Do you still want to continue?", + m_dest.path(), + KIO::convertSize(m_totalSize), + KIO::convertSize(m_freeSpace) + ), + QString(), + QString(), + QString(), + KIO::MetaData() + ); + + if (msgRes == KMessageBox::Yes) { + goto yes; + } else { + return; + } + + } + + yes: if (!dirs.isEmpty()) { emit q->aboutToCreate(q, dirs);