Something went wrong. Try again.
plyght's own C++ browser for macOS
Something went wrong. Try again.
1234567891011121314151617181920212223#pragma once
#include <QObject>#include <QString>
// Lightweight wrapper around a WKWebsiteDataStore (held opaquely as void *// so this header stays plain C++). Use `dataStore()` to retrieve the// underlying `WKWebsiteDataStore *` from .mm code.class WebKitProfile final : public QObject { Q_OBJECTpublic: explicit WebKitProfile(const QString &name, QObject *parent = nullptr); ~WebKitProfile() override;
QString name() const { return m_name; } // Returns a `WKWebsiteDataStore *`. Cast in .mm: (__bridge WKWebsiteDataStore *). void *dataStore() const { return m_dataStore; }
private: QString m_name; void *m_dataStore = nullptr; // CFRetain'd WKWebsiteDataStore};