Add the missing method setBlacklist(const QStringList&)
On top of that, make nextPostPage() Q_INVOKABLE so it can be used from QML.
This commit is contained in:
		
					parent
					
						
							
								555ed62e1c
							
						
					
				
			
			
				commit
				
					
						0200965e99
					
				
			
		
					 2 changed files with 27 additions and 9 deletions
				
			
		| 
						 | 
				
			
			@ -523,6 +523,21 @@ void DanbooruService::setBlacklist(const QSet< QString > &blacklist)
 | 
			
		|||
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void DanbooruService::setBlacklist(const QStringList &blacklist)
 | 
			
		||||
{
 | 
			
		||||
 | 
			
		||||
    if (blacklist.isEmpty()) {
 | 
			
		||||
        return;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    m_blacklist.clear();
 | 
			
		||||
 | 
			
		||||
    for (auto element : blacklist) {
 | 
			
		||||
        m_blacklist.insert(element);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void DanbooruService::setBoardUrl(const QUrl& url)
 | 
			
		||||
{
 | 
			
		||||
    m_url = url;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -198,7 +198,7 @@ public:
 | 
			
		|||
     **/
 | 
			
		||||
    int maxPosts() const;
 | 
			
		||||
 | 
			
		||||
    void nextPostPage();
 | 
			
		||||
    Q_INVOKABLE void nextPostPage();
 | 
			
		||||
 | 
			
		||||
    QStringList postTags() const;
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -210,7 +210,16 @@ public:
 | 
			
		|||
     * @param blacklist A QSet<QString> including unwanted tags.
 | 
			
		||||
     * @return void
 | 
			
		||||
     */
 | 
			
		||||
    void setBlacklist(const QSet<QString> &blacklist);
 | 
			
		||||
    void setBlacklist(const QStringList& blacklist);
 | 
			
		||||
 | 
			
		||||
     /**
 | 
			
		||||
     * @brief Set the tag blacklist.
 | 
			
		||||
     *
 | 
			
		||||
     * If a tag is in the blacklist, posts tagged with it will not be downloaded.
 | 
			
		||||
     *
 | 
			
		||||
     **/
 | 
			
		||||
 | 
			
		||||
    void setBlacklist(const QSet<QString>& blacklist);
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * @brief Set the maximum allowed rating for the board.
 | 
			
		||||
| 
						 | 
				
			
			@ -221,13 +230,7 @@ public:
 | 
			
		|||
     **/
 | 
			
		||||
    void setMaximumAllowedRating(DanbooruPost::Rating rating);
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * @brief Set the tag blacklist.
 | 
			
		||||
     *
 | 
			
		||||
     * If a tag is in the blacklist, posts tagged with it will not be downloaded.
 | 
			
		||||
     *
 | 
			
		||||
     **/
 | 
			
		||||
    void setBlackList(QStringList blacklist);
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue