[Marble-commits] KDE/kdeedu/marble/src/plugins/render/weather

Bastian Holst bastianholst at gmx.de
Thu Jul 16 09:55:45 CEST 2009


SVN commit 997625 by bholst:

Using Q_DECLARE_TR_FUNCTIONS(WeatherItemPrivate) makes it possible to use tr() in non QObject classes. Change this in Marbles WeatherItem

 M  +4 -1      WeatherItem.cpp  


--- trunk/KDE/kdeedu/marble/src/plugins/render/weather/WeatherItem.cpp #997624:997625
@@ -18,6 +18,7 @@
 #include "weatherGlobal.h"
 
 // Qt
+#include <QtCore/QCoreApplication>
 #include <QtCore/QDebug>
 #include <QtCore/QHash>
 #include <QtCore/QObject>
@@ -36,10 +37,12 @@
 const qint32 verticalSpacing = 2;
 
 class WeatherItemPrivate {
+    Q_DECLARE_TR_FUNCTIONS(WeatherItemPrivate)
+    
  public:
     WeatherItemPrivate( WeatherItem *parent )
         : m_priority( 0 ),
-          m_action( new QAction( QObject::tr( "Weather" ), parent ) ),
+          m_action( new QAction( tr( "Weather" ), parent ) ),
           m_parent( parent ),
           m_temperatureSize()
     {


More information about the Marble-commits mailing list