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:
@@ -3634,11 +3634,11 @@ QString BaseTextEditor::autoComplete(QTextCursor &cursor, const QString &textToI
|
||||
const QString brackets = QLatin1String("[]");
|
||||
if (parentheses.contains(character) || brackets.contains(character)) {
|
||||
QTextCursor tmp= cursor;
|
||||
TextEditor::TextBlockUserData::findPreviousBlockOpenParenthesis(&tmp);
|
||||
int blockStart = tmp.isNull() ? 0 : tmp.position();
|
||||
bool foundBlockStart = TextEditor::TextBlockUserData::findPreviousBlockOpenParenthesis(&tmp);
|
||||
int blockStart = foundBlockStart ? tmp.position() : 0;
|
||||
tmp = cursor;
|
||||
TextEditor::TextBlockUserData::findNextBlockClosingParenthesis(&tmp);
|
||||
int blockEnd = tmp.isNull() ? (cursor.document()->characterCount()-1) : tmp.position();
|
||||
bool foundBlockEnd = TextEditor::TextBlockUserData::findNextBlockClosingParenthesis(&tmp);
|
||||
int blockEnd = foundBlockEnd ? tmp.position() : (cursor.document()->characterCount() - 1);
|
||||
const QChar openChar = parentheses.contains(character) ? QLatin1Char('(') : QLatin1Char('[');
|
||||
const QChar closeChar = parentheses.contains(character) ? QLatin1Char(')') : QLatin1Char(']');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user