14 changes: 14 additions & 0 deletions python/core/raster/qgsrasterinterface.sip
Original file line number Diff line number Diff line change
Expand Up @@ -192,5 +192,19 @@ class QgsRasterInterface
const QgsRectangle & theExtent = QgsRectangle(),
int theSampleSize = 0 );

/** Switch on (and clear old statistics) or off collection of statistics */
//void setStatsOn( bool on );

/** Last total time (for allbands) consumed by this interface for call to block()
* If cumulative is true, the result includes also time spent in all preceding
* interfaces. If cumulative is false, only time consumed by this interface is
* returned. */
//double time( bool cumulative = false );

/** Write base class members to xml. */
virtual void writeXML( QDomDocument& doc, QDomElement& parentElem ) const;
/** Sets base class members from xml. Usually called from create() methods of subclasses */
virtual void readXML( const QDomElement& filterElem );

};

4 changes: 2 additions & 2 deletions src/app/qgsattributedialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ QgsAttributeDialog::QgsAttributeDialog( QgsVectorLayer *vl, QgsFeature *thepFeat

if ( vl->editType( fldIdx ) != QgsVectorLayer::Immutable )
{
myWidget->setEnabled( vl->isEditable() && vl->fieldEditable(fldIdx) );
myWidget->setEnabled( vl->isEditable() && vl->fieldEditable( fldIdx ) );
}

mypInnerLayout->addWidget( myWidget, index, 1 );
Expand Down Expand Up @@ -239,7 +239,7 @@ QgsAttributeDialog::QgsAttributeDialog( QgsVectorLayer *vl, QgsFeature *thepFeat

if ( vl->editType( fldIdx ) != QgsVectorLayer::Immutable )
{
( *itw )->setEnabled( (*itw)->isEnabled() && vl->isEditable() && vl->fieldEditable( fldIdx ) );
( *itw )->setEnabled(( *itw )->isEnabled() && vl->isEditable() && vl->fieldEditable( fldIdx ) );
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/core/raster/qgsrasterinterface.h
Original file line number Diff line number Diff line change
Expand Up @@ -261,9 +261,9 @@ class CORE_EXPORT QgsRasterInterface
//double time( bool cumulative = false );

/** Write base class members to xml. */
virtual void writeXML( QDomDocument& doc, QDomElement& parentElem ) { Q_UNUSED( doc ); Q_UNUSED( parentElem ); };
virtual void writeXML( QDomDocument& doc, QDomElement& parentElem ) const { Q_UNUSED( doc ); Q_UNUSED( parentElem ); }
/** Sets base class members from xml. Usually called from create() methods of subclasses */
virtual void readXML( const QDomElement& filterElem ) { Q_UNUSED( filterElem ); };
virtual void readXML( const QDomElement& filterElem ) { Q_UNUSED( filterElem ); }

protected:
// QgsRasterInterface used as input
Expand Down
2 changes: 1 addition & 1 deletion src/gui/qgsattributeeditor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1195,6 +1195,6 @@ void QgsStringRelay::changeText( QString str )
connect( this, SIGNAL( textChanged( QString ) ), sObj, sSlot );
for ( int i = 0; i < mProxyList.size(); ++i )
{
( mProxyList[i] )->blockSignals( oldBlockSigs[i] );
mProxyList[i]->blockSignals( oldBlockSigs[i] );
}
}
9 changes: 9 additions & 0 deletions src/gui/qgsfilterlineedit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,15 @@ void QgsFilterLineEdit::clear()
setModified( true );
}

void QgsFilterLineEdit::changeEvent( QEvent *e )
{
QLineEdit::changeEvent( e );
if ( !isEnabled() )
btnClear->setVisible( false );
else
btnClear->setVisible( text() != mNullValue );
}

void QgsFilterLineEdit::toggleClearButton( const QString &text )
{
btnClear->setVisible( !isReadOnly() && text != mNullValue );
Expand Down
1 change: 1 addition & 0 deletions src/gui/qgsfilterlineedit.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ class GUI_EXPORT QgsFilterLineEdit : public QLineEdit

protected:
void resizeEvent( QResizeEvent * );
void changeEvent( QEvent * );

private slots:
void clear();
Expand Down
2 changes: 1 addition & 1 deletion src/providers/oracle/qgsoracleconn.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ bool QgsOracleConn::tableInfo( bool geometryColumnsOnly, bool userTablesOnly, bo
.arg( prefix )
.arg( geometryColumnsOnly ? "sdo_geom_metadata" : "tab_columns" )
.arg( userTablesOnly ? "" : " AND c.owner=t.owner" )
.arg( geometryColumnsOnly ? "" : " WHERE c.data_type='SDO_GEOMETRY' AND c.data_type_owner='MDSYS'" );
.arg( geometryColumnsOnly ? "" : " WHERE c.data_type='SDO_GEOMETRY'" );

if ( allowGeometrylessTables )
{
Expand Down
11 changes: 9 additions & 2 deletions src/providers/oracle/qgsoracleprovider.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1996,21 +1996,28 @@ QgsRectangle QgsOracleProvider::extent()
QString sql;
QSqlQuery qry( *mConnection );

bool ok = false;

if ( !mSpatialIndex.isNull() && ( mUseEstimatedMetadata || mSqlWhereClause.isEmpty() ) )
{
sql = QString( "SELECT SDO_TUNE.EXTENT_OF(%1,%2) FROM dual" )
.arg( quotedValue( QString( "%1.%2" ).arg( mOwnerName ).arg( mTableName ) ) )
.arg( quotedValue( mGeometryColumn ) );

ok = exec( qry, sql );
}
else

if ( !ok )
{
sql = QString( "SELECT SDO_AGGR_MBR(%1) FROM %2" ).arg( quotedIdentifier( mGeometryColumn ) ).arg( mQuery );

if ( !mSqlWhereClause.isEmpty() )
sql += QString( " WHERE %1" ).arg( mSqlWhereClause );

ok = exec( qry, sql );
}

if ( exec( qry, sql ) && qry.next() )
if ( ok && qry.next() )
{
QByteArray *ba = static_cast<QByteArray*>( qry.value( 0 ).data() );
unsigned char *copy = new unsigned char[ba->size()];
Expand Down