Hello community,

here is the log from the commit of package libkscreen2 for openSUSE:Factory 
checked in at 2018-02-06 16:44:16
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/libkscreen2 (Old)
 and      /work/SRC/openSUSE:Factory/.libkscreen2.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "libkscreen2"

Tue Feb  6 16:44:16 2018 rev:61 rq:573035 version:5.12.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/libkscreen2/libkscreen2.changes  2018-01-22 
16:05:56.777224044 +0100
+++ /work/SRC/openSUSE:Factory/.libkscreen2.new/libkscreen2.changes     
2018-02-06 16:44:16.949745940 +0100
@@ -1,0 +2,14 @@
+Fri Feb  2 21:03:43 CET 2018 - fab...@ritter-vogt.de
+
+- Update to 5.12.0
+  * New feature release
+  * For more details please see:
+  * https://www.kde.org/announcements/plasma-5.12.0.php
+- Changes since 5.11.95:
+  * Fix tests after recent changes
+  * Wayland: add support for output type detection
+  * Wayland: don't update output configuration if there are no changes
+  * Don't create multiple in-process backend instances
+  * Wayland: don't share the same Config between backend and clients
+
+-------------------------------------------------------------------

Old:
----
  libkscreen-5.11.95.tar.xz

New:
----
  libkscreen-5.12.0.tar.xz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ libkscreen2.spec ++++++
--- /var/tmp/diff_new_pack.VzoRVS/_old  2018-02-06 16:44:17.529718800 +0100
+++ /var/tmp/diff_new_pack.VzoRVS/_new  2018-02-06 16:44:17.533718613 +0100
@@ -18,7 +18,7 @@
 
 %define lname   libKF5Screen7
 Name:           libkscreen2
-Version:        5.11.95
+Version:        5.12.0
 Release:        0
 # Full Plasma 5 version (e.g. 5.8.95)
 %{!?_plasma5_bugfix: %global _plasma5_bugfix %{version}}
@@ -40,7 +40,7 @@
 License:        GPL-2.0+
 Group:          System/GUI/KDE
 Url:            http://www.kde.org
-Source:         
http://download.kde.org/unstable/plasma/%{version}/libkscreen-%{version}.tar.xz
+Source:         libkscreen-%{version}.tar.xz
 Source1:        baselibs.conf
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 

++++++ libkscreen-5.11.95.tar.xz -> libkscreen-5.12.0.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libkscreen-5.11.95/CMakeLists.txt 
new/libkscreen-5.12.0/CMakeLists.txt
--- old/libkscreen-5.11.95/CMakeLists.txt       2018-01-15 14:34:08.000000000 
+0100
+++ new/libkscreen-5.12.0/CMakeLists.txt        2018-02-01 14:45:54.000000000 
+0100
@@ -1,7 +1,7 @@
 cmake_minimum_required(VERSION 2.8.12)
 
 project(libkscreen)
-set(PROJECT_VERSION "5.11.95")
+set(PROJECT_VERSION "5.12.0")
 
 find_package(ECM 5.14.0 REQUIRED NO_MODULE)
 set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${ECM_MODULE_PATH} 
${ECM_KDE_MODULE_DIR})
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libkscreen-5.11.95/autotests/testkwaylandconfig.cpp 
new/libkscreen-5.12.0/autotests/testkwaylandconfig.cpp
--- old/libkscreen-5.11.95/autotests/testkwaylandconfig.cpp     2018-01-15 
14:34:08.000000000 +0100
+++ new/libkscreen-5.12.0/autotests/testkwaylandconfig.cpp      2018-02-01 
14:45:54.000000000 +0100
@@ -213,6 +213,7 @@
     // Prepare monitor & spy
     KScreen::ConfigMonitor *monitor = KScreen::ConfigMonitor::instance();
     monitor->addConfig(config);
