Update userscripts to PyQt6

This commit is contained in:
Florian Bruhin 2023-06-27 20:58:17 +02:00
parent fb4e3722bb
commit 29dffd782d
3 changed files with 8 additions and 8 deletions

View File

@ -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(

View File

@ -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(

View File

@ -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)