Skip to content
Permalink
Browse files

Fix some compiler warnings

git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@6448 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
g_j_m
g_j_m committed Jan 21, 2007
1 parent 93fadb5 commit 5d53cd6c3e84e3791ed255d128ea0b9bed13a77c
@@ -193,6 +193,9 @@ void myMessageOutput( QtMsgType type, const char *msg )
case QtDebugMsg:
fprintf( stderr, "Debug: %s\n", msg );
break;
case QtCriticalMsg:
fprintf( stderr, "Critical: %s\n", msg );
break;
case QtWarningMsg:
fprintf( stderr, "Warning: %s\n", msg );

@@ -1264,13 +1264,13 @@ bool QgisApp::createDB()
//now copy the master file into the users .qgis dir
bool isDbFileCopied = masterFile.copy(qgisPrivateDbFile.name());

#ifdef QGISDEBUG
if (!isDbFileCopied)
{
#ifdef QGISDEBUG
std::cout << "[ERROR] Can not make qgis.db private copy" << std::endl;
return FALSE;
}
#endif
}
}
return TRUE;
}
@@ -2590,8 +2590,6 @@ void QgisApp::newVectorLayer()
//try to create the new layer with OGRProvider instead of QgsVectorFileWriter
QgsProviderRegistry * pReg = QgsProviderRegistry::instance();
QString ogrlib = pReg->library("ogr");
// This var is not used...remove? TS FIXME
const char *cOgrLib = (const char *) ogrlib;
// load the data provider
QLibrary* myLib = new QLibrary((const char *) ogrlib);
bool loaded = myLib->load();
@@ -61,7 +61,7 @@ void QgsAbout::init()
if ( file.open( QIODevice::ReadOnly ) ) {
QTextStream stream( &file );
QString line;
int i = 1;

while ( !stream.atEnd() )
{
line = stream.readLine(); // line of text excluding '\n'
@@ -162,7 +162,7 @@ void QgsAttributeTable::sortColumn(int col, bool ascending, bool wholeRows)
//if the first entry contains a letter, sort alphanumerically, otherwise numerically
QString firstentry = text(0, col);
bool containsletter = false;
for (uint i = 0; i < firstentry.length(); i++)
for (int i = 0; i < firstentry.length(); i++)
{
if (firstentry.ref(i).isLetter())
{
@@ -278,7 +278,7 @@ void QgsAttributeTable::popupMenu(int row, int col, const QPoint& pos)
if (mActionPopup == 0)
{
mActionPopup = new QMenu();
QAction *a = mActionPopup->addAction( tr("Run action") );
mActionPopup->addAction( tr("Run action") );
mActionPopup->addSeparator();

QgsAttributeAction::aIter iter = mActions.begin();
@@ -37,12 +37,12 @@ QgsHttpTransaction::QgsHttpTransaction(QString uri,
int proxyPort,
QString proxyUser,
QString proxyPass)
: httpurl(uri),
: httpresponsecontenttype(0),
httpurl(uri),
httphost(proxyHost),
httpport(proxyPort),
httpuser(proxyUser),
httppass(proxyPass),
httpresponsecontenttype(0),
mError(0)
{

@@ -433,7 +433,7 @@ void QgsLabel::setLabelField ( int attr, const QString str )
mLabelField[attr] = str;

mLabelFieldIdx[attr] = -1;
for ( uint i = 0; i < mField.size(); i++ )
for ( int i = 0; i < mField.size(); i++ )
{
if ( mField[i].name().compare(str) == 0 )
{
@@ -492,7 +492,7 @@ QString QgsVectorFileWriter::writeVectorLayerAsShapefile(QString shapefileName,
// create the fields
QgsDebugMsg("creating " + QString("%d").arg(attributeFields.size()) + " fields");

for (uint i = 0; i < attributeFields.size(); i++)
for (int i = 0; i < attributeFields.size(); i++)
{
// check the field length - if > 10 we need to truncate it
QgsField attrField = attributeFields[i];

0 comments on commit 5d53cd6

Please sign in to comment.
You can’t perform that action at this time.