File indexing completed on 2025-01-19 04:58:02
0001 /* 0002 SPDX-FileCopyrightText: 2019 Harald Sitter <sitter@kde.org> 0003 0004 SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL 0005 */ 0006 0007 #include "newattachment.h" 0008 0009 #include <QVariantHash> 0010 0011 namespace Bugzilla 0012 { 0013 QVariantHash NewAttachment::toVariantHash() const 0014 { 0015 auto hash = JsonCommand::toVariantHash(); 0016 0017 QVariantList idsVariant; 0018 for (int id : ids) { 0019 idsVariant << QVariant::fromValue(id); 0020 } 0021 hash[QStringLiteral("ids")] = idsVariant; 0022 hash[QStringLiteral("data")] = data.toUtf8().toBase64(); 0023 0024 return hash; 0025 } 0026 0027 } // namespace Bugzilla 0028 0029 #include "moc_newattachment.cpp"