minor fix: uninitialized variable

This commit is contained in:
Roy Qu 2022-10-21 09:56:14 +08:00
parent 8e771bd322
commit 382ffffdc8
3 changed files with 10 additions and 0 deletions

View File

@ -21,12 +21,19 @@
#include <QTextCodec>
#include "qt_utils/charsetinfo.h"
static int counter=0;
StdinCompiler::StdinCompiler(const QString &filename,const QByteArray& encoding, const QString& content,bool silent, bool onlyCheckSyntax):
Compiler(filename,silent, onlyCheckSyntax),
mContent(content),
mEncoding(encoding)
{
counter++;
}
StdinCompiler::~StdinCompiler()
{
counter--;
qDebug()<<"stdin compiler exited: "<<counter;
}
bool StdinCompiler::prepareForCompile()

View File

@ -25,6 +25,7 @@ class StdinCompiler : public Compiler
public:
explicit StdinCompiler(const QString& filename, const QByteArray& encoding, const QString& content, bool silent,bool onlyCheckSyntax);
~StdinCompiler();
protected:
bool prepareForCompile() override;

View File

@ -37,6 +37,7 @@ FunctionTooltipWidget::FunctionTooltipWidget(QWidget *parent) :
mDownButton->setArrowType(Qt::DownArrow);
mDownButton->setFixedSize(16, 16);
mDownButton->setAutoRaise(true);
mInfoIndex=0;
this->setLayout(new QHBoxLayout());
layout()->setContentsMargins(0,0,0,0);
@ -65,6 +66,7 @@ void FunctionTooltipWidget::addTip(const QString &name, const QString& fullname,
void FunctionTooltipWidget::clearTips()
{
mInfoIndex=0;
mInfos.clear();
hide();
}