[QGIS Commit] r11757 - in trunk/qgis/src: app core/composer

svn_qgis at osgeo.org svn_qgis at osgeo.org
Mon Oct 5 09:34:11 EDT 2009


Author: jef
Date: 2009-10-05 09:34:10 -0400 (Mon, 05 Oct 2009)
New Revision: 11757

Modified:
   trunk/qgis/src/app/qgisapp.cpp
   trunk/qgis/src/core/composer/qgscomposermap.cpp
Log:
show revision in title bar for trunk

Modified: trunk/qgis/src/app/qgisapp.cpp
===================================================================
--- trunk/qgis/src/app/qgisapp.cpp	2009-10-04 20:50:48 UTC (rev 11756)
+++ trunk/qgis/src/app/qgisapp.cpp	2009-10-05 13:34:10 UTC (rev 11757)
@@ -227,8 +227,17 @@
   */
 static void setTitleBarText_( QWidget & qgisApp )
 {
-  QString caption = QgisApp::tr( "Quantum GIS - %1 " ).arg( QGis::QGIS_VERSION );
+  QString caption = QgisApp::tr( "Quantum GIS " );
 
+  if ( QString( QGis::QGIS_VERSION ).endsWith( "Trunk" ) )
+  {
+    caption += QString( "r%1" ).arg( QGis::QGIS_SVN_VERSION );
+  }
+  else
+  {
+    caption += QGis::QGIS_VERSION;
+  }
+
   if ( QgsProject::instance()->title().isEmpty() )
   {
     if ( QgsProject::instance()->fileName().isEmpty() )
@@ -239,12 +248,12 @@
     else
     {
       QFileInfo projectFileInfo( QgsProject::instance()->fileName() );
-      caption += " " + projectFileInfo.baseName();
+      caption += " - " + projectFileInfo.baseName();
     }
   }
   else
   {
-    caption += QgsProject::instance()->title();
+    caption += " - " + QgsProject::instance()->title();
   }
 
   qgisApp.setWindowTitle( caption );
@@ -3158,7 +3167,7 @@
   }
   geometrytype = geomDialog.selectedType();
   fileformat = geomDialog.selectedFileFormat();
-  QgsDebugMsg ( QString( "New file format will be: %1" ).arg( fileformat ) );
+  QgsDebugMsg( QString( "New file format will be: %1" ).arg( fileformat ) );
 
   std::list<std::pair<QString, QString> > attributes;
   geomDialog.attributes( attributes );
@@ -4780,8 +4789,8 @@
 #ifdef __MINGW32__
   pythonlibName.prepend( "lib" );
 #endif
-  QString version = QString("%1.%2.%3" ).arg( QGis::QGIS_VERSION_INT / 10000 ).arg( QGis::QGIS_VERSION_INT / 100 % 100 ).arg( QGis::QGIS_VERSION_INT % 100 );
-  QgsDebugMsg( QString("load library %1 (%2)").arg( pythonlibName ).arg( version ) );
+  QString version = QString( "%1.%2.%3" ).arg( QGis::QGIS_VERSION_INT / 10000 ).arg( QGis::QGIS_VERSION_INT / 100 % 100 ).arg( QGis::QGIS_VERSION_INT % 100 );
+  QgsDebugMsg( QString( "load library %1 (%2)" ).arg( pythonlibName ).arg( version ) );
   QLibrary pythonlib( pythonlibName, version );
   // It's necessary to set these two load hints, otherwise Python library won't work correctly
   // see http://lists.kde.org/?l=pykde&m=117190116820758&w=2

Modified: trunk/qgis/src/core/composer/qgscomposermap.cpp
===================================================================
--- trunk/qgis/src/core/composer/qgscomposermap.cpp	2009-10-04 20:50:48 UTC (rev 11756)
+++ trunk/qgis/src/core/composer/qgscomposermap.cpp	2009-10-05 13:34:10 UTC (rev 11757)
@@ -196,9 +196,6 @@
 
   drawBackground( painter );
 
-
-  double currentScaleFactorX = horizontalViewScaleFactor();
-
   if ( mComposition->plotStyle() == QgsComposition::Preview && mPreviewMode == Rectangle )
   {
     QFont messageFont( "", 12 );



More information about the QGIS-commit mailing list