1
mirror of https://invent.kde.org/network/falkon.git synced 2024-12-20 10:46:35 +01:00

Little fixes for Windows, SSL Manager and Bookmark Import

- fixed encoding of qupzilla: pages on Windows
- fixed focus issues with overlay statusbar text on Windows
- fixed showing Local certificates in CA Certs in SSL Manager
- fixed showing empty icon on imported bookmarks
This commit is contained in:
nowrep 2012-01-28 12:02:37 +01:00
parent 24ec4e0292
commit 085a8938c0
12 changed files with 33 additions and 14 deletions

View File

@ -97,6 +97,12 @@ Available Defines
Compiler 2010 Compiler 2010
(enabled by default) (enabled by default)
W7TASKBAR Enable Windows 7 Taskbar support
Requires linking against libraries from Microsoft Visual C++
Compiler 2010
May cause crash when downloading files on some systems.
(disabled by default)
Linux / Unix specific defines: Linux / Unix specific defines:

View File

@ -20,7 +20,7 @@
#include "ecwin7.h" #include "ecwin7.h"
// Windows only definitions // Windows only definitions
#ifdef W7API #ifdef W7TASKBAR
DEFINE_GUID(CLSID_TaskbarList, 0x56fdf344, 0xfd6d, 0x11d0, 0x95, 0x8a, 0x0, 0x60, 0x97, 0xc9, 0xa0, 0x90); DEFINE_GUID(CLSID_TaskbarList, 0x56fdf344, 0xfd6d, 0x11d0, 0x95, 0x8a, 0x0, 0x60, 0x97, 0xc9, 0xa0, 0x90);
DEFINE_GUID(IID_ITaskbarList3, 0xea1afb91, 0x9e28, 0x4b86, 0x90, 0xE9, 0x9e, 0x9f, 0x8a, 0x5e, 0xef, 0xaf); DEFINE_GUID(IID_ITaskbarList3, 0xea1afb91, 0x9e28, 0x4b86, 0x90, 0xE9, 0x9e, 0x9f, 0x8a, 0x5e, 0xef, 0xaf);

View File

@ -24,7 +24,7 @@
#include <QWidget> #include <QWidget>
// Windows only data definitions // Windows only data definitions
#ifdef W7API #ifdef W7TASKBAR
#include <windows.h> #include <windows.h>
#include <initguid.h> #include <initguid.h>
@ -67,6 +67,6 @@ private:
HICON mOverlayIcon; HICON mOverlayIcon;
}; };
// Windows only data definitions - END // Windows only data definitions - END
#endif #endif // W7TASKBAR
#endif // ECWIN7_H #endif // ECWIN7_H

View File

@ -128,6 +128,9 @@ bool BookmarksModel::saveBookmark(const QUrl &url, const QString &title, const Q
} }
QImage image = icon.pixmap(16, 16).toImage(); QImage image = icon.pixmap(16, 16).toImage();
if (image.isNull()) {
image = QWebSettings::webGraphic(QWebSettings::DefaultFrameIconGraphic).toImage();
}
QSqlQuery query; QSqlQuery query;
query.prepare("INSERT INTO bookmarks (url, title, folder, icon) VALUES (?,?,?,?)"); query.prepare("INSERT INTO bookmarks (url, title, folder, icon) VALUES (?,?,?,?)");

View File

