[Qgis-developer] Re: Labels in OS X

John C. Tull john.tull at wildnevada.org
Sat Jul 12 19:06:22 EDT 2008


On Jul 12, 2008, at 1:15 PM, Tom Elwertowski wrote:

> If you haven't already checked, open the Attribute Table display and  
> check the label column. If the column is ok, do the following.

Labels are fine. This happens with all vector layer labeling, no  
matter the source.

> In core/qgslabel.cpp, add the line
>
> qDebug() << "Label:" << text;

Changed to QDebug ...

>
> after the block:
>
> /* Text */
> value = fieldValue ( Text, feature );
> if ( value.isEmpty() )
> {
> text = mLabelAttributes->text();
> }
> else
> {
> text = value;
> }
>
> Also add the line "#include <QDebug>" to the top of the file.


Done

> The new debug line should be line 116.

Done.

> Build and run qgis from a terminal and you will see the label text  
> extracted from the features. It should be the same as displayed in  
> the attribute table. If the text is complete, the problem is in the  
> next ~300 lines and more qDebug lines can be added to find it.

Build is unsuccessful:

[ 14%] Building CXX object src/core/CMakeFiles/qgis_core.dir/ 
qgssearchstring.o
/Users/jctull/sources/qgis/trunk/src/core/qgslabel.cpp: In member  
function ‘void QgsLabel::renderLabel(QPainter*, const QgsRect&, const  
QgsCoordinateTransform*, const QgsMapToPixel*, QgsFeature&, bool,  
QgsLabelAttributes*, double)’:
/Users/jctull/sources/qgis/trunk/src/core/qgslabel.cpp:118: error: no  
matching function for call to ‘QDebug::QDebug()’
/usr/local/Trolltech/Qt-4.4.0/include/QtCore/qdebug.h:80: note:  
candidates are: QDebug::QDebug(const QDebug&)
/usr/local/Trolltech/Qt-4.4.0/include/QtCore/qdebug.h:79:  
note:                 QDebug::QDebug(QtMsgType)
/usr/local/Trolltech/Qt-4.4.0/include/QtCore/qdebug.h:78:  
note:                 QDebug::QDebug(QString*)
/usr/local/Trolltech/Qt-4.4.0/include/QtCore/qdebug.h:77:  
note:                 QDebug::QDebug(QIODevice*)
make[2]: *** [src/core/CMakeFiles/qgis_core.dir/qgslabel.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [src/core/CMakeFiles/qgis_core.dir/all] Error 2
make: *** [all] Error 2


John


More information about the Qgis-developer mailing list