forked from qt-creator/qt-creator
		
	Locator: De-duplicate RegExp pattern generation
Change-Id: I3576e1507aebed15245e1f197995bfe9e345e32b Reviewed-by: Orgad Shaneh <orgads@gmail.com> Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
		
				
					committed by
					
						 André Hartmann
						André Hartmann
					
				
			
			
				
	
			
			
			
						parent
						
							e0639d0696
						
					
				
				
					commit
					8730dbd4e6
				
			| @@ -67,9 +67,7 @@ QList<Core::LocatorFilterEntry> CppCurrentDocumentFilter::matchesFor( | ||||
|     QList<Core::LocatorFilterEntry> goodEntries; | ||||
|     QList<Core::LocatorFilterEntry> betterEntries; | ||||
|  | ||||
|     const QRegularExpression regexp = containsWildcard(entry) | ||||
|             ? createWildcardRegExp(entry) : CamelHumpMatcher::createCamelHumpRegExp(entry); | ||||
|  | ||||
|     const QRegularExpression regexp = createRegExp(entry); | ||||
|     if (!regexp.isValid()) | ||||
|         return goodEntries; | ||||
|  | ||||
|   | ||||
| @@ -76,9 +76,8 @@ QList<Core::LocatorFilterEntry> CppLocatorFilter::matchesFor( | ||||
|     const Qt::CaseSensitivity caseSensitivityForPrefix = caseSensitivity(entry); | ||||
|     bool hasColonColon = entry.contains(QLatin1String("::")); | ||||
|     const IndexItem::ItemType wanted = matchTypes(); | ||||
|     const QRegularExpression regexp = containsWildcard(entry) | ||||
|             ? createWildcardRegExp(entry) : CamelHumpMatcher::createCamelHumpRegExp(entry); | ||||
|  | ||||
|     const QRegularExpression regexp = createRegExp(entry); | ||||
|     if (!regexp.isValid()) | ||||
|         return goodEntries; | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user