Skip to content
Permalink
Browse files

fix build errors on windows

git-svn-id: http://svn.osgeo.org/qgis/trunk@12124 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
jef
jef committed Nov 15, 2009
1 parent 293d95b commit 4e182fc45ee9290ca31414f8980d844f499a8231
@@ -71,7 +71,7 @@ class QgsAttributeAction
//! Reads the actions in in XML format
bool readXML( const QDomNode& layer_node );

//! interface to inherited methods from QList<QgsAction>
const QgsAction &at( int idx );
const int size();
int size() const;
QgsAction &at( int idx );
QgsAction &operator[]( int idx );
};
@@ -388,8 +388,8 @@ void QgsAttributeTableDialog::updateRowSelection( int first, int last, int click
// new selection should be created
if ( clickType == 0 ) // Single click
{
if ( mSelectedFeatures.size() == 1 and wasSelected ) // One item selected
return // Click over a selected item doesn't do anything
if ( mSelectedFeatures.size() == 1 && wasSelected ) // One item selected
return; // Click over a selected item doesn't do anything

mView->setCurrentIndex( mFilterModel->index( first, 0 ) );
mView->selectRow( first );
@@ -35,7 +35,7 @@ static const char * const ident_ = "$Id$";

void QgsAttributeAction::addAction( QgsAction::ActionType type, QString name, QString action, bool capture )
{
*this << QgsAction( type, name, action, capture );
mActions << QgsAction( type, name, action, capture );
}

void QgsAttributeAction::doAction( int index, const QList< QPair<QString, QString> > &values,
@@ -116,13 +116,13 @@ bool QgsAttributeAction::writeXML( QDomNode& layer_node, QDomDocument& doc ) con
{
QDomElement aActions = doc.createElement( "attributeactions" );

for ( int i = 0; i < size(); i++ )
for ( int i = 0; i < mActions.size(); i++ )
{
QDomElement actionSetting = doc.createElement( "actionsetting" );
actionSetting.setAttribute( "type", at( i ).type() );
actionSetting.setAttribute( "name", at( i ).name() );
actionSetting.setAttribute( "action", at( i ).action() );
actionSetting.setAttribute( "capture", at( i ).capture() );
actionSetting.setAttribute( "type", mActions[i].type() );
actionSetting.setAttribute( "name", mActions[i].name() );
actionSetting.setAttribute( "action", mActions[i].action() );
actionSetting.setAttribute( "capture", mActions[i].capture() );
aActions.appendChild( actionSetting );
}
layer_node.appendChild( aActions );
@@ -132,7 +132,7 @@ bool QgsAttributeAction::writeXML( QDomNode& layer_node, QDomDocument& doc ) con

bool QgsAttributeAction::readXML( const QDomNode& layer_node )
{
clear();
mActions.clear();

QDomNode aaNode = layer_node.namedItem( "attributeactions" );

@@ -63,7 +63,7 @@ class CORE_EXPORT QgsAction
//! Whether to capture output for display when this action is run
bool capture() const { return mCaptureOutput; }

//!
//! Wheter the action is runable on the current platform
bool runable() const
{
return mType == Generic ||
@@ -90,14 +90,14 @@ class CORE_EXPORT QgsAction
* attributes.
*/

class CORE_EXPORT QgsAttributeAction : public QList<QgsAction>
class CORE_EXPORT QgsAttributeAction
{
public:
//! Constructor
QgsAttributeAction() {};
QgsAttributeAction() {}

//! Destructor
virtual ~QgsAttributeAction() {};
virtual ~QgsAttributeAction() {}

//! Add an action with the given name and action details.
// Will happily have duplicate names and actions. If
@@ -113,7 +113,7 @@ class CORE_EXPORT QgsAttributeAction : public QList<QgsAction>
int defaultValueIndex = 0, void ( *executePython )( const QString & ) = 0 );

//! Removes all actions
void clearActions() { clear(); }
void clearActions() { mActions.clear(); }

//! Expands the given action, replacing all %'s with the value as
// given.
@@ -125,6 +125,13 @@ class CORE_EXPORT QgsAttributeAction : public QList<QgsAction>

//! Reads the actions in in XML format
bool readXML( const QDomNode& layer_node );

int size() const { return mActions.size(); }
QgsAction &at( int idx ) { return mActions[idx]; }
QgsAction &operator[]( int idx ) { return mActions[idx]; }

private:
QList<QgsAction> mActions;
};

#endif

0 comments on commit 4e182fc

Please sign in to comment.