From b7a678a289894b1414f89160d66eff3f814bbce8 Mon Sep 17 00:00:00 2001 From: gsherman Date: Fri, 27 Feb 2004 17:41:29 +0000 Subject: [PATCH] Corrected debug statements in main.cpp and added a bit of verbiage to the help text git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@955 c8812cc2-4d05-0410-92ff-de0c093fc19c --- src/main.cpp | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index 4b34f089f55..f18b24b36ee 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -121,10 +121,19 @@ int main(int argc, char *argv[]) // Add any remaining args to the file list - we will attempt to load them // as layers in the map view further down.... +#ifdef QGISDEBUG + std::cout << "Files specified on command line: " << optind << std::endl; +#endif if (optind < argc) { while (optind < argc) + { +#ifdef QGISDEBUG + int idx = optind; + std::cout << idx << ": " << argv[idx] << std::endl; +#endif myFileList->append(argv[optind++]); + } } ///////////////////////////////////////////////////////////////////// @@ -179,6 +188,9 @@ int main(int argc, char *argv[]) std::cout << " vectors, and QGIS project files (.qgs): " << std::endl ; std::cout << " 1. Rasters - Supported formats include GeoTiff, DEM " << std::endl ; std::cout << " and others supported by GDAL" << std::endl ; + std::cout << " 2. Vectors - Supported formats include ESRI Shapefiles " << std::endl ; + std::cout << " and others supported by OGR and PostgreSQL layers using" << std::endl ; + std::cout << " the PostGIS extension" << std::endl ; return 0; } @@ -195,12 +207,16 @@ int main(int argc, char *argv[]) ///////////////////////////////////////////////////////////////////// // autoload any filenames that were passed in on the command line ///////////////////////////////////////////////////////////////////// +#ifdef QGISDEBUG + std::cout << "Number of files in myFileList: " << myFileList->count() << std::endl; +#endif for ( QStringList::Iterator myIterator = myFileList->begin(); myIterator != myFileList->end(); ++myIterator ) { - QString myLayerName = *myIterator; + #ifdef QGISDEBUG - printf("Trying to load file : %s\n", myLayerName); + std::cout << "Trying to load file : " << *myIterator << std::endl; #endif + QString myLayerName = *myIterator; // try to add all these layers - any unsupported file types will // be rejected automatically // The funky bool ok is so this can be debugged a bit easier...