Skip to content

Commit 9576836

Browse files
author
timlinux
committedAug 23, 2008

File tree

6 files changed

+15
-15
lines changed

6 files changed

+15
-15
lines changed
 

‎python/core/qgsproject.sip

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ public:
6262
void setFilename( const QString & name );
6363

6464
/** returns file name */
65-
QString setFilename() const;
65+
QString fileName() const;
6666
//@}
6767

6868

‎src/app/qgisapp.cpp

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -224,14 +224,14 @@ static void setTitleBarText_( QWidget & qgisApp )
224224

225225
if ( QgsProject::instance()->title().isEmpty() )
226226
{
227-
if ( QgsProject::instance()->setFilename().isEmpty() )
227+
if ( QgsProject::instance()->fileName().isEmpty() )
228228
{
229229
// no project title nor file name, so just leave caption with
230230
// application name and version
231231
}
232232
else
233233
{
234-
QFileInfo projectFileInfo( QgsProject::instance()->setFilename() );
234+
QFileInfo projectFileInfo( QgsProject::instance()->fileName() );
235235
caption += projectFileInfo.baseName();
236236
}
237237
}
@@ -2882,7 +2882,7 @@ bool QgisApp::fileSave()
28822882
// the current project file name is empty
28832883
bool isNewProject = false;
28842884

2885-
if ( QgsProject::instance()->setFilename().isNull() )
2885+
if ( QgsProject::instance()->fileName().isNull() )
28862886
{
28872887
isNewProject = true;
28882888

@@ -2925,7 +2925,7 @@ bool QgisApp::fileSave()
29252925
if ( QgsProject::instance()->write() )
29262926
{
29272927
setTitleBarText_(*this); // update title bar
2928-
statusBar()->showMessage(tr("Saved project to:") + " " + QgsProject::instance()->setFilename() );
2928+
statusBar()->showMessage(tr("Saved project to:") + " " + QgsProject::instance()->fileName() );
29292929

29302930
if (isNewProject)
29312931
{
@@ -2938,13 +2938,13 @@ bool QgisApp::fileSave()
29382938
{
29392939
QMessageBox::critical(this,
29402940
tr("Unable to save project"),
2941-
tr("Unable to save project to ") + QgsProject::instance()->setFilename() );
2941+
tr("Unable to save project to ") + QgsProject::instance()->fileName() );
29422942
}
29432943
}
29442944
catch ( std::exception & e )
29452945
{
29462946
QMessageBox::critical( this,
2947-
tr("Unable to save project ") + QgsProject::instance()->setFilename(),
2947+
tr("Unable to save project ") + QgsProject::instance()->fileName(),
29482948
QString::fromLocal8Bit( e.what() ) );
29492949
}
29502950
return true;
@@ -3008,21 +3008,21 @@ void QgisApp::fileSaveAs()
30083008
if ( QgsProject::instance()->write() )
30093009
{
30103010
setTitleBarText_(*this); // update title bar
3011-
statusBar()->showMessage(tr("Saved project to:") + " " + QgsProject::instance()->setFilename() );
3011+
statusBar()->showMessage(tr("Saved project to:") + " " + QgsProject::instance()->fileName() );
30123012
// add this to the list of recently used project files
30133013
saveRecentProjectPath(fullPath.filePath(), settings);
30143014
}
30153015
else
30163016
{
30173017
QMessageBox::critical(this,
30183018
tr("Unable to save project"),
3019-
tr("Unable to save project to ") + QgsProject::instance()->setFilename() );
3019+
tr("Unable to save project to ") + QgsProject::instance()->fileName() );
30203020
}
30213021
}
30223022
catch ( std::exception & e )
30233023
{
30243024
QMessageBox::critical( 0x0,
3025-
tr("Unable to save project ") + QgsProject::instance()->setFilename(),
3025+
tr("Unable to save project ") + QgsProject::instance()->fileName(),
30263026
QString::fromLocal8Bit( e.what() ),
30273027
QMessageBox::Ok,
30283028
Qt::NoButton );

‎src/core/qgsmaplayer.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -481,7 +481,7 @@ QString QgsMapLayer::loadNamedStyle ( const QString theURI, bool &theResultFlag)
481481
}
482482
else
483483
{
484-
QFileInfo project( QgsProject::instance()->setFilename() );
484+
QFileInfo project( QgsProject::instance()->fileName() );
485485
QgsDebugMsg( QString("project filename: %1").arg( project.absoluteFilePath() ) );
486486

487487
QString qml;

‎src/core/qgsproject.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -411,10 +411,10 @@ QgsProject * QgsProject::theProject_;
411411

412412

413413

414-
QString QgsProject::setFilename() const
414+
QString QgsProject::fileName() const
415415
{
416416
return imp_->file.fileName();
417-
} // QString QgsProject::setFilename() const
417+
} // QString QgsProject::fileName() const
418418

419419

420420

‎src/core/qgsproject.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ class CORE_EXPORT QgsProject : public QObject
9595
void setFilename( QString const & name );
9696

9797
/** returns file name */
98-
QString setFilename() const;
98+
QString fileName() const;
9999
//@}
100100

101101

‎tests/algorithms/qgsproject/projecttest.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ class ProjectTest : public CppUnit::TestFixture
103103
QgsProject::instance()->dirty( false );
104104
QgsProject::instance()->setFilename( mFile );
105105

106-
CPPUNIT_ASSERT( mFile == QgsProject::instance()->setFilename() );
106+
CPPUNIT_ASSERT( mFile == QgsProject::instance()->fileName() );
107107
CPPUNIT_ASSERT( QgsProject::instance()->isDirty() );
108108
} // testFileName
109109

0 commit comments

Comments
 (0)
Please sign in to comment.