Skip to content

Commit 1ad6e0b

Browse files
committed
Document api breakages and add more doxymentation
1 parent 590a51e commit 1ad6e0b

File tree

5 files changed

+45
-10
lines changed

5 files changed

+45
-10
lines changed

doc/api_break.dox

Lines changed: 19 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -261,6 +261,7 @@ should now call QgsCoordinateReferenceSystem::invalidateCache() and QgsCoordinat
261261
- QgsRendererV2DataDefinedMenus was removed. Use QgsDataDefinedButton instead.
262262
- QgsLegacyHelpers.
263263
- QgsProviderCountCalcEvent and QgsProviderExtentCalcEvent. These classes were unused in QGIS core and unmaintained.
264+
- QgsEditorWidgetConfig was removed. Use QVariantMap instead.
264265

265266

266267
General changes {#qgis_api_break_3_0_global}
@@ -890,6 +891,7 @@ QgsFieldExpressionWidget {#qgis_api_break_3_0_QgsFieldExpressionWidget}
890891
------------------------
891892

892893
- The setLayer( QgsVectorlayer* ) slot has been removed. Use the setLayer( QgsMapLayer* ) slot instead.
894+
- registerGetExpressionContextCallback has been removed in favor of registerExpressionContextGenerator
893895

894896

895897
QgsFields {#qgis_api_break_3_0_QgsFields}
@@ -899,12 +901,6 @@ QgsFields {#qgis_api_break_3_0_QgsFields}
899901
- fieldNameIndex has been renamed to lookupField. See the API documentation for details.
900902

901903

902-
QgsFieldExpressionWidget {#qgis_api_break_3_0_QgsFieldExpressionWidget}
903-
------------------------
904-
905-
- registerGetExpressionContextCallback has been removed in favor of registerExpressionContextGenerator
906-
907-
908904
QgsFieldProxyModel {#qgis_api_break_3_0_QgsFieldProxyModel}
909905
------------------
910906

@@ -971,8 +967,23 @@ plugins calling this method will need to be updated.
971967
QgsEditorWidgetRegistry {#qgis_api_break_3_0_QgsEditorWidgetRegistry}
972968
-----------------------
973969

974-
- The signature of isFieldSupported() has been changed to return an unsigned (how good it supports the given field)
975-
and to const-correct it.
970+
- The signature of isFieldSupported() has been changed to return an unsigned
971+
integer (how good it supports the given field) and is now const.
972+
973+
QgsEditorWidgetFactory {#qgis_api_break_3_0_QgsEditorWidgetFactory}
974+
----------------------
975+
976+
- `readEditorConfig` has been removed. The configuration is read and written
977+
from and to a QVariantMap automatically.
978+
- `readConfig` has been removed. The configuration is read and written
979+
from and to a QVariantMap automatically.
980+
- `writeConfig` has been removed. The configuration is read and written
981+
from and to a QVariantMap automatically.
982+
- `representValue` has been removed. Use QgsFieldKit::representValue() instead
983+
- `sortValue` has been removed. Use QgsFieldKit::representValue() instead
984+
- `alignmentFlag` has been removed. Use QgsFieldKit::representValue() instead
985+
- `createCache` has been removed. Use QgsFieldKit::representValue() instead
986+
976987

977988
QgsGraduatedRenderer {#qgis_api_break_3_0_QgsGraduatedRenderer}
978989
--------------------

python/core/qgsapplication.sip

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -398,6 +398,12 @@ static void qtgui_UpdatePyArgv(PyObject *argvlist, int argc, char **argv)
398398
*/
399399
static QgsRuntimeProfiler* profiler();
400400

401+
/**
402+
* Provides access to the field kit registry.
403+
*
404+
* @note Added in QGIS 3.0
405+
*/
406+
static QgsFieldKitRegistry* fieldKitRegistry();
401407
public slots:
402408

403409
/** Causes the application instance to emit the settingsChanged() signal. This should

src/core/qgsfieldkit.h

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,18 @@
2121

2222
class QgsVectorLayer;
2323

24+
/**
25+
* \ingroup core
26+
* A field kit helps to handle and display values for a field.
27+
*
28+
* It allows for using a shared configuration with the editor widgets
29+
* for representation of attribute values.
30+
* Field kits normally have one single instance which is managed by the
31+
* QgsFieldKitRegistry. Custom field kits should be registered there and
32+
* field kits for use within code should normally be obtained from there.
33+
*
34+
* This is an abstract base class and will always need to be subclassed.
35+
*/
2436
class CORE_EXPORT QgsFieldKit
2537
{
2638
public:
@@ -48,7 +60,7 @@ class CORE_EXPORT QgsFieldKit
4860
/**
4961
* If the default sort order should be overwritten for this widget, you can transform the value in here.
5062
*
51-
* @return By default the value is returned unmodified.
63+
* @returns an unmodified value by default.
5264
*
5365
* @note Added in 3.0
5466
*/

src/core/qgsfieldkitregistry.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,12 @@
2222

2323
class QgsFieldKit;
2424

25+
/**
26+
* \ingroup core
27+
* The QgsFieldKitRegistry manages registered classes of QgsFieldKit.
28+
* A reference to the QgsFieldKitRegistry can be obtained from
29+
* QgsApplication::fieldKitRegistry().
30+
*/
2531
class CORE_EXPORT QgsFieldKitRegistry : public QObject
2632
{
2733
Q_OBJECT

src/core/qgsvectorlayer.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -794,7 +794,7 @@ class CORE_EXPORT QgsVectorLayer : public QgsMapLayer, public QgsExpressionConte
794794
virtual QString loadNamedStyle( const QString &theURI, bool &theResultFlag ) override;
795795

796796
/** Read the symbology for the current layer from the Dom node supplied.
797-
* @param node node that will contain the symbology definition for this layer.
797+
* @param layerNode node that will contain the symbology definition for this layer.
798798
* @param errorMessage reference to string that will be updated with any error messages
799799
* @return true in case of success.
800800
*/

0 commit comments

Comments
 (0)