Skip to content

Commit

Permalink
Merge branch 'master' of github.com:qgis/Quantum-GIS
Browse files Browse the repository at this point in the history
  • Loading branch information
timlinux committed May 24, 2011
2 parents 4d5455f + 0b2317e commit 7770b68
Show file tree
Hide file tree
Showing 25 changed files with 306 additions and 402 deletions.
30 changes: 10 additions & 20 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -348,27 +348,17 @@ IF(COMMAND cmake_policy)
ENDIF(COMMAND cmake_policy)

IF (WIN32)
# expect that classes are being imported
# Note: MSVC doesn't like when the macros are quotes
# and MSYS doesn't like them unqouted (bacause of braces)
IF (MSVC)
ADD_DEFINITIONS("-DCORE_EXPORT=__declspec(dllimport)")
ADD_DEFINITIONS("-DGUI_EXPORT=__declspec(dllimport)")
ADD_DEFINITIONS("-DPYTHON_EXPORT=__declspec(dllimport)")
ADD_DEFINITIONS("-DANALYSIS_EXPORT=__declspec(dllimport)")
ELSE (MSVC)
ADD_DEFINITIONS("\"-DCORE_EXPORT=__declspec(dllimport)\"")
ADD_DEFINITIONS("\"-DGUI_EXPORT=__declspec(dllimport)\"")
ADD_DEFINITIONS("\"-DPYTHON_EXPORT=__declspec(dllimport)\"")
ADD_DEFINITIONS("\"-DANALYSIS_EXPORT=__declspec(dllimport)\"")
ENDIF (MSVC)
SET(DLLIMPORT "__declspec(dllimport)")
SET(DLLEXPORT "__declspec(dllexport)")
ELSE (WIN32)
# other compilers don't use that MSVC construct
ADD_DEFINITIONS(-DCORE_EXPORT=)
ADD_DEFINITIONS(-DGUI_EXPORT=)
ADD_DEFINITIONS(-DPYTHON_EXPORT=)
ADD_DEFINITIONS(-DANALYSIS_EXPORT=)
ENDIF (WIN32)
SET(DLLIMPORT "")
SET(DLLEXPORT "")
ENDIF(WIN32)

ADD_DEFINITIONS("-DCORE_EXPORT=${DLLIMPORT}")
ADD_DEFINITIONS("-DGUI_EXPORT=${DLLIMPORT}")
ADD_DEFINITIONS("-DPYTHON_EXPORT=${DLLIMPORT}")
ADD_DEFINITIONS("-DANALYSIS_EXPORT=${DLLIMPORT}")

#############################################################
# user-changeable settings which can be used to customize
Expand Down
4 changes: 2 additions & 2 deletions i18n/qgis_it.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24753,7 +24753,7 @@ p, li { white-space: pre-wrap; }
<message>
<location filename="../src/ui/qgsoptionsbase.ui" line="1531"/>
<source>Override system locale</source>
<translation>Sovascrivi lingua in uso</translation>
<translation>Sovrascrivi lingua in uso</translation>
</message>
<message>
<location filename="../src/ui/qgsoptionsbase.ui" line="1550"/>
Expand Down Expand Up @@ -26832,7 +26832,7 @@ Result: %3 (%4)</translation>
The error message from the database was:
%2.
SQL: %3</source>
<translation>Impossibiel accedere alla tabella %1.
<translation>Impossibile accedere alla tabella %1.
Questo il messaggio di errore dal database:
%2.
SQL: %3</translation>
Expand Down
Empty file modified src/browser/qgsbrowsermodel.cpp
100755 → 100644
Empty file.
2 changes: 2 additions & 0 deletions src/core/qgscredentials.cpp
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@ QgsCredentials *QgsCredentials::smInstance = 0;
void QgsCredentials::setInstance( QgsCredentials *theInstance )
{
if ( smInstance )
{
QgsDebugMsg( "already registered an instance of QgsCredentials" );
}

smInstance = theInstance;
}
Expand Down
26 changes: 12 additions & 14 deletions src/core/qgsdataitem.cpp
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@
***************************************************************************/
/* $Id$ */

#include <typeinfo>

#include <QApplication>
#include <QDateTime>
#include <QDir>
Expand Down Expand Up @@ -258,12 +256,12 @@ void QgsDataItem::refresh()

bool QgsDataItem::equal( const QgsDataItem *other )
{
if ( typeid ( this ) == typeid ( other ) &&
mPath == other->path() )
{
return true;
}
return false;
if ( metaObject()->className() == other->metaObject()->className() &&
mPath == other->path() )
{
return true;
}
return false;
}

