1
0
mirror of https://github.com/qTox/qTox.git synced 2024-03-22 14:00:36 +08:00

nulling timer

This commit is contained in:
agilob 2014-11-03 17:01:02 +00:00
parent b386e4f08f
commit 770d7b00a8
No known key found for this signature in database
GPG Key ID: 34568050DBCCB997

View File

@ -56,6 +56,7 @@ ChatForm::ChatForm(Friend* chatFriend)
statusMessageLabel->setMinimumHeight(Style::getFont(Style::Medium).pixelSize());
netcam = new NetCamView();
timer = nullptr;
headTextLayout->addWidget(statusMessageLabel);
headTextLayout->addStretch();
@ -733,9 +734,8 @@ void ChatForm::onLoadHistory()
void ChatForm::startCounter()
{
if(timer)
if(!timer)
{
qDebug() << "timer nie istnieje";
timer = new QTimer();
connect(timer, SIGNAL(timeout()), this, SLOT(updateTime()));
timer->start(1000);
@ -752,6 +752,7 @@ void ChatForm::stopCounter()
"white", QDateTime::currentDateTime());
timer->stop();
callDuration->hide();
timer = nullptr;
delete timer;
}
}