Hello community,

here is the log from the commit of package libkscreen for openSUSE:Factory 
checked in at 2014-05-05 21:12:19
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/libkscreen (Old)
 and      /work/SRC/openSUSE:Factory/.libkscreen.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "libkscreen"

Changes:
--------
--- /work/SRC/openSUSE:Factory/libkscreen/libkscreen.changes    2014-05-02 
13:59:07.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.libkscreen.new/libkscreen.changes       
2014-05-05 21:12:20.000000000 +0200
@@ -1,0 +2,6 @@
+Sun May  4 19:20:47 UTC 2014 - hrvoje.sen...@gmail.com
+
+- Update to version 1.0.3:
+  * Bugfix release, no changelog provided
+
+-------------------------------------------------------------------

Old:
----
  libkscreen-1.0.2.tar.xz

New:
----
  libkscreen-1.0.3.tar.xz

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

Other differences:
------------------
++++++ libkscreen.spec ++++++
--- /var/tmp/diff_new_pack.Orum7g/_old  2014-05-05 21:12:21.000000000 +0200
+++ /var/tmp/diff_new_pack.Orum7g/_new  2014-05-05 21:12:21.000000000 +0200
@@ -19,7 +19,7 @@
 #
 %define soversion 1
 Name:           libkscreen
-Version:        1.0.2
+Version:        1.0.3
 Release:        0
 Summary:        KDE's screen management library
 License:        GPL-2.0+

++++++ libkscreen-1.0.2.tar.xz -> libkscreen-1.0.3.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libkscreen-1.0.2/backends/fake/parser.cpp 
new/libkscreen-1.0.3/backends/fake/parser.cpp
--- old/libkscreen-1.0.2/backends/fake/parser.cpp       2013-11-19 
12:45:12.000000000 +0100
+++ new/libkscreen-1.0.3/backends/fake/parser.cpp       2014-05-04 
19:25:33.000000000 +0200
@@ -69,6 +69,7 @@
     screen->setMinSize(Parser::sizeFromJson(data["minSize"].toMap()));
     screen->setMaxSize(Parser::sizeFromJson(data["maxSize"].toMap()));
     screen->setCurrentSize(Parser::sizeFromJson(data["currentSize"].toMap()));
+    screen->setMaxActiveOutputsCount(data["maxActiveOutputsCount"].toInt());
 
     return screen;
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libkscreen-1.0.2/backends/xrandr/xrandr.cpp 
new/libkscreen-1.0.3/backends/xrandr/xrandr.cpp
--- old/libkscreen-1.0.2/backends/xrandr/xrandr.cpp     2013-11-19 
12:45:12.000000000 +0100
+++ new/libkscreen-1.0.3/backends/xrandr/xrandr.cpp     2014-05-04 
19:25:33.000000000 +0200
@@ -122,6 +122,9 @@
     } else {
         RROutput primary = XRRGetOutputPrimary(XRandR::display(), 
XRandR::rootWindow());
         xOutput->update((output == primary) ? XRandROutput::SetPrimary : 
XRandROutput::UnsetPrimary);
+        if (output == primary) {
+            s_internalConfig->m_primaryOutput = output;
+        }
     }
 
     KScreen::ConfigMonitor::instance()->notifyUpdate();
@@ -224,7 +227,7 @@
             return result;
         } else {
             len = 0;
-            delete result;
+            delete[] result;
         }
     }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libkscreen-1.0.2/backends/xrandr/xrandrconfig.cpp 
new/libkscreen-1.0.3/backends/xrandr/xrandrconfig.cpp
--- old/libkscreen-1.0.2/backends/xrandr/xrandrconfig.cpp       2013-11-19 
12:45:12.000000000 +0100
+++ new/libkscreen-1.0.3/backends/xrandr/xrandrconfig.cpp       2014-05-04 
19:25:33.000000000 +0200
@@ -35,6 +35,7 @@
 
 XRandRConfig::XRandRConfig()
     : QObject()
