Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
OpenFlipper-Free
OpenFlipper
Commits
48e8e58e
Commit
48e8e58e
authored
Feb 01, 2019
by
Jan Möbius
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed some cppcheck warnings
parent
2a804285
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
7 deletions
+4
-7
PythonInterpreter/PythonInterpreter.cc
PythonInterpreter/PythonInterpreter.cc
+1
-3
widgets/pythonWidget/PythonSyntaxHighlighter.cc
widgets/pythonWidget/PythonSyntaxHighlighter.cc
+2
-3
widgets/pythonWidget/PythonSyntaxHighlighter.hh
widgets/pythonWidget/PythonSyntaxHighlighter.hh
+1
-1
No files found.
PythonInterpreter/PythonInterpreter.cc
View file @
48e8e58e
...
...
@@ -179,7 +179,7 @@ bool PythonInterpreter::runScript(QString _script) {
}
PyGILState_STATE
state
=
PyGILState_Ensure
();
PyThreadState
*
tstate
=
PyGILState_GetThisThreadState
();
//
PyThreadState* tstate = PyGILState_GetThisThreadState();
auto
locals
=
mainModule_
.
attr
(
"__dict__"
);
...
...
@@ -222,8 +222,6 @@ QString PythonInterpreter::runScriptOutput(QString _script) {
runScript
(
_script
);
externalLogging_
=
true
;
return
LogOut
+
LogErr
;
LogOut
.
clear
();
LogErr
.
clear
();
}
...
...
widgets/pythonWidget/PythonSyntaxHighlighter.cc
View file @
48e8e58e
...
...
@@ -128,9 +128,8 @@ void PythonSyntaxHighlighter::highlightBlock(const QString &text)
bool
PythonSyntaxHighlighter
::
matchMultiline
(
const
QString
&
text
,
const
QRegExp
&
delimiter
,
const
int
inState
,
const
QTextCharFormat
&
style
)
{
int
start
=
-
1
;
int
start
=
-
1
;
int
add
=
-
1
;
int
end
=
-
1
;
int
length
=
0
;
// If inside triple-single quotes, start at 0
...
...
@@ -148,7 +147,7 @@ bool PythonSyntaxHighlighter::matchMultiline(const QString &text, const QRegExp
// As long as there's a delimiter match on this line...
while
(
start
>=
0
)
{
// Look for the ending delimiter
end
=
delimiter
.
indexIn
(
text
,
start
+
add
);
int
end
=
delimiter
.
indexIn
(
text
,
start
+
add
);
// Ending delimiter on this line?
if
(
end
>=
add
)
{
length
=
end
-
start
+
add
+
delimiter
.
matchedLength
();
...
...
widgets/pythonWidget/PythonSyntaxHighlighter.hh
View file @
48e8e58e
...
...
@@ -51,7 +51,7 @@ class PythonSyntaxHighlighter : public QSyntaxHighlighter
{
Q_OBJECT
public:
PythonSyntaxHighlighter
(
QTextDocument
*
parent
=
0
);
explicit
PythonSyntaxHighlighter
(
QTextDocument
*
parent
=
0
);
protected:
void
highlightBlock
(
const
QString
&
text
);
private:
...
...
Write
Preview
Markdown
is supported
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