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