[QGIS Commit] r13370 - in trunk/qgis: scripts src/app src/app/attributetable src/app/composer src/gui src/gui/symbology-ng src/plugins/evis/databaseconnection src/plugins/grass src/providers/grass src/providers/memory

svn_qgis at osgeo.org svn_qgis at osgeo.org
Sat Apr 24 14:23:16 EDT 2010


Author: jef
Date: 2010-04-24 14:23:16 -0400 (Sat, 24 Apr 2010)
New Revision: 13370

Modified:
   trunk/qgis/scripts/qgm2cpp.pl
   trunk/qgis/scripts/update_ts_files.sh
   trunk/qgis/src/app/CMakeLists.txt
   trunk/qgis/src/app/attributetable/qgsattributetableview.h
   trunk/qgis/src/app/composer/qgscomposermanager.cpp
   trunk/qgis/src/app/qgsdisplayangle.h
   trunk/qgis/src/app/qgsmaptoolreshape.h
   trunk/qgis/src/app/qgsmaptoolrotatepointsymbols.h
   trunk/qgis/src/gui/CMakeLists.txt
   trunk/qgis/src/gui/qgscredentialdialog.h
   trunk/qgis/src/gui/symbology-ng/qgspenstylecombobox.h
   trunk/qgis/src/plugins/evis/databaseconnection/evisdatabaseconnection.h
   trunk/qgis/src/plugins/grass/qgsgrassedit.cpp
   trunk/qgis/src/providers/grass/CMakeLists.txt
   trunk/qgis/src/providers/grass/qgsgrassprovider.h
   trunk/qgis/src/providers/memory/CMakeLists.txt
   trunk/qgis/src/providers/memory/qgsmemoryprovider.h
Log:
make update_ts_files.sh less noisy and a bit more failsafe and fix a bunch or lupdate warnings

Modified: trunk/qgis/scripts/qgm2cpp.pl
===================================================================
--- trunk/qgis/scripts/qgm2cpp.pl	2010-04-24 18:17:30 UTC (rev 13369)
+++ trunk/qgis/scripts/qgm2cpp.pl	2010-04-24 18:23:16 UTC (rev 13370)
@@ -46,10 +46,10 @@
 
 open I, "find src/plugins/grass -name '*.qgm' -o -name '*.qgc'|";
 while($file = <I>) {
-	print STDERR "$file\n";
+	#print STDERR "$file\n";
 	chop $file;
 	parse XMLin($file, ForceArray=>1);
-	print STDERR "$file DONE\n";
+	#print STDERR "$file DONE\n";
 }
 close I;
 

Modified: trunk/qgis/scripts/update_ts_files.sh
===================================================================
--- trunk/qgis/scripts/update_ts_files.sh	2010-04-24 18:17:30 UTC (rev 13369)
+++ trunk/qgis/scripts/update_ts_files.sh	2010-04-24 18:23:16 UTC (rev 13370)
@@ -5,16 +5,50 @@
 # 3. remove the .pro
 # Note the .pro file must NOT be named qgis.pro as this
 # name is reserved for the Windows qmake project file
-# update_ts_files.sh,v 1.3 2004/07/14 18:16:24 gsherman Exp
+# $Id$
 
 set -e
 
+cleanup() {
+	if [ -f i18n/qt_ts.tar ]; then
+		echo Restoring Qt translations
+		tar -xf i18n/qt_ts.tar
+	fi
+	if [ -f i18n/qgis_ts.tar ]; then
+		echo Restoring excluded translations
+		tar -xf i18n/qgis_ts.tar
+	fi
+
+	echo Removing temporary files
+	perl -i.bak -ne 'print unless /^\s+<location.*python-i18n\.cpp.*$/;' i18n/qgis_*.ts
+	for i in \
+		python/python-i18n.{ts,cpp} \
+		python/plugins/*/python-i18n.{ts,cpp} \
+		i18n/qgis_*.ts.bak \
+		src/plugins/grass/grasslabels-i18n.cpp \
+		i18n/qt_ts.tar \
+		i18n/qgis_ts.tar \
+		qgis_ts.pro
+	do
+		[ -f "$i" ] && rm "$i"
+	done
+
+	for i in \
+		src/plugins/plugin_template/plugingui.cpp \
+		src/plugins/plugin_template/plugin.cpp
+	do
+		[ -f "$i.save" ] && mv "$i.save" "$i"
+	done
+}
+
+trap cleanup EXIT
+
 PATH=$QTDIR/bin:$PATH
 
 #first tar the qt_xx.ts files in i18n folder such that lupdate does not 
 #merge the qgis strings to them
-echo Creating qt_ts.tar
-tar --remove-files -cvf i18n/qt_ts.tar i18n/qt_*.ts
+echo Saving Qt translations
+tar --remove-files -cf i18n/qt_ts.tar i18n/qt_*.ts
 exclude=
 opts=
 for i in "$@"; do
@@ -25,7 +59,8 @@
   fi
 done
 if [ -n "$exclude" ]; then
-  tar --remove-files -cvf i18n/qgis_ts.tar i18n/qgis_*.ts$exclude
+  echo Saving excluded translations
+  tar --remove-files -cf i18n/qgis_ts.tar i18n/qgis_*.ts$exclude
 fi
 echo Updating python translations
 cd python
@@ -40,21 +75,16 @@
 	rm python-i18n.ts
 	cd ../../..
 done
+echo Updating GRASS module translations
 perl scripts/qgm2cpp.pl >src/plugins/grass/grasslabels-i18n.cpp
+mv src/plugins/plugin_template/plugingui.cpp src/plugins/plugin_template/plugingui.cpp.save
 echo Creating qmake project file
+for i in \
+	src/plugins/plugin_template/plugingui.cpp \
+	src/plugins/plugin_template/plugin.cpp
+do
+	[ -f "$i" ] && mv "$i" "$i.save"
+done
 qmake -project -o qgis_ts.pro -nopwd src python i18n
-echo Updating translation files
+echo Updating translations
 lupdate$opts -verbose qgis_ts.pro
-echo Removing temporary python translation files
-perl -i.bak -ne 'print unless /^\s+<location.*python-i18n\.cpp.*$/;' i18n/qgis_*.ts
-rm python/python-i18n.cpp python/plugins/*/python-i18n.cpp i18n/qgis_*.ts.bak src/plugins/grass/grasslabels-i18n.cpp
-echo Removing qmake project file
-rm qgis_ts.pro
-echo Unpacking qt_ts.tar
-tar -xvf i18n/qt_ts.tar 
-rm i18n/qt_ts.tar
-if [ -f i18n/qgis_ts.tar ]; then
-  echo Unpacking i18n/qgis_ts.tar
-  tar -xvf i18n/qgis_ts.tar 
-  rm i18n/qgis_ts.tar
-fi


Property changes on: trunk/qgis/scripts/update_ts_files.sh
___________________________________________________________________
Added: svn:keywords
   + Author Date Id Revision

Modified: trunk/qgis/src/app/CMakeLists.txt
===================================================================
--- trunk/qgis/src/app/CMakeLists.txt	2010-04-24 18:17:30 UTC (rev 13369)
+++ trunk/qgis/src/app/CMakeLists.txt	2010-04-24 18:23:16 UTC (rev 13370)
@@ -131,6 +131,7 @@
   qgisappinterface.h
   qgsabout.h
   qgsaddattrdialog.h
+  qgsdisplayangle.h
   qgsannotationwidget.h
   qgsattributeactiondialog.h
   qgsattributedialog.h
@@ -160,6 +161,8 @@
   qgsmaptooladdring.h
   qgsmaptoolmovefeature.h
   qgsmaptoolnodetool.h
+  qgsmaptoolreshape.h
+  qgsmaptoolrotatepointsymbols.h
   qgsmaptoolselect.h
   qgsmaptooladdvertex.h
   qgsmaptooldeletering.h

Modified: trunk/qgis/src/app/attributetable/qgsattributetableview.h
===================================================================
--- trunk/qgis/src/app/attributetable/qgsattributetableview.h	2010-04-24 18:17:30 UTC (rev 13369)
+++ trunk/qgis/src/app/attributetable/qgsattributetableview.h	2010-04-24 18:23:16 UTC (rev 13370)
@@ -28,6 +28,8 @@
 
 class QgsAttributeTableView: public QTableView
 {
+    Q_OBJECT
+
   public:
     QgsAttributeTableView( QWidget* parent = NULL );
     virtual ~QgsAttributeTableView();

Modified: trunk/qgis/src/app/composer/qgscomposermanager.cpp
===================================================================
--- trunk/qgis/src/app/composer/qgscomposermanager.cpp	2010-04-24 18:17:30 UTC (rev 13369)
+++ trunk/qgis/src/app/composer/qgscomposermanager.cpp	2010-04-24 18:23:16 UTC (rev 13370)
@@ -211,7 +211,6 @@
     raise();
     activateWindow();
   }
-}
 #endif //0
 }
 

