Fix the Qt6 port of NUT-Monitor: PyQt6 needs fully scoped enums, otherwise the
resource lookup raises AttributeError when not run from the source tree, and
the application identified itself with the Qt5 desktop file. Both are fixed in
upstream master by the shared NUT-Monitor-py3qt.in template.

Taken from Debian nut 2.8.5-1.

diff --git a/scripts/python/app/NUT-Monitor-py3qt6.in b/scripts/python/app/NUT-Monitor-py3qt6.in
index 40198ce..a8cec5b 100755
--- a/scripts/python/app/NUT-Monitor-py3qt6.in
+++ b/scripts/python/app/NUT-Monitor-py3qt6.in
@@ -136,7 +136,7 @@ class interface :
 
         self.__app = QApplication( argv )
         try:
-            self.__app.setDesktopFileName("nut-monitor-py3qt5")
+            self.__app.setDesktopFileName("nut-monitor-py3qt6")
         except Exception as ex:
             pass
 
diff --git a/scripts/python/app/NUT-Monitor-py3qt6.in b/scripts/python/app/NUT-Monitor-py3qt6.in
index a8cec5b..bcc7240 100755
--- a/scripts/python/app/NUT-Monitor-py3qt6.in
+++ b/scripts/python/app/NUT-Monitor-py3qt6.in
@@ -272,7 +272,7 @@ class interface :
         path = os.path.join( os.path.dirname( sys.argv[0] ), filename )
         if os.path.exists(path):
             return path
-        path = QStandardPaths.locate(QStandardPaths.AppDataLocation, filename)
+        path = QStandardPaths.locate(QStandardPaths.StandardLocation.AppDataLocation, filename)
         if os.path.exists(path):
             return path
         raise RuntimeError("Cannot find %s resource %s" % (ftype, filename))
@@ -290,14 +290,14 @@ class interface :
             return path
 
         # Normally icons should be installed to OS location by packaging:
-        path = QStandardPaths.locate(QStandardPaths.GenericDataLocation, os.path.join( "icons", "hicolor", "256x256", "apps", filename ) )
+        path = QStandardPaths.locate(QStandardPaths.StandardLocation.GenericDataLocation, os.path.join( "icons", "hicolor", "256x256", "apps", filename ) )
         if os.path.exists(path):
             return path
 
         # Fall back to NUT-specific area where `make install` might put them,
         # e.g. /usr/share/nut/nut-monitor/icons/... or some such, if not the
         # same location as checked in first attempt above:
-        path = QStandardPaths.locate(QStandardPaths.AppDataLocation, os.path.join( "icons", "hicolor", "256x256", "apps", filename ) )
+        path = QStandardPaths.locate(QStandardPaths.StandardLocation.AppDataLocation, os.path.join( "icons", "hicolor", "256x256", "apps", filename ) )
         if os.path.exists(path):
             return path
 
