Commit 48e8e58e authored by Jan Möbius's avatar Jan Möbius

Fixed some cppcheck warnings

parent 2a804285
......@@ -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();
}
......
......@@ -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();
......
......@@ -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:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment