ecb903e4.patch 1.4 KB

12345678910111213141516171819202122232425262728293031323334
  1. From ecb903e48822bd90650bdd64fe80754e3e9664cb Mon Sep 17 00:00:00 2001
  2. From: Bastian Beischer <bastian.beischer@gmail.com>
  3. Date: Fri, 2 Sep 2016 13:05:18 +0200
  4. Subject: [PATCH] Fix display of user avatars. (#684)
  5. QFile::exists("...") does not understand file:// URLs, at least in Qt
  6. 5.7.0 and Qt 4.8.7.
  7. ---
  8. src/greeter/UserModel.cpp | 8 ++++----
  9. 1 file changed, 4 insertions(+), 4 deletions(-)
  10. diff --git a/src/greeter/UserModel.cpp b/src/greeter/UserModel.cpp
  11. index 41a9f10..94c492d 100644
  12. --- a/src/greeter/UserModel.cpp
  13. +++ b/src/greeter/UserModel.cpp
  14. @@ -107,13 +107,13 @@ namespace SDDM {
  15. d->lastIndex = i;
  16. if (avatarsEnabled) {
  17. - const QString userFace = QStringLiteral("file://%1/.face.icon").arg(user->homeDir);
  18. - const QString systemFace = QStringLiteral("file://%1/%2.face.icon").arg(facesDir).arg(user->name);
  19. + const QString userFace = QStringLiteral("%1/.face.icon").arg(user->homeDir);
  20. + const QString systemFace = QStringLiteral("%1/%2.face.icon").arg(facesDir).arg(user->name);
  21. if (QFile::exists(userFace))
  22. - user->icon = userFace;
  23. + user->icon = QStringLiteral("file://%1").arg(userFace);
  24. else if (QFile::exists(systemFace))
  25. - user->icon = systemFace;
  26. + user->icon = QStringLiteral("file://%1").arg(systemFace);
  27. }
  28. }
  29. }