+    , m_primaryOutput(-1)
     , m_screen(new XRandRScreen(this))
 {
     XRRScreenResources* resources = XRandR::screenResources();
@@ -49,6 +50,9 @@
 
         XRandROutput *output = createNewOutput(id, (id == primary));
         m_outputs.insert(id, output);
+        if (id == primary) {
+            m_primaryOutput = output->id();
+        }
     }
 
     XRRFreeScreenResources(resources);
@@ -64,10 +68,14 @@
 
     RROutput primary = XRRGetOutputPrimary(XRandR::display(), 
XRandR::rootWindow());
 
+    m_primaryOutput = -1;
     XRandROutput::Map::Iterator iter;
     for (iter = m_outputs.begin(); iter != m_outputs.end(); ++iter) {
         XRandROutput *output = iter.value();
         output->update((iter.key() == (int) primary) ? 
XRandROutput::SetPrimary : XRandROutput::UnsetPrimary);
+        if (iter.key() == (int) primary) {
+            m_primaryOutput = output->id();
+        }
     }
 }
 
@@ -82,11 +90,14 @@
     primary = XRRGetOutputPrimary(XRandR::display(), XRandR::rootWindow());
     XRandROutput *output = createNewOutput(id, (id == primary));
     m_outputs.insert(id, output);
+    if (id == primary) {
+        m_primaryOutput = id;
+    }
 }
 
 XRandROutput* XRandRConfig::createNewOutput(RROutput id, bool primary)
 {
-    XRandROutput *xOutput = new XRandROutput(id, (id == primary), this);
+    XRandROutput *xOutput = new XRandROutput(id, primary, this);
     connect(xOutput, SIGNAL(outputRemoved(int)), SLOT(outputRemovedSlot(int)));
 
     return xOutput;
@@ -114,6 +125,9 @@
 
     config->setOutputs(kscreenOutputs);
     config->setScreen(m_screen->toKScreenScreen(config));
+    if (m_primaryOutput != -1 && config->primaryOutput()->id() != 
m_primaryOutput) {
+        config->setPrimaryOutput(kscreenOutputs.value(m_primaryOutput));
+    }
 
     return config;
 }
@@ -142,6 +156,10 @@
         }
         output->updateKScreenOutput(kscreenOutput);
     }
+
+    if (config->primaryOutput()->id() != m_primaryOutput) {
+        config->setPrimaryOutput(config->output(m_primaryOutput));
+    }
 }
 
 void XRandRConfig::applyKScreenConfig(KScreen::Config *config)
@@ -507,6 +525,12 @@
                  0, 0, None, RR_Rotate_0, NULL, 0);
 
     kDebug(dXndr()) << "XRRSetCrtcConfig() returned" << s;
+
+    // Update the cached output now, otherwise we get RRNotify_CrtcChange 
notification
+    // for an outdated output, which can lead to a crash.
+    if (s == RRSetConfigSuccess) {
+        m_outputs.value(output->id())->update();
+    }
     return (s == RRSetConfigSuccess);
 }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libkscreen-1.0.2/backends/xrandr/xrandrconfig.h 
new/libkscreen-1.0.3/backends/xrandr/xrandrconfig.h
--- old/libkscreen-1.0.2/backends/xrandr/xrandrconfig.h 2013-11-19 
12:45:12.000000000 +0100
+++ new/libkscreen-1.0.3/backends/xrandr/xrandrconfig.h 2014-05-04 
19:25:33.000000000 +0200
@@ -46,6 +46,7 @@
     void updateKScreenConfig(KScreen::Config *config) const;
     void applyKScreenConfig(KScreen::Config *config);
 
