Merge pull request #3423 from nyalldawson/remove_deprecated

Remove unused QgsProvider(Count|ExtentCalc)Event classes
This commit is contained in:
Nyall Dawson 2016-08-24 06:59:41 +10:00 committed by GitHub
commit e0229ad8c7
10 changed files with 1 additions and 214 deletions

View File

@ -182,6 +182,7 @@ should now call QgsCoordinateReferenceSystem::invalidateCache() and QgsCoordinat
<li>QgsPseudoColorShader. This shader has been broken for some time and was replaced by QgsSingleBandPseudoColorRenderer.</li>
<li>QgsRendererV2DataDefinedMenus was removed. Use QgsDataDefinedButton instead.</li>
<li>QgsLegacyHelpers.</li>
<li>QgsProviderCountCalcEvent and QgsProviderExtentCalcEvent. These classes were unused in QGIS core and unmaintained.</li>
</ul>
\subsection qgis_api_break_3_0_global General changes

View File

@ -111,8 +111,6 @@
%Include qgsproject.sip
%Include qgsprojectproperty.sip
%Include qgsprojectversion.sip
%Include qgsprovidercountcalcevent.sip
%Include qgsproviderextentcalcevent.sip
%Include qgsprovidermetadata.sip
%Include qgsproviderregistry.sip
%Include qgspythonrunner.sip

View File

@ -1,11 +0,0 @@
class QgsProviderCountCalcEvent : QEvent
{
%TypeHeaderCode
#include <qgsprovidercountcalcevent.h>
%End
public:
QgsProviderCountCalcEvent( long featuresCounted );
long featuresCounted() const;
};

View File

@ -1,12 +0,0 @@
class QgsProviderExtentCalcEvent : QEvent
{
%TypeHeaderCode
#include <qgsproviderextentcalcevent.h>
%End
public:
QgsProviderExtentCalcEvent( QgsRectangle* layerExtent );
QgsRectangle* layerExtent() const;
};

View File

@ -172,8 +172,6 @@ SET(QGIS_CORE_SRCS
qgsprojectfiletransform.cpp
qgsprojectproperty.cpp
qgsprojectversion.cpp
qgsprovidercountcalcevent.cpp
qgsproviderextentcalcevent.cpp
qgsprovidermetadata.cpp
qgsproviderregistry.cpp
qgspythonrunner.cpp
@ -677,8 +675,6 @@ SET(QGIS_CORE_HDRS
qgsprojectfiletransform.h
qgsprojectproperty.h
qgsprojectversion.h
qgsprovidercountcalcevent.h
qgsproviderextentcalcevent.h
qgsprovidermetadata.h
qgsproviderregistry.h
qgspythonrunner.h

View File

@ -1,34 +0,0 @@
/***************************************************************************
qgsprovidercountcalcevent.cpp - Notification that the exact count
of a layer has been calculated.
-------------------
begin : Feb 1, 2005
copyright : (C) 2005 by Brendan Morley
email : morb at ozemail dot com dot au
***************************************************************************/
/***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/
#include "qgsprovidercountcalcevent.h"
#include "qgis.h"
QgsProviderCountCalcEvent::QgsProviderCountCalcEvent( long featuresCounted )
: QEvent( static_cast<QEvent::Type>( Qgis::ProviderCountCalcEvent ) )
, n( featuresCounted )
{
// NO-OP
}
long QgsProviderCountCalcEvent::featuresCounted() const
{
return n;
}

View File

@ -1,57 +0,0 @@
/***************************************************************************
qgsprovidercountcalcevent.h - Notification that the exact count
of a layer has been calculated.
-------------------
begin : Feb 1, 2005
copyright : (C) 2005 by Brendan Morley
email : morb at ozemail dot com dot au
***************************************************************************/
/***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/
#ifndef QGSPROVIDERCOUNTCALCEVENT_H
#define QGSPROVIDERCOUNTCALCEVENT_H
#include <QEvent>
/** \ingroup core
* \brief A custom event that is designed to be fired when a layer count has been fully calculated.
\author Brendan Morley
\date March 2005
This custom QEvent is designed to be fired when the full item count of a layer has been calculated.
It was initially included in QGIS to help the QgsPostgresProvider provide the asynchronous
calculation of PostgreSQL layer counts.
Events are used instead of Qt signals/slots as events can be received asynchronously,
which makes for better mutlithreading behaviour and less opportunity for programmer mishap.
*/
// TODO: Add the pg table this is a count OF.
class CORE_EXPORT QgsProviderCountCalcEvent : public QEvent
{
public:
QgsProviderCountCalcEvent( long featuresCounted );
long featuresCounted() const;
private:
long n;
};
#endif

View File

@ -1,34 +0,0 @@
/***************************************************************************
qgsproviderextentcalcevent.cpp - Notification that the exact extent
of a layer has been calculated.
-------------------
begin : Feb 1, 2005
copyright : (C) 2005 by Brendan Morley
email : morb at ozemail dot com dot au
***************************************************************************/
/***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/
#include "qgsproviderextentcalcevent.h"
#include "qgis.h"
QgsProviderExtentCalcEvent::QgsProviderExtentCalcEvent( QgsRectangle* layerExtent )
: QEvent( static_cast<QEvent::Type>( Qgis::ProviderExtentCalcEvent ) )
, le( layerExtent )
{
// NO-OP
}
QgsRectangle* QgsProviderExtentCalcEvent::layerExtent() const
{
return le;
}

View File

@ -1,58 +0,0 @@
/***************************************************************************
qgsproviderextentcalcevent.h - Notification that the exact extent
of a layer has been calculated.
-------------------
begin : Feb 1, 2005
copyright : (C) 2005 by Brendan Morley
email : morb at ozemail dot com dot au
***************************************************************************/
/***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/
#ifndef QGSPROVIDEREXTENTCALCEVENT_H
#define QGSPROVIDEREXTENTCALCEVENT_H
#include <QEvent>
class QgsRectangle;
/** \ingroup core
* A custom event that is designed to be fired when a layer extent has been fully calculated.
\author Brendan Morley
\date March 2005
This custom QEvent is designed to be fired when the full extent of a layer has been calculated.
It was initially included in QGIS to help the QgsPostgresProvider provide the asynchronous
calculation of PostgreSQL layer extents.
Events are used instead of Qt signals/slots as events can be received asynchronously,
which makes for better mutlithreading behaviour and less opportunity for programmer mishap.
*/
// TODO: Add the pg table this is a extent OF.
class CORE_EXPORT QgsProviderExtentCalcEvent : public QEvent
{
public:
QgsProviderExtentCalcEvent( QgsRectangle* layerExtent );
QgsRectangle* layerExtent() const;
private:
QgsRectangle* le;
};
#endif

View File

@ -27,8 +27,6 @@
#include <QMessageBox>
#include "qgsvectorlayerimport.h"
#include "qgsprovidercountcalcevent.h"
#include "qgsproviderextentcalcevent.h"
#include "qgspostgresprovider.h"
#include "qgspostgresconn.h"
#include "qgspostgresconnpool.h"