mirror of
https://invent.kde.org/network/falkon.git
synced 2024-12-20 10:46:35 +01:00
parent
d5ea5342cf
commit
4a7423b02f
@ -21,6 +21,7 @@
|
||||
#include "adblocktreewidget.h"
|
||||
#include "adblockaddsubscriptiondialog.h"
|
||||
#include "mainapplication.h"
|
||||
#include "qztools.h"
|
||||
|
||||
#include <QMenu>
|
||||
#include <QTimer>
|
||||
@ -28,7 +29,7 @@
|
||||
#include <QInputDialog>
|
||||
|
||||
AdBlockDialog::AdBlockDialog(QWidget* parent)
|
||||
: QDialog(parent)
|
||||
: QWidget(parent)
|
||||
, m_manager(AdBlockManager::instance())
|
||||
, m_currentTreeWidget(0)
|
||||
, m_currentSubscription(0)
|
||||
@ -37,6 +38,9 @@ AdBlockDialog::AdBlockDialog(QWidget* parent)
|
||||
{
|
||||
setAttribute(Qt::WA_DeleteOnClose);
|
||||
setupUi(this);
|
||||
|
||||
QzTools::centerWidgetOnScreen(this);
|
||||
|
||||
#ifdef Q_OS_MAC
|
||||
tabWidget->setDocumentMode(false);
|
||||
#endif
|
||||
@ -193,5 +197,5 @@ void AdBlockDialog::closeEvent(QCloseEvent* ev)
|
||||
m_manager->setUseLimitedEasyList(useLimitedEasyList->isChecked());
|
||||
}
|
||||
|
||||
QDialog::closeEvent(ev);
|
||||
QWidget::closeEvent(ev);
|
||||
}
|
||||
|
@ -18,7 +18,7 @@
|
||||
#ifndef ADBLOCKDIALOG_H
|
||||
#define ADBLOCKDIALOG_H
|
||||
|
||||
#include <QDialog>
|
||||
#include <QWidget>
|
||||
|
||||
#include "qz_namespace.h"
|
||||
#include "ui_adblockdialog.h"
|
||||
@ -28,7 +28,7 @@ class AdBlockTreeWidget;
|
||||
class AdBlockManager;
|
||||
class AdBlockRule;
|
||||
|
||||
class QT_QUPZILLA_EXPORT AdBlockDialog : public QDialog, public Ui_AdBlockDialog
|
||||
class QT_QUPZILLA_EXPORT AdBlockDialog : public QWidget, public Ui_AdBlockDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>AdBlockDialog</class>
|
||||
<widget class="QDialog" name="AdBlockDialog">
|
||||
<widget class="QWidget" name="AdBlockDialog">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
@ -141,38 +141,6 @@
|
||||
<include location="../data/icons.qrc"/>
|
||||
</resources>
|
||||
<connections>
|
||||
<connection>
|
||||
<sender>buttonBox</sender>
|
||||
<signal>accepted()</signal>
|
||||
<receiver>AdBlockDialog</receiver>
|
||||
<slot>accept()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>75</x>
|
||||
<y>495</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>157</x>
|
||||
<y>274</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>buttonBox</sender>
|
||||
<signal>rejected()</signal>
|
||||
<receiver>AdBlockDialog</receiver>
|
||||
<slot>reject()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>75</x>
|
||||
<y>495</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>286</x>
|
||||
<y>274</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>adblockCheckBox</sender>
|
||||
<signal>toggled(bool)</signal>
|
||||
|
@ -413,10 +413,13 @@ AdBlockSubscription* AdBlockManager::subscriptionByName(const QString &name) con
|
||||
AdBlockDialog* AdBlockManager::showDialog()
|
||||
{
|
||||
if (!m_adBlockDialog) {
|
||||
m_adBlockDialog = new AdBlockDialog(mApp->getWindow());
|
||||
m_adBlockDialog = new AdBlockDialog;
|
||||
}
|
||||
|
||||
m_adBlockDialog.data()->show();
|
||||
m_adBlockDialog.data()->raise();
|
||||
m_adBlockDialog.data()->activateWindow();
|
||||
|
||||
return m_adBlockDialog.data();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user