From dd904fe3c24d1e7a753d2932f6debe9ef16a97e5 Mon Sep 17 00:00:00 2001 From: Jonas Kvinge Date: Thu, 18 Jul 2024 02:06:48 +0200 Subject: [PATCH] Remove unused CollectionQueryOptions class --- src/CMakeLists.txt | 1 - src/collection/collectionqueryoptions.cpp | 33 ------------ src/collection/collectionqueryoptions.h | 63 ----------------------- 3 files changed, 97 deletions(-) delete mode 100644 src/collection/collectionqueryoptions.cpp delete mode 100644 src/collection/collectionqueryoptions.h diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 65e82a1f..e40c2602 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -96,7 +96,6 @@ set(SOURCES collection/collectionfilter.cpp collection/collectionplaylistitem.cpp collection/collectionquery.cpp - collection/collectionqueryoptions.cpp collection/savedgroupingmanager.cpp collection/groupbydialog.cpp collection/collectiontask.cpp diff --git a/src/collection/collectionqueryoptions.cpp b/src/collection/collectionqueryoptions.cpp deleted file mode 100644 index c3ad1bc6..00000000 --- a/src/collection/collectionqueryoptions.cpp +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Strawberry Music Player - * Copyright 2023, Jonas Kvinge - * - * Strawberry is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * Strawberry 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Strawberry. If not, see . - * - */ - -#include -#include - -#include "collectionqueryoptions.h" - -CollectionQueryOptions::CollectionQueryOptions() - : compilation_requirement_(CollectionQueryOptions::CompilationRequirement::None), - query_have_compilations_(false) {} - -void CollectionQueryOptions::AddWhere(const QString &column, const QVariant &value, const QString &op) { - - where_clauses_ << Where(column, value, op); - -} diff --git a/src/collection/collectionqueryoptions.h b/src/collection/collectionqueryoptions.h deleted file mode 100644 index 33764b9e..00000000 --- a/src/collection/collectionqueryoptions.h +++ /dev/null @@ -1,63 +0,0 @@ -/* - * Strawberry Music Player - * Copyright 2023, Jonas Kvinge - * - * Strawberry is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * Strawberry 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Strawberry. If not, see . - * - */ - -#ifndef COLLECTIONQUERYOPTIONS_H -#define COLLECTIONQUERYOPTIONS_H - -#include -#include -#include - -class CollectionQueryOptions { - public: - - explicit CollectionQueryOptions(); - - struct Where { - explicit Where(const QString &_column = QString(), const QVariant &_value = QString(), const QString &_op = QString()) : column(_column), value(_value), op(_op) {} - QString column; - QVariant value; - QString op; - }; - - enum class CompilationRequirement { - None, - On, - Off - }; - - QString column_spec() const { return column_spec_; } - CompilationRequirement compilation_requirement() const { return compilation_requirement_; } - bool query_have_compilations() const { return query_have_compilations_; } - - void set_column_spec(const QString &column_spec) { column_spec_ = column_spec; } - void set_compilation_requirement(const CompilationRequirement compilation_requirement) { compilation_requirement_ = compilation_requirement; } - void set_query_have_compilations(const bool query_have_compilations) { query_have_compilations_ = query_have_compilations; } - - QList where_clauses() const { return where_clauses_; } - void AddWhere(const QString &column, const QVariant &value, const QString &op = QStringLiteral("=")); - - private: - QString column_spec_; - CompilationRequirement compilation_requirement_; - bool query_have_compilations_; - QList where_clauses_; -}; - -#endif // COLLECTIONQUERYOPTIONS_H