mirror of
https://invent.kde.org/network/falkon.git
synced 2024-11-11 09:32:12 +01:00
Improved Saving Passwords
It is now saving webview's url, not url of request (used to have problems on some pages) And addition small improvements - added possibility to open rss feed in new tab with middle click - middle click on home button loads homepage in new tab - right click on back/next buttons now show menu instantly (instead of holding left mouse button to get menu shown)
This commit is contained in:
parent
3edeb2464f
commit
627fcd1d7b
Binary file not shown.
|
@ -58,6 +58,8 @@
|
||||||
#include "pagescreen.h"
|
#include "pagescreen.h"
|
||||||
#include "webinspectordockwidget.h"
|
#include "webinspectordockwidget.h"
|
||||||
#include "bookmarksimportdialog.h"
|
#include "bookmarksimportdialog.h"
|
||||||
|
#include "globalfunctions.h"
|
||||||
|
|
||||||
|
|
||||||
const QString QupZilla::VERSION = "1.0.0-rc1";
|
const QString QupZilla::VERSION = "1.0.0-rc1";
|
||||||
const QString QupZilla::BUILDTIME = __DATE__" "__TIME__;
|
const QString QupZilla::BUILDTIME = __DATE__" "__TIME__;
|
||||||
|
@ -748,6 +750,16 @@ void QupZilla::bookmarkAllTabs()
|
||||||
mApp->browsingLibrary()->bookmarksManager()->insertAllTabs();
|
mApp->browsingLibrary()->bookmarksManager()->insertAllTabs();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void QupZilla::goHome()
|
||||||
|
{
|
||||||
|
loadAddress(m_homepage);
|
||||||
|
}
|
||||||
|
|
||||||
|
void QupZilla::goHomeInNewTab()
|
||||||
|
{
|
||||||
|
m_tabWidget->addView(m_homepage, tr("New tab"), TabWidget::NewSelectedTab);
|
||||||
|
}
|
||||||
|
|
||||||
void QupZilla::loadActionUrl()
|
void QupZilla::loadActionUrl()
|
||||||
{
|
{
|
||||||
if (QAction* action = qobject_cast<QAction*>(sender())) {
|
if (QAction* action = qobject_cast<QAction*>(sender())) {
|
||||||
|
@ -818,6 +830,7 @@ void QupZilla::showPreferences()
|
||||||
void QupZilla::showSource(const QString &selectedHtml)
|
void QupZilla::showSource(const QString &selectedHtml)
|
||||||
{
|
{
|
||||||
SourceViewer* source = new SourceViewer(weView()->page(), selectedHtml);
|
SourceViewer* source = new SourceViewer(weView()->page(), selectedHtml);
|
||||||
|
qz_centerWidgetToParent(source, this);
|
||||||
source->show();
|
source->show();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1044,7 +1057,7 @@ void QupZilla::printPage()
|
||||||
|
|
||||||
void QupZilla::savePageScreen()
|
void QupZilla::savePageScreen()
|
||||||
{
|
{
|
||||||
PageScreen* p = new PageScreen(weView());
|
PageScreen* p = new PageScreen(weView(), this);
|
||||||
p->show();
|
p->show();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -129,7 +129,8 @@ private slots:
|
||||||
void postLaunch();
|
void postLaunch();
|
||||||
void goNext() { weView()->forward(); }
|
void goNext() { weView()->forward(); }
|
||||||
void goBack() { weView()->back(); }
|
void goBack() { weView()->back(); }
|
||||||
void goHome() { loadAddress(m_homepage); }
|
void goHome();
|
||||||
|
void goHomeInNewTab();
|
||||||
void stop() { weView()->stop(); }
|
void stop() { weView()->stop(); }
|
||||||
void reload() { weView()->reload(); }
|
void reload() { weView()->reload(); }
|
||||||
void reloadByPassCache() { weView()->page()->triggerAction(QWebPage::ReloadAndBypassCache); }
|
void reloadByPassCache() { weView()->page()->triggerAction(QWebPage::ReloadAndBypassCache); }
|
||||||
|
|
|
@ -201,7 +201,6 @@ void AutoFillModel::post(const QNetworkRequest &request, const QByteArray &outgo
|
||||||
if (!outgoingData.contains((QUrl(passwordName).toEncoded() + "=")) || passwordValue.isEmpty())
|
if (!outgoingData.contains((QUrl(passwordName).toEncoded() + "=")) || passwordValue.isEmpty())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
AutoFillNotification* aWidget = new AutoFillNotification(request.url(), outgoingData, passwordValue);
|
AutoFillNotification* aWidget = new AutoFillNotification(webView->url(), outgoingData, passwordValue);
|
||||||
webView->addNotification(aWidget);
|
webView->addNotification(aWidget);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,10 +22,13 @@
|
||||||
#include "mainapplication.h"
|
#include "mainapplication.h"
|
||||||
#include "globalfunctions.h"
|
#include "globalfunctions.h"
|
||||||
|
|
||||||
CookieManager::CookieManager(QWidget* parent) :
|
CookieManager::CookieManager(QWidget* parent)
|
||||||
QWidget(parent)
|
: QWidget(parent)
|
||||||
,ui(new Ui::CookieManager)
|
, ui(new Ui::CookieManager)
|
||||||
{
|
{
|
||||||
|
setAttribute(Qt::WA_DeleteOnClose);
|
||||||
|
setWindowModality(Qt::WindowModal);
|
||||||
|
|
||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
qz_centerWidgetOnScreen(this);
|
qz_centerWidgetOnScreen(this);
|
||||||
|
|
||||||
|
|
|
@ -22,8 +22,8 @@
|
||||||
|
|
||||||
HistoryModel::HistoryModel(QupZilla* mainClass, QObject* parent)
|
HistoryModel::HistoryModel(QupZilla* mainClass, QObject* parent)
|
||||||
: QObject(parent)
|
: QObject(parent)
|
||||||
,m_isSaving(true)
|
, m_isSaving(true)
|
||||||
,p_QupZilla(mainClass)
|
, p_QupZilla(mainClass)
|
||||||
{
|
{
|
||||||
loadSettings();
|
loadSettings();
|
||||||
}
|
}
|
||||||
|
|
|
@ -107,6 +107,7 @@ NavigationBar::NavigationBar(QupZilla *mainClass, QWidget *parent)
|
||||||
connect(m_reloadStop->buttonStop(), SIGNAL(clicked()), p_QupZilla, SLOT(stop()));
|
connect(m_reloadStop->buttonStop(), SIGNAL(clicked()), p_QupZilla, SLOT(stop()));
|
||||||
connect(m_reloadStop->buttonReload(), SIGNAL(clicked()), p_QupZilla, SLOT(reload()));
|
connect(m_reloadStop->buttonReload(), SIGNAL(clicked()), p_QupZilla, SLOT(reload()));
|
||||||
connect(m_buttonHome, SIGNAL(clicked()), p_QupZilla, SLOT(goHome()));
|
connect(m_buttonHome, SIGNAL(clicked()), p_QupZilla, SLOT(goHome()));
|
||||||
|
connect(m_buttonHome, SIGNAL(middleMouseClicked()), p_QupZilla, SLOT(goHomeInNewTab()));
|
||||||
connect(m_buttonAddTab, SIGNAL(clicked()), p_QupZilla, SLOT(addTab()));
|
connect(m_buttonAddTab, SIGNAL(clicked()), p_QupZilla, SLOT(addTab()));
|
||||||
connect(m_exitFullscreen, SIGNAL(clicked(bool)), p_QupZilla, SLOT(fullScreen(bool)));
|
connect(m_exitFullscreen, SIGNAL(clicked(bool)), p_QupZilla, SLOT(fullScreen(bool)));
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,17 +24,19 @@
|
||||||
#include "ui_clearprivatedata.h"
|
#include "ui_clearprivatedata.h"
|
||||||
#include "iconprovider.h"
|
#include "iconprovider.h"
|
||||||
|
|
||||||
ClearPrivateData::ClearPrivateData(QupZilla* mainClass, QWidget* parent) :
|
ClearPrivateData::ClearPrivateData(QupZilla* mainClass, QWidget* parent)
|
||||||
QDialog(parent)
|
: QDialog(parent)
|
||||||
,p_QupZilla(mainClass)
|
, p_QupZilla(mainClass)
|
||||||
,ui(new Ui::ClearPrivateData)
|
, ui(new Ui::ClearPrivateData)
|
||||||
{
|
{
|
||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
ui->buttonBox->setFocus();
|
ui->buttonBox->setFocus();
|
||||||
connect(ui->clearAdobeCookies, SIGNAL(clicked(QPoint)), this, SLOT(clearFlash()));
|
connect(ui->clearAdobeCookies, SIGNAL(clicked(QPoint)), this, SLOT(clearFlash()));
|
||||||
connect(ui->history, SIGNAL(clicked(bool)), this, SLOT(historyClicked(bool)));
|
connect(ui->history, SIGNAL(clicked(bool)), this, SLOT(historyClicked(bool)));
|
||||||
connect(ui->buttonBox, SIGNAL(accepted()), this, SLOT(dialogAccepted()));
|
connect(ui->buttonBox, SIGNAL(accepted()), this, SLOT(dialogAccepted()));
|
||||||
resize(sizeHint());
|
|
||||||
|
//Resizing +2 of sizeHint to get visible underlined link
|
||||||
|
resize(sizeHint().width(), sizeHint().height() + 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ClearPrivateData::historyClicked(bool state)
|
void ClearPrivateData::historyClicked(bool state)
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>308</width>
|
<width>308</width>
|
||||||
<height>243</height>
|
<height>260</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
|
|
|
@ -20,14 +20,13 @@
|
||||||
#include "webview.h"
|
#include "webview.h"
|
||||||
#include "globalfunctions.h"
|
#include "globalfunctions.h"
|
||||||
|
|
||||||
PageScreen::PageScreen(WebView *view)
|
PageScreen::PageScreen(WebView* view, QWidget* parent)
|
||||||
: QWidget()
|
: QDialog(parent)
|
||||||
, ui(new Ui::PageScreen)
|
, ui(new Ui::PageScreen)
|
||||||
, m_view(view)
|
, m_view(view)
|
||||||
{
|
{
|
||||||
setAttribute(Qt::WA_DeleteOnClose);
|
setAttribute(Qt::WA_DeleteOnClose);
|
||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
qz_centerWidgetOnScreen(this);
|
|
||||||
|
|
||||||
createPixmap();
|
createPixmap();
|
||||||
ui->label->setPixmap(m_pagePixmap);
|
ui->label->setPixmap(m_pagePixmap);
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
#ifndef PAGESCREEN_H
|
#ifndef PAGESCREEN_H
|
||||||
#define PAGESCREEN_H
|
#define PAGESCREEN_H
|
||||||
|
|
||||||
#include <QWidget>
|
#include <QDialog>
|
||||||
#include <QWebFrame>
|
#include <QWebFrame>
|
||||||
#include <QDialogButtonBox>
|
#include <QDialogButtonBox>
|
||||||
#include <QAbstractButton>
|
#include <QAbstractButton>
|
||||||
|
@ -29,12 +29,12 @@ namespace Ui {
|
||||||
}
|
}
|
||||||
|
|
||||||
class WebView;
|
class WebView;
|
||||||
class PageScreen : public QWidget
|
class PageScreen : public QDialog
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit PageScreen(WebView* view);
|
explicit PageScreen(WebView* view, QWidget* parent);
|
||||||
~PageScreen();
|
~PageScreen();
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
|
|
|
@ -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>PageScreen</class>
|
<class>PageScreen</class>
|
||||||
<widget class="QWidget" name="PageScreen">
|
<widget class="QDialog" name="PageScreen">
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
|
|
|
@ -18,15 +18,17 @@
|
||||||
#include "autofillmanager.h"
|
#include "autofillmanager.h"
|
||||||
#include "ui_autofillmanager.h"
|
#include "ui_autofillmanager.h"
|
||||||
|
|
||||||
AutoFillManager::AutoFillManager(QWidget* parent) :
|
AutoFillManager::AutoFillManager(QWidget* parent)
|
||||||
QDialog(parent),
|
: QWidget(parent)
|
||||||
ui(new Ui::AutoFillManager)
|
, ui(new Ui::AutoFillManager)
|
||||||
|
, m_passwordsShown(false)
|
||||||
{
|
{
|
||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
|
|
||||||
connect(ui->removePass, SIGNAL(clicked()), this, SLOT(removePass()));
|
connect(ui->removePass, SIGNAL(clicked()), this, SLOT(removePass()));
|
||||||
connect(ui->removeAllPass, SIGNAL(clicked()), this, SLOT(removeAllPass()));
|
connect(ui->removeAllPass, SIGNAL(clicked()), this, SLOT(removeAllPass()));
|
||||||
connect(ui->editPass, SIGNAL(clicked()), this, SLOT(editPass()));
|
connect(ui->editPass, SIGNAL(clicked()), this, SLOT(editPass()));
|
||||||
|
connect(ui->showPasswords, SIGNAL(clicked()), this, SLOT(showPasswords()));
|
||||||
|
|
||||||
connect(ui->removeExcept, SIGNAL(clicked()), this, SLOT(removeExcept()));
|
connect(ui->removeExcept, SIGNAL(clicked()), this, SLOT(removeExcept()));
|
||||||
connect(ui->removeAllExcept, SIGNAL(clicked()), this, SLOT(removeAllExcept()));
|
connect(ui->removeAllExcept, SIGNAL(clicked()), this, SLOT(removeAllExcept()));
|
||||||
|
@ -42,8 +44,10 @@ void AutoFillManager::loadPasswords()
|
||||||
while(query.next()) {
|
while(query.next()) {
|
||||||
QTreeWidgetItem* item = new QTreeWidgetItem(ui->treePass);
|
QTreeWidgetItem* item = new QTreeWidgetItem(ui->treePass);
|
||||||
item->setText(0, query.value(0).toString());
|
item->setText(0, query.value(0).toString());
|
||||||
item->setText(1, query.value(1).toString());
|
// item->setText(1, query.value(1).toString());
|
||||||
item->setWhatsThis(1, query.value(2).toString());
|
item->setText(1, "*****");
|
||||||
|
item->setWhatsThis(0, query.value(2).toString());
|
||||||
|
item->setWhatsThis(1, query.value(1).toString());
|
||||||
ui->treePass->addTopLevelItem(item);
|
ui->treePass->addTopLevelItem(item);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -57,15 +61,38 @@ void AutoFillManager::loadPasswords()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void AutoFillManager::showPasswords()
|
||||||
|
{
|
||||||
|
if (m_passwordsShown)
|
||||||
|
return;
|
||||||
|
m_passwordsShown = true;
|
||||||
|
|
||||||
|
int result = QMessageBox::question(this, tr("Show Passwords"), tr("Are you sure that you want to show all passwords?"),
|
||||||
|
QMessageBox::Yes | QMessageBox::No, QMessageBox::No);
|
||||||
|
if (result != QMessageBox::Yes)
|
||||||
|
return;
|
||||||
|
|
||||||
|
for (int i = 0; i < ui->treePass->topLevelItemCount(); i++) {
|
||||||
|
QTreeWidgetItem* item = ui->treePass->topLevelItem(i);
|
||||||
|
if (!item)
|
||||||
|
continue;
|
||||||
|
item->setText(1, item->whatsThis(1));
|
||||||
|
}
|
||||||
|
|
||||||
|
ui->showPasswords->hide();
|
||||||
|
delete ui->showPasswordsLayout;
|
||||||
|
}
|
||||||
|
|
||||||
void AutoFillManager::removePass()
|
void AutoFillManager::removePass()
|
||||||
{
|
{
|
||||||
QTreeWidgetItem* curItem = ui->treePass->currentItem();
|
QTreeWidgetItem* curItem = ui->treePass->currentItem();
|
||||||
if (!curItem)
|
if (!curItem)
|
||||||
return;
|
return;
|
||||||
QString id = curItem->whatsThis(1);
|
QString id = curItem->whatsThis(0);
|
||||||
QSqlQuery query;
|
QSqlQuery query;
|
||||||
query.exec("DELETE FROM autofill WHERE id="+id);
|
query.exec("DELETE FROM autofill WHERE id="+id);
|
||||||
loadPasswords();
|
|
||||||
|
delete curItem;
|
||||||
}
|
}
|
||||||
|
|
||||||
void AutoFillManager::removeAllPass()
|
void AutoFillManager::removeAllPass()
|
||||||
|
@ -77,7 +104,8 @@ void AutoFillManager::removeAllPass()
|
||||||
|
|
||||||
QSqlQuery query;
|
QSqlQuery query;
|
||||||
query.exec("DELETE FROM autofill");
|
query.exec("DELETE FROM autofill");
|
||||||
loadPasswords();
|
|
||||||
|
ui->treePass->clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
void AutoFillManager::editPass()
|
void AutoFillManager::editPass()
|
||||||
|
@ -86,12 +114,28 @@ void AutoFillManager::editPass()
|
||||||
if (!curItem)
|
if (!curItem)
|
||||||
return;
|
return;
|
||||||
bool ok;
|
bool ok;
|
||||||
QString text = QInputDialog::getText(this, tr("Edit password"), tr("Change password:"), QLineEdit::Normal, curItem->text(1), &ok);
|
QString text = QInputDialog::getText(this, tr("Edit password"), tr("Change password:"), QLineEdit::Normal, curItem->whatsThis(1), &ok);
|
||||||
|
|
||||||
if (ok && !text.isEmpty()) {
|
if (ok && !text.isEmpty()) {
|
||||||
QSqlQuery query;
|
QSqlQuery query;
|
||||||
query.exec("UPDATE autofill SET password='"+text+"' WHERE id="+curItem->whatsThis(1));
|
query.prepare("SELECT data, password FROM autofill WHERE id=?");
|
||||||
loadPasswords();
|
query.addBindValue(curItem->whatsThis(0));
|
||||||
|
query.exec();
|
||||||
|
query.next();
|
||||||
|
|
||||||
|
QString data = query.value(0).toString();
|
||||||
|
QString oldPass = "=" + query.value(1).toString();
|
||||||
|
data.replace(oldPass, "=" + text);
|
||||||
|
|
||||||
|
query.prepare("UPDATE autofill SET data=?, password=? WHERE id=?");
|
||||||
|
query.bindValue(0, data);
|
||||||
|
query.bindValue(1, text);
|
||||||
|
query.bindValue(2, curItem->whatsThis(0));
|
||||||
|
query.exec();
|
||||||
|
|
||||||
|
if (m_passwordsShown)
|
||||||
|
curItem->setText(1, text);
|
||||||
|
curItem->setWhatsThis(1, text);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -103,14 +147,16 @@ void AutoFillManager::removeExcept()
|
||||||
QString id = curItem->whatsThis(0);
|
QString id = curItem->whatsThis(0);
|
||||||
QSqlQuery query;
|
QSqlQuery query;
|
||||||
query.exec("DELETE FROM autofill_exceptions WHERE id="+id);
|
query.exec("DELETE FROM autofill_exceptions WHERE id="+id);
|
||||||
loadPasswords();
|
|
||||||
|
delete curItem;
|
||||||
}
|
}
|
||||||
|
|
||||||
void AutoFillManager::removeAllExcept()
|
void AutoFillManager::removeAllExcept()
|
||||||
{
|
{
|
||||||
QSqlQuery query;
|
QSqlQuery query;
|
||||||
query.exec("DELETE FROM autofill_exceptions");
|
query.exec("DELETE FROM autofill_exceptions");
|
||||||
loadPasswords();
|
|
||||||
|
ui->treeExcept->clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
void AutoFillManager::showExceptions()
|
void AutoFillManager::showExceptions()
|
||||||
|
|
|
@ -19,8 +19,8 @@
|
||||||
#define AUTOFILLMANAGER_H
|
#define AUTOFILLMANAGER_H
|
||||||
|
|
||||||
#include <QWidget>
|
#include <QWidget>
|
||||||
#include <QDialog>
|
|
||||||
#include <QTimer>
|
#include <QTimer>
|
||||||
|
#include <QtSql/QSqlDatabase>
|
||||||
#include <QSqlQuery>
|
#include <QSqlQuery>
|
||||||
#include <QTreeWidgetItem>
|
#include <QTreeWidgetItem>
|
||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
|
@ -31,7 +31,7 @@ namespace Ui {
|
||||||
class AutoFillManager;
|
class AutoFillManager;
|
||||||
}
|
}
|
||||||
|
|
||||||
class AutoFillManager : public QDialog
|
class AutoFillManager : public QWidget
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
|
@ -47,12 +47,15 @@ private slots:
|
||||||
void removePass();
|
void removePass();
|
||||||
void removeAllPass();
|
void removeAllPass();
|
||||||
void editPass();
|
void editPass();
|
||||||
|
void showPasswords();
|
||||||
|
|
||||||
void removeExcept();
|
void removeExcept();
|
||||||
void removeAllExcept();
|
void removeAllExcept();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Ui::AutoFillManager* ui;
|
Ui::AutoFillManager* ui;
|
||||||
|
|
||||||
|
bool m_passwordsShown;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // AUTOFILLMANAGER_H
|
#endif // AUTOFILLMANAGER_H
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<ui version="4.0">
|
<ui version="4.0">
|
||||||
<class>AutoFillManager</class>
|
<class>AutoFillManager</class>
|
||||||
<widget class="QDialog" name="AutoFillManager">
|
<widget class="QWidget" name="AutoFillManager">
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>524</width>
|
<width>537</width>
|
||||||
<height>412</height>
|
<height>348</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
|
@ -26,11 +26,11 @@
|
||||||
<attribute name="title">
|
<attribute name="title">
|
||||||
<string>Passwords</string>
|
<string>Passwords</string>
|
||||||
</attribute>
|
</attribute>
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
<layout class="QGridLayout" name="gridLayout">
|
||||||
<item>
|
<item row="0" column="0">
|
||||||
<widget class="QTreeWidget" name="treePass">
|
<widget class="QTreeWidget" name="treePass">
|
||||||
<attribute name="headerDefaultSectionSize">
|
<attribute name="headerMinimumSectionSize">
|
||||||
<number>200</number>
|
<number>180</number>
|
||||||
</attribute>
|
</attribute>
|
||||||
<column>
|
<column>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
|
@ -44,7 +44,7 @@
|
||||||
</column>
|
</column>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item row="0" column="1">
|
||||||
<layout class="QVBoxLayout" name="verticalLayout">
|
<layout class="QVBoxLayout" name="verticalLayout">
|
||||||
<item>
|
<item>
|
||||||
<widget class="QPushButton" name="removePass">
|
<widget class="QPushButton" name="removePass">
|
||||||
|
@ -82,6 +82,30 @@
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
|
<item row="1" column="0" colspan="2">
|
||||||
|
<layout class="QHBoxLayout" name="showPasswordsLayout">
|
||||||
|
<item>
|
||||||
|
<spacer name="horizontalSpacer">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>40</width>
|
||||||
|
<height>20</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QPushButton" name="showPasswords">
|
||||||
|
<property name="text">
|
||||||
|
<string>Show Passwords</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QWidget" name="tabExcept">
|
<widget class="QWidget" name="tabExcept">
|
||||||
|
|
|
@ -37,6 +37,7 @@
|
||||||
#include "navigationbar.h"
|
#include "navigationbar.h"
|
||||||
#include "thememanager.h"
|
#include "thememanager.h"
|
||||||
#include "acceptlanguage.h"
|
#include "acceptlanguage.h"
|
||||||
|
#include "globalfunctions.h"
|
||||||
|
|
||||||
bool removeFile(const QString &fullFileName)
|
bool removeFile(const QString &fullFileName)
|
||||||
{
|
{
|
||||||
|
@ -425,15 +426,13 @@ void Preferences::showCookieManager()
|
||||||
{
|
{
|
||||||
CookieManager* m = new CookieManager();
|
CookieManager* m = new CookieManager();
|
||||||
m->refreshTable();
|
m->refreshTable();
|
||||||
m->setAttribute(Qt::WA_DeleteOnClose);
|
|
||||||
m->setWindowModality(Qt::WindowModal);
|
|
||||||
m->show();
|
m->show();
|
||||||
}
|
}
|
||||||
|
|
||||||
void Preferences::openSslManager()
|
void Preferences::openSslManager()
|
||||||
{
|
{
|
||||||
SSLManager* m = new SSLManager();
|
SSLManager* m = new SSLManager(this);
|
||||||
m->setWindowModality(Qt::WindowModal);
|
// qz_centerWidgetToParent(m, this);
|
||||||
m->show();
|
m->show();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -23,12 +23,12 @@
|
||||||
#include "certificateinfowidget.h"
|
#include "certificateinfowidget.h"
|
||||||
|
|
||||||
SSLManager::SSLManager(QWidget* parent)
|
SSLManager::SSLManager(QWidget* parent)
|
||||||
: QWidget(parent)
|
: QDialog(parent)
|
||||||
, ui(new Ui::SSLManager)
|
, ui(new Ui::SSLManager)
|
||||||
{
|
{
|
||||||
|
// setWindowModality(Qt::WindowModal);
|
||||||
setAttribute(Qt::WA_DeleteOnClose);
|
setAttribute(Qt::WA_DeleteOnClose);
|
||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
qz_centerWidgetOnScreen(this);
|
|
||||||
|
|
||||||
refreshLocalList();
|
refreshLocalList();
|
||||||
refreshCAList();
|
refreshCAList();
|
||||||
|
@ -126,7 +126,7 @@ void SSLManager::showLocalCertInfo()
|
||||||
|
|
||||||
void SSLManager::showCertificateInfo(const QSslCertificate &cert)
|
void SSLManager::showCertificateInfo(const QSslCertificate &cert)
|
||||||
{
|
{
|
||||||
QWidget* w = new QWidget();
|
QDialog* w = new QDialog(this);
|
||||||
w->setAttribute(Qt::WA_DeleteOnClose);
|
w->setAttribute(Qt::WA_DeleteOnClose);
|
||||||
w->setWindowTitle(tr("Certificate Informations"));
|
w->setWindowTitle(tr("Certificate Informations"));
|
||||||
w->setLayout(new QVBoxLayout);
|
w->setLayout(new QVBoxLayout);
|
||||||
|
@ -137,7 +137,7 @@ void SSLManager::showCertificateInfo(const QSslCertificate &cert)
|
||||||
connect(b, SIGNAL(clicked(QAbstractButton*)), w, SLOT(close()));
|
connect(b, SIGNAL(clicked(QAbstractButton*)), w, SLOT(close()));
|
||||||
w->layout()->addWidget(b);
|
w->layout()->addWidget(b);
|
||||||
w->resize(w->sizeHint());
|
w->resize(w->sizeHint());
|
||||||
qz_centerWidgetOnScreen(w);
|
qz_centerWidgetToParent(w, this);
|
||||||
w->show();
|
w->show();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
#ifndef SSLMANAGER_H
|
#ifndef SSLMANAGER_H
|
||||||
#define SSLMANAGER_H
|
#define SSLMANAGER_H
|
||||||
|
|
||||||
#include <QWidget>
|
#include <QDialog>
|
||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
#include <QMessageBox>
|
#include <QMessageBox>
|
||||||
#include <QSslCertificate>
|
#include <QSslCertificate>
|
||||||
|
@ -31,7 +31,7 @@ namespace Ui {
|
||||||
class SSLManager;
|
class SSLManager;
|
||||||
}
|
}
|
||||||
|
|
||||||
class SSLManager : public QWidget
|
class SSLManager : 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>SSLManager</class>
|
<class>SSLManager</class>
|
||||||
<widget class="QWidget" name="SSLManager">
|
<widget class="QDialog" name="SSLManager">
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
|
|
|
@ -25,10 +25,10 @@
|
||||||
#include "browsinglibrary.h"
|
#include "browsinglibrary.h"
|
||||||
#include "globalfunctions.h"
|
#include "globalfunctions.h"
|
||||||
|
|
||||||
RSSManager::RSSManager(QupZilla* mainClass, QWidget* parent) :
|
RSSManager::RSSManager(QupZilla* mainClass, QWidget* parent)
|
||||||
QWidget(parent)
|
: QWidget(parent)
|
||||||
,ui(new Ui::RSSManager)
|
, ui(new Ui::RSSManager)
|
||||||
,p_QupZilla(mainClass)
|
, p_QupZilla(mainClass)
|
||||||
{
|
{
|
||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
qz_centerWidgetOnScreen(this);
|
qz_centerWidgetOnScreen(this);
|
||||||
|
@ -73,6 +73,7 @@ void RSSManager::refreshTable()
|
||||||
ui->tabWidget->addTab(tree, title);
|
ui->tabWidget->addTab(tree, title);
|
||||||
ui->tabWidget->setTabToolTip(i, address.toString());
|
ui->tabWidget->setTabToolTip(i, address.toString());
|
||||||
connect(tree, SIGNAL(itemDoubleClicked(QTreeWidgetItem*,int)), this, SLOT(loadFeed(QTreeWidgetItem*)));
|
connect(tree, SIGNAL(itemDoubleClicked(QTreeWidgetItem*,int)), this, SLOT(loadFeed(QTreeWidgetItem*)));
|
||||||
|
connect(tree, SIGNAL(itemMiddleButtonClicked(QTreeWidgetItem*)), this, SLOT(controlLoadFeed(QTreeWidgetItem*)));
|
||||||
connect(tree, SIGNAL(itemControlClicked(QTreeWidgetItem*)), this, SLOT(controlLoadFeed(QTreeWidgetItem*)));
|
connect(tree, SIGNAL(itemControlClicked(QTreeWidgetItem*)), this, SLOT(controlLoadFeed(QTreeWidgetItem*)));
|
||||||
QTreeWidgetItem* item = new QTreeWidgetItem();
|
QTreeWidgetItem* item = new QTreeWidgetItem();
|
||||||
item->setText(0, tr("Loading..."));
|
item->setText(0, tr("Loading..."));
|
||||||
|
|
|
@ -45,6 +45,21 @@ void qz_centerWidgetOnScreen(QWidget *w)
|
||||||
w->move( (screen.width()-size.width())/2, (screen.height()-size.height())/2 );
|
w->move( (screen.width()-size.width())/2, (screen.height()-size.height())/2 );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Very, very, very simplified QDialog::adjustPosition from qdialog.cpp
|
||||||
|
void qz_centerWidgetToParent(QWidget* w, QWidget* parent)
|
||||||
|
{
|
||||||
|
if (!parent || !w)
|
||||||
|
return;
|
||||||
|
|
||||||
|
QPoint p;
|
||||||
|
parent = parent->window();
|
||||||
|
QPoint pp = parent->mapToGlobal(QPoint(0,0));
|
||||||
|
p = QPoint(pp.x() + parent->width()/2, pp.y() + parent->height()/ 2);
|
||||||
|
p = QPoint(p.x()-w->width()/2, p.y()-w->height()/2 - 20);
|
||||||
|
|
||||||
|
w->move(p);
|
||||||
|
}
|
||||||
|
|
||||||
QString qz_samePartOfStrings(const QString &one, const QString &other)
|
QString qz_samePartOfStrings(const QString &one, const QString &other)
|
||||||
{
|
{
|
||||||
int i = 0;
|
int i = 0;
|
||||||
|
|
|
@ -31,6 +31,8 @@ QByteArray qz_pixmapToByteArray(const QPixmap &pix);
|
||||||
QByteArray qz_readAllFileContents(const QString &filename);
|
QByteArray qz_readAllFileContents(const QString &filename);
|
||||||
|
|
||||||
void qz_centerWidgetOnScreen(QWidget* w);
|
void qz_centerWidgetOnScreen(QWidget* w);
|
||||||
|
void qz_centerWidgetToParent(QWidget* w, QWidget* parent);
|
||||||
|
|
||||||
QString qz_samePartOfStrings(const QString &one, const QString &other);
|
QString qz_samePartOfStrings(const QString &one, const QString &other);
|
||||||
QUrl qz_makeRelativeUrl(const QUrl &baseUrl, const QUrl &rUrl);
|
QUrl qz_makeRelativeUrl(const QUrl &baseUrl, const QUrl &rUrl);
|
||||||
|
|
||||||
|
|
|
@ -68,6 +68,13 @@ void ToolButton::mousePressEvent(QMouseEvent *e)
|
||||||
{
|
{
|
||||||
if (e->buttons() == Qt::MiddleButton) {
|
if (e->buttons() == Qt::MiddleButton) {
|
||||||
emit middleMouseClicked();
|
emit middleMouseClicked();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (e->button() == Qt::RightButton && menu()) {
|
||||||
|
setDown(true);
|
||||||
|
showMenu();
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
QToolButton::mousePressEvent(e);
|
QToolButton::mousePressEvent(e);
|
||||||
|
|
|
@ -28,13 +28,14 @@
|
||||||
#include "widget.h"
|
#include "widget.h"
|
||||||
#include "globalfunctions.h"
|
#include "globalfunctions.h"
|
||||||
|
|
||||||
|
QString WebPage::m_lastUploadLocation = QDir::homePath();
|
||||||
|
|
||||||
WebPage::WebPage(WebView* parent, QupZilla* mainClass)
|
WebPage::WebPage(WebView* parent, QupZilla* mainClass)
|
||||||
: QWebPage(parent)
|
: QWebPage(parent)
|
||||||
,p_QupZilla(mainClass)
|
, p_QupZilla(mainClass)
|
||||||
,m_view(parent)
|
, m_view(parent)
|
||||||
,m_blockAlerts(false)
|
, m_blockAlerts(false)
|
||||||
,m_lastUploadLocation(QDir::homePath())
|
, m_secureStatus(false)
|
||||||
,m_secureStatus(false)
|
|
||||||
// ,m_isOpeningNextWindowAsNewTab(false)
|
// ,m_isOpeningNextWindowAsNewTab(false)
|
||||||
{
|
{
|
||||||
setForwardUnsupportedContent(true);
|
setForwardUnsupportedContent(true);
|
||||||
|
|
|
@ -84,6 +84,7 @@ private:
|
||||||
bool acceptNavigationRequest(QWebFrame* frame, const QNetworkRequest &request, NavigationType type);
|
bool acceptNavigationRequest(QWebFrame* frame, const QNetworkRequest &request, NavigationType type);
|
||||||
|
|
||||||
QString chooseFile(QWebFrame *originatingFrame, const QString &oldFile);
|
QString chooseFile(QWebFrame *originatingFrame, const QString &oldFile);
|
||||||
|
static QString m_lastUploadLocation;
|
||||||
|
|
||||||
QupZilla* p_QupZilla;
|
QupZilla* p_QupZilla;
|
||||||
QNetworkRequest m_lastRequest;
|
QNetworkRequest m_lastRequest;
|
||||||
|
@ -92,9 +93,8 @@ private:
|
||||||
QSslCertificate m_SslCert;
|
QSslCertificate m_SslCert;
|
||||||
QList<QSslCertificate> m_SslCerts;
|
QList<QSslCertificate> m_SslCerts;
|
||||||
QList<AdBlockedEntry> m_adBlockedEntries;
|
QList<AdBlockedEntry> m_adBlockedEntries;
|
||||||
bool m_blockAlerts;
|
|
||||||
QString m_lastUploadLocation;
|
|
||||||
|
|
||||||
|
bool m_blockAlerts;
|
||||||
bool m_secureStatus;
|
bool m_secureStatus;
|
||||||
// bool m_isOpeningNextWindowAsNewTab;
|
// bool m_isOpeningNextWindowAsNewTab;
|
||||||
};
|
};
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user