Skip to content
Permalink
Browse files
remove duplicate includes
git grep -l "#include" src/ | while read f; do grep "#include" $f | sort | uniq -d |sed -e "s@^@$f:@"; done
  • Loading branch information
jef-n committed Apr 7, 2015
1 parent fcaf560 commit 5e7c043f9f0c44ae35e04348b94f64bf5667ebe9
@@ -21,7 +21,6 @@
#include "Line3D.h"
#include "Vector3D.h"
#include <qpainter.h>
#include "Line3D.h"
#include <TriangleInterpolator.h>

/**Interface for Triangulation classes*/
@@ -22,7 +22,6 @@
#include "qgsfield.h"
#include "qgsfeature.h"
#include "qgsgeometry.h"
#include "qgsfield.h"
#include "qgsdistancearea.h"

class QgsVectorFileWriter;
@@ -23,7 +23,6 @@
#include "qgsspatialindex.h"
#include "qgsfeature.h"
#include "qgsgeometry.h"
#include "qgsfield.h"
#include "qgsdistancearea.h"

class QgsVectorFileWriter;
@@ -41,7 +41,6 @@
#include "qgsmessagebar.h"
#include "qgsexpressionselectiondialog.h"
#include "qgsfeaturelistmodel.h"
#include "qgsexpressionbuilderdialog.h"
#include "qgsrubberband.h"

