File indexing completed on 2024-05-19 04:49:28

0001 /****************************************************************************************
0002  * Copyright (c) 2007 Maximilian Kossick <maximilian.kossick@googlemail.com>            *
0003  *                                                                                      *
0004  * This program is free software; you can redistribute it and/or modify it under        *
0005  * the terms of the GNU General Public License as published by the Free Software        *
0006  * Foundation; either version 2 of the License, or (at your option) any later           *
0007  * version.                                                                             *
0008  *                                                                                      *
0009  * This program is distributed in the hope that it will be useful, but WITHOUT ANY      *
0010  * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A      *
0011  * PARTICULAR PURPOSE. See the GNU General Public License for more details.             *
0012  *                                                                                      *
0013  * You should have received a copy of the GNU General Public License along with         *
0014  * this program.  If not, see <http://www.gnu.org/licenses/>.                           *
0015  ****************************************************************************************/
0016 
0017 #include "core/collections/QueryMaker.h"
0018 
0019 
0020 using namespace Collections;
0021 
0022 #include "core/meta/Meta.h"
0023 #include "core/support/Debug.h"
0024 
0025 QueryMaker::QueryMaker() : QObject()
0026 {
0027 }
0028 
0029 QueryMaker::~QueryMaker()
0030 {
0031 }
0032 
0033 QueryMaker*
0034 QueryMaker::setAlbumQueryMode( AlbumQueryMode mode )
0035 {
0036     Q_UNUSED( mode )
0037     return this;
0038 }
0039 
0040 QueryMaker*
0041 QueryMaker::setLabelQueryMode( LabelQueryMode mode )
0042 {
0043     Q_UNUSED( mode )
0044     return this;
0045 }
0046 
0047 int QueryMaker::validFilterMask()
0048 {
0049     return AllFilters;
0050 }
0051 
0052 QueryMaker*
0053 QueryMaker::setAutoDelete( bool autoDelete )
0054 {
0055     if( autoDelete )
0056         connect( this, &QueryMaker::queryDone, this, &QueryMaker::deleteLater );
0057     else
0058         disconnect( this, &QueryMaker::queryDone, this, &QueryMaker::deleteLater );
0059     return this;
0060 }
0061 
0062 QueryMaker*
0063 QueryMaker::addMatch( const Meta::LabelPtr &label )
0064 {
0065     debug() << metaObject()->className() << " does not support label queries, ignoring label " << label->name();
0066     return this;
0067 }
0068 
0069