Skip to content

Commit db57406

Browse files
author
jef
committed
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
1 parent f3fd51c commit db57406

File tree

86 files changed

+1057
-1181
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

86 files changed

+1057
-1181
lines changed

python/core/qgslogger.sip

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
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
55

6-
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
6+
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
77
*/
88

99
class QgsLogger
@@ -17,7 +17,7 @@ class QgsLogger
1717
/**Goes to qDebug.
1818
@param msg the message to be printed
1919
@param debuglevel
20-
@param file fileName where the message comes from
20+
@param file file name where the message comes from
2121
@param function function where the message comes from
2222
@param line place in file where the message comes from*/
2323
static void debug(const QString& msg, int debuglevel = 1, const char* file = NULL, const char* function = NULL, int line = -1);

python/core/qgsmarkercatalogue.sip

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ public:
2626
*/
2727
QPicture pictureMarker (QString fullName, int size, QPen pen, QBrush brush, bool qtBug = true );
2828

29-
/** Returns a pixmap given a fileName of a svg marker
29+
/** Returns a pixmap given a file name of a svg marker
3030
* NOTE: this method needs to be public static for QgsMarkerDialog::visualizeMarkers */
3131
static void svgMarker (QPainter * thepPainter, QString name, int size );
3232
};

python/core/qgsrasterlayer.sip

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ public:
2121
static void buildSupportedRasterFileFilter(QString & fileFilters);
2222
static void registerGdalDrivers();
2323

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

src/app/composer/qgscomposer.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ QgsComposer::QgsComposer( QgisApp *qgis ): QMainWindow()
104104
mQgis = qgis;
105105
mFirstTime = true;
106106

107-
QgsDebugMsg( "QgsComposer::QgsComposer" );
107+
QgsDebugMsg( "entered." );
108108

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

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

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