class QgsAttributeTableDock : public QDockWidget
@@ -45,7 +45,6 @@
#include "qgssymbolv2selectordialog.h"
#include "qgsrelationmanagerdialog.h"
#include "qgsrelationmanager.h"
#include "qgisapp.h"
#include "qgscolorschemeregistry.h"
#include "qgssymbollayerv2utils.h"
#include "qgscolordialog.h"
@@ -64,7 +64,6 @@ void QgsComposerLegendItem::writeXMLChildren( QDomElement& elem, QDomDocument& d

////////////////QgsComposerSymbolV2Item

#include "qgssymbolv2.h"

QgsComposerSymbolV2Item::QgsComposerSymbolV2Item(): QgsComposerLegendItem( QgsComposerLegendStyle::Symbol ), mSymbolV2( 0 )
{
@@ -28,7 +28,6 @@
#include "qgscomposerpicture.h"
#include "qgscomposerscalebar.h"
#include "qgscomposershape.h"
#include "qgscomposerlabel.h"
#include "qgscomposermodel.h"
#include "qgscomposerattributetable.h"
#include "qgscomposerattributetablev2.h"
@@ -17,11 +17,11 @@

#include "qgscolorscheme.h"

#include <QSettings>
#include "qgsproject.h"
#include "qgssymbollayerv2utils.h"
#include "qgsapplication.h"
#include "qgssymbollayerv2utils.h"

#include <QSettings>
#include <QDir>

QgsColorScheme::QgsColorScheme()
@@ -29,7 +29,6 @@ email : morb at ozemail dot com dot au
#include "qgsmaplayerregistry.h"
#include "qgsvectorlayer.h"
#include "qgsproject.h"
#include "qgsmessagelog.h"
#include "qgsgeometryvalidator.h"

#include <QDebug>
@@ -30,7 +30,6 @@
#include "qgseditorwidgetconfig.h"
#include "qgsfield.h"
#include "qgssnapper.h"
#include "qgsfield.h"
#include "qgsrelation.h"
#include "qgsvectorsimplifymethod.h"

@@ -25,9 +25,6 @@
#include "qgsapplication.h"
#include "qgsproject.h"
#include "qgsogcutils.h"

#include "qgsapplication.h"
#include "qgsproject.h"
#include "qgslogger.h"
#include "qgsrendercontext.h"

@@ -25,7 +25,6 @@
#include "qgsmaplayeractionregistry.h"
#include "qgsmessagelog.h"
#include "qgsvectordataprovider.h"
#include "qgsvectordataprovider.h"
#include "qgsvectorlayercache.h"

#include <QDialog>
@@ -19,7 +19,6 @@
#include "qgslogger.h"
#include "qgsmaplayerregistry.h"
#include "qgsvaluerelationconfigdlg.h"
#include "qgsvaluerelationwidgetfactory.h"
#include "qgsvectorlayer.h"

#include <QSettings>
@@ -24,7 +24,6 @@
#include <QMenu>
#include <QFile>
#include <QTextStream>
#include <QSettings>
#include <QDir>
#include <QComboBox>

@@ -22,12 +22,9 @@
#include "qgsfillsymbollayerv2.h"
#include "qgsgeometry.h"
#include "qgshighlight.h"
#include "qgslinesymbollayerv2.h"
#include "qgslinesymbollayerv2.h"
#include "qgsmapcanvas.h"
#include "qgsmaplayer.h"
#include "qgsmaprenderer.h"
#include "qgsmarkersymbollayerv2.h"
#include "qgsrendercontext.h"
#include "qgssymbollayerv2.h"
#include "qgssymbolv2.h"
@@ -16,13 +16,12 @@
#include "qgssymbolv2.h"
#include "qgsvectorlayer.h"
#include "qgscolordialog.h"
#include <QMessageBox>
#include <QInputDialog>
#include <QMenu>

#include "qgssymbollevelsv2dialog.h"
#include "qgsexpressionbuilderdialog.h"

#include <QMessageBox>
#include <QInputDialog>
#include <QMenu>

QgsRendererV2Widget::QgsRendererV2Widget( QgsVectorLayer* layer, QgsStyleV2* style )
: QWidget(), mLayer( layer ), mStyle( style )
@@ -184,9 +183,7 @@ void QgsRendererV2Widget::showSymbolLevelsDialog( QgsFeatureRendererV2* r )

////////////

//#include <QAction>
#include "qgsfield.h"
#include <QMenu>

QgsRendererV2DataDefinedMenus::QgsRendererV2DataDefinedMenus( QMenu* menu, QgsVectorLayer* layer, QString rotationField, QString sizeScaleField, QgsSymbolV2::ScaleMethod scaleMethod )
: QObject( menu ), mLayer( layer )
@@ -211,7 +211,6 @@ void QgsRuleBasedRendererV2Widget::currentRuleChanged( const QModelIndex& curren
#include "qgsexpressionbuilderdialog.h"
#include <QDialogButtonBox>
#include <QInputDialog>
#include <QKeyEvent>
#include <QClipboard>

void QgsRuleBasedRendererV2Widget::refineRule( int type )
@@ -1528,47 +1528,47 @@ class QgsSvgListModel : public QAbstractListModel
{
Q_UNUSED( parent );
return mSvgFiles.count();
}
}

QVariant data( const QModelIndex & index, int role = Qt::DisplayRole ) const override
{
QString entry = mSvgFiles.at( index.row() );

if ( role == Qt::DecorationRole ) // icon
{
QPixmap pixmap;
if ( !QPixmapCache::find( entry, pixmap ) )
{
// render SVG file
QColor fill, outline;
double outlineWidth;
bool fillParam, outlineParam, outlineWidthParam;
QgsSvgCache::instance()->containsParams( entry, fillParam, fill, outlineParam, outline, outlineWidthParam, outlineWidth );

bool fitsInCache; // should always fit in cache at these sizes (i.e. under 559 px ^ 2, or half cache size)
const QImage& img = QgsSvgCache::instance()->svgAsImage( entry, 30.0, fill, outline, outlineWidth, 3.5 /*appr. 88 dpi*/, 1.0, fitsInCache );
pixmap = QPixmap::fromImage( img );
QPixmapCache::insert( entry, pixmap );
QPixmap pixmap;
if ( !QPixmapCache::find( entry, pixmap ) )
{
// render SVG file
QColor fill, outline;
double outlineWidth;
bool fillParam, outlineParam, outlineWidthParam;
QgsSvgCache::instance()->containsParams( entry, fillParam, fill, outlineParam, outline, outlineWidthParam, outlineWidth );

bool fitsInCache; // should always fit in cache at these sizes (i.e. under 559 px ^ 2, or half cache size)
const QImage& img = QgsSvgCache::instance()->svgAsImage( entry, 30.0, fill, outline, outlineWidth, 3.5 /*appr. 88 dpi*/, 1.0, fitsInCache );
pixmap = QPixmap::fromImage( img );
QPixmapCache::insert( entry, pixmap );
}

return pixmap;
}
else if ( role == Qt::UserRole || role == Qt::ToolTipRole )
{
return entry;
}

return pixmap;
return QVariant();
}
else if ( role == Qt::UserRole || role == Qt::ToolTipRole )
{
return entry;
}

return QVariant();
}

protected:
QStringList mSvgFiles;
protected:
QStringList mSvgFiles;
};

class QgsSvgGroupsModel : public QStandardItemModel
{
public:
QgsSvgGroupsModel( QObject* parent ) : QStandardItemModel( parent )
public:
QgsSvgGroupsModel( QObject* parent ) : QStandardItemModel( parent )
{
QStringList svgPaths = QgsApplication::svgPaths();
QStandardItem *parentItem = invisibleRootItem();
@@ -1934,8 +1934,6 @@ void QgsSvgMarkerSymbolLayerV2Widget::on_mVerticalAnchorComboBox_currentIndexCha

/////////////

#include <QFileDialog>

QgsSVGFillSymbolLayerWidget::QgsSVGFillSymbolLayerWidget( const QgsVectorLayer* vl, QWidget* parent ): QgsSymbolLayerV2Widget( parent, vl )
{
mLayer = 0;
@@ -19,7 +19,6 @@
#include "qgsdialog.h"
#include "qgscolordialog.h"
#include "qgscptcityarchive.h"
#include "qgscolordialog.h"

#include <QColorDialog>
#include <QInputDialog>
@@ -30,16 +30,11 @@

// Qt
#include <QtCore/QBuffer>
//#include <KDebug>
#include <QtCore/QFile>
#include <QtCore/QFileInfo>
#include <QtCore>
#include <QtGui>

// KDE
//#include <KDebug>
//#include <KLocale>
//#include <KStandardDirs>

using namespace Konsole;

@@ -23,7 +23,6 @@
#include <qgsvectordataprovider.h>
#include <qgsvectorlayer.h>
#include <qgsmaplayer.h>
#include <qgsmaplayer.h>
#include <qgsmaplayerregistry.h>
#include <qgsgeometry.h>
#include <qgsvertexmarker.h>
@@ -45,7 +45,6 @@
#include <QFile>
#include <QHash>
#include <QTime>
#include <QSettings>
#include <QTextDocument>
#include <QDebug>

@@ -33,7 +33,6 @@

#include "qgsapplication.h"
#include "qgscoordinatereferencesystem.h"
#include "qgsfield.h"
#include "qgslogger.h"

#include <QByteArray>
@@ -32,7 +32,6 @@
#include "qgsproject.h"
#include "qgsproviderregistry.h"
#include "qgswmsconnection.h"
#include "qgswmsprovider.h"
#include "qgswmssourceselect.h"
#include "qgswmtsdimensions.h"
#include "qgsnetworkaccessmanager.h"
@@ -18,7 +18,6 @@
#include "qgswcsprojectparser.h"
#include "qgsconfigcache.h"
#include "qgsconfigparserutils.h"
#include "qgsconfigcache.h"
#include "qgsrasterlayer.h"

QgsWCSProjectParser::QgsWCSProjectParser( const QString& filePath )
@@ -18,7 +18,6 @@
#include "qgswfsprojectparser.h"
#include "qgsconfigcache.h"
#include "qgsconfigparserutils.h"
#include "qgsconfigcache.h"
#include "qgsmaplayerregistry.h"
#include "qgsvectordataprovider.h"

0 comments on commit 5e7c043

Please sign in to comment.