Modified: trunk/qgis/src/app/qgsdisplayangle.h
===================================================================
--- trunk/qgis/src/app/qgsdisplayangle.h	2010-04-24 18:17:30 UTC (rev 13369)
+++ trunk/qgis/src/app/qgsdisplayangle.h	2010-04-24 18:23:16 UTC (rev 13370)
@@ -21,6 +21,8 @@
 /**A class that displays results of angle measurements with the proper unit*/
 class QgsDisplayAngle: public QDialog, private Ui::QgsDisplayAngleBase
 {
+    Q_OBJECT
+
   public:
     QgsDisplayAngle( QWidget * parent = 0, Qt::WindowFlags f = 0 );
     ~QgsDisplayAngle();

Modified: trunk/qgis/src/app/qgsmaptoolreshape.h
===================================================================
--- trunk/qgis/src/app/qgsmaptoolreshape.h	2010-04-24 18:17:30 UTC (rev 13369)
+++ trunk/qgis/src/app/qgsmaptoolreshape.h	2010-04-24 18:23:16 UTC (rev 13370)
@@ -22,6 +22,8 @@
 /**A map tool that draws a line and splits the features cut by the line*/
 class QgsMapToolReshape: public QgsMapToolCapture
 {
+    Q_OBJECT
+
   public:
     QgsMapToolReshape( QgsMapCanvas* canvas );
     virtual ~QgsMapToolReshape();

Modified: trunk/qgis/src/app/qgsmaptoolrotatepointsymbols.h
===================================================================
--- trunk/qgis/src/app/qgsmaptoolrotatepointsymbols.h	2010-04-24 18:17:30 UTC (rev 13369)
+++ trunk/qgis/src/app/qgsmaptoolrotatepointsymbols.h	2010-04-24 18:23:16 UTC (rev 13370)
@@ -24,6 +24,8 @@
 /**A class that allows to interactively manipulate the value of the rotation field(s) for point layers*/
 class QgsMapToolRotatePointSymbols: public QgsMapToolEdit
 {
+    Q_OBJECT
+
   public:
     QgsMapToolRotatePointSymbols( QgsMapCanvas* canvas );
     ~QgsMapToolRotatePointSymbols();

Modified: trunk/qgis/src/gui/CMakeLists.txt
===================================================================
--- trunk/qgis/src/gui/CMakeLists.txt	2010-04-24 18:17:30 UTC (rev 13369)
+++ trunk/qgis/src/gui/CMakeLists.txt	2010-04-24 18:23:16 UTC (rev 13370)
@@ -71,6 +71,7 @@
 symbology-ng/qgsvectorrandomcolorrampv2dialog.h
 symbology-ng/qgsvectorcolorbrewercolorrampv2dialog.h
 symbology-ng/characterwidget.h
+symbology-ng/qgspenstylecombobox.h
 
 qgsattributeeditor.h
 qgscomposerview.h

Modified: trunk/qgis/src/gui/qgscredentialdialog.h
===================================================================
--- trunk/qgis/src/gui/qgscredentialdialog.h	2010-04-24 18:17:30 UTC (rev 13369)
+++ trunk/qgis/src/gui/qgscredentialdialog.h	2010-04-24 18:23:16 UTC (rev 13370)
@@ -20,7 +20,6 @@
 
 #include <ui_qgscredentialdialog.h>
 #include <qgisgui.h>
-#include "qgscredentialdialog.h"
 #include "qgscredentials.h"
 
 #include <QString>

Modified: trunk/qgis/src/gui/symbology-ng/qgspenstylecombobox.h
===================================================================
--- trunk/qgis/src/gui/symbology-ng/qgspenstylecombobox.h	2010-04-24 18:17:30 UTC (rev 13369)
+++ trunk/qgis/src/gui/symbology-ng/qgspenstylecombobox.h	2010-04-24 18:23:16 UTC (rev 13370)
@@ -6,6 +6,8 @@
 
 class GUI_EXPORT QgsPenStyleComboBox : public QComboBox
 {
+    Q_OBJECT
+
   public:
     QgsPenStyleComboBox( QWidget* parent = NULL );
 
@@ -20,6 +22,8 @@
 
 class GUI_EXPORT QgsPenJoinStyleComboBox : public QComboBox
 {
+    Q_OBJECT
+
   public:
     QgsPenJoinStyleComboBox( QWidget* parent = NULL );
 
@@ -30,6 +34,8 @@
 
 class GUI_EXPORT QgsPenCapStyleComboBox : public QComboBox
 {
+    Q_OBJECT
+
   public:
     QgsPenCapStyleComboBox( QWidget* parent = NULL );
 

Modified: trunk/qgis/src/plugins/evis/databaseconnection/evisdatabaseconnection.h
===================================================================
--- trunk/qgis/src/plugins/evis/databaseconnection/evisdatabaseconnection.h	2010-04-24 18:17:30 UTC (rev 13369)
+++ trunk/qgis/src/plugins/evis/databaseconnection/evisdatabaseconnection.h	2010-04-24 18:23:16 UTC (rev 13370)
@@ -28,8 +28,6 @@
 #ifndef EVISDATABASECONNECTION_H
 #define EVISDATABASECONNECTION_H
 
-#include "evisquerydefinition.h"
-
 #include <QStringList>
 #include <QtSql/QSqlDatabase>
 #include <QtSql/QSqlQuery>

Modified: trunk/qgis/src/plugins/grass/qgsgrassedit.cpp
===================================================================
--- trunk/qgis/src/plugins/grass/qgsgrassedit.cpp	2010-04-24 18:17:30 UTC (rev 13369)
+++ trunk/qgis/src/plugins/grass/qgsgrassedit.cpp	2010-04-24 18:23:16 UTC (rev 13370)
@@ -43,6 +43,7 @@
 #include <QMessageBox>
 #include <QSettings>
 #include <QToolBar>
+#include <QDebug>
 
 extern "C"
 {
@@ -116,7 +117,6 @@
   return editor;
 }
 
-#include<QDebug>
 void QgsGrassEditAttributeTableItemDelegate::setEditorData( QWidget *editor,
     const QModelIndex &index ) const
 {
@@ -894,8 +894,8 @@
 
       /* Count areas on both sides */
       nareas = 0;
-      if ( left > 0 || (left < 0 && mProvider->isleArea(-left) > 0 ) ) nareas++;
-      if ( right > 0 || (right < 0 && mProvider->isleArea(-right) > 0 ) ) nareas++;
+      if ( left > 0 || ( left < 0 && mProvider->isleArea( -left ) > 0 ) ) nareas++;
+      if ( right > 0 || ( right < 0 && mProvider->isleArea( -right ) > 0 ) ) nareas++;
       if ( nareas == 0 ) return SYMB_BOUNDARY_0;
       else if ( nareas == 1 ) return SYMB_BOUNDARY_1;
       else return SYMB_BOUNDARY_2;

Modified: trunk/qgis/src/providers/grass/CMakeLists.txt
===================================================================
--- trunk/qgis/src/providers/grass/CMakeLists.txt	2010-04-24 18:17:30 UTC (rev 13369)
+++ trunk/qgis/src/providers/grass/CMakeLists.txt	2010-04-24 18:23:16 UTC (rev 13370)
@@ -24,9 +24,9 @@
   ${GEOS_INCLUDE_DIR}
 )
 
+QT4_WRAP_CPP(GRASS_MOC_SRCS qgsgrassprovider.h)
+ADD_LIBRARY (qgisgrass SHARED ${GRASS_LIB_SRCS} ${GRASS_MOC_SRCS})
 
-ADD_LIBRARY (qgisgrass SHARED ${GRASS_LIB_SRCS})
-
 SET_TARGET_PROPERTIES(qgisgrass PROPERTIES VERSION ${COMPLETE_VERSION} SOVERSION ${COMPLETE_VERSION})
 
 IF (WIN32)

Modified: trunk/qgis/src/providers/grass/qgsgrassprovider.h
===================================================================
--- trunk/qgis/src/providers/grass/qgsgrassprovider.h	2010-04-24 18:17:30 UTC (rev 13369)
+++ trunk/qgis/src/providers/grass/qgsgrassprovider.h	2010-04-24 18:23:16 UTC (rev 13370)
@@ -110,6 +110,8 @@
 */
 class GRASS_EXPORT QgsGrassProvider : public QgsVectorDataProvider
 {
+    Q_OBJECT
+
   public:
 
     QgsGrassProvider( QString uri = QString() );
@@ -282,7 +284,7 @@
 
     /** Get isle area
      *   @param isle number
-     *   @return area number 
+     *   @return area number
      */
     int isleArea( int isle );
 

Modified: trunk/qgis/src/providers/memory/CMakeLists.txt
===================================================================
--- trunk/qgis/src/providers/memory/CMakeLists.txt	2010-04-24 18:17:30 UTC (rev 13369)
+++ trunk/qgis/src/providers/memory/CMakeLists.txt	2010-04-24 18:23:16 UTC (rev 13370)
@@ -7,7 +7,8 @@
   ${GEOS_INCLUDE_DIR}
 )
 
-ADD_LIBRARY(memoryprovider MODULE ${MEMORY_SRCS})
+QT4_WRAP_CPP(MEMORY_MOC_SRCS qgsmemoryprovider.h)
+ADD_LIBRARY(memoryprovider MODULE ${MEMORY_SRCS} ${MEMORY_MOC_SRCS})
 
 TARGET_LINK_LIBRARIES(memoryprovider
   qgis_core

Modified: trunk/qgis/src/providers/memory/qgsmemoryprovider.h
===================================================================
--- trunk/qgis/src/providers/memory/qgsmemoryprovider.h	2010-04-24 18:17:30 UTC (rev 13369)
+++ trunk/qgis/src/providers/memory/qgsmemoryprovider.h	2010-04-24 18:23:16 UTC (rev 13370)
@@ -22,6 +22,8 @@
 
 class QgsMemoryProvider : public QgsVectorDataProvider
 {
+    Q_OBJECT
+
   public:
     QgsMemoryProvider( QString uri = QString() );
 



More information about the QGIS-commit mailing list