117 Commits

Author SHA1 Message Date
Nyall Dawson
1cb1051528 Simplify code, make PyQt6 compatible 2024-01-28 13:33:23 +10:00
Nyall Dawson
8c52728faf Remove server side filtering 2024-01-25 09:17:51 +10:00
Nyall Dawson
e90cb8c42d Don't try to load plugins which aren't compatible with qt 6
Add a plugin metadata key for "supports_qt6". Plugins which can
safely be loaded in QGIS builds based on Qt6 can set

    supportsQt6=yes

in their metadata.txt to advertise that they are safe to load
on Qt 6 builds
2024-01-25 09:17:51 +10:00
Nyall Dawson
c16a1e2b3d Update enums 2024-01-19 19:44:48 +10:00
Nyall Dawson
5ef1dcee64 Manually fix enum deprecated in qt5.9 2024-01-19 19:44:48 +10:00
Thomas Baumann @work
50b8842895
Update installer_data.py
update to handle (temporary) empty repositories
2023-12-20 15:15:39 +01:00
Nyall Dawson
98c19b38ac Cleanup qgis.utils.home_plugin_path 2023-11-25 07:40:02 +10:00
Denis Rouzaud
8dc67afdf3 allow full access from Python 2023-02-19 07:19:17 +01:00
Denis Rouzaud
4759610ddd [settings] use dedicated category for plugin manager 2023-02-19 07:19:17 +01:00
Denis Rouzaud
91effce867 fix import 2023-02-03 09:05:37 +01:00
Denis Rouzaud
34eb0826c3 change QgsSettings to QgsSettingsTree in code base 2023-02-03 09:05:37 +01:00
Denis Rouzaud
7d628998d5 follow-up rename QgsSettingsTreeElement to QgsSettingsTreeNode 2023-01-30 10:03:39 +10:00
Denis Rouzaud
166ad00f6c avoid overriding method in subclass 2023-01-16 09:00:52 +01:00
Denis Rouzaud
5be8887187 fix tests 2023-01-16 09:00:52 +01:00
Denis Rouzaud
80e3f35e88 migrate plugin manager settings and replace settings in app 2023-01-16 09:00:52 +01:00
Matthias Kuhn
f591542ffe
Merge pull request #50740 from DelazJ/txIssues 2022-12-17 08:37:12 +01:00
Andrea Giudiceandrea
32572b03aa
[plugin manager] Fix metadata parsing language
Use QGIS user interface language instead of system language
2022-12-01 18:00:56 +01:00
Harrissou Sant-anna
6a4684b94d
Solve misc issues reported in Transifex 2022-10-30 09:20:33 +01:00
Nyall Dawson
094cd30650 Move plugins "automatically check for updates" settings key to
a new key

This change moves the old "app/plugin_installer/checkOnStart" setting
key to a new "plugins/automatically-check-for-updates" key, and
switches the default value to enable automatic checks

This is designed to switch all existing QGIS users to the new
default behavior of checking for plugin updates at startup (at
a maximum of once every 3 days).

It is intended to offer a better QGIS experience to our users,
by proactively informing all users when plugins should be
updated, ensuring that ALL users are more likely to upgrade
plugins and get the bug fixes for plugins promptly.

Enterprise users who have customised this setting in their
deployments will need to adapt their scripts for the new
setting key.
2022-09-16 18:11:47 +10:00
Nyall Dawson
9e12c70f21 Remove option to control plugin update check frequency, and hardcode
to every 3 days

This level of configuration is not warranted here
2022-09-16 18:11:47 +10:00
Nyall Dawson
9c4d0a2064 [plugins] Default to checking for plugin updates every 3 days
instead of manually

Too many QGIS users use outdated plugins without even realising it,
leading to an overall buggier QGIS experience then they should have...
2022-09-15 14:40:22 +10:00
Germán Carrillo
6d3cec6dcf [plugins] Minor improvement to find_dependencies: avoid two consecutive calls to updateAvailablePlugins(); add missing keys to Plugins dict in installer_data 2021-11-05 07:26:42 +11:00
Nyall Dawson
22cc4da6e9 Update python/pyplugin_installer/installer_data.py
Co-authored-by: nicogodet <39594821+nicogodet@users.noreply.github.com>
2021-06-02 07:12:51 +10:00
Nyall Dawson
00c7232f1c Fix typehint 2021-06-02 07:12:51 +10:00
Nyall Dawson
154c7f0196 Some minor cleanups to pyplugin_installer.py
- add some type hints
- remove unnecessary comment lines
- replace raw ints with descriptive enum values
2021-06-02 07:12:51 +10:00
Nyall Dawson
98603b7866 [plugins] When a user clicks the "Reload all repositories" button
manually in the plugin manager, then force a reload of the repositories
and don't rely on cached copies of the repo manifest

Otherwise it's not possible to force a refresh on certain types of
plugin repositories where it's not possible to modify the Cache-Control
attribute of the repo

Note that to avoid unnecessary server load, we still use cached
copies during startup and by default. It's only when a user explicitly
hits the "Reload all repositories" button that we force a non-cached
fetch.

Fixes #34351
2020-05-29 03:47:39 +10:00
Ivan Ivanov
e090036a11 Adds support to sort the plugins by update date; Show the plugin version update time 2020-03-30 05:02:50 +03:00
olivierdalang
c924cfd1d2 [feature][plugin manager] allow to install stable or experimental 2020-03-04 18:38:42 +01:00
Borys Jurgiel
ffb38e8a32 Revert 5c1cc4a40d84. I wasn't aware dashes in plugin directory names have been authorized at some point and we have a number of affected plugins now (please note personally I am opposed to putting dashes to Python package names). Fixes #32968. 2019-11-21 04:54:39 +10:00
Borys Jurgiel
5c1cc4a40d [Plugin installer] properly handle zip file names with a dash as a version suffix separator 2019-10-04 22:17:51 +02:00
Borys Jurgiel
1aa102815c [Plugin Installer] Only force http icon protocol for http-based repositories. Fixes #31783 2019-09-16 08:30:47 +02:00
Denis Rouzaud
1dc7b2f6ed
allow to follow redirect for custom plugin repo url (#30869) 2019-07-23 12:53:33 +02:00
Alessandro Pasotti
1622d73e25 [feature][needs-docs] Plugin dependencies
Implementation of QEP 132:

Manage python cross-plugins dependencies

A new optional metadata entry will be added to metadata.txt: plugin_dependencies
The metadata will contain a comma separated list of plugin names, with a format similar
of the one used by pip, with optional version.
After a successful plugin installation, if the plugin has any unsatisfied dependency,
a dialog will pop-up with the list of unmet dependencies and the user
will be able to choose if she wants to install or upgrade the
dependencies or ignore them.

Example metadata:

plugin_dependencies = QuickMapServices==0.19.10.1,QuickWKT

Funded by GISCE-TI S.L.
2019-03-15 17:40:42 +01:00
Mathieu Pellerin
3057fd61b0
[plugin manager] Dont disconnect overall finished signal 2019-03-09 18:45:30 +07:00
Nyall Dawson
ca06d407a0 Add custom QNetworkRequest::Attributes for initiator network request class name and internal id
And allow these to be retrieved from QgsNetworkRequestParameters.
This allows logging code to identify the area of code where a request
originated from, making debugging much easier!

Tag all requests created with appropriate class name and IDs
2019-01-25 23:47:05 +11:00
Chris Mayo
70a37bf981 Tidy installer_data.py and utils.py
- Fix unused and missing imports
- Only import configparser is needed for Python 3
- Unnecessary string u prefix for Python 3
- Comment typo
2018-09-06 05:56:09 +10:00
Chris Mayo
051e4d1c02 Mark a Python plugin without an __init__.py as broken
utils.findPlugins() checks for the existence of an __init__.py which
results in an attempt to enable a plugin without an __init__.py being
blocked with the only notification being a message in the Plugins log:

WARNING    Plugin "<name>" is not compatible with this version of QGIS.
             It will be disabled.

This is not very informative, especially because it is the same message
used for a metadata version mismatch.

Adding this check to Plugins.getInstalledPlugin(), which already
duplicates the metadata checks from utils.findPlugins(), results in the
plugin being marked as broken in the Plugins dialog.
2018-08-30 19:32:53 +01:00
Nyall Dawson
343872b719 Flip some code to use format 2018-05-22 06:02:55 +10:00
Nyall Dawson
3de7b383b0 Fix bad regex escaping 2018-05-22 06:02:55 +10:00
luz.paz
f01bff25ac Typos
Found via `codespell`
2018-05-08 09:33:07 +10:00
Denis Rouzaud
3dc3d9d1b2 unite QgsMessageLog::Level and QgsMessageBar::MessageLevel in Qgis::MessageLevel
make enum items lower case
remove unused QgsMessageLog::None and All
2018-02-06 08:56:40 -04:00
Borys Jurgiel
b43386605f [Plugin installer] Make QGIS x.99 only compatible with plugins for the next major release. Introduce 'pyQgisVersion' that usually sticks to QGIS_VERSION, but bumps up to the next release for all the .99 versions 2017-12-18 17:30:15 +01:00
Borys Jurgiel
7c01b7e647 [Plugin installer] Follow up 54f312fa7f5b1ff and temporarily hardcode plugin compatibility as 3.0 2017-12-18 14:58:35 +01:00
Borys Jurgiel
3da5ab6996 [Plugin installer] Properly handle 301 Redirection 2017-12-11 21:03:44 +01:00
Borys Jurgiel
4677026c3e
Merge pull request #5532 from borysiasty/nopreloading
[Plugin manager] [needs-doc] Don't preload all plugins for a test
2017-11-07 22:19:57 +01:00
Alessandro Pasotti
bb36fa7f48 [bugfix] Use QgsApplication.authManager()
instead of the old singleton
2017-11-07 08:57:27 +01:00
Borys Jurgiel
a8f46652d4 [Plugin manager] Remove dead code 2017-11-04 22:55:11 +01:00
Borys Jurgiel
cfec339c30 [Plugin manager] [needs-doc] Don't preload plugins for a test if they are broken. That function slowed down QGIS startup 2017-11-04 22:46:03 +01:00
Borys Jurgiel
fb7f8f17f7 [Plugin installer] Fix broken warning about outdated plugin updates in the user directory masking a newer core version 2017-11-03 19:12:44 +01:00
Borys Jurgiel
4b6228d81e Move plugin installer's settings to the [app] section 2017-11-02 09:15:34 +01:00