+    monitor->addConfig(config2);
     QSignalSpy configSpy(monitor, 
&KScreen::ConfigMonitor::configurationChanged);
     QSignalSpy configSpy2(monitor, 
&KScreen::ConfigMonitor::configurationChanged);
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libkscreen-5.11.95/backends/fake/fake.cpp 
new/libkscreen-5.12.0/backends/fake/fake.cpp
--- old/libkscreen-5.11.95/backends/fake/fake.cpp       2018-01-15 
14:34:08.000000000 +0100
+++ new/libkscreen-5.12.0/backends/fake/fake.cpp        2018-02-01 
14:45:54.000000000 +0100
@@ -94,7 +94,7 @@
 void Fake::setConfig(const ConfigPtr &config)
 {
     qCDebug(KSCREEN_FAKE) << "set config" << config->outputs();
-    mConfig = config;
+    mConfig = config->clone();
     emit configChanged(mConfig);
 }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libkscreen-5.11.95/backends/kwayland/CMakeLists.txt 
new/libkscreen-5.12.0/backends/kwayland/CMakeLists.txt
--- old/libkscreen-5.11.95/backends/kwayland/CMakeLists.txt     2018-01-15 
14:34:08.000000000 +0100
+++ new/libkscreen-5.12.0/backends/kwayland/CMakeLists.txt      2018-02-01 
14:45:54.000000000 +0100
@@ -4,6 +4,7 @@
     waylandconfig.cpp
     waylandoutput.cpp
     waylandscreen.cpp
+    ../utils.cpp
 )
 
 add_library(KSC_KWayland MODULE ${wayland_SRCS})
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libkscreen-5.11.95/backends/kwayland/waylandconfig.cpp 
new/libkscreen-5.12.0/backends/kwayland/waylandconfig.cpp
--- old/libkscreen-5.11.95/backends/kwayland/waylandconfig.cpp  2018-01-15 
14:34:08.000000000 +0100
+++ new/libkscreen-5.12.0/backends/kwayland/waylandconfig.cpp   2018-02-01 
14:45:54.000000000 +0100
@@ -279,6 +279,7 @@
     using namespace KWayland::Client;
     // Create a new configuration object
     auto wlOutputConfiguration = m_outputManagement->createConfiguration();
+    bool changed = false;
 
     Q_FOREACH (auto output, newConfig->outputs()) {
         auto o_old = m_outputMap[output->id()];
@@ -288,16 +289,19 @@
         // enabled?
         bool old_enabled = (o_old->outputDevice()->enabled() == 
OutputDevice::Enablement::Enabled);
         if (old_enabled != output->isEnabled()) {
+            changed = true;
             auto _enablement = output->isEnabled() ? 
OutputDevice::Enablement::Enabled : OutputDevice::Enablement::Disabled;
             wlOutputConfiguration->setEnabled(o_old->outputDevice(), 
_enablement);
         }
 
         // position
         if (device->globalPosition() != output->pos()) {
+            changed = true;
             wlOutputConfiguration->setPosition(o_old->outputDevice(), 
output->pos());
         }
 
         if (device->scale() != output->scale()) {
+            changed = true;
             wlOutputConfiguration->setScale(o_old->outputDevice(), 
output->scale());
         }
 
@@ -305,6 +309,7 @@
         auto r_current = o_old->toKScreenRotation(device->transform());
         auto r_new = output->rotation();
         if (r_current != r_new) {
+            changed = true;
             wlOutputConfiguration->setTransform(device, 
o_old->toKWaylandTransform(r_new));
         }
 
@@ -313,10 +318,15 @@
         QString l_newmodeid = output->currentModeId();
         int w_newmodeid = o_old->toKWaylandModeId(l_newmodeid);
         if (w_newmodeid != w_currentmodeid) {
+            changed = true;
             wlOutputConfiguration->setMode(device, w_newmodeid);
         }
     }
 
+    if (!changed) {
+        return;
+    }
+
     // We now block changes in order to compress events while the compositor 
is doing its thing
     // once it's done or failed, we'll trigger configChanged() only once, and 
not per individual
     // property change.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libkscreen-5.11.95/backends/kwayland/waylandoutput.cpp 
new/libkscreen-5.12.0/backends/kwayland/waylandoutput.cpp
--- old/libkscreen-5.11.95/backends/kwayland/waylandoutput.cpp  2018-01-15 
14:34:08.000000000 +0100
+++ new/libkscreen-5.12.0/backends/kwayland/waylandoutput.cpp   2018-02-01 
14:45:54.000000000 +0100
@@ -19,6 +19,7 @@
 #include "waylandoutput.h"
 #include "waylandbackend.h"
 #include "waylandconfig.h"
