Showing with 18 additions and 19 deletions.
  1. +7 −12 src/core/qgsvectorlayereditbuffer.cpp
  2. +5 −0 src/gui/qgsmessageviewer.cpp
  3. +2 −6 src/providers/oracle/qgsoracleprovider.cpp
  4. +4 −1 src/providers/postgres/qgspostgresprovider.cpp
19 changes: 7 additions & 12 deletions src/core/qgsvectorlayereditbuffer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -462,27 +462,22 @@ void QgsVectorLayerEditBuffer::rollBack()
Q_ASSERT( mAddedFeatures.isEmpty() );
}





/*QString QgsVectorLayerEditBuffer::dumpEditBuffer()
#if 0
QString QgsVectorLayerEditBuffer::dumpEditBuffer()
{
QString msg;
if (!mChangedGeometries.isEmpty())
if ( !mChangedGeometries.isEmpty() )
{
msg += "CHANGED GEOMETRIES:\n";
for (QgsGeometryMap::const_iterator it = mChangedGeometries.begin(); it != mChangedGeometries.end(); ++it)
for ( QgsGeometryMap::const_iterator it = mChangedGeometries.begin(); it != mChangedGeometries.end(); ++it )
{
// QgsFeatureId, QgsGeometry
msg += QString("- FID %1: %2").arg(it.key()).arg(it.value().to)
msg += QString( "- FID %1: %2" ).arg( it.key() ).arg( it.value().to );
}
}
return msg;
}*/



}
#endif

void QgsVectorLayerEditBuffer::handleAttributeAdded( int index )
{
Expand Down
5 changes: 5 additions & 0 deletions src/gui/qgsmessageviewer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,15 @@ QgsMessageViewer::QgsMessageViewer( QWidget *parent, Qt::WFlags fl, bool deleteO
setCheckBoxState( Qt::Unchecked );

mCheckBoxQSettingsLabel = "";

QSettings settings;
restoreGeometry( settings.value( "/Windows/MessageViewer/geometry" ).toByteArray() );
}

QgsMessageViewer::~QgsMessageViewer()
{
QSettings settings;
settings.setValue( "/Windows/MessageViewer/geometry", saveGeometry() );
}

void QgsMessageViewer::setMessageAsHtml( const QString &msg )
Expand Down
8 changes: 2 additions & 6 deletions src/providers/oracle/qgsoracleprovider.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1509,11 +1509,6 @@ bool QgsOracleProvider::addAttributes( const QList<QgsField> &attributes )
return returnvalue;
}

static int moreThan( int a, int b )
{
return a > b;
}

bool QgsOracleProvider::deleteAttributes( const QgsAttributeIds& ids )
{
bool returnvalue = true;
Expand All @@ -1535,7 +1530,8 @@ bool QgsOracleProvider::deleteAttributes( const QgsAttributeIds& ids )
qry.finish();

QList<int> idsList = ids.values();
qSort( idsList.begin(), idsList.end(), moreThan );
qSort( idsList.begin(), idsList.end(), qGreater<int>() );

foreach ( int id, idsList )
{
const QgsField &fld = mAttributeFields.at( id );
Expand Down
5 changes: 4 additions & 1 deletion src/providers/postgres/qgspostgresprovider.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1926,7 +1926,10 @@ bool QgsPostgresProvider::deleteAttributes( const QgsAttributeIds& ids )
{
mConnectionRW->PQexecNR( "BEGIN" );

for ( QgsAttributeIds::const_iterator iter = ids.begin(); iter != ids.end(); ++iter )
QList<int> idsList = ids.values();
qSort( idsList.begin(), idsList.end(), qGreater<int>() );

for ( QList<int>::const_iterator iter = idsList.begin(); iter != idsList.end(); ++iter )
{
int index = *iter;
if ( index < 0 || index >= mAttributeFields.count() )
Expand Down