Skip to content

Commit

Permalink
Remove more debug noise
Browse files Browse the repository at this point in the history
  • Loading branch information
m-kuhn committed Jun 12, 2016
1 parent c63b910 commit 7b3e667
Show file tree
Hide file tree
Showing 57 changed files with 0 additions and 287 deletions.
1 change: 0 additions & 1 deletion src/app/composer/qgscomposer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -473,7 +473,6 @@ QgsComposer::QgsComposer( QgisApp *qgis, const QString& title )
mWindowAction = new QAction( windowTitle(), this );
connect( mWindowAction, SIGNAL( triggered() ), this, SLOT( activate() ) );

QgsDebugMsg( "entered." );

setMouseTracking( true );
mViewFrame->setMouseTracking( true );
Expand Down
1 change: 0 additions & 1 deletion src/app/qgscustomprojectiondialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -448,7 +448,6 @@ void QgsCustomProjectionDialog::on_buttonBox_accepted()

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


//
Expand Down
5 changes: 0 additions & 5 deletions src/app/qgshandlebadlayers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,6 @@ QgsHandleBadLayers::~QgsHandleBadLayers()

void QgsHandleBadLayers::selectionChanged()
{
QgsDebugMsg( "entered." );

mRows.clear();

Expand Down Expand Up @@ -250,7 +249,6 @@ void QgsHandleBadLayers::setFilename( int row, const QString& filename )

void QgsHandleBadLayers::browseClicked()
{
QgsDebugMsg( "entered." );

if ( mRows.size() == 1 )
{
Expand Down Expand Up @@ -362,7 +360,6 @@ void QgsHandleBadLayers::editAuthCfg()

void QgsHandleBadLayers::apply()
{
QgsDebugMsg( "entered." );
for ( int i = 0; i < mLayerList->rowCount(); i++ )
{
int idx = mLayerList->item( i, 0 )->data( Qt::UserRole ).toInt();
Expand All @@ -385,7 +382,6 @@ void QgsHandleBadLayers::apply()

void QgsHandleBadLayers::accept()
{
QgsDebugMsg( "entered." );
apply();

if ( mLayerList->rowCount() > 0 &&
Expand All @@ -405,7 +401,6 @@ void QgsHandleBadLayers::accept()

void QgsHandleBadLayers::rejected()
{
QgsDebugMsg( "entered." );

if ( mLayerList->rowCount() > 0 &&
QMessageBox::warning( this,
Expand Down
7 changes: 0 additions & 7 deletions src/app/qgslabeldialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ QgsLabelDialog::QgsLabelDialog( QgsLabel *label, QWidget *parent )
, mFont( "Helvetica" )
{
setupUi( this );
QgsDebugMsg( "entering." );

Q_ASSERT( label );

Expand All @@ -53,7 +52,6 @@ QgsLabelDialog::QgsLabelDialog( QgsLabel *label, QWidget *parent )

void QgsLabelDialog::init()
{
QgsDebugMsg( "entering." );

QgsLabelAttributes * myLabelAttributes = mLabel->labelAttributes();
//populate a string list with all the field names which will be used to set up the
Expand Down Expand Up @@ -274,7 +272,6 @@ void QgsLabelDialog::init()

void QgsLabelDialog::changeFont()
{
QgsDebugMsg( "entering." );

qreal fontSize = mFont.pointSizeF();
bool resultFlag;
Expand All @@ -293,7 +290,6 @@ void QgsLabelDialog::changeFont()

void QgsLabelDialog::changeFontColor()
{
QgsDebugMsg( "entering." );

QColor color = QColorDialog::getColor( mFontColor );
if ( !color.isValid() )
Expand All @@ -307,7 +303,6 @@ void QgsLabelDialog::changeFontColor()

void QgsLabelDialog::changeBufferColor()
{
QgsDebugMsg( "entering." );

QColor color = QColorDialog::getColor( mBufferColor );
if ( !color.isValid() )
Expand All @@ -328,12 +323,10 @@ int QgsLabelDialog::itemNoForField( const QString& theFieldName, const QStringLi

QgsLabelDialog::~QgsLabelDialog()
{
QgsDebugMsg( "entering." );
}

void QgsLabelDialog::apply()
{
QgsDebugMsg( "entering." );

//set the label props that are NOT bound to a field in the attributes tbl
//All of these are set in the labelAttributes member of the layer
Expand Down
1 change: 0 additions & 1 deletion src/app/qgsmaptoollabel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -620,7 +620,6 @@ bool QgsMapToolLabel::layerCanPin( QgsVectorLayer* vlayer, int& xCol, int& yCol

bool QgsMapToolLabel::labelCanShowHide( QgsVectorLayer* vlayer, int& showCol ) const
{
//QgsDebugMsg( "entered" );
if ( !vlayer || !vlayer->isEditable() )
{
return false;
Expand Down
1 change: 0 additions & 1 deletion src/app/qgsmaptoolmovefeature.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,6 @@ void QgsMapToolMoveFeature::canvasPressEvent( QgsMapMouseEvent* e )

void QgsMapToolMoveFeature::canvasReleaseEvent( QgsMapMouseEvent* e )
{
//QgsDebugMsg("entering.");
if ( !mRubberBand )
{
return;
Expand Down
1 change: 0 additions & 1 deletion src/app/qgsrasterlayerproperties.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -483,7 +483,6 @@ void QgsRasterLayerProperties::setupTransparencyTable( int nBands )

void QgsRasterLayerProperties::populateTransparencyTable( QgsRasterRenderer* renderer )
{
QgsDebugMsg( "entering." );
if ( !mRasterLayer )
{
return;
Expand Down
1 change: 0 additions & 1 deletion src/core/composer/qgscomposeritem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,6 @@ QgsComposerItem::~QgsComposerItem()

void QgsComposerItem::setSelected( bool s )
{
QgsDebugMsg( "entered." );
QGraphicsRectItem::setSelected( s );
//inform model that id data has changed
if ( mComposition )
Expand Down
1 change: 0 additions & 1 deletion src/core/gps/qgsgpsdconnection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ QgsGpsdConnection::QgsGpsdConnection( const QString& host, qint16 port, const QS
QgsGpsdConnection::~QgsGpsdConnection()
{
//connection will be closed by base class
QgsDebugMsg( "entered." );
}

void QgsGpsdConnection::connected()
Expand Down
1 change: 0 additions & 1 deletion src/core/gps/qgsqtlocationconnection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ QgsQtLocationConnection::QgsQtLocationConnection(): QgsGPSConnection( new QLocal
QgsQtLocationConnection::~QgsQtLocationConnection()
{
//connection will be closed by base class
QgsDebugMsg( "entered." );
}

//Needed to make connection detectable (half HACK)
Expand Down
1 change: 0 additions & 1 deletion src/core/qgscoordinatereferencesystem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -996,7 +996,6 @@ void QgsCoordinateReferenceSystem::setMapUnits()
*/
long QgsCoordinateReferenceSystem::findMatchingProj()
{
QgsDebugMsg( "entered." );
if ( d->mEllipsoidAcronym.isNull() || d->mProjectionAcronym.isNull()
|| !d->mIsValid )
{
Expand Down
2 changes: 0 additions & 2 deletions src/core/qgshttptransaction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,6 @@ void QgsHttpTransaction::dataFinished( int id, bool error )
void QgsHttpTransaction::transactionFinished( bool error )
{
#ifdef QGISDEBUG
QgsDebugMsg( "entered." );

#if 0
// The signal that this slot is connected to, QHttp::requestFinished,
Expand Down Expand Up @@ -489,7 +488,6 @@ void QgsHttpTransaction::dataStateChanged( int state )

void QgsHttpTransaction::networkTimedOut()
{
QgsDebugMsg( "entering." );

mError = tr( "Network timed out after %n second(s) of inactivity.\n"
"This may be a problem in your network connection or at the WMS server.", "inactivity timeout", mNetworkTimeoutMsec / 1000 );
Expand Down
1 change: 0 additions & 1 deletion src/core/qgsprojectfiletransform.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,6 @@ void QgsProjectFileTransform::transform081to090()

void QgsProjectFileTransform::transform091to0100()
{
QgsDebugMsg( "entering" );
if ( ! mDom.isNull() )
{
// Insert transforms here!
Expand Down
1 change: 0 additions & 1 deletion src/core/qgsvectorlayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,6 @@ QgsVectorLayer::QgsVectorLayer( const QString& vectorLayerPath,

QgsVectorLayer::~QgsVectorLayer()
{
QgsDebugMsg( "entered." );

emit layerDeleted();

Expand Down
1 change: 0 additions & 1 deletion src/gui/auth/qgsauthimportidentitydialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,6 @@ void QgsAuthImportIdentityDialog::validateIdentity()

bool QgsAuthImportIdentityDialog::validateBundle()
{
QgsDebugMsg( "entered" );

// clear out any previously set bundle
QSslCertificate emptycert;
Expand Down
1 change: 0 additions & 1 deletion src/gui/qgsnewnamedialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,6 @@ QString QgsNewNameDialog::highlightText( const QString& text )

void QgsNewNameDialog::nameChanged()
{
QgsDebugMsg( "entered" );

QString namesString = tr( "Full names" ) + ": ";
if ( !mExtensions.isEmpty() )
Expand Down
4 changes: 0 additions & 4 deletions src/gui/qgsowssourceselect.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,6 @@ void QgsOWSSourceSelect::clearFormats()

void QgsOWSSourceSelect::populateFormats()
{
QgsDebugMsg( "entered" );

// A server may offer more similar formats, which are mapped
// to the same GDAL format, e.g. GeoTIFF and TIFF
Expand Down Expand Up @@ -225,7 +224,6 @@ void QgsOWSSourceSelect::populateFormats()

void QgsOWSSourceSelect::populateTimes()
{
QgsDebugMsg( "entered" );
mTimeComboBox->clear();
mTimeComboBox->insertItems( 0, selectedLayersTimes() );
mTimeComboBox->setEnabled( !selectedLayersTimes().isEmpty() );
Expand Down Expand Up @@ -345,7 +343,6 @@ void QgsOWSSourceSelect::populateLayerList()

void QgsOWSSourceSelect::on_mConnectButton_clicked()
{
QgsDebugMsg( "entered" );

mLayersTreeWidget->clear();
clearFormats();
Expand All @@ -367,7 +364,6 @@ void QgsOWSSourceSelect::on_mConnectButton_clicked()

void QgsOWSSourceSelect::addClicked()
{
QgsDebugMsg( "entered" );
}

void QgsOWSSourceSelect::enableLayersForCrs( QTreeWidgetItem * )
Expand Down
2 changes: 0 additions & 2 deletions src/gui/qgssearchquerybuilder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ void QgsSearchQueryBuilder::populateFields()
if ( !mLayer )
return;

QgsDebugMsg( "entering." );
const QgsFields& fields = mLayer->fields();
for ( int idx = 0; idx < fields.count(); ++idx )
{
Expand All @@ -87,7 +86,6 @@ void QgsSearchQueryBuilder::populateFields()

void QgsSearchQueryBuilder::setupListViews()
{
QgsDebugMsg( "entering." );
//Models
mModelFields = new QStandardItemModel();
mModelValues = new QStandardItemModel();
Expand Down
2 changes: 0 additions & 2 deletions src/gui/raster/qgsrasterhistogramwidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,6 @@ void QgsRasterHistogramWidget::on_btnHistoCompute_clicked()

bool QgsRasterHistogramWidget::computeHistogram( bool forceComputeFlag )
{
QgsDebugMsg( "entered." );

//bool myIgnoreOutOfRangeFlag = true;
//bool myThoroughBandScanFlag = false;
Expand Down Expand Up @@ -340,7 +339,6 @@ void QgsRasterHistogramWidget::refreshHistogram()
//
int myBandCountInt = mRasterLayer->bandCount();

QgsDebugMsg( "entered." );

if ( ! computeHistogram( false ) )
{
Expand Down
1 change: 0 additions & 1 deletion src/gui/raster/qgsrastertransparencywidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -494,7 +494,6 @@ void QgsRasterTransparencyWidget::pixelSelected( const QgsPoint & canvasPoint )

void QgsRasterTransparencyWidget::populateTransparencyTable( QgsRasterRenderer *renderer )
{
QgsDebugMsg( "entering." );
if ( !mRasterLayer )
{
return;
Expand Down
6 changes: 0 additions & 6 deletions src/plugins/grass/qgsgrasseditrenderer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,6 @@ QString QgsGrassEditRenderer::dump() const

QDomElement QgsGrassEditRenderer::save( QDomDocument& doc )
{
QgsDebugMsg( "entered" );
QDomElement rendererElem = doc.createElement( RENDERER_TAG_NAME );
rendererElem.setAttribute( "type", "grassEdit" );

Expand All @@ -222,7 +221,6 @@ QDomElement QgsGrassEditRenderer::save( QDomDocument& doc )

QgsFeatureRendererV2* QgsGrassEditRenderer::create( QDomElement& element )
{
QgsDebugMsg( "entered" );
QgsGrassEditRenderer *renderer = new QgsGrassEditRenderer();

QDomElement childElem = element.firstChildElement();
Expand Down Expand Up @@ -260,7 +258,6 @@ QgsFeatureRendererV2* QgsGrassEditRenderer::create( QDomElement& element )

QgsRendererV2Widget* QgsGrassEditRendererWidget::create( QgsVectorLayer* layer, QgsStyleV2* style, QgsFeatureRendererV2* renderer )
{
QgsDebugMsg( "entered" );
return new QgsGrassEditRendererWidget( layer, style, renderer );
}

Expand All @@ -270,7 +267,6 @@ QgsGrassEditRendererWidget::QgsGrassEditRendererWidget( QgsVectorLayer* layer, Q
, mLineRendererWidget( 0 )
, mPointRendererWidget( 0 )
{
QgsDebugMsg( "entered" );
mRenderer = dynamic_cast<QgsGrassEditRenderer*>( renderer->clone() );
if ( !mRenderer )
{
Expand All @@ -288,13 +284,11 @@ QgsGrassEditRendererWidget::QgsGrassEditRendererWidget( QgsVectorLayer* layer, Q

QgsGrassEditRendererWidget::~QgsGrassEditRendererWidget()
{
QgsDebugMsg( "entered" );
delete mRenderer;
}

QgsFeatureRendererV2* QgsGrassEditRendererWidget::renderer()
{
QgsDebugMsg( "entered" );
mRenderer->setLineRenderer( mLineRendererWidget->renderer()->clone() );
mRenderer->setMarkerRenderer( mPointRendererWidget->renderer()->clone() );
return mRenderer;
Expand Down
Loading

7 comments on commit 7b3e667

@luipir
Copy link
Contributor

@luipir luipir commented on 7b3e667 Jun 12, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

would make sense to use QgsDebugMsgLevel setting at higer level (3) instead of removing thhem or just removing that are redoundats with other QgsDebugMsg in the same routine?

@m-kuhn
Copy link
Member Author

@m-kuhn m-kuhn commented on 7b3e667 Jun 12, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

are you worried about some of them in particular?

@luipir
Copy link
Contributor

@luipir luipir commented on 7b3e667 Jun 12, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that that have no other debug message inside

@m-kuhn
Copy link
Member Author

@m-kuhn m-kuhn commented on 7b3e667 Jun 12, 2016 via email

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@luipir
Copy link
Contributor

@luipir luipir commented on 7b3e667 Jun 12, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can't and I don't want to convince you, first debug session for me is reading log... expecially when I've to compare different running session. My practice is have different debug level messages... enterig/exiting are the messages sent in the higher level.
Nothing that can't be done using breackpoints, but many time it's useful to rise the debug level to people that are not able at all to manage a debugger.

@m-kuhn
Copy link
Member Author

@m-kuhn m-kuhn commented on 7b3e667 Jun 13, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please do convince me @luipir . If you say it's useful, I have no problems with reverting this. I completely agree to your point concerning debug level (which is really poorly used in QGIS at the moment). Maybe we should make it mandatory to specify a debug level in QgsDebugMsg so devs are forced to consider the debug level.

My feeling concerning these particular messages was that they don't really offer any additional benefit apart from the general flow of code. And since they are only used sporadically chances that they are misleading because they are missing in the part which you are debugging are just as high as chances that they are useful. But it's just a feeling, no strong opinion.

@luipir
Copy link
Contributor

@luipir luipir commented on 7b3e667 Jun 13, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

me too, I've no strong opinion pro/cons... btw would be useful to add debugLevel as constraint, IMHO would be a constraint also the visualization of general flow of code that is useful to understand and inspect/study the code.

Please sign in to comment.