From 382ffffdc831f271eb5ef590c0ddf0e29aa3049c Mon Sep 17 00:00:00 2001 From: Roy Qu Date: Fri, 21 Oct 2022 09:56:14 +0800 Subject: [PATCH] minor fix: uninitialized variable --- RedPandaIDE/compiler/stdincompiler.cpp | 7 +++++++ RedPandaIDE/compiler/stdincompiler.h | 1 + RedPandaIDE/widgets/functiontooltipwidget.cpp | 2 ++ 3 files changed, 10 insertions(+) diff --git a/RedPandaIDE/compiler/stdincompiler.cpp b/RedPandaIDE/compiler/stdincompiler.cpp index 8238c6c5..083802a4 100644 --- a/RedPandaIDE/compiler/stdincompiler.cpp +++ b/RedPandaIDE/compiler/stdincompiler.cpp @@ -21,12 +21,19 @@ #include #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: "<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(); }