+#include "../utils.h"
 
 #include <mode.h>
 #include <edid.h>
@@ -169,6 +170,7 @@
     output->setPreferredModes(preferredModeIds);
     output->setModes(modeList);
     output->setScale(m_output->scale());
+    output->setType(Utils::guessOutputType(m_output->model(), 
m_output->model()));
 }
 
 QString WaylandOutput::modeName(const KWayland::Client::OutputDevice::Mode &m) 
const
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libkscreen-5.11.95/backends/utils.cpp 
new/libkscreen-5.12.0/backends/utils.cpp
--- old/libkscreen-5.11.95/backends/utils.cpp   1970-01-01 01:00:00.000000000 
+0100
+++ new/libkscreen-5.12.0/backends/utils.cpp    2018-02-01 14:45:54.000000000 
+0100
@@ -0,0 +1,70 @@
+/*************************************************************************************
+ *  Copyright 2018   Daniel Vrátil <dvra...@kde.org>                           
      *
+ *                                                                             
      *
+ *  This library is free software; you can redistribute it and/or              
      *
+ *  modify it under the terms of the GNU Lesser General Public                 
      *
+ *  License as published by the Free Software Foundation; either               
      *
+ *  version 2.1 of the License, or (at your option) any later version.         
      *
+ *                                                                             
      *
+ *  This library is distributed in the hope that it will be useful,            
      *
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of             
      *
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU          
      *
+ *  Lesser General Public License for more details.                            
      *
+ *                                                                             
      *
+ *  You should have received a copy of the GNU Lesser General Public           
      *
+ *  License along with this library; if not, write to the Free Software        
      *
+ *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA 
      *
+ 
*************************************************************************************/
+
+#include "utils.h"
+
+#include <QVector>
+
+KScreen::Output::Type Utils::guessOutputType(const QString &type, const 
QString &name)
+{
+    static const auto embedded = { QLatin1String("LVDS"),
+                                   QLatin1String("IDP"),
+                                   QLatin1String("EDP"),
+                                   QLatin1String("LCD") };
+
+    for (const QLatin1String &pre : embedded) {
+        if (name.toUpper().startsWith(pre)) {
+            return KScreen::Output::Panel;
+        }
+    }
+
+    if (type.contains("VGA")) {
+        return KScreen::Output::VGA;
+    } else if (type.contains("DVI")) {
+        return KScreen::Output::DVI;
+    } else if (type.contains("DVI-I")) {
+        return KScreen::Output::DVII;
+    } else if (type.contains("DVI-A")) {
+        return KScreen::Output::DVIA;
+    } else if (type.contains("DVI-D")) {
+        return KScreen::Output::DVID;
+    } else if (type.contains("HDMI")) {
+        return KScreen::Output::HDMI;
+    } else if (type.contains("Panel")) {
+        return KScreen::Output::Panel;
+    } else if (type.contains("TV-Composite")) {
+        return KScreen::Output::TVComposite;
+    } else if (type.contains("TV-SVideo")) {
+        return KScreen::Output::TVSVideo;
+    } else if (type.contains("TV-Component")) {
+        return KScreen::Output::TVComponent;
+    } else if (type.contains("TV-SCART")) {
+        return KScreen::Output::TVSCART;
+    } else if (type.contains("TV-C4")) {
+        return KScreen::Output::TVC4;
+    } else if (type.contains("TV")) {
+        return KScreen::Output::TV;
+    } else if (type.contains("DisplayPort") || type.startsWith("DP")) {
+        return KScreen::Output::DisplayPort;
+    } else if (type.contains("unknown")) {
+        return KScreen::Output::Unknown;
+    } else {
+        return KScreen::Output::Unknown;
+    }
+}
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libkscreen-5.11.95/backends/utils.h 
new/libkscreen-5.12.0/backends/utils.h
--- old/libkscreen-5.11.95/backends/utils.h     1970-01-01 01:00:00.000000000 
+0100
+++ new/libkscreen-5.12.0/backends/utils.h      2018-02-01 14:45:54.000000000 
+0100
@@ -0,0 +1,30 @@
+/*************************************************************************************
+ *  Copyright 2018   Daniel Vrátil <dvra...@kde.org>                           
      *
+ *                                                                             
      *
+ *  This library is free software; you can redistribute it and/or              
      *
+ *  modify it under the terms of the GNU Lesser General Public                 
      *
+ *  License as published by the Free Software Foundation; either               
      *
+ *  version 2.1 of the License, or (at your option) any later version.         
      *
+ *                                                                             
      *
+ *  This library is distributed in the hope that it will be useful,            
      *
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of             
      *
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU          
      *
+ *  Lesser General Public License for more details.                            
      *
+ *                                                                             
      *
+ *  You should have received a copy of the GNU Lesser General Public           
      *
+ *  License along with this library; if not, write to the Free Software        
      *
+ *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA 
      *
+ 
*************************************************************************************/
+
+#ifndef KSCREEN_BACKEND_UTILS_H_
+#define KSCREEN_BACKEND_UTILS_H_
+
+#include <kscreen/output.h>
+
+namespace Utils {
+
+KScreen::Output::Type guessOutputType(const QString &type, const QString 
&name);
+
+}
+
+#endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libkscreen-5.11.95/backends/xrandr/CMakeLists.txt 
new/libkscreen-5.12.0/backends/xrandr/CMakeLists.txt
--- old/libkscreen-5.11.95/backends/xrandr/CMakeLists.txt       2018-01-15 
14:34:08.000000000 +0100
+++ new/libkscreen-5.12.0/backends/xrandr/CMakeLists.txt        2018-02-01 
14:45:54.000000000 +0100
@@ -11,6 +11,7 @@
     xrandrscreen.cpp
     ../xcbwrapper.cpp
     ../xcbeventlistener.cpp
