mirror of
https://invent.kde.org/network/falkon.git
synced 2024-12-20 02:36:34 +01:00
CookieManager: Switch to QDialog
This fixes issue when Cookie Manager may have been opened under current window (eg. in Preferences)
This commit is contained in:
parent
768e3ac143
commit
021b90f7b3
@ -35,7 +35,6 @@
|
||||
#include "sqldatabase.h"
|
||||
#include "iconprovider.h"
|
||||
#include "browserwindow.h"
|
||||
#include "cookiemanager.h"
|
||||
#include "networkmanager.h"
|
||||
#include "checkboxdialog.h"
|
||||
#include "profilemanager.h"
|
||||
@ -88,7 +87,6 @@ MainApplication::MainApplication(int &argc, char** argv)
|
||||
, m_networkCache(0)
|
||||
, m_browsingLibrary(0)
|
||||
, m_rssManager(0)
|
||||
, m_cookieManager(0)
|
||||
, m_networkManager(0)
|
||||
, m_restoreManager(0)
|
||||
, m_downloadManager(0)
|
||||
@ -531,14 +529,6 @@ RSSManager* MainApplication::rssManager()
|
||||
return m_rssManager;
|
||||
}
|
||||
|
||||
CookieManager* MainApplication::cookieManager()
|
||||
{
|
||||
if (!m_cookieManager) {
|
||||
m_cookieManager = new CookieManager();
|
||||
}
|
||||
return m_cookieManager;
|
||||
}
|
||||
|
||||
NetworkManager* MainApplication::networkManager()
|
||||
{
|
||||
if (!m_networkManager) {
|
||||
|
@ -38,7 +38,6 @@ class AutoSaver;
|
||||
class RSSManager;
|
||||
class ProxyStyle;
|
||||
class PluginProxy;
|
||||
class CookieManager;
|
||||
class BrowserWindow;
|
||||
class NetworkManager;
|
||||
class BrowsingLibrary;
|
||||
@ -93,7 +92,6 @@ public:
|
||||
BrowsingLibrary* browsingLibrary();
|
||||
|
||||
RSSManager* rssManager();
|
||||
CookieManager* cookieManager();
|
||||
NetworkManager* networkManager();
|
||||
RestoreManager* restoreManager();
|
||||
DownloadManager* downloadManager();
|
||||
@ -158,7 +156,6 @@ private:
|
||||
BrowsingLibrary* m_browsingLibrary;
|
||||
|
||||
RSSManager* m_rssManager;
|
||||
CookieManager* m_cookieManager;
|
||||
NetworkManager* m_networkManager;
|
||||
RestoreManager* m_restoreManager;
|
||||
DownloadManager* m_downloadManager;
|
||||
|
@ -315,8 +315,8 @@ void MainMenu::showDownloadManager()
|
||||
|
||||
void MainMenu::showCookieManager()
|
||||
{
|
||||
CookieManager* m = mApp->cookieManager();
|
||||
m->refreshTable();
|
||||
CookieManager* m = new CookieManager(0);
|
||||
m->setAttribute(Qt::WA_DeleteOnClose);
|
||||
m->show();
|
||||
m->raise();
|
||||
}
|
||||
|
@ -33,7 +33,7 @@
|
||||
#include <QCloseEvent>
|
||||
|
||||
CookieManager::CookieManager(QWidget* parent)
|
||||
: QWidget(parent)
|
||||
: QDialog(parent)
|
||||
, ui(new Ui::CookieManager)
|
||||
, m_refreshCookieJar(true)
|
||||
{
|
||||
@ -87,6 +87,8 @@ CookieManager::CookieManager(QWidget* parent)
|
||||
connect(removeShortcut, SIGNAL(activated()), this, SLOT(deletePressed()));
|
||||
|
||||
QzTools::setWmClass("Cookies", this);
|
||||
|
||||
refreshTable();
|
||||
}
|
||||
|
||||
void CookieManager::removeAll()
|
||||
|
@ -18,7 +18,7 @@
|
||||
#ifndef COOKIEMANAGER_H
|
||||
#define COOKIEMANAGER_H
|
||||
|
||||
#include <QWidget>
|
||||
#include <QDialog>
|
||||
|
||||
#include "qzcommon.h"
|
||||
|
||||
@ -31,7 +31,7 @@ class QTreeWidgetItem;
|
||||
|
||||
class BrowserWindow;
|
||||
|
||||
class QUPZILLA_EXPORT CookieManager : public QWidget
|
||||
class QUPZILLA_EXPORT CookieManager : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>CookieManager</class>
|
||||
<widget class="QWidget" name="CookieManager">
|
||||
<widget class="QDialog" name="CookieManager">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
|
@ -185,12 +185,8 @@ void ClearPrivateData::optimizeDb()
|
||||
|
||||
void ClearPrivateData::showCookieManager()
|
||||
{
|
||||
CookieManager* m = mApp->cookieManager();
|
||||
m->refreshTable();
|
||||
|
||||
m->setWindowModality(Qt::WindowModal);
|
||||
m->show();
|
||||
m->raise();
|
||||
CookieManager m(this);
|
||||
m.exec();
|
||||
}
|
||||
|
||||
void ClearPrivateData::showNotifsPerms()
|
||||
|
@ -684,11 +684,8 @@ void Preferences::allowHtml5storageChanged(bool stat)
|
||||
|
||||
void Preferences::showCookieManager()
|
||||
{
|
||||
CookieManager* m = mApp->cookieManager();
|
||||
m->refreshTable();
|
||||
|
||||
m->show();
|
||||
m->raise();
|
||||
CookieManager m(this);
|
||||
m.exec();
|
||||
}
|
||||
|
||||
void Preferences::showHtml5Permissions()
|
||||
|
Loading…
Reference in New Issue
Block a user