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

Implement plugin uninstall mechanism + adding a pair of metadata details #5202

Merged
merged 3 commits into from Apr 23, 2024

Conversation

nirvn
Copy link
Member

@nirvn nirvn commented Apr 23, 2024

Last bits, I consider the framework done after this.

An uninstall mechanism is now in place for app plugins so people can easily uninstall plugins (instead of knowing where they need to go in their device's storage). In addition, a version metadata detail has been added so authors and users can better debug issues. An homepage metadata detail was also added.

Screenshot:
image

@qfield-fairy
Copy link
Collaborator

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

clang-tidy made some suggestions

{
disableAppPlugin( uuid );

QFileInfo fi( mAvailableAppPlugins[uuid].path() );
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: variable 'fi' of type 'QFileInfo' can be declared 'const' [misc-const-correctness]

Suggested change
QFileInfo fi( mAvailableAppPlugins[uuid].path() );
QFileInfo const fi( mAvailableAppPlugins[uuid].path() );

{
disableAppPlugin( uuid );

QFileInfo fi( mAvailableAppPlugins[uuid].path() );
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: variable name 'fi' is too short, expected at least 3 characters [readability-identifier-length]

    QFileInfo fi( mAvailableAppPlugins[uuid].path() );
              ^


public:
PluginInformation( const QString &uuid = QString(), const QString &name = QString(), const QString &description = QString(), const QString &author = QString(), const QString &icon = QString(), const QString &path = QString() )
PluginInformation( const QString &uuid = QString(), const QString &name = QString(), const QString &description = QString(), const QString &author = QString(), const QString &homepage = QString(), const QString &icon = QString(), const QString &version = QString(), const QString &path = QString() )
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: 8 adjacent parameters of 'PluginInformation' of similar type ('const QString &') are easily swapped by mistake [bugprone-easily-swappable-parameters]

    PluginInformation( const QString &uuid = QString(), const QString &name = QString(), const QString &description = QString(), const QString &author = QString(), const QString &homepage = QString(), const QString &icon = QString(), const QString &version = QString(), const QString &path = QString() )
                       ^
Additional context

src/core/pluginmanager.h:35: the first parameter in the range is 'uuid'

    PluginInformation( const QString &uuid = QString(), const QString &name = QString(), const QString &description = QString(), const QString &author = QString(), const QString &homepage = QString(), const QString &icon = QString(), const QString &version = QString(), const QString &path = QString() )
                                      ^

src/core/pluginmanager.h:35: the last parameter in the range is 'path'

    PluginInformation( const QString &uuid = QString(), const QString &name = QString(), const QString &description = QString(), const QString &author = QString(), const QString &homepage = QString(), const QString &icon = QString(), const QString &version = QString(), const QString &path = QString() )
                                                                                                                                                                                                                                                                                             ^

Copy link
Member

@domi4484 domi4484 left a comment

Choose a reason for hiding this comment

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

Tested it, i could successfully uninstall plugins

@nirvn nirvn merged commit 3024a71 into master Apr 23, 2024
22 of 23 checks passed
@nirvn nirvn deleted the plugins_delete branch April 23, 2024 10:19
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.

None yet

3 participants