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
Marco Bubke
flatpak-qt-creator
Commits
fd26a8c8
Commit
fd26a8c8
authored
Feb 15, 2010
by
Roberto Raggi
Browse files
Get rid of the QmlJS prefix.
parent
8fb82ef7
Changes
7
Hide whitespace changes
Inline
Side-by-side
src/libs/qmljs/qmljsindenter.cpp
View file @
fd26a8c8
...
...
@@ -205,7 +205,7 @@ void QmlJSIndenter::eraseChar(QString &t, int k, QChar ch) const
*/
QString
QmlJSIndenter
::
trimmedCodeLine
(
const
QString
&
t
)
{
QmlJS
Scanner
scanner
;
Scanner
scanner
;
QTextBlock
currentLine
=
yyLinizerState
.
iter
;
int
startState
=
qMax
(
0
,
currentLine
.
previous
().
userState
())
&
0xff
;
...
...
src/libs/qmljs/qmljsscanner.cpp
View file @
fd26a8c8
...
...
@@ -76,22 +76,22 @@ const _Tp *end(const _Tp (&a)[N])
return
a
+
N
;
}
QmlJS
Scanner
::
QmlJS
Scanner
()
Scanner
::
Scanner
()
:
_state
(
0
),
_scanComments
(
true
)
{
}
QmlJS
Scanner
::~
QmlJS
Scanner
()
Scanner
::~
Scanner
()
{
}
bool
QmlJS
Scanner
::
scanComments
()
const
bool
Scanner
::
scanComments
()
const
{
return
_scanComments
;
}
void
QmlJS
Scanner
::
setScanComments
(
bool
scanComments
)
void
Scanner
::
setScanComments
(
bool
scanComments
)
{
_scanComments
=
scanComments
;
}
...
...
@@ -120,7 +120,7 @@ static bool isNumberChar(QChar ch)
}
}
QList
<
Token
>
QmlJS
Scanner
::
operator
()(
const
QString
&
text
,
int
startState
)
QList
<
Token
>
Scanner
::
operator
()(
const
QString
&
text
,
int
startState
)
{
enum
{
Normal
=
0
,
...
...
@@ -297,12 +297,12 @@ QList<Token> QmlJSScanner::operator()(const QString &text, int startState)
return
tokens
;
}
int
QmlJS
Scanner
::
state
()
const
int
Scanner
::
state
()
const
{
return
_state
;
}
bool
QmlJS
Scanner
::
isKeyword
(
const
QString
&
text
)
const
bool
Scanner
::
isKeyword
(
const
QString
&
text
)
const
{
if
(
qBinaryFind
(
begin
(
js_keywords
),
end
(
js_keywords
),
text
)
!=
end
(
js_keywords
))
return
true
;
...
...
src/libs/qmljs/qmljsscanner.h
View file @
fd26a8c8
...
...
@@ -74,11 +74,11 @@ public:
Kind
kind
;
};
class
QMLJS_EXPORT
QmlJS
Scanner
class
QMLJS_EXPORT
Scanner
{
public:
QmlJS
Scanner
();
virtual
~
QmlJS
Scanner
();
Scanner
();
virtual
~
Scanner
();
bool
scanComments
()
const
;
void
setScanComments
(
bool
scanComments
);
...
...
src/plugins/qmljseditor/qmlcodecompletion.cpp
View file @
fd26a8c8
...
...
@@ -402,7 +402,7 @@ void FunctionArgumentWidget::updateArgumentHighlight()
QString
str
=
m_editor
->
textAt
(
m_startpos
,
curpos
-
m_startpos
);
int
argnr
=
0
;
int
parcount
=
0
;
QmlJS
Scanner
tokenize
;
Scanner
tokenize
;
const
QList
<
Token
>
tokens
=
tokenize
(
str
);
for
(
int
i
=
0
;
i
<
tokens
.
count
();
++
i
)
{
const
Token
&
tk
=
tokens
.
at
(
i
);
...
...
@@ -557,7 +557,7 @@ bool QmlCodeCompletion::triggersCompletion(TextEditor::ITextEditable *editor)
const
int
blockState
=
qMax
(
0
,
block
.
previous
().
userState
())
&
0xff
;
const
QString
blockText
=
block
.
text
();
QmlJS
Scanner
scanner
;
Scanner
scanner
;
const
QList
<
Token
>
tokens
=
scanner
(
blockText
,
blockState
);
foreach
(
const
Token
&
tk
,
tokens
)
{
if
(
column
>=
tk
.
begin
()
&&
column
<=
tk
.
end
())
{
...
...
src/plugins/qmljseditor/qmlexpressionundercursor.cpp
View file @
fd26a8c8
...
...
@@ -45,7 +45,7 @@ namespace QmlJSEditor {
class
ExpressionUnderCursor
{
QTextCursor
_cursor
;
QmlJS
Scanner
scanner
;
Scanner
scanner
;
public:
ExpressionUnderCursor
()
...
...
src/plugins/qmljseditor/qmljseditor.cpp
View file @
fd26a8c8
...
...
@@ -1048,7 +1048,7 @@ bool QmlJSTextEditor::contextAllowsAutoParentheses(const QTextCursor &cursor, co
const
QString
blockText
=
cursor
.
block
().
text
();
const
int
blockState
=
blockStartState
(
cursor
.
block
());
QmlJS
Scanner
tokenize
;
Scanner
tokenize
;
const
QList
<
Token
>
tokens
=
tokenize
(
blockText
,
blockState
);
const
int
pos
=
cursor
.
columnNumber
();
...
...
src/plugins/qmljseditor/qmljshighlighter.h
View file @
fd26a8c8
...
...
@@ -94,7 +94,7 @@ private:
bool
m_qmlEnabled
;
int
m_braceDepth
;
QmlJS
::
QmlJS
Scanner
m_scanner
;
QmlJS
::
Scanner
m_scanner
;
Parentheses
m_currentBlockParentheses
;
QTextCharFormat
m_formats
[
NumFormats
];
...
...
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