• R/O
  • HTTP
  • SSH
  • HTTPS

kde-extraapps: Commit

Katana extra applications


Commit MetaInfo

Revision1a139f28fc953b01beaa4071d04f2709fb1138c3 (tree)
Time2022-12-26 01:16:30
AuthorIvailo Monev <xakepa10@gmai...>
CommiterIvailo Monev

Log Message

kget: adjust to KHTTP changes

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>

Change Summary

Incremental Difference

--- a/kget/extensions/webinterface/httpserver.cpp
+++ b/kget/extensions/webinterface/httpserver.cpp
@@ -26,15 +26,6 @@
2626 #include <QDir>
2727 #include <QDateTime>
2828
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-
3829 HttpServer::HttpServer(QWidget *parent)
3930 : KHTTP(parent),
4031 m_passwdstore(nullptr)
@@ -45,7 +36,7 @@ HttpServer::HttpServer(QWidget *parent)
4536 if (m_passwdstore && m_passwdstore->openStore(parent->winId())) {
4637 const QString usr = Settings::webinterfaceUser();
4738 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())) {
4940 KGet::showNotification(parent,
5041 "error", i18nc("@info", "Unable to set the WebInterface authorization: %1", errorString())
5142 );
@@ -75,7 +66,7 @@ void HttpServer::settingsChanged()
7566 const QString usr = Settings::webinterfaceUser();
7667 const QString pwd = m_passwdstore->getPasswd("Webinterface");
7768 stop();
78- if (!setAuthenticate(usr.toUtf8(), pwd.toUtf8(), s_notauthorized)) {
69+ if (!setAuthenticate(usr.toUtf8(), pwd.toUtf8())) {
7970 KGet::showNotification(
8071 parentwidget,
8172 "error", i18nc("@info", "Unable to set the WebInterface authorization: %1", errorString())
Show on old repository browser