mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-17 00:04:02 -04:00
fix builds with older compilers
This commit is contained in:
parent
90053c52d6
commit
22f0f25364
@ -57,7 +57,6 @@ class QgsEditFormConfig : QObject
|
|||||||
SuppressOff = 2 //!< Do not suppress feature form
|
SuppressOff = 2 //!< Do not suppress feature form
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This is only useful in combination with EditorLayout::TabLayout.
|
* This is only useful in combination with EditorLayout::TabLayout.
|
||||||
*
|
*
|
||||||
@ -93,12 +92,6 @@ class QgsEditFormConfig : QObject
|
|||||||
void setUiForm( const QString& ui );
|
void setUiForm( const QString& ui );
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Widget stuff
|
// Widget stuff
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -126,7 +119,7 @@ class QgsEditFormConfig : QObject
|
|||||||
* <li>WebView (QgsWebViewWidgetWrapper)</li>
|
* <li>WebView (QgsWebViewWidgetWrapper)</li>
|
||||||
* </ul>
|
* </ul>
|
||||||
*
|
*
|
||||||
* @param attrIdx Index of the field
|
* @param fieldIdx Index of the field
|
||||||
* @param widgetType Type id of the editor widget to use
|
* @param widgetType Type id of the editor widget to use
|
||||||
*/
|
*/
|
||||||
void setWidgetType( int fieldIdx, const QString& widgetType );
|
void setWidgetType( int fieldIdx, const QString& widgetType );
|
||||||
@ -189,15 +182,13 @@ class QgsEditFormConfig : QObject
|
|||||||
QgsEditorWidgetConfig widgetConfig( const QString& fieldName ) const;
|
QgsEditorWidgetConfig widgetConfig( const QString& fieldName ) const;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* If this returns true, the field is manually set to read only.
|
* This returns true if the field is manually set to read only or if the field
|
||||||
|
* does not support editing like joins or vitual fields.
|
||||||
*/
|
*/
|
||||||
bool readOnly( int idx );
|
bool readOnly( int idx );
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* If set to false, the widget at the given index will be read-only, regardless of the
|
* If set to false, the widget at the given index will be read-only.
|
||||||
* layer's editable state and data provider capacities.
|
|
||||||
* If it is set to true, the widget's editable state will be synchronized with the layer's
|
|
||||||
* edit state.
|
|
||||||
*/
|
*/
|
||||||
void setReadOnly(int idx, bool readOnly );
|
void setReadOnly(int idx, bool readOnly );
|
||||||
|
|
||||||
@ -229,16 +220,32 @@ class QgsEditFormConfig : QObject
|
|||||||
// Python stuff
|
// Python stuff
|
||||||
|
|
||||||
|
|
||||||
/** Get python function for edit form initialization */
|
/**
|
||||||
|
* Get python function for edit form initialization.
|
||||||
|
* Will be looked up in a python file relative to the project folder if it
|
||||||
|
* includes a module name or if it's a pure function name it will searched
|
||||||
|
* in the python code set with @link setInitCode @endlink.
|
||||||
|
*/
|
||||||
QString initFunction() const;
|
QString initFunction() const;
|
||||||
|
|
||||||
/** Set python function for edit form initialization */
|
/**
|
||||||
|
* Set python function for edit form initialization.
|
||||||
|
* Will be looked up in a python file relative to the project folder if it
|
||||||
|
* includes a module name or if it's a pure function name it will searched
|
||||||
|
* in the python code set with @link setInitCode @endlink.
|
||||||
|
*/
|
||||||
void setInitFunction( const QString& function );
|
void setInitFunction( const QString& function );
|
||||||
|
|
||||||
/** Get python code for edit form initialization */
|
/**
|
||||||
|
* Get python code for edit form initialization.
|
||||||
|
*/
|
||||||
QString initCode() const;
|
QString initCode() const;
|
||||||
|
|
||||||
/** Set python code for edit form initialization */
|
/**
|
||||||
|
* Get python code for edit form initialization.
|
||||||
|
* Make sure that you also set the appropriate function name in
|
||||||
|
* @link setInitFunction @endlink
|
||||||
|
*/
|
||||||
void setInitCode( const QString& code );
|
void setInitCode( const QString& code );
|
||||||
|
|
||||||
/** Return if python code shall be loaded for edit form initialization */
|
/** Return if python code shall be loaded for edit form initialization */
|
||||||
@ -247,6 +254,8 @@ class QgsEditFormConfig : QObject
|
|||||||
/** Set if python code shall be used for edit form initialization */
|
/** Set if python code shall be used for edit form initialization */
|
||||||
void setUseInitCode( const bool useCode );
|
void setUseInitCode( const bool useCode );
|
||||||
|
|
||||||
|
/** Type of feature form pop-up suppression after feature creation (overrides app setting) */
|
||||||
FeatureFormSuppress suppress() const;
|
FeatureFormSuppress suppress() const;
|
||||||
|
/** Set type of feature form pop-up suppression after feature creation (overrides app setting) */
|
||||||
void setSuppress( FeatureFormSuppress s );
|
void setSuppress( FeatureFormSuppress s );
|
||||||
};
|
};
|
||||||
|
@ -43,9 +43,9 @@
|
|||||||
QgsFieldsProperties::QgsFieldsProperties( QgsVectorLayer *layer, QWidget* parent )
|
QgsFieldsProperties::QgsFieldsProperties( QgsVectorLayer *layer, QWidget* parent )
|
||||||
: QWidget( parent )
|
: QWidget( parent )
|
||||||
, mLayer( layer )
|
, mLayer( layer )
|
||||||
, mDesignerTree( nullptr )
|
, mDesignerTree( 0 )
|
||||||
, mFieldsList( nullptr )
|
, mFieldsList( 0 )
|
||||||
, mRelationsList( nullptr )
|
, mRelationsList( 0 )
|
||||||
{
|
{
|
||||||
if ( !layer )
|
if ( !layer )
|
||||||
return;
|
return;
|
||||||
@ -921,12 +921,12 @@ QStringList QgsFieldsProperties::DragList::mimeTypes() const
|
|||||||
QMimeData* QgsFieldsProperties::DragList::mimeData( const QList<QTableWidgetItem*> items ) const
|
QMimeData* QgsFieldsProperties::DragList::mimeData( const QList<QTableWidgetItem*> items ) const
|
||||||
{
|
{
|
||||||
if ( items.count() <= 0 )
|
if ( items.count() <= 0 )
|
||||||
return nullptr;
|
return 0;
|
||||||
|
|
||||||
QStringList types = mimeTypes();
|
QStringList types = mimeTypes();
|
||||||
|
|
||||||
if ( types.isEmpty() )
|
if ( types.isEmpty() )
|
||||||
return nullptr;
|
return 0;
|
||||||
|
|
||||||
QMimeData* data = new QMimeData();
|
QMimeData* data = new QMimeData();
|
||||||
QString format = types.at( 0 );
|
QString format = types.at( 0 );
|
||||||
@ -1091,12 +1091,12 @@ QStringList QgsFieldsProperties::DesignerTree::mimeTypes() const
|
|||||||
QMimeData* QgsFieldsProperties::DesignerTree::mimeData( const QList<QTreeWidgetItem*> items ) const
|
QMimeData* QgsFieldsProperties::DesignerTree::mimeData( const QList<QTreeWidgetItem*> items ) const
|
||||||
{
|
{
|
||||||
if ( items.count() <= 0 )
|
if ( items.count() <= 0 )
|
||||||
return nullptr;
|
return 0;
|
||||||
|
|
||||||
QStringList types = mimeTypes();
|
QStringList types = mimeTypes();
|
||||||
|
|
||||||
if ( types.isEmpty() )
|
if ( types.isEmpty() )
|
||||||
return nullptr;
|
return 0;
|
||||||
|
|
||||||
QMimeData* data = new QMimeData();
|
QMimeData* data = new QMimeData();
|
||||||
QString format = types.at( 0 );
|
QString format = types.at( 0 );
|
||||||
|
@ -343,12 +343,6 @@ class CORE_EXPORT QgsEditFormConfig : public QObject
|
|||||||
void setUiForm( const QString& ui );
|
void setUiForm( const QString& ui );
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Widget stuff
|
// Widget stuff
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -505,7 +499,6 @@ class CORE_EXPORT QgsEditFormConfig : public QObject
|
|||||||
*/
|
*/
|
||||||
void setInitCode( const QString& code ) { mEditFormInitCode = code; }
|
void setInitCode( const QString& code ) { mEditFormInitCode = code; }
|
||||||
|
|
||||||
|
|
||||||
/** Return if python code shall be loaded for edit form initialization */
|
/** Return if python code shall be loaded for edit form initialization */
|
||||||
bool useInitCode() const { return mUseInitCode; }
|
bool useInitCode() const { return mUseInitCode; }
|
||||||
|
|
||||||
@ -526,7 +519,7 @@ class CORE_EXPORT QgsEditFormConfig : public QObject
|
|||||||
/**
|
/**
|
||||||
* Create a new edit form config. Normally invoked by QgsVectorLayer
|
* Create a new edit form config. Normally invoked by QgsVectorLayer
|
||||||
*/
|
*/
|
||||||
explicit QgsEditFormConfig( QObject* parent = nullptr );
|
explicit QgsEditFormConfig( QObject* parent = 0 );
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user