minor fix: uninitialized variable
This commit is contained in:
parent
8e771bd322
commit
382ffffdc8
|
@ -21,12 +21,19 @@
|
||||||
#include <QTextCodec>
|
#include <QTextCodec>
|
||||||
#include "qt_utils/charsetinfo.h"
|
#include "qt_utils/charsetinfo.h"
|
||||||
|
|
||||||
|
static int counter=0;
|
||||||
StdinCompiler::StdinCompiler(const QString &filename,const QByteArray& encoding, const QString& content,bool silent, bool onlyCheckSyntax):
|
StdinCompiler::StdinCompiler(const QString &filename,const QByteArray& encoding, const QString& content,bool silent, bool onlyCheckSyntax):
|
||||||
Compiler(filename,silent, onlyCheckSyntax),
|
Compiler(filename,silent, onlyCheckSyntax),
|
||||||
mContent(content),
|
mContent(content),
|
||||||
mEncoding(encoding)
|
mEncoding(encoding)
|
||||||
{
|
{
|
||||||
|
counter++;
|
||||||
|
}
|
||||||
|
|
||||||
|
StdinCompiler::~StdinCompiler()
|
||||||
|
{
|
||||||
|
counter--;
|
||||||
|
qDebug()<<"stdin compiler exited: "<<counter;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool StdinCompiler::prepareForCompile()
|
bool StdinCompiler::prepareForCompile()
|
||||||
|
|
|
@ -25,6 +25,7 @@ class StdinCompiler : public Compiler
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit StdinCompiler(const QString& filename, const QByteArray& encoding, const QString& content, bool silent,bool onlyCheckSyntax);
|
explicit StdinCompiler(const QString& filename, const QByteArray& encoding, const QString& content, bool silent,bool onlyCheckSyntax);
|
||||||
|
~StdinCompiler();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
bool prepareForCompile() override;
|
bool prepareForCompile() override;
|
||||||
|
|
|
@ -37,6 +37,7 @@ FunctionTooltipWidget::FunctionTooltipWidget(QWidget *parent) :
|
||||||
mDownButton->setArrowType(Qt::DownArrow);
|
mDownButton->setArrowType(Qt::DownArrow);
|
||||||
mDownButton->setFixedSize(16, 16);
|
mDownButton->setFixedSize(16, 16);
|
||||||
mDownButton->setAutoRaise(true);
|
mDownButton->setAutoRaise(true);
|
||||||
|
mInfoIndex=0;
|
||||||
|
|
||||||
this->setLayout(new QHBoxLayout());
|
this->setLayout(new QHBoxLayout());
|
||||||
layout()->setContentsMargins(0,0,0,0);
|
layout()->setContentsMargins(0,0,0,0);
|
||||||
|
@ -65,6 +66,7 @@ void FunctionTooltipWidget::addTip(const QString &name, const QString& fullname,
|
||||||
|
|
||||||
void FunctionTooltipWidget::clearTips()
|
void FunctionTooltipWidget::clearTips()
|
||||||
{
|
{
|
||||||
|
mInfoIndex=0;
|
||||||
mInfos.clear();
|
mInfos.clear();
|
||||||
hide();
|
hide();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue