Hello community,

here is the log from the commit of package libkscreen2 for openSUSE:Factory 
checked in at 2019-02-11 21:21:07
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/libkscreen2 (Old)
 and      /work/SRC/openSUSE:Factory/.libkscreen2.new.28833 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "libkscreen2"

Mon Feb 11 21:21:07 2019 rev:79 rq:672591 version:5.15.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/libkscreen2/libkscreen2.changes  2019-01-10 
15:18:43.158610766 +0100
+++ /work/SRC/openSUSE:Factory/.libkscreen2.new.28833/libkscreen2.changes       
2019-02-11 21:21:09.987216397 +0100
@@ -1,0 +2,36 @@
+Thu Feb  7 16:02:51 UTC 2019 - [email protected]
+
+- Update to 5.15.0
+  * New feature release
+  * For more details please see:
+  * https://www.kde.org/announcements/plasma-5.15.0.php
+- Changes since 5.14.90:
+  * Guard failing to load backend (kde#403568)
+
+-------------------------------------------------------------------
+Thu Jan 17 18:47:30 UTC 2019 - [email protected]
+
+- Update to 5.14.90
+  * New feature release
+  * For more details please see:
+  * https://www.kde.org/announcements/plasma-5.14.90.php
+- Changes since 5.14.5:
+  * bump KF5 dependency to required 5.54 as agreed at start of Plasma 5.15 
cycle
+  * Consti'fy
+  * Fix some clazy warning
+  * USe KF5_MIN_VERSION
+  * Notify also if modes have changed
+  * Define ownership of edid in output and do not leak it
+  * Add output and connected outputs config API
+  * Move categories here
+  * Rename kscreen.categories to libkscreen.categories
+  * Autogenerate debug categories + create categories file
+  * Avoid creation of needless temporary containers
+  * Remove unused QPointer includes
+  * Don't leak Edid
+  * Fix qstring-insensitive-allocation clazy warning
+  * Remove unused member variable
+  * Support QXL hotplug_mode_update
+  * Use KDEFrameworkCompilerSettings
+
+-------------------------------------------------------------------

Old:
----
  libkscreen-5.14.5.tar.xz
  libkscreen-5.14.5.tar.xz.sig

New:
----
  libkscreen-5.15.0.tar.xz
  libkscreen-5.15.0.tar.xz.sig

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

Other differences:
------------------
++++++ libkscreen2.spec ++++++
--- /var/tmp/diff_new_pack.B1J6iC/_old  2019-02-11 21:21:11.203215747 +0100
+++ /var/tmp/diff_new_pack.B1J6iC/_new  2019-02-11 21:21:11.207215745 +0100
@@ -17,37 +17,36 @@
 
 
 %bcond_without lang
-
 %define lname   libKF5Screen7
 Name:           libkscreen2
-Version:        5.14.5
+Version:        5.15.0
 Release:        0
 # Full Plasma 5 version (e.g. 5.8.95)
 %{!?_plasma5_bugfix: %define _plasma5_bugfix %{version}}
 # Latest ABI-stable Plasma (e.g. 5.8 in KF5, but 5.8.95 in KUF)
 %{!?_plasma5_version: %define _plasma5_version %(echo %{_plasma5_bugfix} | awk 
-F. '{print $1"."$2}')}
-BuildRequires:  cmake >= 2.8.12
-BuildRequires:  extra-cmake-modules >= 5.14.5
-BuildRequires:  fdupes
-BuildRequires:  kf5-filesystem
-BuildRequires:  cmake(KF5Wayland) >= 5.14.5
-BuildRequires:  cmake(Qt5Core) >= 5.4.0
-BuildRequires:  cmake(Qt5DBus) >= 5.4.0
-BuildRequires:  cmake(Qt5Gui) >= 5.4.0
-BuildRequires:  cmake(Qt5Test) >= 5.4.0
-BuildRequires:  cmake(Qt5X11Extras) >= 5.4.0
-BuildRequires:  pkgconfig(xcb)
-BuildRequires:  pkgconfig(xcb-randr)
 Summary:        KDE's screen management library
 License:        GPL-2.0-or-later
 Group:          System/GUI/KDE
 Url:            http://www.kde.org
-Source:         
https://download.kde.org/stable/plasma/%{version}/libkscreen-%{version}.tar.xz
+Source:         libkscreen-%{version}.tar.xz
 %if %{with lang}
-Source1:        
https://download.kde.org/stable/plasma/%{version}/libkscreen-%{version}.tar.xz.sig
+Source1:        libkscreen-%{version}.tar.xz.sig
 Source2:        plasma.keyring
 %endif
 Source3:        baselibs.conf
+BuildRequires:  cmake >= 2.8.12
+BuildRequires:  extra-cmake-modules
+BuildRequires:  fdupes
+BuildRequires:  kf5-filesystem
+BuildRequires:  cmake(KF5Wayland)
+BuildRequires:  cmake(Qt5Core) >= 5.11.0
+BuildRequires:  cmake(Qt5DBus)
+BuildRequires:  cmake(Qt5Gui)
+BuildRequires:  cmake(Qt5Test)
+BuildRequires:  cmake(Qt5X11Extras)
+BuildRequires:  pkgconfig(xcb)
+BuildRequires:  pkgconfig(xcb-randr)
 
 %description
 Dynamic display management library for KDE
@@ -64,7 +63,7 @@
 Summary:        KDE's screen management library (development package)
 Group:          Development/Libraries/C and C++
 Requires:       %{lname} = %{version}
-Requires:       cmake(Qt5Core) >= 5.4.0
+Requires:       cmake(Qt5Core) >= 5.11.0
 
 %description devel
 Development files belonging to libkscreen, dynamic display management in KDE
@@ -98,6 +97,7 @@
 %{_kf5_plugindir}/
 %{_kf5_libexecdir}/
 %{_kf5_sharedir}/dbus-1/services/org.kde.kscreen.service
+%{_kf5_debugdir}/libkscreen.categories
 
 %files -n %{lname}
 %license COPYING*

++++++ libkscreen-5.14.5.tar.xz -> libkscreen-5.15.0.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libkscreen-5.14.5/CMakeLists.txt 
new/libkscreen-5.15.0/CMakeLists.txt
--- old/libkscreen-5.14.5/CMakeLists.txt        2019-01-08 12:01:46.000000000 
+0100
+++ new/libkscreen-5.15.0/CMakeLists.txt        2019-02-07 12:12:39.000000000 
+0100
@@ -1,15 +1,15 @@
 cmake_minimum_required(VERSION 3.0)
 
 project(libkscreen)
-set(PROJECT_VERSION "5.14.5")
+set(PROJECT_VERSION "5.15.0")
 
 set(QT_MIN_VERSION "5.11.0")
-set(KF5_MIN_VERSION "5.50.0")
+set(KF5_MIN_VERSION "5.54.0")
 
 find_package(ECM ${KF5_MIN_VERSION} REQUIRED NO_MODULE)
 set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${ECM_MODULE_PATH} 
${ECM_KDE_MODULE_DIR})
 include(KDEInstallDirs)
-include(KDECompilerSettings NO_POLICY_SCOPE)
+include(KDEFrameworkCompilerSettings NO_POLICY_SCOPE)
 include(KDECMakeSettings)
 include(ECMSetupVersion)
 include(ECMMarkAsTest)
@@ -38,19 +38,9 @@
 option(BUILD_QCH "Build API documentation in QCH format (for e.g. Qt 
Assistant, Qt Creator & KDevelop)" OFF)
 add_feature_info(QCH ${BUILD_QCH} "API documentation in QCH format (for e.g. 
Qt Assistant, Qt Creator & KDevelop)")
 
-# library setup
 
-add_definitions(
-  -DQT_USE_QSTRINGBUILDER
-  -DQT_NO_CAST_TO_ASCII
-  -DQT_NO_CAST_FROM_ASCII
-  -DQT_STRICT_ITERATORS
-  -DQT_NO_URL_CAST_FROM_STRING
-  -DQT_NO_CAST_FROM_BYTEARRAY
-)
-
-set(KF5_VERSION ${PROJECT_VERSION}) #When we are happy with the api, we can 
sync with frameworks
-ecm_setup_version(${KF5_VERSION} VARIABLE_PREFIX KSCREEN
+set(KF5_MIN_VERSION ${PROJECT_VERSION}) #When we are happy with the api, we 
can sync with frameworks
+ecm_setup_version(${KF5_MIN_VERSION} VARIABLE_PREFIX KSCREEN
                         VERSION_HEADER 
"${CMAKE_CURRENT_BINARY_DIR}/kscreen_version.h"
                         PACKAGE_VERSION_FILE 
"${CMAKE_CURRENT_BINARY_DIR}/KF5ScreenConfigVersion.cmake"
                         SOVERSION 7)
@@ -109,5 +99,7 @@
   DESTINATION "${KF5_INCLUDE_INSTALL_DIR}"
   COMPONENT Devel
 )
+install( FILES libkscreen.categories DESTINATION ${KDE_INSTALL_CONFDIR} )
+
 
 feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libkscreen-5.14.5/autotests/testconfigserializer.cpp 
