Hello community,

here is the log from the commit of package kcm_sddm for openSUSE:Factory 
checked in at 2016-10-04 15:48:01
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/kcm_sddm (Old)
 and      /work/SRC/openSUSE:Factory/.kcm_sddm.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "kcm_sddm"

Changes:
--------
--- /work/SRC/openSUSE:Factory/kcm_sddm/kcm_sddm.changes        2016-08-29 
15:25:13.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.kcm_sddm.new/kcm_sddm.changes   2016-10-04 
15:47:39.000000000 +0200
@@ -1,0 +2,24 @@
+Thu Sep 29 16:36:28 UTC 2016 - [email protected]
+
+- Update to 5.8.0
+  * New LTS feature release
+  * For more details please see:
+    https://www.kde.org/announcements/plasma-5.8.0.php
+
+-------------------------------------------------------------------
+Thu Sep 15 15:53:55 UTC 2016 - [email protected]
+
+- Update to 5.7.95 (Plasma 5.8 Beta)
+  * New LTS feature release
+  * For more details please see:
+    https://www.kde.org/announcements/plasma-5.7.95.php
+
+-------------------------------------------------------------------
+Tue Sep 13 17:42:09 UTC 2016 - [email protected]
+
+- Update to 5.7.5
+  * New bugfix release
+  * For more details please see:
+    https://www.kde.org/announcements/plasma-5.7.5.php
+
+-------------------------------------------------------------------

Old:
----
  sddm-kcm-5.7.4.tar.xz

New:
----
  sddm-kcm-5.8.0.tar.xz

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

Other differences:
------------------
++++++ kcm_sddm.spec ++++++
--- /var/tmp/diff_new_pack.J9VSLB/_old  2016-10-04 15:47:41.000000000 +0200
+++ /var/tmp/diff_new_pack.J9VSLB/_new  2016-10-04 15:47:41.000000000 +0200
@@ -21,7 +21,7 @@
 Summary:        A sddm control module for KDE
 License:        GPL-2.0
 Group:          System/GUI/KDE
-Version:        5.7.4
+Version:        5.8.0
 Release:        0
 Url:            https://projects.kde.org/projects/kdereview/sddm-kcm/repository
 Source:         sddm-kcm-%{version}.tar.xz

++++++ sddm-kcm-5.7.4.tar.xz -> sddm-kcm-5.8.0.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/sddm-kcm-5.7.4/CMakeLists.txt 
new/sddm-kcm-5.8.0/CMakeLists.txt
--- old/sddm-kcm-5.7.4/CMakeLists.txt   2016-08-23 15:01:35.000000000 +0200
+++ new/sddm-kcm-5.8.0/CMakeLists.txt   2016-09-29 13:37:57.000000000 +0200
@@ -1,13 +1,13 @@
 project(sddm-kcm)
 cmake_minimum_required(VERSION 2.8.12 FATAL_ERROR)
-set(PROJECT_VERSION "5.7.4")
+set(PROJECT_VERSION "5.8.0")
 set(QT_MIN_VERSION "5.4.0")
 find_package(ECM 1.0.0 REQUIRED NO_MODULE)
 set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH} ${ECM_KDE_MODULE_DIR} 
${CMAKE_CURRENT_SOURCE_DIR}/cmake)
 include(ECMInstallIcons)
 include(KDEInstallDirs)
 include(KDECMakeSettings)
