Skip to content

Commit

Permalink
Merge pull request #8 from GeoWerkstatt/use-qgssettings
Browse files Browse the repository at this point in the history
Use QgsSettings instead of QSettings
  • Loading branch information
MiraGeowerkstatt authored Jun 10, 2022
2 parents ef5b701 + 85d25d3 commit ff25129
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions custom_news_feed/custom_news_feed.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
import os.path
import json

from qgis.PyQt.QtCore import QSettings, QTranslator, QCoreApplication, Qt, QTimer, QUrl
from qgis.PyQt.QtCore import QLocale, QTranslator, QCoreApplication, Qt, QTimer, QUrl
from qgis.PyQt.QtGui import QIcon, QPixmap, QImage
from qgis.PyQt.QtNetwork import QNetworkReply, QNetworkRequest
from qgis.core import Qgis, QgsMessageLog, QgsBlockingNetworkRequest, QgsSettings
Expand Down Expand Up @@ -58,7 +58,7 @@ def __init__(self, iface):
self.plugin_dir = os.path.dirname(__file__)

# Initialize locale
locale = QSettings().value('locale/userLocale')[0:2]
locale = self.settings.value('locale/userLocale', QLocale().name())[0:2]
locale_path = os.path.join(
self.plugin_dir,
'i18n',
Expand Down
2 changes: 1 addition & 1 deletion custom_news_feed/metadata.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name=Custom News Feed
qgisMinimumVersion=3.0
description=This plugin helps you display a newsfeed in QGIS.
about=This QGIS plugin lets you display a feed of articles containing a title, date, text, image and link. The information to display is managed in a JSON-file, that can be provided locally or via url. Custom News Feed plugin is helpful if you want to distriubte news articles organisation-wide.
version=1.0.1
version=1.0.2
author=GeoWerkstatt GmbH
[email protected]

Expand Down

0 comments on commit ff25129

Please sign in to comment.