Skip to content
Permalink
Browse files
cleanup cleanup
- remove method names from QgsDebugMsg calls as they are already included in the output
- replace filename with file name in strings and comments instead of fileName (same for layerName)
- fix debugging output in interpolation plugin
  (QgsDebugMsg migration ate the last argument where std::flush was used)
- fix some common typos



git-svn-id: http://svn.osgeo.org/qgis/trunk@9150 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
jef committed Aug 24, 2008
1 parent f3fd51c commit db574063e537800e79e90b5bf2a319189cb4784a
Showing with 1,057 additions and 1,181 deletions.
  1. +2 −2 python/core/qgslogger.sip
  2. +1 −1 python/core/qgsmarkercatalogue.sip
  3. +1 −1 python/core/qgsrasterlayer.sip
  4. +6 −6 src/app/composer/qgscomposer.cpp
  5. +2 −2 src/app/legend/qgslegend.cpp
  6. +2 −2 src/app/main.cpp
  7. +8 −8 src/app/qgisapp.cpp
  8. +4 −4 src/app/qgisapp.h
  9. +8 −12 src/app/qgsclipboard.cpp
  10. +7 −7 src/app/qgscustomprojectiondialog.cpp
  11. +10 −7 src/app/qgslabeldialog.cpp
  12. +1 −1 src/app/qgsmapserverexport.cpp
  13. +1 −1 src/app/qgsmaptoolidentify.cpp
  14. +1 −1 src/app/qgsmaptoolmovefeature.cpp
  15. +1 −1 src/app/qgsmeasuretool.cpp
  16. +13 −13 src/app/qgspastetransformations.cpp
  17. +2 −2 src/app/qgspluginmanager.cpp
  18. +20 −20 src/app/qgsrasterlayerproperties.cpp
  19. +2 −2 src/app/qgssearchquerybuilder.cpp
  20. +6 −9 src/app/qgsserversourceselect.cpp
  21. +5 −5 src/app/qgsvectorlayerproperties.cpp
  22. +1 −1 src/core/composer/qgscomposeritem.cpp
  23. +20 −21 src/core/qgscoordinatereferencesystem.cpp
  24. +2 −3 src/core/qgscoordinatetransform.cpp
  25. +9 −11 src/core/qgsgeometry.cpp
  26. +63 −62 src/core/qgshttptransaction.cpp
  27. +1 −2 src/core/qgslabel.cpp
  28. +1 −1 src/core/qgslabelattributes.cpp
  29. +2 −2 src/core/qgslogger.h
  30. +6 −6 src/core/qgsmaplayer.cpp
  31. +1 −1 src/core/qgsmaprenderer.cpp
  32. +1 −1 src/core/qgsproject.cpp
  33. +1 −1 src/core/qgsprojectfiletransform.cpp
  34. +2 −5 src/core/qgsproviderregistry.cpp
  35. +1 −2 src/core/qgsrasterdataprovider.cpp
  36. +1 −1 src/core/qgsvectorfilewriter.cpp
  37. +1 −1 src/core/qgsvectorlayer.cpp
  38. +1 −3 src/core/raster/qgscolorrampshader.cpp
  39. +3 −5 src/core/raster/qgscolortable.cpp
  40. +12 −18 src/core/raster/qgscontrastenhancement.cpp
  41. +102 −144 src/core/raster/qgsrasterlayer.cpp
  42. +2 −2 src/core/raster/qgsrasterlayer.h
  43. +8 −12 src/core/raster/qgsrastershader.cpp
  44. +6 −9 src/core/raster/qgsrastershaderfunction.cpp
  45. +2 −2 src/core/spatialindex/rtree/BulkLoader.cc
  46. +4 −2 src/core/spatialindex/tools/ExternalSort.cc
  47. +1 −1 src/core/sqlite3/sqlite3.c
  48. +18 −18 src/core/sqlite3/sqlite3.h
  49. +1 −1 src/core/symbology/qgsmarkercatalogue.h
  50. +1 −1 src/core/symbology/qgssymbol.cpp
  51. +1 −1 src/designer/README.txt
  52. +11 −11 src/gui/qgsmapcanvas.cpp
  53. +1 −3 src/gui/qgsmapcanvasitem.cpp
  54. +3 −3 src/gui/qgsquickprint.cpp
  55. +3 −3 src/plugins/dxf2shp_converter/dxf2shpconvertergui.cpp
  56. +19 −17 src/plugins/dxf2shp_converter/dxflib/src/dl_dxf.cpp
  57. +2 −2 src/plugins/georeferencer/qgspointdialog.cpp
  58. +7 −7 src/plugins/gps_importer/qgsgpsplugingui.cpp
  59. +12 −12 src/plugins/grass/qgsgrassattributes.cpp
  60. +10 −10 src/plugins/grass/qgsgrassbrowser.cpp
  61. +31 −31 src/plugins/grass/qgsgrassedit.cpp
  62. +1 −1 src/plugins/grass/qgsgrassedittools.cpp
  63. +34 −36 src/plugins/grass/qgsgrassmapcalc.cpp
  64. +8 −8 src/plugins/grass/qgsgrassmodel.cpp
  65. +1 −1 src/plugins/grass/qgsgrassmodule.cpp
  66. +30 −32 src/plugins/grass/qgsgrassnewmapset.cpp
  67. +21 −48 src/plugins/grass/qgsgrassplugin.cpp
  68. +7 −7 src/plugins/grass/qgsgrassregion.cpp
  69. +8 −8 src/plugins/grass/qgsgrassshell.cpp
  70. +6 −6 src/plugins/grass/qgsgrasstools.cpp
  71. +2 −2 src/plugins/grass/qgsgrassutils.cpp
  72. +3 −3 src/plugins/grid_maker/plugingui.cpp
  73. +337 −329 src/plugins/interpolation/DualEdgeTriangulation.cc
  74. +4 −4 src/plugins/interpolation/LinTriangleInterpolator.cc
  75. +27 −27 src/plugins/interpolation/MathUtils.cc
  76. +1 −1 src/plugins/interpolation/qgsinterpolationdialog.cpp
  77. +2 −2 src/plugins/quick_print/quickprintgui.cpp
  78. +2 −2 src/providers/gpx/gpsdata.cpp
  79. +4 −4 src/providers/gpx/gpsdata.h
  80. +1 −1 src/providers/gpx/qgsgpxprovider.cpp
  81. +13 −14 src/providers/grass/qgsgrass.cpp
  82. +52 −83 src/providers/grass/qgsgrassprovider.cpp
  83. +3 −3 src/providers/ogr/qgsogrprovider.cpp
  84. +4 −4 src/providers/postgres/qgspostgrescountthread.cpp
  85. +8 −8 src/providers/postgres/qgspostgresextentthread.cpp
  86. +1 −1 src/providers/wfs/qgswfsprovider.cpp
