Hello community, here is the log from the commit of package kdeclarative for openSUSE:Factory checked in at 2016-02-24 18:54:07 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/kdeclarative (Old) and /work/SRC/openSUSE:Factory/.kdeclarative.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "kdeclarative" Changes: -------- --- /work/SRC/openSUSE:Factory/kdeclarative/kdeclarative.changes 2016-01-20 09:42:06.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.kdeclarative.new/kdeclarative.changes 2016-02-24 18:54:07.000000000 +0100 @@ -1,0 +2,18 @@ +Sat Feb 6 18:00:35 UTC 2016 - [email protected] + +- Update to 5.19.0 (boo#967668) + * Clean up dependencies for KDeclarative/QuickAddons + * [KWindowSystemProxy] Add setter for showingDesktop + * DropArea: Fix correctly ignoring dragEnter event with + preventStealing + * DragArea: Implement grabbing delegate item + * DragDropEvent: Add ignore() function + * For more details please see: + https://www.kde.org/announcements/kde-frameworks-5.19.0.php + +------------------------------------------------------------------- +Mon Feb 1 17:56:12 UTC 2016 - [email protected] + +- Add missing libKF5CalendarEvents5 to baselibs.conf + +------------------------------------------------------------------- Old: ---- kdeclarative-5.18.0.tar.xz New: ---- kdeclarative-5.19.0.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ kdeclarative.spec ++++++ --- /var/tmp/diff_new_pack.djRMQP/_old 2016-02-24 18:54:08.000000000 +0100 +++ /var/tmp/diff_new_pack.djRMQP/_new 2016-02-24 18:54:08.000000000 +0100 @@ -18,9 +18,9 @@ %bcond_without lang %define lname libKF5Declarative5 -%define _tar_path 5.18 +%define _tar_path 5.19 Name: kdeclarative -Version: 5.18.0 +Version: 5.19.0 Release: 0 %define kf5_version %{version} BuildRequires: cmake >= 2.8.12 ++++++ baselibs.conf ++++++ --- /var/tmp/diff_new_pack.djRMQP/_old 2016-02-24 18:54:08.000000000 +0100 +++ /var/tmp/diff_new_pack.djRMQP/_new 2016-02-24 18:54:08.000000000 +0100 @@ -1,7 +1,9 @@ libKF5Declarative5 libKF5QuickAddons5 +libKF5CalendarEvents5 kdeclarative-components kdeclarative-devel requires "libKF5Declarative5-<targettype> = <version>" requires "libKF5QuickAddons5-<targettype> = <version>" + requires "libKF5CalendarEvents5-<targettype> = <version>" requires "kdeclarative-components-<targettype> = <version>" \ No newline at end of file ++++++ kdeclarative-5.18.0.tar.xz -> kdeclarative-5.19.0.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kdeclarative-5.18.0/CMakeLists.txt new/kdeclarative-5.19.0/CMakeLists.txt --- old/kdeclarative-5.18.0/CMakeLists.txt 2016-01-02 17:29:11.000000000 +0100 +++ new/kdeclarative-5.19.0/CMakeLists.txt 2016-02-06 14:40:53.000000000 +0100 @@ -4,19 +4,19 @@ # Dependencies include(FeatureSummary) -find_package(ECM 5.18.0 NO_MODULE) +find_package(ECM 5.19.0 NO_MODULE) set_package_properties(ECM PROPERTIES TYPE REQUIRED DESCRIPTION "Extra CMake Modules." URL "https://projects.kde.org/projects/kdesupport/extra-cmake-modules") feature_summary(WHAT REQUIRED_PACKAGES_NOT_FOUND FATAL_ON_MISSING_REQUIRED_PACKAGES) set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake ${ECM_MODULE_PATH} ${ECM_KDE_MODULE_DIR}) set(REQUIRED_QT_VERSION "5.3.0") -set(KF5_VERSION "5.18.0") # handled by release scripts -set(KF5_DEP_VERSION "5.18.0") # handled by release scripts +set(KF5_VERSION "5.19.0") # handled by release scripts +set(KF5_DEP_VERSION "5.19.0") # handled by release scripts find_package(Qt5 ${REQUIRED_QT_VERSION} NO_MODULE REQUIRED Qml Quick Gui) include(KDEInstallDirs) -include(KDEFrameworkCompilerSettings) +include(KDEFrameworkCompilerSettings NO_POLICY_SCOPE) include(KDECMakeSettings) find_package(KF5Config ${KF5_DEP_VERSION} REQUIRED) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kdeclarative-5.18.0/KF5DeclarativeConfig.cmake.in new/kdeclarative-5.19.0/KF5DeclarativeConfig.cmake.in --- old/kdeclarative-5.18.0/KF5DeclarativeConfig.cmake.in 2016-01-02 17:29:11.000000000 +0100 +++ new/kdeclarative-5.19.0/KF5DeclarativeConfig.cmake.in 2016-02-06 14:40:53.000000000 +0100 @@ -1,6 +1,6 @@ @PACKAGE_INIT@ -find_dependency(Qt5Qml "@REQUIRED_QT_VERSION@") +find_dependency(Qt5Quick "@REQUIRED_QT_VERSION@") find_dependency(KF5Config "@KF5_DEP_VERSION@") find_dependency(KF5Package "@KF5_DEP_VERSION@") diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kdeclarative-5.18.0/po/nb/kdeclarative5.po new/kdeclarative-5.19.0/po/nb/kdeclarative5.po --- old/kdeclarative-5.18.0/po/nb/kdeclarative5.po 2016-01-02 17:29:11.000000000 +0100 +++ new/kdeclarative-5.19.0/po/nb/kdeclarative5.po 2016-02-06 14:40:53.000000000 +0100 @@ -4,7 +4,7 @@ # Bjørn Steensrud <[email protected]>, 2002, 2003, 2004, 2005, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015. # Eskild Hustvedt <[email protected]>, 2004, 2005. # Gaute Hvoslef Kvalnes <[email protected]>, 2004, 2005. -# Axel Bojer <[email protected]>, 2005, 2006. +# Axel Bojer <[email protected]>, 2005, 2006. # Nils Kristian Tomren <[email protected]>, 2005, 2007. # Øyvind A. Holm <[email protected]>, 2009. msgid "" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kdeclarative-5.18.0/src/qmlcontrols/draganddrop/DeclarativeDragArea.cpp new/kdeclarative-5.19.0/src/qmlcontrols/draganddrop/DeclarativeDragArea.cpp --- old/kdeclarative-5.18.0/src/qmlcontrols/draganddrop/DeclarativeDragArea.cpp 2016-01-02 17:29:11.000000000 +0100 +++ new/kdeclarative-5.19.0/src/qmlcontrols/draganddrop/DeclarativeDragArea.cpp 2016-02-06 14:40:53.000000000 +0100 @@ -33,6 +33,7 @@ #include <QPainter> #include <QQmlContext> #include <QQuickWindow> +#include <QQuickItemGrabResult> #include <QDebug> @@ -231,97 +232,24 @@ } if (m_draggingJustStarted) { - grabMouse(); - m_draggingJustStarted = false; - //qDebug() << "************ DDDD new QDrag" << objectName(); - QDrag *drag = new QDrag(parent()); - DeclarativeMimeData* dataCopy = new DeclarativeMimeData(m_data); //Qt will take ownership of this copy and delete it. - dataCopy->setText(objectName()); - drag->setMimeData(dataCopy); - //qDebug() << "-----> data: dragarea: " << this << x() << y() << " mimedata: " << m_data << (dataCopy->hasColor() ? dataCopy->color().name() : " no color") ; - - const QSize _s(48,48); // FIXME: smarter, please - - if (!m_delegateImage.isNull()) { - drag->setPixmap(QPixmap::fromImage(m_delegateImage)); -// qDebug() << "++++++delegateImage"; - } else { -// qDebug() << "DDD NO Delegte image"; - if (m_delegate) { - // This is just highly unreliable, let's completely skip this - // until we have a non-digusting way of "attaching an item to - // the cursor -// QRectF rf; -// qDebug() << "DDD +++ delegate" << m_delegate; -// rf = QRectF(0, 0, m_delegate->width(), m_delegate->height()); -// rf = m_delegate->mapRectToScene(rf); -// QImage grabbed = window()->grabWindow(); -// //rf = rf.intersected(QRectF(0, 0, grabbed.width(), grabbed.height())); -// grabbed = grabbed.copy(rf.toAlignedRect()); -// // qDebug() << " +++++++++++++++++++++++ dim: " << rf; -// grabbed.save("file:///tmp/grabbed.png"); -// QPixmap pm = QPixmap::fromImage(grabbed); -// qDebug() << " set new pixmap" << grabbed.size(); -// drag->setPixmap(pm); - - } else if (mimeData()->hasImage()) { -// qDebug() << "++++++hasImage"; - QImage im = qvariant_cast<QImage>(mimeData()->imageData()); - drag->setPixmap(QPixmap::fromImage(im)); - } else if (mimeData()->hasColor()) { -// qDebug() << "++++++color"; - QPixmap px(_s); - px.fill(mimeData()->color()); - drag->setPixmap(px); - } else { - // icons otherwise - QStringList icons; -// qDebug() << "DDD adding icons dan maar"; - if (mimeData()->hasText()) { - icons << "text-plain"; - } - if (mimeData()->hasHtml()) { - icons << "text-html"; - } - if (mimeData()->hasUrls()) { - foreach (const QVariant &u, mimeData()->urls()) { - Q_UNUSED(u); - icons << "text-html"; - } - } - if (icons.count()) { - const int _w = 48; - QPixmap pm(_w*icons.count(), _w); - pm.fill(Qt::transparent); - QPainter p(&pm); - int i = 0; - foreach (const QString &ic, icons) { - p.drawPixmap(QPoint(i*_w, 0), QIcon::fromTheme(ic).pixmap(_w, _w)); - i++; - } - p.end(); - drag->setPixmap(pm); - } - //qDebug() << "DD pixmaps set for icons: " << icons; + // Grab delegate before starting drag + if (m_delegate) { + // Another grab is already in progress + if (m_grabResult) { + return; + } + m_grabResult = m_delegate->grabToImage(); + if (m_grabResult) { + connect(m_grabResult.data(), &QQuickItemGrabResult::ready, this, [this]() { + startDrag(m_grabResult->image()); + m_grabResult.reset(); + }); + return; } - } - //drag->setHotSpot(QPoint(drag->pixmap().width()/2, drag->pixmap().height()/2)); // TODO: Make a property for that - //setCursor(Qt::OpenHandCursor); //TODO? Make a property for the cursor - - m_dragActive = true; - emit dragActiveChanged(); - emit dragStarted(); - - Qt::DropAction action = drag->exec(m_supportedActions, m_defaultAction); - setKeepMouseGrab(false); - - m_dragActive = false; - emit dragActiveChanged(); - emit drop(action); - - ungrabMouse(); + // No delegate or grab failed, start drag immediately + startDrag(m_delegateImage); } } @@ -356,3 +284,70 @@ return QQuickItem::childMouseEventFilter(item, event); } + +void DeclarativeDragArea::startDrag(const QImage &image) +{ + grabMouse(); + m_draggingJustStarted = false; + + QDrag *drag = new QDrag(parent()); + DeclarativeMimeData *dataCopy = new DeclarativeMimeData(m_data); //Qt will take ownership of this copy and delete it. + dataCopy->setText(objectName()); + drag->setMimeData(dataCopy); + + const qreal devicePixelRatio = window() ? window()->devicePixelRatio() : 1; + const int imageSize = 48 * devicePixelRatio; + + if (!image.isNull()) { + drag->setPixmap(QPixmap::fromImage(image)); + } else if (mimeData()->hasImage()) { + const QImage im = qvariant_cast<QImage>(mimeData()->imageData()); + drag->setPixmap(QPixmap::fromImage(im)); + } else if (mimeData()->hasColor()) { + QPixmap px(imageSize, imageSize); + px.fill(mimeData()->color()); + drag->setPixmap(px); + } else { + // Icons otherwise + QStringList icons; + if (mimeData()->hasText()) { + icons << QStringLiteral("text-plain"); + } + if (mimeData()->hasHtml()) { + icons << QStringLiteral("text-html"); + } + if (mimeData()->hasUrls()) { + for (int i = 0; i < std::min(4, mimeData()->urls().size()); ++i) { + icons << QStringLiteral("text-html"); + } + } + if (!icons.isEmpty()) { + QPixmap pm(imageSize * icons.count(), imageSize); + pm.fill(Qt::transparent); + QPainter p(&pm); + int i = 0; + foreach (const QString &ic, icons) { + p.drawPixmap(QPoint(i * imageSize, 0), QIcon::fromTheme(ic).pixmap(imageSize)); + i++; + } + p.end(); + drag->setPixmap(pm); + } + } + + //drag->setHotSpot(QPoint(drag->pixmap().width()/2, drag->pixmap().height()/2)); // TODO: Make a property for that + //setCursor(Qt::OpenHandCursor); //TODO? Make a property for the cursor + + m_dragActive = true; + emit dragActiveChanged(); + emit dragStarted(); + + Qt::DropAction action = drag->exec(m_supportedActions, m_defaultAction); + setKeepMouseGrab(false); + + m_dragActive = false; + emit dragActiveChanged(); + emit drop(action); + + ungrabMouse(); +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kdeclarative-5.18.0/src/qmlcontrols/draganddrop/DeclarativeDragArea.h new/kdeclarative-5.19.0/src/qmlcontrols/draganddrop/DeclarativeDragArea.h --- old/kdeclarative-5.18.0/src/qmlcontrols/draganddrop/DeclarativeDragArea.h 2016-01-02 17:29:11.000000000 +0100 +++ new/kdeclarative-5.19.0/src/qmlcontrols/draganddrop/DeclarativeDragArea.h 2016-02-06 14:40:53.000000000 +0100 @@ -26,9 +26,11 @@ #include <QQuickItem> #include <QImage> +#include <QSharedPointer> class QQmlComponent; class DeclarativeMimeData; +class QQuickItemGrabResult; class DeclarativeDragArea : public QQuickItem { @@ -147,9 +149,12 @@ bool childMouseEventFilter(QQuickItem *item, QEvent *event) Q_DECL_OVERRIDE; private: + void startDrag(const QImage &image); + QQuickItem* m_delegate; QQuickItem* m_source; QQuickItem* m_target; + QSharedPointer<QQuickItemGrabResult> m_grabResult; bool m_enabled; bool m_draggingJustStarted; bool m_dragActive; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kdeclarative-5.18.0/src/qmlcontrols/draganddrop/DeclarativeDragDropEvent.cpp new/kdeclarative-5.19.0/src/qmlcontrols/draganddrop/DeclarativeDragDropEvent.cpp --- old/kdeclarative-5.18.0/src/qmlcontrols/draganddrop/DeclarativeDragDropEvent.cpp 2016-01-02 17:29:11.000000000 +0100 +++ new/kdeclarative-5.19.0/src/qmlcontrols/draganddrop/DeclarativeDragDropEvent.cpp 2016-02-06 14:40:53.000000000 +0100 @@ -55,6 +55,11 @@ m_event->accept(); } +void DeclarativeDragDropEvent::ignore() +{ + m_event->ignore(); +} + DeclarativeMimeData* DeclarativeDragDropEvent::mimeData() { if (!m_data && m_event) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kdeclarative-5.18.0/src/qmlcontrols/draganddrop/DeclarativeDragDropEvent.h new/kdeclarative-5.19.0/src/qmlcontrols/draganddrop/DeclarativeDragDropEvent.h --- old/kdeclarative-5.18.0/src/qmlcontrols/draganddrop/DeclarativeDragDropEvent.h 2016-01-02 17:29:11.000000000 +0100 +++ new/kdeclarative-5.19.0/src/qmlcontrols/draganddrop/DeclarativeDragDropEvent.h 2016-02-06 14:40:53.000000000 +0100 @@ -108,6 +108,7 @@ public Q_SLOTS: void accept(int action); + void ignore(); private: int m_x; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kdeclarative-5.18.0/src/qmlcontrols/draganddrop/DeclarativeDropArea.cpp new/kdeclarative-5.19.0/src/qmlcontrols/draganddrop/DeclarativeDropArea.cpp --- old/kdeclarative-5.18.0/src/qmlcontrols/draganddrop/DeclarativeDropArea.cpp 2016-01-02 17:29:11.000000000 +0100 +++ new/kdeclarative-5.19.0/src/qmlcontrols/draganddrop/DeclarativeDropArea.cpp 2016-02-06 14:40:53.000000000 +0100 @@ -63,13 +63,17 @@ DeclarativeDragDropEvent dde(event, this); event->accept(); + emit dragEnter(&dde); + + if (!event->isAccepted()) { + return; + } + if (m_preventStealing) { temporaryInhibitParent(true); } m_oldDragMovePos = event->pos(); - - emit dragEnter(&dde); setContainsDrag(true); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kdeclarative-5.18.0/src/qmlcontrols/kwindowsystemplugin/kwindowsystemproxy.cpp new/kdeclarative-5.19.0/src/qmlcontrols/kwindowsystemplugin/kwindowsystemproxy.cpp --- old/kdeclarative-5.18.0/src/qmlcontrols/kwindowsystemplugin/kwindowsystemproxy.cpp 2016-01-02 17:29:11.000000000 +0100 +++ new/kdeclarative-5.19.0/src/qmlcontrols/kwindowsystemplugin/kwindowsystemproxy.cpp 2016-02-06 14:40:53.000000000 +0100 @@ -93,6 +93,11 @@ return KWindowSystem::showingDesktop(); } +void KWindowSystemProxy::setShowingDesktop(bool showingDesktop) +{ + KWindowSystem::setShowingDesktop(showingDesktop); +} + bool KWindowSystemProxy::compositingActive() const { return KWindowSystem::compositingActive(); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kdeclarative-5.18.0/src/qmlcontrols/kwindowsystemplugin/kwindowsystemproxy.h new/kdeclarative-5.19.0/src/qmlcontrols/kwindowsystemplugin/kwindowsystemproxy.h --- old/kdeclarative-5.18.0/src/qmlcontrols/kwindowsystemplugin/kwindowsystemproxy.h 2016-01-02 17:29:11.000000000 +0100 +++ new/kdeclarative-5.19.0/src/qmlcontrols/kwindowsystemplugin/kwindowsystemproxy.h 2016-02-06 14:40:53.000000000 +0100 @@ -30,7 +30,7 @@ * * Example usage: * @code - * import org.kde.kwindowsystem + * import org.kde.kwindowsystem 1.0 * * KWindowSystem { * id: kwindowsystem @@ -70,7 +70,7 @@ /** * @brief Whether "show desktop" is currently active */ - Q_PROPERTY(bool showingDesktop READ showingDesktop NOTIFY showingDesktopChanged) + Q_PROPERTY(bool showingDesktop READ showingDesktop WRITE setShowingDesktop NOTIFY showingDesktopChanged) /** * @brief Whether desktop compositing is active * @@ -87,7 +87,10 @@ QString currentDesktopName() const; int numberOfDesktops() const; + bool showingDesktop() const; + void setShowingDesktop(bool showingDesktop); + bool compositingActive() const; /** diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kdeclarative-5.18.0/src/quickaddons/CMakeLists.txt new/kdeclarative-5.19.0/src/quickaddons/CMakeLists.txt --- old/kdeclarative-5.18.0/src/quickaddons/CMakeLists.txt 2016-01-02 17:29:11.000000000 +0100 +++ new/kdeclarative-5.19.0/src/quickaddons/CMakeLists.txt 2016-02-06 14:40:53.000000000 +0100 @@ -6,20 +6,15 @@ generate_export_header(KF5QuickAddons EXPORT_FILE_NAME ${CMAKE_CURRENT_BINARY_DIR}/quickaddons_export.h BASE_NAME QuickAddons) add_library(KF5::QuickAddons ALIAS KF5QuickAddons) -# Apps must include <QuickAddons/File> or <quickaddons/file.h> +# Apps must include <KQuickAddons/File> or <kquickaddons/file.h> target_include_directories(KF5QuickAddons INTERFACE "$<INSTALL_INTERFACE:${KDE_INSTALL_INCLUDEDIR_KF5}/KDeclarative>") target_link_libraries(KF5QuickAddons PUBLIC - Qt5::Qml - KF5::CoreAddons + Qt5::Quick PRIVATE - Qt5::Quick #QQuickImageProvider - KF5::ConfigCore # KCoreConfigSkeleton, in ConfigPropertyMap - KF5::I18n #i18n bindings - KF5::KIOWidgets #KIO::AccessManager - KF5::IconThemes #KIconProvider - KF5::Declarative #QmlObject + KF5::I18n + KF5::Declarative ) set_target_properties(KF5QuickAddons diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kdeclarative-5.18.0/src/quickaddons/configmodule.cpp new/kdeclarative-5.19.0/src/quickaddons/configmodule.cpp --- old/kdeclarative-5.18.0/src/quickaddons/configmodule.cpp 2016-01-02 17:29:11.000000000 +0100 +++ new/kdeclarative-5.19.0/src/quickaddons/configmodule.cpp 2016-02-06 14:40:53.000000000 +0100 @@ -26,7 +26,6 @@ #include "configmodule.h" -#include <QLayout> #include <QTimer> #include <QDebug> #include <QUrl>
