Skip to content
Permalink
Browse files

fix windows build, warnings, typos and roadgraph plugin indentation

git-svn-id: http://svn.osgeo.org/qgis/trunk@15071 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
jef
jef committed Jan 24, 2011
1 parent d29ac24 commit 656ca4ad6a8cda7f0121c809a946c00f828c2f7a
Showing with 1,037 additions and 1,031 deletions.
  1. +1 −1 INSTALL
  2. +1 −1 doc/osx.t2t
  3. +1 −1 python/pyspatialite/src/cursor.c
  4. +1 −1 scripts/chkspelling.sh
  5. +3 −3 src/astyle/ASBeautifier.cpp
  6. +1 −1 src/astyle/ASEnhancer.cpp
  7. +6 −6 src/astyle/ASFormatter.cpp
  8. +1 −1 src/core/qgspallabeling.h
  9. +1 −1 src/core/spatialite/headers/spatialite/gaiageo.h
  10. +1 −1 src/core/spatialite/headers/spatialite/sqlite3.h
  11. +1 −1 src/core/spatialite/headers/spatialite/sqlite3ext.h
  12. +3 −3 src/core/spatialite/spatialite.c
  13. +18 −18 src/mapserver/CMakeLists.txt
  14. +2 −0 src/mapserver/qgsprojectparser.cpp
  15. +1 −1 src/mapserver/qgsremoteowsbuilder.cpp
  16. +1 −0 src/plugins/roadgraph/CMakeLists.txt
  17. +24 −23 src/plugins/roadgraph/exportdlg.cpp
  18. +14 −14 src/plugins/roadgraph/exportdlg.h
  19. +30 −30 src/plugins/roadgraph/graphbuilder.h
  20. +18 −18 src/plugins/roadgraph/graphdirector.h
  21. +15 −15 src/plugins/roadgraph/linevectorlayerdirector.cpp
  22. +16 −16 src/plugins/roadgraph/linevectorlayerdirector.h
  23. +19 −19 src/plugins/roadgraph/linevectorlayersettings.cpp
  24. +73 −73 src/plugins/roadgraph/linevectorlayersettings.h
  25. +90 −90 src/plugins/roadgraph/linevectorlayerwidget.cpp
  26. +57 −57 src/plugins/roadgraph/linevectorlayerwidget.h
  27. +26 −26 src/plugins/roadgraph/roadgraphplugin.cpp
  28. +115 −115 src/plugins/roadgraph/roadgraphplugin.h
  29. +25 −25 src/plugins/roadgraph/settings.h
  30. +16 −16 src/plugins/roadgraph/settingsdlg.cpp
  31. +40 −40 src/plugins/roadgraph/settingsdlg.h
  32. +84 −84 src/plugins/roadgraph/shortestpathwidget.cpp
  33. +134 −134 src/plugins/roadgraph/shortestpathwidget.h
  34. +15 −15 src/plugins/roadgraph/simplegraphbuilder.cpp
  35. +25 −25 src/plugins/roadgraph/simplegraphbuilder.h
  36. +19 −19 src/plugins/roadgraph/units.cpp
  37. +47 −47 src/plugins/roadgraph/units.h
  38. +25 −25 src/plugins/roadgraph/utils.cpp
  39. +65 −63 src/plugins/roadgraph/utils.h
  40. +2 −2 src/providers/sqlanywhere/qgssqlanywhereprovider.cpp
@@ -1555,7 +1555,7 @@ You can take care of both with the PyQwt source from:


Double-click the tarball to unpack it. The following assumes PyQwt v5.2.0 (comes with Qwt 5.2.1).
Normal compilation does both Qwt and PyQwt at the same time, but Qwt is staically linked
Normal compilation does both Qwt and PyQwt at the same time, but Qwt is statically linked
into PyQwt, and Qgis can't use it. So, we need to split the build.