+    ../utils.cpp
 )
 
 add_library(KSC_XRandR MODULE ${xrandr_SRCS})
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libkscreen-5.11.95/backends/xrandr/xrandroutput.cpp 
new/libkscreen-5.12.0/backends/xrandr/xrandroutput.cpp
--- old/libkscreen-5.11.95/backends/xrandr/xrandroutput.cpp     2018-01-15 
14:34:08.000000000 +0100
+++ new/libkscreen-5.12.0/backends/xrandr/xrandroutput.cpp      2018-02-01 
14:45:54.000000000 +0100
@@ -23,6 +23,7 @@
 #include "xrandr.h"
 #include "output.h"
 #include "config.h"
+#include "../utils.h"
 
 #include <QRect>
 
@@ -259,53 +260,7 @@
         type = name.toLocal8Bit();
     }
 
-    static const QVector<QLatin1String> embedded{QLatin1String("LVDS"),
-                                                 QLatin1String("IDP"),
-                                                 QLatin1String("EDP"),
-                                                 QLatin1String("LCD")};
-
-    for (const QLatin1String &pre : embedded) {
-        if (name.toUpper().startsWith(pre)) {
-            return KScreen::Output::Panel;
-        }
-    }
-
-    if (type.contains("VGA")) {
-        return KScreen::Output::VGA;
-    } else if (type.contains("DVI")) {
-        return KScreen::Output::DVI;
-    } else if (type.contains("DVI-I")) {
-        return KScreen::Output::DVII;
-    } else if (type.contains("DVI-A")) {
-        return KScreen::Output::DVIA;
-    } else if (type.contains("DVI-D")) {
-        return KScreen::Output::DVID;
-    } else if (type.contains("HDMI")) {
-        return KScreen::Output::HDMI;
-    } else if (type.contains("Panel")) {
-        return KScreen::Output::Panel;
-    } else if (type.contains("TV-Composite")) {
-        return KScreen::Output::TVComposite;
-    } else if (type.contains("TV-SVideo")) {
-        return KScreen::Output::TVSVideo;
-    } else if (type.contains("TV-Component")) {
-        return KScreen::Output::TVComponent;
-    } else if (type.contains("TV-SCART")) {
-        return KScreen::Output::TVSCART;
-    } else if (type.contains("TV-C4")) {
-        return KScreen::Output::TVC4;
-    } else if (type.contains("TV")) {
-        return KScreen::Output::TV;
-    } else if (type.contains("DisplayPort") || type.startsWith("DP")) {
-        return KScreen::Output::DisplayPort;
-    } else if (type.contains("unknown")) {
-        return KScreen::Output::Unknown;
-    } else {
-//         qCDebug(KSCREEN_XRANDR) << "Output Type not translated:" << type;
-    }
-
-    return KScreen::Output::Unknown;
-
+    return Utils::guessOutputType(type, name);
 }
 
 QByteArray XRandROutput::typeFromProperty(xcb_randr_output_t outputId)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libkscreen-5.11.95/src/backendmanager.cpp 
