forked from qt-creator/qt-creator
		
	Wrap completion box list when navigating with up/down arrow keys.
Reviewed-by: Thorbjorn Lindeijer
This commit is contained in:
		@@ -156,7 +156,17 @@ bool CompletionWidget::event(QEvent *e)
 | 
			
		||||
            closeList(currentIndex());
 | 
			
		||||
            return true;
 | 
			
		||||
        case Qt::Key_Up:
 | 
			
		||||
            if (currentIndex().row() == 0) {
 | 
			
		||||
                setCurrentIndex(model()->index(model()->rowCount()-1, 0));
 | 
			
		||||
                return true;
 | 
			
		||||
            }
 | 
			
		||||
            forwardKeys = false;
 | 
			
		||||
            break;
 | 
			
		||||
        case Qt::Key_Down:
 | 
			
		||||
            if (currentIndex().row() == model()->rowCount()-1) {
 | 
			
		||||
                setCurrentIndex(model()->index(0, 0));
 | 
			
		||||
                return true;
 | 
			
		||||
            }
 | 
			
		||||
        case Qt::Key_Enter:
 | 
			
		||||
        case Qt::Key_PageDown:
 | 
			
		||||
        case Qt::Key_PageUp:
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user