// ---------------------------------------------------------------------
Expand Down Expand Up @@ -349,7 +347,7 @@ QgsDirectoryItem::QgsDirectoryItem( QgsDataItem* parent, QString name, QString p
QgsDebugMsg( library->fileName() + " has NoDataCapabilities" );
continue;
}
QgsDebugMsg( QString ( "%1 dataCapabilities : %2").arg(library->fileName()).arg(dataCapabilities() ) );
QgsDebugMsg( QString( "%1 dataCapabilities : %2" ).arg( library->fileName() ).arg( dataCapabilities() ) );
mLibraries.append( library );
}
else
Expand Down Expand Up @@ -380,11 +378,11 @@ QVector<QgsDataItem*> QgsDirectoryItem::createChildren( )
children.append( item );
}

QStringList fileEntries = dir.entryList( QDir::Dirs|QDir::NoDotAndDotDot|QDir::Files, QDir::Name );
QStringList fileEntries = dir.entryList( QDir::Dirs | QDir::NoDotAndDotDot | QDir::Files, QDir::Name );
foreach( QString name, fileEntries )
{
QString path = dir.absoluteFilePath( name );
QFileInfo fileInfo ( path );
QFileInfo fileInfo( path );
foreach( QLibrary *library, mLibraries )
{
// we could/should create separate list of providers for each purpose
Expand All @@ -398,10 +396,10 @@ QVector<QgsDataItem*> QgsDirectoryItem::createChildren( )

int capabilities = dataCapabilities();

if ( !( (fileInfo.isFile() && (capabilities & QgsDataProvider::File)) ||
(fileInfo.isDir() && (capabilities & QgsDataProvider::Dir))) )
if ( !(( fileInfo.isFile() && ( capabilities & QgsDataProvider::File ) ) ||
( fileInfo.isDir() && ( capabilities & QgsDataProvider::Dir ) ) ) )
{
continue;
continue;
}

dataItem_t * dataItem = ( dataItem_t * ) cast_to_fptr( library->resolve( "dataItem" ) );
Expand Down
Empty file modified src/core/qgsdataitem.h
100755 → 100644
Empty file.
11 changes: 7 additions & 4 deletions src/core/qgspallabeling.cpp
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -576,9 +576,10 @@ void QgsPalLayerSettings::registerFeature( QgsFeature& f, const QgsRenderContext
xPos, yPos, dataDefinedPosition, angle, dataDefinedRotation ) )
return;
}
catch ( std::exception* e )
catch ( std::exception &e )
{
QgsDebugMsg( QString( "Ignoring feature %1 due PAL exception: " ).arg( f.id() ) + QString::fromLatin1( e->what() ) );
Q_UNUSED( e );
QgsDebugMsg( QString( "Ignoring feature %1 due PAL exception: " ).arg( f.id() ) + QString::fromLatin1( e.what() ) );
return;
}

Expand Down Expand Up @@ -869,9 +870,10 @@ void QgsPalLabeling::registerDiagramFeature( QgsVectorLayer* layer, QgsFeature&
return;
}
}
catch ( std::exception* e )
catch ( std::exception &e )
{
QgsDebugMsg( QString( "Ignoring feature %1 due PAL exception: " ).arg( feat.id() ) + QString::fromLatin1( e->what() ) );
Q_UNUSED( e );
QgsDebugMsg( QString( "Ignoring feature %1 due PAL exception: " ).arg( feat.id() ) + QString::fromLatin1( e.what() ) );
return;
}