@@ -3,7 +3,7 @@

QGIS_DEBUG is an int describing what debug messages are written to the console. If the debug level of a message is <= QGIS_DEBUG, the message is written to the console. It the variable QGIS_DEBUG is not defined, it defaults to 1 for debug mode and to 0 for release mode

QGIS_DEBUG_FILE may contain a fileName. Only the messages from this file are printed (provided they have the right debuglevel). If QGIS_DEBUG_FILE is not set, messages from all files are printed
QGIS_DEBUG_FILE may contain a file name. Only the messages from this file are printed (provided they have the right debuglevel). If QGIS_DEBUG_FILE is not set, messages from all files are printed
*/

class QgsLogger
@@ -17,7 +17,7 @@ class QgsLogger
/**Goes to qDebug.
@param msg the message to be printed
@param debuglevel
@param file fileName where the message comes from
@param file file name where the message comes from
@param function function where the message comes from
@param line place in file where the message comes from*/
static void debug(const QString& msg, int debuglevel = 1, const char* file = NULL, const char* function = NULL, int line = -1);
@@ -26,7 +26,7 @@ public:
*/
QPicture pictureMarker (QString fullName, int size, QPen pen, QBrush brush, bool qtBug = true );

/** Returns a pixmap given a fileName of a svg marker
/** Returns a pixmap given a file name of a svg marker
* NOTE: this method needs to be public static for QgsMarkerDialog::visualizeMarkers */
static void svgMarker (QPainter * thepPainter, QString name, int size );
};
@@ -21,7 +21,7 @@ public:
static void buildSupportedRasterFileFilter(QString & fileFilters);
static void registerGdalDrivers();

