@@ -1975,7 +1975,7 @@ static void openFilesRememberingFilter_(QString const &filterName,
19751975
19761976
19771977/* *
1978- This method prompts the user for a list of vector filenames with a dialog.
1978+ This method prompts the user for a list of vector fileNames with a dialog.
19791979 */
19801980void QgisApp::addVectorLayer ()
19811981{
@@ -2074,7 +2074,7 @@ bool QgisApp::addVectorLayers(QStringList const & theLayerQStringList, const QSt
20742074
20752075
20762076
2077- /* * This helper checks to see whether the filename appears to be a valid vector file name */
2077+ /* * This helper checks to see whether the fileName appears to be a valid vector file name */
20782078bool QgisApp::isValidVectorFileName (QString theFileNameQString)
20792079{
20802080 return (theFileNameQString.toLower ().endsWith (" .shp" ));
@@ -2527,7 +2527,7 @@ void QgisApp::fileNew(bool thePromptToSaveFlag)
25272527
25282528 QgsProject* prj = QgsProject::instance ();
25292529 prj->title ( QString::null );
2530- prj->setFilename ( QString::null );
2530+ prj->setFileName ( QString::null );
25312531 prj->clearProperties (); // why carry over properties from previous projects?
25322532
25332533 QSettings settings;
@@ -2599,7 +2599,7 @@ void QgisApp::newVectorLayer()
25992599 bool haveLastUsedFilter = false ; // by default, there is no last
26002600 // used filter
26012601 QString enc;
2602- QString filename ;
2602+ QString fileName ;
26032603
26042604 QSettings settings; // where we keep last used filter in
26052605 // persistant state
@@ -2634,14 +2634,14 @@ void QgisApp::newVectorLayer()
26342634 return ;
26352635 }
26362636
2637- filename = openFileDialog->selectedFiles ().first ();
2637+ fileName = openFileDialog->selectedFiles ().first ();
26382638 enc = openFileDialog->encoding ();
26392639
26402640 // If the file exists, delete it otherwise we'll end up loading that
26412641 // file, which can cause problems (e.g., if the file contains
26422642 // linestrings, but we're wanting to create points, we'll end up
26432643 // with a linestring file).
2644- QFile::remove (filename );
2644+ QFile::remove (fileName );
26452645
26462646 settings.setValue (" /UI/lastVectorFileFilter" , openFileDialog->selectedFilter ());
26472647
@@ -2668,20 +2668,20 @@ void QgisApp::newVectorLayer()
26682668#if 0
26692669 if(geometrytype == QGis::WKBPoint)
26702670 {
2671- createEmptyDataSource(filename ,fileformat, enc, QGis::WKBPoint, attributes);
2671+ createEmptyDataSource(fileName ,fileformat, enc, QGis::WKBPoint, attributes);
26722672 }
26732673 else if (geometrytype == QGis::WKBLineString)
26742674 {
2675- createEmptyDataSource(filename ,fileformat, enc, QGis::WKBLineString, attributes);
2675+ createEmptyDataSource(fileName ,fileformat, enc, QGis::WKBLineString, attributes);
26762676 }
26772677 else if(geometrytype == QGis::WKBPolygon)
26782678 {
2679- createEmptyDataSource(filename ,fileformat, enc, QGis::WKBPolygon, attributes);
2679+ createEmptyDataSource(fileName ,fileformat, enc, QGis::WKBPolygon, attributes);
26802680 }
26812681#endif
26822682 if (geometrytype != QGis::WKBUnknown)
26832683 {
2684- createEmptyDataSource (filename ,fileformat, enc, geometrytype, attributes);
2684+ createEmptyDataSource (fileName ,fileformat, enc, geometrytype, attributes);
26852685 }
26862686 else
26872687 {
@@ -2696,9 +2696,9 @@ void QgisApp::newVectorLayer()
26962696 }
26972697
26982698 // then add the layer to the view
2699- QStringList filenames ;
2700- filenames .append (filename );
2701- addVectorLayers (filenames , enc);
2699+ QStringList fileNames ;
2700+ fileNames .append (fileName );
2701+ addVectorLayers (fileNames , enc);
27022702}
27032703
27042704void QgisApp::fileOpen ()
@@ -2749,7 +2749,7 @@ void QgisApp::fileOpen()
27492749 delete mComposer ;
27502750 mComposer = new QgsComposer (this );
27512751
2752- QgsProject::instance ()->setFilename ( fullPath );
2752+ QgsProject::instance ()->setFileName ( fullPath );
27532753
27542754 try
27552755 {
@@ -2873,7 +2873,7 @@ bool QgisApp::fileSave()
28732873 return false ;
28742874 }
28752875
2876- // if we don't have a filename , then obviously we need to get one; note
2876+ // if we don't have a fileName , then obviously we need to get one; note
28772877 // that the project file name is reset to null in fileNew()
28782878 QFileInfo fullPath;
28792879
@@ -2917,7 +2917,7 @@ bool QgisApp::fileSave()
29172917 }
29182918
29192919
2920- QgsProject::instance ()->setFilename ( fullPath.filePath () );
2920+ QgsProject::instance ()->setFileName ( fullPath.filePath () );
29212921 }
29222922
29232923 try
@@ -2964,7 +2964,7 @@ void QgisApp::fileSaveAs()
29642964 QString lastUsedDir = settings.value (" /UI/lastProjectDir" , " ." ).toString ();
29652965
29662966 auto_ptr<QFileDialog> saveFileDialog ( new QFileDialog (this ,
2967- tr (" Choose a filename to save the QGIS project file as" ),
2967+ tr (" Choose a fileName to save the QGIS project file as" ),
29682968 lastUsedDir, QObject::tr (" QGis files (*.qgs)" )) );
29692969
29702970 saveFileDialog->setFileMode (QFileDialog::AnyFile);
@@ -2973,7 +2973,7 @@ void QgisApp::fileSaveAs()
29732973
29742974 saveFileDialog->setConfirmOverwrite ( true );
29752975
2976- // if we don't have a filename , then obviously we need to get one; note
2976+ // if we don't have a fileName , then obviously we need to get one; note
29772977 // that the project file name is reset to null in fileNew()
29782978 QFileInfo fullPath;
29792979
@@ -3003,7 +3003,7 @@ void QgisApp::fileSaveAs()
30033003
30043004 try
30053005 {
3006- QgsProject::instance ()->setFilename ( fullPath.filePath () );
3006+ QgsProject::instance ()->setFileName ( fullPath.filePath () );
30073007
30083008 if ( QgsProject::instance ()->write () )
30093009 {
@@ -3205,7 +3205,7 @@ void QgisApp::saveMapAsImage()
32053205
32063206 // create a file dialog using the the filter list generated above
32073207 std::auto_ptr < QFileDialog > myQFileDialog ( new QFileDialog (this ,
3208- tr (" Choose a filename to save the map image as" ),
3208+ tr (" Choose a fileName to save the map image as" ),
32093209 myLastUsedDir, myFilters) );
32103210
32113211 // allow for selection of more than one file
@@ -3222,7 +3222,7 @@ void QgisApp::saveMapAsImage()
32223222 }
32233223
32243224
3225- // prompt the user for a filename
3225+ // prompt the user for a fileName
32263226 QString myOutputFileNameQString; // = myQFileDialog->getSaveFileName(); //delete this
32273227 if (myQFileDialog->exec () == QDialog::Accepted)
32283228 {
@@ -3233,7 +3233,7 @@ void QgisApp::saveMapAsImage()
32333233 QgsDebugMsg (" Selected filter: " + myFilterString);
32343234 QgsDebugMsg (" Image type to be passed to mapcanvas: " + myFilterMap[myFilterString]);
32353235
3236- // Add the file type suffix to the filename if required
3236+ // Add the file type suffix to the fileName if required
32373237 if (!myOutputFileNameQString.endsWith (myFilterMap[myFilterString]))
32383238 {
32393239 myOutputFileNameQString += " ." + myFilterMap[myFilterString];
@@ -3259,7 +3259,7 @@ void QgisApp::saveMapAsImage(QString theImageFileNameQString, QPixmap * theQPixm
32593259{
32603260 if ( theImageFileNameQString==" " )
32613261 {
3262- // no filename chosen
3262+ // no fileName chosen
32633263 return ;
32643264 }
32653265 else
0 commit comments