Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Tobias Hunger
qt-creator
Commits
5fd660c1
Commit
5fd660c1
authored
May 06, 2009
by
Alessandro Portale
Browse files
Merge branch 'master' of git@scm.dev.nokia.troll.no:creator/mainline
parents
b38ba4d8
c96d63f0
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/plugins/coreplugin/dialogs/saveitemsdialog.cpp
View file @
5fd660c1
...
...
@@ -35,6 +35,7 @@
#include
<QtCore/QDir>
#include
<QtCore/QFileInfo>
#include
<QtCore/QDir>
#include
<QtGui/QPushButton>
#include
<QtGui/QTreeWidget>
#include
<QtGui/QHeaderView>
...
...
src/plugins/cppeditor/cpphighlighter.cpp
View file @
5fd660c1
...
...
@@ -58,6 +58,7 @@ void CppHighlighter::highlightBlock(const QString &text)
braceDepth
=
previousState
>>
8
;
}
SimpleLexer
tokenize
;
tokenize
.
setQtMocRunEnabled
(
false
);
...
...
@@ -210,6 +211,28 @@ void CppHighlighter::highlightBlock(const QString &text)
TextEditDocumentLayout
::
setParentheses
(
currentBlock
(),
parentheses
);
// optimization: if only the brace depth changes, we adjust subsequent blocks
// to have QSyntaxHighlighter stop the rehighlighting
int
currentState
=
currentBlockState
();
if
(
currentState
!=
-
1
)
{
int
oldState
=
currentState
&
0xff
;
int
oldBraceDepth
=
currentState
>>
8
;
if
(
oldState
==
tokenize
.
state
()
&&
oldBraceDepth
!=
braceDepth
)
{
int
delta
=
braceDepth
-
oldBraceDepth
;
QTextBlock
block
=
currentBlock
().
next
();
while
(
block
.
isValid
())
{
currentState
=
block
.
userState
();
if
(
currentState
!=
-
1
)
{
oldState
=
currentState
&
0xff
;
oldBraceDepth
=
currentState
>>
8
;
block
.
setUserState
(
qMax
(
0
,
(
oldBraceDepth
+
delta
)
<<
8
)
|
oldState
);
}
block
=
block
.
next
();
}
}
}
setCurrentBlockState
((
braceDepth
<<
8
)
|
tokenize
.
state
());
}
...
...
src/plugins/projectexplorer/projectwindow.cpp
View file @
5fd660c1
...
...
@@ -131,8 +131,6 @@ ProjectWindow::~ProjectWindow()
void
ProjectWindow
::
restoreStatus
()
{
m_panelsTabWidget
->
setFocus
();
if
(
!
m_treeWidget
->
currentItem
()
&&
m_treeWidget
->
topLevelItemCount
())
{
m_treeWidget
->
setCurrentItem
(
m_treeWidget
->
topLevelItem
(
0
),
0
,
QItemSelectionModel
::
SelectCurrent
|
QItemSelectionModel
::
Rows
);
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment