Katana extra applications
Revision | 1a139f28fc953b01beaa4071d04f2709fb1138c3 (tree) |
---|---|
Time | 2022-12-26 01:16:30 |
Author | Ivailo Monev <xakepa10@gmai...> |
Commiter | Ivailo Monev |
kget: adjust to KHTTP changes
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
@@ -26,15 +26,6 @@ | ||
26 | 26 | #include <QDir> |
27 | 27 | #include <QDateTime> |
28 | 28 | |
29 | -// DO NOT TRANSLATE THE FOLLOWING MESSAGE! webserver messages are never translated. | |
30 | -static const QString s_notauthorized = QString::fromLatin1( | |
31 | - "<html><head><title>Authorization Required</title></head><body>" | |
32 | - "<h1>Authorization Required</h1>This server could not verify that you " | |
33 | - "are authorized to access the document requested. Either you supplied " | |
34 | - "the wrong credentials (e.g., bad password), or your browser does " | |
35 | - "not understand how to supply the credentials required.</body></html>" | |
36 | -); | |
37 | - | |
38 | 29 | HttpServer::HttpServer(QWidget *parent) |
39 | 30 | : KHTTP(parent), |
40 | 31 | m_passwdstore(nullptr) |
@@ -45,7 +36,7 @@ HttpServer::HttpServer(QWidget *parent) | ||
45 | 36 | if (m_passwdstore && m_passwdstore->openStore(parent->winId())) { |
46 | 37 | const QString usr = Settings::webinterfaceUser(); |
47 | 38 | const QString pwd = m_passwdstore->getPasswd("Webinterface", parent->winId()); |
48 | - if (!setAuthenticate(usr.toUtf8(), pwd.toUtf8(), s_notauthorized)) { | |
39 | + if (!setAuthenticate(usr.toUtf8(), pwd.toUtf8())) { | |
49 | 40 | KGet::showNotification(parent, |
50 | 41 | "error", i18nc("@info", "Unable to set the WebInterface authorization: %1", errorString()) |
51 | 42 | ); |
@@ -75,7 +66,7 @@ void HttpServer::settingsChanged() | ||
75 | 66 | const QString usr = Settings::webinterfaceUser(); |
76 | 67 | const QString pwd = m_passwdstore->getPasswd("Webinterface"); |
77 | 68 | stop(); |
78 | - if (!setAuthenticate(usr.toUtf8(), pwd.toUtf8(), s_notauthorized)) { | |
69 | + if (!setAuthenticate(usr.toUtf8(), pwd.toUtf8())) { | |
79 | 70 | KGet::showNotification( |
80 | 71 | parentwidget, |
81 | 72 | "error", i18nc("@info", "Unable to set the WebInterface authorization: %1", errorString()) |