From 29dffd782df6fbb377599cffff1ffc69fd34ba26 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Tue, 27 Jun 2023 20:58:17 +0200 Subject: Update userscripts to PyQt6 --- misc/userscripts/add-nextcloud-bookmarks | 4 ++-- misc/userscripts/add-nextcloud-cookbook | 4 ++-- misc/userscripts/qute-keepass | 8 ++++---- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/misc/userscripts/add-nextcloud-bookmarks b/misc/userscripts/add-nextcloud-bookmarks index 86f4f5bc7..2a480ccff 100755 --- a/misc/userscripts/add-nextcloud-bookmarks +++ b/misc/userscripts/add-nextcloud-bookmarks @@ -41,7 +41,7 @@ from json import dumps from os import environ, path from sys import argv, exit -from PyQt5.QtWidgets import QApplication, QInputDialog, QLineEdit +from PyQt6.QtWidgets import QApplication, QInputDialog, QLineEdit from requests import get, post from requests.auth import HTTPBasicAuth @@ -54,7 +54,7 @@ def get_text(name, info): None, "add-nextcloud-bookmarks userscript", "Please enter {}".format(info), - QLineEdit.Password, + QLineEdit.EchoMode.Password, ) else: text, ok = QInputDialog.getText( diff --git a/misc/userscripts/add-nextcloud-cookbook b/misc/userscripts/add-nextcloud-cookbook index 3952bb16f..151090785 100755 --- a/misc/userscripts/add-nextcloud-cookbook +++ b/misc/userscripts/add-nextcloud-cookbook @@ -37,7 +37,7 @@ import configparser from os import environ, path from sys import argv, exit -from PyQt5.QtWidgets import QApplication, QInputDialog, QLineEdit +from PyQt6.QtWidgets import QApplication, QInputDialog, QLineEdit from requests import post from requests.auth import HTTPBasicAuth @@ -50,7 +50,7 @@ def get_text(name, info): None, "add-nextcloud-cookbook userscript", "Please enter {}".format(info), - QLineEdit.Password, + QLineEdit.EchoMode.Password, ) else: text, ok = QInputDialog.getText( diff --git a/misc/userscripts/qute-keepass b/misc/userscripts/qute-keepass index 285377ffc..f88493d8e 100755 --- a/misc/userscripts/qute-keepass +++ b/misc/userscripts/qute-keepass @@ -42,7 +42,7 @@ you do not do this, you will get 'element not editable' errors. If keepass takes a while to open the DB, you might want to consider reducing the number of transform rounds in your database settings. -Dependencies: pykeepass (in python3), PyQt5. Without pykeepass, you will get an +Dependencies: pykeepass (in python3), PyQt6. Without pykeepass, you will get an exit code of 100. ********************!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!****************** @@ -64,8 +64,8 @@ import shlex import subprocess import sys -from PyQt5.QtCore import QUrl -from PyQt5.QtWidgets import QApplication, QInputDialog, QLineEdit +from PyQt6.QtCore import QUrl +from PyQt6.QtWidgets import QApplication, QInputDialog, QLineEdit try: import pykeepass @@ -152,7 +152,7 @@ def get_password(): text, ok = QInputDialog.getText( None, "KeePass DB Password", "Please enter your KeePass Master Password", - QLineEdit.Password) + QLineEdit.EchoMode.Password) if not ok: stderr('Password Prompt Rejected.') sys.exit(ExitCodes.USER_QUIT) -- cgit v1.2.3-54-g00ecf