rpms/kde-plasma-weather/F-9 kde-plasma-weather-1.0.0-rev924102-qt45.patch, NONE, 1.1 kde-plasma-weather-1.0.0-rev924804-qt45-clip.patch, NONE, 1.1 kde-plasma-weather-1.0.0-rev926205-no-update-now.patch, NONE, 1.1 kde-plasma-weather-1.0.0-rev930258-wind-gust.patch, NONE, 1.1 kde-plasma-weather.spec, 1.1, 1.2

Kevin Kofler kkofler at fedoraproject.org
Thu Mar 5 23:47:31 UTC 2009


Author: kkofler

Update of /cvs/pkgs/rpms/kde-plasma-weather/F-9
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv18543/F-9

Modified Files:
	kde-plasma-weather.spec 
Added Files:
	kde-plasma-weather-1.0.0-rev924102-qt45.patch 
	kde-plasma-weather-1.0.0-rev924804-qt45-clip.patch 
	kde-plasma-weather-1.0.0-rev926205-no-update-now.patch 
	kde-plasma-weather-1.0.0-rev930258-wind-gust.patch 
Log Message:
Sync from devel:

* Thu Mar 05 2009 Kevin Kofler <Kevin at tigcc.ticalc.org> 1.0.0-3
- backport 2 fixes for rendering issues with Qt 4.5 from trunk
- don't show the non-functional "Update now" menu entry (backported from trunk)
- use only 1 decimal place for the wind gust (backported from trunk)

kde-plasma-weather-1.0.0-rev924102-qt45.patch:

--- NEW FILE kde-plasma-weather-1.0.0-rev924102-qt45.patch ---
diff -ur plasma-applet-weather-1.0.0/weatherapplet.cpp plasma-applet-weather-1.0.0-rev924102-qt45/weatherapplet.cpp
--- plasma-applet-weather-1.0.0/weatherapplet.cpp	2009-02-03 07:20:28.000000000 +0100
+++ plasma-applet-weather-1.0.0-rev924102-qt45/weatherapplet.cpp	2009-03-06 00:08:37.000000000 +0100
@@ -166,7 +166,7 @@
 
     m_titlePanel->addItem(m_locationLabel, 0, 0, 1, 3);
     m_titlePanel->addItem(m_tempLabel, 0, 3);
-    m_titlePanel->addItem(m_conditionsLabel, 1, 1);
+    m_titlePanel->addItem(m_conditionsLabel, 1, 0);
     m_titlePanel->addItem(m_windIcon, 1, 2);
     m_titlePanel->addItem(m_forecastTemps, 1, 3);
 
@@ -209,6 +209,8 @@
     if (m_addDialog) {
         delete m_addDialog;
     }
+
+    destroyLayout();
 }
 
 void WeatherApplet::toolTipAboutToShow()
@@ -295,7 +297,7 @@
     return actions;
 }
 
