Hello community, here is the log from the commit of package libkscreen2 for openSUSE:Factory checked in at 2018-01-22 16:05:53 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/libkscreen2 (Old) and /work/SRC/openSUSE:Factory/.libkscreen2.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "libkscreen2" Mon Jan 22 16:05:53 2018 rev:60 rq:566830 version:5.11.95 Changes: -------- --- /work/SRC/openSUSE:Factory/libkscreen2/libkscreen2.changes 2018-01-03 13:36:55.927323951 +0100 +++ /work/SRC/openSUSE:Factory/.libkscreen2.new/libkscreen2.changes 2018-01-22 16:05:56.777224044 +0100 @@ -1,0 +2,26 @@ +Mon Jan 15 15:54:05 CET 2018 - [email protected] + +- Update to 5.11.95 + * New feature release + * For more details please see: + * https://www.kde.org/announcements/plasma-5.11.95.php +- Changes since 5.11.5: + * Remove obsolete reviewboardrc file + * Fix typo + * Honour the preferred mode flag in the kwayland backend + * kwaylandconfig: autotest scale changed signal arrival + * add scale and labels to output debug + * add debug << operator to config + * show in debug what the result is supposed to be + * Use nullptr. Initialize pointer + * Allow setting mode by widthxheight@refreshrate + * Also copy scale in Output::apply() + * Merge scale changes + * let's continue in debug code instead of returning from XRandRConfig::applyKScreenConfig + * Add setScale option to kscreendoctor + * Use QString for number parsing + * fix comment + * kscreen-doctor: support setting scale of outputs + * Test only changing the scale + +------------------------------------------------------------------- Old: ---- libkscreen-5.11.5.tar.xz New: ---- libkscreen-5.11.95.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ libkscreen2.spec ++++++ --- /var/tmp/diff_new_pack.FtIZCm/_old 2018-01-22 16:05:57.377195971 +0100 +++ /var/tmp/diff_new_pack.FtIZCm/_new 2018-01-22 16:05:57.381195784 +0100 @@ -18,7 +18,7 @@ %define lname libKF5Screen7 Name: libkscreen2 -Version: 5.11.5 +Version: 5.11.95 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/stable/plasma/%{version}/libkscreen-%{version}.tar.xz +Source: http://download.kde.org/unstable/plasma/%{version}/libkscreen-%{version}.tar.xz Source1: baselibs.conf BuildRoot: %{_tmppath}/%{name}-%{version}-build ++++++ libkscreen-5.11.5.tar.xz -> libkscreen-5.11.95.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libkscreen-5.11.5/.reviewboardrc new/libkscreen-5.11.95/.reviewboardrc --- old/libkscreen-5.11.5/.reviewboardrc 2018-01-02 13:37:52.902809739 +0100 +++ new/libkscreen-5.11.95/.reviewboardrc 1970-01-01 01:00:00.000000000 +0100 @@ -1,3 +0,0 @@ -REVIEWBOARD_URL = "https://git.reviewboard.kde.org" -REPOSITORY = 'git://anongit.kde.org/libkscreen' -TARGET_GROUPS = 'solid' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libkscreen-5.11.5/CMakeLists.txt new/libkscreen-5.11.95/CMakeLists.txt --- old/libkscreen-5.11.5/CMakeLists.txt 2018-01-02 13:37:52.902809739 +0100 +++ new/libkscreen-5.11.95/CMakeLists.txt 2018-01-15 14:34:08.000000000 +0100 @@ -1,7 +1,7 @@ cmake_minimum_required(VERSION 2.8.12) project(libkscreen) -set(PROJECT_VERSION "5.11.5") +set(PROJECT_VERSION "5.11.95") 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.5/autotests/testkwaylandbackend.cpp new/libkscreen-5.11.95/autotests/testkwaylandbackend.cpp --- old/libkscreen-5.11.5/autotests/testkwaylandbackend.cpp 2018-01-02 13:37:52.906809765 +0100 +++ new/libkscreen-5.11.95/autotests/testkwaylandbackend.cpp 2018-01-15 14:34:08.000000000 +0100 @@ -151,6 +151,7 @@ QVERIFY(output->geometry() != QRectF()); QVERIFY(output->sizeMm() != QSize()); QVERIFY(output->edid() != 0); + QVERIFY(output->preferredModes().size() == 1); QCOMPARE(output->rotation(), Output::None); QVERIFY(!ids.contains(output->id())); ids << output->id(); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libkscreen-5.11.5/autotests/testkwaylandconfig.cpp new/libkscreen-5.11.95/autotests/testkwaylandconfig.cpp --- old/libkscreen-5.11.5/autotests/testkwaylandconfig.cpp 2018-01-02 13:37:52.906809765 +0100 +++ new/libkscreen-5.11.95/autotests/testkwaylandconfig.cpp 2018-01-15 14:34:08.000000000 +0100 @@ -51,6 +51,7 @@ void testPositionChange(); void testRotationChange(); void testRotationChange_data(); + void testScaleChange(); void testModeChange(); private: @@ -197,6 +198,45 @@ } +void TestKWaylandConfig::testScaleChange() +{ + auto op = new GetConfigOperation(); + QVERIFY(op->exec()); + auto config = op->config(); + QVERIFY(config); + + auto op2 = new GetConfigOperation(); + QVERIFY(op2->exec()); + auto config2 = op2->config(); + QVERIFY(config2); + + // Prepare monitor & spy + KScreen::ConfigMonitor *monitor = KScreen::ConfigMonitor::instance(); + monitor->addConfig(config); + QSignalSpy configSpy(monitor, &KScreen::ConfigMonitor::configurationChanged); + QSignalSpy configSpy2(monitor, &KScreen::ConfigMonitor::configurationChanged); + + auto output2 = config2->outputs()[2]; // is this id stable enough? + QSignalSpy outputSpy(output2.data(), &KScreen::Output::scaleChanged); + QCOMPARE(output2->scale(), 1.0); + + auto output = config->outputs()[2]; // is this id stable enough? + output->setScale(2); + + QSignalSpy serverSpy(m_server, &WaylandTestServer::configChanged); + auto sop = new SetConfigOperation(config, this); + sop->exec(); // fire and forget... + + QVERIFY(configSpy.wait()); + // check if the server changed + QCOMPARE(serverSpy.count(), 1); + + QCOMPARE(configSpy.count(), 1); + QCOMPARE(outputSpy.count(), 1); + QCOMPARE(configSpy2.count(), 1); + QCOMPARE(output2->scale(), 2.0); +} + void TestKWaylandConfig::testModeChange() { auto op = new GetConfigOperation(); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libkscreen-5.11.5/backends/kwayland/waylandoutput.cpp new/libkscreen-5.11.95/backends/kwayland/waylandoutput.cpp --- old/libkscreen-5.11.5/backends/kwayland/waylandoutput.cpp 2018-01-02 13:37:52.910809792 +0100 +++ new/libkscreen-5.11.95/backends/kwayland/waylandoutput.cpp 2018-01-15 14:34:08.000000000 +0100 @@ -131,6 +131,7 @@ output->setPos(m_output->globalPosition()); output->setRotation(m_rotationMap[m_output->transform()]); KScreen::ModeList modeList; + QStringList preferredModeIds; m_modeIdMap.clear(); QString currentModeId = QStringLiteral("-1"); Q_FOREACH (const KWayland::Client::OutputDevice::Mode &m, m_output->modes()) { @@ -152,6 +153,9 @@ if (m.flags.testFlag(KWayland::Client::OutputDevice::Mode::Flag::Current)) { currentModeId = modeid; } + if (m.flags.testFlag(KWayland::Client::OutputDevice::Mode::Flag::Preferred)) { + preferredModeIds << modeid; + } // Update the kscreen => kwayland mode id translation map m_modeIdMap.insert(modeid, m.id); // Add to the modelist which gets set on the output @@ -162,6 +166,7 @@ } output->setCurrentModeId(currentModeId); + output->setPreferredModes(preferredModeIds); output->setModes(modeList); output->setScale(m_output->scale()); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libkscreen-5.11.5/backends/xcbeventlistener.cpp new/libkscreen-5.11.95/backends/xcbeventlistener.cpp --- old/libkscreen-5.11.5/backends/xcbeventlistener.cpp 2018-01-02 13:37:52.910809792 +0100 +++ new/libkscreen-5.11.95/backends/xcbeventlistener.cpp 2018-01-15 14:34:08.000000000 +0100 @@ -187,7 +187,7 @@ } else if(randrEvent->subCode == XCB_RANDR_NOTIFY_OUTPUT_CHANGE) { xcb_randr_output_change_t output = randrEvent->u.oc; - qCDebug(KSCREEN_XCB_HELPER) << "RRotify_OutputChange"; + qCDebug(KSCREEN_XCB_HELPER) << "RRNotify_OutputChange"; qCDebug(KSCREEN_XCB_HELPER) << "\tOutput: " << output.output; qCDebug(KSCREEN_XCB_HELPER) << "\tCRTC: " << output.crtc; qCDebug(KSCREEN_XCB_HELPER) << "\tMode: " << output.mode; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libkscreen-5.11.5/backends/xcbwrapper.cpp new/libkscreen-5.11.95/backends/xcbwrapper.cpp --- old/libkscreen-5.11.5/backends/xcbwrapper.cpp 2018-01-02 13:37:52.910809792 +0100 +++ new/libkscreen-5.11.95/backends/xcbwrapper.cpp 2018-01-15 14:34:08.000000000 +0100 @@ -51,7 +51,7 @@ } } - return Q_NULLPTR; + return nullptr; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libkscreen-5.11.5/backends/xrandr/xrandrconfig.cpp new/libkscreen-5.11.95/backends/xrandr/xrandrconfig.cpp --- old/libkscreen-5.11.5/backends/xrandr/xrandrconfig.cpp 2018-01-02 13:37:52.910809792 +0100 +++ new/libkscreen-5.11.95/backends/xrandr/xrandrconfig.cpp 2018-01-15 14:34:08.000000000 +0100 @@ -37,7 +37,7 @@ XRandRConfig::XRandRConfig() : QObject() - , m_screen(Q_NULLPTR) + , m_screen(nullptr) { m_screen = new XRandRScreen(this); @@ -200,7 +200,7 @@ // qDebug() << kRealBacktrace(256); printConfig(config); printInternalCond(); - return; + continue; } // If the output would not fit into new screen size, we need to disable @@ -495,7 +495,7 @@ { xcb_randr_output_t outputs[1] { static_cast<xcb_randr_output_t>(kscreenOutput->id()) }; - XRandRCrtc *freeCrtc = Q_NULLPTR; + XRandRCrtc *freeCrtc = nullptr; qCDebug(KSCREEN_XRANDR) << m_crtcs; Q_FOREACH (XRandRCrtc *crtc, m_crtcs) { crtc->update(); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libkscreen-5.11.5/backends/xrandr/xrandroutput.cpp new/libkscreen-5.11.95/backends/xrandr/xrandroutput.cpp --- old/libkscreen-5.11.5/backends/xrandr/xrandroutput.cpp 2018-01-02 13:37:52.910809792 +0100 +++ new/libkscreen-5.11.95/backends/xrandr/xrandroutput.cpp 2018-01-15 14:34:08.000000000 +0100 @@ -55,7 +55,7 @@ bool XRandROutput::isEnabled() const { - return m_crtc != Q_NULLPTR && m_crtc->mode() != XCB_NONE; + return m_crtc != nullptr && m_crtc->mode() != XCB_NONE; } bool XRandROutput::isPrimary() const @@ -86,7 +86,7 @@ XRandRMode* XRandROutput::currentMode() const { if (!m_crtc) { - return Q_NULLPTR; + return nullptr; } int modeId = m_crtc->mode(); if (!m_modes.contains(modeId)) { @@ -169,7 +169,7 @@ // crtc->mode may already be unset due to xcb_randr_crtc_tChangeNotify coming before // xcb_randr_output_tChangeNotify and reseting the CRTC mode - if ((m_crtc == Q_NULLPTR) != (crtc == XCB_NONE)) { + if ((m_crtc == nullptr) != (crtc == XCB_NONE)) { if (crtc == XCB_NONE && mode == XCB_NONE) { // Monitor has been disabled m_crtc->disconectOutput(m_id); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libkscreen-5.11.5/src/backendlauncher/backenddbuswrapper.h new/libkscreen-5.11.95/src/backendlauncher/backenddbuswrapper.h --- old/libkscreen-5.11.5/src/backendlauncher/backenddbuswrapper.h 2018-01-02 13:37:52.910809792 +0100 +++ new/libkscreen-5.11.95/src/backendlauncher/backenddbuswrapper.h 2018-01-15 14:34:08.000000000 +0100 @@ -56,7 +56,7 @@ private: - KScreen::AbstractBackend *mBackend; + KScreen::AbstractBackend *mBackend = nullptr; QTimer mChangeCollector; KScreen::ConfigPtr mCurrentConfig; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libkscreen-5.11.5/src/backendlauncher/backendloader.cpp new/libkscreen-5.11.95/src/backendlauncher/backendloader.cpp --- old/libkscreen-5.11.5/src/backendlauncher/backendloader.cpp 2018-01-02 13:37:52.914809818 +0100 +++ new/libkscreen-5.11.95/src/backendlauncher/backendloader.cpp 2018-01-15 14:34:08.000000000 +0100 @@ -47,8 +47,8 @@ BackendLoader::BackendLoader() : QObject() , QDBusContext() - , mLoader(Q_NULLPTR) - , mBackend(Q_NULLPTR) + , mLoader(nullptr) + , mBackend(nullptr) { } @@ -104,9 +104,9 @@ mBackend = new BackendDBusWrapper(backend); if (!mBackend->init()) { delete mBackend; - mBackend = Q_NULLPTR; + mBackend = nullptr; pluginDeleter(mLoader); - mLoader = Q_NULLPTR; + mLoader = nullptr; return false; } return true; @@ -115,7 +115,7 @@ KScreen::AbstractBackend *BackendLoader::loadBackend(const QString &name, const QVariantMap &arguments) { - if (mLoader == Q_NULLPTR) { + if (mLoader == nullptr) { std::unique_ptr<QPluginLoader, void(*)(QPluginLoader *)> loader(new QPluginLoader(), pluginDeleter); mLoader = loader.release(); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libkscreen-5.11.5/src/backendlauncher/backendloader.h new/libkscreen-5.11.95/src/backendlauncher/backendloader.h --- old/libkscreen-5.11.5/src/backendlauncher/backendloader.h 2018-01-02 13:37:52.914809818 +0100 +++ new/libkscreen-5.11.95/src/backendlauncher/backendloader.h 2018-01-15 14:34:08.000000000 +0100 @@ -51,8 +51,8 @@ KScreen::AbstractBackend *loadBackend(const QString &name, const QVariantMap &arguments); private: - QPluginLoader *mLoader; - BackendDBusWrapper *mBackend; + QPluginLoader *mLoader = nullptr; + BackendDBusWrapper *mBackend = nullptr; }; #endif // BACKENDLAUNCHER_H diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libkscreen-5.11.5/src/backendmanager.cpp new/libkscreen-5.11.95/src/backendmanager.cpp --- old/libkscreen-5.11.5/src/backendmanager.cpp 2018-01-02 13:37:52.914809818 +0100 +++ new/libkscreen-5.11.95/src/backendmanager.cpp 2018-01-15 14:34:08.000000000 +0100 @@ -49,7 +49,7 @@ const int BackendManager::sMaxCrashCount = 4; -BackendManager *BackendManager::sInstance = 0; +BackendManager *BackendManager::sInstance = nullptr; BackendManager *BackendManager::instance() { @@ -216,7 +216,7 @@ qCDebug(KSCREEN) << finfo.fileName() << "does not provide valid KScreen backend"; } - return Q_NULLPTR; + return nullptr; } KScreen::AbstractBackend *BackendManager::loadBackendInProcess(const QString &name) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libkscreen-5.11.5/src/config.cpp new/libkscreen-5.11.95/src/config.cpp --- old/libkscreen-5.11.5/src/config.cpp 2018-01-02 13:37:52.914809818 +0100 +++ new/libkscreen-5.11.95/src/config.cpp 2018-01-15 14:34:08.000000000 +0100 @@ -198,7 +198,7 @@ } Config::Config() - : QObject(0) + : QObject(nullptr) , d(new Private(this)) { } @@ -363,4 +363,22 @@ setValid(other->isValid()); } + +QDebug operator<<(QDebug dbg, const KScreen::ConfigPtr &config) +{ + if (config) { + dbg << "KScreen::Config("; + for (const auto output : config->outputs()) { + if (output->isConnected()) { + dbg << endl << output; + } + } + dbg << ")"; + } else { + dbg << "KScreen::Config(NULL)"; + } + return dbg; +} + + #include "config.moc" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libkscreen-5.11.5/src/config.h new/libkscreen-5.11.95/src/config.h --- old/libkscreen-5.11.5/src/config.h 2018-01-02 13:37:52.914809818 +0100 +++ new/libkscreen-5.11.95/src/config.h 2018-01-15 14:34:08.000000000 +0100 @@ -168,4 +168,8 @@ Q_DECLARE_OPERATORS_FOR_FLAGS(KScreen::Config::Features) +KSCREEN_EXPORT QDebug operator<<(QDebug dbg, const KScreen::ConfigPtr &config); + + + #endif //KSCREEN_CONFIG_H diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libkscreen-5.11.5/src/configmonitor.cpp new/libkscreen-5.11.95/src/configmonitor.cpp --- old/libkscreen-5.11.5/src/configmonitor.cpp 2018-01-02 13:37:52.914809818 +0100 +++ new/libkscreen-5.11.95/src/configmonitor.cpp 2018-01-15 14:34:08.000000000 +0100 @@ -195,9 +195,9 @@ ConfigMonitor *ConfigMonitor::instance() { - static ConfigMonitor *s_instance = Q_NULLPTR; + static ConfigMonitor *s_instance = nullptr; - if (s_instance == 0) { + if (s_instance == nullptr) { s_instance = new ConfigMonitor(); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libkscreen-5.11.5/src/doctor/doctor.cpp new/libkscreen-5.11.95/src/doctor/doctor.cpp --- old/libkscreen-5.11.5/src/doctor/doctor.cpp 2018-01-02 13:37:52.914809818 +0100 +++ new/libkscreen-5.11.95/src/doctor/doctor.cpp 2018-01-15 14:34:08.000000000 +0100 @@ -198,7 +198,7 @@ } } if (output_id == -1) { - output_id = parseInt(ops[1], ok); + output_id = ops[1].toInt(&ok); if (!ok) { cerr << "Unable to parse output id" << ops[1] << endl; qApp->exit(3); @@ -231,8 +231,8 @@ qApp->exit(5); return; } - int x = parseInt(_pos[0], ok); - int y = parseInt(_pos[1], ok); + int x = _pos[0].toInt(&ok); + int y = _pos[1].toInt(&ok); if (!ok) { cerr << "Unable to parse position" << ops[3] << endl; qApp->exit(5); @@ -245,6 +245,19 @@ qApp->exit(1); return; } + } else if ((ops.count() == 4 || ops.count() == 5) && ops[2] == QStringLiteral("scale")) { + // be lenient about . vs. comma as separator + qreal scale = ops[3].replace(QStringLiteral(","), QStringLiteral(".")).toDouble(&ok); + if (ops.count() == 5) { + const auto dbl = ops[3] + QStringLiteral(".") + ops[4]; + scale = dbl.toDouble(&ok); + }; + // set scale + if (!ok || scale == 0 || !setScale(output_id, scale)) { + qCDebug(KSCREEN_DOCTOR) << "Could not set scale " << scale << " to output " << output_id; + qApp->exit(9); + return; + } } else { cerr << "Unable to parse arguments" << op << endl; qApp->exit(2); @@ -255,17 +268,6 @@ } } -int Doctor::parseInt(const QString &str, bool &ok) const -{ - int _id = str.toInt(); - if (QString::number(_id) == str) { - ok = true; - return _id; - } - ok = false; - return 0; -} - void Doctor::configReceived(KScreen::ConfigOperation *op) { m_config = op->config(); @@ -402,16 +404,37 @@ if (output->id() == id) { // find mode Q_FOREACH (const KScreen::ModePtr mode, output->modes()) { - if (mode->id() == mode_id) { - qCDebug(KSCREEN_DOCTOR) << "Taddaaa! Found mode" << mode->id() << mode->name(); + auto name = QString("%1x%2@%3").arg(QString::number(mode->size().width()), + QString::number(mode->size().height()), + QString::number(qRound(mode->refreshRate()))); + if (mode->id() == mode_id || name == mode_id) { + qCDebug(KSCREEN_DOCTOR) << "Taddaaa! Found mode" << mode->id() << name; output->setCurrentModeId(mode->id()); m_changed = true; return true; - } + } } } } - cout << "Output mode " << id << " not found." << endl; + cout << "Output mode " << mode_id << " not found." << endl; + return false; +} + +bool Doctor::setScale(int id, qreal scale) +{ + if (!m_config) { + qCWarning(KSCREEN_DOCTOR) << "Invalid config."; + return false; + } + + Q_FOREACH (const auto &output, m_config->outputs()) { + if (output->id() == id) { + output->setScale(scale); + m_changed = true; + return true; + } + } + cout << "Output scale " << id << " invalid." << endl; return false; } @@ -422,6 +445,6 @@ } auto setop = new SetConfigOperation(m_config, this); setop->exec(); - qCDebug(KSCREEN_DOCTOR) << "setop exec returned"; + qCDebug(KSCREEN_DOCTOR) << "setop exec returned" << m_config; qApp->exit(0); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libkscreen-5.11.5/src/doctor/doctor.h new/libkscreen-5.11.95/src/doctor/doctor.h --- old/libkscreen-5.11.5/src/doctor/doctor.h 2018-01-02 13:37:52.914809818 +0100 +++ new/libkscreen-5.11.95/src/doctor/doctor.h 2018-01-15 14:34:08.000000000 +0100 @@ -34,7 +34,7 @@ Q_OBJECT public: - explicit Doctor(QObject *parent = 0); + explicit Doctor(QObject *parent = nullptr); virtual ~Doctor(); void setOptionList(const QStringList &positionalArgs); @@ -52,6 +52,7 @@ bool setEnabled(int id, bool enabled); bool setPosition(int id, const QPoint &pos); bool setMode(int id, const QString &mode_id); + bool setScale(int id, qreal scale); Q_SIGNALS: void outputsChanged(); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libkscreen-5.11.5/src/doctor/dpmsclient.h new/libkscreen-5.11.95/src/doctor/dpmsclient.h --- old/libkscreen-5.11.5/src/doctor/dpmsclient.h 2018-01-02 13:37:52.914809818 +0100 +++ new/libkscreen-5.11.95/src/doctor/dpmsclient.h 2018-01-15 14:34:08.000000000 +0100 @@ -44,7 +44,7 @@ Q_OBJECT public: - explicit DpmsClient(QObject *parent = 0); + explicit DpmsClient(QObject *parent = nullptr); virtual ~DpmsClient(); void connect(); @@ -62,8 +62,8 @@ private: void changeMode(KWayland::Client::Dpms::Mode mode); QThread *m_thread; - KWayland::Client::ConnectionThread *m_connection; - KWayland::Client::DpmsManager *m_dpmsManager; + KWayland::Client::ConnectionThread *m_connection = nullptr; + KWayland::Client::DpmsManager *m_dpmsManager = nullptr; KWayland::Client::Registry m_registry; bool m_setOff = true; bool m_setOn = false; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libkscreen-5.11.5/src/doctor/main.cpp new/libkscreen-5.11.95/src/doctor/main.cpp --- old/libkscreen-5.11.5/src/doctor/main.cpp 2018-01-02 13:37:52.914809818 +0100 +++ new/libkscreen-5.11.95/src/doctor/main.cpp 2018-01-15 14:34:08.000000000 +0100 @@ -55,7 +55,9 @@ "\n Disable the hdmi output, enable the laptop panel and set it to a specific mode\n" " $ kscreen-doctor output.HDMI-2.disable output.eDP-1.mode.1 output.eDP-1.enable\n" "\n Position the hdmi monitor on the right of the laptop panel\n" - " $ kscreen-doctor output.HDMI-2.position.0,1280 output.eDP-1.position.0,0\n"; + " $ kscreen-doctor output.HDMI-2.position.0,1280 output.eDP-1.position.0,0\n" + "\n Set resolution mode\n" + " $ kscreen-doctor output.HDMI-2.mode.1920x1080@60 \n"; /* "\nError codes:\n" " 2 : general parse error\n" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libkscreen-5.11.5/src/edid.h new/libkscreen-5.11.95/src/edid.h --- old/libkscreen-5.11.5/src/edid.h 2018-01-02 13:37:52.914809818 +0100 +++ new/libkscreen-5.11.95/src/edid.h 2018-01-15 14:34:08.000000000 +0100 @@ -50,7 +50,7 @@ public: explicit Edid(); - explicit Edid(const QByteArray &data, QObject *parent = 0); + explicit Edid(const QByteArray &data, QObject *parent = nullptr); virtual ~Edid(); Edid* clone() const; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libkscreen-5.11.5/src/getconfigoperation.h new/libkscreen-5.11.95/src/getconfigoperation.h --- old/libkscreen-5.11.5/src/getconfigoperation.h 2018-01-02 13:37:52.914809818 +0100 +++ new/libkscreen-5.11.95/src/getconfigoperation.h 2018-01-15 14:34:08.000000000 +0100 @@ -37,7 +37,7 @@ public: - explicit GetConfigOperation(Options options = NoOptions, QObject* parent = 0); + explicit GetConfigOperation(Options options = NoOptions, QObject* parent = nullptr); virtual ~GetConfigOperation(); virtual KScreen::ConfigPtr config() const Q_DECL_OVERRIDE; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libkscreen-5.11.5/src/mode.cpp new/libkscreen-5.11.95/src/mode.cpp --- old/libkscreen-5.11.5/src/mode.cpp 2018-01-02 13:37:52.914809818 +0100 +++ new/libkscreen-5.11.95/src/mode.cpp 2018-01-15 14:34:08.000000000 +0100 @@ -42,7 +42,7 @@ }; Mode::Mode() - : QObject(0) + : QObject(nullptr) , d(new Private()) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libkscreen-5.11.5/src/output.cpp new/libkscreen-5.11.95/src/output.cpp --- old/libkscreen-5.11.5/src/output.cpp 2018-01-02 13:37:52.914809818 +0100 +++ new/libkscreen-5.11.95/src/output.cpp 2018-01-15 14:34:08.000000000 +0100 @@ -527,6 +527,10 @@ changes << &Output::rotationChanged; setRotation(other->d->rotation); } + if (d->scale != other->d->scale) { + changes << &Output::scaleChanged; + setScale(other->d->scale); + } if (d->currentMode != other->d->currentMode) { changes << &Output::currentModeIdChanged; setCurrentModeId(other->d->currentMode); @@ -580,8 +584,9 @@ << output->name() << (output->isConnected() ? "connected" : "disconnected") << (output->isEnabled() ? "enabled" : "disabled") - << output->pos() << output->size() - << output->currentModeId() + << "pos:" << output->pos() << "res:" << output->size() + << "modeId:" << output->currentModeId() + << "scale:" << output->scale() << ")"; } else { dbg << "KScreen::Output(NULL)"; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libkscreen-5.11.5/src/setconfigoperation.h new/libkscreen-5.11.95/src/setconfigoperation.h --- old/libkscreen-5.11.5/src/setconfigoperation.h 2018-01-02 13:37:52.914809818 +0100 +++ new/libkscreen-5.11.95/src/setconfigoperation.h 2018-01-15 14:34:08.000000000 +0100 @@ -32,7 +32,7 @@ { Q_OBJECT public: - explicit SetConfigOperation(const KScreen::ConfigPtr &config, QObject* parent = 0); + explicit SetConfigOperation(const KScreen::ConfigPtr &config, QObject* parent = nullptr); ~SetConfigOperation(); KScreen::ConfigPtr config() const Q_DECL_OVERRIDE; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libkscreen-5.11.5/tests/kwayland/waylandtestserver.cpp new/libkscreen-5.11.95/tests/kwayland/waylandtestserver.cpp --- old/libkscreen-5.11.5/tests/kwayland/waylandtestserver.cpp 2018-01-02 13:37:52.918809845 +0100 +++ new/libkscreen-5.11.95/tests/kwayland/waylandtestserver.cpp 2018-01-15 14:34:08.000000000 +0100 @@ -130,7 +130,7 @@ outputdevice->setGlobalPosition(c->position()); } if (c->scaleChanged()) { - qCDebug(KSCREEN_WAYLAND_TESTSERVER) << "Setting enabled:"; + qCDebug(KSCREEN_WAYLAND_TESTSERVER) << "Setting scale:" << c->scale(); outputdevice->setScale(c->scale()); } }