-include(KDECompilerSettings)
+include(KDECompilerSettings NO_POLICY_SCOPE)
 include(FeatureSummary)
 
 find_package(Qt5 ${QT_MIN_VERSION} CONFIG REQUIRED COMPONENTS Core Gui Widgets 
Designer X11Extras Quick QuickWidgets)
@@ -38,6 +38,7 @@
 
 
 add_definitions(-DTRANSLATION_DOMAIN=\"kcm_sddm\")
+add_definitions(-DQT_NO_URL_CAST_FROM_STRING)
 
 install(FILES kcm_sddm.desktop DESTINATION ${CMAKE_INSTALL_KSERVICES5DIR})
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/sddm-kcm-5.7.4/po/he/kcm_sddm.po 
new/sddm-kcm-5.8.0/po/he/kcm_sddm.po
--- old/sddm-kcm-5.7.4/po/he/kcm_sddm.po        2016-08-23 15:01:30.000000000 
+0200
+++ new/sddm-kcm-5.8.0/po/he/kcm_sddm.po        2016-09-29 13:37:53.000000000 
+0200
@@ -7,7 +7,7 @@
 "Project-Id-Version: \n"
 "Report-Msgid-Bugs-To: http://bugs.kde.org\n";
 "POT-Creation-Date: 2016-01-14 08:07+0000\n"
-"PO-Revision-Date: 2016-06-27 22:04+0200\n"
+"PO-Revision-Date: 2016-09-18 20:48+0200\n"
 "Last-Translator: Elkana Bardugo <[email protected]>\n"
 "Language-Team: Hebrew <[email protected]>\n"
 "Language: he_IL\n"
@@ -71,7 +71,7 @@
 
 #: src/sddmkcm.cpp:53 src/sddmkcm.cpp:54
 msgid "Author"
-msgstr ""
+msgstr "מחבר"
 
 #: src/sddmkcm.cpp:108
 msgid "Theme"
@@ -123,12 +123,12 @@
 #. i18n: ectx: property (text), widget (QLabel, label_6)
 #: src/ui/advanceconfig.ui:99
 msgid "Minimum UID:"
-msgstr ""
+msgstr "‏UID מינימלי:"
 
 #. i18n: ectx: property (text), widget (QLabel, label_5)
 #: src/ui/advanceconfig.ui:119
 msgid "Maximum UID:"
-msgstr ""
+msgstr "‏UID מקסימלי:"
 
 #. i18n: ectx: property (title), widget (QGroupBox, groupBox)
 #: src/ui/advanceconfig.ui:148
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/sddm-kcm-5.7.4/sddmauthhelper.cpp 
new/sddm-kcm-5.8.0/sddmauthhelper.cpp
--- old/sddm-kcm-5.7.4/sddmauthhelper.cpp       2016-08-23 15:01:27.000000000 
+0200
+++ new/sddm-kcm-5.8.0/sddmauthhelper.cpp       2016-09-29 13:37:50.000000000 
+0200
@@ -18,7 +18,10 @@
 #include "sddmauthhelper.h"
 
 #include <QFile>
+#include <QFileInfo>
+#include <QDir>
 #include <QSharedPointer>
+#include <QDebug>
 
 #include <KConfig>
 #include <KConfigGroup>
@@ -55,7 +58,10 @@
             continue;
 
         QStringList configFields = iterator.key().split('/');
-        
+        if (configFields.size() != 3) {
+            continue;
+        }
+
         QSharedPointer<KConfig> config;
         QString fileName = configFields[0];
         QString groupName = configFields[1];
@@ -64,7 +70,36 @@
         if (fileName == "sddm.conf") {
             sddmConfig->group(groupName).writeEntry(keyName, iterator.value());
         } else if (fileName == "theme.conf.user" && !themeConfig.isNull()) {
-            themeConfig->group(groupName).writeEntry(keyName, 
iterator.value());
+            QFileInfo themeConfigFileInfo(themeConfigFile);
+            QDir configRootDirectory = themeConfigFileInfo.absoluteDir();
+
+            if (keyName == "background") {
+                QFileInfo newBackgroundFileInfo(iterator.value().toString());
+                QString previousBackground = 
themeConfig->group(groupName).readEntry(keyName);
+
+                bool backgroundChanged = newBackgroundFileInfo.fileName() != 
previousBackground;
+                if (backgroundChanged) {
+                    if (!previousBackground.isEmpty()) {
+                        QString previousBackgroundPath = 
configRootDirectory.filePath(previousBackground);
+                        if (QFile::remove(previousBackgroundPath)) {
+                            qDebug() << "Removed previous background " << 
previousBackgroundPath;
+                        }
+                    }
+
+                    if (newBackgroundFileInfo.exists()) {
+                        QString newBackgroundPath = 
configRootDirectory.filePath(newBackgroundFileInfo.fileName());
+                        qDebug() << "Copying background from "  << 
newBackgroundFileInfo.absoluteFilePath() << " to " << newBackgroundPath;
+                        if 
(QFile::copy(newBackgroundFileInfo.absoluteFilePath(), newBackgroundPath)) {
+                            QFile::setPermissions(newBackgroundPath, 
QFile::ReadOwner | QFile::WriteOwner | QFile::ReadGroup | QFile::ReadOther);
+                            themeConfig->group(groupName).writeEntry(keyName, 
newBackgroundFileInfo.fileName());
+                        }
+                    } else {
+                        themeConfig->group(groupName).deleteEntry(keyName);
+                    }
+                }
+            } else {
+                themeConfig->group(groupName).writeEntry(keyName, 
iterator.value());
+            }
         }
     }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/sddm-kcm-5.7.4/src/advanceconfig.cpp 
new/sddm-kcm-5.8.0/src/advanceconfig.cpp
--- old/sddm-kcm-5.7.4/src/advanceconfig.cpp    2016-08-23 15:01:27.000000000 
+0200
+++ new/sddm-kcm-5.8.0/src/advanceconfig.cpp    2016-09-29 13:37:50.000000000 
+0200
@@ -105,8 +105,8 @@
     
 
     //Commands
-    
configUi->haltCommand->setUrl(mConfig->group("General").readEntry("HaltCommand"));
-    
configUi->rebootCommand->setUrl(mConfig->group("General").readEntry("RebootCommand"));
+    
configUi->haltCommand->setUrl(QUrl::fromLocalFile(mConfig->group("General").readEntry("HaltCommand")));
+    
configUi->rebootCommand->setUrl(QUrl::fromLocalFile(mConfig->group("General").readEntry("RebootCommand")));
 }
 
 QVariantMap AdvanceConfig::save()
@@ -135,8 +135,8 @@
         args["sddm.conf/Users/MaximumUid"] = configUi->maximumUid->text();
     }
 
