Improve QGtk3FontDialogHelper::onAccepted()
Call currentFont() only once. It does a conversion from a Pango font description string to a Qt font, so not entirely trivial operation. Change-Id: Ic67b7c5b0874621c51a5cce4766acd4243d3dfde Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
This commit is contained in:
parent
cf53aa21bf
commit
3aaa5d6b32
@ -588,9 +588,10 @@ QFont QGtk3FontDialogHelper::currentFont() const
|
||||
|
||||
void QGtk3FontDialogHelper::onAccepted()
|
||||
{
|
||||
emit currentFontChanged(currentFont());
|
||||
const QFont font = currentFont();
|
||||
emit currentFontChanged(font);
|
||||
emit accept();
|
||||
emit fontSelected(currentFont());
|
||||
emit fontSelected(font);
|
||||
}
|
||||
|
||||
void QGtk3FontDialogHelper::applyOptions()
|
||||
|
Loading…
Reference in New Issue
Block a user