Initial work to make enums saner
This commit is contained in:
		
					parent
					
						
							
								bcecd30031
							
						
					
				
			
			
				commit
				
					
						6533b64a22
					
				
			
		
					 1 changed files with 9 additions and 11 deletions
				
			
		| 
						 | 
					@ -25,6 +25,7 @@
 | 
				
			||||||
#include <QDebug>
 | 
					#include <QDebug>
 | 
				
			||||||
#include <qjson/parser.h>
 | 
					#include <qjson/parser.h>
 | 
				
			||||||
#include <kdebug.h>
 | 
					#include <kdebug.h>
 | 
				
			||||||
 | 
					#include <QStack>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// KDE
 | 
					// KDE
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -254,19 +255,19 @@ const QStringList DanbooruService::allowedRatings() const
 | 
				
			||||||
 | 
					
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
void DanbooruService::setMaximumAllowedRating(const Danbooru::Ratings& rating)
 | 
					void DanbooruService::setMaximumAllowedRating(const DanbooruPost::Rating& rating)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    Ratings flags;
 | 
					    DanbooruPost::Rating flags;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    switch (rating) {
 | 
					    switch (rating) {
 | 
				
			||||||
    case Safe:
 | 
					    case DanbooruPost::Safe:
 | 
				
			||||||
        flags = Safe;
 | 
					        flags = DanbooruPost::Safe;
 | 
				
			||||||
        break;
 | 
					        break;
 | 
				
			||||||
    case Questionable:
 | 
					    case DanbooruPost::Questionable:
 | 
				
			||||||
        flags = Safe | Questionable;
 | 
					        flags = DanbooruPost::Safe | DanbooruPost::Questionable;
 | 
				
			||||||
        break;
 | 
					        break;
 | 
				
			||||||
    case Explicit:
 | 
					    case DanbooruPost::Explicit:
 | 
				
			||||||
        flags = Safe | Questionable | Explicit;
 | 
					        flags = DanbooruPost::Safe | DanbooruPost::Questionable | DanbooruPost::Explicit;
 | 
				
			||||||
        break;
 | 
					        break;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -302,10 +303,7 @@ void DanbooruService::processPostList(KJob* job)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    QByteArray data = jobResult->data();
 | 
					    QByteArray data = jobResult->data();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    kDebug() << jobResult->mimetype();
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    bool ok;
 | 
					    bool ok;
 | 
				
			||||||
 | 
					 | 
				
			||||||
    bool needsXML = job->property("needsXML").toBool();
 | 
					    bool needsXML = job->property("needsXML").toBool();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    QList<QVariant> postList;
 | 
					    QList<QVariant> postList;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue