mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-13 00:03:09 -04:00
allow builds with DEBUG macro defined
This commit is contained in:
parent
bb0bfea3c4
commit
222e45b838
4
external/libdxfrw/drw_base.h
vendored
4
external/libdxfrw/drw_base.h
vendored
@ -93,8 +93,8 @@ namespace DRW
|
||||
|
||||
enum DBG_LEVEL
|
||||
{
|
||||
NONE,
|
||||
DEBUG
|
||||
none,
|
||||
debug
|
||||
};
|
||||
|
||||
//! Special codes for colors
|
||||
|
4
external/libdxfrw/intern/drw_dbg.cpp
vendored
4
external/libdxfrw/intern/drw_dbg.cpp
vendored
@ -67,7 +67,7 @@ DRW_dbg *DRW_dbg::getInstance()
|
||||
|
||||
DRW_dbg::DRW_dbg()
|
||||
{
|
||||
level = NONE;
|
||||
level = none;
|
||||
prClass = new print_none;
|
||||
}
|
||||
|
||||
@ -77,7 +77,7 @@ void DRW_dbg::setLevel( LEVEL lvl )
|
||||
delete prClass;
|
||||
switch ( level )
|
||||
{
|
||||
case DEBUG:
|
||||
case debug:
|
||||
prClass = new print_debug;
|
||||
break;
|
||||
default:
|
||||
|
4
external/libdxfrw/intern/drw_dbg.h
vendored
4
external/libdxfrw/intern/drw_dbg.h
vendored
@ -32,8 +32,8 @@ class DRW_dbg
|
||||
public:
|
||||
enum LEVEL
|
||||
{
|
||||
NONE,
|
||||
DEBUG
|
||||
none,
|
||||
debug
|
||||
};
|
||||
void setLevel( LEVEL lvl );
|
||||
LEVEL getLevel();
|
||||
|
8
external/libdxfrw/libdwgr.cpp
vendored
8
external/libdxfrw/libdwgr.cpp
vendored
@ -53,7 +53,7 @@ dwgR::dwgR( const char *name )
|
||||
, writer( nullptr )
|
||||
#endif
|
||||
{
|
||||
DRW_DBGSL( DRW_dbg::NONE );
|
||||
DRW_DBGSL( DRW_dbg::none );
|
||||
}
|
||||
|
||||
dwgR::~dwgR()
|
||||
@ -65,11 +65,11 @@ void dwgR::setDebug( DRW::DBG_LEVEL lvl )
|
||||
{
|
||||
switch ( lvl )
|
||||
{
|
||||
case DRW::DEBUG:
|
||||
DRW_DBGSL( DRW_dbg::DEBUG );
|
||||
case DRW::debug:
|
||||
DRW_DBGSL( DRW_dbg::debug );
|
||||
break;
|
||||
default:
|
||||
DRW_DBGSL( DRW_dbg::NONE );
|
||||
DRW_DBGSL( DRW_dbg::none );
|
||||
}
|
||||
}
|
||||
|
||||
|
11
external/libdxfrw/libdxfrw.cpp
vendored
11
external/libdxfrw/libdxfrw.cpp
vendored
@ -62,7 +62,7 @@ dxfRW::dxfRW( const char *name )
|
||||
, elParts( 128 ) //parts number when convert ellipse to polyline
|
||||
, currHandle( 0 )
|
||||
{
|
||||
DRW_DBGSL( DRW_dbg::NONE );
|
||||
DRW_DBGSL( DRW_dbg::none );
|
||||
}
|
||||
|
||||
dxfRW::~dxfRW()
|
||||
@ -79,11 +79,11 @@ void dxfRW::setDebug( DRW::DBG_LEVEL lvl )
|
||||
{
|
||||
switch ( lvl )
|
||||
{
|
||||
case DRW::DEBUG:
|
||||
DRW_DBGSL( DRW_dbg::DEBUG );
|
||||
case DRW::debug:
|
||||
DRW_DBGSL( DRW_dbg::debug );
|
||||
break;
|
||||
default:
|
||||
DRW_DBGSL( DRW_dbg::NONE );
|
||||
DRW_DBGSL( DRW_dbg::none );
|
||||
}
|
||||
}
|
||||
|
||||
@ -3398,7 +3398,8 @@ bool dxfRW::processImageDef()
|
||||
return true;
|
||||
}
|
||||
|
||||
/** Utility function
|
||||
/**
|
||||
* Utility function
|
||||
* convert a int to string in hex
|
||||
**/
|
||||
std::string dxfRW::toHexStr( int n )
|
||||
|
@ -31,28 +31,28 @@
|
||||
|
||||
|
||||
|
||||
void gdal::OGRDataSourceDeleter::operator()( void *source )
|
||||
void gdal::OGRDataSourceDeleter::operator()( OGRDataSourceH source )
|
||||
{
|
||||
OGR_DS_Destroy( source );
|
||||
}
|
||||
|
||||
|
||||
void gdal::OGRGeometryDeleter::operator()( void *geometry )
|
||||
void gdal::OGRGeometryDeleter::operator()( OGRGeometryH geometry )
|
||||
{
|
||||
OGR_G_DestroyGeometry( geometry );
|
||||
}
|
||||
|
||||
void gdal::OGRFldDeleter::operator()( void *definition )
|
||||
void gdal::OGRFldDeleter::operator()( OGRFieldDefnH definition )
|
||||
{
|
||||
OGR_Fld_Destroy( definition );
|
||||
}
|
||||
|
||||
void gdal::OGRFeatureDeleter::operator()( void *feature )
|
||||
void gdal::OGRFeatureDeleter::operator()( OGRFeatureH feature )
|
||||
{
|
||||
OGR_F_Destroy( feature );
|
||||
}
|
||||
|
||||
void gdal::GDALDatasetCloser::operator()( void *dataset )
|
||||
void gdal::GDALDatasetCloser::operator()( GDALDatasetH dataset )
|
||||
{
|
||||
GDALClose( dataset );
|
||||
}
|
||||
|
@ -39,7 +39,7 @@ namespace gdal
|
||||
/**
|
||||
* Destroys an OGR data \a source, using the correct gdal calls.
|
||||
*/
|
||||
void CORE_EXPORT operator()( void *source );
|
||||
void CORE_EXPORT operator()( OGRDataSourceH source );
|
||||
|
||||
};
|
||||
|
||||
@ -52,7 +52,7 @@ namespace gdal
|
||||
/**
|
||||
* Destroys an OGR \a geometry, using the correct gdal calls.
|
||||
*/
|
||||
void CORE_EXPORT operator()( void *geometry );
|
||||
void CORE_EXPORT operator()( OGRGeometryH geometry );
|
||||
|
||||
};
|
||||
|
||||
@ -65,7 +65,7 @@ namespace gdal
|
||||
/**
|
||||
* Destroys an OGR field \a definition, using the correct gdal calls.
|
||||
*/
|
||||
void CORE_EXPORT operator()( void *definition );
|
||||
void CORE_EXPORT operator()( OGRFieldDefnH definition );
|
||||
|
||||
};
|
||||
|
||||
@ -78,7 +78,7 @@ namespace gdal
|
||||
/**
|
||||
* Destroys an OGR \a feature, using the correct gdal calls.
|
||||
*/
|
||||
void CORE_EXPORT operator()( void *feature );
|
||||
void CORE_EXPORT operator()( OGRFeatureH feature );
|
||||
|
||||
};
|
||||
|
||||
@ -91,7 +91,7 @@ namespace gdal
|
||||
/**
|
||||
* Destroys an gdal \a dataset, using the correct gdal calls.
|
||||
*/
|
||||
void CORE_EXPORT operator()( void *dataset );
|
||||
void CORE_EXPORT operator()( GDALDatasetH datasource );
|
||||
|
||||
};
|
||||
|
||||
@ -111,27 +111,27 @@ namespace gdal
|
||||
/**
|
||||
* Scoped OGR data source.
|
||||
*/
|
||||
using ogr_datasource_unique_ptr = std::unique_ptr< void, OGRDataSourceDeleter>;
|
||||
using ogr_datasource_unique_ptr = std::unique_ptr< std::remove_pointer<OGRDataSourceH>::type, OGRDataSourceDeleter >;
|
||||
|
||||
/**
|
||||
* Scoped OGR geometry.
|
||||
*/
|
||||
using ogr_geometry_unique_ptr = std::unique_ptr< void, OGRGeometryDeleter>;
|
||||
using ogr_geometry_unique_ptr = std::unique_ptr< std::remove_pointer<OGRGeometryH>::type, OGRGeometryDeleter >;
|
||||
|
||||
/**
|
||||
* Scoped OGR field definition.
|
||||
*/
|
||||
using ogr_field_def_unique_ptr = std::unique_ptr< void, OGRFldDeleter >;
|
||||
using ogr_field_def_unique_ptr = std::unique_ptr< std::remove_pointer<OGRFieldDefnH>::type, OGRFldDeleter >;
|
||||
|
||||
/**
|
||||
* Scoped OGR feature.
|
||||
*/
|
||||
using ogr_feature_unique_ptr = std::unique_ptr< void, OGRFeatureDeleter >;
|
||||
using ogr_feature_unique_ptr = std::unique_ptr< std::remove_pointer<OGRFeatureH>::type, OGRFeatureDeleter >;
|
||||
|
||||
/**
|
||||
* Scoped GDAL dataset.
|
||||
*/
|
||||
using dataset_unique_ptr = std::unique_ptr< void, GDALDatasetCloser >;
|
||||
using dataset_unique_ptr = std::unique_ptr< std::remove_pointer<GDALDatasetH>::type, GDALDatasetCloser >;
|
||||
|
||||
/**
|
||||
* Performs a fast close of an unwanted GDAL dataset handle by deleting the underlying
|
||||
|
@ -2974,9 +2974,8 @@ QGISEXTERN bool createEmptyDataSource( const QString &uri,
|
||||
{
|
||||
QgsDebugMsg( QString( "Creating empty vector layer with format: %1" ).arg( format ) );
|
||||
|
||||
GDALDriverH driver;
|
||||
QgsApplication::registerOgrDrivers();
|
||||
driver = OGRGetDriverByName( format.toLatin1() );
|
||||
OGRSFDriverH driver = OGRGetDriverByName( format.toLatin1() );
|
||||
if ( !driver )
|
||||
{
|
||||
return false;
|
||||
|
Loading…
x
Reference in New Issue
Block a user