new/libkscreen-5.15.0/autotests/testconfigserializer.cpp
--- old/libkscreen-5.14.5/autotests/testconfigserializer.cpp    2019-01-08 
12:01:46.000000000 +0100
+++ new/libkscreen-5.15.0/autotests/testconfigserializer.cpp    2019-02-07 
12:12:39.000000000 +0100
@@ -62,10 +62,10 @@
     void testSerializeList()
     {
         QStringList stringList;
-        stringList << QLatin1String("Item 1")
-                   << QLatin1String("Item 2")
-                   << QLatin1String("Item 3")
-                   << QLatin1String("Item 4");
+        stringList << QStringLiteral("Item 1")
+                   << QStringLiteral("Item 2")
+                   << QStringLiteral("Item 3")
+                   << QStringLiteral("Item 4");
 
         QJsonArray arr = 
KScreen::ConfigSerializer::serializeList<QString>(stringList);
         QCOMPARE(arr.size(), stringList.size());
@@ -115,8 +115,8 @@
     void testSerializeMode()
     {
         KScreen::ModePtr mode(new KScreen::Mode);
-        mode->setId(QLatin1String("755"));
-        mode->setName(QLatin1String("1280x1024"));
+        mode->setId(QStringLiteral("755"));
+        mode->setName(QStringLiteral("1280x1024"));
         mode->setRefreshRate(50.666);
         mode->setSize(QSize(1280, 1024));
 
@@ -135,23 +135,23 @@
     {
         KScreen::ModeList modes;
         KScreen::ModePtr mode(new KScreen::Mode);
-        mode->setId(QLatin1String("1"));
-        mode->setName(QLatin1String("800x600"));
+        mode->setId(QStringLiteral("1"));
+        mode->setName(QStringLiteral("800x600"));
         mode->setSize(QSize(800, 600));
         mode->setRefreshRate(50.4);
         modes.insert(mode->id(), mode);
 
         KScreen::OutputPtr output(new KScreen::Output);
         output->setId(60);
-        output->setName(QLatin1String("LVDS-0"));
+        output->setName(QStringLiteral("LVDS-0"));
         output->setType(KScreen::Output::Panel);
         output->setIcon(QString());
         output->setModes(modes);
         output->setPos(QPoint(1280, 0));
         output->setSize(mode->size());
         output->setRotation(KScreen::Output::None);
-        output->setCurrentModeId(QLatin1String("1"));
-        output->setPreferredModes(QStringList() << QLatin1String("1"));
+        output->setCurrentModeId(QStringLiteral("1"));
+        output->setPreferredModes(QStringList() << QStringLiteral("1"));
         output->setConnected(true);
         output->setEnabled(true);
         output->setPrimary(true);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libkscreen-5.14.5/autotests/testscreenconfig.cpp 
new/libkscreen-5.15.0/autotests/testscreenconfig.cpp
--- old/libkscreen-5.14.5/autotests/testscreenconfig.cpp        2019-01-08 
12:01:46.000000000 +0100
+++ new/libkscreen-5.15.0/autotests/testscreenconfig.cpp        2019-02-07 
12:12:39.000000000 +0100
@@ -212,12 +212,12 @@
     QVERIFY(!Config::canBeApplied(brokenConfig));
     primaryBroken->setConnected(currentPrimary->isConnected());
     QVERIFY(!Config::canBeApplied(brokenConfig));
-    primaryBroken->setCurrentModeId(QLatin1String("42"));
+    primaryBroken->setCurrentModeId(QStringLiteral("42"));
     QVERIFY(!Config::canBeApplied(brokenConfig));
     primaryBroken->setCurrentModeId(currentPrimary->currentModeId());
     QVERIFY(!Config::canBeApplied(brokenConfig));
     qDebug() << "brokenConfig.modes" << 
primaryBroken->mode(QStringLiteral("3"));
-    primaryBroken->mode(QLatin1String("3"))->setSize(QSize(1280, 800));
+    primaryBroken->mode(QStringLiteral("3"))->setSize(QSize(1280, 800));
     qDebug() << "brokenConfig.modes" << 
primaryBroken->mode(QStringLiteral("3"));
     QVERIFY(Config::canBeApplied(brokenConfig));
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libkscreen-5.14.5/backends/fake/fake.cpp 
new/libkscreen-5.15.0/backends/fake/fake.cpp
--- old/libkscreen-5.14.5/backends/fake/fake.cpp        2019-01-08 
12:01:46.000000000 +0100
+++ new/libkscreen-5.15.0/backends/fake/fake.cpp        2019-02-07 
12:12:39.000000000 +0100
@@ -47,7 +47,7 @@
 
 
     if (qgetenv("KSCREEN_BACKEND_INPROCESS") != QByteArray("1")) {
-        QTimer::singleShot(0, this, SLOT(delayedInit()));
+        QTimer::singleShot(0, this, &Fake::delayedInit);
     }
 }
 
@@ -65,7 +65,7 @@
 void Fake::delayedInit()
 {
     new FakeBackendAdaptor(this);
-    QDBusConnection::sessionBus().registerObject(QLatin1String("/fake"), this);
+    QDBusConnection::sessionBus().registerObject(QStringLiteral("/fake"), 
this);
 }
 
 Fake::~Fake()
@@ -79,7 +79,7 @@
 
 QString Fake::serviceName() const
 {
-    return QLatin1Literal("org.kde.KScreen.Backend.Fake");
+    return QStringLiteral("org.kde.KScreen.Backend.Fake");
 }
 
 ConfigPtr Fake::config() const
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libkscreen-5.14.5/backends/fake/parser.cpp 
new/libkscreen-5.15.0/backends/fake/parser.cpp
--- old/libkscreen-5.14.5/backends/fake/parser.cpp      2019-01-08 
12:01:46.000000000 +0100
+++ new/libkscreen-5.15.0/backends/fake/parser.cpp      2019-02-07 
12:12:39.000000000 +0100
@@ -131,7 +131,7 @@
     output->setModes(modelist);
     map.remove(QStringLiteral("modes"));
 
-    if(map.contains(QLatin1String("clones"))) {
+    if(map.contains(QStringLiteral("clones"))) {
         QList<int> clones;
         Q_FOREACH(const QVariant &id, map[QStringLiteral("clones")].toList()) {
             clones.append(id.toInt());
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libkscreen-5.14.5/backends/kwayland/waylandbackend.cpp 
new/libkscreen-5.15.0/backends/kwayland/waylandbackend.cpp
--- old/libkscreen-5.14.5/backends/kwayland/waylandbackend.cpp  2019-01-08 
12:01:46.000000000 +0100
+++ new/libkscreen-5.15.0/backends/kwayland/waylandbackend.cpp  2019-02-07 
12:12:39.000000000 +0100
@@ -53,7 +53,7 @@
 
 QString WaylandBackend::serviceName() const
 {
-    return QLatin1Literal("org.kde.KScreen.Backend.KWayland");
+    return QStringLiteral("org.kde.KScreen.Backend.KWayland");
 }
 
 ConfigPtr WaylandBackend::config() const
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libkscreen-5.14.5/backends/kwayland/waylandoutput.cpp 
new/libkscreen-5.15.0/backends/kwayland/waylandoutput.cpp
--- old/libkscreen-5.14.5/backends/kwayland/waylandoutput.cpp   2019-01-08 
12:01:46.000000000 +0100
+++ new/libkscreen-5.15.0/backends/kwayland/waylandoutput.cpp   2019-02-07 
12:12:39.000000000 +0100
@@ -60,10 +60,12 @@
 
 QString WaylandOutput::toKScreenModeId(int kwaylandmodeid) const
 {
-    if (!m_modeIdMap.values().contains(kwaylandmodeid)) {
+    auto it = std::find(m_modeIdMap.constBegin(), m_modeIdMap.constEnd(), 
kwaylandmodeid);
+    if (it == m_modeIdMap.constEnd()) {
         qCWarning(KSCREEN_WAYLAND) << "Invalid kwayland mode id:" << 
kwaylandmodeid << m_modeIdMap;
+        return QStringLiteral("invalid_mode_id");
     }
-    return m_modeIdMap.key(kwaylandmodeid, QStringLiteral("invalid_mode_id"));
+    return it.key();
 }
 
 int WaylandOutput::toKWaylandModeId(const QString &kscreenmodeid) const
@@ -143,7 +145,7 @@
             qCDebug(KSCREEN_WAYLAND) << "Could not create mode id from" << 
m.id << ", using" << modename << "instead.";
             modeid = modename;
         }
-        if (m_modeIdMap.keys().contains(modeid)) {
+        if (m_modeIdMap.contains(modeid)) {
             qCWarning(KSCREEN_WAYLAND) << "Mode id already in use:" << modeid;
         }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libkscreen-5.14.5/backends/kwayland/waylandscreen.cpp 
new/libkscreen-5.15.0/backends/kwayland/waylandscreen.cpp
--- old/libkscreen-5.14.5/backends/kwayland/waylandscreen.cpp   2019-01-08 
12:01:46.000000000 +0100
+++ new/libkscreen-5.15.0/backends/kwayland/waylandscreen.cpp   2019-02-07 
12:12:39.000000000 +0100
@@ -43,7 +43,7 @@
     return kscreenScreen;
 }
 
-void WaylandScreen::setOutputs(const QList<WaylandOutput*> outputs)
+void WaylandScreen::setOutputs(const QList<WaylandOutput*> &outputs)
 {
     m_outputCount = outputs.count();
     QRect r;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libkscreen-5.14.5/backends/kwayland/waylandscreen.h 
new/libkscreen-5.15.0/backends/kwayland/waylandscreen.h
--- old/libkscreen-5.14.5/backends/kwayland/waylandscreen.h     2019-01-08 
12:01:46.000000000 +0100
+++ new/libkscreen-5.15.0/backends/kwayland/waylandscreen.h     2019-02-07 
12:12:39.000000000 +0100
@@ -41,7 +41,7 @@
 
     KScreen::ScreenPtr toKScreenScreen(KScreen::ConfigPtr &parent) const;
     void updateKScreenScreen(KScreen::ScreenPtr &screen) const;
-    void setOutputs(const QList<WaylandOutput*> outputs);
+    void setOutputs(const QList<WaylandOutput*> &outputs);
 
     void setSize(const QSize &size);
     void setOutputCount(int count);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libkscreen-5.14.5/backends/qscreen/qscreenconfig.cpp 
new/libkscreen-5.15.0/backends/qscreen/qscreenconfig.cpp
--- old/libkscreen-5.14.5/backends/qscreen/qscreenconfig.cpp    2019-01-08 
12:01:46.000000000 +0100
+++ new/libkscreen-5.15.0/backends/qscreen/qscreenconfig.cpp    2019-02-07 
12:12:39.000000000 +0100
@@ -44,9 +44,7 @@
 
 QScreenConfig::~QScreenConfig()
 {
-    foreach(auto output, m_outputMap.values()) {
-        delete output;
-    }
+    qDeleteAll(m_outputMap);
 }
 
 ConfigPtr QScreenConfig::toKScreenConfig() const
@@ -60,7 +58,7 @@
 int QScreenConfig::outputId(const QScreen *qscreen)
 {
     QList<int> ids;
-    foreach(auto output, m_outputMap.values()) {
+    foreach(auto output, m_outputMap) {
         if (qscreen == output->qscreen()) {
             return output->id();
         }
@@ -86,7 +84,7 @@
     qCDebug(KSCREEN_QSCREEN) << "Screen removed" << qscreen << 
QGuiApplication::screens().count();
     // Find output matching the QScreen object and remove it
     int removedOutputId = -1;
-    foreach(auto output, m_outputMap.values()) {
+    foreach(auto output, m_outputMap) {
         if (output->qscreen() == qscreen) {
             removedOutputId = output->id();
             m_outputMap.remove(removedOutputId);
@@ -105,14 +103,14 @@
     //Removing removed outputs
     KScreen::OutputList outputs = config->outputs();
     Q_FOREACH(const KScreen::OutputPtr &output, outputs) {
-        if (!m_outputMap.keys().contains(output->id())) {
+        if (!m_outputMap.contains(output->id())) {
             config->removeOutput(output->id());
         }
     }
 
     // Add KScreen::Outputs that aren't in the list yet, handle primaryOutput
     KScreen::OutputList kscreenOutputs = config->outputs();
-    foreach(QScreenOutput *output, m_outputMap.values()) {
+    foreach(QScreenOutput *output, m_outputMap) {
         KScreen::OutputPtr kscreenOutput = kscreenOutputs[output->id()];
 
         if (!kscreenOutput) {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libkscreen-5.14.5/backends/qscreen/qscreenoutput.cpp 
new/libkscreen-5.15.0/backends/qscreen/qscreenoutput.cpp
--- old/libkscreen-5.14.5/backends/qscreen/qscreenoutput.cpp    2019-01-08 
12:01:46.000000000 +0100
+++ new/libkscreen-5.15.0/backends/qscreen/qscreenoutput.cpp    2019-02-07 
12:12:39.000000000 +0100
@@ -30,7 +30,6 @@
 QScreenOutput::QScreenOutput(const QScreen *qscreen, QObject *parent)
     : QObject(parent)
     , m_qscreen(qscreen)
-    , m_edid(nullptr)
     , m_id(-1)
 {
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libkscreen-5.14.5/backends/qscreen/qscreenoutput.h 
new/libkscreen-5.15.0/backends/qscreen/qscreenoutput.h
--- old/libkscreen-5.14.5/backends/qscreen/qscreenoutput.h      2019-01-08 
12:01:46.000000000 +0100
+++ new/libkscreen-5.15.0/backends/qscreen/qscreenoutput.h      2019-02-07 
12:12:39.000000000 +0100
@@ -26,7 +26,6 @@
 #include "edid.h"
 
 #include <QScreen>
-#include <QPointer>
 
 namespace KScreen
 {
@@ -50,7 +49,6 @@
 private:
     void updateFromQScreen(const QScreen *qscreen);
     const QScreen *m_qscreen;
-    mutable QPointer<KScreen::Edid> m_edid;
     int m_id;
 };
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libkscreen-5.14.5/backends/utils.cpp 
new/libkscreen-5.15.0/backends/utils.cpp
--- old/libkscreen-5.14.5/backends/utils.cpp    2019-01-08 12:01:46.000000000 
+0100
+++ new/libkscreen-5.15.0/backends/utils.cpp    2019-02-07 12:12:39.000000000 
+0100
@@ -28,7 +28,7 @@
                                    QLatin1String("LCD") };
 
     for (const QLatin1String &pre : embedded) {
-        if (name.toUpper().startsWith(pre)) {
+        if (name.startsWith(pre, Qt::CaseInsensitive)) {
             return KScreen::Output::Panel;
         }
     }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libkscreen-5.14.5/backends/xcbwrapper.h 
new/libkscreen-5.15.0/backends/xcbwrapper.h
--- old/libkscreen-5.14.5/backends/xcbwrapper.h 2019-01-08 12:01:46.000000000 
+0100
+++ new/libkscreen-5.15.0/backends/xcbwrapper.h 2019-02-07 12:12:39.000000000 
+0100
@@ -164,7 +164,7 @@
         }
     }
     template<typename ... Args>
-    constexpr xcb_window_t requestWindow(const Args & ... args) {
+    constexpr xcb_window_t requestWindow(const Args & ... args) const {
         return std::is_same<typename std::tuple_element<0, std::tuple<Args 
...>>::type, xcb_window_t>::value
                     ? std::get<0>(std::tuple<Args ...>(args ...))
                     : static_cast<xcb_window_t>(XCB_WINDOW_NONE);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libkscreen-5.14.5/backends/xrandr/xrandr.cpp 
new/libkscreen-5.15.0/backends/xrandr/xrandr.cpp
--- old/libkscreen-5.14.5/backends/xrandr/xrandr.cpp    2019-01-08 
12:01:46.000000000 +0100
+++ new/libkscreen-5.15.0/backends/xrandr/xrandr.cpp    2019-02-07 
12:12:39.000000000 +0100
@@ -277,6 +277,18 @@
     return edid;
 }
 
+bool XRandR::hasProperty(xcb_randr_output_t output, const QByteArray& name)
+{
+    xcb_generic_error_t *error = nullptr;
+    auto atom = XCB::InternAtom(false, name.length(), name.constData())->atom;
+    auto cookie = xcb_randr_get_output_property(XCB::connection(), output, 
atom, XCB_ATOM_ANY, 0, 1, false, false);
+    auto prop_reply = xcb_randr_get_output_property_reply (XCB::connection(), 
cookie, &error);
+
+    const bool ret = prop_reply->num_items == 1;
+    free(prop_reply);
+    return ret;
+}
+
 xcb_randr_get_screen_resources_reply_t* XRandR::screenResources()
 {
     if (XRandR::s_has_1_3) {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libkscreen-5.14.5/backends/xrandr/xrandr.h 
new/libkscreen-5.15.0/backends/xrandr/xrandr.h
--- old/libkscreen-5.14.5/backends/xrandr/xrandr.h      2019-01-08 
12:01:46.000000000 +0100
+++ new/libkscreen-5.15.0/backends/xrandr/xrandr.h      2019-02-07 
12:12:39.000000000 +0100
@@ -57,6 +57,8 @@
         static xcb_screen_t* screen();
         static xcb_window_t rootWindow();
 
+        static bool hasProperty(xcb_randr_output_t outputId, const QByteArray 
&name);
+
     private Q_SLOTS:
         void outputChanged(xcb_randr_output_t output,
                            xcb_randr_crtc_t crtc,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libkscreen-5.14.5/backends/xrandr/xrandroutput.cpp 
new/libkscreen-5.15.0/backends/xrandr/xrandroutput.cpp
--- old/libkscreen-5.14.5/backends/xrandr/xrandroutput.cpp      2019-01-08 
12:01:46.000000000 +0100
+++ new/libkscreen-5.15.0/backends/xrandr/xrandroutput.cpp      2019-02-07 
12:12:39.000000000 +0100
@@ -155,6 +155,7 @@
             updateModes(outputInfo);
         }
 
+        m_hotplugModeUpdate = XRandR::hasProperty(m_id, "hotplug_mode_update");
     }
 
     // A monitor has been enabled or disabled
@@ -208,6 +209,7 @@
     if (m_crtc) {
         m_crtc->connectOutput(m_id);
     }
+    m_hotplugModeUpdate = XRandR::hasProperty(m_id, "hotplug_mode_update");
 
     updateModes(outputInfo);
 }
@@ -304,6 +306,10 @@
     kscreenOutput->setName(m_name);
     kscreenOutput->setIcon(m_icon);
 
+    //See https://bugzilla.redhat.com/show_bug.cgi?id=1290586
+    //QXL will be creating a new mode we need to jump to every time the 
display is resized
+    kscreenOutput->setFollowPreferredMode(m_hotplugModeUpdate);
+
     kscreenOutput->setConnected(isConnected());
     if (isConnected()) {
         KScreen::ModeList kscreenModes;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libkscreen-5.14.5/backends/xrandr/xrandroutput.h 
new/libkscreen-5.15.0/backends/xrandr/xrandroutput.h
--- old/libkscreen-5.14.5/backends/xrandr/xrandroutput.h        2019-01-08 
12:01:46.000000000 +0100
+++ new/libkscreen-5.15.0/backends/xrandr/xrandroutput.h        2019-02-07 
12:12:39.000000000 +0100
@@ -22,7 +22,6 @@
 #include <QObject>
 #include <QMap>
 #include <QVariant>
-#include <QPointer>
 
 #include "xrandrmode.h"
 #include "output.h"
@@ -90,6 +89,7 @@
     mutable QByteArray m_edid;
     unsigned int m_widthMm;
     unsigned int m_heightMm;
+    bool m_hotplugModeUpdate = false;
     XRandRCrtc *m_crtc;
 };
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libkscreen-5.14.5/backends/xrandr1.1/xrandr11.cpp 
new/libkscreen-5.15.0/backends/xrandr1.1/xrandr11.cpp
--- old/libkscreen-5.14.5/backends/xrandr1.1/xrandr11.cpp       2019-01-08 
12:01:46.000000000 +0100
+++ new/libkscreen-5.15.0/backends/xrandr1.1/xrandr11.cpp       2019-02-07 
12:12:39.000000000 +0100
@@ -71,12 +71,12 @@
 
 QString XRandR11::name() const
 {
-    return QLatin1Literal("XRandR 1.1");
+    return QStringLiteral("XRandR 1.1");
 }
 
 QString XRandR11::serviceName() const
 {
-    return QLatin1Literal("org.kde.KScreen.Backend.XRandR11");
+    return QStringLiteral("org.kde.KScreen.Backend.XRandR11");
 }
 
 
@@ -120,7 +120,7 @@
 
     output->setConnected(true);
     output->setEnabled(true);
-    output->setName(QLatin1String("Default"));
+    output->setName(QStringLiteral("Default"));
     output->setPos(QPoint(0,0));
     output->setPrimary(true);
     output->setRotation((KScreen::Output::Rotation) info->rotation);
@@ -142,10 +142,10 @@
         for (int j = 0; j < nrates; j++) {
             float rate = rates[j];
             mode = KScreen::ModePtr(new KScreen::Mode);
-            mode->setId(QString::fromLatin1("%1-%2").arg(x).arg(j));
+            mode->setId(QStringLiteral("%1-%2").arg(x).arg(j));
             mode->setSize(QSize(size.width, size.height));
             mode->setRefreshRate(rate);
-            
mode->setName(QString::fromLatin1("%1x%2").arg(size.width).arg(size.height));
+            
mode->setName(QStringLiteral("%1x%2").arg(size.width).arg(size.height));
 
             if (x == info->sizeID && rate == info->rate) {
                 output->setCurrentModeId(mode->id());
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libkscreen-5.14.5/libkscreen.categories 
new/libkscreen-5.15.0/libkscreen.categories
--- old/libkscreen-5.14.5/libkscreen.categories 1970-01-01 01:00:00.000000000 
+0100
+++ new/libkscreen-5.15.0/libkscreen.categories 2019-02-07 12:12:39.000000000 
+0100
@@ -0,0 +1,11 @@
+org.kde.kscreen kscreen IDENTIFIER [KSCREEN]
+org.kde.kscreen.edid kscreen (edid) IDENTIFIER [KSCREEN_EDID]
+org.kde.kscreen.backendLauncher kscreen (backendlauncher) IDENTIFIER 
[KSCREEN_BACKEND_LAUNCHER]
+kscreen.xcb.helper libkscreen (xcb helper) IDENTIFIER [KSCREEN_XCB_HELPER]
+kscreen.qscreen libkscreen (qscreen backend) IDENTIFIER [KSCREEN_QSCREEN]
+kscreen.kwayland libkscreen (kwayland backend) IDENTIFIER [KSCREEN_WAYLAND]
+kscreen.fake libkscreen (fake backend) IDENTIFIER [KSCREEN_FAKE]
+kscreen.kwayland.testserver libkscreen (kwayland test server) IDENTIFIER 
[KSCREEN_WAYLAND_TESTSERVER]
+kscreen.doctor libkscreen (kscreen-doctor utility) IDENTIFIER [KSCREEN_DOCTOR]
+kscreen.xrandr libkscreen (xrandr backend) IDENTIFIER [KSCREEN_XRANDR]
+kscreen.xrandr11 libkscreen (xrandr1.1 backend) IDENTIFIER [KSCREEN_XRANDR11]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libkscreen-5.14.5/src/CMakeLists.txt 
new/libkscreen-5.15.0/src/CMakeLists.txt
--- old/libkscreen-5.14.5/src/CMakeLists.txt    2019-01-08 12:01:46.000000000 
+0100
+++ new/libkscreen-5.15.0/src/CMakeLists.txt    2019-02-07 12:12:39.000000000 
+0100
@@ -15,12 +15,24 @@
     output.cpp
     edid.cpp
     mode.cpp
-    debug_p.cpp
     log.cpp
 )
 
 qt5_add_dbus_interface(libkscreen_SRCS 
${CMAKE_SOURCE_DIR}/interfaces/org.kde.KScreen.Backend.xml backendinterface)
 
+ecm_qt_declare_logging_category(libkscreen_SRCS
+                                HEADER kscreen_debug.h
+                                IDENTIFIER KSCREEN 
+                                CATEGORY_NAME org.kde.kscreen
+)
+
+ecm_qt_declare_logging_category(libkscreen_SRCS
+                                HEADER kscreen_debug_edid.h
+                                IDENTIFIER KSCREEN_EDID
+                                CATEGORY_NAME org.kde.kscreen.edid
+)
+
+
 add_library(KF5Screen SHARED ${libkscreen_SRCS})
 generate_export_header(KF5Screen BASE_NAME KScreen)
 
@@ -83,7 +95,7 @@
         KF5Screen_QCH
         NAME KScreen
         BASE_NAME KF5Screen
-        VERSION ${KF5_VERSION}
+        VERSION ${KF5_MIN_VERSION}
         ORG_DOMAIN org.kde
         SOURCES # using only public headers, to cover only public API
             ${KScreen_REQ_HEADERS}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libkscreen-5.14.5/src/backendlauncher/CMakeLists.txt 
new/libkscreen-5.15.0/src/backendlauncher/CMakeLists.txt
--- old/libkscreen-5.14.5/src/backendlauncher/CMakeLists.txt    2019-01-08 
12:01:46.000000000 +0100
+++ new/libkscreen-5.15.0/src/backendlauncher/CMakeLists.txt    2019-02-07 
12:12:39.000000000 +0100
@@ -10,9 +10,9 @@
 )
 
 ecm_qt_declare_logging_category(backendlauncher_SRCS
-                                HEADER debug_p.h
+                                HEADER kscreen_backendLauncher_debug.h
                                 IDENTIFIER KSCREEN_BACKEND_LAUNCHER
-                                CATEGORY_NAME kscreen.backendLauncher
+                                CATEGORY_NAME org.kde.kscreen.backendLauncher
 )
 
 qt5_add_dbus_adaptor(backendlauncher_SRCS 
${CMAKE_SOURCE_DIR}/interfaces/org.kde.KScreen.Backend.xml
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libkscreen-5.14.5/src/backendlauncher/backenddbuswrapper.cpp 
new/libkscreen-5.15.0/src/backendlauncher/backenddbuswrapper.cpp
--- old/libkscreen-5.14.5/src/backendlauncher/backenddbuswrapper.cpp    
2019-01-08 12:01:46.000000000 +0100
+++ new/libkscreen-5.15.0/src/backendlauncher/backenddbuswrapper.cpp    
2019-02-07 12:12:39.000000000 +0100
@@ -20,7 +20,7 @@
 #include "backenddbuswrapper.h"
 #include "backendloader.h"
 #include "backendadaptor.h"
-#include "debug_p.h"
+#include "kscreen_backendLauncher_debug.h"
 
 #include "src/configserializer_p.h"
 #include "src/config.h"
@@ -51,7 +51,7 @@
 {
     QDBusConnection dbus = QDBusConnection::sessionBus();
     new BackendAdaptor(this);
-    if (!dbus.registerObject(QLatin1String("/backend"), this, 
QDBusConnection::ExportAdaptors)) {
+    if (!dbus.registerObject(QStringLiteral("/backend"), this, 
QDBusConnection::ExportAdaptors)) {
         qCWarning(KSCREEN_BACKEND_LAUNCHER) << "Failed to export backend to 
DBus: another launcher already running?";
         qCWarning(KSCREEN_BACKEND_LAUNCHER) << dbus.lastError().message();
         return false;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libkscreen-5.14.5/src/backendlauncher/backendloader.cpp 
new/libkscreen-5.15.0/src/backendlauncher/backendloader.cpp
--- old/libkscreen-5.14.5/src/backendlauncher/backendloader.cpp 2019-01-08 
12:01:46.000000000 +0100
+++ new/libkscreen-5.15.0/src/backendlauncher/backendloader.cpp 2019-02-07 
12:12:39.000000000 +0100
@@ -20,7 +20,7 @@
 #include "backendloader.h"
 #include "backendloaderadaptor.h"
 #include "backenddbuswrapper.h"
-#include "debug_p.h"
+#include "kscreen_backendLauncher_debug.h"
 #include "src/abstractbackend.h"
 #include "src/backendmanager_p.h"
 
@@ -63,7 +63,7 @@
 {
     QDBusConnection dbus = QDBusConnection::sessionBus();
     new BackendLoaderAdaptor(this);
-    if (!dbus.registerObject(QLatin1String("/"), this, 
QDBusConnection::ExportAdaptors)) {
+    if (!dbus.registerObject(QStringLiteral("/"), this, 
QDBusConnection::ExportAdaptors)) {
         qCWarning(KSCREEN_BACKEND_LAUNCHER) << "Failed to export backend to 
DBus: another launcher already running?";
         qCWarning(KSCREEN_BACKEND_LAUNCHER) << dbus.lastError().message();
         return false;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libkscreen-5.14.5/src/backendlauncher/main.cpp 
new/libkscreen-5.15.0/src/backendlauncher/main.cpp
--- old/libkscreen-5.14.5/src/backendlauncher/main.cpp  2019-01-08 
12:01:46.000000000 +0100
+++ new/libkscreen-5.15.0/src/backendlauncher/main.cpp  2019-02-07 
12:12:39.000000000 +0100
@@ -20,7 +20,7 @@
 #include <QGuiApplication>
 #include <QDBusConnection>
 
-#include "debug_p.h"
+#include "kscreen_backendLauncher_debug.h"
 #include "backendloader.h"
 #include "log.h"
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libkscreen-5.14.5/src/backendmanager.cpp 
new/libkscreen-5.15.0/src/backendmanager.cpp
--- old/libkscreen-5.14.5/src/backendmanager.cpp        2019-01-08 
12:01:46.000000000 +0100
+++ new/libkscreen-5.15.0/src/backendmanager.cpp        2019-02-07 
12:12:39.000000000 +0100
@@ -25,7 +25,7 @@
 #include "config.h"
 #include "configmonitor.h"
 #include "backendinterface.h"
-#include "debug_p.h"
+#include "kscreen_debug.h"
 #include "getconfigoperation.h"
 #include "configserializer_p.h"
 #include "log.h"
@@ -241,6 +241,9 @@
         arguments[QStringLiteral("TEST_DATA")] = 
beargs.remove(test_data_equals);
     }
     auto backend = BackendManager::loadBackendPlugin(mLoader, name, arguments);
+    if (!backend) {
+        return nullptr;
+    }
     //qCDebug(KSCREEN) << "Connecting ConfigMonitor to backend.";
     ConfigMonitor::instance()->connectInProcessBackend(backend);
     m_inProcessBackend = qMakePair<KScreen::AbstractBackend*, 
QVariantMap>(backend, arguments);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libkscreen-5.14.5/src/config.cpp 
new/libkscreen-5.15.0/src/config.cpp
--- old/libkscreen-5.14.5/src/config.cpp        2019-01-08 12:01:46.000000000 
+0100
+++ new/libkscreen-5.15.0/src/config.cpp        2019-02-07 12:12:39.000000000 
+0100
@@ -21,10 +21,12 @@
 #include "output.h"
 #include "backendmanager_p.h"
 #include "abstractbackend.h"
-#include "debug_p.h"
+#include "kscreen_debug.h"
 
 #include <QDebug>
 #include <QRect>
+#include <QStringList>
+#include <QCryptographicHash>
 
 using namespace KScreen;
 
@@ -219,6 +221,19 @@
     return newConfig;
 }
 
+QString Config::connectedOutputsHash() const
+{
+    QStringList hashedOutputs;
+
+    const auto outputs = connectedOutputs();
+    for (const OutputPtr &output : outputs) {
+        hashedOutputs << output->hash();
+    }
+    std::sort(hashedOutputs.begin(), hashedOutputs.end());
+    const auto hash = 
QCryptographicHash::hash(hashedOutputs.join(QString()).toLatin1(),
+                                               QCryptographicHash::Md5);
+    return QString::fromLatin1(hash.toHex());
+}
 
 ScreenPtr Config::screen() const
 {
@@ -315,7 +330,7 @@
     d->removeOutput(d->outputs.find(outputId));
 }
 
-void Config::setOutputs(OutputList outputs)
+void Config::setOutputs(const OutputList &outputs)
 {
     for (auto iter = d->outputs.begin(), end = d->outputs.end(); iter != end; 
) {
         iter = d->removeOutput(iter);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libkscreen-5.14.5/src/config.h 
new/libkscreen-5.15.0/src/config.h
--- old/libkscreen-5.14.5/src/config.h  2019-01-08 12:01:46.000000000 +0100
+++ new/libkscreen-5.15.0/src/config.h  2019-02-07 12:12:39.000000000 +0100
@@ -115,6 +115,18 @@
      */
     ConfigPtr clone() const;
 
+    /**
+     * Returns an identifying hash for this config in regards to its
+     * connected outputs.
+     *
+     * The hash is calculated with a sorted combination of all
+     * connected output hashes.
+     *
+     * @return sorted hash combination of all connected outputs
+     * @since 5.15
+     */
+    QString connectedOutputsHash() const;
+
     ScreenPtr screen() const;
     void setScreen(const ScreenPtr &screen);
 
@@ -125,7 +137,7 @@
     void setPrimaryOutput(const OutputPtr &output);
     void addOutput(const OutputPtr &output);
     void removeOutput(int outputId);
-    void setOutputs(OutputList outputs);
+    void setOutputs(const OutputList &outputs);
 
     bool isValid() const;
     void setValid(bool valid);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libkscreen-5.14.5/src/configmonitor.cpp 
new/libkscreen-5.15.0/src/configmonitor.cpp
--- old/libkscreen-5.14.5/src/configmonitor.cpp 2019-01-08 12:01:46.000000000 
+0100
+++ new/libkscreen-5.15.0/src/configmonitor.cpp 2019-02-07 12:12:39.000000000 
+0100
@@ -22,7 +22,7 @@
 #include "abstractbackend.h"
 #include "configserializer_p.h"
 #include "getconfigoperation.h"
-#include "debug_p.h"
+#include "kscreen_debug.h"
 #include "output.h"
 
 #include <QDBusPendingCallWatcher>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libkscreen-5.14.5/src/configoperation.cpp 
new/libkscreen-5.15.0/src/configoperation.cpp
--- old/libkscreen-5.14.5/src/configoperation.cpp       2019-01-08 
12:01:46.000000000 +0100
+++ new/libkscreen-5.15.0/src/configoperation.cpp       2019-02-07 
12:12:39.000000000 +0100
@@ -22,7 +22,7 @@
 #include "configoperation_p.h"
 #include "backendmanager_p.h"
 
-#include "debug_p.h"
+#include "kscreen_debug.h"
 
 using namespace KScreen;
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libkscreen-5.14.5/src/configserializer.cpp 
new/libkscreen-5.15.0/src/configserializer.cpp
--- old/libkscreen-5.14.5/src/configserializer.cpp      2019-01-08 
12:01:46.000000000 +0100
+++ new/libkscreen-5.15.0/src/configserializer.cpp      2019-02-07 
12:12:39.000000000 +0100
@@ -24,7 +24,7 @@
 #include "output.h"
 #include "screen.h"
 #include "edid.h"
-#include "debug_p.h"
+#include "kscreen_debug.h"
 
 #include <QDBusArgument>
 #include <QJsonDocument>
@@ -86,6 +86,7 @@
     obj[QLatin1String("currentModeId")] = output->currentModeId();
     obj[QLatin1String("preferredModes")] = 
serializeList(output->preferredModes());
     obj[QLatin1String("connected")] = output->isConnected();
+    obj[QLatin1String("followPreferredMode")] = output->followPreferredMode();
     obj[QLatin1String("enabled")] = output->isEnabled();
     obj[QLatin1String("primary")] = output->isPrimary();
     obj[QLatin1String("clones")] = serializeList(output->clones());
@@ -177,12 +178,12 @@
 {
     ConfigPtr config(new Config);
 
-    if (map.contains(QLatin1String("features"))) {
-        
config->setSupportedFeatures(static_cast<Config::Features>(map[QLatin1String("features")].toInt()));
+    if (map.contains(QStringLiteral("features"))) {
+        
config->setSupportedFeatures(static_cast<Config::Features>(map[QStringLiteral("features")].toInt()));
     }
 
-    if (map.contains(QLatin1String("outputs"))) {
-        const QDBusArgument &outputsArg = 
map[QLatin1String("outputs")].value<QDBusArgument>();
+    if (map.contains(QStringLiteral("outputs"))) {
+        const QDBusArgument &outputsArg = 
map[QStringLiteral("outputs")].value<QDBusArgument>();
         outputsArg.beginArray();
         OutputList outputs;
         while (!outputsArg.atEnd()) {
@@ -198,8 +199,8 @@
         config->setOutputs(outputs);
     }
 
-    if (map.contains(QLatin1String("screen"))) {
-        const QDBusArgument &screenArg = 
map[QLatin1String("screen")].value<QDBusArgument>();
+    if (map.contains(QStringLiteral("screen"))) {
+        const QDBusArgument &screenArg = 
map[QStringLiteral("screen")].value<QDBusArgument>();
         const KScreen::ScreenPtr screen = deserializeScreen(screenArg);
         if (!screen) {
             return ConfigPtr();
@@ -242,6 +243,8 @@
             
output->setPreferredModes(deserializeList<QString>(value.value<QDBusArgument>()));
         } else if (key == QLatin1String("connected")) {
             output->setConnected(value.toBool());
+        } else if (key == QLatin1String("followPreferredMode")) {
+            output->setFollowPreferredMode(value.toBool());
         } else if (key == QLatin1String("enabled")) {
             output->setEnabled(value.toBool());
         } else if (key == QLatin1String("primary")) {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libkscreen-5.14.5/src/debug_p.cpp 
new/libkscreen-5.15.0/src/debug_p.cpp
--- old/libkscreen-5.14.5/src/debug_p.cpp       2019-01-08 12:01:46.000000000 
+0100
+++ new/libkscreen-5.15.0/src/debug_p.cpp       1970-01-01 01:00:00.000000000 
+0100
@@ -1,24 +0,0 @@
-/*************************************************************************************
- *  Copyright (C) 2014 by Alejandro Fiestas Olivares <[email protected]>        
      *
- *                                                                             
      *
- *  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 "debug_p.h"
-#include <QString>
-#include <QCoreApplication>
-
-Q_LOGGING_CATEGORY(KSCREEN, "kscreen")
-Q_LOGGING_CATEGORY(KSCREEN_EDID, "kscreen.edid")
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libkscreen-5.14.5/src/debug_p.h 
new/libkscreen-5.15.0/src/debug_p.h
--- old/libkscreen-5.14.5/src/debug_p.h 2019-01-08 12:01:46.000000000 +0100
+++ new/libkscreen-5.15.0/src/debug_p.h 1970-01-01 01:00:00.000000000 +0100
@@ -1,27 +0,0 @@
-/*************************************************************************************
- *  Copyright (C) 2014 by Alejandro Fiestas Olivares <[email protected]>        
      *
- *                                                                             
      *
- *  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 SCREEN_DEBUG_P_H
-#define SCREEN_DEBUG_P_H
-
-#include <QLoggingCategory>
-
-Q_DECLARE_LOGGING_CATEGORY(KSCREEN)
-Q_DECLARE_LOGGING_CATEGORY(KSCREEN_EDID)
-
-#endif //SCREEN_DEBUG_P_H
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libkscreen-5.14.5/src/edid.cpp 
new/libkscreen-5.15.0/src/edid.cpp
--- old/libkscreen-5.14.5/src/edid.cpp  2019-01-08 12:01:46.000000000 +0100
+++ new/libkscreen-5.15.0/src/edid.cpp  2019-02-07 12:12:39.000000000 +0100
@@ -18,7 +18,7 @@
  
*************************************************************************************/
 
 #include "edid.h"
-#include "debug_p.h"
+#include "kscreen_debug_edid.h"
 
 #include <math.h>
 
@@ -132,7 +132,7 @@
 
 QString Edid::deviceId(const QString &fallbackName) const
 {
-    QString id = QLatin1String("xrandr");
+    QString id = QStringLiteral("xrandr");
     // if no info was added check if the fallbacName is provided
     if (vendor().isNull() && name().isNull() && serial().isNull()) {
         if (!fallbackName.isEmpty()) {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libkscreen-5.14.5/src/output.cpp 
new/libkscreen-5.15.0/src/output.cpp
--- old/libkscreen-5.14.5/src/output.cpp        2019-01-08 12:01:46.000000000 
+0100
+++ new/libkscreen-5.15.0/src/output.cpp        2019-02-07 12:12:39.000000000 
+0100
@@ -22,10 +22,10 @@
 #include "edid.h"
 #include "abstractbackend.h"
 #include "backendmanager_p.h"
-#include "debug_p.h"
+#include "kscreen_debug.h"
 
 #include <QStringList>
-#include <QPointer>
+#include <QScopedPointer>
 #include <QRect>
 
 using namespace KScreen;
@@ -60,13 +60,14 @@
         scale(other.scale),
         connected(other.connected),
         enabled(other.enabled),
-        primary(other.primary)
+        primary(other.primary),
+        followPreferredMode(other.followPreferredMode)
     {
         Q_FOREACH (const ModePtr &otherMode, other.modeList) {
             modeList.insert(otherMode->id(), otherMode->clone());
         }
         if (other.edid) {
-            edid = other.edid->clone();
+            edid.reset(other.edid->clone());
         }
     }
 
@@ -90,18 +91,24 @@
     bool connected;
     bool enabled;
     bool primary;
+    bool followPreferredMode = false;
 
-    mutable QPointer<Edid> edid;
+    QScopedPointer<Edid> edid;
 };
 
 bool Output::Private::compareModeList(const ModeList& before, const ModeList 
&after)
 {
-    if (before.keys() != after.keys()) {
+    if (before.count() != after.count()) {
         return false;
     }
-    for (const QString &key : before.keys()) {
-        const auto mb = before.value(key);
-        const auto ma = after.value(key);
+
+    for (auto itb = before.constBegin(); itb != before.constEnd(); ++itb) {
+        auto ita = after.constFind(itb.key());
+        if (ita == after.constEnd()) {
+            return false;
+        }
+        const auto &mb = itb.value();
+        const auto &ma = ita.value();
         if (mb->id() != ma->id()) {
             return false;
         }
@@ -203,6 +210,14 @@
     Q_EMIT outputChanged();
 }
 
+QString Output::hash() const
+{
+    if (edid() && edid()->isValid()) {
+        return edid()->hash();
+    }
+    return name();
+}
+
 Output::Type Output::type() const
 {
     return d->type;
@@ -447,7 +462,7 @@
     return d->clones;
 }
 
-void Output::setClones(QList<int> outputlist)
+void Output::setClones(const QList<int> &outputlist)
 {
     if (d->clones == outputlist) {
         return;
@@ -461,12 +476,12 @@
 void Output::setEdid(const QByteArray& rawData)
 {
     Q_ASSERT(d->edid.isNull());
-    d->edid = new Edid(rawData);
+    d->edid.reset(new Edid(rawData));
 }
 
 Edid *Output::edid() const
 {
-    return d->edid;
+    return d->edid.data();
 }
 
 QSize Output::sizeMm() const
@@ -479,6 +494,19 @@
     d->sizeMm = size;
 }
 
+bool KScreen::Output::followPreferredMode() const
+{
+    return d->followPreferredMode;
+}
+
+void KScreen::Output::setFollowPreferredMode(bool follow)
+{
+    if (follow != d->followPreferredMode) {
+        d->followPreferredMode = follow;
+        Q_EMIT followPreferredModeChanged(follow);
+    }
+}
+
 QRect Output::geometry() const
 {
     if (!currentMode()) {
@@ -565,8 +593,7 @@
 
     // Non-notifyable changes
     if (other->d->edid) {
-        delete d->edid;
-        d->edid = other->d->edid->clone();
+        d->edid.reset(other->d->edid->clone());
     }
 
     blockSignals(keepBlocked);
@@ -589,6 +616,7 @@
                                   << "pos:" << output->pos() << "res:" << 
output->size()
                                   << "modeId:" << output->currentModeId()
                                   << "scale:" << output->scale()
+                                  << "followPreferredMode:" << 
output->followPreferredMode()
                                   << ")";
     } else {
         dbg << "KScreen::Output(NULL)";
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libkscreen-5.14.5/src/output.h 
new/libkscreen-5.15.0/src/output.h
--- old/libkscreen-5.14.5/src/output.h  2019-01-08 12:01:46.000000000 +0100
+++ new/libkscreen-5.15.0/src/output.h  2019-02-07 12:12:39.000000000 +0100
@@ -59,6 +59,7 @@
         Q_PROPERTY(KScreen::Edid* edid READ edid CONSTANT)
         Q_PROPERTY(QSize sizeMm READ sizeMm CONSTANT)
         Q_PROPERTY(qreal scale READ scale WRITE setScale NOTIFY scaleChanged)
+        Q_PROPERTY(bool followPreferredMode READ followPreferredMode WRITE 
setFollowPreferredMode NOTIFY followPreferredModeChanged)
 
 
         enum Type {
@@ -97,6 +98,17 @@
         QString name() const;
         void setName(const QString& name);
 
+        /**
+         * Returns an identifying hash for this output.
+         *
+         * The hash is calculated either via the edid hash or if no
+         * edid is available by the output name.
+         *
+         * @return identifying hash of this output
+         * @since 5.15
+         */
+        QString hash() const;
+
         Type type() const;
         void setType(Type type);
 
@@ -166,9 +178,16 @@
         void setPrimary(bool primary);
 
         QList<int> clones() const;
-        void setClones(QList<int> outputlist);
+        void setClones(const QList<int> &outputlist);
 
         void setEdid(const QByteArray &rawData);
+
+        /**
+         * edid returns the output's EDID information if available.
+         *
+         * The output maintains ownership of the returned Edid, so the caller 
should not delete it.
+         * Note that the edid is only valid as long as the output is alive.
+         */
         Edid* edid() const;
 
         /**
@@ -211,6 +230,21 @@
          */
         void setScale(qreal factor);
 
+        /**
+         * @returns whether the mode should be changed to the new preferred 
mode
+         * once it changes
+         *
+         * @since 5.15
+         */
+        bool followPreferredMode() const;
+
+        /**
+         * Set whether the preferred mode should be followed through @arg 
follow
+         *
+         * @since 5.15
+         */
+        void setFollowPreferredMode(bool follow);
+
         void apply(const OutputPtr &other);
     Q_SIGNALS:
         void outputChanged();
@@ -223,6 +257,7 @@
         void isPrimaryChanged();
         void clonesChanged();
         void scaleChanged();
+        void followPreferredModeChanged(bool followPreferredMode);
 
         /** The mode list changed.
          *
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libkscreen-5.14.5/src/setconfigoperation.cpp 
new/libkscreen-5.15.0/src/setconfigoperation.cpp
--- old/libkscreen-5.14.5/src/setconfigoperation.cpp    2019-01-08 
12:01:46.000000000 +0100
+++ new/libkscreen-5.15.0/src/setconfigoperation.cpp    2019-02-07 
12:12:39.000000000 +0100
@@ -24,7 +24,7 @@
 #include "configoperation_p.h"
 #include "config.h"
 #include "configserializer_p.h"
-#include "debug_p.h"
+#include "kscreen_debug.h"
 #include "output.h"
 
 #include <QDBusPendingCallWatcher>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libkscreen-5.14.5/tests/kwayland/main.cpp 
new/libkscreen-5.15.0/tests/kwayland/main.cpp
--- old/libkscreen-5.14.5/tests/kwayland/main.cpp       2019-01-08 
12:01:46.000000000 +0100
+++ new/libkscreen-5.15.0/tests/kwayland/main.cpp       2019-02-07 
12:12:39.000000000 +0100
@@ -27,8 +27,8 @@
 
     KScreen::WaylandTestServer server;
 
-    QCommandLineOption config = QCommandLineOption(QStringList() << 
QStringLiteral("c") << QLatin1String("config"),
-                                                  QStringLiteral("Config 
file"), QLatin1String("config"));
+    QCommandLineOption config = QCommandLineOption(QStringList() << 
QStringLiteral("c") << QStringLiteral("config"),
+                                                  QStringLiteral("Config 
file"), QStringLiteral("config"));
     QCommandLineParser parser;
     parser.addHelpOption();
     parser.addOption(config);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libkscreen-5.14.5/tests/kwayland/waylandconfigreader.cpp 
new/libkscreen-5.15.0/tests/kwayland/waylandconfigreader.cpp
--- old/libkscreen-5.14.5/tests/kwayland/waylandconfigreader.cpp        
2019-01-08 12:01:46.000000000 +0100
+++ new/libkscreen-5.15.0/tests/kwayland/waylandconfigreader.cpp        
2019-02-07 12:12:39.000000000 +0100
@@ -113,8 +113,9 @@
         OutputDeviceInterface::Mode m0;
         const QSize _size = sizeFromJson(mode[QStringLiteral("size")]);
 
-        if (mode.keys().contains(QStringLiteral("refreshRate"))) {
-            m0.refreshRate = 
qRound(mode[QStringLiteral("refreshRate")].toReal() * 1000); // config has it 
in Hz
+        auto refreshRateIt = mode.constFind(QStringLiteral("refreshRate"));
+        if (refreshRateIt != mode.constEnd()) {
+            m0.refreshRate = qRound(refreshRateIt->toReal() * 1000); // config 
has it in Hz
         }
         bool isCurrent = currentModeId == mode[QStringLiteral("id")].toInt();
         bool isPreferred = preferredModes.contains(mode[QStringLiteral("id")]);
@@ -128,8 +129,9 @@
             flags = 
OutputDeviceInterface::ModeFlags(OutputDeviceInterface::ModeFlag::Preferred);
         }
 
-        if (mode.keys().contains(QLatin1String("id"))) {
-            m0.id = mode[QStringLiteral("id")].toInt();
+        auto idIt = mode.constFind(QStringLiteral("id"));
+        if (idIt != mode.constEnd()) {
+            m0.id = idIt->toInt();
         } else {
             m0.id = mode_id;
         }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libkscreen-5.14.5/tests/kwayland/waylandtestserver.cpp 
new/libkscreen-5.15.0/tests/kwayland/waylandtestserver.cpp
--- old/libkscreen-5.14.5/tests/kwayland/waylandtestserver.cpp  2019-01-08 
12:01:46.000000000 +0100
+++ new/libkscreen-5.15.0/tests/kwayland/waylandtestserver.cpp  2019-02-07 
12:12:39.000000000 +0100
@@ -126,8 +126,9 @@
     Q_EMIT configReceived();
 
     auto changes = configurationInterface->changes();
-    Q_FOREACH (const auto &outputdevice, changes.keys()) {
-        auto c = changes[outputdevice];
+    for (auto it = changes.constBegin(); it != changes.constEnd(); ++it) {
+        auto outputdevice = it.key();
+        auto c = it.value();
         if (c->enabledChanged()) {
             qCDebug(KSCREEN_WAYLAND_TESTSERVER) << "Setting enabled:";
             outputdevice->setEnabled(c->enabled());
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libkscreen-5.14.5/tests/testpnp.cpp 
new/libkscreen-5.15.0/tests/testpnp.cpp
--- old/libkscreen-5.14.5/tests/testpnp.cpp     2019-01-08 12:01:46.000000000 
+0100
+++ new/libkscreen-5.15.0/tests/testpnp.cpp     2019-02-07 12:12:39.000000000 
+0100
@@ -38,35 +38,35 @@
 {
     switch (type) {
         case Output::Unknown:
-            return QLatin1String("Unknown");
+            return QStringLiteral("Unknown");
         case Output::Panel:
-            return QLatin1String("Panel (Laptop)");
+            return QStringLiteral("Panel (Laptop)");
         case Output::VGA:
-            return QLatin1String("VGA");
+            return QStringLiteral("VGA");
         case Output::DVII:
-            return QLatin1String("DVI-I");
+            return QStringLiteral("DVI-I");
         case Output::DVIA:
-            return QLatin1String("DVI-A");
+            return QStringLiteral("DVI-A");
         case Output::DVID:
-            return QLatin1String("DVI-D");
+            return QStringLiteral("DVI-D");
         case Output::HDMI:
-            return QLatin1String("HDMI");
+            return QStringLiteral("HDMI");
         case Output::TV:
-            return QLatin1String("TV");
+            return QStringLiteral("TV");
         case Output::TVComposite:
-            return QLatin1String("TV-Composite");
+            return QStringLiteral("TV-Composite");
         case Output::TVSVideo:
-            return QLatin1String("TV-SVideo");
+            return QStringLiteral("TV-SVideo");
         case Output::TVComponent:
-            return QLatin1String("TV-Component");
+            return QStringLiteral("TV-Component");
         case Output::TVSCART:
-            return QLatin1String("TV-SCART");
+            return QStringLiteral("TV-SCART");
         case Output::TVC4:
-            return QLatin1String("TV-C4");
+            return QStringLiteral("TV-C4");
         case Output::DisplayPort:
-            return QLatin1String("DisplayPort");
+            return QStringLiteral("DisplayPort");
         default:
-            return QLatin1String("Invalid Type");
+            return QStringLiteral("Invalid Type");
 
     };
 }



Reply via email to