mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-07-20 05:11:02 -04:00
Fixed usage of deprecated method "const QPixmap *QLabel::pixmap() const;"
This commit is contained in:
parent
fcd7a213e6
commit
b2bec12a43
2 changed files with 5 additions and 11 deletions
|
@ -700,8 +700,8 @@ void IdEditDialog::removeAvatar()
|
|||
|
||||
void IdEditDialog::updateInterface()
|
||||
{
|
||||
const QPixmap *pixmap = ui->avatarLabel->pixmap();
|
||||
if (pixmap && !pixmap->isNull()) {
|
||||
QPixmap pixmap = ui->avatarLabel->pixmap(Qt::ReturnByValue);
|
||||
if (!pixmap.isNull()) {
|
||||
ui->removeButton->setEnabled(true);
|
||||
} else if (mEditGroup.mImage.mSize > 0) {
|
||||
ui->removeButton->setEnabled(true);
|
||||
|
|
|
@ -107,8 +107,8 @@ void AvatarDialog::removeAvatar()
|
|||
|
||||
void AvatarDialog::updateInterface()
|
||||
{
|
||||
const QPixmap *pixmap = ui->avatarLabel->pixmap();
|
||||
if (pixmap && !pixmap->isNull()) {
|
||||
QPixmap pixmap = ui->avatarLabel->pixmap(Qt::ReturnByValue);
|
||||
if (!pixmap.isNull()) {
|
||||
ui->removeButton->setEnabled(true);
|
||||
} else {
|
||||
ui->removeButton->setEnabled(false);
|
||||
|
@ -123,13 +123,7 @@ void AvatarDialog::setAvatar(const QPixmap &avatar)
|
|||
|
||||
void AvatarDialog::getAvatar(QPixmap &avatar)
|
||||
{
|
||||
const QPixmap *pixmap = ui->avatarLabel->pixmap();
|
||||
if (!pixmap) {
|
||||
avatar = QPixmap();
|
||||
return;
|
||||
}
|
||||
|
||||
avatar = *pixmap;
|
||||
avatar = ui->avatarLabel->pixmap(Qt::ReturnByValue);
|
||||
}
|
||||
|
||||
void AvatarDialog::getAvatar(QByteArray &avatar)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue