mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-18 00:03:05 -04:00
[Plugin manager][needs-doc] Read a CHANGELOG file in case the relevant metadata key is empty
This commit is contained in:
parent
a843df8947
commit
4cde520248
@ -663,6 +663,12 @@ class Plugins(QObject):
|
||||
if QFileInfo(icon).isRelative():
|
||||
icon = path + "/" + icon
|
||||
|
||||
changelog = pluginMetadata("changelog")
|
||||
changelogFile = os.path.join(path, "CHANGELOG")
|
||||
if not changelog and QFile(changelogFile).exists():
|
||||
with open(changelogFile) as f:
|
||||
changelog = f.read()
|
||||
|
||||
plugin = {
|
||||
"id": key,
|
||||
"plugin_id": None,
|
||||
@ -672,7 +678,7 @@ class Plugins(QObject):
|
||||
"icon": icon,
|
||||
"category": pluginMetadata("category"),
|
||||
"tags": pluginMetadata("tags"),
|
||||
"changelog": pluginMetadata("changelog"),
|
||||
"changelog": changelog,
|
||||
"author_name": pluginMetadata("author_name") or pluginMetadata("author"),
|
||||
"author_email": pluginMetadata("email"),
|
||||
"homepage": pluginMetadata("homepage"),
|
||||
|
Loading…
x
Reference in New Issue
Block a user