mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-16 00:03:12 -04:00
indentation update [ci skip]
This commit is contained in:
parent
4d4fa44605
commit
e48a6f642f
@ -307,13 +307,13 @@ void QgsAttributeTableDialog::updateFieldFromExpression()
|
|||||||
|
|
||||||
bool filtered = mMainView->filterMode() != QgsAttributeTableFilterModel::ShowAll;
|
bool filtered = mMainView->filterMode() != QgsAttributeTableFilterModel::ShowAll;
|
||||||
QgsFeatureIds filteredIds = filtered ? mMainView->filteredFeatures() : QgsFeatureIds();
|
QgsFeatureIds filteredIds = filtered ? mMainView->filteredFeatures() : QgsFeatureIds();
|
||||||
this->runFieldCalculation(mLayer, mFieldCombo->currentText(), mUpdateExpressionText->currentField(), filteredIds);
|
this->runFieldCalculation( mLayer, mFieldCombo->currentText(), mUpdateExpressionText->currentField(), filteredIds );
|
||||||
}
|
}
|
||||||
|
|
||||||
void QgsAttributeTableDialog::updateFieldFromExpressionSelected()
|
void QgsAttributeTableDialog::updateFieldFromExpressionSelected()
|
||||||
{
|
{
|
||||||
QgsFeatureIds filteredIds = mLayer->selectedFeaturesIds();
|
QgsFeatureIds filteredIds = mLayer->selectedFeaturesIds();
|
||||||
this->runFieldCalculation(mLayer, mFieldCombo->currentText(), mUpdateExpressionText->currentField(), filteredIds);
|
this->runFieldCalculation( mLayer, mFieldCombo->currentText(), mUpdateExpressionText->currentField(), filteredIds );
|
||||||
}
|
}
|
||||||
|
|
||||||
void QgsAttributeTableDialog::runFieldCalculation( QgsVectorLayer* layer, QString fieldName, QString expression, QgsFeatureIds filteredIds )
|
void QgsAttributeTableDialog::runFieldCalculation( QgsVectorLayer* layer, QString fieldName, QString expression, QgsFeatureIds filteredIds )
|
||||||
|
@ -185,7 +185,7 @@ class APP_EXPORT QgsAttributeTableDialog : public QDialog, private Ui::QgsAttrib
|
|||||||
*/
|
*/
|
||||||
void columnBoxInit();
|
void columnBoxInit();
|
||||||
|
|
||||||
void runFieldCalculation( QgsVectorLayer* layer, QString fieldName, QString expression, QgsFeatureIds filteredIds = QgsFeatureIds());
|
void runFieldCalculation( QgsVectorLayer* layer, QString fieldName, QString expression, QgsFeatureIds filteredIds = QgsFeatureIds() );
|
||||||
void updateFieldFromExpression();
|
void updateFieldFromExpression();
|
||||||
void updateFieldFromExpressionSelected();
|
void updateFieldFromExpressionSelected();
|
||||||
|
|
||||||
|
@ -67,7 +67,7 @@ class QgsGuiVectorLayerTools : public QgsVectorLayerTools, public QObject
|
|||||||
* @param layer The layer to commit
|
* @param layer The layer to commit
|
||||||
* @return True if successful
|
* @return True if successful
|
||||||
*/
|
*/
|
||||||
bool saveEdits( QgsVectorLayer* layer) const;
|
bool saveEdits( QgsVectorLayer* layer ) const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void commitError( QgsVectorLayer* vlayer ) const;
|
void commitError( QgsVectorLayer* vlayer ) const;
|
||||||
|
@ -296,7 +296,7 @@ class CORE_EXPORT QGis
|
|||||||
// It's assumed that this works on all systems supporting
|
// It's assumed that this works on all systems supporting
|
||||||
// QLibrary
|
// QLibrary
|
||||||
#if QT_VERSION >= 0x050000
|
#if QT_VERSION >= 0x050000
|
||||||
#define cast_to_fptr(f) f
|
#define cast_to_fptr(f) f
|
||||||
#else
|
#else
|
||||||
inline void ( *cast_to_fptr( void *p ) )()
|
inline void ( *cast_to_fptr( void *p ) )()
|
||||||
{
|
{
|
||||||
|
@ -51,7 +51,7 @@ bool QgsMultiRenderChecker::runTest( const QString& theTestName, unsigned int th
|
|||||||
|
|
||||||
QVector<QgsDartMeasurement> dartMeasurements;
|
QVector<QgsDartMeasurement> dartMeasurements;
|
||||||
|
|
||||||
Q_FOREACH( const QString& suffix, subDirs )
|
Q_FOREACH ( const QString& suffix, subDirs )
|
||||||
{
|
{
|
||||||
qDebug() << "Checking subdir " << suffix;
|
qDebug() << "Checking subdir " << suffix;
|
||||||
bool result;
|
bool result;
|
||||||
@ -83,7 +83,7 @@ bool QgsMultiRenderChecker::runTest( const QString& theTestName, unsigned int th
|
|||||||
|
|
||||||
if ( !successful )
|
if ( !successful )
|
||||||
{
|
{
|
||||||
Q_FOREACH( const QgsDartMeasurement& measurement, dartMeasurements )
|
Q_FOREACH ( const QgsDartMeasurement& measurement, dartMeasurements )
|
||||||
measurement.send();
|
measurement.send();
|
||||||
|
|
||||||
QgsDartMeasurement msg( "Image not accepted by test", QgsDartMeasurement::Text, "This may be caused because the test is supposed to fail or rendering inconsistencies."
|
QgsDartMeasurement msg( "Image not accepted by test", QgsDartMeasurement::Text, "This may be caused because the test is supposed to fail or rendering inconsistencies."
|
||||||
|
@ -121,7 +121,7 @@ void QgsDualView::columnBoxInit()
|
|||||||
// ... If there are primary key(s) defined
|
// ... If there are primary key(s) defined
|
||||||
QStringList pkFields;
|
QStringList pkFields;
|
||||||
|
|
||||||
Q_FOREACH( int attr, pkAttrs )
|
Q_FOREACH ( int attr, pkAttrs )
|
||||||
{
|
{
|
||||||
pkFields.append( "COALESCE(\"" + fields[attr].name() + "\", '<NULL>')" );
|
pkFields.append( "COALESCE(\"" + fields[attr].name() + "\", '<NULL>')" );
|
||||||
}
|
}
|
||||||
@ -152,7 +152,7 @@ void QgsDualView::columnBoxInit()
|
|||||||
mFeatureListPreviewButton->addAction( mActionExpressionPreview );
|
mFeatureListPreviewButton->addAction( mActionExpressionPreview );
|
||||||
mFeatureListPreviewButton->addAction( mActionPreviewColumnsMenu );
|
mFeatureListPreviewButton->addAction( mActionPreviewColumnsMenu );
|
||||||
|
|
||||||
Q_FOREACH( const QgsField& field, fields )
|
Q_FOREACH ( const QgsField& field, fields )
|
||||||
{
|
{
|
||||||
if ( mLayerCache->layer()->editorWidgetV2( mLayerCache->layer()->fieldNameIndex( field.name() ) ) != "Hidden" )
|
if ( mLayerCache->layer()->editorWidgetV2( mLayerCache->layer()->fieldNameIndex( field.name() ) ) != "Hidden" )
|
||||||
{
|
{
|
||||||
|
@ -115,9 +115,9 @@ QgsExpressionBuilderWidget::QgsExpressionBuilderWidget( QWidget *parent )
|
|||||||
txtExpressionString->setFoldingVisible( false );
|
txtExpressionString->setFoldingVisible( false );
|
||||||
customFunctionBotton->setVisible( QgsPythonRunner::isValid() );
|
customFunctionBotton->setVisible( QgsPythonRunner::isValid() );
|
||||||
txtPython->setVisible( false );
|
txtPython->setVisible( false );
|
||||||
txtPython->setText("@qgsfunction(args=-1, group='Custom')\n"
|
txtPython->setText( "@qgsfunction(args=-1, group='Custom')\n"
|
||||||
"def func(values, feature, parent):\n"
|
"def func(values, feature, parent):\n"
|
||||||
" return str(values)");
|
" return str(values)" );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -298,7 +298,8 @@ void QgsExpressionBuilderWidget::setGeomCalculator( const QgsDistanceArea & da )
|
|||||||
|
|
||||||
QString QgsExpressionBuilderWidget::expressionText()
|
QString QgsExpressionBuilderWidget::expressionText()
|
||||||
{
|
{
|
||||||
if ( QgsPythonRunner::isValid() ) {
|
if ( QgsPythonRunner::isValid() )
|
||||||
|
{
|
||||||
QString pythontext = txtPython->text();
|
QString pythontext = txtPython->text();
|
||||||
QgsPythonRunner::run( pythontext );
|
QgsPythonRunner::run( pythontext );
|
||||||
}
|
}
|
||||||
|
@ -267,7 +267,7 @@ void QgsRelationEditorWidget::toggleEditing( bool state )
|
|||||||
|
|
||||||
void QgsRelationEditorWidget::saveEdits()
|
void QgsRelationEditorWidget::saveEdits()
|
||||||
{
|
{
|
||||||
mEditorContext.vectorLayerTools()->saveEdits(mRelation.referencingLayer() );
|
mEditorContext.vectorLayerTools()->saveEdits( mRelation.referencingLayer() );
|
||||||
}
|
}
|
||||||
|
|
||||||
void QgsRelationEditorWidget::onCollapsedStateChanged( bool collapsed )
|
void QgsRelationEditorWidget::onCollapsedStateChanged( bool collapsed )
|
||||||
|
@ -48,7 +48,7 @@ QgsBrushStyleComboBox::QgsBrushStyleComboBox( QWidget* parent )
|
|||||||
{
|
{
|
||||||
Qt::BrushStyle style = styles.at( i ).first;
|
Qt::BrushStyle style = styles.at( i ).first;
|
||||||
QString name = styles.at( i ).second;
|
QString name = styles.at( i ).second;
|
||||||
addItem( iconForBrush( style ), name, QVariant( (int)style ) );
|
addItem( iconForBrush( style ), name, QVariant(( int )style ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
setCurrentIndex( 1 );
|
setCurrentIndex( 1 );
|
||||||
@ -63,7 +63,7 @@ Qt::BrushStyle QgsBrushStyleComboBox::brushStyle() const
|
|||||||
|
|
||||||
void QgsBrushStyleComboBox::setBrushStyle( Qt::BrushStyle style )
|
void QgsBrushStyleComboBox::setBrushStyle( Qt::BrushStyle style )
|
||||||
{
|
{
|
||||||
int idx = findData( QVariant( (int)style ) );
|
int idx = findData( QVariant(( int )style ) );
|
||||||
setCurrentIndex( idx == -1 ? 0 : idx );
|
setCurrentIndex( idx == -1 ? 0 : idx );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -40,7 +40,7 @@ QgsPenStyleComboBox::QgsPenStyleComboBox( QWidget* parent )
|
|||||||
{
|
{
|
||||||
Qt::PenStyle style = styles.at( i ).first;
|
Qt::PenStyle style = styles.at( i ).first;
|
||||||
QString name = styles.at( i ).second;
|
QString name = styles.at( i ).second;
|
||||||
addItem( iconForPen( style ), name, QVariant( (int) style ) );
|
addItem( iconForPen( style ), name, QVariant(( int ) style ) );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -51,7 +51,7 @@ Qt::PenStyle QgsPenStyleComboBox::penStyle() const
|
|||||||
|
|
||||||
void QgsPenStyleComboBox::setPenStyle( Qt::PenStyle style )
|
void QgsPenStyleComboBox::setPenStyle( Qt::PenStyle style )
|
||||||
{
|
{
|
||||||
int idx = findData( QVariant( (int) style ) );
|
int idx = findData( QVariant(( int ) style ) );
|
||||||
setCurrentIndex( idx == -1 ? 0 : idx );
|
setCurrentIndex( idx == -1 ? 0 : idx );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user