/** This helper checks to see whether the fileName appears to be a valid
/** This helper checks to see whether the file name appears to be a valid
raster file name */
static bool isValidRasterFileName(const QString & theFileNameQString);

@@ -104,7 +104,7 @@ QgsComposer::QgsComposer( QgisApp *qgis ): QMainWindow()
mQgis = qgis;
mFirstTime = true;

QgsDebugMsg( "QgsComposer::QgsComposer" );
QgsDebugMsg( "entered." );

setMouseTracking( true );
//mSplitter->setMouseTracking(true);
@@ -788,7 +788,7 @@ void QgsComposer::on_mActionExportAsImage_activated( void )
std::auto_ptr < QFileDialog > myQFileDialog(
new QFileDialog(
this,
tr( "Choose a fileName to save the map image as" ),
tr( "Choose a file name to save the map image as" ),
file.path(),
myFilters
)
@@ -804,7 +804,7 @@ void QgsComposer::on_mActionExportAsImage_activated( void )
// set the 'Open' button to something that makes more sense
myQFileDialog->setAcceptMode( QFileDialog::AcceptSave );

//prompt the user for a fileName
//prompt the user for a file name
QString myOutputFileNameQString; // = myQFileDialog->getSaveFileName(); //delete this

int result = myQFileDialog->exec();
@@ -881,7 +881,7 @@ void QgsComposer::on_mActionExportAsSVG_activated( void )
}
QString myLastUsedFile = myQSettings.value( "/UI/lastSaveAsSvgFile", "qgis.svg" ).toString();
QFileInfo file( myLastUsedFile );
QFileDialog *myQFileDialog = new QFileDialog( this, tr( "Choose a fileName to save the map as" ),
QFileDialog *myQFileDialog = new QFileDialog( this, tr( "Choose a file name to save the map as" ),
file.path(), tr( "SVG Format" ) + " (*.svg *SVG)" );
myQFileDialog->selectFile( file.fileName() );
myQFileDialog->setFileMode( QFileDialog::AnyFile );
@@ -1074,7 +1074,7 @@ void QgsComposer::on_closePButton_clicked()

void QgsComposer::projectRead( void )
{
QgsDebugMsg( "QgsComposer::projectRead" );
QgsDebugMsg( "entered." );
//if ( mComposition ) delete mComposition;
//mComposition = new QgsComposition( this, 1 );

@@ -1115,7 +1115,7 @@ void QgsComposer::projectRead( void )

void QgsComposer::newProject( void )
{
QgsDebugMsg( "QgsComposer::newProject" );
QgsDebugMsg( "entered." );
//if ( mComposition ) delete mComposition;

//mComposition = new QgsComposition( this, 1 );
@@ -1795,12 +1795,12 @@ void QgsLegend::legendLayerZoomNative()
if ( layer )
{
QgsDebugMsg( "Raster units per pixel : " + QString::number( layer->rasterUnitsPerPixel() ) );
QgsDebugMsg( "MapUnitsPerPixel before : " + QString::number( mMapCanvas->mapUnitsPerPixel() ) );
QgsDebugMsg( "MapUnitsPerPixel before : " + QString::number( mMapCanvas->mapUnitsPerPixel() ) );

mMapCanvas->zoom( fabs( layer->rasterUnitsPerPixel() / mMapCanvas->mapUnitsPerPixel() ) );
mMapCanvas->refresh();

QgsDebugMsg( "MapUnitsPerPixel after : " + QString::number( mMapCanvas->mapUnitsPerPixel() ) );
QgsDebugMsg( "MapUnitsPerPixel after : " + QString::number( mMapCanvas->mapUnitsPerPixel() ) );

// notify the project we've made a change
QgsProject::instance()->dirty( true );
@@ -84,7 +84,7 @@ void usage( std::string const & appName )
<< "raster and vector data.\n"
<< "Usage: " << appName << " [options] [FILES]\n"
<< " options:\n"
<< "\t[--snapshot fileName]\temit snapshot of loaded datasets to given file\n"
<< "\t[--snapshot filename]\temit snapshot of loaded datasets to given file\n"
<< "\t[--lang language]\tuse language for interface text\n"
<< "\t[--project projectfile]\tload the given QGIS project\n"
<< "\t[--extent xmin,ymin,xmax,ymax]\tset initial map extent\n"
@@ -583,7 +583,7 @@ int main( int argc, char *argv[] )


/////////////////////////////////////////////////////////////////////
// autoload any fileNames that were passed in on the command line
// autoload any file names that were passed in on the command line
/////////////////////////////////////////////////////////////////////
QgsDebugMsg( QString( "Number of files in myFileList: %1" ).arg( myFileList.count() ) );
for ( QStringList::Iterator myIterator = myFileList.begin(); myIterator != myFileList.end(); ++myIterator )
@@ -1981,7 +1981,7 @@ static void openFilesRememberingFilter_( QString const &filterName,


/**
This method prompts the user for a list of vector fileNames with a dialog.
This method prompts the user for a list of vector file names with a dialog.
*/
void QgisApp::addVectorLayer()
{
@@ -2080,7 +2080,7 @@ bool QgisApp::addVectorLayers( QStringList const & theLayerQStringList, const QS



/** This helper checks to see whether the fileName appears to be a valid vector file name */
/** This helper checks to see whether the file name appears to be a valid vector file name */
bool QgisApp::isValidVectorFileName( QString theFileNameQString )
{
return ( theFileNameQString.toLower().endsWith( ".shp" ) );
@@ -2879,7 +2879,7 @@ bool QgisApp::fileSave()
return false;
}

// if we don't have a fileName, then obviously we need to get one; note
// if we don't have a file name, then obviously we need to get one; note
// that the project file name is reset to null in fileNew()
QFileInfo fullPath;

@@ -2970,7 +2970,7 @@ void QgisApp::fileSaveAs()
QString lastUsedDir = settings.value( "/UI/lastProjectDir", "." ).toString();

auto_ptr<QFileDialog> saveFileDialog( new QFileDialog( this,
tr( "Choose a fileName to save the QGIS project file as" ),
tr( "Choose a file name to save the QGIS project file as" ),
lastUsedDir, QObject::tr( "QGis files (*.qgs)" ) ) );

saveFileDialog->setFileMode( QFileDialog::AnyFile );
@@ -2979,7 +2979,7 @@ void QgisApp::fileSaveAs()

saveFileDialog->setConfirmOverwrite( true );

// if we don't have a fileName, then obviously we need to get one; note
// if we don't have a file name, then obviously we need to get one; note
// that the project file name is reset to null in fileNew()
QFileInfo fullPath;

@@ -3211,7 +3211,7 @@ void QgisApp::saveMapAsImage()

//create a file dialog using the the filter list generated above
std::auto_ptr < QFileDialog > myQFileDialog( new QFileDialog( this,
tr( "Choose a fileName to save the map image as" ),
tr( "Choose a file name to save the map image as" ),
myLastUsedDir, myFilters ) );

// allow for selection of more than one file
@@ -3314,10 +3314,10 @@ void QgisApp::toggleFullScreen()
// would otherwise cause two re-renders of the map, which can take a
// long time.
bool renderFlag = getMapCanvas()->renderFlag();
getMapCanvas()->setRenderFlag(false);
getMapCanvas()->setRenderFlag( false );
showNormal();
showMaximized();
getMapCanvas()->setRenderFlag(renderFlag);
getMapCanvas()->setRenderFlag( renderFlag );
mPrevScreenModeMaximized = false;
}
else
@@ -80,14 +80,14 @@ class QgisApp : public QMainWindow
QgsVectorLayer* addVectorLayer( QString vectorLayerPath, QString baseName, QString providerKey );

/** \brief overloaded vesion of the privat addLayer method that takes a list of
* fileNames instead of prompting user with a dialog.
* file names instead of prompting user with a dialog.
@param enc encoding type for the layer
@returns true if successfully added layer
*/
bool addVectorLayers( QStringList const & theLayerQStringList, const QString& enc );

/** overloaded vesion of the private addRasterLayer()
Method that takes a list of fileNames instead of prompting
Method that takes a list of file names instead of prompting
user with a dialog.
@returns true if successfully added layer(s)
*/
@@ -178,7 +178,7 @@ class QgisApp : public QMainWindow
public slots:
//! About QGis
void about();
//! Add a raster layer to the map (will prompt user for fileName using dlg )
//! Add a raster layer to the map (will prompt user for file name using dlg )
void addRasterLayer();
//#ifdef HAVE_POSTGRESQL
//! Add a databaselayer to the map
@@ -452,7 +452,7 @@ class QgisApp : public QMainWindow
*/
bool addRasterLayer( QgsRasterLayer * theRasterLayer );
//@todo We should move these next two into vector layer class
/** This helper checks to see whether the fileName appears to be a valid vector file name */
/** This helper checks to see whether the file name appears to be a valid vector file name */
bool isValidVectorFileName( QString theFileNameQString );
/** Overloaded version of the above function provided for convenience that takes a qstring pointer */
bool isValidVectorFileName( QString * theFileNameQString );
@@ -46,7 +46,7 @@ void QgsClipboard::replaceWithCopyOf( const QgsFieldMap& fields, QgsFeatureList&

// Replace the QGis clipboard.
mFeatureClipboard = features;
QgsDebugMsg( "QgsClipboard::replaceWith: replaced QGis clipboard." );
QgsDebugMsg( "replaced QGis clipboard." );

// Replace the system clipboard.

@@ -76,14 +76,11 @@ void QgsClipboard::replaceWithCopyOf( const QgsFieldMap& fields, QgsFeatureList&
else
textFields += "NULL";

#ifdef QGISDEBUG
// QgsDebugMsg("QgsClipboard::replaceWithCopyOf: about to traverse fields.");
#endif
// QgsDebugMsg("about to traverse fields.");
//
for ( QgsAttributeMap::iterator it2 = attributes.begin(); it2 != attributes.end(); ++it2 )
{
#ifdef QGISDEBUG
// QgsDebugMsg(QString("QgsClipboard::replaceWithCopyOf: inspecting field '%1'.").arg(it2->toString()));
#endif
// QgsDebugMsg(QString("inspecting field '%1'.").arg(it2->toString()));
textFields += it2->toString();
}

@@ -108,14 +105,13 @@ void QgsClipboard::replaceWithCopyOf( const QgsFieldMap& fields, QgsFeatureList&
cb->setText( textCopy, QClipboard::Selection );
cb->setText( textCopy, QClipboard::Clipboard );

QgsDebugMsg( QString( "QgsClipboard::replaceWith: replaced system clipboard with: %1." ).arg( textCopy ) );

QgsDebugMsg( QString( "replaced system clipboard with: %1." ).arg( textCopy ) );
}

QgsFeatureList QgsClipboard::copyOf()
{

QgsDebugMsg( "QgsClipboard::copyOf: returning clipboard." );
QgsDebugMsg( "returning clipboard." );

//TODO: Slurp from the system clipboard as well.

@@ -129,13 +125,13 @@ void QgsClipboard::clear()
{
mFeatureClipboard.clear();

QgsDebugMsg( "QgsClipboard::clear: cleared clipboard." );
QgsDebugMsg( "cleared clipboard." );
}

void QgsClipboard::insert( QgsFeature& feature )
{
mFeatureClipboard.push_back( feature );

QgsDebugMsg( "QgsClipboard::insert: inserted " + feature.geometry()->exportToWkt() );
QgsDebugMsg( "inserted " + feature.geometry()->exportToWkt() );
}

@@ -392,7 +392,7 @@ QString QgsCustomProjectionDialog::getEllipsoidAcronym( QString theEllipsoidName

void QgsCustomProjectionDialog::on_pbnFirst_clicked()
{
QgsDebugMsg( "QgsCustomProjectionDialog::on_pbnFirst_clicked()" );
QgsDebugMsg( "entered." );
sqlite3 *myDatabase;
const char *myTail;
sqlite3_stmt *myPreparedStatement;
@@ -460,7 +460,7 @@ void QgsCustomProjectionDialog::on_pbnFirst_clicked()

void QgsCustomProjectionDialog::on_pbnPrevious_clicked()
{
QgsDebugMsg( "QgsCustomProjectionDialog::on_pbnPrevious_clicked()" );
QgsDebugMsg( "entered." );
if ( mCurrentRecordLong <= 1 )
{
return;
@@ -533,7 +533,7 @@ void QgsCustomProjectionDialog::on_pbnPrevious_clicked()

void QgsCustomProjectionDialog::on_pbnNext_clicked()
{
QgsDebugMsg( "QgsCustomProjectionDialog::on_pbnNext_clicked()" );
QgsDebugMsg( "entered." );
if ( mCurrentRecordLong >= mRecordCountLong )
{
return;
@@ -606,7 +606,7 @@ void QgsCustomProjectionDialog::on_pbnNext_clicked()

void QgsCustomProjectionDialog::on_pbnLast_clicked()
{
QgsDebugMsg( "QgsCustomProjectionDialog::on_pbnLast_clicked()" );
QgsDebugMsg( "entered." );
sqlite3 *myDatabase;
const char *myTail;
sqlite3_stmt *myPreparedStatement;
@@ -710,7 +710,7 @@ void QgsCustomProjectionDialog::on_pbnNew_clicked()

void QgsCustomProjectionDialog::on_pbnSave_clicked()
{
QgsDebugMsg( "QgsCustomProjectionDialog::on_pbnSave_clicked()" );
QgsDebugMsg( "entered." );

QString myName = leName->text();
QString myParameters = leParameters->text();
@@ -830,7 +830,7 @@ void QgsCustomProjectionDialog::on_pbnSave_clicked()
myResult = sqlite3_open( QgsApplication::qgisUserDbFilePath().toUtf8().data(), &myDatabase );
if ( myResult != SQLITE_OK )
{
QgsDebugMsg( QString( "Can't open database: %1 /n please notify QGIS developers of this error \n %2 (file name) " ).arg( sqlite3_errmsg( myDatabase ) ).arg( QgsApplication::qgisUserDbFilePath() ) );
QgsDebugMsg( QString( "Can't open database: %1 \n please notify QGIS developers of this error \n %2 (file name) " ).arg( sqlite3_errmsg( myDatabase ) ).arg( QgsApplication::qgisUserDbFilePath() ) );
// XXX This will likely never happen since on open, sqlite creates the
// database if it does not exist.
assert( myResult == SQLITE_OK );
@@ -859,7 +859,7 @@ void QgsCustomProjectionDialog::on_pbnSave_clicked()

void QgsCustomProjectionDialog::on_pbnCalculate_clicked()
{
QgsDebugMsg( "QgsCustomProjectionDialog::on_pbnCalculate_clicked()" );
QgsDebugMsg( "entered." );


//

0 comments on commit db57406

Please sign in to comment.