@ -71,7 +71,7 @@ void DownloadItem::startDownloading()
{ {
QUrl locationHeader = m_reply->header(QNetworkRequest::LocationHeader).toUrl(); QUrl locationHeader = m_reply->header(QNetworkRequest::LocationHeader).toUrl();
if (locationHeader.isValid()) { if (locationHeader.isValid()) {
m_reply->close(); m_reply->abort();
m_reply->deleteLater(); m_reply->deleteLater();
m_reply = mApp->networkManager()->get(QNetworkRequest(locationHeader)); m_reply = mApp->networkManager()->get(QNetworkRequest(locationHeader));

View File

@ -57,7 +57,7 @@ DownloadManager::DownloadManager(QWidget* parent)
loadSettings(); loadSettings();
#ifdef W7API #ifdef W7TASKBAR
if (QtWin::isRunningWindows7()) { if (QtWin::isRunningWindows7()) {
win7.init(this->winId()); win7.init(this->winId());
} }
@ -88,7 +88,7 @@ void DownloadManager::resizeEvent(QResizeEvent* e)
emit resized(size()); emit resized(size());
} }
#ifdef W7API #ifdef W7TASKBAR
bool DownloadManager::winEvent(MSG* message, long* result) bool DownloadManager::winEvent(MSG* message, long* result)
{ {
return win7.winEvent(message, result); return win7.winEvent(message, result);
@ -140,7 +140,7 @@ void DownloadManager::timerEvent(QTimerEvent* event)
DownloadItem::currentSpeedToString(speed), DownloadItem::currentSpeedToString(speed),
DownloadItem::remaingTimeToString(remaining))); DownloadItem::remaingTimeToString(remaining)));
setWindowTitle(QString::number(progress) + tr("% - Download Manager")); setWindowTitle(QString::number(progress) + tr("% - Download Manager"));
#ifdef W7API #ifdef W7TASKBAR
if (QtWin::isRunningWindows7()) { if (QtWin::isRunningWindows7()) {
win7.setProgressValue(progress, 100); win7.setProgressValue(progress, 100);
win7.setProgressState(win7.Normal); win7.setProgressState(win7.Normal);
@ -233,7 +233,7 @@ void DownloadManager::downloadFinished(bool success)
} }
ui->speedLabel->clear(); ui->speedLabel->clear();
setWindowTitle(tr("Download Manager")); setWindowTitle(tr("Download Manager"));
#ifdef W7API #ifdef W7TASKBAR
if (QtWin::isRunningWindows7()) { if (QtWin::isRunningWindows7()) {
win7.setProgressValue(0, 100); win7.setProgressValue(0, 100);
win7.setProgressState(win7.NoProgress); win7.setProgressState(win7.NoProgress);

View File

@ -63,7 +63,7 @@ public:
public slots: public slots:
void show(); void show();
#ifdef W7API #ifdef W7TASKBAR
protected: protected:
virtual bool winEvent(MSG* message, long* result); virtual bool winEvent(MSG* message, long* result);
#endif #endif
@ -79,7 +79,7 @@ signals:
void resized(QSize); void resized(QSize);
private: private:
#ifdef W7API #ifdef W7TASKBAR
EcWin7 win7; EcWin7 win7;
#endif #endif
void timerEvent(QTimerEvent* event); void timerEvent(QTimerEvent* event);

View File

@ -317,10 +317,10 @@ QNetworkReply* NetworkManager::createRequest(QNetworkAccessManager::Operation op
//SchemeHandlers //SchemeHandlers
if (req.url().scheme() == "qupzilla") { if (req.url().scheme() == "qupzilla") {
reply = m_qupzillaSchemeHandler->createRequest(op, req, outgoingData); reply = m_qupzillaSchemeHandler->createRequest(op, req, outgoingData);
}
if (reply) { if (reply) {
return reply; return reply;
} }
}
req.setAttribute(QNetworkRequest::HttpPipeliningAllowedAttribute, true); req.setAttribute(QNetworkRequest::HttpPipeliningAllowedAttribute, true);
if (req.attribute(QNetworkRequest::CacheLoadControlAttribute).toInt() == QNetworkRequest::PreferNetwork) { if (req.attribute(QNetworkRequest::CacheLoadControlAttribute).toInt() == QNetworkRequest::PreferNetwork) {

View File

@ -68,6 +68,7 @@ QupZillaSchemeReply::QupZillaSchemeReply(const QNetworkRequest &req, QObject* pa
void QupZillaSchemeReply::loadPage() void QupZillaSchemeReply::loadPage()
{ {
QTextStream stream(&m_buffer); QTextStream stream(&m_buffer);
stream.setCodec("UTF-8");
if (m_pageName == "about") { if (m_pageName == "about") {
stream << aboutPage(); stream << aboutPage();

View File

@ -20,6 +20,7 @@
#include "tabwidget.h" #include "tabwidget.h"
#include "tabbedwebview.h" #include "tabbedwebview.h"
#include "squeezelabelv1.h" #include "squeezelabelv1.h"
#include "mainapplication.h"
TipLabel::TipLabel(QupZilla* parent) TipLabel::TipLabel(QupZilla* parent)
: SqueezeLabelV1(parent) : SqueezeLabelV1(parent)
@ -94,7 +95,11 @@ void StatusBarMessage::showMessage(const QString &message)
if (p_QupZilla->statusBar()->isVisible()) { if (p_QupZilla->statusBar()->isVisible()) {
p_QupZilla->statusBar()->showMessage(message); p_QupZilla->statusBar()->showMessage(message);
} }
#ifdef Q_WS_WIN
else if (mApp->activeWindow() == p_QupZilla) {
#else
else { else {
#endif
WebView* view = p_QupZilla->weView(); WebView* view = p_QupZilla->weView();
QWebFrame* mainFrame = view->page()->mainFrame(); QWebFrame* mainFrame = view->page()->mainFrame();

View File

@ -77,6 +77,10 @@ void SSLManager::refreshCAList()
m_caCerts = QSslSocket::defaultCaCertificates(); m_caCerts = QSslSocket::defaultCaCertificates();
foreach(const QSslCertificate & cert, m_caCerts) { foreach(const QSslCertificate & cert, m_caCerts) {
if (m_localCerts.contains(cert)) {
continue;
}
QListWidgetItem* item = new QListWidgetItem(ui->caList); QListWidgetItem* item = new QListWidgetItem(ui->caList);
item->setText(CertificateInfoWidget::certificateItemText(cert)); item->setText(CertificateInfoWidget::certificateItemText(cert));
item->setWhatsThis(QString::number(m_caCerts.indexOf(cert))); item->setWhatsThis(QString::number(m_caCerts.indexOf(cert)));

View File

@ -19,7 +19,7 @@ UI_DIR = ../build
#DEFINES += USE_WEBGL #DEFINES += USE_WEBGL
#DEFINES += KDE #DEFINES += KDE
#DEFINES += PORTABLE_BUILD #DEFINES += PORTABLE_BUILD
#win32:DEFINES += W7API win32:DEFINES += W7API
##It won't compile on windows with this define. Some bug in qtsingleapp / qvector template ##It won't compile on windows with this define. Some bug in qtsingleapp / qvector template
!win32: !CONFIG(debug, debug|release): DEFINES += QT_NO_DEBUG_OUTPUT !win32: !CONFIG(debug, debug|release): DEFINES += QT_NO_DEBUG_OUTPUT