Uploaded image for project: 'Qt for Python'
  1. Qt for Python
  2. PYSIDE-644

setCookie & deleteCookie functions missing from QWebEngineCookieStore

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • None
    • 5.9
    • PySide
    • c09502eaae9167b63f2b7e076b9872692ee03041 (pyside/pyside-setup/5.15)

    Description

      I built the current PySide2 5.9 branch (5.9.0a1 - built on Windows 10 via https://codereview.qt-project.org/pyside/pyside-setup) on 20 April 2018.

      I created a cookieStore for my profile:
      self.cookieStore = self.profile.cookieStore()

      And, then tried to add a cookie to it, for example:
      self.cookieStore.setCookie(someCookie, QtCore.QUrl(someUrl))

      But, for some reason my installation is missing the setCookie function:
      AttributeError: 'PySide2.QtWebEngineCore.QWebEngineCookieStore' object has no attribute 'setCookie'

      Looking at the mjb_rejected_function.log file in ./pyside2/pyside-setup/pyside3_build/py3.6-qt5.9.3-32bit-release/pyside2/PySide2/QtWebEngineCore/ generated at the time of the build, I notice:
       - void QWebEngineCookieStore::setCookie(QNetworkCookie const&,QUrl const&): unmatched type 'QNetworkCookie const&' in parameter #1 "cookie"

      Although this long log also lists functions such as:
       - void QWebEngineCookieStore::cookieAdded(QNetworkCookie const&): unmatched type 'QNetworkCookie const&' in parameter #1 "cookie"

      that are listed when I call:
      dir(PySide2.QtWebEngineCore.QWebEngineCookieStore)

      ['__class__', '__delattr__', '__dict__', '__dir__', '__doc__', '__eq__', '__format__', '__ge__', '__getattribute__', '__gt__', '__hash__', '__init__', '__init_subclass__', '__le__', '__lt__', '__ne__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__sizeof__', '__str__', '__subclasshook__', 'blockSignals', 'childEvent', 'children', 'connect', 'connectNotify', 'cookieAdded', 'cookieRemoved', 'customEvent', 'deleteAllCookies', 'deleteLater', 'deleteSessionCookies', 'destroyed', 'disconnect', 'disconnectNotify', 'dumpObjectInfo', 'dumpObjectTree', 'dynamicPropertyNames', 'emit', 'event', 'eventFilter', 'findChild', 'findChildren', 'inherits', 'installEventFilter', 'isSignalConnected', 'isWidgetType', 'isWindowType', 'killTimer', 'loadAllCookies', 'metaObject', 'moveToThread', 'objectName', 'objectNameChanged', 'parent', 'property', 'receivers', 'registerUserData', 'removeEventFilter', 'sender', 'senderSignalIndex', 'setObjectName', 'setParent', 'setProperty', 'signalsBlocked', 'startTimer', 'staticMetaObject', 'thread', 'timerEvent', 'tr']

      A comparison with https://doc.qt.io/qt-5/qwebenginecookiestore-members.html also reveals that the deleteCookie function is also missing.

      I'm afraid I'm not experienced enough to know if this is a general bug, or just related to my installation.

      Thanks.

      Attachments

        For Gerrit Dashboard: PYSIDE-644
        # Subject Branch Project Status CR V

        Activity

          People

            ctismer Christian Tismer
            esuyb Angus Melville
            Votes:
            2 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes