entrypushbutton: do not add icon from list if list is empty (crashes in debug builds)
This commit is contained in:
parent
a1a9dfb729
commit
84170a935d
@ -20,7 +20,10 @@ EntryPushButton::EntryPushButton(const EntryConfig &config) : QPushButton()
|
|||||||
this->setText(config.name);
|
this->setText(config.name);
|
||||||
this->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
|
this->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
|
||||||
this->setIcon(config.icon);
|
this->setIcon(config.icon);
|
||||||
|
if(!config.icon.availableSizes().isEmpty())
|
||||||
|
{
|
||||||
this->setIconSize(config.icon.availableSizes().first());
|
this->setIconSize(config.icon.availableSizes().first());
|
||||||
|
}
|
||||||
this->config = config;
|
this->config = config;
|
||||||
connect(this, SIGNAL(clicked()), this, SLOT(emitOwnClicked()));
|
connect(this, SIGNAL(clicked()), this, SLOT(emitOwnClicked()));
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user