aboutsummaryrefslogtreecommitdiff
path: root/lib/user.cpp
diff options
context:
space:
mode:
authorKitsune Ral <Kitsune-Ral@users.sf.net>2021-01-15 08:19:22 +0100
committerGitHub <noreply@github.com>2021-01-15 08:19:22 +0100
commit544ec34b4563aacac6fd5b2f4aa64813096cd4b8 (patch)
tree878a6db1895d75c89292b8278731d63fadf248e1 /lib/user.cpp
parent17d6e00597fdc1c8f25808735cbc728c4a6b3506 (diff)
parentb0d3ecc774ca4aec24bceb5ec1f1ded844a7213a (diff)
downloadlibquotient-544ec34b4563aacac6fd5b2f4aa64813096cd4b8.tar.gz
libquotient-544ec34b4563aacac6fd5b2f4aa64813096cd4b8.zip
Merge branch 'master' into dfaure/stricter-flags
Diffstat (limited to 'lib/user.cpp')
-rw-r--r--lib/user.cpp20
1 files changed, 4 insertions, 16 deletions
diff --git a/lib/user.cpp b/lib/user.cpp
index 45a9c121..9c2b76b5 100644
--- a/lib/user.cpp
+++ b/lib/user.cpp
@@ -1,19 +1,7 @@
/******************************************************************************
- * Copyright (C) 2015 Felix Rohrbach <kde@fxrh.de>
+ * SPDX-FileCopyrightText: 2015 Felix Rohrbach <kde@fxrh.de>
*
- * 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 Street, Fifth Floor, Boston, MA 02110-1301 USA
+ * SPDX-License-Identifier: LGPL-2.1-or-later
*/
#include "user.h"
@@ -78,7 +66,7 @@ QString User::id() const { return d->id; }
bool User::isGuest() const
{
Q_ASSERT(!d->id.isEmpty() && d->id.startsWith('@'));
- auto it = std::find_if_not(d->id.begin() + 1, d->id.end(),
+ auto it = std::find_if_not(d->id.cbegin() + 1, d->id.cend(),
[](QChar c) { return c.isDigit(); });
Q_ASSERT(it != d->id.end());
return *it == ':';
@@ -138,7 +126,7 @@ inline bool User::doSetAvatar(SourceT&& source)
connect(j, &BaseJob::success, this,
[this, newUrl = QUrl(contentUri)] {
if (newUrl == d->defaultAvatar.url()) {
- d->defaultAvatar.updateUrl(move(newUrl));
+ d->defaultAvatar.updateUrl(newUrl);
emit defaultAvatarChanged();
} else
qCWarning(MAIN) << "User" << id()