Skip to content

Commit

Permalink
Remove some unused widget imports from core library
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed May 19, 2021
1 parent 4e4f7cf commit c543a57
Show file tree
Hide file tree
Showing 19 changed files with 1 addition and 41 deletions.
Expand Up @@ -12,7 +12,6 @@




class QgsLocatorModelBridge : QObject
{
%Docstring(signature="appended")
Expand Down
2 changes: 0 additions & 2 deletions python/core/auto_generated/symbology/qgscptcityarchive.sip.in
Expand Up @@ -95,8 +95,6 @@ Base class for all items in the model

virtual QWidget *paramWidget() /Factory/;

virtual QList<QAction *> actions();

virtual bool acceptDrop();

virtual bool handleDrop( const QMimeData * /*data*/, Qt::DropAction /*action*/ );
Expand Down
2 changes: 1 addition & 1 deletion src/core/labeling/qgspallabeling.cpp
Expand Up @@ -43,6 +43,7 @@
#include <QDesktopWidget>
#else
#include <QScreen>
#include <QWidget>
#endif
#include <QTextBoundaryFinder>

Expand Down Expand Up @@ -75,7 +76,6 @@
#include "callouts/qgscalloutsregistry.h"
#include "qgsvectortilelayer.h"
#include "qgsvectortilebasiclabeling.h"
#include <QMessageBox>

using namespace pal;

Expand Down
1 change: 0 additions & 1 deletion src/core/layout/qgslayoutmodel.cpp
Expand Up @@ -26,7 +26,6 @@
#include <QDomElement>
#include <QMimeData>
#include <QSettings>
#include <QMessageBox>
#include <QIcon>
#include <QIODevice>

Expand Down
1 change: 0 additions & 1 deletion src/core/locator/qgslocatorfilter.h
Expand Up @@ -18,7 +18,6 @@
#ifndef QGSLOCATORFILTER_H
#define QGSLOCATORFILTER_H

#include <QAction>
#include <QIcon>
#include <QString>
#include <QVariant>
Expand Down
2 changes: 0 additions & 2 deletions src/core/locator/qgslocatormodelbridge.h
Expand Up @@ -25,8 +25,6 @@
#include "qgscoordinatetransformcontext.h"
#include "qgsrectangle.h"

class QAction;

class QgsLocatorResult;
class QgsLocator;
class QgsLocatorContext;
Expand Down
6 changes: 0 additions & 6 deletions src/core/project/qgsproject.cpp
Expand Up @@ -1379,12 +1379,6 @@ bool QgsProject::readProjectFile( const QString &filename, QgsProject::ReadFlags

if ( !doc->setContent( &projectFile, &errorMsg, &line, &column ) )
{
// want to make this class as GUI independent as possible; so commented out
#if 0
QMessageBox::critical( 0, tr( "Read Project File" ),
tr( "%1 at line %2 column %3" ).arg( errorMsg ).arg( line ).arg( column ) );
#endif

QString errorString = tr( "Project file read error in file %1: %2 at line %3 column %4" )
.arg( projectFile.fileName(), errorMsg ).arg( line ).arg( column );

Expand Down
2 changes: 0 additions & 2 deletions src/core/providers/gdal/qgsgdaldataitems.cpp
Expand Up @@ -28,9 +28,7 @@
#include "symbology/qgsstyle.h"

#include <QFileInfo>
#include <QAction>
#include <mutex>
#include <QMessageBox>
#include <QUrlQuery>
#include <QUrl>

Expand Down
1 change: 0 additions & 1 deletion src/core/providers/gdal/qgsgdalprovider.cpp
Expand Up @@ -48,7 +48,6 @@
#include <QImage>
#include <QColor>
#include <QProcess>
#include <QMessageBox>
#include <QDir>
#include <QFileInfo>
#include <QFile>
Expand Down
2 changes: 0 additions & 2 deletions src/core/providers/ogr/qgsgeopackagerasterwriter.cpp
Expand Up @@ -23,8 +23,6 @@
#include "qgsgeopackagerasterwriter.h"
#include "qgscplerrorhandler.h"

#include <QMessageBox>

QgsGeoPackageRasterWriter::QgsGeoPackageRasterWriter( const QgsMimeDataUtils::Uri &sourceUri, const QString &outputUrl ):
mSourceUri( sourceUri ),
mOutputUrl( outputUrl )
Expand Down
2 changes: 0 additions & 2 deletions src/core/providers/ogr/qgsogrdataitems.cpp
Expand Up @@ -32,8 +32,6 @@

#include <QFileInfo>
#include <QTextStream>
#include <QAction>
#include <QMessageBox>
#include <QInputDialog>
#include <QFileDialog>
#include <QRegularExpression>
Expand Down
4 changes: 0 additions & 4 deletions src/core/providers/ogr/qgsogrdbconnection.cpp
Expand Up @@ -23,10 +23,6 @@
#include "qgssettings.h"

#include "qgslogger.h"
#include <QInputDialog>
#include <QMessageBox>



QgsOgrDbConnection::QgsOgrDbConnection( const QString &connName, const QString &settingsKey )
: mConnName( connName )
Expand Down
2 changes: 0 additions & 2 deletions src/core/qgsaction.h
Expand Up @@ -20,7 +20,6 @@
#include <QSet>
#include <QString>
#include <QIcon>
#include <QAction>
#include <QUuid>

#include "qgsexpressioncontext.h"
Expand Down Expand Up @@ -255,7 +254,6 @@ class CORE_EXPORT QgsAction
bool mCaptureOutput = false;
QSet<QString> mActionScopes;
QString mNotificationMessage;
mutable std::shared_ptr<QAction> mAction;
QUuid mId;
QgsExpressionContextScope mExpressionContextScope;
bool mIsEnabledOnlyWhenEditable = false;
Expand Down
2 changes: 0 additions & 2 deletions src/core/qgsmapthemecollection.cpp
Expand Up @@ -24,8 +24,6 @@
#include "qgsrenderer.h"
#include "qgsvectorlayer.h"

#include <QInputDialog>

QgsMapThemeCollection::QgsMapThemeCollection( QgsProject *project )
: mProject( project )
{
Expand Down
1 change: 0 additions & 1 deletion src/core/qgsofflineediting.cpp
Expand Up @@ -46,7 +46,6 @@
#include <QDomDocument>
#include <QDomNode>
#include <QFile>
#include <QMessageBox>
#include <QRegularExpression>

#include <ogr_srs_api.h>
Expand Down
2 changes: 0 additions & 2 deletions src/core/qgsowsconnection.cpp
Expand Up @@ -27,8 +27,6 @@
#include "qgsowsconnection.h"
#include "qgssettings.h"

#include <QInputDialog>
#include <QMessageBox>
#include <QPicture>
#include <QUrl>
#include <QNetworkRequest>
Expand Down
1 change: 0 additions & 1 deletion src/core/raster/qgsrasterlayer.cpp
Expand Up @@ -75,7 +75,6 @@ email : tim at linfiniti.com
#include <QImage>
#include <QLabel>
#include <QList>
#include <QMessageBox>
#include <QPainter>
#include <QPixmap>
#include <QRegExp>
Expand Down
4 changes: 0 additions & 4 deletions src/core/symbology/qgscptcityarchive.cpp
Expand Up @@ -19,10 +19,6 @@
#include <QDateTime>
#include <QDir>
#include <QFileInfo>
#include <QMenu>
#include <QMouseEvent>
#include <QTreeWidget>
#include <QTreeWidgetItem>
#include <QVector>
#include <QStyle>
#include <QDomDocument>
Expand Down
4 changes: 0 additions & 4 deletions src/core/symbology/qgscptcityarchive.h
Expand Up @@ -25,7 +25,6 @@
#include <QAbstractItemModel>
#include <QIcon>
#include <QMimeData>
#include <QAction>

class QgsCptCityColorRamp;
class QgsCptCityDataItem;
Expand Down Expand Up @@ -145,9 +144,6 @@ class CORE_EXPORT QgsCptCityDataItem : public QObject

virtual QWidget *paramWidget() SIP_FACTORY { return nullptr; }

// list of actions provided by this item - usually used for popup menu on right-click
virtual QList<QAction *> actions() { return QList<QAction *>(); }

// whether accepts drag&drop'd layers - e.g. for import
virtual bool acceptDrop() { return false; }

Expand Down

0 comments on commit c543a57

Please sign in to comment.