mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-07-20 21:29:01 -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()
|
void IdEditDialog::updateInterface()
|
||||||
{
|
{
|
||||||
const QPixmap *pixmap = ui->avatarLabel->pixmap();
|
QPixmap pixmap = ui->avatarLabel->pixmap(Qt::ReturnByValue);
|
||||||
if (pixmap && !pixmap->isNull()) {
|
if (!pixmap.isNull()) {
|
||||||
ui->removeButton->setEnabled(true);
|
ui->removeButton->setEnabled(true);
|
||||||
} else if (mEditGroup.mImage.mSize > 0) {
|
} else if (mEditGroup.mImage.mSize > 0) {
|
||||||
ui->removeButton->setEnabled(true);
|
ui->removeButton->setEnabled(true);
|
||||||
|
|
|
@ -107,8 +107,8 @@ void AvatarDialog::removeAvatar()
|
||||||
|
|
||||||
void AvatarDialog::updateInterface()
|
void AvatarDialog::updateInterface()
|
||||||
{
|
{
|
||||||
const QPixmap *pixmap = ui->avatarLabel->pixmap();
|
QPixmap pixmap = ui->avatarLabel->pixmap(Qt::ReturnByValue);
|
||||||
if (pixmap && !pixmap->isNull()) {
|
if (!pixmap.isNull()) {
|
||||||
ui->removeButton->setEnabled(true);
|
ui->removeButton->setEnabled(true);
|
||||||
} else {
|
} else {
|
||||||
ui->removeButton->setEnabled(false);
|
ui->removeButton->setEnabled(false);
|
||||||
|
@ -123,13 +123,7 @@ void AvatarDialog::setAvatar(const QPixmap &avatar)
|
||||||
|
|
||||||
void AvatarDialog::getAvatar(QPixmap &avatar)
|
void AvatarDialog::getAvatar(QPixmap &avatar)
|
||||||
{
|
{
|
||||||
const QPixmap *pixmap = ui->avatarLabel->pixmap();
|
avatar = ui->avatarLabel->pixmap(Qt::ReturnByValue);
|
||||||
if (!pixmap) {
|
|
||||||
avatar = QPixmap();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
avatar = *pixmap;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void AvatarDialog::getAvatar(QByteArray &avatar)
|
void AvatarDialog::getAvatar(QByteArray &avatar)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue