forked from qt-creator/qt-creator
		
	Merge remote branch 'origin/1.3'
Conflicts: doc/qtcreator.qdoc doc/qtcreator.qdocconf src/app/Info.plist src/plugins/bineditor/BinEditor.pluginspec src/plugins/bookmarks/Bookmarks.pluginspec src/plugins/cmakeprojectmanager/CMakeProjectManager.pluginspec src/plugins/coreplugin/Core.pluginspec src/plugins/coreplugin/coreconstants.h src/plugins/cpaster/CodePaster.pluginspec src/plugins/cppeditor/CppEditor.pluginspec src/plugins/cppeditor/cppeditor.cpp src/plugins/cpptools/CppTools.pluginspec src/plugins/cvs/CVS.pluginspec src/plugins/debugger/Debugger.pluginspec src/plugins/debugger/debuggeragents.cpp src/plugins/debugger/gdb/gdbengine.cpp src/plugins/designer/Designer.pluginspec src/plugins/fakevim/FakeVim.pluginspec src/plugins/find/Find.pluginspec src/plugins/genericprojectmanager/GenericProjectManager.pluginspec src/plugins/git/ScmGit.pluginspec src/plugins/helloworld/HelloWorld.pluginspec src/plugins/help/Help.pluginspec src/plugins/locator/Locator.pluginspec src/plugins/perforce/Perforce.pluginspec src/plugins/projectexplorer/ProjectExplorer.pluginspec src/plugins/qmleditor/QmlEditor.pluginspec src/plugins/qmleditor/idcollector.cpp src/plugins/qmleditor/idcollector.h src/plugins/qmleditor/parser/qmljsglobal_p.h src/plugins/qmleditor/qmlcodecompletion.cpp src/plugins/qmleditor/qmlcodeformatter.cpp src/plugins/qmleditor/qmlcodeformatter.h src/plugins/qmleditor/qmlexpressionundercursor.cpp src/plugins/qmleditor/qmllookupcontext.cpp src/plugins/qmleditor/qmlresolveexpression.cpp src/plugins/qmleditor/qmlsymbol.cpp src/plugins/qmleditor/qmlsymbol.h src/plugins/qmlprojectmanager/QmlProjectManager.pluginspec src/plugins/qt4projectmanager/Qt4ProjectManager.pluginspec src/plugins/qtscripteditor/QtScriptEditor.pluginspec src/plugins/regexp/RegExp.pluginspec src/plugins/resourceeditor/ResourceEditor.pluginspec src/plugins/snippets/Snippets.pluginspec src/plugins/subversion/Subversion.pluginspec src/plugins/texteditor/TextEditor.pluginspec src/plugins/vcsbase/VCSBase.pluginspec src/plugins/welcome/Welcome.pluginspec src/shared/qml/parser/qmljsast.cpp src/shared/qml/parser/qmljsast_p.h src/shared/qml/parser/qmljsastfwd_p.h src/shared/qml/parser/qmljsastvisitor.cpp src/shared/qml/parser/qmljsastvisitor_p.h src/shared/qml/parser/qmljsengine_p.cpp src/shared/qml/parser/qmljsengine_p.h src/shared/qml/parser/qmljsgrammar.cpp src/shared/qml/parser/qmljsgrammar_p.h src/shared/qml/parser/qmljslexer.cpp src/shared/qml/parser/qmljslexer_p.h src/shared/qml/parser/qmljsmemorypool_p.h src/shared/qml/parser/qmljsnodepool_p.h src/shared/qml/parser/qmljsparser.cpp src/shared/qml/parser/qmljsparser_p.h
This commit is contained in:
		@@ -1515,10 +1515,17 @@ void CppCodeCompletion::completions(QList<TextEditor::CompletionItem> *completio
 | 
			
		||||
            }
 | 
			
		||||
            const QRegExp regExp(keyRegExp);
 | 
			
		||||
 | 
			
		||||
            const bool hasKey = !key.isEmpty();
 | 
			
		||||
            foreach (TextEditor::CompletionItem item, m_completions) {
 | 
			
		||||
                if (regExp.indexIn(item.text) == 0) {
 | 
			
		||||
                    item.relevance = (key.length() > 0 &&
 | 
			
		||||
                                         item.text.startsWith(key, Qt::CaseInsensitive)) ? 1 : 0;
 | 
			
		||||
                    if (hasKey) {
 | 
			
		||||
                        if (item.text.startsWith(key, Qt::CaseSensitive)) {
 | 
			
		||||
                            item.relevance = 2;
 | 
			
		||||
                        } else if (m_caseSensitivity == Qt::CaseInsensitive
 | 
			
		||||
                                   && item.text.startsWith(key, Qt::CaseInsensitive)) {
 | 
			
		||||
                            item.relevance = 1;
 | 
			
		||||
                        }
 | 
			
		||||
                    }
 | 
			
		||||
                    (*completions) << item;
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user