Allow sending tags as well as the selected URL
This required two changes: 1. in the QML view, the signal has been changed to url, var 2. the model directly outputs a QStringList for ease of use
This commit is contained in:
		
					parent
					
						
							
								61466d9ce8
							
						
					
				
			
			
				commit
				
					
						4955cc93bd
					
				
			
		
					 2 changed files with 4 additions and 5 deletions
				
			
		| 
						 | 
				
			
			@ -108,9 +108,8 @@ QVariant DanbooruPostModel::data(const QModelIndex &index, int role) const
 | 
			
		|||
            return post->rating();
 | 
			
		||||
        case TagRole:
 | 
			
		||||
        {
 | 
			
		||||
            QVariant variant;
 | 
			
		||||
            variant.setValue(post->tags());
 | 
			
		||||
            return variant;
 | 
			
		||||
            QStringList tagList = post->tags().toList();
 | 
			
		||||
            return tagList;
 | 
			
		||||
        }
 | 
			
		||||
        default:
 | 
			
		||||
            return QVariant();
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -36,7 +36,7 @@ Rectangle {
 | 
			
		|||
    property bool poolMode: false;
 | 
			
		||||
 | 
			
		||||
    signal downloadFinished()
 | 
			
		||||
    signal downloadRequested(url url)
 | 
			
		||||
    signal downloadRequested(url url, var tags)
 | 
			
		||||
    signal downloadStarted()
 | 
			
		||||
    signal fileInfo(url name, var tags)
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -167,7 +167,7 @@ Rectangle {
 | 
			
		|||
                            z: 1
 | 
			
		||||
 | 
			
		||||
                            onClicked: {
 | 
			
		||||
                                rootObj.downloadRequested(fileUrl)
 | 
			
		||||
                                rootObj.downloadRequested(fileUrl, tags)
 | 
			
		||||
                            }
 | 
			
		||||
 | 
			
		||||
                            Behavior on opacity {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue