Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add even more info on loaded fonts #5432

Closed
wants to merge 1 commit into from
Closed

Add even more info on loaded fonts #5432

wants to merge 1 commit into from

Conversation

nirvn
Copy link
Member

@nirvn nirvn commented Jul 8, 2024

No description provided.

@qfield-fairy
Copy link
Collaborator

Copy link
Collaborator

@mohsenD98 mohsenD98 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we extract the common logic into a separate function ?

void registerFont(const QString &fontFile) {
    const int id = QFontDatabase::addApplicationFont(QDir::cleanPath(fontDir.path() + QDir::separator() + fontFile));
    if (id >= 0) {
        qInfo() << .. ;
        qInfo() << .. ;
    } else {
        QgsMessageLog:: ... 
    }
}

@@ -245,8 +245,12 @@ QgisMobileapp::QgisMobileapp( QgsApplication *app, QObject *parent )
for ( const QString &fontFile : fontFiles )
{
const int id = QFontDatabase::addApplicationFont( QDir::cleanPath( fontDir.path() + QDir::separator() + fontFile ) );
qInfo() << QStringLiteral( "App-wide font registered: %1" ).arg( QDir::cleanPath( fontDir.path() + QDir::separator() + fontFile ) );
if ( id == -1 )
if ( id >= 0 )
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

here.

@@ -774,8 +778,12 @@ void QgisMobileapp::readProjectFile()
for ( const QString &fontFile : fontFiles )
{
const int id = QFontDatabase::addApplicationFont( QDir::cleanPath( fontDir.path() + QDir::separator() + fontFile ) );
qInfo() << QStringLiteral( "Project font registered: %1" ).arg( QDir::cleanPath( fontDir.path() + QDir::separator() + fontFile ) );
if ( id == -1 )
if ( id >= 0 )
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and here.

@nirvn nirvn closed this Jul 10, 2024
@nirvn nirvn deleted the fonts_extra_info branch July 10, 2024 03:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants