Skip to content

Commit 22f0f25

Browse files
committed
fix builds with older compilers
1 parent 90053c5 commit 22f0f25

File tree

3 files changed

+34
-32
lines changed

3 files changed

+34
-32
lines changed

python/core/qgseditformconfig.sip

+26-17
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,6 @@ class QgsEditFormConfig : QObject
5757
SuppressOff = 2 //!< Do not suppress feature form
5858
};
5959

60-
6160
/**
6261
* This is only useful in combination with EditorLayout::TabLayout.
6362
*
@@ -93,12 +92,6 @@ class QgsEditFormConfig : QObject
9392
void setUiForm( const QString& ui );
9493

9594

96-
97-
98-
99-
100-
101-
10295
// Widget stuff
10396

10497
/**
@@ -126,7 +119,7 @@ class QgsEditFormConfig : QObject
126119
* <li>WebView (QgsWebViewWidgetWrapper)</li>
127120
* </ul>
128121
*
129-
* @param attrIdx Index of the field
122+
* @param fieldIdx Index of the field
130123
* @param widgetType Type id of the editor widget to use
131124
*/
132125
void setWidgetType( int fieldIdx, const QString& widgetType );
@@ -189,15 +182,13 @@ class QgsEditFormConfig : QObject
189182
QgsEditorWidgetConfig widgetConfig( const QString& fieldName ) const;
190183

191184
/**
192-
* If this returns true, the field is manually set to read only.
185+
* This returns true if the field is manually set to read only or if the field
186+
* does not support editing like joins or vitual fields.
193187
*/
194188
bool readOnly( int idx );
195189

196190
/**
197-
* If set to false, the widget at the given index will be read-only, regardless of the
198-
* layer's editable state and data provider capacities.
199-
* If it is set to true, the widget's editable state will be synchronized with the layer's
200-
* edit state.
191+
* If set to false, the widget at the given index will be read-only.
201192
*/
202193
void setReadOnly(int idx, bool readOnly );
203194

@@ -229,16 +220,32 @@ class QgsEditFormConfig : QObject
229220
// Python stuff
230221

231222

232-
/** Get python function for edit form initialization */
223+
/**
224+
* Get python function for edit form initialization.
225+
* Will be looked up in a python file relative to the project folder if it
226+
* includes a module name or if it's a pure function name it will searched
227+
* in the python code set with @link setInitCode @endlink.
228+
*/
233229
QString initFunction() const;
234230

235-
/** Set python function for edit form initialization */
231+
/**
232+
* Set python function for edit form initialization.
233+
* Will be looked up in a python file relative to the project folder if it
234+
* includes a module name or if it's a pure function name it will searched
235+
* in the python code set with @link setInitCode @endlink.
236+
*/
236237
void setInitFunction( const QString& function );
237238

238-
/** Get python code for edit form initialization */
239+
/**
240+
* Get python code for edit form initialization.
241+
*/
239242
QString initCode() const;
240243

241-
/** Set python code for edit form initialization */
244+
/**
245+
* Get python code for edit form initialization.
246+
* Make sure that you also set the appropriate function name in
247+
* @link setInitFunction @endlink
248+
*/
242249
void setInitCode( const QString& code );
243250

244251
/** Return if python code shall be loaded for edit form initialization */
@@ -247,6 +254,8 @@ class QgsEditFormConfig : QObject
247254
/** Set if python code shall be used for edit form initialization */
248255
void setUseInitCode( const bool useCode );
249256

257+
/** Type of feature form pop-up suppression after feature creation (overrides app setting) */
250258
FeatureFormSuppress suppress() const;
259+
/** Set type of feature form pop-up suppression after feature creation (overrides app setting) */
251260
void setSuppress( FeatureFormSuppress s );
252261
};

src/app/qgsfieldsproperties.cpp

+7-7
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,9 @@
4343
QgsFieldsProperties::QgsFieldsProperties( QgsVectorLayer *layer, QWidget* parent )
4444
: QWidget( parent )
4545
, mLayer( layer )
46-
, mDesignerTree( nullptr )
47-
, mFieldsList( nullptr )
48-
, mRelationsList( nullptr )
46+
, mDesignerTree( 0 )
47+
, mFieldsList( 0 )
48+
, mRelationsList( 0 )
4949
{
5050
if ( !layer )
5151
return;
@@ -921,12 +921,12 @@ QStringList QgsFieldsProperties::DragList::mimeTypes() const
921921
QMimeData* QgsFieldsProperties::DragList::mimeData( const QList<QTableWidgetItem*> items ) const
922922
{
923923
if ( items.count() <= 0 )
924-
return nullptr;
924+
return 0;
925925

926926
QStringList types = mimeTypes();
927927

928928
if ( types.isEmpty() )
929-
return nullptr;
929+
return 0;
930930

931931
QMimeData* data = new QMimeData();
932932
QString format = types.at( 0 );
@@ -1091,12 +1091,12 @@ QStringList QgsFieldsProperties::DesignerTree::mimeTypes() const
10911091
QMimeData* QgsFieldsProperties::DesignerTree::mimeData( const QList<QTreeWidgetItem*> items ) const
10921092
{
10931093
if ( items.count() <= 0 )
1094-
return nullptr;
1094+
return 0;
10951095

10961096
QStringList types = mimeTypes();
10971097

10981098
if ( types.isEmpty() )
1099-
return nullptr;
1099+
return 0;
11001100

11011101
QMimeData* data = new QMimeData();
11021102
QString format = types.at( 0 );

src/core/qgseditformconfig.h

+1-8
Original file line numberDiff line numberDiff line change
@@ -343,12 +343,6 @@ class CORE_EXPORT QgsEditFormConfig : public QObject
343343
void setUiForm( const QString& ui );
344344

345345

346-
347-
348-
349-
350-
351-
352346
// Widget stuff
353347

354348
/**
@@ -505,7 +499,6 @@ class CORE_EXPORT QgsEditFormConfig : public QObject
505499
*/
506500
void setInitCode( const QString& code ) { mEditFormInitCode = code; }
507501

508-
509502
/** Return if python code shall be loaded for edit form initialization */
510503
bool useInitCode() const { return mUseInitCode; }
511504

@@ -526,7 +519,7 @@ class CORE_EXPORT QgsEditFormConfig : public QObject
526519
/**
527520
* Create a new edit form config. Normally invoked by QgsVectorLayer
528521
*/
529-
explicit QgsEditFormConfig( QObject* parent = nullptr );
522+
explicit QgsEditFormConfig( QObject* parent = 0 );
530523

531524
private:
532525

0 commit comments

Comments
 (0)