entrypushbutton: do not add icon from list if list is empty (crashes in debug builds)

这个提交包含在:
Albert S. 2019-06-03 07:44:48 +02:00
父节点 a1a9dfb729
当前提交 84170a935d

查看文件

@ -20,7 +20,10 @@ EntryPushButton::EntryPushButton(const EntryConfig &config) : QPushButton()
this->setText(config.name);
this->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
this->setIcon(config.icon);
this->setIconSize(config.icon.availableSizes().first());
if(!config.icon.availableSizes().isEmpty())
{
this->setIconSize(config.icon.availableSizes().first());
}
this->config = config;
connect(this, SIGNAL(clicked()), this, SLOT(emitOwnClicked()));
}