-    args["sddm.conf/General/HaltCommand"] = 
configUi->haltCommand->url().path();
-    args["sddm.conf/General/RebootCommand"] = 
configUi->rebootCommand->url().path();
+    args["sddm.conf/General/HaltCommand"] = 
configUi->haltCommand->url().toLocalFile();
+    args["sddm.conf/General/RebootCommand"] = 
configUi->rebootCommand->url().toLocalFile();
 
     return args;
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/sddm-kcm-5.7.4/src/themeconfig.cpp 
new/sddm-kcm-5.8.0/src/themeconfig.cpp
--- old/sddm-kcm-5.7.4/src/themeconfig.cpp      2016-08-23 15:01:27.000000000 
+0200
+++ new/sddm-kcm-5.8.0/src/themeconfig.cpp      2016-09-29 13:37:50.000000000 
+0200
@@ -86,11 +86,11 @@
 void ThemeConfig::prepareInitialTheme()
 {
     const QString initialTheme = mConfig->group("Theme").readEntry("Current");
-    
-    const QModelIndex index = findThemeIndex(initialTheme);
-    if (!index.isValid()) {
-        //KMessageBox::error(this, i18n("Could not find any themes. \nPlease 
install SDDM themes."), i18n("No SDDM themes"));
-        return;
+
+    QModelIndex index = findThemeIndex(initialTheme);
+    if (!index.isValid() && configUi->themesListView->model()->rowCount() > 0) 
{
+        //if we can't find the currently configured theme from the config, 
just select the first theme in the UI
+        index = configUi->themesListView->model()->index(0,0);
     }
     configUi->themesListView->setCurrentIndex(index);
     themeSelected(index);
@@ -114,11 +114,11 @@
 {
     if (!configUi->quickWidget->source().isValid()) {
         const QString mainQmlPath = 
QStandardPaths::locate(QStandardPaths::GenericDataLocation, 
"sddm-kcm/main.qml");
-        configUi->quickWidget->setSource(mainQmlPath);
+        configUi->quickWidget->setSource(QUrl::fromLocalFile(mainQmlPath));
     }
 
-    QString themePath = index.model()->data(index, 
ThemesModel::PathRole).toString();
-    QString previewFilename = themePath + index.model()->data(index, 
ThemesModel::PreviewRole).toString();
+    QString themePath = index.data(ThemesModel::PathRole).toString();
+    QString previewFilename = themePath + 
index.data(ThemesModel::PreviewRole).toString();
 
     configUi->quickWidget->rootObject()->setProperty("themeName", 
index.data().toString());
     configUi->quickWidget->rootObject()->setProperty("previewPath", 
previewFilename);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/sddm-kcm-5.7.4/src/themesmodel.cpp 
new/sddm-kcm-5.8.0/src/themesmodel.cpp
--- old/sddm-kcm-5.7.4/src/themesmodel.cpp      2016-08-23 15:01:27.000000000 
+0200
+++ new/sddm-kcm-5.8.0/src/themesmodel.cpp      2016-09-29 13:37:50.000000000 
+0200
@@ -84,10 +84,10 @@
 
 void ThemesModel::populate()
 {
-    QString themesBaseDir = KSharedConfig::openConfig(SDDM_CONFIG_FILE, 
KConfig::SimpleConfig)->group("General").readEntry("ThemesDir");
+    QString themesBaseDir = KSharedConfig::openConfig(SDDM_CONFIG_FILE, 
KConfig::SimpleConfig)->group("Theme").readEntry("ThemeDir");
 
     if (themesBaseDir.isEmpty()) {
-        themesBaseDir = 
QStandardPaths::locate(QStandardPaths::GenericDataLocation, "sddm", 
QStandardPaths::LocateDirectory) + "/themes";
+        themesBaseDir = 
QStandardPaths::locate(QStandardPaths::GenericDataLocation, "sddm/themes", 
QStandardPaths::LocateDirectory);
     }
 
     QDir dir(themesBaseDir);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/sddm-kcm-5.7.4/src/usersmodel.cpp 
new/sddm-kcm-5.8.0/src/usersmodel.cpp
--- old/sddm-kcm-5.7.4/src/usersmodel.cpp       2016-08-23 15:01:27.000000000 
+0200
+++ new/sddm-kcm-5.8.0/src/usersmodel.cpp       2016-09-29 13:37:50.000000000 
+0200
@@ -38,7 +38,11 @@
 
 QVariant UsersModel::data(const QModelIndex &index, int role) const
 {
-    const KUser user = mUserList[index.row()];
+    auto row = index.row();
+    if (row < 0 || row >= mUserList.count()) {
+        return QVariant();
+    }
+    const KUser &user = mUserList[row];
 
     switch(role) {
         case Qt::DisplayRole:
@@ -59,13 +63,13 @@
 
 void UsersModel::populate(const uint minimumUid, const uint maximumUid) {
     mUserList.clear();
-    
+
     QList< KUser > userList = KUser::allUsers();
 
     KUser user;
-    
+
     foreach( user, userList ) {
-        K_UID uuid = user.uid();
+        K_UID uuid = user.userId().nativeId();
 
         // invalid user
         if (uuid == (uid_t) -1) {


Reply via email to