-void WeatherApplet::clearLayout() 	 
+void WeatherApplet::destroyLayout() 	 
 { 	 
     if (m_bottomLayout) { 	 
         if (m_fiveDaysModel) { 	 
@@ -312,17 +314,17 @@
          } 	 
  	 
          if (m_fiveDaysView) { 	 
-             kDebug() << "Delete the Plasma::WeatherView"; 	 
+             kDebug() << "Delete the Plasma::m_fiveDaysView"; 	 
              delete m_fiveDaysView; 	 
              m_fiveDaysView = 0; 	 
-             kDebug() << "Finished deleting Plasma::WeatherView"; 	 
+             kDebug() << "Finished deleting Plasma::m_fiveDaysView"; 	 
          } 	 
  	 
          if (m_detailsView) { 	 
-             kDebug() << "Delete the Plasma::WeatherView"; 	 
+             kDebug() << "Delete the Plasma::m_detailsView"; 	 
              delete m_detailsView; 	 
              m_detailsView = 0; 	 
-             kDebug() << "Finished dleeting Plasma::WeatherView"; 	 
+             kDebug() << "Finished dleeting Plasma::m_detailsView"; 	 
          } 	 
  	 
         kDebug() << "Deleting Plasma::TabBar"; 	 
@@ -701,8 +703,6 @@
 
 void WeatherApplet::weatherContent(const Plasma::DataEngine::Data &data) 
 {
-    clearLayout();
-
     m_locationLabel->setText(data["Place"].toString());
     QStringList fiveDayTokens = data["Short Forecast Day 0"].toString().split("|"); // Get current time period of day
 
@@ -791,12 +791,17 @@
   
     if (m_tabBar->count() > 0) {
         // If we have items in tab clean it up first 	 
-        for (int i = 0; i < m_tabBar->count(); i++) {
-             kDebug() << "Destroying Tab: " << i;
-             m_tabBar->removeTab(i); 	 
+        while (m_tabBar->count()) {
+             m_tabBar->removeTab(0);
         }
     }
 
+    // Do some cleanup on WeatherView
+    if (m_fiveDaysView) {
+        delete m_fiveDaysView;
+        m_fiveDaysView = 0;
+    }
+
     // If we have a 5 day forecast, display it
     if (data["Total Weather Days"].toInt() > 0) {
         if (!m_fiveDaysView) {
@@ -853,7 +858,7 @@
                 fiveDayIcon->setIcon(KIcon(fiveDayTokens[1]));
                 fiveDayIcon->setSizePolicy(QSizePolicy::Maximum, QSizePolicy::Maximum);
                 fiveDayIcon->setDrawBackground(false);
-
+                fiveDayIcon->hide();
                 QStandardItem *iconItem = new QStandardItem(fiveDayIcon->icon(), NULL);
 
                 if (fiveDayTokens[5] != "N/U") {
@@ -894,6 +899,7 @@
 
         }
 
+
         if (dayItems.count() > 0) {
             m_fiveDaysModel->appendRow(dayItems);
         }
@@ -1210,7 +1216,6 @@
             validate(source, data["validate"]);
             if (isBusy()) {
                 setVisibleLayout(false);
-                clearLayout();
                 setBusy(false);
                 setConfigurationRequired(true);
             }
@@ -1266,7 +1271,6 @@
         getWeather();
     } else {
         setVisibleLayout(false);
-        clearLayout();
         setConfigurationRequired(true);
     }
 }
diff -ur plasma-applet-weather-1.0.0/weatherapplet.h plasma-applet-weather-1.0.0-rev924102-qt45/weatherapplet.h
--- plasma-applet-weather-1.0.0/weatherapplet.h	2009-01-25 18:54:53.000000000 +0100
+++ plasma-applet-weather-1.0.0-rev924102-qt45/weatherapplet.h	2009-03-06 00:06:21.000000000 +0100
@@ -132,7 +132,7 @@
     Plasma::Frame *m_titleFrame;
 
     void setVisibleLayout(bool val);
-    void clearLayout(void);
+    void destroyLayout(void);
     QString convertTemperature(int format, QString value, int type, bool rounded);
 };
 

kde-plasma-weather-1.0.0-rev924804-qt45-clip.patch:

--- NEW FILE kde-plasma-weather-1.0.0-rev924804-qt45-clip.patch ---
diff -ur plasma-applet-weather-1.0.0/weatherdelegate.cpp plasma-applet-weather-1.0.0-rev924804-qt45-clip/weatherdelegate.cpp
--- plasma-applet-weather-1.0.0/weatherdelegate.cpp	2009-01-29 08:41:30.000000000 +0100
+++ plasma-applet-weather-1.0.0-rev924804-qt45-clip/weatherdelegate.cpp	2009-03-06 00:10:47.000000000 +0100
@@ -144,17 +144,14 @@
         path = Plasma::PaintUtils::roundedRectangle(backgroundRectToClip, radius);
 
 
-        painter->save();
-
-
-        painter->setClipRect(backgroundRect);
+        QPainterPath clipPath;
+        clipPath.addRect(backgroundRect);
+        path = path.intersected(clipPath);
 
         painter->setRenderHint(QPainter::Antialiasing);
         painter->setPen(Qt::NoPen);
         painter->setBrush(backgroundColor);
         painter->drawPath(path);
-
-        painter->restore();
     }
 
     if (index.row() == 0 && d->hasHeader) {

kde-plasma-weather-1.0.0-rev926205-no-update-now.patch:

--- NEW FILE kde-plasma-weather-1.0.0-rev926205-no-update-now.patch ---
diff -ur plasma-applet-weather-1.0.0/weatherapplet.cpp plasma-applet-weather-1.0.0-rev926205-no-update-now/weatherapplet.cpp
--- plasma-applet-weather-1.0.0/weatherapplet.cpp	2009-02-03 07:20:28.000000000 +0100
+++ plasma-applet-weather-1.0.0-rev926205-no-update-now/weatherapplet.cpp	2009-03-06 00:12:06.000000000 +0100
@@ -25,7 +25,7 @@
 #include <KDialog>
 #include <KConfigDialog>
 #include <KLocale>
-#include <KAction>
+//#include <KAction>
 #include <QStandardItemModel>
 #include <QPushButton>
 #include <QPainter>
@@ -105,8 +105,8 @@
     m_weatherUpdateTime = generalConfig.readEntry("updateWeather", 30);
 
     // "Update Now" contextual action
-    m_actionUpdateNow = new KAction(i18n("&Update Now"), this);
-    connect(m_actionUpdateNow, SIGNAL(triggered()), this, SLOT(getWeather()));
+    //m_actionUpdateNow = new KAction(i18n("&Update Now"), this);
+    //connect(m_actionUpdateNow, SIGNAL(triggered()), this, SLOT(getWeather()));
 
     // Connect to weather engine.
     weatherEngine = dataEngine("weather");
@@ -282,6 +282,7 @@
     KRun::runUrl(KUrl(url), "text/html", 0);
 }
 
+/*
 QList<QAction*> WeatherApplet::contextualActions()
 {
     QList<QAction*> actions;
@@ -294,6 +295,7 @@
 
     return actions;
 }
+*/
 
 void WeatherApplet::destroyLayout() 	 
 { 	 
diff -ur plasma-applet-weather-1.0.0/weatherapplet.h plasma-applet-weather-1.0.0-rev926205-no-update-now/weatherapplet.h
--- plasma-applet-weather-1.0.0/weatherapplet.h	2009-01-25 18:54:53.000000000 +0100
+++ plasma-applet-weather-1.0.0-rev926205-no-update-now/weatherapplet.h	2009-03-06 00:12:06.000000000 +0100
@@ -29,7 +29,7 @@
 #include "ui_weatherAddPlace.h"
 
 class KDialog;
-class KAction;
+//class KAction;
 class QStandardItemModel;
 class QStandardItem;
 class QGraphicsLinearLayout;
@@ -77,7 +77,7 @@
 
 protected:
     void constraintsEvent(Plasma::Constraints constraints);
-    QList<QAction*> contextualActions();
+    //QList<QAction*> contextualActions();
 
 private:
     Plasma::DataEngine *weatherEngine;
@@ -120,7 +120,7 @@
     Plasma::WeatherView *m_fiveDaysView;
     Plasma::WeatherView *m_detailsView;
 
-    KAction *m_actionUpdateNow;
+    //KAction *m_actionUpdateNow;
 
     // Layout
     int m_setupLayout;

kde-plasma-weather-1.0.0-rev930258-wind-gust.patch:

--- NEW FILE kde-plasma-weather-1.0.0-rev930258-wind-gust.patch ---
diff -ur plasma-applet-weather-1.0.0/weatherapplet.cpp plasma-applet-weather-1.0.0-rev930258-wind-gust/weatherapplet.cpp
--- plasma-applet-weather-1.0.0/weatherapplet.cpp	2009-02-03 07:20:28.000000000 +0100
+++ plasma-applet-weather-1.0.0-rev930258-wind-gust/weatherapplet.cpp	2009-03-06 00:20:07.000000000 +0100
@@ -1071,7 +1071,7 @@
         QStandardItem *dataGust = new QStandardItem();
         switch (m_weatherWindFormat) {
         case WeatherUtils::MetersPerSecond:
-            dataGust->setText(i18n("Wind Gust: %1%2", QString::number(WeatherUtils::convert(data["Wind Gust"].toDouble(), data["Wind Gust Unit"].toInt(), WeatherUtils::MetersPerSecond), 'f', 2), "m/s"));
+            dataGust->setText(i18n("Wind Gust: %1%2", QString::number(WeatherUtils::convert(data["Wind Gust"].toDouble(), data["Wind Gust Unit"].toInt(), WeatherUtils::MetersPerSecond), 'f', 1), "m/s"));
             break;
         case WeatherUtils::Knots:
             dataGust->setText(i18n("Wind Gust: %1%2", QString::number(WeatherUtils::convert(data["Wind Gust"].toDouble(), data["Wind Gust Unit"].toInt(), WeatherUtils::Knots), 'f', 1), "kt"));


Index: kde-plasma-weather.spec
===================================================================
RCS file: /cvs/pkgs/rpms/kde-plasma-weather/F-9/kde-plasma-weather.spec,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- kde-plasma-weather.spec	5 Feb 2009 11:16:29 -0000	1.1
+++ kde-plasma-weather.spec	5 Mar 2009 23:47:01 -0000	1.2
@@ -1,6 +1,6 @@
 Name:           kde-plasma-weather
 Version:        1.0.0
-Release:        1%{?dist}
+Release:        3%{?dist}
 Summary:        Plasma applet for weather forecasts
 
 Group:          User Interface/Desktops
@@ -8,6 +8,15 @@
 URL:            http://www.kdedevelopers.org/blog/4267
 
 Source0:        ftp://ftp.kde.org/pub/kde/stable/4.2.0/src/extragear/plasma-applet-weather-%{version}.tar.bz2
+# backports from trunk:
+# fix rendering issues with Qt 4.5, in particular a bogus icon at the top left
+Patch100:       kde-plasma-weather-1.0.0-rev924102-qt45.patch
+# fix clipping issue with Qt 4.5
+Patch101:       kde-plasma-weather-1.0.0-rev924804-qt45-clip.patch
+# don't show the non-functional "Update now" menu entry
+Patch102:       kde-plasma-weather-1.0.0-rev926205-no-update-now.patch
+# use only 1 decimal place for the wind gust
+Patch103:       kde-plasma-weather-1.0.0-rev930258-wind-gust.patch
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
 # The weather dataengine is in kdebase-workspace.
@@ -20,6 +29,10 @@
 
 %prep
 %setup -qn plasma-applet-weather-%{version}
+%patch100 -p1 -b .qt45
+%patch101 -p1 -b .qt45-clip
+%patch102 -p1 -b .no-update-now
+%patch103 -p1 -b .wind-gust
 
 %build
 mkdir -p %{_target_platform}
@@ -43,6 +56,14 @@
 %{_kde4_appsdir}/desktoptheme/default/weather/
 
 %changelog
+* Thu Mar 05 2009 Kevin Kofler <Kevin at tigcc.ticalc.org> 1.0.0-3
+- backport 2 fixes for rendering issues with Qt 4.5 from trunk
+- don't show the non-functional "Update now" menu entry (backported from trunk)
+- use only 1 decimal place for the wind gust (backported from trunk)
+
+* Wed Feb 25 2009 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> 1.0.0-2
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
+
 * Tue Feb 03 2009 Shawn Starr <spstarr at fedoraproject.org> 1.0.0-1
 - First release.
 




More information about the fedora-extras-commits mailing list