[126330] trunk/dports/www/QupZilla

ryandesign at macports.org ryandesign at macports.org
Tue Oct 7 16:38:36 PDT 2014


Revision: 126330
          https://trac.macports.org/changeset/126330
Author:   ryandesign at macports.org
Date:     2014-10-07 16:38:36 -0700 (Tue, 07 Oct 2014)
Log Message:
-----------
QupZilla: fix more runtime crashes

Modified Paths:
--------------
    trunk/dports/www/QupZilla/Portfile

Added Paths:
-----------
    trunk/dports/www/QupZilla/files/patch-src-lib-history-historymenu.cpp.diff
    trunk/dports/www/QupZilla/files/patch-src-lib-preferences-preferences.cpp.diff

Modified: trunk/dports/www/QupZilla/Portfile
===================================================================
--- trunk/dports/www/QupZilla/Portfile	2014-10-07 23:28:23 UTC (rev 126329)
+++ trunk/dports/www/QupZilla/Portfile	2014-10-07 23:38:36 UTC (rev 126330)
@@ -7,7 +7,7 @@
 
 github.setup        QupZilla qupzilla 1.8.1 v
 name                QupZilla
-revision            1
+revision            2
 categories          www
 platforms           darwin
 maintainers         ryandesign openmaintainer
@@ -30,6 +30,8 @@
 
 patchfiles          patch-mac-macdeploy.sh.diff
 patchfiles-append   patch-src-lib-app-browserwindow.cpp.diff
+patchfiles-append   patch-src-lib-history-historymenu.cpp.diff
+patchfiles-append   patch-src-lib-preferences-preferences.cpp.diff
 patchfiles-append   patch-src-main-Info.plist.diff
 
 post-patch {

Added: trunk/dports/www/QupZilla/files/patch-src-lib-history-historymenu.cpp.diff
===================================================================
--- trunk/dports/www/QupZilla/files/patch-src-lib-history-historymenu.cpp.diff	                        (rev 0)
+++ trunk/dports/www/QupZilla/files/patch-src-lib-history-historymenu.cpp.diff	2014-10-07 23:38:36 UTC (rev 126330)
@@ -0,0 +1,14 @@
+Fix crash when clicking History menu with no browser window
+https://github.com/QupZilla/qupzilla/issues/1487
+https://github.com/QupZilla/qupzilla/commit/b6f913dafe2fce92f406ec3f21970df2151bde8d
+--- src/lib/history/historymenu.cpp.orig
++++ src/lib/history/historymenu.cpp
+@@ -81,7 +81,7 @@ void HistoryMenu::showHistoryManager()
+ void HistoryMenu::aboutToShow()
+ {
+     // Set enabled states for Back/Forward actions according to current WebView
+-    TabbedWebView* view = m_window->weView();
++    TabbedWebView* view = m_window ? m_window->weView() : 0;
+ 
+     if (view) {
+         actions().at(0)->setEnabled(view->history()->canGoBack());

Added: trunk/dports/www/QupZilla/files/patch-src-lib-preferences-preferences.cpp.diff
===================================================================
--- trunk/dports/www/QupZilla/files/patch-src-lib-preferences-preferences.cpp.diff	                        (rev 0)
+++ trunk/dports/www/QupZilla/files/patch-src-lib-preferences-preferences.cpp.diff	2014-10-07 23:38:36 UTC (rev 126330)
@@ -0,0 +1,41 @@
+Fix crash when opening Preferences with no browser window
+https://github.com/QupZilla/qupzilla/issues/1488
+https://github.com/QupZilla/qupzilla/commit/21fb7bff31a5b0d9cad1e4229ff3b03b84a9fefe
+--- src/lib/preferences/preferences.cpp.orig
++++ src/lib/preferences/preferences.cpp
+@@ -265,7 +265,7 @@ Preferences::Preferences(BrowserWindow* window, QWidget* parent)
+     bool pbInABuseCC = settings.value("UseCustomProgressColor", false).toBool();
+     ui->checkBoxCustomProgressColor->setChecked(pbInABuseCC);
+     ui->progressBarColorSelector->setEnabled(pbInABuseCC);
+-    QColor pbColor = settings.value("CustomProgressColor", m_window->palette().color(QPalette::Highlight)).value<QColor>();
++    QColor pbColor = settings.value("CustomProgressColor", palette().color(QPalette::Highlight)).value<QColor>();
+     setProgressBarColorIcon(pbColor);
+     connect(ui->customColorToolButton, SIGNAL(clicked(bool)), SLOT(selectCustomProgressBarColor()));
+     connect(ui->resetProgressBarcolor, SIGNAL(clicked()), SLOT(setProgressBarColorIcon()));
+@@ -592,11 +592,17 @@ void Preferences::allowCacheChanged(bool state)
+ 
+ void Preferences::useActualHomepage()
+ {
++    if (!m_window)
++        return;
++
+     ui->homepage->setText(m_window->weView()->url().toString());
+ }
+ 
+ void Preferences::useActualNewTab()
+ {
++    if (!m_window)
++        return;
++
+     ui->newTabUrl->setText(m_window->weView()->url().toString());
+ }
+ 
+@@ -1118,7 +1124,7 @@ void Preferences::setProgressBarColorIcon(QColor color)
+     const int size = style()->pixelMetric(QStyle::PM_ToolBarIconSize);
+     QPixmap pm(QSize(size, size));
+     if (!color.isValid()) {
+-        color = m_window->palette().color(QPalette::Highlight);
++        color = palette().color(QPalette::Highlight);
+     }
+     pm.fill(color);
+     ui->customColorToolButton->setIcon(pm);
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20141007/b757d61b/attachment-0001.html>


More information about the macports-changes mailing list