+    int m_primaryOutput;
 private:
     /**
      * We need to print stuff to discover the damn bug
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libkscreen-1.0.2/backends/xrandr/xrandroutput.cpp 
new/libkscreen-1.0.3/backends/xrandr/xrandroutput.cpp
--- old/libkscreen-1.0.2/backends/xrandr/xrandroutput.cpp       2013-11-19 
12:45:12.000000000 +0100
+++ new/libkscreen-1.0.3/backends/xrandr/xrandroutput.cpp       2014-05-04 
19:25:33.000000000 +0200
@@ -116,7 +116,7 @@
         quint8 *data = XRandR::outputEdid(m_id, len);
         if (data) {
             m_edid = new KScreen::Edid(data, len, 0);
-            delete data;
+            delete[] data;
         } else {
             m_edid = new KScreen::Edid(0, 0, 0);
         }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libkscreen-1.0.2/backends/xrandr/xrandrscreen.cpp 
new/libkscreen-1.0.3/backends/xrandr/xrandrscreen.cpp
--- old/libkscreen-1.0.2/backends/xrandr/xrandrscreen.cpp       2013-11-19 
12:45:12.000000000 +0100
+++ new/libkscreen-1.0.3/backends/xrandr/xrandrscreen.cpp       2014-05-04 
19:25:33.000000000 +0200
@@ -60,6 +60,7 @@
     kscreenScreen->setMaxSize(m_maxSize);
     kscreenScreen->setMinSize(m_minSize);
     kscreenScreen->setCurrentSize(m_currentSize);
+    kscreenScreen->setMaxActiveOutputsCount(XRandR::screenResources()->ncrtc);
 
     return kscreenScreen;
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libkscreen-1.0.2/backends/xrandr1.1/xrandr11.cpp 
new/libkscreen-1.0.3/backends/xrandr1.1/xrandr11.cpp
--- old/libkscreen-1.0.2/backends/xrandr1.1/xrandr11.cpp        2013-11-19 
12:45:12.000000000 +0100
+++ new/libkscreen-1.0.3/backends/xrandr1.1/xrandr11.cpp        2014-05-04 
19:25:33.000000000 +0200
@@ -38,7 +38,7 @@
 XRandR11::XRandR11(QObject* parent)
  : QObject(parent)
  , m_valid(false)
- , m_x11Helper(new XRandRX11Helper())
+ , m_x11Helper(0)
  , m_currentConfig(0)
  , m_currentTimestamp(0)
 {
@@ -56,6 +56,8 @@
         return;
     }
 
+    m_x11Helper = new XRandRX11Helper();
+
     connect(m_x11Helper, SIGNAL(outputsChanged()), SLOT(updateConfig()));
 
     m_valid = true;
@@ -95,6 +97,7 @@
     screen->setCurrentSize(QSize(xcbScreen->width_in_pixels, 
xcbScreen->height_in_pixels));
     screen->setMaxSize(QSize(size->max_width, size->max_height));
     screen->setMinSize(QSize(size->min_width, size->min_height));
+    screen->setMaxActiveOutputsCount(1);
 
     config->setScreen(screen);
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libkscreen-1.0.2/src/CMakeLists.txt 
new/libkscreen-1.0.3/src/CMakeLists.txt
--- old/libkscreen-1.0.2/src/CMakeLists.txt     2013-11-19 12:45:12.000000000 
+0100
+++ new/libkscreen-1.0.3/src/CMakeLists.txt     2014-05-04 19:25:33.000000000 
+0200
@@ -30,7 +30,7 @@
             screen.h
             config.h
             configmonitor.h
-            DESTINATION include/kscreen)
+            DESTINATION ${INCLUDE_INSTALL_DIR}/kscreen)
 
 if(NOT WIN32)
    configure_file(${CMAKE_CURRENT_SOURCE_DIR}/kscreen.pc.in 
${CMAKE_CURRENT_BINARY_DIR}/kscreen.pc @ONLY)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libkscreen-1.0.2/src/config.cpp 
new/libkscreen-1.0.3/src/config.cpp
--- old/libkscreen-1.0.2/src/config.cpp 2013-11-19 12:45:12.000000000 +0100
+++ new/libkscreen-1.0.3/src/config.cpp 2014-05-04 19:25:33.000000000 +0200
@@ -31,11 +31,13 @@
   public:
     Private():
       valid(true),
-      screen(0)
+      screen(0),
+      primaryOutput(0)
     { }
 
     Private(const Private &other):
-      valid(other.valid)
+      valid(other.valid),
+      primaryOutput(other.primaryOutput)
     {
       screen = other.screen->clone();
       Q_FOREACH (Output *otherOutput, other.outputs) {
@@ -45,6 +47,7 @@
 
     bool valid;
     Screen* screen;
+    Output* primaryOutput;
     OutputList outputs;
 };
 
@@ -83,30 +86,33 @@
     QSize outputSize;
     Output* currentOutput = 0;
     OutputList outputs = config->outputs();
+    int enabledOutputsCount = 0;
     Q_FOREACH(Output *output, outputs) {
         if (!output->isEnabled()) {
             continue;
         }
 
+        ++enabledOutputsCount;
+
         currentOutput = currentConfig->output(output->id());
         //If there is no such output
         if (!currentOutput) {
-            qWarning() << "The output:" << output->id() << "does not exists";
+            qDebug() << "The output:" << output->id() << "does not exists";
             return false;
         }
         //If the output is not connected
         if (!currentOutput->isConnected()) {
-            qWarning() << "The output:" << output->id() << "is not connected";
+            qDebug() << "The output:" << output->id() << "is not connected";
             return false;
         }
         //if there is no currentMode
         if (output->currentModeId().isEmpty()) {
-            qWarning() << "The output:" << output->id() << "has no 
currentModeId";
+            qDebug() << "The output:" << output->id() << "has no 
currentModeId";
             return false;
         }
         //If the mode is not found in the current output
         if (!currentOutput->mode(output->currentModeId())) {
-            qWarning() << "The output:" << output->id() << "has no mode:" << 
output->currentModeId();
+            qDebug() << "The output:" << output->id() << "has no mode:" << 
output->currentModeId();
             return false;
         }
 
@@ -141,12 +147,18 @@
         }
     }
 
+    const int maxEnabledOutputsCount = 
config->screen()->maxActiveOutputsCount();
+    if (enabledOutputsCount > maxEnabledOutputsCount) {
+        qDebug() << "Too many active screens. Requested: " << 
enabledOutputsCount << ", Max: " << maxEnabledOutputsCount;
+        return false;
+    }
+
     if (rect.width() > config->screen()->maxSize().width()) {
-        qWarning() << "The configuration has too much width:" << rect.width();
+        qDebug() << "The configuration has too much width:" << rect.width();
         return false;
     }
     if (rect.height() > config->screen()->maxSize().height()) {
-        qWarning() << "The configuration has too much height:" << 
rect.height();
+        qDebug() << "The configuration has too much height:" << rect.height();
         return false;
     }
 
@@ -223,14 +235,27 @@
 
 Output* Config::primaryOutput() const
 {
+    if (d->primaryOutput) {
+        return d->primaryOutput;
+    }
+
     Q_FOREACH(Output* output, d->outputs) {
         if (output->isPrimary()) {
-            return output;
+            d->primaryOutput = output;
+            return d->primaryOutput;
         }
     }
+
     return 0;
 }
 
+void Config::setPrimaryOutput(Output* output)
+{
+    d->primaryOutput = output;
+
+    Q_EMIT primaryOutputChanged(output);
+}
+
 void Config::addOutput(Output* output)
 {
     d->outputs.insert(output->id(), output);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libkscreen-1.0.2/src/config.h 
new/libkscreen-1.0.3/src/config.h
--- old/libkscreen-1.0.2/src/config.h   2013-11-19 12:45:12.000000000 +0100
+++ new/libkscreen-1.0.3/src/config.h   2014-05-04 19:25:33.000000000 +0200
@@ -53,6 +53,7 @@
     QHash<int, Output*> outputs() const;
     QHash<int, Output*> connectedOutputs() const;
     Output* primaryOutput() const;
+    void setPrimaryOutput(Output *output);
     void addOutput(Output *output);
     void removeOutput(int outputId);
     void setOutputs(OutputList outputs);
@@ -63,6 +64,7 @@
   Q_SIGNALS:
       void outputAdded(Output *output);
       void outputRemoved(int outputId);
+      void primaryOutputChanged(KScreen::Output *output);
   private:
     Q_DISABLE_COPY(Config)
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libkscreen-1.0.2/src/kscreen.pc.in 
new/libkscreen-1.0.3/src/kscreen.pc.in
--- old/libkscreen-1.0.2/src/kscreen.pc.in      2013-11-19 12:45:12.000000000 
+0100
+++ new/libkscreen-1.0.3/src/kscreen.pc.in      2014-05-04 19:25:33.000000000 
+0200
@@ -4,7 +4,7 @@
 
 Name: kscreen
 Description: Qt Based library to manage screens with backends (xrandr, 
whatevercomesnext)
-Version: @VERSION@
+Version: @libkscreen_VERSION@
 
 Libs: -L${libdir} -lkscreen
 Cflags: -I${includedir}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libkscreen-1.0.2/src/output.cpp 
new/libkscreen-1.0.3/src/output.cpp
--- old/libkscreen-1.0.2/src/output.cpp 2013-11-19 12:45:12.000000000 +0100
+++ new/libkscreen-1.0.3/src/output.cpp 2014-05-04 19:25:33.000000000 +0200
@@ -31,6 +31,7 @@
   public:
     Private():
         id(0),
+        type(Unknown),
         rotation(None),
         connected(false),
         enabled(false),
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libkscreen-1.0.2/src/screen.cpp 
new/libkscreen-1.0.3/src/screen.cpp
--- old/libkscreen-1.0.2/src/screen.cpp 2013-11-19 12:45:12.000000000 +0100
+++ new/libkscreen-1.0.3/src/screen.cpp 2014-05-04 19:25:33.000000000 +0200
@@ -24,11 +24,13 @@
 {
   public:
     Private():
-      id(0)
+      id(0),
+      maxActiveOutputsCount(0)
     { }
 
     Private(const Private &other):
         id(other.id),
+        maxActiveOutputsCount(other.maxActiveOutputsCount),
         currentSize(other.currentSize),
         minSize(other.minSize),
         maxSize(other.maxSize)
@@ -36,6 +38,7 @@
     }
 
     int id;
+    int maxActiveOutputsCount;
     QSize currentSize;
     QSize minSize;
     QSize maxSize;
@@ -111,6 +114,16 @@
     d->minSize = minSize;
 }
 
+int Screen::maxActiveOutputsCount() const
+{
+    return d->maxActiveOutputsCount;
+}
+
+void Screen::setMaxActiveOutputsCount(int maxActiveOutputsCount)
+{
+    d->maxActiveOutputsCount = maxActiveOutputsCount;
+}
+
 } //KScreen namespace
 
 #include "screen.moc"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libkscreen-1.0.2/src/screen.h 
new/libkscreen-1.0.3/src/screen.h
--- old/libkscreen-1.0.2/src/screen.h   2013-11-19 12:45:12.000000000 +0100
+++ new/libkscreen-1.0.3/src/screen.h   2014-05-04 19:25:33.000000000 +0200
@@ -35,6 +35,7 @@
         Q_PROPERTY(QSize currentSize READ currentSize WRITE setCurrentSize 
NOTIFY currentSizeChanged)
         Q_PROPERTY(QSize minSize READ minSize CONSTANT)
         Q_PROPERTY(QSize maxSize READ maxSize CONSTANT)
+        Q_PROPERTY(int maxActiveOutputsCount READ maxActiveOutputsCount 
CONSTANT)
 
         explicit Screen(QObject *parent = 0);
         virtual ~Screen();
@@ -53,6 +54,9 @@
         QSize maxSize() const;
         void setMaxSize(const QSize& maxSize);
 
+        int maxActiveOutputsCount() const;
+        void setMaxActiveOutputsCount(int maxActiveOutputsCount);
+
     Q_SIGNALS:
         void currentSizeChanged();
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libkscreen-1.0.2/tests/configs/multipleclone.json 
new/libkscreen-1.0.3/tests/configs/multipleclone.json
--- old/libkscreen-1.0.2/tests/configs/multipleclone.json       2013-11-19 
12:45:12.000000000 +0100
+++ new/libkscreen-1.0.3/tests/configs/multipleclone.json       2014-05-04 
19:25:33.000000000 +0200
@@ -13,7 +13,8 @@
         "currentSize" : {
             "width" : 1024,
             "height" : 768
-        }
+        },
+        "maxActiveOutputsCount": 2
     },
     "outputs" :
     [
@@ -120,4 +121,4 @@
             "edid" : 
"AP///////wAQrBbwTExLQQ4WAQOANCB46h7Frk80sSYOUFSlSwCBgKlA0QBxTwEBAQEBAQEBKDyAoHCwI0AwIDYABkQhAAAaAAAA/wBGNTI1TTI0NUFLTEwKAAAA/ABERUxMIFUyNDEwCiAgAAAA/QA4TB5REQAKICAgICAgAToCAynxUJAFBAMCBxYBHxITFCAVEQYjCQcHZwMMABAAOC2DAQAA4wUDAQI6gBhxOC1AWCxFAAZEIQAAHgEdgBhxHBYgWCwlAAZEIQAAngEdAHJR0B4gbihVAAZEIQAAHowK0Iog4C0QED6WAAZEIQAAGAAAAAAAAAAAAAAAAAAAPg=="
         }
     ]
-}
\ No newline at end of file
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libkscreen-1.0.2/tests/configs/multipleoutput.json 
new/libkscreen-1.0.3/tests/configs/multipleoutput.json
--- old/libkscreen-1.0.2/tests/configs/multipleoutput.json      2013-11-19 
12:45:12.000000000 +0100
+++ new/libkscreen-1.0.3/tests/configs/multipleoutput.json      2014-05-04 
19:25:33.000000000 +0200
@@ -13,7 +13,8 @@
         "currentSize" : {
             "width" : 3200,
             "height" : 1880
-        }
+        },
+        "maxActiveOutputsCount": 2
     },
     "outputs" :
     [
@@ -119,4 +120,4 @@
             "edid" : 
"AP///////wAQrBbwTExLQQ4WAQOANCB46h7Frk80sSYOUFSlSwCBgKlA0QBxTwEBAQEBAQEBKDyAoHCwI0AwIDYABkQhAAAaAAAA/wBGNTI1TTI0NUFLTEwKAAAA/ABERUxMIFUyNDEwCiAgAAAA/QA4TB5REQAKICAgICAgAToCAynxUJAFBAMCBxYBHxITFCAVEQYjCQcHZwMMABAAOC2DAQAA4wUDAQI6gBhxOC1AWCxFAAZEIQAAHgEdgBhxHBYgWCwlAAZEIQAAngEdAHJR0B4gbihVAAZEIQAAHowK0Iog4C0QED6WAAZEIQAAGAAAAAAAAAAAAAAAAAAAPg=="
         }
     ]
-}
\ No newline at end of file
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libkscreen-1.0.2/tests/configs/singleOutputWithoutPreferred.json 
new/libkscreen-1.0.3/tests/configs/singleOutputWithoutPreferred.json
--- old/libkscreen-1.0.2/tests/configs/singleOutputWithoutPreferred.json        
2013-11-19 12:45:12.000000000 +0100
+++ new/libkscreen-1.0.3/tests/configs/singleOutputWithoutPreferred.json        
2014-05-04 19:25:33.000000000 +0200
@@ -13,7 +13,8 @@
         "currentSize" : {
             "width" : 1280,
             "height" : 800
-        }
+        },
+        "maxActiveOutputsCount": 2
     },
     "outputs" :
     [
@@ -64,4 +65,4 @@
         "edid" : 
"AP///////wBMLcMFMzJGRQkUAQMOMx14Ku6Ro1RMmSYPUFQjCACBAIFAgYCVAKlAswABAQEBAjqAGHE4LUBYLEUA/h8RAAAeAAAA/QA4PB5REQAKICAgICAgAAAA/ABTeW5jTWFzdGVyCiAgAAAA/wBIOU1aMzAyMTk2CiAgAC4="
     }
     ]
-}
\ No newline at end of file
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libkscreen-1.0.2/tests/configs/singleoutput.json 
new/libkscreen-1.0.3/tests/configs/singleoutput.json
--- old/libkscreen-1.0.2/tests/configs/singleoutput.json        2013-11-19 
12:45:12.000000000 +0100
+++ new/libkscreen-1.0.3/tests/configs/singleoutput.json        2014-05-04 
19:25:33.000000000 +0200
@@ -13,7 +13,8 @@
         "currentSize" : {
             "width" : 1280,
             "height" : 800
-        }
+        },
+        "maxActiveOutputsCount": 2
     },
     "outputs" :
     [
@@ -64,4 +65,4 @@
             "edid" : 
"AP///////wBMLcMFMzJGRQkUAQMOMx14Ku6Ro1RMmSYPUFQjCACBAIFAgYCVAKlAswABAQEBAjqAGHE4LUBYLEUA/h8RAAAeAAAA/QA4PB5REQAKICAgICAgAAAA/ABTeW5jTWFzdGVyCiAgAAAA/wBIOU1aMzAyMTk2CiAgAC4="
         }
     ]
-}
\ No newline at end of file
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libkscreen-1.0.2/tests/configs/singleoutputBroken.json 
new/libkscreen-1.0.3/tests/configs/singleoutputBroken.json
--- old/libkscreen-1.0.2/tests/configs/singleoutputBroken.json  2013-11-19 
12:45:12.000000000 +0100
+++ new/libkscreen-1.0.3/tests/configs/singleoutputBroken.json  2014-05-04 
19:25:33.000000000 +0200
@@ -13,7 +13,8 @@
         "currentSize" : {
             "width" : 1280,
             "height" : 800
-        }
+        },
+        "maxActiveOutputsCount": 2
     },
     "outputs" :
     [
@@ -72,4 +73,4 @@
         "edid" : 
"AP///////wBMLcMFMzJGRQkUAQMOMx14Ku6Ro1RMmSYPUFQjCACBAIFAgYCVAKlAswABAQEBAjqAGHE4LUBYLEUA/h8RAAAeAAAA/QA4PB5REQAKICAgICAgAAAA/ABTeW5jTWFzdGVyCiAgAAAA/wBIOU1aMzAyMTk2CiAgAC4="
     }
     ]
-}
\ No newline at end of file
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libkscreen-1.0.2/tests/configs/tooManyOutputs.json 
new/libkscreen-1.0.3/tests/configs/tooManyOutputs.json
--- old/libkscreen-1.0.2/tests/configs/tooManyOutputs.json      1970-01-01 
01:00:00.000000000 +0100
+++ new/libkscreen-1.0.3/tests/configs/tooManyOutputs.json      2014-05-04 
19:25:33.000000000 +0200
@@ -0,0 +1,78 @@
+{
+    "screen" :
+    {
+        "id" : 1,
+        "maxSize" : {
+            "width" : 8192,
+            "height" : 8192
+        },
+        "minSize" : {
+            "width" : 320,
+            "height" : 200
+        },
+        "currentSize" : {
+            "width" : 3200,
+            "height" : 1880
+        },
+        "maxActiveOutputsCount": 1
+    },
+    "outputs" :
+    [
+        {
+            "id" : 1,
+            "name" : "LVDS1",
+            "type" : "LVDS",
+            "modes" :
+            [
+                {
+                    "id" : 3,
+                    "name" : "1280x800",
+                    "refreshRate" : 59.9,
+                    "size" : {
+                        "width" : 1280,
+                        "height" : 800
+                    }
+                }
+            ],
+            "pos" : {
+                "x" : 0,
+                "y" : 0
+            },
+            "currentModeId" : 3,
+            "preferredModes" : [3],
+            "rotation" : 1,
+            "connected" : true,
+            "enabled" : true,
+            "primary" : true,
+            "edid" : 
"AP///////wBMLcMFMzJGRQkUAQMOMx14Ku6Ro1RMmSYPUFQjCACBAIFAgYCVAKlAswABAQEBAjqAGHE4LUBYLEUA/h8RAAAeAAAA/QA4PB5REQAKICAgICAgAAAA/ABTeW5jTWFzdGVyCiAgAAAA/wBIOU1aMzAyMTk2CiAgAC4="
+        },
+        {
+            "id" : 2,
+            "name" : "HDMI1",
+            "type" : "HDMI",
+            "modes" :
+            [
+                {
+                    "id" : 4,
+                    "name" : "1920x1080",
+                    "refreshRate" : 60,
+                    "size" : {
+                        "width" : 1920,
+                        "height" : 1080
+                    }
+                }
+            ],
+            "pos" : {
+                "x" : 1280,
+                "y" : 0
+            },
+            "currentModeId" : 4,
+            "preferredModes" : [4],
+            "rotation" : 1,
+            "connected" : true,
+            "enabled" : true,
+            "primary" : false,
+            "edid" : 
"AP///////wAQrBbwTExLQQ4WAQOANCB46h7Frk80sSYOUFSlSwCBgKlA0QBxTwEBAQEBAQEBKDyAoHCwI0AwIDYABkQhAAAaAAAA/wBGNTI1TTI0NUFLTEwKAAAA/ABERUxMIFUyNDEwCiAgAAAA/QA4TB5REQAKICAgICAgAToCAynxUJAFBAMCBxYBHxITFCAVEQYjCQcHZwMMABAAOC2DAQAA4wUDAQI6gBhxOC1AWCxFAAZEIQAAHgEdgBhxHBYgWCwlAAZEIQAAngEdAHJR0B4gbihVAAZEIQAAHowK0Iog4C0QED6WAAZEIQAAGAAAAAAAAAAAAAAAAAAAPg=="
+        }
+    ]
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libkscreen-1.0.2/tests/testscreenconfig.cpp 
new/libkscreen-1.0.3/tests/testscreenconfig.cpp
--- old/libkscreen-1.0.2/tests/testscreenconfig.cpp     2013-11-19 
12:45:12.000000000 +0100
+++ new/libkscreen-1.0.3/tests/testscreenconfig.cpp     2014-05-04 
19:25:33.000000000 +0200
@@ -181,6 +181,21 @@
     QVERIFY(!Config::canBeApplied(brokenConfig));
     primaryBroken->mode(QLatin1String("3"))->setSize(QSize(1280, 800));
     QVERIFY(Config::canBeApplied(brokenConfig));
+
+
+    path = TEST_DATA;
+    path.append("/tooManyOutputs.json");
+    setenv("TEST_DATA", path, 1);
+    brokenConfig = Config::current();
+
+    int enabledOutputsCount = 0;
+    Q_FOREACH (Output *output, brokenConfig->outputs()) {
+        if (output->isEnabled()) {
+            ++enabledOutputsCount;
+        }
+    }
+    QVERIFY(brokenConfig->screen()->maxActiveOutputsCount() < 
enabledOutputsCount);
+    QVERIFY(!Config::canBeApplied(brokenConfig));
 }
 
 QTEST_MAIN(testScreenConfig)

-- 
To unsubscribe, e-mail: opensuse-commit+unsubscr...@opensuse.org
For additional commands, e-mail: opensuse-commit+h...@opensuse.org

Reply via email to