Skip to content

Commit c2a2f33

Browse files
committedMar 2, 2018
Rename postpone option in lazy
1 parent fea66f9 commit c2a2f33

File tree

5 files changed

+17
-17
lines changed

5 files changed

+17
-17
lines changed
 

‎python/core/qgsvirtuallayerdefinition.sip.in

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -150,19 +150,19 @@ Get the name of the field with unique identifiers
150150
Set the name of the field with unique identifiers
151151
%End
152152

153-
void setPostpone( bool postpone );
153+
void setLazy( bool lazy );
154154
%Docstring
155-
Sets the postpone mode. If ``postpone`` is true, then the loading is
155+
Sets the lazy mode. If ``lazy`` is true, then the loading is
156156
delayed until an explicit reloading of the layer.
157157

158-
:param postpone: True to delay the loading, false otherwise
158+
:param lazy: True to delay the loading, false otherwise
159159

160160
.. versionadded:: 3.2
161161
%End
162162

163-
bool postpone() const;
163+
bool isLazy() const;
164164
%Docstring
165-
Returns the postpone mode.
165+
Returns the lazy mode.
166166

167167
:return: True if the loading is delayed, false otherwise.
168168

‎src/core/qgsvirtuallayerdefinition.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -157,9 +157,9 @@ QgsVirtualLayerDefinition QgsVirtualLayerDefinition::fromUrl( const QUrl &url )
157157
}
158158
}
159159
}
160-
else if ( key == QLatin1String( "postpone" ) )
160+
else if ( key == QLatin1String( "lazy" ) )
161161
{
162-
def.setPostpone( true );
162+
def.setLazy( true );
163163
}
164164
}
165165
def.setFields( fields );
@@ -213,9 +213,9 @@ QUrl QgsVirtualLayerDefinition::toUrl() const
213213
url.addQueryItem( QStringLiteral( "field" ), f.name() + ":text" );
214214
}
215215

216-
if ( postpone() )
216+
if ( isLazy() )
217217
{
218-
url.addQueryItem( QStringLiteral( "postpone" ), QLatin1String( "" ) );
218+
url.addQueryItem( QStringLiteral( "lazy" ), QLatin1String( "" ) );
219219
}
220220

221221
return url;

‎src/core/qgsvirtuallayerdefinition.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -132,19 +132,19 @@ class CORE_EXPORT QgsVirtualLayerDefinition
132132
void setUid( const QString &uid ) { mUid = uid; }
133133

134134
/**
135-
* Sets the postpone mode. If \a postpone is true, then the loading is
135+
* Sets the lazy mode. If \a lazy is true, then the loading is
136136
* delayed until an explicit reloading of the layer.
137-
* \param postpone True to delay the loading, false otherwise
137+
* \param lazy True to delay the loading, false otherwise
138138
* \since QGIS 3.2
139139
*/
140-
void setPostpone( bool postpone ) { mPostpone = postpone; }
140+
void setLazy( bool lazy ) { mLazy = lazy; }
141141

142142
/**
143-
* Returns the postpone mode.
143+
* Returns the lazy mode.
144144
* \returns True if the loading is delayed, false otherwise.
145145
* \since QGIS 3.2
146146
*/
147-
bool postpone() const { return mPostpone; }
147+
bool isLazy() const { return mLazy; }
148148

149149
//! Get the name of the geometry field. Empty if no geometry field
150150
QString geometryField() const { return mGeometryField; }
@@ -189,7 +189,7 @@ class CORE_EXPORT QgsVirtualLayerDefinition
189189
QString mGeometryField;
190190
QString mFilePath;
191191
QgsFields mFields;
192-
bool mPostpone = false;
192+
bool mLazy = false;
193193
QgsWkbTypes::Type mGeometryWkbType = QgsWkbTypes::Unknown;
194194
long mGeometrySrid = 0;
195195
};

‎src/core/qgsvirtuallayertask.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ QgsVirtualLayerTask::QgsVirtualLayerTask( const QgsVirtualLayerDefinition &defin
2222
: QgsTask()
2323
, mDefinition( definition )
2424
{
25-
mDefinition.setPostpone( true );
25+
mDefinition.setLazy( true );
2626
mLayer = qgis::make_unique<QgsVectorLayer>( mDefinition.toString(), "layer", "virtual" );
2727
}
2828

‎src/providers/virtual/qgsvirtuallayerprovider.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ QgsVirtualLayerProvider::QgsVirtualLayerProvider( QString const &uri )
7676
{
7777
mDefinition = QgsVirtualLayerDefinition::fromUrl( url );
7878

79-
if ( !mDefinition.postpone() )
79+
if ( !mDefinition.isLazy() )
8080
{
8181
reloadData();
8282
}

0 commit comments

Comments
 (0)
Please sign in to comment.