feat: add version check

This commit is contained in:
semenov
2025-01-22 15:09:52 +03:00
parent d09b8b5727
commit e4aec0b4ca
14 changed files with 181 additions and 20 deletions

View File

@@ -33,6 +33,7 @@ void UpdateNotifyWidget::addToList(FileData fileData)
void UpdateNotifyWidget::showWithFill()
{
clearList();
if(versionContainer->getServerVersion() == baseNamePackage)
{
@@ -70,6 +71,15 @@ void UpdateNotifyWidget::showWithFill()
show();
}
void UpdateNotifyWidget::clearList()
{
QLayoutItem* item;
while ( ( item = ui->labelsLayout->layout()->takeAt( 0 ) ) != NULL )
{
delete item->widget();
delete item;
}
}
QLabel* UpdateNotifyWidget::createLabel(QString text)
{
QLabel *label = new QLabel;

View File

@@ -44,6 +44,7 @@ private:
VersionContainer *versionContainer;
int currentLoadingCount;
QLabel* createLabel(QString text);
void clearList();
};
#endif // UPDATENOTIFYWIDGET_H