Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Marco Bubke
flatpak-qt-creator
Commits
6c7c3331
Commit
6c7c3331
authored
Sep 18, 2009
by
Roberto Raggi
Browse files
Cleanup
parent
a5156e62
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/libs/cplusplus/MatchingText.cpp
View file @
6c7c3331
...
...
@@ -40,12 +40,13 @@ enum { MAX_NUM_LINES = 20 };
static
bool
maybeOverrideChar
(
const
QChar
&
ch
)
{
if
(
ch
==
QLatin1Char
(
')'
))
return
true
;
else
if
(
ch
==
QLatin1Char
(
']'
))
return
true
;
else
if
(
ch
==
QLatin1Char
(
';'
))
return
true
;
else
if
(
ch
==
QLatin1Char
(
'"'
))
return
true
;
else
if
(
ch
==
QLatin1Char
(
'\''
))
return
true
;
else
return
false
;
switch
(
ch
.
unicode
())
{
case
')'
:
case
']'
:
case
';'
:
case
'"'
:
case
'\''
:
return
true
;
default:
return
false
;
}
}
static
bool
isCompleteStringLiteral
(
const
BackwardsScanner
&
tk
,
int
index
,
int
startToken
)
...
...
@@ -76,22 +77,18 @@ static bool isCompleteCharLiteral(const BackwardsScanner &tk, int index, int sta
static
bool
shouldInsertMatchingText
(
const
QChar
&
lookAhead
)
{
if
(
lookAhead
.
isSpace
())
return
true
;
else
if
(
lookAhead
==
QLatin1Char
(
'{'
))
return
true
;
else
if
(
lookAhead
==
QLatin1Char
(
'}'
))
return
true
;
else
if
(
lookAhead
==
QLatin1Char
(
']'
))
return
true
;
else
if
(
lookAhead
==
QLatin1Char
(
')'
))
return
true
;
else
if
(
lookAhead
==
QLatin1Char
(
';'
))
return
true
;
else
if
(
lookAhead
==
QLatin1Char
(
','
))
switch
(
lookAhead
.
unicode
())
{
case
'{'
:
case
'}'
:
case
']'
:
case
')'
:
case
';'
:
case
','
:
return
true
;
return
false
;
default:
if
(
lookAhead
.
isSpace
())
return
true
;
return
false
;
}
// switch
}
MatchingText
::
MatchingText
()
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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