Skip to content

Commit

Permalink
Revert "vector data provider start/stop editing methods"
Browse files Browse the repository at this point in the history
This reverts commit 60b4da4.
  • Loading branch information
blazek committed Apr 29, 2013
1 parent 229419e commit a9a58fa
Showing 1 changed file with 0 additions and 43 deletions.
43 changes: 0 additions & 43 deletions src/core/qgsvectordataprovider.h
Original file line number Diff line number Diff line change
Expand Up @@ -175,43 +175,6 @@ class CORE_EXPORT QgsVectorDataProvider : public QgsDataProvider
@note: added in version 1.2*/
virtual void enumValues( int index, QStringList& enumList ) { Q_UNUSED( index ); enumList.clear(); }

/**
* Start editing transaction. This method must be called before edit methods.
* File based providers usually reopen files in update mode.
* Database based providers usually start new transaction.
* It is not possible to start more editing transactions, if a transaction
* was already started, this method fails and returns false.
* @return true in case of success and false in case of failure
*/
virtual bool startEditing() { return false; }

/**
* Stop editing transaction and discard the edits.
* Roll back is not supported by all providers. For example file based
* providers are usually writing changes immediately to files and in that case
* there is no way to do roll back on provider level. If roll back is required,
* QgsVectorLayer may be used, which keeps all changes in buffer until commitChanges()
* and fully supports rool back. If a provider does not support roll back,
* editing is canceled but false is returned.
* @return true in case of success and false in case of failure
*/
virtual bool rollBack() { return false; }

/**
* Commit changes and stop editing transaction.
* File based providers usually reopen files in read only mode.
* Database based providers usually commit transaction.
* @return true in case of success and false in case of failure
*/
virtual bool commitChanges() { return false; }

/**
* Returns editing status. True after successfull startEditing()
* before rollBack() or commitChanges().
* @return true if editing transaction is opened
*/
virtual bool isEdited() { return false; }

/**
* Adds a list of features
* @return true in case of success and false in case of failure
Expand Down Expand Up @@ -365,12 +328,6 @@ class CORE_EXPORT QgsVectorDataProvider : public QgsDataProvider
*/
QStringList errors();

signals:
/** Is emitted, when editing has started */
void editingStarted();

/** Is emitted, when editing stopped */
void editingStopped();

protected:
QVariant convertValue( QVariant::Type type, QString value );
Expand Down

0 comments on commit a9a58fa

Please sign in to comment.