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 "bugsearch.h"
0008 
0009 namespace Bugzilla
0010 {
0011 Query BugSearch::toQuery() const
0012 {
0013     Query query;
0014     QSet<QString> seen;
0015 
0016     for (const QString &product : products) {
0017         query.addQueryItem(QStringLiteral("product"), product);
0018     }
0019     seen << QStringLiteral("products");
0020 
0021     if (!order.isEmpty()) {
0022         query.addQueryItem(QStringLiteral("order"), order.join(QLatin1Char(',')));
0023     }
0024     seen << QStringLiteral("order");
0025 
0026     expandQuery(query, seen);
0027 
0028     return query;
0029 }
0030 
0031 } // namespace Bugzilla
0032 
0033 #include "moc_bugsearch.cpp"