mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-14 00:07:35 -04:00
Run clang-tidy modernization checks
This commit is contained in:
parent
8f55093642
commit
b69389b650
@ -31,7 +31,6 @@ Dialog to set up parameters to create a new GeoPackage layer, and on accept() to
|
||||
%Docstring
|
||||
Constructor
|
||||
%End
|
||||
~QgsNewGeoPackageLayerDialog();
|
||||
|
||||
void setCrs( const QgsCoordinateReferenceSystem &crs );
|
||||
%Docstring
|
||||
|
@ -36,9 +36,6 @@ the you probably want to look at QgsProjectionSelectionWidget instead.
|
||||
Constructor for QgsProjectionSelectionDialog.
|
||||
%End
|
||||
|
||||
|
||||
~QgsProjectionSelectionDialog();
|
||||
|
||||
QgsCoordinateReferenceSystem crs() const;
|
||||
%Docstring
|
||||
Returns the CRS currently selected in the widget.
|
||||
|
@ -64,11 +64,9 @@ static float screenSpaceError( QgsChunkNode *node, const QgsChunkedEntity::Scene
|
||||
|
||||
QgsChunkedEntity::QgsChunkedEntity( const QgsAABB &rootBbox, float rootError, float tau, int maxLevel, QgsChunkLoaderFactory *loaderFactory, Qt3DCore::QNode *parent )
|
||||
: Qt3DCore::QEntity( parent )
|
||||
, mNeedsUpdate( false )
|
||||
, mTau( tau )
|
||||
, mMaxLevel( maxLevel )
|
||||
, mChunkLoaderFactory( loaderFactory )
|
||||
, mMaxLoadedChunks( 512 )
|
||||
{
|
||||
mRootNode = new QgsChunkNode( 0, 0, 0, rootBbox, rootError );
|
||||
mChunkLoaderQueue = new QgsChunkList;
|
||||
|
@ -27,7 +27,7 @@
|
||||
#include "qgsrasterlayer.h"
|
||||
|
||||
Qgs3DMapSettings::Qgs3DMapSettings( const Qgs3DMapSettings &other )
|
||||
: QObject()
|
||||
: QObject( nullptr )
|
||||
, mOrigin( other.mOrigin )
|
||||
, mCrs( other.mCrs )
|
||||
, mBackgroundColor( other.mBackgroundColor )
|
||||
|
@ -18,7 +18,7 @@
|
||||
|
||||
#include "qgis_3d.h"
|
||||
|
||||
#include <math.h>
|
||||
#include <cmath>
|
||||
#include <QList>
|
||||
#include <QVector3D>
|
||||
|
||||
|
@ -56,10 +56,6 @@ QgsTessellatedPolygonGeometry::QgsTessellatedPolygonGeometry( QNode *parent )
|
||||
}
|
||||
}
|
||||
|
||||
QgsTessellatedPolygonGeometry::~QgsTessellatedPolygonGeometry()
|
||||
{
|
||||
}
|
||||
|
||||
void QgsTessellatedPolygonGeometry::setPolygons( const QList<QgsPolygon *> &polygons, const QgsPointXY &origin, float extrusionHeight, const QList<float> &extrusionHeightPerPolygon )
|
||||
{
|
||||
QgsTessellator tessellator( origin.x(), origin.y(), mWithNormals, mInvertNormals, mAddBackFaces );
|
||||
|
@ -39,7 +39,6 @@ class QgsTessellatedPolygonGeometry : public Qt3DRender::QGeometry
|
||||
public:
|
||||
//! Constructor
|
||||
QgsTessellatedPolygonGeometry( QNode *parent = nullptr );
|
||||
~QgsTessellatedPolygonGeometry() override;
|
||||
|
||||
//! Returns whether the normals of triangles will be inverted (useful for fixing clockwise / counter-clockwise face vertex orders)
|
||||
bool invertNormals() const { return mInvertNormals; }
|
||||
|
@ -49,7 +49,7 @@ QgsRectangle QgsTilingScheme::tileToExtent( int x, int y, int z ) const
|
||||
void QgsTilingScheme::extentToTile( const QgsRectangle &extent, int &x, int &y, int &z ) const
|
||||
{
|
||||
x = y = z = 0; // start with root tile
|
||||
while ( 1 )
|
||||
while ( true )
|
||||
{
|
||||
// try to see if any child tile fully contains our extent - if so, go deeper
|
||||
if ( tileToExtent( x * 2, y * 2, z + 1 ).contains( extent ) )
|
||||
|
@ -34,7 +34,7 @@ class ANALYSIS_EXPORT Bezier3D: public ParametricLine
|
||||
|
||||
public:
|
||||
//! Default constructor
|
||||
Bezier3D();
|
||||
Bezier3D() = default;
|
||||
//! Constructor, par is a pointer to the parent, controlpoly a controlpolygon
|
||||
Bezier3D( ParametricLine *par, QVector<QgsPoint *> *controlpoly );
|
||||
|
||||
@ -72,11 +72,6 @@ class ANALYSIS_EXPORT Bezier3D: public ParametricLine
|
||||
|
||||
//-----------------------------------------------constructors, destructor and assignment operator------------------------------
|
||||
|
||||
inline Bezier3D::Bezier3D() : ParametricLine()//default constructor
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
inline Bezier3D::Bezier3D( ParametricLine *parent, QVector<QgsPoint *> *controlpoly ) : ParametricLine( parent, controlpoly )
|
||||
{
|
||||
mDegree = mControlPoly->count() - 1;
|
||||
|
@ -86,8 +86,7 @@ class ANALYSIS_EXPORT NormVecDecorator: public TriDecorator
|
||||
#ifndef SIP_RUN
|
||||
|
||||
inline NormVecDecorator::NormVecDecorator()
|
||||
: TriDecorator()
|
||||
, mNormVec( new QVector<Vector3D*>( DEFAULT_STORAGE_FOR_NORMALS ) )
|
||||
: mNormVec( new QVector<Vector3D*>( DEFAULT_STORAGE_FOR_NORMALS ) )
|
||||
, mPointState( new QVector<PointState>( DEFAULT_STORAGE_FOR_NORMALS ) )
|
||||
{
|
||||
alreadyestimated = false;
|
||||
|
@ -27,7 +27,7 @@
|
||||
#define SIP_NO_FILE
|
||||
|
||||
#ifndef _MSC_VER
|
||||
#include <stdint.h>
|
||||
#include <cstdint>
|
||||
#else
|
||||
typedef __int32 int32_t;
|
||||
typedef unsigned __int32 uint32_t;
|
||||
|
@ -37,7 +37,7 @@ class QgsLayoutImageExportOptionsDialog: public QDialog, private Ui::QgsLayoutIm
|
||||
* \param parent parent widget
|
||||
* \param flags window flags
|
||||
*/
|
||||
QgsLayoutImageExportOptionsDialog( QWidget *parent = nullptr, Qt::WindowFlags flags = 0 );
|
||||
QgsLayoutImageExportOptionsDialog( QWidget *parent = nullptr, Qt::WindowFlags flags = nullptr );
|
||||
|
||||
/**
|
||||
* Sets the initial resolution displayed in the dialog.
|
||||
|
@ -29,7 +29,7 @@ QgsReportSectionModel::QgsReportSectionModel( QgsReport *report, QObject *parent
|
||||
Qt::ItemFlags QgsReportSectionModel::flags( const QModelIndex &index ) const
|
||||
{
|
||||
if ( !index.isValid() )
|
||||
return 0;
|
||||
return nullptr;
|
||||
|
||||
return QAbstractItemModel::flags( index );
|
||||
}
|
||||
|
@ -36,9 +36,8 @@
|
||||
#include <QMessageBox>
|
||||
|
||||
#include <cstdio>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdarg.h>
|
||||
#include <cstdlib>
|
||||
#include <cstdarg>
|
||||
|
||||
#ifdef WIN32
|
||||
// Open files in binary mode
|
||||
@ -72,9 +71,9 @@ typedef SInt32 SRefCon;
|
||||
#if ((defined(linux) || defined(__linux__)) && !defined(ANDROID)) || defined(__FreeBSD__)
|
||||
#include <unistd.h>
|
||||
#include <execinfo.h>
|
||||
#include <signal.h>
|
||||
#include <csignal>
|
||||
#include <sys/wait.h>
|
||||
#include <errno.h>
|
||||
#include <cerrno>
|
||||
#endif
|
||||
|
||||
#include "qgscustomization.h"
|
||||
|
@ -747,9 +747,7 @@ QgsAttributesFormProperties::FieldConfig::operator QVariant()
|
||||
/*
|
||||
* RelationConfig implementation
|
||||
*/
|
||||
QgsAttributesFormProperties::RelationConfig::RelationConfig()
|
||||
{
|
||||
}
|
||||
QgsAttributesFormProperties::RelationConfig::RelationConfig() = default;
|
||||
|
||||
QgsAttributesFormProperties::RelationConfig::RelationConfig( QgsVectorLayer *layer, const QString &relationId )
|
||||
{
|
||||
|
@ -87,9 +87,6 @@ class APP_EXPORT QgsAttributesFormProperties : public QWidget, private Ui_QgsAtt
|
||||
: mType( type )
|
||||
, mName( name )
|
||||
, mDisplayName( displayName )
|
||||
, mColumnCount( 1 )
|
||||
, mShowAsGroupBox( false )
|
||||
, mShowLabel( true )
|
||||
{}
|
||||
|
||||
QString name() const { return mName; }
|
||||
|
@ -72,10 +72,6 @@ QgsCustomizationDialog::QgsCustomizationDialog( QWidget * parent, QSettings * se
|
||||
|
||||
}
|
||||
|
||||
QgsCustomizationDialog::~QgsCustomizationDialog()
|
||||
{
|
||||
}
|
||||
|
||||
QTreeWidgetItem *QgsCustomizationDialog::item( const QString &path, QTreeWidgetItem *widgetItem )
|
||||
{
|
||||
QString pathCopy = path;
|
||||
|
@ -37,7 +37,6 @@ class APP_EXPORT QgsCustomizationDialog : public QMainWindow, private Ui::QgsCus
|
||||
Q_OBJECT
|
||||
public:
|
||||
QgsCustomizationDialog( QWidget *parent, QSettings *settings );
|
||||
~QgsCustomizationDialog() override;
|
||||
|
||||
// get item by path
|
||||
QTreeWidgetItem *item( const QString &path, QTreeWidgetItem *widgetItem = nullptr );
|
||||
|
@ -82,11 +82,6 @@ QgsCustomProjectionDialog::QgsCustomProjectionDialog( QWidget *parent, Qt::Windo
|
||||
connect( teParameters, &QPlainTextEdit::textChanged, this, &QgsCustomProjectionDialog::updateListFromCurrentItem );
|
||||
}
|
||||
|
||||
QgsCustomProjectionDialog::~QgsCustomProjectionDialog()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
void QgsCustomProjectionDialog::populateList()
|
||||
{
|
||||
//Setup connection to the existing custom CRS database:
|
||||
|
@ -33,7 +33,6 @@ class APP_EXPORT QgsCustomProjectionDialog : public QDialog, private Ui::QgsCust
|
||||
Q_OBJECT
|
||||
public:
|
||||
QgsCustomProjectionDialog( QWidget *parent = nullptr, Qt::WindowFlags fl = nullptr );
|
||||
~QgsCustomProjectionDialog() override;
|
||||
|
||||
public slots:
|
||||
void pbnCalculate_clicked();
|
||||
|
@ -193,11 +193,6 @@ QgsDatumTransformTableWidget::QgsDatumTransformTableWidget( QWidget *parent )
|
||||
connect( mEditButton, &QToolButton::clicked, this, &QgsDatumTransformTableWidget::editDatumTransform );
|
||||
}
|
||||
|
||||
QgsDatumTransformTableWidget::~QgsDatumTransformTableWidget()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
void QgsDatumTransformTableWidget::addDatumTransform()
|
||||
{
|
||||
QgsDatumTransformDialog dlg;
|
||||
|
@ -73,8 +73,7 @@ class APP_EXPORT QgsDatumTransformTableWidget : public QWidget, private Ui::QgsD
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit QgsDatumTransformTableWidget( QWidget *parent = 0 );
|
||||
~QgsDatumTransformTableWidget() override;
|
||||
explicit QgsDatumTransformTableWidget( QWidget *parent = nullptr );
|
||||
|
||||
void setTransformContext( const QgsCoordinateTransformContext &context )
|
||||
{
|
||||
|
@ -26,7 +26,7 @@ class APP_EXPORT QgsFirstRunDialog : public QDialog, private Ui::QgsFirstRunDial
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
QgsFirstRunDialog( QWidget *parent = 0 );
|
||||
QgsFirstRunDialog( QWidget *parent = nullptr );
|
||||
|
||||
bool migrateSettings();
|
||||
|
||||
|
@ -98,8 +98,7 @@ bool QgsDistanceWidget::eventFilter( QObject *obj, QEvent *ev )
|
||||
|
||||
|
||||
QgsMapToolSelectionHandler::QgsMapToolSelectionHandler( QgsMapCanvas *canvas, QgsMapToolSelectionHandler::SelectionMode selectionMode )
|
||||
: QObject()
|
||||
, mCanvas( canvas )
|
||||
: mCanvas( canvas )
|
||||
, mSelectionMode( selectionMode )
|
||||
, mSnapIndicator( qgis::make_unique< QgsSnapIndicator >( canvas ) )
|
||||
{
|
||||
|
@ -112,11 +112,6 @@ QgsNewSpatialiteLayerDialog::QgsNewSpatialiteLayerDialog( QWidget *parent, Qt::W
|
||||
|
||||
}
|
||||
|
||||
QgsNewSpatialiteLayerDialog::~QgsNewSpatialiteLayerDialog()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void QgsNewSpatialiteLayerDialog::mGeometryTypeBox_currentIndexChanged( int index )
|
||||
{
|
||||
pbnFindSRID->setEnabled( index != 0 );
|
||||
|
@ -37,7 +37,6 @@ class APP_EXPORT QgsNewSpatialiteLayerDialog: public QDialog, private Ui::QgsNew
|
||||
|
||||
public:
|
||||
QgsNewSpatialiteLayerDialog( QWidget *parent = nullptr, Qt::WindowFlags fl = QgsGuiUtils::ModalDialogFlags, const QgsCoordinateReferenceSystem &defaultCrs = QgsCoordinateReferenceSystem() );
|
||||
~QgsNewSpatialiteLayerDialog() override;
|
||||
|
||||
protected slots:
|
||||
void mAddAttributeButton_clicked();
|
||||
|
@ -450,11 +450,6 @@ QgsRasterLayerProperties::QgsRasterLayerProperties( QgsMapLayer *lyr, QgsMapCanv
|
||||
title += QStringLiteral( " (%1)" ).arg( mRasterLayer->styleManager()->currentStyle() );
|
||||
restoreOptionsBaseUi( title );
|
||||
optionsStackedWidget_CurrentChanged( mOptionsStackedWidget->currentIndex() );
|
||||
} // QgsRasterLayerProperties ctor
|
||||
|
||||
|
||||
QgsRasterLayerProperties::~QgsRasterLayerProperties()
|
||||
{
|
||||
}
|
||||
|
||||
void QgsRasterLayerProperties::setupTransparencyTable( int nBands )
|
||||
|
@ -53,8 +53,6 @@ class APP_EXPORT QgsRasterLayerProperties : public QgsOptionsDialogBase, private
|
||||
*/
|
||||
QgsRasterLayerProperties( QgsMapLayer *lyr, QgsMapCanvas *canvas, QWidget *parent = nullptr, Qt::WindowFlags = QgsGuiUtils::ModalDialogFlags );
|
||||
|
||||
~QgsRasterLayerProperties() override;
|
||||
|
||||
//! Synchronize state with associated raster layer
|
||||
void sync();
|
||||
|
||||
|
@ -47,11 +47,6 @@ QgsSnappingWidget::QgsSnappingWidget( QgsProject *project, QgsMapCanvas *canvas,
|
||||
, mProject( project )
|
||||
, mConfig( project )
|
||||
, mCanvas( canvas )
|
||||
, mModeAction( nullptr )
|
||||
, mTypeAction( nullptr )
|
||||
, mToleranceAction( nullptr )
|
||||
, mUnitAction( nullptr )
|
||||
|
||||
{
|
||||
// detect the type of display
|
||||
QToolBar *tb = qobject_cast<QToolBar *>( parent );
|
||||
|
@ -49,7 +49,7 @@ class QgsAuthBasicEdit : public QgsAuthMethodEdit, private Ui::QgsAuthBasicEdit
|
||||
|
||||
private:
|
||||
QgsStringMap mConfigMap;
|
||||
bool mValid = 0;
|
||||
bool mValid = false;
|
||||
};
|
||||
|
||||
#endif // QGSAUTHBASICEDIT_H
|
||||
|
@ -49,7 +49,7 @@ class QgsAuthIdentCertEdit : public QgsAuthMethodEdit, private Ui::QgsAuthIdentC
|
||||
|
||||
private:
|
||||
QgsStringMap mConfigMap;
|
||||
bool mValid = 0;
|
||||
bool mValid = false;
|
||||
};
|
||||
|
||||
#endif // QGSAUTHIDENTCERTEDIT_H
|
||||
|
@ -67,7 +67,7 @@ class QgsAuthPkiPathsEdit : public QgsAuthMethodEdit, private Ui::QgsAuthPkiPath
|
||||
bool validityChange( bool curvalid );
|
||||
bool populateCas();
|
||||
QgsStringMap mConfigMap;
|
||||
bool mValid = 0;
|
||||
bool mValid = false;
|
||||
};
|
||||
|
||||
#endif // QGSAUTHPKIPATHSEDIT_H
|
||||
|
@ -67,7 +67,7 @@ class QgsAuthPkcs12Edit : public QgsAuthMethodEdit, private Ui::QgsAuthPkcs12Edi
|
||||
bool populateCas( );
|
||||
|
||||
QgsStringMap mConfigMap;
|
||||
bool mValid = 0;
|
||||
bool mValid = false;
|
||||
};
|
||||
|
||||
#endif // QGSAUTHPKCS12EDIT_H
|
||||
|
@ -289,7 +289,7 @@ class LayoutContextSettingsRestorer
|
||||
private:
|
||||
QgsLayout *mLayout = nullptr;
|
||||
double mPreviousDpi = 0;
|
||||
QgsLayoutRenderContext::Flags mPreviousFlags = 0;
|
||||
QgsLayoutRenderContext::Flags mPreviousFlags = nullptr;
|
||||
int mPreviousExportLayer = 0;
|
||||
};
|
||||
///@endcond PRIVATE
|
||||
|
@ -203,7 +203,7 @@ class CORE_EXPORT QgsLayoutExporter
|
||||
/**
|
||||
* Layout context flags, which control how the export will be created.
|
||||
*/
|
||||
QgsLayoutRenderContext::Flags flags = 0;
|
||||
QgsLayoutRenderContext::Flags flags = nullptr;
|
||||
|
||||
};
|
||||
|
||||
@ -273,7 +273,7 @@ class CORE_EXPORT QgsLayoutExporter
|
||||
/**
|
||||
* Layout context flags, which control how the export will be created.
|
||||
*/
|
||||
QgsLayoutRenderContext::Flags flags = 0;
|
||||
QgsLayoutRenderContext::Flags flags = nullptr;
|
||||
|
||||
};
|
||||
|
||||
@ -338,7 +338,7 @@ class CORE_EXPORT QgsLayoutExporter
|
||||
/**
|
||||
* Layout context flags, which control how the export will be created.
|
||||
*/
|
||||
QgsLayoutRenderContext::Flags flags = 0;
|
||||
QgsLayoutRenderContext::Flags flags = nullptr;
|
||||
|
||||
};
|
||||
|
||||
@ -412,7 +412,7 @@ class CORE_EXPORT QgsLayoutExporter
|
||||
/**
|
||||
* Layout context flags, which control how the export will be created.
|
||||
*/
|
||||
QgsLayoutRenderContext::Flags flags = 0;
|
||||
QgsLayoutRenderContext::Flags flags = nullptr;
|
||||
|
||||
};
|
||||
|
||||
|
@ -47,10 +47,6 @@ QgsMeshMemoryDataProvider::QgsMeshMemoryDataProvider( const QString &uri, const
|
||||
mIsValid = splitMeshSections( uri );
|
||||
}
|
||||
|
||||
QgsMeshMemoryDataProvider::~QgsMeshMemoryDataProvider()
|
||||
{
|
||||
}
|
||||
|
||||
QString QgsMeshMemoryDataProvider::providerKey()
|
||||
{
|
||||
return TEXT_PROVIDER_KEY;
|
||||
|
@ -72,7 +72,6 @@ class QgsMeshMemoryDataProvider: public QgsMeshDataProvider
|
||||
* \endcode
|
||||
*/
|
||||
QgsMeshMemoryDataProvider( const QString &uri, const QgsDataProvider::ProviderOptions &options );
|
||||
~QgsMeshMemoryDataProvider() override;
|
||||
|
||||
bool isValid() const override;
|
||||
QString name() const override;
|
||||
|
@ -21,12 +21,12 @@
|
||||
#include "qgsmaptopixel.h"
|
||||
#include "qgsunittypes.h"
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <time.h>
|
||||
#include <cstdlib>
|
||||
#include <ctime>
|
||||
#include <algorithm>
|
||||
#include <QPen>
|
||||
#include <QPainter>
|
||||
#include <math.h>
|
||||
#include <cmath>
|
||||
|
||||
///@cond PRIVATE
|
||||
|
||||
|
@ -105,7 +105,7 @@ class QgsCoordinateReferenceSystemPrivate : public QSharedData
|
||||
QString mAuthId;
|
||||
|
||||
//! Whether this CRS is properly defined and valid
|
||||
bool mIsValid = 0;
|
||||
bool mIsValid = false;
|
||||
|
||||
OGRSpatialReferenceH mCRS;
|
||||
|
||||
|
@ -21,7 +21,6 @@
|
||||
#include "qgsapplication.h"
|
||||
|
||||
QgsNetworkContentFetcherRegistry::QgsNetworkContentFetcherRegistry()
|
||||
: QObject()
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -55,8 +55,7 @@ class CORE_EXPORT QgsFetchedContent : public QObject
|
||||
|
||||
//! Constructs a FetchedContent with pointer to the downloaded file and status of the download
|
||||
explicit QgsFetchedContent( const QString &url, QTemporaryFile *file = nullptr, ContentStatus status = NotStarted )
|
||||
: QObject()
|
||||
, mUrl( url )
|
||||
: mUrl( url )
|
||||
, mFile( file )
|
||||
, mStatus( status )
|
||||
{}
|
||||
|
@ -19,8 +19,7 @@
|
||||
#include "qgslogger.h"
|
||||
|
||||
QgsVirtualLayerTask::QgsVirtualLayerTask( const QgsVirtualLayerDefinition &definition )
|
||||
: QgsTask()
|
||||
, mDefinition( definition )
|
||||
: mDefinition( definition )
|
||||
{
|
||||
mDefinition.setLazy( true );
|
||||
mLayer = qgis::make_unique<QgsVectorLayer>( mDefinition.toString(), "layer", "virtual" );
|
||||
|
@ -44,8 +44,6 @@ QgsRuleBasedRenderer::Rule::Rule( QgsSymbol *symbol, int scaleMinDenom, int scal
|
||||
, mLabel( label )
|
||||
, mDescription( description )
|
||||
, mElseRule( elseRule )
|
||||
, mIsActive( true )
|
||||
|
||||
{
|
||||
if ( mElseRule )
|
||||
mFilterExp = QStringLiteral( "ELSE" );
|
||||
|
@ -33,7 +33,7 @@ class GUI_EXPORT QgsEditorWidgetAutoConfPlugin
|
||||
{
|
||||
public:
|
||||
|
||||
virtual ~QgsEditorWidgetAutoConfPlugin() {}
|
||||
virtual ~QgsEditorWidgetAutoConfPlugin() = default;
|
||||
|
||||
/**
|
||||
* Typical scores are:
|
||||
|
@ -31,11 +31,6 @@ QgsLayoutReportSectionLabel::QgsLayoutReportSectionLabel( QgsLayout *layout, Qgs
|
||||
setCacheMode( QGraphicsItem::DeviceCoordinateCache );
|
||||
}
|
||||
|
||||
QgsLayoutReportSectionLabel::~QgsLayoutReportSectionLabel()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void QgsLayoutReportSectionLabel::paint( QPainter *painter, const QStyleOptionGraphicsItem *, QWidget * )
|
||||
{
|
||||
if ( !mLayout || !mLayout->renderContext().isPreviewRender() )
|
||||
|
@ -44,8 +44,6 @@ class GUI_EXPORT QgsLayoutReportSectionLabel: public QGraphicsRectItem
|
||||
*/
|
||||
QgsLayoutReportSectionLabel( QgsLayout *layout, QgsLayoutView *view );
|
||||
|
||||
~QgsLayoutReportSectionLabel() override;
|
||||
|
||||
void paint( QPainter *painter, const QStyleOptionGraphicsItem *itemStyle, QWidget *pWidget ) override;
|
||||
|
||||
void setLabel( const QString &label );
|
||||
|
@ -234,10 +234,6 @@ QList<QPair<QLabel *, QWidget *> > QgsVectorLayerSaveAsDialog::createControls( c
|
||||
return controls;
|
||||
}
|
||||
|
||||
QgsVectorLayerSaveAsDialog::~QgsVectorLayerSaveAsDialog()
|
||||
{
|
||||
}
|
||||
|
||||
void QgsVectorLayerSaveAsDialog::accept()
|
||||
{
|
||||
if ( QFile::exists( filename() ) )
|
||||
|
@ -47,7 +47,6 @@ class GUI_EXPORT QgsVectorLayerSaveAsDialog : public QDialog, private Ui::QgsVec
|
||||
|
||||
QgsVectorLayerSaveAsDialog( long srsid, QWidget *parent = nullptr, Qt::WindowFlags fl = nullptr );
|
||||
QgsVectorLayerSaveAsDialog( QgsVectorLayer *layer, int options = AllOptions, QWidget *parent = nullptr, Qt::WindowFlags fl = nullptr );
|
||||
~QgsVectorLayerSaveAsDialog() override;
|
||||
|
||||
QString format() const;
|
||||
QString encoding() const;
|
||||
|
@ -34,7 +34,6 @@
|
||||
///@cond NOT_STABLE
|
||||
|
||||
QgsProcessingAlgorithmDialogFeedback::QgsProcessingAlgorithmDialogFeedback()
|
||||
: QgsProcessingFeedback()
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -21,7 +21,6 @@
|
||||
|
||||
QgsAttributeFormWidget::QgsAttributeFormWidget( QgsWidgetWrapper *widget, QgsAttributeForm *form )
|
||||
: QWidget( form )
|
||||
, mMode( DefaultMode )
|
||||
, mForm( form )
|
||||
, mWidget( widget )
|
||||
{
|
||||
|
@ -19,9 +19,6 @@
|
||||
|
||||
QgsMapLayerAction::QgsMapLayerAction( const QString &name, QObject *parent, Targets targets, const QIcon &icon, QgsMapLayerAction::Flags flags )
|
||||
: QAction( icon, name, parent )
|
||||
, mSingleLayer( false )
|
||||
, mSpecificLayerType( false )
|
||||
, mLayerType( QgsMapLayer::VectorLayer )
|
||||
, mTargets( targets )
|
||||
, mFlags( flags )
|
||||
{
|
||||
@ -31,8 +28,6 @@ QgsMapLayerAction::QgsMapLayerAction( const QString &name, QObject *parent, QgsM
|
||||
: QAction( icon, name, parent )
|
||||
, mSingleLayer( true )
|
||||
, mActionLayer( layer )
|
||||
, mSpecificLayerType( false )
|
||||
, mLayerType( QgsMapLayer::VectorLayer )
|
||||
, mTargets( targets )
|
||||
, mFlags( flags )
|
||||
{
|
||||
@ -40,7 +35,6 @@ QgsMapLayerAction::QgsMapLayerAction( const QString &name, QObject *parent, QgsM
|
||||
|
||||
QgsMapLayerAction::QgsMapLayerAction( const QString &name, QObject *parent, QgsMapLayer::LayerType layerType, Targets targets, const QIcon &icon, QgsMapLayerAction::Flags flags )
|
||||
: QAction( icon, name, parent )
|
||||
, mSingleLayer( false )
|
||||
, mSpecificLayerType( true )
|
||||
, mLayerType( layerType )
|
||||
, mTargets( targets )
|
||||
|
@ -128,10 +128,6 @@ QgsNewGeoPackageLayerDialog::QgsNewGeoPackageLayerDialog( QWidget *parent, Qt::W
|
||||
} );
|
||||
}
|
||||
|
||||
QgsNewGeoPackageLayerDialog::~QgsNewGeoPackageLayerDialog()
|
||||
{
|
||||
}
|
||||
|
||||
void QgsNewGeoPackageLayerDialog::setCrs( const QgsCoordinateReferenceSystem &crs )
|
||||
{
|
||||
mCrsSelector->setCrs( crs );
|
||||
|
@ -42,7 +42,6 @@ class GUI_EXPORT QgsNewGeoPackageLayerDialog: public QDialog, private Ui::QgsNew
|
||||
|
||||
//! Constructor
|
||||
QgsNewGeoPackageLayerDialog( QWidget *parent SIP_TRANSFERTHIS = nullptr, Qt::WindowFlags fl = QgsGuiUtils::ModalDialogFlags );
|
||||
~QgsNewGeoPackageLayerDialog() override;
|
||||
|
||||
/**
|
||||
* Sets the \a crs value for the new layer in the dialog.
|
||||
|
@ -70,10 +70,6 @@ bool QgsProjectionSelectionDialog::showNoProjection() const
|
||||
return projectionSelector->showNoProjection();
|
||||
}
|
||||
|
||||
QgsProjectionSelectionDialog::~QgsProjectionSelectionDialog()
|
||||
{
|
||||
}
|
||||
|
||||
QgsCoordinateReferenceSystem QgsProjectionSelectionDialog::crs() const
|
||||
{
|
||||
return projectionSelector->crs();
|
||||
|
@ -59,9 +59,6 @@ class GUI_EXPORT QgsProjectionSelectionDialog : public QDialog, private Ui::QgsG
|
||||
QgsProjectionSelectionDialog( QWidget *parent SIP_TRANSFERTHIS = nullptr,
|
||||
Qt::WindowFlags fl = QgsGuiUtils::ModalDialogFlags );
|
||||
|
||||
|
||||
~QgsProjectionSelectionDialog() override;
|
||||
|
||||
/**
|
||||
* Returns the CRS currently selected in the widget.
|
||||
* \see setCrs()
|
||||
|
@ -200,7 +200,7 @@ QVector<QgsDataItem *> QgsDb2ConnectionItem::createChildren()
|
||||
//QVector<QgsDataItem*> newLayers;
|
||||
while ( db2GC.populateLayerProperty( layer ) )
|
||||
{
|
||||
QgsDb2SchemaItem *schemaItem = NULL;
|
||||
QgsDb2SchemaItem *schemaItem = nullptr;
|
||||
Q_FOREACH ( QgsDataItem *child, children )
|
||||
{
|
||||
if ( child->name() == layer.schemaName )
|
||||
@ -435,7 +435,7 @@ QList<QAction *> QgsDb2RootItem::actions( QWidget *parent )
|
||||
|
||||
QWidget *QgsDb2RootItem::paramWidget()
|
||||
{
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
void QgsDb2RootItem::newConnection()
|
||||
@ -523,7 +523,7 @@ bool QgsDb2SchemaItem::handleDrop( const QMimeData *data, Qt::DropAction )
|
||||
{
|
||||
QgsDb2ConnectionItem *conn = qobject_cast<QgsDb2ConnectionItem *>( parent() );
|
||||
if ( !conn )
|
||||
return 0;
|
||||
return false;
|
||||
|
||||
return conn->handleDrop( data, mName );
|
||||
}
|
||||
@ -564,7 +564,7 @@ QgsDb2LayerItem *QgsDb2SchemaItem::addLayer( QgsDb2LayerProperty layerProperty,
|
||||
}
|
||||
else
|
||||
{
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -42,7 +42,7 @@ class QgsDb2SourceSelectDelegate : public QItemDelegate
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit QgsDb2SourceSelectDelegate( QObject *parent = NULL )
|
||||
explicit QgsDb2SourceSelectDelegate( QObject *parent = nullptr )
|
||||
: QItemDelegate( parent )
|
||||
{}
|
||||
|
||||
|
@ -534,10 +534,6 @@ QgsDelimitedTextFeatureSource::QgsDelimitedTextFeatureSource( const QgsDelimited
|
||||
mExpressionContext.setFields( mFields );
|
||||
}
|
||||
|
||||
QgsDelimitedTextFeatureSource::~QgsDelimitedTextFeatureSource()
|
||||
{
|
||||
}
|
||||
|
||||
QgsFeatureIterator QgsDelimitedTextFeatureSource::getFeatures( const QgsFeatureRequest &request )
|
||||
{
|
||||
return QgsFeatureIterator( new QgsDelimitedTextFeatureIterator( this, false, request ) );
|
||||
|
@ -26,7 +26,6 @@ class QgsDelimitedTextFeatureSource : public QgsAbstractFeatureSource
|
||||
{
|
||||
public:
|
||||
explicit QgsDelimitedTextFeatureSource( const QgsDelimitedTextProvider *p );
|
||||
~QgsDelimitedTextFeatureSource() override;
|
||||
|
||||
QgsFeatureIterator getFeatures( const QgsFeatureRequest &request ) override;
|
||||
|
||||
|
@ -158,9 +158,7 @@ QgsDelimitedTextProvider::QgsDelimitedTextProvider( const QString &uri, const Pr
|
||||
}
|
||||
}
|
||||
|
||||
QgsDelimitedTextProvider::~QgsDelimitedTextProvider()
|
||||
{
|
||||
}
|
||||
QgsDelimitedTextProvider::~QgsDelimitedTextProvider() = default;
|
||||
|
||||
QgsAbstractFeatureSource *QgsDelimitedTextProvider::featureSource() const
|
||||
{
|
||||
|
@ -76,7 +76,6 @@ class QgsDelimitedTextProvider : public QgsVectorDataProvider
|
||||
};
|
||||
|
||||
explicit QgsDelimitedTextProvider( const QString &uri, const QgsDataProvider::ProviderOptions &options );
|
||||
|
||||
~QgsDelimitedTextProvider() override;
|
||||
|
||||
/* Implementation of functions from QgsVectorDataProvider */
|
||||
|
@ -535,7 +535,7 @@ bool QgsMssqlSchemaItem::handleDrop( const QMimeData *data, Qt::DropAction )
|
||||
{
|
||||
QgsMssqlConnectionItem *conn = qobject_cast<QgsMssqlConnectionItem *>( parent() );
|
||||
if ( !conn )
|
||||
return 0;
|
||||
return false;
|
||||
|
||||
return conn->handleDrop( data, mName );
|
||||
}
|
||||
|
@ -4309,7 +4309,7 @@ static GDALDatasetH OpenHelper( const QString &dsName,
|
||||
bool updateMode,
|
||||
const QStringList &options )
|
||||
{
|
||||
char **papszOpenOptions = NULL;
|
||||
char **papszOpenOptions = nullptr;
|
||||
Q_FOREACH ( QString option, options )
|
||||
{
|
||||
papszOpenOptions = CSLAddString( papszOpenOptions,
|
||||
|
@ -46,7 +46,6 @@
|
||||
#include "qsql_ocispatial.h"
|
||||
|
||||
QOCISpatialDriverPlugin::QOCISpatialDriverPlugin()
|
||||
: QSqlDriverPlugin()
|
||||
{
|
||||
}
|
||||
|
||||
@ -57,5 +56,5 @@ QSqlDriver *QOCISpatialDriverPlugin::create( const QString &name )
|
||||
QOCISpatialDriver *driver = new QOCISpatialDriver();
|
||||
return driver;
|
||||
}
|
||||
return 0;
|
||||
return nullptr;
|
||||
}
|
||||
|
@ -52,5 +52,5 @@ class QOCISpatialDriverPlugin : public QSqlDriverPlugin
|
||||
public:
|
||||
QOCISpatialDriverPlugin();
|
||||
|
||||
QSqlDriver *create( const QString & );
|
||||
QSqlDriver *create( const QString & ) override;
|
||||
};
|
||||
|
@ -74,7 +74,7 @@
|
||||
#include <qvarlengtharray.h>
|
||||
#include <qvector.h>
|
||||
#include <qdebug.h>
|
||||
#include <math.h>
|
||||
#include <cmath>
|
||||
|
||||
#ifdef Q_OS_WIN
|
||||
#include <winsock.h>
|
||||
@ -96,7 +96,7 @@
|
||||
#undef min
|
||||
#endif
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <cstdlib>
|
||||
|
||||
#define QOCISPATIAL_DYNAMIC_CHUNK_SIZE 65535
|
||||
#define QOCISPATIAL_PREFETCH_MEM 10240
|
||||
@ -311,10 +311,9 @@ class QOCISpatialRowId: public QSharedData
|
||||
};
|
||||
|
||||
QOCISpatialRowId::QOCISpatialRowId( OCIEnv *env )
|
||||
: id( 0 )
|
||||
{
|
||||
OCIDescriptorAlloc( env, reinterpret_cast<dvoid **>( &id ),
|
||||
OCI_DTYPE_ROWID, 0, 0 );
|
||||
OCI_DTYPE_ROWID, 0, nullptr );
|
||||
}
|
||||
|
||||
QOCISpatialRowId::~QOCISpatialRowId()
|
||||
@ -340,10 +339,10 @@ class QOCISpatialDriverPrivate : public QSqlDriverPrivate
|
||||
OCIServer *srvhp = nullptr;
|
||||
OCISession *authp = nullptr;
|
||||
OCIError *err = nullptr;
|
||||
bool transaction;
|
||||
int serverVersion;
|
||||
ub4 prefetchRows;
|
||||
ub2 prefetchMem;
|
||||
bool transaction = false;
|
||||
int serverVersion = -1;
|
||||
ub4 prefetchRows = 0xffffffff;
|
||||
ub2 prefetchMem = QOCISPATIAL_PREFETCH_MEM;
|
||||
QString user;
|
||||
|
||||
OCIType *geometryTDO = nullptr;
|
||||
@ -362,7 +361,7 @@ class QOCISpatialResult: public QSqlCachedResult
|
||||
friend class QOCISpatialCols;
|
||||
public:
|
||||
QOCISpatialResult( const QOCISpatialDriver *db );
|
||||
~QOCISpatialResult();
|
||||
~QOCISpatialResult() override;
|
||||
bool prepare( const QString &query ) override;
|
||||
bool exec() override;
|
||||
QVariant handle() const override;
|
||||
@ -419,7 +418,7 @@ class QOCISpatialResultPrivate: public QSqlCachedResultPrivate
|
||||
Q_DECLARE_PUBLIC( QOCISpatialResult )
|
||||
Q_DECLARE_SQLDRIVER_PRIVATE( QOCISpatialDriver )
|
||||
QOCISpatialResultPrivate( QOCISpatialResult *q, const QOCISpatialDriver *drv );
|
||||
~QOCISpatialResultPrivate();
|
||||
~QOCISpatialResultPrivate() override;
|
||||
|
||||
QOCISpatialCols *cols = nullptr;
|
||||
OCIEnv *env = nullptr;
|
||||
@ -462,7 +461,7 @@ class QOCISpatialResultPrivate: public QSqlCachedResultPrivate
|
||||
OCI_ATTR_CHARSET_FORM,
|
||||
//Strange Oracle bug: some Oracle servers crash the server process with non-zero error handle (mostly for 10g).
|
||||
//So ignore the error message here.
|
||||
0 );
|
||||
nullptr );
|
||||
#ifdef QOCISPATIAL_DEBUG
|
||||
if ( r != OCI_SUCCESS )
|
||||
qWarning( "QOCISpatialResultPrivate::setCharset: Couldn't set OCI_ATTR_CHARSET_FORM." );
|
||||
@ -531,7 +530,7 @@ int QOCISpatialResultPrivate::bindValue( OCIStmt *sql, OCIBind **hbnd, OCIError
|
||||
? const_cast<char *>( reinterpret_cast<QByteArray *>( data )->constData() )
|
||||
: reinterpret_cast<QByteArray *>( data )->data(),
|
||||
reinterpret_cast<QByteArray *>( data )->size(),
|
||||
SQLT_BIN, indPtr, 0, 0, 0, 0, OCI_DEFAULT );
|
||||
SQLT_BIN, indPtr, nullptr, nullptr, 0, nullptr, OCI_DEFAULT );
|
||||
qDebug() << "inout" << isOutValue( pos ) << "bytearray size" << reinterpret_cast<QByteArray *>( data )->size() << "r" << r;
|
||||
break;
|
||||
case QVariant::Time:
|
||||
@ -543,7 +542,7 @@ int QOCISpatialResultPrivate::bindValue( OCIStmt *sql, OCIBind **hbnd, OCIError
|
||||
pos + 1,
|
||||
ba.data(),
|
||||
ba.size(),
|
||||
SQLT_DAT, indPtr, 0, 0, 0, 0, OCI_DEFAULT );
|
||||
SQLT_DAT, indPtr, nullptr, nullptr, 0, nullptr, OCI_DEFAULT );
|
||||
tmpStorage.append( ba );
|
||||
break;
|
||||
}
|
||||
@ -554,7 +553,7 @@ int QOCISpatialResultPrivate::bindValue( OCIStmt *sql, OCIBind **hbnd, OCIError
|
||||
// so the const cast is safe.
|
||||
const_cast<void *>( data ),
|
||||
sizeof( int ),
|
||||
SQLT_INT, indPtr, 0, 0, 0, 0, OCI_DEFAULT );
|
||||
SQLT_INT, indPtr, nullptr, nullptr, 0, nullptr, OCI_DEFAULT );
|
||||
break;
|
||||
case QVariant::UInt:
|
||||
r = OCIBindByPos( sql, hbnd, err,
|
||||
@ -563,7 +562,7 @@ int QOCISpatialResultPrivate::bindValue( OCIStmt *sql, OCIBind **hbnd, OCIError
|
||||
// so the const cast is safe.
|
||||
const_cast<void *>( data ),
|
||||
sizeof( uint ),
|
||||
SQLT_UIN, indPtr, 0, 0, 0, 0, OCI_DEFAULT );
|
||||
SQLT_UIN, indPtr, nullptr, nullptr, 0, nullptr, OCI_DEFAULT );
|
||||
break;
|
||||
case QVariant::LongLong:
|
||||
{
|
||||
@ -572,7 +571,7 @@ int QOCISpatialResultPrivate::bindValue( OCIStmt *sql, OCIBind **hbnd, OCIError
|
||||
pos + 1,
|
||||
ba.data(),
|
||||
ba.size(),
|
||||
SQLT_VNU, indPtr, 0, 0, 0, 0, OCI_DEFAULT );
|
||||
SQLT_VNU, indPtr, nullptr, nullptr, 0, nullptr, OCI_DEFAULT );
|
||||
tmpStorage.append( ba );
|
||||
break;
|
||||
}
|
||||
@ -583,7 +582,7 @@ int QOCISpatialResultPrivate::bindValue( OCIStmt *sql, OCIBind **hbnd, OCIError
|
||||
pos + 1,
|
||||
ba.data(),
|
||||
ba.size(),
|
||||
SQLT_VNU, indPtr, 0, 0, 0, 0, OCI_DEFAULT );
|
||||
SQLT_VNU, indPtr, nullptr, nullptr, 0, nullptr, OCI_DEFAULT );
|
||||
tmpStorage.append( ba );
|
||||
break;
|
||||
}
|
||||
@ -594,7 +593,7 @@ int QOCISpatialResultPrivate::bindValue( OCIStmt *sql, OCIBind **hbnd, OCIError
|
||||
// so the const cast is safe.
|
||||
const_cast<void *>( data ),
|
||||
sizeof( double ),
|
||||
SQLT_FLT, indPtr, 0, 0, 0, 0, OCI_DEFAULT );
|
||||
SQLT_FLT, indPtr, nullptr, nullptr, 0, nullptr, OCI_DEFAULT );
|
||||
break;
|
||||
case QVariant::UserType:
|
||||
if ( val.canConvert<QOCISpatialGeometry>() && !isOutValue( pos ) )
|
||||
@ -603,7 +602,7 @@ int QOCISpatialResultPrivate::bindValue( OCIStmt *sql, OCIBind **hbnd, OCIError
|
||||
{
|
||||
if ( !geometryObj )
|
||||
{
|
||||
OCI_VERIFY_E( err, OCIObjectNew( env, err, svc, OCI_TYPECODE_OBJECT, geometryTDO, ( dvoid * ) 0, OCI_DURATION_SESSION, 1, ( dvoid ** ) &geometryObj ) );
|
||||
OCI_VERIFY_E( err, OCIObjectNew( env, err, svc, OCI_TYPECODE_OBJECT, geometryTDO, ( dvoid * ) nullptr, OCI_DURATION_SESSION, 1, ( dvoid ** ) &geometryObj ) );
|
||||
if ( !geometryObj )
|
||||
{
|
||||
throw OCI_ERROR;
|
||||
@ -616,8 +615,8 @@ int QOCISpatialResultPrivate::bindValue( OCIStmt *sql, OCIBind **hbnd, OCIError
|
||||
}
|
||||
}
|
||||
|
||||
OCI_VERIFY_E( err, OCIBindByPos( sql, hbnd, err, pos + 1, 0, 0, SQLT_NTY, indPtr, 0, 0, 0, 0, OCI_DEFAULT ) );
|
||||
OCI_VERIFY_E( err, OCIBindObject( *hbnd, err, geometryTDO, ( dvoid ** )&geometryObj, 0, ( dvoid ** ) &geometryInd, 0 ) );
|
||||
OCI_VERIFY_E( err, OCIBindByPos( sql, hbnd, err, pos + 1, nullptr, 0, SQLT_NTY, indPtr, nullptr, nullptr, 0, nullptr, OCI_DEFAULT ) );
|
||||
OCI_VERIFY_E( err, OCIBindObject( *hbnd, err, geometryTDO, ( dvoid ** )&geometryObj, nullptr, ( dvoid ** ) &geometryInd, nullptr ) );
|
||||
|
||||
const QOCISpatialGeometry &g = qvariant_cast<QOCISpatialGeometry>( val );
|
||||
|
||||
@ -664,14 +663,14 @@ int QOCISpatialResultPrivate::bindValue( OCIStmt *sql, OCIBind **hbnd, OCIError
|
||||
{
|
||||
OCINumber n;
|
||||
OCI_VERIFY_E( err, OCINumberFromInt( err, &e, sizeof( int ), OCI_NUMBER_SIGNED, &n ) );
|
||||
OCI_VERIFY_E( err, OCICollAppend( env, err, &n, 0, geometryObj->elem_info ) );
|
||||
OCI_VERIFY_E( err, OCICollAppend( env, err, &n, nullptr, geometryObj->elem_info ) );
|
||||
}
|
||||
|
||||
foreach ( double o, g.ordinates )
|
||||
{
|
||||
OCINumber n;
|
||||
OCI_VERIFY_E( err, OCINumberFromReal( err, &o, sizeof( double ), &n ) );
|
||||
OCI_VERIFY_E( err, OCICollAppend( env, err, &n, 0, geometryObj->ordinates ) );
|
||||
OCI_VERIFY_E( err, OCICollAppend( env, err, &n, nullptr, geometryObj->ordinates ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -690,7 +689,7 @@ int QOCISpatialResultPrivate::bindValue( OCIStmt *sql, OCIBind **hbnd, OCIError
|
||||
// it's an IN value, so const_cast is OK
|
||||
const_cast<OCIRowid **>( &rptr->id ),
|
||||
-1,
|
||||
SQLT_RDD, indPtr, 0, 0, 0, 0, OCI_DEFAULT );
|
||||
SQLT_RDD, indPtr, nullptr, nullptr, 0, nullptr, OCI_DEFAULT );
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -707,7 +706,7 @@ int QOCISpatialResultPrivate::bindValue( OCIStmt *sql, OCIBind **hbnd, OCIError
|
||||
pos + 1,
|
||||
const_cast<ushort *>( s.utf16() ),
|
||||
s.length() * sizeof( QChar ),
|
||||
SQLT_LNG, indPtr, 0, 0, 0, 0, OCI_DEFAULT );
|
||||
SQLT_LNG, indPtr, nullptr, nullptr, 0, nullptr, OCI_DEFAULT );
|
||||
break;
|
||||
}
|
||||
else if ( !isOutValue( pos ) )
|
||||
@ -718,7 +717,7 @@ int QOCISpatialResultPrivate::bindValue( OCIStmt *sql, OCIBind **hbnd, OCIError
|
||||
// safe since oracle doesn't touch OUT values
|
||||
const_cast<ushort *>( s.utf16() ),
|
||||
( s.length() + 1 ) * sizeof( QChar ),
|
||||
SQLT_STR, indPtr, 0, 0, 0, 0, OCI_DEFAULT );
|
||||
SQLT_STR, indPtr, nullptr, nullptr, 0, nullptr, OCI_DEFAULT );
|
||||
if ( r == OCI_SUCCESS )
|
||||
setCharset( *hbnd, OCI_HTYPE_BIND );
|
||||
break;
|
||||
@ -740,7 +739,7 @@ int QOCISpatialResultPrivate::bindValue( OCIStmt *sql, OCIBind **hbnd, OCIError
|
||||
pos + 1,
|
||||
ba.data(),
|
||||
ba.capacity(),
|
||||
SQLT_STR, indPtr, tmpSize, 0, 0, 0, OCI_DEFAULT );
|
||||
SQLT_STR, indPtr, tmpSize, nullptr, 0, nullptr, OCI_DEFAULT );
|
||||
tmpStorage.append( ba );
|
||||
}
|
||||
else
|
||||
@ -749,7 +748,7 @@ int QOCISpatialResultPrivate::bindValue( OCIStmt *sql, OCIBind **hbnd, OCIError
|
||||
pos + 1,
|
||||
ba.data(),
|
||||
ba.size(),
|
||||
SQLT_STR, indPtr, 0, 0, 0, 0, OCI_DEFAULT );
|
||||
SQLT_STR, indPtr, nullptr, nullptr, 0, nullptr, OCI_DEFAULT );
|
||||
}
|
||||
if ( r == OCI_SUCCESS )
|
||||
setCharset( *hbnd, OCI_HTYPE_BIND );
|
||||
@ -833,17 +832,6 @@ void QOCISpatialResultPrivate::outValues( QVector<QVariant> &values, IndicatorAr
|
||||
|
||||
|
||||
QOCISpatialDriverPrivate::QOCISpatialDriverPrivate()
|
||||
: QSqlDriverPrivate()
|
||||
, env( 0 )
|
||||
, svc( 0 )
|
||||
, srvhp( 0 )
|
||||
, authp( 0 )
|
||||
, err( 0 )
|
||||
, transaction( false )
|
||||
, serverVersion( -1 )
|
||||
, prefetchRows( 0xffffffff )
|
||||
, prefetchMem( QOCISPATIAL_PREFETCH_MEM )
|
||||
, geometryTDO( 0 )
|
||||
{
|
||||
ENTER
|
||||
}
|
||||
@ -855,7 +843,7 @@ void QOCISpatialDriverPrivate::allocErrorHandle()
|
||||
reinterpret_cast<void **>( &err ),
|
||||
OCI_HTYPE_ERROR,
|
||||
0,
|
||||
0 );
|
||||
nullptr );
|
||||
if ( r != OCI_SUCCESS )
|
||||
qWarning( "QOCISpatialDriver: unable to allocate error handle" );
|
||||
}
|
||||
@ -869,16 +857,16 @@ OCIType *QOCISpatialDriverPrivate::tdo( QString type )
|
||||
|
||||
try
|
||||
{
|
||||
OCI_VERIFY( OCIHandleAlloc( env, ( void ** ) & dschp, OCI_HTYPE_DESCRIBE, 0, 0 ) );
|
||||
OCI_VERIFY( OCIHandleAlloc( env, ( void ** ) & dschp, OCI_HTYPE_DESCRIBE, 0, nullptr ) );
|
||||
OCI_VERIFY_E( err, OCIDescribeAny( svc, err, ( dvoid * ) type.utf16(), type.length() * sizeof( QChar ), OCI_OTYPE_NAME, OCI_DEFAULT, OCI_PTYPE_TYPE, dschp ) );
|
||||
OCI_VERIFY_E( err, OCIAttrGet( dschp, OCI_HTYPE_DESCRIBE, ¶mp, 0, OCI_ATTR_PARAM, err ) );
|
||||
OCI_VERIFY_E( err, OCIAttrGet( paramp, OCI_DTYPE_PARAM, &type_ref, 0, OCI_ATTR_REF_TDO, err ) );
|
||||
OCI_VERIFY_E( err, OCIObjectPin( env, err, type_ref, 0, OCI_PIN_ANY, OCI_DURATION_SESSION, OCI_LOCK_NONE, ( dvoid ** ) &tdo ) );
|
||||
OCI_VERIFY_E( err, OCIAttrGet( dschp, OCI_HTYPE_DESCRIBE, ¶mp, nullptr, OCI_ATTR_PARAM, err ) );
|
||||
OCI_VERIFY_E( err, OCIAttrGet( paramp, OCI_DTYPE_PARAM, &type_ref, nullptr, OCI_ATTR_REF_TDO, err ) );
|
||||
OCI_VERIFY_E( err, OCIObjectPin( env, err, type_ref, nullptr, OCI_PIN_ANY, OCI_DURATION_SESSION, OCI_LOCK_NONE, ( dvoid ** ) &tdo ) );
|
||||
}
|
||||
catch ( int r )
|
||||
{
|
||||
Q_UNUSED( r );
|
||||
return 0;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
return tdo;
|
||||
@ -907,7 +895,7 @@ QString qOraWarn( OCIError *err, int *errorCode )
|
||||
|
||||
OCIErrorGet( err,
|
||||
1,
|
||||
0,
|
||||
nullptr,
|
||||
&errcode,
|
||||
errbuf,
|
||||
sizeof( errbuf ),
|
||||
@ -928,9 +916,9 @@ static int qOraErrorNumber( OCIError *err )
|
||||
sb4 errcode;
|
||||
OCIErrorGet( err,
|
||||
1,
|
||||
0,
|
||||
nullptr,
|
||||
&errcode,
|
||||
0,
|
||||
nullptr,
|
||||
0,
|
||||
OCI_HTYPE_ERROR );
|
||||
return errcode;
|
||||
@ -1220,14 +1208,13 @@ class QOCISpatialCols
|
||||
class OraFieldInf
|
||||
{
|
||||
public:
|
||||
OraFieldInf(): data( 0 ), len( 0 ), ind( 0 ), typ( QVariant::Invalid ), oraType( 0 ), def( 0 ), lob( 0 )
|
||||
{}
|
||||
OraFieldInf() = default;
|
||||
~OraFieldInf();
|
||||
char *data = nullptr;
|
||||
int len;
|
||||
sb2 ind;
|
||||
QVariant::Type typ;
|
||||
ub4 oraType;
|
||||
int len = 0;
|
||||
sb2 ind = 0;
|
||||
QVariant::Type typ = QVariant::Invalid;
|
||||
ub4 oraType = 0;
|
||||
OCIDefine *def = nullptr;
|
||||
OCILobLocator *lob = nullptr;
|
||||
QString oraTypeName;
|
||||
@ -1332,7 +1319,7 @@ QOCISpatialCols::QOCISpatialCols( int size, QOCISpatialResultPrivate *dp )
|
||||
dataSize + 1,
|
||||
SQLT_DAT,
|
||||
&( fieldInf[idx].ind ),
|
||||
0, 0, OCI_DEFAULT );
|
||||
nullptr, nullptr, OCI_DEFAULT );
|
||||
break;
|
||||
case QVariant::Double:
|
||||
r = OCIDefineByPos( d->sql,
|
||||
@ -1343,7 +1330,7 @@ QOCISpatialCols::QOCISpatialCols( int size, QOCISpatialResultPrivate *dp )
|
||||
sizeof( double ),
|
||||
SQLT_FLT,
|
||||
&( fieldInf[idx].ind ),
|
||||
0, 0, OCI_DEFAULT );
|
||||
nullptr, nullptr, OCI_DEFAULT );
|
||||
break;
|
||||
case QVariant::Int:
|
||||
r = OCIDefineByPos( d->sql,
|
||||
@ -1354,7 +1341,7 @@ QOCISpatialCols::QOCISpatialCols( int size, QOCISpatialResultPrivate *dp )
|
||||
sizeof( qint32 ),
|
||||
SQLT_INT,
|
||||
&( fieldInf[idx].ind ),
|
||||
0, 0, OCI_DEFAULT );
|
||||
nullptr, nullptr, OCI_DEFAULT );
|
||||
break;
|
||||
case QVariant::LongLong:
|
||||
r = OCIDefineByPos( d->sql,
|
||||
@ -1365,7 +1352,7 @@ QOCISpatialCols::QOCISpatialCols( int size, QOCISpatialResultPrivate *dp )
|
||||
sizeof( OCINumber ),
|
||||
SQLT_VNU,
|
||||
&( fieldInf[idx].ind ),
|
||||
0, 0, OCI_DEFAULT );
|
||||
nullptr, nullptr, OCI_DEFAULT );
|
||||
break;
|
||||
case QVariant::ByteArray:
|
||||
// RAW and LONG RAW fields can't be bound to LOB locators
|
||||
@ -1381,7 +1368,7 @@ QOCISpatialCols::QOCISpatialCols( int size, QOCISpatialResultPrivate *dp )
|
||||
dataSize,
|
||||
SQLT_BIN,
|
||||
&( fieldInf[idx].ind ),
|
||||
0, 0, OCI_DYNAMIC_FETCH );
|
||||
nullptr, nullptr, OCI_DYNAMIC_FETCH );
|
||||
}
|
||||
else if ( ofi.oraType == SQLT_LBI )
|
||||
{
|
||||
@ -1390,11 +1377,11 @@ QOCISpatialCols::QOCISpatialCols( int size, QOCISpatialResultPrivate *dp )
|
||||
&dfn,
|
||||
d->err,
|
||||
count,
|
||||
0,
|
||||
nullptr,
|
||||
SB4MAXVAL,
|
||||
SQLT_LBI,
|
||||
&( fieldInf[idx].ind ),
|
||||
0, 0, OCI_DYNAMIC_FETCH );
|
||||
nullptr, nullptr, OCI_DYNAMIC_FETCH );
|
||||
}
|
||||
else if ( ofi.oraType == SQLT_CLOB )
|
||||
{
|
||||
@ -1407,7 +1394,7 @@ QOCISpatialCols::QOCISpatialCols( int size, QOCISpatialResultPrivate *dp )
|
||||
-1,
|
||||
SQLT_CLOB,
|
||||
&( fieldInf[idx].ind ),
|
||||
0, 0, OCI_DEFAULT );
|
||||
nullptr, nullptr, OCI_DEFAULT );
|
||||
}
|
||||
else if ( ofi.oraType == SQLT_NTY && ofi.oraTypeName == "SDO_GEOMETRY" )
|
||||
{
|
||||
@ -1416,12 +1403,12 @@ QOCISpatialCols::QOCISpatialCols( int size, QOCISpatialResultPrivate *dp )
|
||||
&dfn,
|
||||
d->err,
|
||||
count,
|
||||
0,
|
||||
nullptr,
|
||||
0,
|
||||
SQLT_NTY,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
nullptr,
|
||||
nullptr,
|
||||
nullptr,
|
||||
OCI_DEFAULT );
|
||||
|
||||
if ( r == OCI_SUCCESS )
|
||||
@ -1433,8 +1420,8 @@ QOCISpatialCols::QOCISpatialCols( int size, QOCISpatialResultPrivate *dp )
|
||||
r = OCIDefineObject( dfn,
|
||||
d->err,
|
||||
ofi.oraOCIType,
|
||||
( void ** ) & dp->sdoobj.last(), 0,
|
||||
( void ** ) & dp->sdoind.last(), 0 );
|
||||
( void ** ) & dp->sdoobj.last(), nullptr,
|
||||
( void ** ) & dp->sdoind.last(), nullptr );
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -1452,7 +1439,7 @@ QOCISpatialCols::QOCISpatialCols( int size, QOCISpatialResultPrivate *dp )
|
||||
-1,
|
||||
SQLT_BLOB,
|
||||
&( fieldInf[idx].ind ),
|
||||
0, 0, OCI_DEFAULT );
|
||||
nullptr, nullptr, OCI_DEFAULT );
|
||||
}
|
||||
break;
|
||||
case QVariant::String:
|
||||
@ -1463,11 +1450,11 @@ QOCISpatialCols::QOCISpatialCols( int size, QOCISpatialResultPrivate *dp )
|
||||
&dfn,
|
||||
d->err,
|
||||
count,
|
||||
0,
|
||||
nullptr,
|
||||
SB4MAXVAL,
|
||||
SQLT_LNG,
|
||||
&( fieldInf[idx].ind ),
|
||||
0, 0, OCI_DYNAMIC_FETCH );
|
||||
nullptr, nullptr, OCI_DYNAMIC_FETCH );
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -1481,7 +1468,7 @@ QOCISpatialCols::QOCISpatialCols( int size, QOCISpatialResultPrivate *dp )
|
||||
dataSize,
|
||||
SQLT_STR,
|
||||
&( fieldInf[idx].ind ),
|
||||
0, 0, OCI_DEFAULT );
|
||||
nullptr, nullptr, OCI_DEFAULT );
|
||||
if ( r == OCI_SUCCESS )
|
||||
d->setCharset( dfn, OCI_HTYPE_DEFINE );
|
||||
}
|
||||
@ -1498,7 +1485,7 @@ QOCISpatialCols::QOCISpatialCols( int size, QOCISpatialResultPrivate *dp )
|
||||
dataSize + 1,
|
||||
SQLT_STR,
|
||||
&( fieldInf[idx].ind ),
|
||||
0, 0, OCI_DEFAULT );
|
||||
nullptr, nullptr, OCI_DEFAULT );
|
||||
break;
|
||||
}
|
||||
|
||||
@ -1540,11 +1527,11 @@ OCILobLocator **QOCISpatialCols::createLobLocator( int position, OCIEnv *env )
|
||||
reinterpret_cast<void **>( &lob ),
|
||||
OCI_DTYPE_LOB,
|
||||
0,
|
||||
0 );
|
||||
nullptr );
|
||||
if ( r != OCI_SUCCESS )
|
||||
{
|
||||
qWarning( "QOCISpatialCols: Cannot create LOB locator" );
|
||||
lob = 0;
|
||||
lob = nullptr;
|
||||
}
|
||||
return &lob;
|
||||
}
|
||||
@ -1577,14 +1564,14 @@ int QOCISpatialCols::readPiecewise( QVector<QVariant> &values, int index )
|
||||
nullField = false;
|
||||
r = OCIStmtSetPieceInfo( dfn, OCI_HTYPE_DEFINE,
|
||||
d->err, col,
|
||||
&chunkSize, piecep, NULL, NULL );
|
||||
&chunkSize, piecep, nullptr, nullptr );
|
||||
if ( r != OCI_SUCCESS )
|
||||
qOraWarning( "QOCISpatialResultPrivate::readPiecewise: unable to set piece info:", d->err );
|
||||
status = OCIStmtFetch( d->sql, d->err, 1, OCI_FETCH_NEXT, OCI_DEFAULT );
|
||||
if ( status == -1 )
|
||||
{
|
||||
sb4 errcode;
|
||||
OCIErrorGet( d->err, 1, 0, &errcode, 0, 0, OCI_HTYPE_ERROR );
|
||||
OCIErrorGet( d->err, 1, nullptr, &errcode, nullptr, 0, OCI_HTYPE_ERROR );
|
||||
switch ( errcode )
|
||||
{
|
||||
case 1405: /* NULL */
|
||||
@ -1647,7 +1634,7 @@ OraFieldInfo QOCISpatialCols::qMakeOraField( const QOCISpatialResultPrivate *p,
|
||||
r = OCIAttrGet( param,
|
||||
OCI_DTYPE_PARAM,
|
||||
&colType,
|
||||
0,
|
||||
nullptr,
|
||||
OCI_ATTR_DATA_TYPE,
|
||||
p->err );
|
||||
if ( r != OCI_SUCCESS )
|
||||
@ -1665,7 +1652,7 @@ OraFieldInfo QOCISpatialCols::qMakeOraField( const QOCISpatialResultPrivate *p,
|
||||
r = OCIAttrGet( param,
|
||||
OCI_DTYPE_PARAM,
|
||||
&colLength,
|
||||
0,
|
||||
nullptr,
|
||||
OCI_ATTR_DATA_SIZE, /* in bytes */
|
||||
p->err );
|
||||
if ( r != OCI_SUCCESS )
|
||||
@ -1675,7 +1662,7 @@ OraFieldInfo QOCISpatialCols::qMakeOraField( const QOCISpatialResultPrivate *p,
|
||||
r = OCIAttrGet( param,
|
||||
OCI_DTYPE_PARAM,
|
||||
&colFieldLength,
|
||||
0,
|
||||
nullptr,
|
||||
OCI_ATTR_CHAR_SIZE,
|
||||
p->err );
|
||||
if ( r != OCI_SUCCESS )
|
||||
@ -1688,7 +1675,7 @@ OraFieldInfo QOCISpatialCols::qMakeOraField( const QOCISpatialResultPrivate *p,
|
||||
r = OCIAttrGet( param,
|
||||
OCI_DTYPE_PARAM,
|
||||
&colPrecision,
|
||||
0,
|
||||
nullptr,
|
||||
OCI_ATTR_PRECISION,
|
||||
p->err );
|
||||
if ( r != OCI_SUCCESS )
|
||||
@ -1697,7 +1684,7 @@ OraFieldInfo QOCISpatialCols::qMakeOraField( const QOCISpatialResultPrivate *p,
|
||||
r = OCIAttrGet( param,
|
||||
OCI_DTYPE_PARAM,
|
||||
&colScale,
|
||||
0,
|
||||
nullptr,
|
||||
OCI_ATTR_SCALE,
|
||||
p->err );
|
||||
if ( r != OCI_SUCCESS )
|
||||
@ -1706,7 +1693,7 @@ OraFieldInfo QOCISpatialCols::qMakeOraField( const QOCISpatialResultPrivate *p,
|
||||
r = OCIAttrGet( param,
|
||||
OCI_DTYPE_PARAM,
|
||||
&colType,
|
||||
0,
|
||||
nullptr,
|
||||
OCI_ATTR_DATA_TYPE,
|
||||
p->err );
|
||||
if ( r != OCI_SUCCESS )
|
||||
@ -1717,7 +1704,7 @@ OraFieldInfo QOCISpatialCols::qMakeOraField( const QOCISpatialResultPrivate *p,
|
||||
r = OCIAttrGet( param,
|
||||
OCI_DTYPE_PARAM,
|
||||
&colIsNull,
|
||||
0,
|
||||
nullptr,
|
||||
OCI_ATTR_IS_NULL,
|
||||
p->err );
|
||||
if ( r != OCI_SUCCESS )
|
||||
@ -1742,13 +1729,13 @@ OraFieldInfo QOCISpatialCols::qMakeOraField( const QOCISpatialResultPrivate *p,
|
||||
r = OCIAttrGet( param,
|
||||
OCI_DTYPE_PARAM,
|
||||
&typeRef,
|
||||
0,
|
||||
nullptr,
|
||||
OCI_ATTR_REF_TDO,
|
||||
p->err );
|
||||
if ( r != OCI_SUCCESS )
|
||||
qOraWarning( "qMakeOraField:", p->err );
|
||||
|
||||
r = OCIObjectPin( d->env, d->err, typeRef, 0, OCI_PIN_ANY, OCI_DURATION_SESSION, OCI_LOCK_NONE, ( void ** ) & colOCIType );
|
||||
r = OCIObjectPin( d->env, d->err, typeRef, nullptr, OCI_PIN_ANY, OCI_DURATION_SESSION, OCI_LOCK_NONE, ( void ** ) & colOCIType );
|
||||
if ( r != OCI_SUCCESS )
|
||||
qOraWarning( "qMakeOraField:", d->err );
|
||||
}
|
||||
@ -1814,19 +1801,17 @@ OraFieldInfo QOCISpatialCols::qMakeOraField( const QOCISpatialResultPrivate *p,
|
||||
|
||||
struct QOCISpatialBatchColumn
|
||||
{
|
||||
inline QOCISpatialBatchColumn()
|
||||
: bindh( 0 ), bindAs( 0 ), maxLen( 0 ), recordCount( 0 ),
|
||||
data( 0 ), lengths( 0 ), indicators( 0 ), maxarr_len( 0 ), curelep( 0 ) {}
|
||||
inline QOCISpatialBatchColumn() = default;
|
||||
|
||||
OCIBind *bindh = nullptr;
|
||||
ub2 bindAs;
|
||||
ub4 maxLen;
|
||||
ub4 recordCount;
|
||||
ub2 bindAs = 0;
|
||||
ub4 maxLen = 0;
|
||||
ub4 recordCount = 0;
|
||||
char *data = nullptr;
|
||||
ub2 *lengths = nullptr;
|
||||
sb2 *indicators = nullptr;
|
||||
ub4 maxarr_len;
|
||||
ub4 curelep;
|
||||
ub4 maxarr_len = 0;
|
||||
ub4 curelep = 0;
|
||||
};
|
||||
|
||||
struct QOCISpatialBatchCleanupHandler
|
||||
@ -2097,9 +2082,9 @@ bool QOCISpatialCols::execBatch( QOCISpatialResultPrivate *d, QVector<QVariant>
|
||||
bindColumn.bindAs,
|
||||
bindColumn.indicators,
|
||||
bindColumn.lengths,
|
||||
0,
|
||||
nullptr,
|
||||
arrayBind ? bindColumn.maxarr_len : 0,
|
||||
arrayBind ? &bindColumn.curelep : 0,
|
||||
arrayBind ? &bindColumn.curelep : nullptr,
|
||||
OCI_DEFAULT );
|
||||
|
||||
#ifdef QOCISPATIAL_DEBUG
|
||||
@ -2135,7 +2120,7 @@ bool QOCISpatialCols::execBatch( QOCISpatialResultPrivate *d, QVector<QVariant>
|
||||
//finally we can execute
|
||||
r = OCIStmtExecute( d->svc, d->sql, d->err,
|
||||
arrayBind ? 1 : columns[0].recordCount,
|
||||
0, NULL, NULL,
|
||||
0, nullptr, nullptr,
|
||||
d->transaction ? OCI_DEFAULT : OCI_COMMIT_ON_SUCCESS );
|
||||
|
||||
if ( r != OCI_SUCCESS && r != OCI_SUCCESS_WITH_INFO )
|
||||
@ -2273,8 +2258,8 @@ int qReadLob( T &buf, const QOCISpatialResultPrivate *d, OCILobLocator *lob )
|
||||
1,
|
||||
buf.data(),
|
||||
buf.size() * sz, // this argument is in bytes, not characters
|
||||
0,
|
||||
0,
|
||||
nullptr,
|
||||
nullptr,
|
||||
// Extract the data from a CLOB in UTF-16 (ie. what QString uses internally)
|
||||
sz == 1 ? ub2( 0 ) : ub2( QOCISpatialEncoding ),
|
||||
csfrm );
|
||||
@ -2606,7 +2591,7 @@ bool QOCISpatialCols::convertToWkb( QVariant &v, int index )
|
||||
QVector<boolean> exists( nElems );
|
||||
QVector<OCINumber *> numbers( nElems );
|
||||
uword nelems = nElems;
|
||||
OCI_VERIFY_E( d->err, OCICollGetElemArray( d->env, d->err, sdoobj->elem_info, 0, exists.data(), ( void ** ) numbers.data(), 0, &nelems ) );
|
||||
OCI_VERIFY_E( d->err, OCICollGetElemArray( d->env, d->err, sdoobj->elem_info, 0, exists.data(), ( void ** ) numbers.data(), nullptr, &nelems ) );
|
||||
if ( !exists[0] )
|
||||
{
|
||||
qWarning() << "element info array does not exists";
|
||||
@ -2635,7 +2620,7 @@ bool QOCISpatialCols::convertToWkb( QVariant &v, int index )
|
||||
QVector<boolean> exists( nOrds );
|
||||
QVector<OCINumber *> numbers( nOrds );
|
||||
uword nords = nOrds;
|
||||
OCI_VERIFY_E( d->err, OCICollGetElemArray( d->env, d->err, sdoobj->ordinates, 0, exists.data(), ( void ** ) numbers.data(), 0, &nords ) );
|
||||
OCI_VERIFY_E( d->err, OCICollGetElemArray( d->env, d->err, sdoobj->ordinates, 0, exists.data(), ( void ** ) numbers.data(), nullptr, &nords ) );
|
||||
if ( !exists[0] )
|
||||
{
|
||||
qWarning() << "ordinate array does not exists";
|
||||
@ -3370,27 +3355,20 @@ void QOCISpatialCols::getValues( QVector<QVariant> &v, int index )
|
||||
|
||||
QOCISpatialResultPrivate::QOCISpatialResultPrivate( QOCISpatialResult *q, const QOCISpatialDriver *drv )
|
||||
: QSqlCachedResultPrivate( q, drv )
|
||||
, cols( nullptr )
|
||||
, env( drv_d_func()->env )
|
||||
, err( nullptr )
|
||||
, svc( const_cast<OCISvcCtx * &>( drv_d_func()->svc ) )
|
||||
, sql( nullptr )
|
||||
, sdoobj()
|
||||
, sdoind()
|
||||
, transaction( drv_d_func()->transaction )
|
||||
, serverVersion( drv_d_func()->serverVersion )
|
||||
, prefetchRows( drv_d_func()->prefetchRows )
|
||||
, prefetchMem( drv_d_func()->prefetchMem )
|
||||
, geometryTDO( drv_d_func()->geometryTDO )
|
||||
, geometryObj( nullptr )
|
||||
, geometryInd( nullptr )
|
||||
{
|
||||
ENTER
|
||||
int r = OCIHandleAlloc( env,
|
||||
reinterpret_cast<void **>( &err ),
|
||||
OCI_HTYPE_ERROR,
|
||||
0,
|
||||
0 );
|
||||
nullptr );
|
||||
if ( r != OCI_SUCCESS )
|
||||
qWarning( "QOCISpatialResult: unable to alloc error handle" );
|
||||
}
|
||||
@ -3517,7 +3495,7 @@ int QOCISpatialResult::size()
|
||||
if ( OCIAttrGet( d->sql,
|
||||
OCI_HTYPE_STMT,
|
||||
&rowCount,
|
||||
NULL,
|
||||
nullptr,
|
||||
OCI_ATTR_ROWS_FETCHED,
|
||||
d->err ) == OCI_SUCCESS )
|
||||
{
|
||||
@ -3537,7 +3515,7 @@ int QOCISpatialResult::numRowsAffected()
|
||||
OCIAttrGet( d->sql,
|
||||
OCI_HTYPE_STMT,
|
||||
&rowCount,
|
||||
NULL,
|
||||
nullptr,
|
||||
OCI_ATTR_ROW_COUNT,
|
||||
d->err );
|
||||
return rowCount;
|
||||
@ -3564,7 +3542,7 @@ bool QOCISpatialResult::prepare( const QString &query )
|
||||
QSqlResult::prepare( query );
|
||||
|
||||
delete d->cols;
|
||||
d->cols = 0;
|
||||
d->cols = nullptr;
|
||||
QSqlCachedResult::cleanup();
|
||||
|
||||
if ( d->sql )
|
||||
@ -3580,7 +3558,7 @@ bool QOCISpatialResult::prepare( const QString &query )
|
||||
reinterpret_cast<void **>( &d->sql ),
|
||||
OCI_HTYPE_STMT,
|
||||
0,
|
||||
0 );
|
||||
nullptr );
|
||||
if ( r != OCI_SUCCESS )
|
||||
{
|
||||
qOraWarning( "QOCISpatialResult::prepare: unable to alloc statement:", d->err );
|
||||
@ -3623,7 +3601,7 @@ bool QOCISpatialResult::exec()
|
||||
r = OCIAttrGet( d->sql,
|
||||
OCI_HTYPE_STMT,
|
||||
&stmtType,
|
||||
NULL,
|
||||
nullptr,
|
||||
OCI_ATTR_STMT_TYPE,
|
||||
d->err );
|
||||
|
||||
@ -3658,8 +3636,8 @@ bool QOCISpatialResult::exec()
|
||||
d->err,
|
||||
iters,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
nullptr,
|
||||
nullptr,
|
||||
mode );
|
||||
if ( r != OCI_SUCCESS && r != OCI_SUCCESS_WITH_INFO )
|
||||
{
|
||||
@ -3674,7 +3652,7 @@ bool QOCISpatialResult::exec()
|
||||
{
|
||||
ub4 parmCount = 0;
|
||||
int r = OCIAttrGet( d->sql, OCI_HTYPE_STMT, reinterpret_cast<void **>( &parmCount ),
|
||||
0, OCI_ATTR_PARAM_COUNT, d->err );
|
||||
nullptr, OCI_ATTR_PARAM_COUNT, d->err );
|
||||
if ( r == OCI_SUCCESS && !d->cols )
|
||||
{
|
||||
d->sdoobj.clear();
|
||||
@ -3718,7 +3696,7 @@ QVariant QOCISpatialResult::lastInsertId() const
|
||||
QOCISpatialRowIdPointer ptr( new QOCISpatialRowId( d->env ) );
|
||||
|
||||
int r = OCIAttrGet( d->sql, OCI_HTYPE_STMT, ptr.constData()->id,
|
||||
0, OCI_ATTR_ROWID, d->err );
|
||||
nullptr, OCI_ATTR_ROWID, d->err );
|
||||
if ( r == OCI_SUCCESS )
|
||||
return QVariant::fromValue( ptr );
|
||||
}
|
||||
@ -3756,12 +3734,12 @@ QOCISpatialDriver::QOCISpatialDriver( QObject *parent )
|
||||
#endif
|
||||
int r = OCIEnvCreate( &d->env,
|
||||
mode,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
nullptr,
|
||||
nullptr,
|
||||
nullptr,
|
||||
nullptr,
|
||||
0,
|
||||
NULL );
|
||||
nullptr );
|
||||
if ( r != OCI_SUCCESS )
|
||||
{
|
||||
qWarning( "QOCISpatialDriver: unable to create environment" );
|
||||
@ -3894,16 +3872,16 @@ bool QOCISpatialDriver::open( const QString &db,
|
||||
QString::fromLatin1( "(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(Host=%1)(Port=%2))"
|
||||
"(CONNECT_DATA=(SID=%3)))" ).arg( hostname ).arg( ( port > -1 ? port : 1521 ) ).arg( db );
|
||||
|
||||
r = OCIHandleAlloc( d->env, reinterpret_cast<void **>( &d->srvhp ), OCI_HTYPE_SERVER, 0, 0 );
|
||||
r = OCIHandleAlloc( d->env, reinterpret_cast<void **>( &d->srvhp ), OCI_HTYPE_SERVER, 0, nullptr );
|
||||
if ( r == OCI_SUCCESS )
|
||||
r = OCIServerAttach( d->srvhp, d->err, reinterpret_cast<const OraText *>( connectionString.utf16() ),
|
||||
connectionString.length() * sizeof( QChar ), OCI_DEFAULT );
|
||||
if ( r == OCI_SUCCESS || r == OCI_SUCCESS_WITH_INFO )
|
||||
r = OCIHandleAlloc( d->env, reinterpret_cast<void **>( &d->svc ), OCI_HTYPE_SVCCTX, 0, 0 );
|
||||
r = OCIHandleAlloc( d->env, reinterpret_cast<void **>( &d->svc ), OCI_HTYPE_SVCCTX, 0, nullptr );
|
||||
if ( r == OCI_SUCCESS )
|
||||
r = OCIAttrSet( d->svc, OCI_HTYPE_SVCCTX, d->srvhp, 0, OCI_ATTR_SERVER, d->err );
|
||||
if ( r == OCI_SUCCESS )
|
||||
r = OCIHandleAlloc( d->env, reinterpret_cast<void **>( &d->authp ), OCI_HTYPE_SESSION, 0, 0 );
|
||||
r = OCIHandleAlloc( d->env, reinterpret_cast<void **>( &d->authp ), OCI_HTYPE_SESSION, 0, nullptr );
|
||||
if ( r == OCI_SUCCESS )
|
||||
r = OCIAttrSet( d->authp, OCI_HTYPE_SESSION, const_cast<ushort *>( user.utf16() ),
|
||||
user.length() * sizeof( QChar ), OCI_ATTR_USERNAME, d->err );
|
||||
@ -3913,7 +3891,7 @@ bool QOCISpatialDriver::open( const QString &db,
|
||||
|
||||
OCITrans *trans = nullptr;
|
||||
if ( r == OCI_SUCCESS )
|
||||
r = OCIHandleAlloc( d->env, reinterpret_cast<void **>( &trans ), OCI_HTYPE_TRANS, 0, 0 );
|
||||
r = OCIHandleAlloc( d->env, reinterpret_cast<void **>( &trans ), OCI_HTYPE_TRANS, 0, nullptr );
|
||||
if ( r == OCI_SUCCESS )
|
||||
r = OCIAttrSet( d->svc, OCI_HTYPE_SVCCTX, trans, 0, OCI_ATTR_TRANS, d->err );
|
||||
|
||||
@ -3946,13 +3924,13 @@ bool QOCISpatialDriver::open( const QString &db,
|
||||
OCISessionEnd( d->svc, d->err, d->authp, OCI_DEFAULT );
|
||||
OCIHandleFree( d->authp, OCI_HTYPE_SESSION );
|
||||
}
|
||||
d->authp = 0;
|
||||
d->authp = nullptr;
|
||||
if ( d->srvhp )
|
||||
{
|
||||
OCIServerDetach( d->srvhp, d->err, OCI_DEFAULT );
|
||||
OCIHandleFree( d->srvhp, OCI_HTYPE_SERVER );
|
||||
}
|
||||
d->srvhp = 0;
|
||||
d->srvhp = nullptr;
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -3995,11 +3973,11 @@ void QOCISpatialDriver::close()
|
||||
OCISessionEnd( d->svc, d->err, d->authp, OCI_DEFAULT );
|
||||
OCIServerDetach( d->srvhp, d->err, OCI_DEFAULT );
|
||||
OCIHandleFree( d->authp, OCI_HTYPE_SESSION );
|
||||
d->authp = 0;
|
||||
d->authp = nullptr;
|
||||
OCIHandleFree( d->srvhp, OCI_HTYPE_SERVER );
|
||||
d->srvhp = 0;
|
||||
d->srvhp = nullptr;
|
||||
OCIHandleFree( d->svc, OCI_HTYPE_SVCCTX );
|
||||
d->svc = 0;
|
||||
d->svc = nullptr;
|
||||
setOpen( false );
|
||||
setOpenError( false );
|
||||
}
|
||||
|
@ -68,22 +68,22 @@ class Q_EXPORT_SQLDRIVER_OCISPATIAL QOCISpatialDriver : public QSqlDriver
|
||||
public:
|
||||
explicit QOCISpatialDriver( QObject *parent = nullptr );
|
||||
QOCISpatialDriver( OCIEnv *env, OCISvcCtx *ctx, QObject *parent = nullptr );
|
||||
~QOCISpatialDriver();
|
||||
bool hasFeature( DriverFeature f ) const;
|
||||
~QOCISpatialDriver() override;
|
||||
bool hasFeature( DriverFeature f ) const override;
|
||||
bool open( const QString &db,
|
||||
const QString &user,
|
||||
const QString &password,
|
||||
const QString &host,
|
||||
int port,
|
||||
const QString &connOpts ) override;
|
||||
void close();
|
||||
QSqlResult *createResult() const;
|
||||
void close() override;
|
||||
QSqlResult *createResult() const override;
|
||||
QStringList tables( QSql::TableType ) const override;
|
||||
QSqlRecord record( const QString &tablename ) const override;
|
||||
QSqlIndex primaryIndex( const QString &tablename ) const override;
|
||||
QString formatValue( const QSqlField &field,
|
||||
bool trimStrings ) const override;
|
||||
QVariant handle() const;
|
||||
QVariant handle() const override;
|
||||
QString escapeIdentifier( const QString &identifier, IdentifierType ) const override;
|
||||
|
||||
protected:
|
||||
|
@ -52,19 +52,14 @@ enum SDO_GTYPE_TT
|
||||
class QOCISpatialGeometry : public QSharedData
|
||||
{
|
||||
public:
|
||||
QOCISpatialGeometry()
|
||||
: isNull( true )
|
||||
, gtype( -1 )
|
||||
, srid( -1 )
|
||||
, x( 0.0 )
|
||||
, y( 0.0 )
|
||||
, z( 0.0 )
|
||||
{}
|
||||
QOCISpatialGeometry() = default;
|
||||
|
||||
bool isNull;
|
||||
int gtype;
|
||||
int srid;
|
||||
double x, y, z;
|
||||
bool isNull = true;
|
||||
int gtype = -1;
|
||||
int srid = -1;
|
||||
double x = 0.0;
|
||||
double y = 0.0;
|
||||
double z = 0.0;
|
||||
|
||||
QVector<int> eleminfo;
|
||||
QVector<double> ordinates;
|
||||
|
@ -22,12 +22,10 @@ email : jef at norbit dot de
|
||||
#include <QMetaType>
|
||||
|
||||
QgsOracleColumnTypeThread::QgsOracleColumnTypeThread( const QString &name, const QString &limitToSchema, bool useEstimatedMetadata, bool allowGeometrylessTables )
|
||||
: QThread()
|
||||
, mName( name )
|
||||
: mName( name )
|
||||
, mSchema( limitToSchema )
|
||||
, mUseEstimatedMetadata( useEstimatedMetadata )
|
||||
, mAllowGeometrylessTables( allowGeometrylessTables )
|
||||
, mStopped( false )
|
||||
{
|
||||
qRegisterMetaType<QgsOracleLayerProperty>( "QgsOracleLayerProperty" );
|
||||
}
|
||||
|
@ -43,7 +43,7 @@ class QgsOracleColumnTypeThread : public QThread
|
||||
|
||||
// These functions get the layer types and pass that information out
|
||||
// by emitting the setLayerType() signal.
|
||||
virtual void run();
|
||||
void run() override;
|
||||
|
||||
bool isStopped() const { return mStopped; }
|
||||
QVector<QgsOracleLayerProperty> layerProperties() const { return mLayerProperties; }
|
||||
|
@ -44,13 +44,11 @@ struct QgsOracleLayerProperty
|
||||
QString ownerName;
|
||||
QString tableName;
|
||||
QString geometryColName;
|
||||
bool isView;
|
||||
bool isView = false;
|
||||
QStringList pkCols;
|
||||
QString sql;
|
||||
|
||||
QgsOracleLayerProperty()
|
||||
: isView( false )
|
||||
{}
|
||||
QgsOracleLayerProperty() = default;
|
||||
|
||||
int size() const { Q_ASSERT( types.size() == srids.size() ); return types.size(); }
|
||||
|
||||
@ -187,7 +185,7 @@ class QgsOracleConn : public QObject
|
||||
|
||||
private:
|
||||
explicit QgsOracleConn( QgsDataSourceUri uri );
|
||||
~QgsOracleConn();
|
||||
~QgsOracleConn() override;
|
||||
|
||||
bool exec( QSqlQuery &qry, const QString &sql, const QVariantList ¶ms );
|
||||
|
||||
|
@ -77,7 +77,7 @@ class QgsOracleConnPool : public QgsConnectionPool<QgsOracleConn *, QgsOracleCon
|
||||
|
||||
private:
|
||||
QgsOracleConnPool();
|
||||
~QgsOracleConnPool();
|
||||
~QgsOracleConnPool() override;
|
||||
|
||||
static QgsOracleConnPool *sInstance;
|
||||
};
|
||||
|
@ -31,7 +31,6 @@ QGISEXTERN bool deleteLayer( const QString &uri, QString &errCause );
|
||||
// ---------------------------------------------------------------------------
|
||||
QgsOracleConnectionItem::QgsOracleConnectionItem( QgsDataItem *parent, const QString &name, const QString &path )
|
||||
: QgsDataCollectionItem( parent, name, path )
|
||||
, mColumnTypeThread( nullptr )
|
||||
{
|
||||
mIconName = QStringLiteral( "mIconConnect.svg" );
|
||||
mCapabilities |= Collapse;
|
||||
@ -384,10 +383,6 @@ QVector<QgsDataItem *> QgsOracleOwnerItem::createChildren()
|
||||
return QVector<QgsDataItem *>();
|
||||
}
|
||||
|
||||
QgsOracleOwnerItem::~QgsOracleOwnerItem()
|
||||
{
|
||||
}
|
||||
|
||||
void QgsOracleOwnerItem::addLayer( const QgsOracleLayerProperty &layerProperty )
|
||||
{
|
||||
QgsDebugMsgLevel( layerProperty.toString(), 3 );
|
||||
@ -442,10 +437,6 @@ QgsOracleRootItem::QgsOracleRootItem( QgsDataItem *parent, const QString &name,
|
||||
populate();
|
||||
}
|
||||
|
||||
QgsOracleRootItem::~QgsOracleRootItem()
|
||||
{
|
||||
}
|
||||
|
||||
QVector<QgsDataItem *> QgsOracleRootItem::createChildren()
|
||||
{
|
||||
QVector<QgsDataItem *> connections;
|
||||
|
@ -37,7 +37,6 @@ class QgsOracleRootItem : public QgsDataCollectionItem
|
||||
Q_OBJECT
|
||||
public:
|
||||
QgsOracleRootItem( QgsDataItem *parent, const QString &name, const QString &path );
|
||||
~QgsOracleRootItem() override;
|
||||
|
||||
QVector<QgsDataItem *> createChildren() override;
|
||||
|
||||
@ -95,9 +94,8 @@ class QgsOracleOwnerItem : public QgsDataCollectionItem
|
||||
Q_OBJECT
|
||||
public:
|
||||
QgsOracleOwnerItem( QgsDataItem *parent, const QString &name, const QString &path );
|
||||
~QgsOracleOwnerItem();
|
||||
|
||||
QVector<QgsDataItem *> createChildren();
|
||||
QVector<QgsDataItem *> createChildren() override;
|
||||
|
||||
void addLayer( const QgsOracleLayerProperty &layerProperty );
|
||||
};
|
||||
|
@ -33,7 +33,7 @@ class QgsOracleFeatureSource : public QgsAbstractFeatureSource
|
||||
public:
|
||||
explicit QgsOracleFeatureSource( const QgsOracleProvider *p );
|
||||
|
||||
virtual QgsFeatureIterator getFeatures( const QgsFeatureRequest &request );
|
||||
QgsFeatureIterator getFeatures( const QgsFeatureRequest &request ) override;
|
||||
|
||||
protected:
|
||||
QgsDataSourceUri mUri;
|
||||
@ -62,7 +62,7 @@ class QgsOracleFeatureIterator : public QgsAbstractFeatureIteratorFromSource<Qgs
|
||||
public:
|
||||
QgsOracleFeatureIterator( QgsOracleFeatureSource *source, bool ownSource, const QgsFeatureRequest &request );
|
||||
|
||||
~QgsOracleFeatureIterator();
|
||||
~QgsOracleFeatureIterator() override;
|
||||
|
||||
bool rewind() override;
|
||||
bool close() override;
|
||||
|
@ -1820,7 +1820,7 @@ void QgsOracleProvider::appendGeomParam( const QgsGeometry &geom, QSqlQuery &qry
|
||||
QByteArray wkb = geom.asWkb();
|
||||
|
||||
wkbPtr ptr;
|
||||
ptr.ucPtr = !geom.isEmpty() ? reinterpret_cast< unsigned char * >( const_cast<char *>( wkb.constData() ) ) : 0;
|
||||
ptr.ucPtr = !geom.isEmpty() ? reinterpret_cast< unsigned char * >( const_cast<char *>( wkb.constData() ) ) : nullptr;
|
||||
g.isNull = !ptr.ucPtr;
|
||||
g.gtype = -1;
|
||||
g.srid = mSrid < 1 ? -1 : mSrid;
|
||||
@ -3041,7 +3041,7 @@ QGISEXTERN QgsOracleProvider *classFactory( const QString *uri, const QgsDataPro
|
||||
*/
|
||||
QGISEXTERN QString providerKey()
|
||||
{
|
||||
return QSqlDatabase::isDriverAvailable( "QOCISPATIAL" ) ? ORACLE_KEY : 0;
|
||||
return QSqlDatabase::isDriverAvailable( "QOCISPATIAL" ) ? ORACLE_KEY : nullptr;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -3049,7 +3049,7 @@ QGISEXTERN QString providerKey()
|
||||
*/
|
||||
QGISEXTERN QString description()
|
||||
{
|
||||
return QSqlDatabase::isDriverAvailable( "QOCISPATIAL" ) ? ORACLE_DESCRIPTION : 0;
|
||||
return QSqlDatabase::isDriverAvailable( "QOCISPATIAL" ) ? ORACLE_DESCRIPTION : nullptr;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -3193,12 +3193,6 @@ QGISEXTERN void cleanupProvider()
|
||||
|
||||
// ----------
|
||||
|
||||
|
||||
QgsOracleSharedData::QgsOracleSharedData()
|
||||
: mFidCounter( 0 )
|
||||
{
|
||||
}
|
||||
|
||||
QgsFeatureId QgsOracleSharedData::lookupFid( const QVariantList &v )
|
||||
{
|
||||
QMutexLocker locker( &mMutex );
|
||||
|
@ -69,8 +69,8 @@ class QgsOracleProvider : public QgsVectorDataProvider
|
||||
const QgsCoordinateReferenceSystem *srs,
|
||||
bool overwrite,
|
||||
QMap<int, int> *oldToNewAttrIdxMap,
|
||||
QString *errorMessage = 0,
|
||||
const QMap<QString, QVariant> *options = 0
|
||||
QString *errorMessage = nullptr,
|
||||
const QMap<QString, QVariant> *options = nullptr
|
||||
);
|
||||
|
||||
/**
|
||||
@ -83,7 +83,7 @@ class QgsOracleProvider : public QgsVectorDataProvider
|
||||
explicit QgsOracleProvider( QString const &uri, const QgsDataProvider::ProviderOptions &options );
|
||||
|
||||
//! Destructor
|
||||
virtual ~QgsOracleProvider();
|
||||
~QgsOracleProvider() override;
|
||||
|
||||
QgsAbstractFeatureSource *featureSource() const override;
|
||||
QString storageType() const override;
|
||||
@ -137,7 +137,7 @@ class QgsOracleProvider : public QgsVectorDataProvider
|
||||
QgsAttributeList pkAttributeIndexes() const override { return mPrimaryKeyAttrs; }
|
||||
QVariant defaultValue( QString fieldName, QString tableName = QString(), QString schemaName = QString() );
|
||||
QVariant defaultValue( int fieldId ) const override;
|
||||
bool addFeatures( QgsFeatureList &flist, QgsFeatureSink::Flags flags = 0 ) override;
|
||||
bool addFeatures( QgsFeatureList &flist, QgsFeatureSink::Flags flags = nullptr ) override;
|
||||
bool deleteFeatures( const QgsFeatureIds &id ) override;
|
||||
bool addAttributes( const QList<QgsField> &attributes ) override;
|
||||
bool deleteAttributes( const QgsAttributeIds &ids ) override;
|
||||
@ -279,7 +279,7 @@ class QgsOracleProvider : public QgsVectorDataProvider
|
||||
{}
|
||||
|
||||
~OracleException()
|
||||
{}
|
||||
= default;
|
||||
|
||||
QString errorMessage() const
|
||||
{
|
||||
@ -342,7 +342,7 @@ class QgsOracleUtils
|
||||
class QgsOracleSharedData
|
||||
{
|
||||
public:
|
||||
QgsOracleSharedData();
|
||||
QgsOracleSharedData() = default;
|
||||
|
||||
// FID lookups
|
||||
QgsFeatureId lookupFid( const QVariantList &v ); // lookup existing mapping or add a new one
|
||||
@ -353,7 +353,7 @@ class QgsOracleSharedData
|
||||
protected:
|
||||
QMutex mMutex; //!< Access to all data members is guarded by the mutex
|
||||
|
||||
QgsFeatureId mFidCounter; // next feature id if map is used
|
||||
QgsFeatureId mFidCounter = 0; // next feature id if map is used
|
||||
QMap<QVariantList, QgsFeatureId> mKeyToFid; // map key values to feature id
|
||||
QMap<QgsFeatureId, QVariantList> mFidToKey; // map feature back to fea
|
||||
};
|
||||
|
@ -44,17 +44,16 @@ class QgsOracleSourceSelectDelegate : public QItemDelegate
|
||||
public:
|
||||
explicit QgsOracleSourceSelectDelegate( QObject *parent = nullptr )
|
||||
: QItemDelegate( parent )
|
||||
, mConn( nullptr )
|
||||
{}
|
||||
|
||||
~QgsOracleSourceSelectDelegate()
|
||||
~QgsOracleSourceSelectDelegate() override
|
||||
{
|
||||
setConn( nullptr );
|
||||
}
|
||||
|
||||
QWidget *createEditor( QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index ) const;
|
||||
void setModelData( QWidget *editor, QAbstractItemModel *model, const QModelIndex &index ) const;
|
||||
void setEditorData( QWidget *editor, const QModelIndex &index ) const;
|
||||
QWidget *createEditor( QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index ) const override;
|
||||
void setModelData( QWidget *editor, QAbstractItemModel *model, const QModelIndex &index ) const override;
|
||||
void setEditorData( QWidget *editor, const QModelIndex &index ) const override;
|
||||
|
||||
void setConnectionInfo( const QgsDataSourceUri &connInfo ) { mConnInfo = connInfo; }
|
||||
|
||||
@ -71,7 +70,7 @@ class QgsOracleSourceSelectDelegate : public QItemDelegate
|
||||
private:
|
||||
QgsDataSourceUri mConnInfo;
|
||||
//! lazily initialized connection (to detect possible primary keys)
|
||||
mutable QgsOracleConn *mConn;
|
||||
mutable QgsOracleConn *mConn = nullptr;
|
||||
};
|
||||
|
||||
|
||||
|
@ -51,13 +51,13 @@ static bool _removeFromCache( sqlite3 *db, const QString &connName )
|
||||
static sqlite3 *_openCacheDatabase()
|
||||
{
|
||||
sqlite3 *database = nullptr;
|
||||
if ( sqlite3_open_v2( QgsOracleTableCache::cacheDatabaseFilename().toUtf8().data(), &database, SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE, 0 ) != SQLITE_OK )
|
||||
return 0;
|
||||
if ( sqlite3_open_v2( QgsOracleTableCache::cacheDatabaseFilename().toUtf8().data(), &database, SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE, nullptr ) != SQLITE_OK )
|
||||
return nullptr;
|
||||
|
||||
if ( !_executeSqliteStatement( database, "CREATE TABLE IF NOT EXISTS meta_oracle(conn text primary_key, flags int)" ) )
|
||||
{
|
||||
sqlite3_close( database );
|
||||
return 0;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
return database;
|
||||
@ -149,7 +149,7 @@ bool QgsOracleTableCache::saveToCache( const QString &connName, CacheFlags flags
|
||||
|
||||
QString sqlInsert = QString( "INSERT INTO %1 VALUES(?,?,?,?,?,?,?,?)" ).arg( tblName );
|
||||
sqlite3_stmt *stmtInsert = nullptr;
|
||||
if ( sqlite3_prepare_v2( db, sqlInsert.toUtf8().data(), -1, &stmtInsert, 0 ) != SQLITE_OK )
|
||||
if ( sqlite3_prepare_v2( db, sqlInsert.toUtf8().data(), -1, &stmtInsert, nullptr ) != SQLITE_OK )
|
||||
{
|
||||
sqlite3_close( db );
|
||||
return false;
|
||||
|
@ -21,8 +21,6 @@
|
||||
#include "qgsapplication.h"
|
||||
|
||||
QgsOracleTableModel::QgsOracleTableModel()
|
||||
: QStandardItemModel()
|
||||
, mTableCount( 0 )
|
||||
{
|
||||
QStringList headerLabels;
|
||||
headerLabels << tr( "Owner" );
|
||||
@ -36,10 +34,6 @@ QgsOracleTableModel::QgsOracleTableModel()
|
||||
setHorizontalHeaderLabels( headerLabels );
|
||||
}
|
||||
|
||||
QgsOracleTableModel::~QgsOracleTableModel()
|
||||
{
|
||||
}
|
||||
|
||||
void QgsOracleTableModel::addTableEntry( const QgsOracleLayerProperty &layerProperty )
|
||||
{
|
||||
QgsDebugMsg( layerProperty.toString() );
|
||||
@ -51,7 +45,7 @@ void QgsOracleTableModel::addTableEntry( const QgsOracleLayerProperty &layerProp
|
||||
}
|
||||
|
||||
// is there already a root item with the given scheme Name?
|
||||
QStandardItem *ownerItem = 0;
|
||||
QStandardItem *ownerItem = nullptr;
|
||||
|
||||
for ( int i = 0; i < layerProperty.size(); i++ )
|
||||
{
|
||||
|
@ -32,7 +32,6 @@ class QgsOracleTableModel : public QStandardItemModel
|
||||
Q_OBJECT
|
||||
public:
|
||||
QgsOracleTableModel();
|
||||
~QgsOracleTableModel();
|
||||
|
||||
//! Adds entry for one database table to the model
|
||||
void addTableEntry( const QgsOracleLayerProperty &property );
|
||||
@ -56,7 +55,7 @@ class QgsOracleTableModel : public QStandardItemModel
|
||||
DbtmColumns
|
||||
};
|
||||
|
||||
bool setData( const QModelIndex &index, const QVariant &value, int role = Qt::EditRole );
|
||||
bool setData( const QModelIndex &index, const QVariant &value, int role = Qt::EditRole ) override;
|
||||
|
||||
QString layerURI( const QModelIndex &index, const QgsDataSourceUri &connInfo );
|
||||
|
||||
@ -64,7 +63,7 @@ class QgsOracleTableModel : public QStandardItemModel
|
||||
|
||||
private:
|
||||
//! Number of tables in the model
|
||||
int mTableCount;
|
||||
int mTableCount = 0;
|
||||
};
|
||||
|
||||
#endif // QGSORACLETABLEMODEL_H
|
||||
|
@ -28,9 +28,7 @@
|
||||
|
||||
QgsSpatiaLiteFeatureIterator::QgsSpatiaLiteFeatureIterator( QgsSpatiaLiteFeatureSource *source, bool ownSource, const QgsFeatureRequest &request )
|
||||
: QgsAbstractFeatureIteratorFromSource<QgsSpatiaLiteFeatureSource>( source, ownSource, request )
|
||||
, mExpressionCompiled( false )
|
||||
{
|
||||
|
||||
mHandle = QgsSpatiaLiteConnPool::instance()->acquireConnection( mSource->mSqlitePath );
|
||||
|
||||
mFetchGeometry = !mSource->mGeometryColumn.isNull() && !( mRequest.flags() & QgsFeatureRequest::NoGeometry );
|
||||
|
@ -16,7 +16,7 @@ email : hugo dot mercier at oslandia dot com
|
||||
***************************************************************************/
|
||||
|
||||
#include "qgsvirtuallayerblob.h"
|
||||
#include <string.h>
|
||||
#include <cstring>
|
||||
#include <limits>
|
||||
|
||||
void SpatialiteBlobHeader::readFrom( const char *p )
|
||||
|
@ -17,7 +17,7 @@ email : hugo dot mercier at oslandia dot com
|
||||
#ifndef QGSVIRTUALLAYER_BLOB_H
|
||||
#define QGSVIRTUALLAYER_BLOB_H
|
||||
|
||||
#include <stdint.h>
|
||||
#include <cstdint>
|
||||
|
||||
#include "qgsgeometry.h"
|
||||
|
||||
|
@ -14,7 +14,7 @@ email : hugo dot mercier at oslandia dot com
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
#include <string.h>
|
||||
#include <cstring>
|
||||
#include <iostream>
|
||||
#include <cstdint>
|
||||
#include <stdexcept>
|
||||
|
@ -2180,7 +2180,7 @@ const QgsWmtsTileMatrix *QgsWmtsTileMatrixSet::findOtherResolution( double tres,
|
||||
QMap<double, QgsWmtsTileMatrix>::const_iterator it = tileMatrices.constFind( tres );
|
||||
if ( it == tileMatrices.constEnd() )
|
||||
return nullptr;
|
||||
while ( 1 )
|
||||
while ( true )
|
||||
{
|
||||
if ( offset > 0 )
|
||||
{
|
||||
|
@ -35,7 +35,7 @@ class SERVER_EXPORT QgsFeatureFilter : public QgsFeatureFilterProvider
|
||||
{
|
||||
public:
|
||||
//! Constructor
|
||||
QgsFeatureFilter() {}
|
||||
QgsFeatureFilter() = default;
|
||||
|
||||
/**
|
||||
* Filter the features of the layer
|
||||
|
@ -33,7 +33,7 @@ class SERVER_EXPORT QgsFeatureFilterProviderGroup : public QgsFeatureFilterProvi
|
||||
{
|
||||
public:
|
||||
//! Constructor
|
||||
QgsFeatureFilterProviderGroup() {}
|
||||
QgsFeatureFilterProviderGroup() = default;
|
||||
|
||||
/**
|
||||
* Filter the features of the layer
|
||||
|
@ -47,7 +47,7 @@
|
||||
|
||||
// TODO: remove, it's only needed by a single debug message
|
||||
#include <fcgi_stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <cstdlib>
|
||||
|
||||
|
||||
|
||||
|
@ -24,8 +24,7 @@
|
||||
#include <QtTest/QTest>
|
||||
|
||||
#include <cstdio>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <cstdlib>
|
||||
|
||||
#ifdef Q_OS_WIN
|
||||
// Open files in binary mode
|
||||
@ -159,28 +158,28 @@ int main( int argc, char *argv[] )
|
||||
// Invokes ctor `GetOpt (int argc, char **argv, char *optstring);'
|
||||
///////////////////////////////////////////////////////////////
|
||||
int optionChar;
|
||||
while ( 1 )
|
||||
while ( true )
|
||||
{
|
||||
static struct option long_options[] =
|
||||
{
|
||||
/* These options set a flag. */
|
||||
{"help", no_argument, 0, '?'},
|
||||
{"help", no_argument, nullptr, '?'},
|
||||
/* These options don't set a flag.
|
||||
* We distinguish them by their indices. */
|
||||
{"iterations", required_argument, 0, 'i'},
|
||||
{"snapshot", required_argument, 0, 's'},
|
||||
{"log", required_argument, 0, 'l'},
|
||||
{"width", required_argument, 0, 'w'},
|
||||
{"height", required_argument, 0, 'h'},
|
||||
{"project", required_argument, 0, 'p'},
|
||||
{"extent", required_argument, 0, 'e'},
|
||||
{"optionspath", required_argument, 0, 'o'},
|
||||
{"configpath", required_argument, 0, 'c'},
|
||||
{"prefix", required_argument, 0, 'r'},
|
||||
{"quality", required_argument, 0, 'q'},
|
||||
{"parallel", no_argument, 0, 'P'},
|
||||
{"print", required_argument, 0, 'R'},
|
||||
{0, 0, 0, 0}
|
||||
{"iterations", required_argument, nullptr, 'i'},
|
||||
{"snapshot", required_argument, nullptr, 's'},
|
||||
{"log", required_argument, nullptr, 'l'},
|
||||
{"width", required_argument, nullptr, 'w'},
|
||||
{"height", required_argument, nullptr, 'h'},
|
||||
{"project", required_argument, nullptr, 'p'},
|
||||
{"extent", required_argument, nullptr, 'e'},
|
||||
{"optionspath", required_argument, nullptr, 'o'},
|
||||
{"configpath", required_argument, nullptr, 'c'},
|
||||
{"prefix", required_argument, nullptr, 'r'},
|
||||
{"quality", required_argument, nullptr, 'q'},
|
||||
{"parallel", no_argument, nullptr, 'P'},
|
||||
{"print", required_argument, nullptr, 'R'},
|
||||
{nullptr, 0, nullptr, 0}
|
||||
};
|
||||
|
||||
/* getopt_long stores the option index here. */
|
||||
@ -197,7 +196,7 @@ int main( int argc, char *argv[] )
|
||||
{
|
||||
case 0:
|
||||
/* If this option set a flag, do nothing else now. */
|
||||
if ( long_options[option_index].flag != 0 )
|
||||
if ( long_options[option_index].flag != nullptr )
|
||||
break;
|
||||
printf( "option %s", long_options[option_index].name );
|
||||
if ( optarg )
|
||||
|
@ -19,12 +19,12 @@
|
||||
#include <cmath>
|
||||
#include <ctime>
|
||||
#include <iostream>
|
||||
#include <stdio.h>
|
||||
#include <cstdio>
|
||||
#ifndef Q_OS_WIN
|
||||
#include <sys/resource.h>
|
||||
#endif
|
||||
#include <time.h>
|
||||
#include <math.h>
|
||||
#include <ctime>
|
||||
#include <cmath>
|
||||
|
||||
#include <QFile>
|
||||
#include <QFileInfo>
|
||||
|
@ -226,7 +226,7 @@ class DummyAlgorithm : public QgsProcessingAlgorithm
|
||||
context.setProject( &p );
|
||||
|
||||
// flag not set
|
||||
mFlags = 0;
|
||||
mFlags = nullptr;
|
||||
parameters.insert( "p1", QVariant::fromValue( layer3111 ) );
|
||||
QVERIFY( validateInputCrs( parameters, context ) );
|
||||
mFlags = FlagRequiresMatchingCrs;
|
||||
@ -235,7 +235,7 @@ class DummyAlgorithm : public QgsProcessingAlgorithm
|
||||
// two layers, different crs
|
||||
parameters.insert( "p2", QVariant::fromValue( layer4326 ) );
|
||||
// flag not set
|
||||
mFlags = 0;
|
||||
mFlags = nullptr;
|
||||
QVERIFY( validateInputCrs( parameters, context ) );
|
||||
mFlags = FlagRequiresMatchingCrs;
|
||||
QVERIFY( !validateInputCrs( parameters, context ) );
|
||||
@ -842,8 +842,8 @@ void TestQgsProcessing::context()
|
||||
context.setDefaultEncoding( "my_enc" );
|
||||
QCOMPARE( context.defaultEncoding(), QStringLiteral( "my_enc" ) );
|
||||
|
||||
context.setFlags( QgsProcessingContext::Flags( 0 ) );
|
||||
QCOMPARE( context.flags(), QgsProcessingContext::Flags( 0 ) );
|
||||
context.setFlags( QgsProcessingContext::Flags( nullptr ) );
|
||||
QCOMPARE( context.flags(), QgsProcessingContext::Flags( nullptr ) );
|
||||
|
||||
QgsProject p;
|
||||
context.setProject( &p );
|
||||
@ -1243,7 +1243,7 @@ void TestQgsProcessing::features()
|
||||
QgsProcessingContext context;
|
||||
context.setProject( &p );
|
||||
// disable check for geometry validity
|
||||
context.setFlags( QgsProcessingContext::Flags( 0 ) );
|
||||
context.setFlags( QgsProcessingContext::Flags( nullptr ) );
|
||||
|
||||
std::function< QgsFeatureIds( QgsFeatureIterator it ) > getIds = []( QgsFeatureIterator it )
|
||||
{
|
||||
@ -1351,7 +1351,7 @@ void TestQgsProcessing::uniqueValues()
|
||||
}
|
||||
|
||||
QgsProcessingContext context;
|
||||
context.setFlags( QgsProcessingContext::Flags( 0 ) );
|
||||
context.setFlags( QgsProcessingContext::Flags( nullptr ) );
|
||||
|
||||
QgsProject p;
|
||||
p.addMapLayer( layer );
|
||||
|
@ -199,7 +199,7 @@ void TestQgsRasterCalculator::singleOp()
|
||||
QFETCH( double, value );
|
||||
QFETCH( double, expected );
|
||||
|
||||
QgsRasterCalcNode node( op, new QgsRasterCalcNode( value ), 0 );
|
||||
QgsRasterCalcNode node( op, new QgsRasterCalcNode( value ), nullptr );
|
||||
|
||||
QgsRasterMatrix result;
|
||||
result.setNodataValue( -9999 );
|
||||
@ -225,7 +225,7 @@ void TestQgsRasterCalculator::singleOpMatrices()
|
||||
|
||||
QgsRasterMatrix m( 2, 3, d, -1.0 );
|
||||
|
||||
QgsRasterCalcNode node( QgsRasterCalcNode::opSIGN, new QgsRasterCalcNode( &m ), 0 );
|
||||
QgsRasterCalcNode node( QgsRasterCalcNode::opSIGN, new QgsRasterCalcNode( &m ), nullptr );
|
||||
|
||||
QgsRasterMatrix result;
|
||||
result.setNodataValue( -9999 );
|
||||
@ -349,7 +349,7 @@ void TestQgsRasterCalculator::dualOpMatrixMatrix()
|
||||
void TestQgsRasterCalculator::rasterRefOp()
|
||||
{
|
||||
// test single op run on raster ref
|
||||
QgsRasterCalcNode node( QgsRasterCalcNode::opSIGN, new QgsRasterCalcNode( QStringLiteral( "raster" ) ), 0 );
|
||||
QgsRasterCalcNode node( QgsRasterCalcNode::opSIGN, new QgsRasterCalcNode( QStringLiteral( "raster" ) ), nullptr );
|
||||
|
||||
QgsRasterMatrix result;
|
||||
result.setNodataValue( -9999 );
|
||||
|
@ -202,7 +202,7 @@ void TestQgsMapToolIdentifyAction::clickxy()
|
||||
QPoint point = QPoint( mapPoint.x(), mapPoint.y() );
|
||||
QMouseEvent releases( QEvent::MouseButtonRelease, point,
|
||||
Qt::RightButton, Qt::LeftButton, Qt::NoModifier );
|
||||
QgsMapMouseEvent mapReleases( 0, &releases );
|
||||
QgsMapMouseEvent mapReleases( nullptr, &releases );
|
||||
|
||||
// simulate a click on the corresponding action
|
||||
QTimer::singleShot( 2000, this, &TestQgsMapToolIdentifyAction::doAction );
|
||||
|
@ -122,7 +122,7 @@ class TestQgsDiagram : public QObject
|
||||
// will be called before each testfunction is executed
|
||||
void init()
|
||||
{
|
||||
mPointsLayer->setDiagramRenderer( 0 );
|
||||
mPointsLayer->setDiagramRenderer( nullptr );
|
||||
QgsDiagramLayerSettings dls;
|
||||
mPointsLayer->setDiagramLayerSettings( dls );
|
||||
}
|
||||
@ -209,7 +209,7 @@ class TestQgsDiagram : public QObject
|
||||
|
||||
QVERIFY( imageCheck( "piediagram_expression" ) );
|
||||
|
||||
mPointsLayer->setDiagramRenderer( 0 );
|
||||
mPointsLayer->setDiagramRenderer( nullptr );
|
||||
}
|
||||
|
||||
void testDataDefinedPosition()
|
||||
|
@ -417,7 +417,7 @@ void TestQgsGeometry::isEmpty()
|
||||
geom.set( new QgsPoint( 1.0, 2.0 ) );
|
||||
QVERIFY( !geom.isNull() );
|
||||
|
||||
geom.set( 0 );
|
||||
geom.set( nullptr );
|
||||
QVERIFY( geom.isNull() );
|
||||
|
||||
QgsGeometryCollection collection;
|
||||
@ -432,7 +432,7 @@ void TestQgsGeometry::operatorBool()
|
||||
geom.set( new QgsPoint( 1.0, 2.0 ) );
|
||||
QVERIFY( geom );
|
||||
|
||||
geom.set( 0 );
|
||||
geom.set( nullptr );
|
||||
QVERIFY( !geom );
|
||||
}
|
||||
|
||||
@ -3160,7 +3160,7 @@ void TestQgsGeometry::lineString()
|
||||
|
||||
//append to empty
|
||||
QgsLineString l10;
|
||||
l10.append( 0 );
|
||||
l10.append( nullptr );
|
||||
QVERIFY( l10.isEmpty() );
|
||||
QCOMPARE( l10.numPoints(), 0 );
|
||||
|
||||
@ -4578,7 +4578,7 @@ void TestQgsGeometry::polygon()
|
||||
//set exterior ring
|
||||
|
||||
//try with no ring
|
||||
QgsLineString *ext = 0;
|
||||
QgsLineString *ext = nullptr;
|
||||
p1.setExteriorRing( ext );
|
||||
QVERIFY( p1.isEmpty() );
|
||||
QCOMPARE( p1.numInteriorRings(), 0 );
|
||||
@ -4702,7 +4702,7 @@ void TestQgsGeometry::polygon()
|
||||
QCOMPARE( p6.numInteriorRings(), 0 );
|
||||
QVERIFY( !p6.interiorRing( -1 ) );
|
||||
QVERIFY( !p6.interiorRing( 0 ) );
|
||||
p6.addInteriorRing( 0 );
|
||||
p6.addInteriorRing( nullptr );
|
||||
QCOMPARE( p6.numInteriorRings(), 0 );
|
||||
QgsLineString *ring = new QgsLineString();
|
||||
ring->setPoints( QgsPointSequence() << QgsPoint( 1, 1 ) << QgsPoint( 1, 9 ) << QgsPoint( 9, 9 )
|
||||
@ -7831,7 +7831,7 @@ void TestQgsGeometry::curvePolygon()
|
||||
QCOMPARE( p6.numInteriorRings(), 0 );
|
||||
QVERIFY( !p6.interiorRing( -1 ) );
|
||||
QVERIFY( !p6.interiorRing( 0 ) );
|
||||
p6.addInteriorRing( 0 );
|
||||
p6.addInteriorRing( nullptr );
|
||||
QCOMPARE( p6.numInteriorRings(), 0 );
|
||||
QgsCircularString *ring = new QgsCircularString();
|
||||
ring->setPoints( QgsPointSequence() << QgsPoint( 1, 1 ) << QgsPoint( 1, 9 ) << QgsPoint( 9, 9 )
|
||||
|
@ -62,7 +62,7 @@ class TestQgsGeometryImport: public QObject
|
||||
|
||||
void TestQgsGeometryImport::initTestCase()
|
||||
{
|
||||
geos = initGEOS_r( 0, 0 );
|
||||
geos = initGEOS_r( nullptr, nullptr );
|
||||
}
|
||||
|
||||
void TestQgsGeometryImport::pointWkt_data()
|
||||
|
@ -128,7 +128,7 @@ void TestQgsHistogram::fromLayer()
|
||||
{
|
||||
QgsHistogram h;
|
||||
|
||||
QVERIFY( !h.setValues( 0, QString() ) );
|
||||
QVERIFY( !h.setValues( nullptr, QString() ) );
|
||||
|
||||
QgsVectorLayer *layer = new QgsVectorLayer( QStringLiteral( "Point?field=col1:real" ), QStringLiteral( "layer" ), QStringLiteral( "memory" ) );
|
||||
QVERIFY( layer->isValid() );
|
||||
|
@ -96,7 +96,7 @@ void TestQgsLabelingEngine::init()
|
||||
void TestQgsLabelingEngine::cleanup()
|
||||
{
|
||||
QgsProject::instance()->removeMapLayer( vl->id() );
|
||||
vl = 0;
|
||||
vl = nullptr;
|
||||
}
|
||||
|
||||
void TestQgsLabelingEngine::setDefaultLabelParams( QgsPalLayerSettings &settings )
|
||||
@ -214,7 +214,7 @@ void TestQgsLabelingEngine::testRuleBased()
|
||||
mapSettings.setOutputDpi( 96 );
|
||||
|
||||
// set up most basic rule-based labeling for layer
|
||||
QgsRuleBasedLabeling::Rule *root = new QgsRuleBasedLabeling::Rule( 0 );
|
||||
QgsRuleBasedLabeling::Rule *root = new QgsRuleBasedLabeling::Rule( nullptr );
|
||||
|
||||
QgsPalLayerSettings s1;
|
||||
s1.fieldName = QStringLiteral( "Class" );
|
||||
@ -556,7 +556,7 @@ void TestQgsLabelingEngine::testParticipatingLayers()
|
||||
QCOMPARE( engine.participatingLayers().toSet(), QSet< QgsMapLayer * >() << vl << layer2 );
|
||||
|
||||
// add a rule-based labeling node
|
||||
QgsRuleBasedLabeling::Rule *root = new QgsRuleBasedLabeling::Rule( 0 );
|
||||
QgsRuleBasedLabeling::Rule *root = new QgsRuleBasedLabeling::Rule( nullptr );
|
||||
QgsPalLayerSettings s1;
|
||||
root->appendChild( new QgsRuleBasedLabeling::Rule( new QgsPalLayerSettings( s1 ) ) );
|
||||
QgsPalLayerSettings s2;
|
||||
|
@ -174,7 +174,7 @@ void TestQgsLayoutContext::dpi()
|
||||
void TestQgsLayoutContext::renderContextFlags()
|
||||
{
|
||||
QgsLayoutRenderContext context( nullptr );
|
||||
context.setFlags( 0 );
|
||||
context.setFlags( nullptr );
|
||||
QgsRenderContext::Flags flags = context.renderContextFlags();
|
||||
QVERIFY( !( flags & QgsRenderContext::Antialiasing ) );
|
||||
QVERIFY( !( flags & QgsRenderContext::UseAdvancedEffects ) );
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user