new/libkscreen-5.12.0/src/backendmanager.cpp
--- old/libkscreen-5.11.95/src/backendmanager.cpp       2018-01-15 
14:34:08.000000000 +0100
+++ new/libkscreen-5.12.0/src/backendmanager.cpp        2018-02-01 
14:45:54.000000000 +0100
@@ -226,7 +226,7 @@
         qCWarning(KSCREEN) << "You are trying to load a backend in process, 
while the BackendManager is set to use OutOfProcess communication. Use 
loadBackendPlugin() instead.";
         return nullptr;
     }
-    if (m_inProcessBackend.first != nullptr && 
m_inProcessBackend.first->name() == name) {
+    if (m_inProcessBackend.first != nullptr && (name.isEmpty() || 
m_inProcessBackend.first->name() == name)) {
         return m_inProcessBackend.first;
     } else if (m_inProcessBackend.first != nullptr && 
m_inProcessBackend.first->name() != name) {
         shutdownBackend();
@@ -244,6 +244,7 @@
     //qCDebug(KSCREEN) << "Connecting ConfigMonitor to backend.";
     ConfigMonitor::instance()->connectInProcessBackend(backend);
     m_inProcessBackend = qMakePair<KScreen::AbstractBackend*, 
QVariantMap>(backend, arguments);
+    setConfig(backend->config());
     return backend;
 }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libkscreen-5.11.95/src/configmonitor.cpp 
new/libkscreen-5.12.0/src/configmonitor.cpp
--- old/libkscreen-5.11.95/src/configmonitor.cpp        2018-01-15 
14:34:08.000000000 +0100
+++ new/libkscreen-5.12.0/src/configmonitor.cpp 2018-02-01 14:45:54.000000000 
+0100
@@ -167,7 +167,6 @@
 
 void ConfigMonitor::Private::updateConfigs(const KScreen::ConfigPtr &newConfig)
 {
-    Q_ASSERT(BackendManager::instance()->method() == 
BackendManager::OutOfProcess);
     QMutableListIterator<QWeakPointer<Config>> iter(watchedConfigs);
     while (iter.hasNext()) {
         KScreen::ConfigPtr config = iter.next().toStrongRef();
@@ -247,10 +246,8 @@
         if (config.isNull()) {
             return;
         }
-        const QWeakPointer<Config> weakConfig = config.toWeakRef();
-        if (d->watchedConfigs.contains(weakConfig)) {
-            emit configurationChanged();
-        }
+        qCDebug(KSCREEN) << "Backend change!" << config;
+        d->updateConfigs(config);
     });
 }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libkscreen-5.11.95/src/getconfigoperation.cpp 
new/libkscreen-5.12.0/src/getconfigoperation.cpp
--- old/libkscreen-5.11.95/src/getconfigoperation.cpp   2018-01-15 
14:34:08.000000000 +0100
+++ new/libkscreen-5.12.0/src/getconfigoperation.cpp    2018-02-01 
14:45:54.000000000 +0100
@@ -171,8 +171,7 @@
     Q_D(GetConfigOperation);
     if (BackendManager::instance()->method() == BackendManager::InProcess) {
         auto backend = d->loadBackend();
-        d->config = backend->config();
-        KScreen::BackendManager::instance()->setConfig(d->config);
+        d->config = backend->config()->clone();
         d->loadEdid(backend);
         emitResult();
     } else {


Reply via email to