Skip to content

Commit

Permalink
Fix compiler warnings in app and ui directories
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.osgeo.org/qgis/trunk@6500 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
g_j_m committed Feb 3, 2007
1 parent 3d015e1 commit b823448
Show file tree
Hide file tree
Showing 9 changed files with 44 additions and 33 deletions.
4 changes: 4 additions & 0 deletions src/app/composer/qgscomposition.cpp
Expand Up @@ -533,6 +533,10 @@ void QgsComposition::contentsMouseReleaseEvent(QMouseEvent* e)
ci->writeSettings();
}
break;

default:
// ignore any others...
break;
}
}

Expand Down
8 changes: 5 additions & 3 deletions src/app/legend/qgslegend.cpp
Expand Up @@ -306,7 +306,8 @@ void QgsLegend::mouseReleaseEvent(QMouseEvent * e)
if(originType == QgsLegendItem::LEGEND_LAYER_FILE && destType == QgsLegendItem::LEGEND_LAYER_FILE_GROUP)
{
QgsDebugMsg("Legend layer file moved to layer file group");
QgsMapLayer* origLayer = ((QgsLegendLayerFile*)(origin))->layer();
// Not used... delete?
//QgsMapLayer* origLayer = ((QgsLegendLayerFile*)(origin))->layer();
if(dest->childCount() > 1)
{
//find the first layer in the legend layer group != origLayer and copy its settings
Expand All @@ -327,8 +328,9 @@ void QgsLegend::mouseReleaseEvent(QMouseEvent * e)
else if(originType == QgsLegendItem::LEGEND_LAYER_FILE && destType == QgsLegendItem::LEGEND_LAYER_FILE)
{
QgsDebugMsg("Legend layer file moved to legend layer file");
QgsMapLayer* origLayer = ((QgsLegendLayerFile*)(origin))->layer();
QgsMapLayer* destLayer = ((QgsLegendLayerFile*)(dest))->layer();
// Not used. Delete?
// QgsMapLayer* origLayer = ((QgsLegendLayerFile*)(origin))->layer();
// QgsMapLayer* destLayer = ((QgsLegendLayerFile*)(dest))->layer();

if(dest == origin)//origin item has been moved in mouseMoveEvent such that it is under the mouse cursor now
{
Expand Down
1 change: 0 additions & 1 deletion src/app/legend/qgslegendlayer.cpp
Expand Up @@ -274,7 +274,6 @@ void QgsLegendLayer::changeSymbologySettings(const QgsMapLayer* theMapLayer,
return;
}

QgsLegend* myLegend = legend();
QgsLegendSymbologyItem* theSymbologyItem = 0;

//remove the symbology items under the legend layer
Expand Down
3 changes: 1 addition & 2 deletions src/app/legend/qgslegendlayerfile.cpp
Expand Up @@ -458,9 +458,8 @@ void QgsLegendLayerFile::addToPopupMenu(QMenu& theMenu)
}
else if (lyr->type() == QgsMapLayer::RASTER)
{
QgsRasterLayer* rlayer = dynamic_cast<QgsRasterLayer*>(lyr);

// TODO: what was this for?
//QgsRasterLayer* rlayer = dynamic_cast<QgsRasterLayer*>(lyr);
//theMenu.addAction(tr("&Convert to..."), rlayer, SLOT(convertTo()));
}

Expand Down
2 changes: 1 addition & 1 deletion src/app/qgsgeomtypedialog.cpp
Expand Up @@ -70,7 +70,7 @@ void QgsGeomTypeDialog::on_mAddAttributeButton_clicked()
QgsAddAttrDialog d(types, this);
if(d.exec()==QDialog::Accepted)
{
Q3ListViewItem* attritem=new Q3ListViewItem(mAttributeView, d.name(), d.type());
new Q3ListViewItem(mAttributeView, d.name(), d.type());
}
if(mAttributeView->childCount()>0)
{
Expand Down
24 changes: 12 additions & 12 deletions src/app/qgsmarkerdialog.cpp
Expand Up @@ -79,22 +79,22 @@ void QgsMarkerDialog::changeDirectory()

void QgsMarkerDialog::visualizeMarkers(QString directory)
{
mIconView->clear();
mIconView->clear();

QDir dir(directory);
QStringList files=dir.entryList("*.svg;*.SVG");
QDir dir(directory);
QStringList files=dir.entryList("*.svg;*.SVG");

for(QStringList::Iterator it = files.begin(); it != files.end(); ++it )
{
qWarning((*it).toLocal8Bit().data());
for(QStringList::Iterator it = files.begin(); it != files.end(); ++it )
{
qWarning((*it).toLocal8Bit().data());

//render the SVG file to a pixmap and put it into mIconView
QPixmap pix (10,10);
QPainter myPainter(&pix);
QgsMarkerCatalogue::svgMarker(&myPainter,mCurrentDir + "/" + (*it), 1);
Q3IconViewItem* ivi=new Q3IconViewItem(mIconView,*it,pix);
//render the SVG file to a pixmap and put it into mIconView
QPixmap pix (10,10);
QPainter myPainter(&pix);
QgsMarkerCatalogue::svgMarker(&myPainter,mCurrentDir + "/" + (*it), 1);
new Q3IconViewItem(mIconView,*it,pix);

}
}
}

QString QgsMarkerDialog::defaultDir()
Expand Down
8 changes: 4 additions & 4 deletions src/app/qgsoptions.cpp
Expand Up @@ -380,8 +380,8 @@ QString QgsOptions::getEllipsoidAcronym(QString theEllipsoidName)
// XXX Need to free memory from the error msg if one is set
if(myResult == SQLITE_OK)
{
sqlite3_step(myPreparedStatement) == SQLITE_ROW;
myName = QString((char *)sqlite3_column_text(myPreparedStatement,0));
if (sqlite3_step(myPreparedStatement) == SQLITE_ROW)
myName = QString((char *)sqlite3_column_text(myPreparedStatement,0));
}
// close the sqlite3 statement
sqlite3_finalize(myPreparedStatement);
Expand Down Expand Up @@ -412,8 +412,8 @@ QString QgsOptions::getEllipsoidName(QString theEllipsoidAcronym)
// XXX Need to free memory from the error msg if one is set
if(myResult == SQLITE_OK)
{
sqlite3_step(myPreparedStatement) == SQLITE_ROW;
myName = QString((char *)sqlite3_column_text(myPreparedStatement,0));
if (sqlite3_step(myPreparedStatement) == SQLITE_ROW)
myName = QString((char *)sqlite3_column_text(myPreparedStatement,0));
}
// close the sqlite3 statement
sqlite3_finalize(myPreparedStatement);
Expand Down
2 changes: 2 additions & 0 deletions src/app/qgsrasterlayerproperties.cpp
Expand Up @@ -753,7 +753,9 @@ void QgsRasterLayerProperties::on_pbnHistRefresh_clicked()
bool myIgnoreOutOfRangeFlag = chkHistIgnoreOutOfRange->isChecked();
bool myThoroughBandScanFlag = chkHistAllowApproximation->isChecked();

#ifdef QGISDEBUG
long myCellCount = rasterLayer->getRasterXDim() * rasterLayer->getRasterYDim();
#endif


#ifdef QGISDEBUG
Expand Down
25 changes: 15 additions & 10 deletions src/ui/qgscustomprojectiondialogbase.ui
@@ -1,15 +1,12 @@
<ui version="4.0" >
<author></author>
<comment></comment>
<exportmacro></exportmacro>
<class>QgsCustomProjectionDialogBase</class>
<widget class="QDialog" name="QgsCustomProjectionDialogBase" >
<property name="geometry" >
<rect>
<x>0</x>
<y>0</y>
<width>532</width>
<height>297</height>
<width>718</width>
<height>323</height>
</rect>
</property>
<property name="windowTitle" >
Expand All @@ -27,7 +24,10 @@
</property>
<item row="0" column="0" >
<widget class="QTabWidget" name="tabWidget2" >
<widget class="QWidget" name="tab" >
<property name="currentIndex" >
<number>0</number>
</property>
<widget class="QWidget" name="tab1" >
<attribute name="title" >
<string>Define</string>
</attribute>
Expand All @@ -41,7 +41,10 @@
<item row="1" column="0" colspan="2" >
<widget class="QTextBrowser" name="textBrowser" >
<property name="html" >
<string>&lt;html>&lt;head>&lt;meta name="qrichtext" content="1" />&lt;/head>&lt;body style=" white-space: pre-wrap; font-family:Sans Serif; font-size:9pt; font-weight:400; font-style:normal; text-decoration:none;">&lt;p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:Arial; font-size:10pt;">You can define your own custom projection here. The definition must conform to the proj4 format for specifying a Spatial Reference System.&lt;/p>&lt;/body>&lt;/html></string>
<string>&lt;html>&lt;head>&lt;meta name="qrichtext" content="1" />&lt;style type="text/css">
p, li { white-space: pre-wrap; }
&lt;/style>&lt;/head>&lt;body style=" font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal; text-decoration:none;">
&lt;p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Arial'; font-size:10pt;">You can define your own custom projection here. The definition must conform to the proj4 format for specifying a Spatial Reference System.&lt;/p>&lt;/body>&lt;/html></string>
</property>
</widget>
</item>
Expand Down Expand Up @@ -161,7 +164,7 @@
</item>
</layout>
</widget>
<widget class="QWidget" name="tab" >
<widget class="QWidget" name="tab2" >
<attribute name="title" >
<string>Test</string>
</attribute>
Expand All @@ -182,7 +185,10 @@
<item row="1" column="0" colspan="3" >
<widget class="QTextBrowser" name="textBrowser_2" >
<property name="html" >
<string>&lt;html>&lt;head>&lt;meta name="qrichtext" content="1" />&lt;/head>&lt;body style=" white-space: pre-wrap; font-family:Sans Serif; font-size:9pt; font-weight:400; font-style:normal; text-decoration:none;">&lt;p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:Arial; font-size:10pt;">Use the text boxes below to test the projection definition you are creating. Enter a coordinate where both the lat/long and the projected result are known (for example by reading off a map). Then press the calculate button to see if the projection definition you are creating is accurate.&lt;/p>&lt;/body>&lt;/html></string>
<string>&lt;html>&lt;head>&lt;meta name="qrichtext" content="1" />&lt;style type="text/css">
p, li { white-space: pre-wrap; }
&lt;/style>&lt;/head>&lt;body style=" font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal; text-decoration:none;">
&lt;p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'Arial'; font-size:10pt;">Use the text boxes below to test the projection definition you are creating. Enter a coordinate where both the lat/long and the projected result are known (for example by reading off a map). Then press the calculate button to see if the projection definition you are creating is accurate.&lt;/p>&lt;/body>&lt;/html></string>
</property>
</widget>
</item>
Expand Down Expand Up @@ -302,7 +308,6 @@
</layout>
</widget>
<layoutdefault spacing="6" margin="11" />
<pixmapfunction></pixmapfunction>
<tabstops>
<tabstop>tabWidget2</tabstop>
<tabstop>textBrowser</tabstop>
Expand Down

0 comments on commit b823448

Please sign in to comment.