[Gui] modernize some connect() settings

- addresses #6166
This commit is contained in:
Uwe
2023-01-12 02:01:35 +01:00
committed by wwmayer
parent 0410dc8f4d
commit 5ad737ccdc
17 changed files with 73 additions and 87 deletions

View File

@@ -91,7 +91,7 @@ InputField::InputField(QWidget * parent)
iconLabel->setPixmap(pixmap);
iconLabel->setStyleSheet(QString::fromLatin1("QLabel { border: none; padding: 0px; }"));
iconLabel->hide();
connect(this, SIGNAL(textChanged(const QString&)), this, SLOT(updateIconLabel(const QString&)));
connect(this, &Gui::InputField::textChanged, this, &InputField::updateIconLabel);
int frameWidth = style()->pixelMetric(QStyle::PM_DefaultFrameWidth);
setStyleSheet(QString::fromLatin1("QLineEdit { padding-right: %1px } ").arg(iconLabel->sizeHint().width() + frameWidth + 1));
QSize msz = minimumSizeHint();
@@ -100,8 +100,7 @@ InputField::InputField(QWidget * parent)
this->setContextMenuPolicy(Qt::DefaultContextMenu);
QObject::connect(this, SIGNAL(textChanged(QString)),
this, SLOT(newInput(QString)));
connect(this, &Gui::InputField::textChanged, this, &InputField::newInput);
}
InputField::~InputField()