First edit qwtconfig.pri in the qwt-5.2 subdir and change some settings so
@@ -265,7 +265,7 @@ http://pyqwt.sourceforge.net/
```

Double-click the tarball to unpack it. The following assumes PyQwt v5.2.0 (comes with Qwt 5.2.1).
Normal compilation does both Qwt and PyQwt at the same time, but Qwt is staically linked
Normal compilation does both Qwt and PyQwt at the same time, but Qwt is statically linked
into PyQwt, and Qgis can't use it. So, we need to split the build.

First edit qwtconfig.pri in the qwt-5.2 subdir and change some settings so
@@ -56,7 +56,7 @@ static pysqlite_StatementKind detect_statement_type(char* statement)
dst = buf;
*dst = 0;
while (isalpha(*src) && dst - buf < sizeof(buf) - 2) {
*dst++ = tolower(*src++);
*dst++ = (char) tolower(*src++);
}

*dst = 0;
@@ -2,7 +2,7 @@


RE=$(echo $(cut -d: -f1 scripts/spelling.dat | sed -e 's/^/\\</; s/$/\\>|/;') | sed -e 's/| /|/g; s/|$//;')
EX="\.(svn-base|tmp|xpm|ts)|context_help|spelling\.dat"
EX="\.(svn-base|tmp|xpm|ts)|context_help|spelling\.dat|Exception_to_GPL_for_Qt.txt|sqlite3.c"

egrep --color=always "$RE" -ir . | egrep -iv "$EX"
egrep --color=always "$RE" -i resources/context_help/*-en_US
@@ -1596,7 +1596,7 @@ string ASBeautifier::beautify(const string &originalLine)
/*
* Create a temporary snapshot of the current block's header-list in the
* uppermost inner stack in tempStacks, and clear the headerStack up to
* the begining of the block.
* the beginning of the block.
* Thus, the next future statement will think it comes one indent past
* the block's '{' unless it specifically checks for a companion-header
* (such as a previous 'if' for an 'else' header) within the tempStacks,
@@ -1758,7 +1758,7 @@ string ASBeautifier::beautify(const string &originalLine)
if (lineCommentNoBeautify || blockCommentNoBeautify || isInQuoteContinuation)
tabCount = spaceTabCount = 0;

// finally, insert indentations into begining of line
// finally, insert indentations into beginning of line

prevFinalLineSpaceTabCount = spaceTabCount;
prevFinalLineTabCount = tabCount;
@@ -1897,7 +1897,7 @@ const string *ASBeautifier::findHeader(const string &line, int i, const vector<c
if (line.compare(i, header->length(), header->c_str()) == 0)
{
// check that this is a header and not a part of a longer word
// (e.g. not at its begining, not at its middle...)
// (e.g. not at its beginning, not at its middle...)

int lineLength = line.length();
int headerEnd = i + header->length();
@@ -475,7 +475,7 @@ bool ASEnhancer::findKeyword(const string &line, int i, const char *keyword) con
if (line.compare(i, strlen(keyword), keyword) == 0)
{
// check that this is a header and not a part of a longer word
// (e.g. not at its begining, not at its middle...)
// (e.g. not at its beginning, not at its middle...)

int lineLength = line.length();
int wordEnd = i + strlen(keyword);
@@ -180,7 +180,7 @@ void ASFormatter::staticInit()
*
* init() should be called every time a ASFormatter object is to start
* formatting a NEW source file.
* init() recieves a pointer to a DYNAMICALLY CREATED ASSourceIterator object
* init() receives a pointer to a DYNAMICALLY CREATED ASSourceIterator object
* that will be used to iterate through the source code. This object will be
* deleted during the ASFormatter's destruction, and thus should not be
* deleted elsewhere.
@@ -307,7 +307,7 @@ string ASFormatter::nextLine()
}
else // stuff to do when reading a new character...
{
// make sure that a virgin '{' at the begining ofthe file will be treated as a block...
// make sure that a virgin '{' at the beginning ofthe file will be treated as a block...
if (isInVirginLine && currentChar == '{' && lineBeginsWith('{'))
previousCommandChar = '{';
isPreviousCharPostComment = isCharImmediatelyPostComment;
@@ -322,7 +322,7 @@ string ASFormatter::nextLine()
{
appendCurrentChar();

// explicitely break a line when a line comment's end is found.
// explicitly break a line when a line comment's end is found.
if (charNum + 1 == (int) currentLine.length())
{
isInLineBreak = true;
@@ -404,7 +404,7 @@ string ASFormatter::nextLine()
formattedLineCommentNum = formattedLine.length();
appendSequence(AS_OPEN_LINE_COMMENT);
goForward(1);
// explicitely break a line when a line comment's end is found.
// explicitly break a line when a line comment's end is found.
if (charNum + 1 == (int) currentLine.length())
{
isInLineBreak = true;
@@ -448,7 +448,7 @@ string ASFormatter::nextLine()
previousCommandChar = previousNonWSChar = previousChar = '{';

// check if in preprocessor
// ** isInPreprocessor will be automatically reset at the begining
// ** isInPreprocessor will be automatically reset at the beginning
// of a new line in getnextChar()
if (isCStyle && currentChar == '#')
{
@@ -1263,7 +1263,7 @@ bool ASFormatter::isBeforeLineEndComment(int startPos) const
* get the next character, increasing the current placement in the process.
* the new character is inserted into the variable currentChar.
*
* @return whether succeded to recieve the new character.
* @return whether succeded to receive the new character.
*/
bool ASFormatter::getNextChar()
{
@@ -90,7 +90,7 @@ class CORE_EXPORT QgsPalLayerSettings
Hali, //horizontal alignment for data defined label position (Left, Center, Right)
Vali, //vertical alignment for data defined label position (Bottom, Base, Half, Cap, Top)
LabelDistance,
Rotation //data defined rotation (only usefull in connection with data defined position)
Rotation //data defined rotation (only useful in connection with data defined position)
};

QString fieldName;
@@ -377,7 +377,7 @@ extern "C"
char *Name; /* field name */
unsigned char Type; /* field type */
int Offset; /* buffer offset [this field begins at *buffer+offset* and extends for *length* bytes */
unsigned char Length; /* field total lenght [in bytes] */
unsigned char Length; /* field total length [in bytes] */
unsigned char Decimals; /* decimal positions */
gaiaValuePtr Value; /* the current multitype value for this attribute */
struct gaiaDbfFieldStruct *Next; /* pointer to next element in linked list */
@@ -4448,7 +4448,7 @@ SQLITE_API int sqlite3_release_memory(int);
** <li> Memory accounting is disabled using a combination of the
** [sqlite3_config]([SQLITE_CONFIG_MEMSTATUS],...) start-time option and
** the [SQLITE_DEFAULT_MEMSTATUS] compile-time option.
** <li> An alternative page cache implementation is specifed using
** <li> An alternative page cache implementation is specified using
** [sqlite3_config]([SQLITE_CONFIG_PCACHE],...).
** <li> The page cache allocates from its own memory pool supplied
** by [sqlite3_config]([SQLITE_CONFIG_PAGECACHE],...) rather than
@@ -424,7 +424,7 @@ struct sqlite3_api_routines {

/*
** The following macros redefine the API routines so that they are
** redirected throught the global sqlite3_api structure.
** redirected through the global sqlite3_api structure.
**
** This header file is also used by the loadext.c source file
** (part of the main SQLite library - not an extension) so that
** <li> Memory accounting is disabled using a combination of the
** [sqlite3_config]([SQLITE_CONFIG_MEMSTATUS],...) start-time option and
** the [SQLITE_DEFAULT_MEMSTATUS] compile-time option.
** <li> An alternative page cache implementation is specifed using
** <li> An alternative page cache implementation is specified using
** [sqlite3_config]([SQLITE_CONFIG_PCACHE],...).
** <li> The page cache allocates from its own memory pool supplied
** by [sqlite3_config]([SQLITE_CONFIG_PAGECACHE],...) rather than

/*
** The following macros redefine the API routines so that they are
** redirected throught the global sqlite3_api structure.
** redirected through the global sqlite3_api structure.
**
** This header file is also used by the loadext.c source file
** (part of the main SQLite library - not an extension) so that
char *Name; /* field name */
unsigned char Type; /* field type */
int Offset; /* buffer offset [this field begins at *buffer+offset* and extends for *length* bytes */
unsigned char Length; /* field total lenght [in bytes] */
unsigned char Length; /* field total length [in bytes] */
unsigned char Decimals; /* decimal positions */
gaiaValuePtr Value; /* the current multitype value for this attribute */
struct gaiaDbfFieldStruct *Next; /* pointer to next element in linked list */
@@ -82,24 +82,24 @@ ADD_EXECUTABLE(qgis_mapserv.fcgi
)

INCLUDE_DIRECTORIES(
${GDAL_INCLUDE_DIR}
${FCGI_INCLUDE_DIR}
${GEOS_INCLUDE_DIR}
${PROJ_INCLUDE_DIR}
${POSTGRES_INCLUDE_DIR}
${CMAKE_CURRENT_BINARY_DIR}
${QT_INCLUDE_DIR}
${QGIS_INCLUDE_DIR}
../core
../core/raster
../core/renderer
../core/symbology
../core/symbology-ng
../core/composer
../analysis/interpolation
../plugins/diagram_overlay
.
)
${GDAL_INCLUDE_DIR}
${FCGI_INCLUDE_DIR}
${GEOS_INCLUDE_DIR}
${PROJ_INCLUDE_DIR}
${POSTGRES_INCLUDE_DIR}
${CMAKE_CURRENT_BINARY_DIR}
${QT_INCLUDE_DIR}
${QGIS_INCLUDE_DIR}
../core
../core/raster
../core/renderer
../core/symbology
../core/symbology-ng
../core/composer
../analysis/interpolation
../plugins/diagram_overlay
.
)

IF (WITH_INTERNAL_SPATIALITE)
INCLUDE_DIRECTORIES(BEFORE ../core/spatialite/headers/spatialite)
@@ -629,6 +629,8 @@ QList<QDomElement> QgsProjectParser::legendGroupElements() const
{
groupList.push_back( groupNodeList.at( i ).toElement() );
}

return groupList;
}

QMap< QString, QDomElement > QgsProjectParser::projectLayerElementsById() const
@@ -88,7 +88,7 @@ QgsMapLayer* QgsRemoteOWSBuilder::createMapLayer( const QDomElement& elem, const

if ( serviceName == "WFS" )
{
//support for old format where type is explicitely given and not part of url
//support for old format where type is explicitly given and not part of url
QString tname = onlineResourceElement.attribute( "type" );
if ( !tname.isEmpty() )
{
@@ -28,6 +28,7 @@ SET (VRP_RCCS roadgraph.qrc)

INCLUDE_DIRECTORIES(
${CMAKE_CURRENT_BINARY_DIR}
${GEOS_INCLUDE_DIR}
../../core
../../gui
..
@@ -31,27 +31,27 @@ RgExportDlg::RgExportDlg( QWidget* parent, Qt::WFlags fl )
: QDialog( parent, fl )
{
// create base widgets;
setWindowTitle( tr("Export feature") );
setWindowTitle( tr( "Export feature" ) );
QVBoxLayout *v = new QVBoxLayout( this );

QHBoxLayout *h = new QHBoxLayout();
QLabel *l = new QLabel( tr("Select destination layer:"), this);
h->addWidget(l);
QLabel *l = new QLabel( tr( "Select destination layer:" ), this );
h->addWidget( l );
mcbLayers = new QComboBox( this );
h->addWidget(mcbLayers);
v->addLayout(h);
h->addWidget( mcbLayers );
v->addLayout( h );

QDialogButtonBox *bb = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel, Qt::Horizontal, this);
connect(bb, SIGNAL(accepted()), this, SLOT(on_buttonBox_accepted()) );
connect(bb, SIGNAL(rejected()), this, SLOT(on_buttonBox_rejected()) );
v->addWidget(bb);
QDialogButtonBox *bb = new QDialogButtonBox( QDialogButtonBox::Ok | QDialogButtonBox::Cancel, Qt::Horizontal, this );
connect( bb, SIGNAL( accepted() ), this, SLOT( on_buttonBox_accepted() ) );
connect( bb, SIGNAL( rejected() ), this, SLOT( on_buttonBox_rejected() ) );
v->addWidget( bb );

//fill list of layers
mcbLayers->insertItem( 0, tr("new temporary layer"), QVariant("-1") );
mcbLayers->insertItem( 0, tr( "new temporary layer" ), QVariant( "-1" ) );

QMap<QString, QgsMapLayer*> mapLayers = QgsMapLayerRegistry::instance()->mapLayers();
QMap<QString, QgsMapLayer*>::iterator layer_it = mapLayers.begin();

for ( ; layer_it != mapLayers.end(); ++layer_it )
{
QgsVectorLayer* vl = dynamic_cast<QgsVectorLayer*>( layer_it.value() );
@@ -72,33 +72,34 @@ QgsVectorLayer* RgExportDlg::mapLayer() const
{
QgsVectorLayer* myLayer = NULL;
QString layerId = mcbLayers->itemData( mcbLayers->currentIndex() ).toString();
if ( layerId == QString("-1") )

if ( layerId == QString( "-1" ) )
{
// create a temporary layer
myLayer = new QgsVectorLayer( "LineString", "shortest path", "memory" );

QgsVectorDataProvider *prov = myLayer->dataProvider();
if ( prov == NULL)
return NULL;
if ( prov == NULL )
return NULL;

QList<QgsField> attrList;
attrList.append( QgsField("one", QVariant::Int) );
attrList.append( QgsField( "one", QVariant::Int ) );
prov->addAttributes( attrList );
QgsMapLayerRegistry::instance()->addMapLayer( myLayer );
QgsMapLayerRegistry::instance()->addMapLayer( myLayer );

}else
}
else
{
// retrun selected layer
myLayer = dynamic_cast<QgsVectorLayer*>( QgsMapLayerRegistry::instance()->mapLayer( layerId ) );
}

return myLayer;
} // QgsVectorLayer* RgExportDlg::vectorLayer() const

void RgExportDlg::on_buttonBox_accepted()
{
accept();
{
accept();
} // void RgExportDlg::on_buttonBox_accepted()

void RgExportDlg::on_buttonBox_rejected()
@@ -11,7 +11,7 @@
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/
***************************************************************************/
#ifndef ROADGRAPH_EXPORTDLG_H
#define ROADGRAPH_EXPORTDLG_H

@@ -35,20 +35,20 @@ class QgsVectorLayer;
class RgExportDlg : public QDialog
{
Q_OBJECT
public:
RgExportDlg( QWidget* parent = 0, Qt::WFlags fl = 0 );
~RgExportDlg();
public:
QgsVectorLayer* mapLayer() const;
private:
static const int context_id = 0;
public:
RgExportDlg( QWidget* parent = 0, Qt::WFlags fl = 0 );
~RgExportDlg();
public:
QgsVectorLayer* mapLayer() const;
private:
static const int context_id = 0;

private slots:
void on_buttonBox_accepted();
void on_buttonBox_rejected();
void on_buttonBox_helpRequested();
private slots:
void on_buttonBox_accepted();
void on_buttonBox_rejected();
void on_buttonBox_helpRequested();

private:
QComboBox *mcbLayers;
private:
QComboBox *mcbLayers;
};
#endif

0 comments on commit 656ca4a

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