[QGIS Commit] r9135 - in trunk/qgis: python/core src/app src/core
tests/algorithms/qgsproject
svn_qgis at osgeo.org
svn_qgis at osgeo.org
Sat Aug 23 15:38:17 EDT 2008
Author: timlinux
Date: 2008-08-23 15:38:17 -0400 (Sat, 23 Aug 2008)
New Revision: 9135
Modified:
trunk/qgis/python/core/qgsproject.sip
trunk/qgis/src/app/qgisapp.cpp
trunk/qgis/src/core/qgsmaplayer.cpp
trunk/qgis/src/core/qgsproject.cpp
trunk/qgis/src/core/qgsproject.h
trunk/qgis/tests/algorithms/qgsproject/projecttest.h
Log:
Use fileName() instead of setFilename() for filename accessor
Modified: trunk/qgis/python/core/qgsproject.sip
===================================================================
--- trunk/qgis/python/core/qgsproject.sip 2008-08-23 19:15:03 UTC (rev 9134)
+++ trunk/qgis/python/core/qgsproject.sip 2008-08-23 19:38:17 UTC (rev 9135)
@@ -62,7 +62,7 @@
void setFilename( const QString & name );
/** returns file name */
- QString setFilename() const;
+ QString fileName() const;
//@}
Modified: trunk/qgis/src/app/qgisapp.cpp
===================================================================
--- trunk/qgis/src/app/qgisapp.cpp 2008-08-23 19:15:03 UTC (rev 9134)
+++ trunk/qgis/src/app/qgisapp.cpp 2008-08-23 19:38:17 UTC (rev 9135)
@@ -224,14 +224,14 @@
if ( QgsProject::instance()->title().isEmpty() )
{
- if ( QgsProject::instance()->setFilename().isEmpty() )
+ if ( QgsProject::instance()->fileName().isEmpty() )
{
// no project title nor file name, so just leave caption with
// application name and version
}
else
{
- QFileInfo projectFileInfo( QgsProject::instance()->setFilename() );
+ QFileInfo projectFileInfo( QgsProject::instance()->fileName() );
caption += projectFileInfo.baseName();
}
}
@@ -2882,7 +2882,7 @@
// the current project file name is empty
bool isNewProject = false;
- if ( QgsProject::instance()->setFilename().isNull() )
+ if ( QgsProject::instance()->fileName().isNull() )
{
isNewProject = true;
@@ -2925,7 +2925,7 @@
if ( QgsProject::instance()->write() )
{
setTitleBarText_(*this); // update title bar
- statusBar()->showMessage(tr("Saved project to:") + " " + QgsProject::instance()->setFilename() );
+ statusBar()->showMessage(tr("Saved project to:") + " " + QgsProject::instance()->fileName() );
if (isNewProject)
{
@@ -2938,13 +2938,13 @@
{
QMessageBox::critical(this,
tr("Unable to save project"),
- tr("Unable to save project to ") + QgsProject::instance()->setFilename() );
+ tr("Unable to save project to ") + QgsProject::instance()->fileName() );
}
}
catch ( std::exception & e )
{
QMessageBox::critical( this,
- tr("Unable to save project ") + QgsProject::instance()->setFilename(),
+ tr("Unable to save project ") + QgsProject::instance()->fileName(),
QString::fromLocal8Bit( e.what() ) );
}
return true;
@@ -3008,7 +3008,7 @@
if ( QgsProject::instance()->write() )
{
setTitleBarText_(*this); // update title bar
- statusBar()->showMessage(tr("Saved project to:") + " " + QgsProject::instance()->setFilename() );
+ statusBar()->showMessage(tr("Saved project to:") + " " + QgsProject::instance()->fileName() );
// add this to the list of recently used project files
saveRecentProjectPath(fullPath.filePath(), settings);
}
@@ -3016,13 +3016,13 @@
{
QMessageBox::critical(this,
tr("Unable to save project"),
- tr("Unable to save project to ") + QgsProject::instance()->setFilename() );
+ tr("Unable to save project to ") + QgsProject::instance()->fileName() );
}
}
catch ( std::exception & e )
{
QMessageBox::critical( 0x0,
- tr("Unable to save project ") + QgsProject::instance()->setFilename(),
+ tr("Unable to save project ") + QgsProject::instance()->fileName(),
QString::fromLocal8Bit( e.what() ),
QMessageBox::Ok,
Qt::NoButton );
Modified: trunk/qgis/src/core/qgsmaplayer.cpp
===================================================================
--- trunk/qgis/src/core/qgsmaplayer.cpp 2008-08-23 19:15:03 UTC (rev 9134)
+++ trunk/qgis/src/core/qgsmaplayer.cpp 2008-08-23 19:38:17 UTC (rev 9135)
@@ -481,7 +481,7 @@
}
else
{
- QFileInfo project( QgsProject::instance()->setFilename() );
+ QFileInfo project( QgsProject::instance()->fileName() );
QgsDebugMsg( QString("project filename: %1").arg( project.absoluteFilePath() ) );
QString qml;
Modified: trunk/qgis/src/core/qgsproject.cpp
===================================================================
--- trunk/qgis/src/core/qgsproject.cpp 2008-08-23 19:15:03 UTC (rev 9134)
+++ trunk/qgis/src/core/qgsproject.cpp 2008-08-23 19:38:17 UTC (rev 9135)
@@ -411,10 +411,10 @@
- QString QgsProject::setFilename() const
+ QString QgsProject::fileName() const
{
return imp_->file.fileName();
- } // QString QgsProject::setFilename() const
+ } // QString QgsProject::fileName() const
Modified: trunk/qgis/src/core/qgsproject.h
===================================================================
--- trunk/qgis/src/core/qgsproject.h 2008-08-23 19:15:03 UTC (rev 9134)
+++ trunk/qgis/src/core/qgsproject.h 2008-08-23 19:38:17 UTC (rev 9135)
@@ -95,7 +95,7 @@
void setFilename( QString const & name );
/** returns file name */
- QString setFilename() const;
+ QString fileName() const;
//@}
Modified: trunk/qgis/tests/algorithms/qgsproject/projecttest.h
===================================================================
--- trunk/qgis/tests/algorithms/qgsproject/projecttest.h 2008-08-23 19:15:03 UTC (rev 9134)
+++ trunk/qgis/tests/algorithms/qgsproject/projecttest.h 2008-08-23 19:38:17 UTC (rev 9135)
@@ -103,7 +103,7 @@
QgsProject::instance()->dirty( false );
QgsProject::instance()->setFilename( mFile );
- CPPUNIT_ASSERT( mFile == QgsProject::instance()->setFilename() );
+ CPPUNIT_ASSERT( mFile == QgsProject::instance()->fileName() );
CPPUNIT_ASSERT( QgsProject::instance()->isDirty() );
} // testFileName
More information about the QGIS-commit
mailing list