MCPcopy Create free account
hub / github.com/PCSX2/pcsx2 / onDialogAccepted

Method onDialogAccepted

pcsx2-qt/Settings/OsdFontPickerDialog.cpp:465–488  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

463}
464
465void OSDFontPickerDialog::onDialogAccepted()
466{
467 if (!m_selected_system_family.trimmed().isEmpty())
468 {
469 const QString resolved_path = resolveSystemFontPath(m_selected_system_family);
470 if (!resolved_path.isEmpty() && !pathsReferToSameFile(m_selected_font_path, resolved_path))
471 {
472 setSelectedFontPath(resolved_path);
473 m_ui.status->setText(tr("Using system font: %1.").arg(m_selected_system_family));
474 }
475 else if (resolved_path.isEmpty())
476 {
477 m_ui.status->setText(
478 tr("Could not locate a font file for system family '%1'. Using bundled default.").arg(m_selected_system_family));
479 setSelectedFontPath(QString());
480 }
481 }
482 else if (CatalogFontEntry* entry = getSelectedCatalogEntry())
483 {
484 const QString cached_font_path = findCachedFamilyFontPath(entry->family);
485 if (!cached_font_path.isEmpty() && !pathsReferToSameFile(m_selected_font_path, cached_font_path))
486 setSelectedFontPath(cached_font_path);
487 }
488}
489
490bool OSDFontPickerDialog::ensureCatalogLoaded(bool allow_download, bool force_download)
491{

Callers

nothing calls this directly

Calls 3

pathsReferToSameFileFunction · 0.85
argMethod · 0.80
isEmptyMethod · 0.45

Tested by

no test coverage detected