Expand Down Expand Up @@ -961,6 +963,7 @@ void QgsPalLabeling::drawLabeling( QgsRenderContext& context )
}
catch ( std::exception& e )
{
Q_UNUSED( e );
QgsDebugMsg( "PAL EXCEPTION :-( " + QString::fromLatin1( e.what() ) );
//mActiveLayers.clear(); // clean up
return;
Expand Down
1 change: 0 additions & 1 deletion src/core/qgssearchstring.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
//! global function from parser.y that interfaces parser
extern QgsSearchTreeNode* parseSearchString( const QString& str, QString& parserErrorMsg );


QgsSearchString::QgsSearchString()
{
mTree = NULL;
Expand Down
9 changes: 9 additions & 0 deletions src/core/qgsvectorlayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -778,6 +778,7 @@ void QgsVectorLayer::drawRendererV2( QgsRenderContext& rendererContext, bool lab
}
catch ( const QgsCsException &cse )
{
Q_UNUSED( cse );
QgsDebugMsg( QString( "Failed to transform a point while drawing a feature of type '%1'. Ignoring this feature. %2" )
.arg( fet.typeName() ).arg( cse.what() ) );
}
Expand Down Expand Up @@ -920,6 +921,7 @@ void QgsVectorLayer::drawRendererV2Levels( QgsRenderContext& rendererContext, bo
}
catch ( const QgsCsException &cse )
{
Q_UNUSED( cse );
QgsDebugMsg( QString( "Failed to transform a point while drawing a feature of type '%1'. Ignoring this feature. %2" )
.arg( fet.typeName() ).arg( cse.what() ) );
}
Expand Down Expand Up @@ -1106,6 +1108,7 @@ bool QgsVectorLayer::draw( QgsRenderContext& rendererContext )
}
catch ( QgsCsException &cse )
{
Q_UNUSED( cse );
QgsDebugMsg( QString( "Failed to transform a point while drawing a feature of type '%1'. Rendering stopped. %2" )
.arg( fet.typeName() ).arg( cse.what() ) );
return false;
Expand Down Expand Up @@ -1446,7 +1449,9 @@ void QgsVectorLayer::updateExtents()
mLayerExtent.setMinimal();

if ( !mDataProvider )
{
QgsDebugMsg( "invoked with null mDataProvider" );
}

if ( mDeletedFeatureIds.isEmpty() && mChangedGeometries.isEmpty() )
{
Expand Down Expand Up @@ -1739,7 +1744,9 @@ bool QgsVectorLayer::nextFeature( QgsFeature &f )
}

if ( !found )
{
QgsDebugMsg( QString( "No attributes for the added feature %1 found" ).arg( f.id() ) );
}
}
else
{
Expand Down Expand Up @@ -1841,7 +1848,9 @@ bool QgsVectorLayer::featureAtId( int featureId, QgsFeature& f, bool fetchGeomet
}

if ( !found )
{
QgsDebugMsg( QString( "No attributes for the added feature %1 found" ).arg( f.id() ) );
}
}
else
{
Expand Down
6 changes: 4 additions & 2 deletions src/plugins/grass/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,12 @@ SUBDIRS(modules-common ${GRASS_MODULES_DIR} scripts themes)

ADD_DEFINITIONS(-DGRASS_BASE=\\\"${GRASS_PREFIX}\\\")
ADD_DEFINITIONS(-DHAVE_OPENPTY=${HAVE_OPENPTY})
ADD_DEFINITIONS("-DGRASS_EXPORT=${DLLIMPORT} -DGRASS_LIB_EXPORT=${DLLIMPORT}")

IF (WIN32)
ADD_DEFINITIONS(-DHAVE_GETPT "-DGRASS_EXPORT=__declspec(dllimport)")
ADD_DEFINITIONS(-DHAVE_GETPT)
ELSE (WIN32)
ADD_DEFINITIONS(-DHAVE_POSIX_OPENPT -DGRASS_EXPORT=)
ADD_DEFINITIONS(-DHAVE_POSIX_OPENPT)
ENDIF (WIN32)

########################################################
Expand Down Expand Up @@ -151,6 +152,7 @@ INCLUDE_DIRECTORIES(
TARGET_LINK_LIBRARIES(grassplugin
qgisgrass
qgis_gui
grassprovider
${OPENPTY_LIBRARY}
)

Expand Down
1 change: 1 addition & 0 deletions src/plugins/grass/qgsgrassplugin.cpp
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,7 @@ void QgsGrassPlugin::mapsetChanged()
}
catch ( QgsGrass::Exception &e )
{
Q_UNUSED( e );
QgsDebugMsg( "Cannot read GRASS CRS : " + QString( e.what() ) );
mCrs = QgsCoordinateReferenceSystem();
}
Expand Down
8 changes: 5 additions & 3 deletions src/plugins/grass/qgsgrassplugin.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,11 @@ class QToolBar;
* \brief OpenModeller plugin for QGIS
*
*/
class QgsGrassPlugin: public QObject, public QgisPlugin
class QgsGrassPlugin : public QObject, public QgisPlugin
{
Q_OBJECT public:
Q_OBJECT

public:
/**
* Constructor for a plugin. The QgisInterface pointer is passed by
* QGIS when it attempts to instantiate the plugin.
Expand All @@ -68,7 +70,7 @@ class QgsGrassPlugin: public QObject, public QgisPlugin
*/
virtual int type();
//! Destructor
virtual ~ QgsGrassPlugin();
virtual ~QgsGrassPlugin();

//! Get Region Pen
QPen & regionPen( void );
Expand Down
4 changes: 2 additions & 2 deletions src/plugins/grass/qgsgrassselect.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -337,8 +337,8 @@ void QgsGrassSelect::setLayers()
return;

QStringList layers = QgsGrass::vectorLayers( egisdbase->text(),
elocation->currentText(), emapset->currentText(),
emap->currentText().toUtf8() );
elocation->currentText(), emapset->currentText(),
emap->currentText().toUtf8() );

int idx = 0;
int sel = -1;
Expand Down
Loading

0 comments on commit 7770b68

Please sign in to comment.