Skip to content
  • Stefano Crocco's avatar
    Add back KWallet support to Konqueror · 56ea2a32
    Stefano Crocco authored
    Summary:
    Added back the ability to store user names and passwords to KWallet and automatically fill them when loading a page.
    
    I copied the files `kwebwallet.cpp` and `kwebwallet.h` from the `KDEWebKit` framework and modified it to adapt to `QWebEngine`. In particular, I needed to modify the way form data is passed from javascript to C++ serializing it using JSON and read it back using `QJsonDocument`. Also, since `QWebEnginePage` doesn't allow to access frames from the C++ side, I needed to remove all the code dealing with recurisve searches and implement it in javascript.
    
    As the old code, this intentionally doesn't work with input elements with the `autocomplete` attribute set to `false`.
    
    I've not modified the copyright information in the files I copied from `KDEWebKit` as I don't know which is the correct way to do so: I must make clear my files are based on the work on other people but at the same time that I've changed them: how do I do this?
    
    Test Plan: I tried to access several sites requiring a login in, asking Konqueror to save the password, then logging out and visiting the page again. Except when the `autocomplete` attribute was `false` (checked by looking at the html code), Konqueror always saved and restored login information correctly.
    
    Reviewers: dfaure
    
    Reviewed By: dfaure
    
    Differential Revision: https://phabricator.kde.org/D10178
    56ea2a32