Skip to content
Permalink
Browse files
Fix compiler warnings in app and ui directories
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 b8234483ac28a2dc3718a46218bc033993b3d5e8
@@ -533,6 +533,10 @@ void QgsComposition::contentsMouseReleaseEvent(QMouseEvent* e)
ci->writeSettings();
}
break;

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

@@ -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
@@ -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
{
@@ -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
@@ -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()));
}

@@ -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)
{
@@ -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()
@@ -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);
@@ -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);
@@ -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
@@ -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" >
@@ -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>
@@ -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>
@@ -161,7 +164,7 @@
</item>
</layout>
</widget>
<widget class="QWidget" name="tab" >
<widget class="QWidget" name="tab2" >
<attribute name="title" >
<string>Test</string>
</attribute>
@@ -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>
@@ -302,7 +308,6 @@
</layout>
</widget>
<layoutdefault spacing="6" margin="11" />
<pixmapfunction></pixmapfunction>
<tabstops>
<tabstop>tabWidget2</tabstop>
<tabstop>textBrowser</tabstop>

0 comments on commit b823448

Please sign in to comment.