diff --git a/BUILDING b/BUILDING index 1469f4fd2..e39719d77 100644 --- a/BUILDING +++ b/BUILDING @@ -96,6 +96,12 @@ Available Defines Requires linking against libraries from Microsoft Visual C++ Compiler 2010 (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: diff --git a/src/3rdparty/ecwin7.cpp b/src/3rdparty/ecwin7.cpp index e5e5813f5..379bfc931 100644 --- a/src/3rdparty/ecwin7.cpp +++ b/src/3rdparty/ecwin7.cpp @@ -20,7 +20,7 @@ #include "ecwin7.h" // Windows only definitions -#ifdef W7API +#ifdef W7TASKBAR 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); diff --git a/src/3rdparty/ecwin7.h b/src/3rdparty/ecwin7.h index a4e53824b..5f2e36065 100644 --- a/src/3rdparty/ecwin7.h +++ b/src/3rdparty/ecwin7.h @@ -24,7 +24,7 @@ #include // Windows only data definitions -#ifdef W7API +#ifdef W7TASKBAR #include #include @@ -67,6 +67,6 @@ private: HICON mOverlayIcon; }; // Windows only data definitions - END -#endif +#endif // W7TASKBAR #endif // ECWIN7_H diff --git a/src/bookmarks/bookmarksmodel.cpp b/src/bookmarks/bookmarksmodel.cpp index 7f16a326f..8b55d8c3d 100644 --- a/src/bookmarks/bookmarksmodel.cpp +++ b/src/bookmarks/bookmarksmodel.cpp @@ -128,6 +128,9 @@ bool BookmarksModel::saveBookmark(const QUrl &url, const QString &title, const Q } QImage image = icon.pixmap(16, 16).toImage(); + if (image.isNull()) { + image = QWebSettings::webGraphic(QWebSettings::DefaultFrameIconGraphic).toImage(); + } QSqlQuery query; query.prepare("INSERT INTO bookmarks (url, title, folder, icon) VALUES (?,?,?,?)"); diff --git a/src/downloads/downloaditem.cpp b/src/downloads/downloaditem.cpp index 38f458250..2fef86cba 100644 --- a/src/downloads/downloaditem.cpp +++ b/src/downloads/downloaditem.cpp @@ -71,7 +71,7 @@ void DownloadItem::startDownloading() { QUrl locationHeader = m_reply->header(QNetworkRequest::LocationHeader).toUrl(); if (locationHeader.isValid()) { - m_reply->close(); + m_reply->abort(); m_reply->deleteLater(); m_reply = mApp->networkManager()->get(QNetworkRequest(locationHeader)); diff --git a/src/downloads/downloadmanager.cpp b/src/downloads/downloadmanager.cpp index 56efc76dd..0e6018441 100644 --- a/src/downloads/downloadmanager.cpp +++ b/src/downloads/downloadmanager.cpp @@ -57,7 +57,7 @@ DownloadManager::DownloadManager(QWidget* parent) loadSettings(); -#ifdef W7API +#ifdef W7TASKBAR if (QtWin::isRunningWindows7()) { win7.init(this->winId()); } @@ -88,7 +88,7 @@ void DownloadManager::resizeEvent(QResizeEvent* e) emit resized(size()); } -#ifdef W7API +#ifdef W7TASKBAR bool DownloadManager::winEvent(MSG* message, long* result) { return win7.winEvent(message, result); @@ -140,7 +140,7 @@ void DownloadManager::timerEvent(QTimerEvent* event) DownloadItem::currentSpeedToString(speed), DownloadItem::remaingTimeToString(remaining))); setWindowTitle(QString::number(progress) + tr("% - Download Manager")); -#ifdef W7API +#ifdef W7TASKBAR if (QtWin::isRunningWindows7()) { win7.setProgressValue(progress, 100); win7.setProgressState(win7.Normal); @@ -233,7 +233,7 @@ void DownloadManager::downloadFinished(bool success) } ui->speedLabel->clear(); setWindowTitle(tr("Download Manager")); -#ifdef W7API +#ifdef W7TASKBAR if (QtWin::isRunningWindows7()) { win7.setProgressValue(0, 100); win7.setProgressState(win7.NoProgress); diff --git a/src/downloads/downloadmanager.h b/src/downloads/downloadmanager.h index dcc6a2bad..ba93bf141 100644 --- a/src/downloads/downloadmanager.h +++ b/src/downloads/downloadmanager.h @@ -63,7 +63,7 @@ public: public slots: void show(); -#ifdef W7API +#ifdef W7TASKBAR protected: virtual bool winEvent(MSG* message, long* result); #endif @@ -79,7 +79,7 @@ signals: void resized(QSize); private: -#ifdef W7API +#ifdef W7TASKBAR EcWin7 win7; #endif void timerEvent(QTimerEvent* event); diff --git a/src/network/networkmanager.cpp b/src/network/networkmanager.cpp index 44d9d5817..4415f7441 100644 --- a/src/network/networkmanager.cpp +++ b/src/network/networkmanager.cpp @@ -317,9 +317,9 @@ QNetworkReply* NetworkManager::createRequest(QNetworkAccessManager::Operation op //SchemeHandlers if (req.url().scheme() == "qupzilla") { reply = m_qupzillaSchemeHandler->createRequest(op, req, outgoingData); - } - if (reply) { - return reply; + if (reply) { + return reply; + } } req.setAttribute(QNetworkRequest::HttpPipeliningAllowedAttribute, true); diff --git a/src/network/qupzillaschemehandler.cpp b/src/network/qupzillaschemehandler.cpp index b425c8812..1ca0a4847 100644 --- a/src/network/qupzillaschemehandler.cpp +++ b/src/network/qupzillaschemehandler.cpp @@ -68,6 +68,7 @@ QupZillaSchemeReply::QupZillaSchemeReply(const QNetworkRequest &req, QObject* pa void QupZillaSchemeReply::loadPage() { QTextStream stream(&m_buffer); + stream.setCodec("UTF-8"); if (m_pageName == "about") { stream << aboutPage(); diff --git a/src/other/statusbarmessage.cpp b/src/other/statusbarmessage.cpp index 1ef20fe95..42a20d2ce 100644 --- a/src/other/statusbarmessage.cpp +++ b/src/other/statusbarmessage.cpp @@ -20,6 +20,7 @@ #include "tabwidget.h" #include "tabbedwebview.h" #include "squeezelabelv1.h" +#include "mainapplication.h" TipLabel::TipLabel(QupZilla* parent) : SqueezeLabelV1(parent) @@ -94,7 +95,11 @@ void StatusBarMessage::showMessage(const QString &message) if (p_QupZilla->statusBar()->isVisible()) { p_QupZilla->statusBar()->showMessage(message); } +#ifdef Q_WS_WIN + else if (mApp->activeWindow() == p_QupZilla) { +#else else { +#endif WebView* view = p_QupZilla->weView(); QWebFrame* mainFrame = view->page()->mainFrame(); diff --git a/src/preferences/sslmanager.cpp b/src/preferences/sslmanager.cpp index 76da7d957..f83111be6 100644 --- a/src/preferences/sslmanager.cpp +++ b/src/preferences/sslmanager.cpp @@ -77,6 +77,10 @@ void SSLManager::refreshCAList() m_caCerts = QSslSocket::defaultCaCertificates(); foreach(const QSslCertificate & cert, m_caCerts) { + if (m_localCerts.contains(cert)) { + continue; + } + QListWidgetItem* item = new QListWidgetItem(ui->caList); item->setText(CertificateInfoWidget::certificateItemText(cert)); item->setWhatsThis(QString::number(m_caCerts.indexOf(cert))); diff --git a/src/src.pro b/src/src.pro index c877b53df..7aa8f0b62 100644 --- a/src/src.pro +++ b/src/src.pro @@ -19,7 +19,7 @@ UI_DIR = ../build #DEFINES += USE_WEBGL #DEFINES += KDE #DEFINES += PORTABLE_BUILD -#win32:DEFINES += W7API +win32:DEFINES += W7API ##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