Warning, file /plasma-mobile/spacebar/lib/global.h was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001 // SPDX-FileCopyrightText: 2020 Jonah BrĂ¼chert <jbb@kaidan.im> 0002 // 0003 // SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL 0004 0005 #pragma once 0006 0007 #include <QByteArray> 0008 #include <QStringLiteral> 0009 0010 #define SL QStringLiteral 0011 #define BL QByteArrayLiteral 0012 0013 static inline uint hash(const QString &value) 0014 { 0015 uint h = 0; 0016 const QChar *p = value.unicode(); 0017 size_t len = value.size(); 0018 for (size_t i = 0; i < len; ++i) { 0019 h = 31 * h + p[i].unicode(); 0020 } 0021 return h; 0022 }