10751075
void QgsComposer::projectRead( void )
10761076
{
1077-
QgsDebugMsg( "QgsComposer::projectRead" );
1077+
QgsDebugMsg( "entered." );
10781078
//if ( mComposition ) delete mComposition;
10791079
//mComposition = new QgsComposition( this, 1 );
10801080

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

11161116
void QgsComposer::newProject( void )
11171117
{
1118-
QgsDebugMsg( "QgsComposer::newProject" );
1118+
QgsDebugMsg( "entered." );
11191119
//if ( mComposition ) delete mComposition;
11201120

11211121
//mComposition = new QgsComposition( this, 1 );

src/app/legend/qgslegend.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1795,12 +1795,12 @@ void QgsLegend::legendLayerZoomNative()
17951795
if ( layer )
17961796
{
17971797
QgsDebugMsg( "Raster units per pixel : " + QString::number( layer->rasterUnitsPerPixel() ) );
1798-
QgsDebugMsg( "MapUnitsPerPixel before : " + QString::number( mMapCanvas->mapUnitsPerPixel() ) );
1798+
QgsDebugMsg( "MapUnitsPerPixel before : " + QString::number( mMapCanvas->mapUnitsPerPixel() ) );
17991799

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

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

18051805
// notify the project we've made a change
18061806
QgsProject::instance()->dirty( true );

src/app/main.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ void usage( std::string const & appName )
8484
<< "raster and vector data.\n"
8585
<< "Usage: " << appName << " [options] [FILES]\n"
8686
<< " options:\n"
87-
<< "\t[--snapshot fileName]\temit snapshot of loaded datasets to given file\n"
87+
<< "\t[--snapshot filename]\temit snapshot of loaded datasets to given file\n"
8888
<< "\t[--lang language]\tuse language for interface text\n"
8989
<< "\t[--project projectfile]\tload the given QGIS project\n"
9090
<< "\t[--extent xmin,ymin,xmax,ymax]\tset initial map extent\n"
@@ -583,7 +583,7 @@ int main( int argc, char *argv[] )
583583

584584

585585
/////////////////////////////////////////////////////////////////////
586-
// autoload any fileNames that were passed in on the command line
586+
// autoload any file names that were passed in on the command line
587587
/////////////////////////////////////////////////////////////////////
588588
QgsDebugMsg( QString( "Number of files in myFileList: %1" ).arg( myFileList.count() ) );
589589
for ( QStringList::Iterator myIterator = myFileList.begin(); myIterator != myFileList.end(); ++myIterator )

src/app/qgisapp.cpp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1981,7 +1981,7 @@ static void openFilesRememberingFilter_( QString const &filterName,
19811981

19821982

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

20812081

20822082

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

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

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

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

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

29802980
saveFileDialog->setConfirmOverwrite( true );
29812981

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

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

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

32173217
// allow for selection of more than one file
@@ -3314,10 +3314,10 @@ void QgisApp::toggleFullScreen()
33143314
// would otherwise cause two re-renders of the map, which can take a
33153315
// long time.
33163316
bool renderFlag = getMapCanvas()->renderFlag();
3317-
getMapCanvas()->setRenderFlag(false);
3317+
getMapCanvas()->setRenderFlag( false );
33183318
showNormal();
33193319
showMaximized();
3320-
getMapCanvas()->setRenderFlag(renderFlag);
3320+
getMapCanvas()->setRenderFlag( renderFlag );
33213321
mPrevScreenModeMaximized = false;
33223322
}
33233323
else

src/app/qgisapp.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -80,14 +80,14 @@ class QgisApp : public QMainWindow
8080
QgsVectorLayer* addVectorLayer( QString vectorLayerPath, QString baseName, QString providerKey );
8181

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

8989
/** overloaded vesion of the private addRasterLayer()
90-
Method that takes a list of fileNames instead of prompting
90+
Method that takes a list of file names instead of prompting
9191
user with a dialog.
9292
@returns true if successfully added layer(s)
9393
*/
@@ -178,7 +178,7 @@ class QgisApp : public QMainWindow
178178
public slots:
179179
//! About QGis
180180
void about();
181-
//! Add a raster layer to the map (will prompt user for fileName using dlg )
181+
//! Add a raster layer to the map (will prompt user for file name using dlg )
182182
void addRasterLayer();
183183
//#ifdef HAVE_POSTGRESQL
184184
//! Add a databaselayer to the map
@@ -452,7 +452,7 @@ class QgisApp : public QMainWindow
452452
*/
453453
bool addRasterLayer( QgsRasterLayer * theRasterLayer );
454454
//@todo We should move these next two into vector layer class
455-
/** This helper checks to see whether the fileName appears to be a valid vector file name */
455+
/** This helper checks to see whether the file name appears to be a valid vector file name */
456456
bool isValidVectorFileName( QString theFileNameQString );
457457
/** Overloaded version of the above function provided for convenience that takes a qstring pointer */
458458
bool isValidVectorFileName( QString * theFileNameQString );

src/app/qgsclipboard.cpp

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ void QgsClipboard::replaceWithCopyOf( const QgsFieldMap& fields, QgsFeatureList&
4646

4747
// Replace the QGis clipboard.
4848
mFeatureClipboard = features;
49-
QgsDebugMsg( "QgsClipboard::replaceWith: replaced QGis clipboard." );
49+
QgsDebugMsg( "replaced QGis clipboard." );
5050

5151
// Replace the system clipboard.
5252

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

79-
#ifdef QGISDEBUG
80-
// QgsDebugMsg("QgsClipboard::replaceWithCopyOf: about to traverse fields.");
81-
#endif
79+
// QgsDebugMsg("about to traverse fields.");
80+
//
8281
for ( QgsAttributeMap::iterator it2 = attributes.begin(); it2 != attributes.end(); ++it2 )
8382
{
84-
#ifdef QGISDEBUG
85-
// QgsDebugMsg(QString("QgsClipboard::replaceWithCopyOf: inspecting field '%1'.").arg(it2->toString()));
86-
#endif
83+
// QgsDebugMsg(QString("inspecting field '%1'.").arg(it2->toString()));
8784
textFields += it2->toString();
8885
}
8986

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

111-
QgsDebugMsg( QString( "QgsClipboard::replaceWith: replaced system clipboard with: %1." ).arg( textCopy ) );
112-
108+
QgsDebugMsg( QString( "replaced system clipboard with: %1." ).arg( textCopy ) );
113109
}
114110

115111
QgsFeatureList QgsClipboard::copyOf()
116112
{
117113

118-
QgsDebugMsg( "QgsClipboard::copyOf: returning clipboard." );
114+
QgsDebugMsg( "returning clipboard." );
119115

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

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

132-
QgsDebugMsg( "QgsClipboard::clear: cleared clipboard." );
128+
QgsDebugMsg( "cleared clipboard." );
133129
}
134130

135131
void QgsClipboard::insert( QgsFeature& feature )
136132
{
137133
mFeatureClipboard.push_back( feature );
138134

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

src/app/qgscustomprojectiondialog.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -392,7 +392,7 @@ QString QgsCustomProjectionDialog::getEllipsoidAcronym( QString theEllipsoidName
392392

393393
void QgsCustomProjectionDialog::on_pbnFirst_clicked()
394394
{
395-
QgsDebugMsg( "QgsCustomProjectionDialog::on_pbnFirst_clicked()" );
395+
QgsDebugMsg( "entered." );
396396
sqlite3 *myDatabase;
397397
const char *myTail;
398398
sqlite3_stmt *myPreparedStatement;
@@ -460,7 +460,7 @@ void QgsCustomProjectionDialog::on_pbnFirst_clicked()
460460

461461
void QgsCustomProjectionDialog::on_pbnPrevious_clicked()
462462
{
463-
QgsDebugMsg( "QgsCustomProjectionDialog::on_pbnPrevious_clicked()" );
463+
QgsDebugMsg( "entered." );
464464
if ( mCurrentRecordLong <= 1 )
465465
{
466466
return;
@@ -533,7 +533,7 @@ void QgsCustomProjectionDialog::on_pbnPrevious_clicked()
533533

534534
void QgsCustomProjectionDialog::on_pbnNext_clicked()
535535
{
536-
QgsDebugMsg( "QgsCustomProjectionDialog::on_pbnNext_clicked()" );
536+
QgsDebugMsg( "entered." );
537537
if ( mCurrentRecordLong >= mRecordCountLong )
538538
{
539539
return;
@@ -606,7 +606,7 @@ void QgsCustomProjectionDialog::on_pbnNext_clicked()
606606

607607
void QgsCustomProjectionDialog::on_pbnLast_clicked()
608608
{
609-
QgsDebugMsg( "QgsCustomProjectionDialog::on_pbnLast_clicked()" );
609+
QgsDebugMsg( "entered." );
610610
sqlite3 *myDatabase;
611611
const char *myTail;
612612
sqlite3_stmt *myPreparedStatement;
@@ -710,7 +710,7 @@ void QgsCustomProjectionDialog::on_pbnNew_clicked()
710710

711711
void QgsCustomProjectionDialog::on_pbnSave_clicked()
712712
{
713-
QgsDebugMsg( "QgsCustomProjectionDialog::on_pbnSave_clicked()" );
713+
QgsDebugMsg( "entered." );
714714

715715
QString myName = leName->text();
716716
QString myParameters = leParameters->text();
@@ -830,7 +830,7 @@ void QgsCustomProjectionDialog::on_pbnSave_clicked()
830830
myResult = sqlite3_open( QgsApplication::qgisUserDbFilePath().toUtf8().data(), &myDatabase );
831831
if ( myResult != SQLITE_OK )
832832
{
833-
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() ) );
833+
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() ) );
834834
// XXX This will likely never happen since on open, sqlite creates the
835835
// database if it does not exist.
836836
assert( myResult == SQLITE_OK );
@@ -859,7 +859,7 @@ void QgsCustomProjectionDialog::on_pbnSave_clicked()
859859

860860
void QgsCustomProjectionDialog::on_pbnCalculate_clicked()
861861
{
862-
QgsDebugMsg( "QgsCustomProjectionDialog::on_pbnCalculate_clicked()" );
862+
QgsDebugMsg( "entered." );
863863

864864

865865
//

0 commit comments

Comments
 (0)