Skip to content

Commit

Permalink
Followup 4166a3, don't use QStringLiteral in definitions
Browse files Browse the repository at this point in the history
Causes linker errors in some random cases
  • Loading branch information
nyalldawson committed Oct 24, 2016
1 parent 794c8f3 commit af55c02
Show file tree
Hide file tree
Showing 66 changed files with 102 additions and 144 deletions.
2 changes: 1 addition & 1 deletion src/analysis/network/qgsgraphbuilder.h
Expand Up @@ -39,7 +39,7 @@ class ANALYSIS_EXPORT QgsGraphBuilder : public QgsGraphBuilderInterface
/**
* default constructor
*/
QgsGraphBuilder( const QgsCoordinateReferenceSystem& crs, bool otfEnabled = true, double topologyTolerance = 0.0, const QString& ellipsoidID = QStringLiteral( "WGS84" ) );
QgsGraphBuilder( const QgsCoordinateReferenceSystem& crs, bool otfEnabled = true, double topologyTolerance = 0.0, const QString& ellipsoidID = "WGS84" );

~QgsGraphBuilder();

Expand Down
2 changes: 1 addition & 1 deletion src/analysis/network/qgsgraphbuilderintr.h
Expand Up @@ -41,7 +41,7 @@ class ANALYSIS_EXPORT QgsGraphBuilderInterface
* @param topologyTolerance sqrt distance between source point as one graph vertex
* @param ellipsoidID ellipsoid for edge measurement
*/
QgsGraphBuilderInterface( const QgsCoordinateReferenceSystem& crs, bool ctfEnabled = true, double topologyTolerance = 0.0, const QString& ellipsoidID = QStringLiteral( "WGS84" ) )
QgsGraphBuilderInterface( const QgsCoordinateReferenceSystem& crs, bool ctfEnabled = true, double topologyTolerance = 0.0, const QString& ellipsoidID = "WGS84" )
: mCrs( crs )
, mCtfEnabled( ctfEnabled )
, mTopologyTolerance( topologyTolerance )
Expand Down
2 changes: 1 addition & 1 deletion src/analysis/vector/qgszonalstatistics.h
Expand Up @@ -55,7 +55,7 @@ class ANALYSIS_EXPORT QgsZonalStatistics
/**
* Constructor for QgsZonalStatistics.
*/
QgsZonalStatistics( QgsVectorLayer* polygonLayer, const QString& rasterFile, const QString& attributePrefix = QLatin1String( "" ), int rasterBand = 1,
QgsZonalStatistics( QgsVectorLayer* polygonLayer, const QString& rasterFile, const QString& attributePrefix = "", int rasterBand = 1,
Statistics stats = Statistics( Count | Sum | Mean ) );

/** Starts the calculation
Expand Down
2 changes: 1 addition & 1 deletion src/app/pluginmanager/qgspluginsortfilterproxymodel.h
Expand Up @@ -49,7 +49,7 @@ class QgsPluginSortFilterProxyModel : public QSortFilterProxyModel
void setAcceptedStatuses( const QStringList& statuses );

//! (Re)configire the spacer filter
void setAcceptedSpacers( const QString& spacers = QStringLiteral( "" ) );
void setAcceptedSpacers( const QString& spacers = "" );

//! Return number of item with status filter matching (no other filters are considered)
int countWithCurrentStatus();
Expand Down
2 changes: 1 addition & 1 deletion src/app/qgisapp.h
Expand Up @@ -230,7 +230,7 @@ class APP_EXPORT QgisApp : public QMainWindow, private Ui::MainWindow
void addUserInputWidget( QWidget* widget );

//! Set theme (icons)
void setTheme( const QString& themeName = QStringLiteral( "default" ) );
void setTheme( const QString& themeName = "default" );

void setIconSizes( int size );

Expand Down
2 changes: 1 addition & 1 deletion src/app/qgspluginregistry.h
Expand Up @@ -104,7 +104,7 @@ class APP_EXPORT QgsPluginRegistry

//! Check current QGIS version against requested minimal and optionally maximal QGIS version
//! if maxVersion not specified, the default value is assumed: floor(minVersion) + 0.99.99
bool checkQgisVersion( const QString& minVersion, const QString& maxVersion = QLatin1String( "" ) ) const;
bool checkQgisVersion( const QString& minVersion, const QString& maxVersion = "" ) const;

private:
static QgsPluginRegistry* _instance;
Expand Down
5 changes: 1 addition & 4 deletions src/core/composer/qgscomposerlegenditem.h
Expand Up @@ -157,10 +157,7 @@ class CORE_EXPORT QgsComposerLayerItem : public QgsComposerLegendItem
void setShowFeatureCount( bool show ) { mShowFeatureCount = show; }
bool showFeatureCount() const { return mShowFeatureCount; }

/**
* Sets the legend layer item to the appropriate default style for the specified legend rule.
*/
void setDefaultStyle( double scaleDenominator = -1, const QString& rule = QLatin1String( "" ) );
void setDefaultStyle( double scaleDenominator = -1, const QString& rule = "" );

private:
QString mLayerID;
Expand Down
4 changes: 2 additions & 2 deletions src/core/geometry/qgsabstractgeometry.h
Expand Up @@ -168,7 +168,7 @@ class CORE_EXPORT QgsAbstractGeometry
* @see asGML3
* @see asJSON
*/
virtual QDomElement asGML2( QDomDocument& doc, int precision = 17, const QString& ns = QStringLiteral( "gml" ) ) const = 0;
virtual QDomElement asGML2( QDomDocument& doc, int precision = 17, const QString& ns = "gml" ) const = 0;

/** Returns a GML3 representation of the geometry.
* @param doc DOM document
Expand All @@ -179,7 +179,7 @@ class CORE_EXPORT QgsAbstractGeometry
* @see asGML2
* @see asJSON
*/
virtual QDomElement asGML3( QDomDocument& doc, int precision = 17, const QString& ns = QStringLiteral( "gml" ) ) const = 0;
virtual QDomElement asGML3( QDomDocument& doc, int precision = 17, const QString& ns = "gml" ) const = 0;

/** Returns a GeoJSON representation of the geometry.
* @param precision number of decimal places for coordinates
Expand Down
4 changes: 2 additions & 2 deletions src/core/geometry/qgscircularstring.h
Expand Up @@ -47,8 +47,8 @@ class CORE_EXPORT QgsCircularString: public QgsCurve
int wkbSize() const override;
unsigned char* asWkb( int& binarySize ) const override;
QString asWkt( int precision = 17 ) const override;
QDomElement asGML2( QDomDocument& doc, int precision = 17, const QString& ns = QStringLiteral( "gml" ) ) const override;
QDomElement asGML3( QDomDocument& doc, int precision = 17, const QString& ns = QStringLiteral( "gml" ) ) const override;
QDomElement asGML2( QDomDocument& doc, int precision = 17, const QString& ns = "gml" ) const override;
QDomElement asGML3( QDomDocument& doc, int precision = 17, const QString& ns = "gml" ) const override;
QString asJSON( int precision = 17 ) const override;

int numPoints() const override;
Expand Down
4 changes: 2 additions & 2 deletions src/core/geometry/qgscompoundcurve.h
Expand Up @@ -48,8 +48,8 @@ class CORE_EXPORT QgsCompoundCurve: public QgsCurve
int wkbSize() const override;
unsigned char* asWkb( int& binarySize ) const override;
QString asWkt( int precision = 17 ) const override;
QDomElement asGML2( QDomDocument& doc, int precision = 17, const QString& ns = QStringLiteral( "gml" ) ) const override;
QDomElement asGML3( QDomDocument& doc, int precision = 17, const QString& ns = QStringLiteral( "gml" ) ) const override;
QDomElement asGML2( QDomDocument& doc, int precision = 17, const QString& ns = "gml" ) const override;
QDomElement asGML3( QDomDocument& doc, int precision = 17, const QString& ns = "gml" ) const override;
QString asJSON( int precision = 17 ) const override;

//curve interface
Expand Down
4 changes: 2 additions & 2 deletions src/core/geometry/qgscurvepolygon.h
Expand Up @@ -47,8 +47,8 @@ class CORE_EXPORT QgsCurvePolygon: public QgsSurface
int wkbSize() const override;
unsigned char* asWkb( int& binarySize ) const override;
QString asWkt( int precision = 17 ) const override;
QDomElement asGML2( QDomDocument& doc, int precision = 17, const QString& ns = QStringLiteral( "gml" ) ) const override;
QDomElement asGML3( QDomDocument& doc, int precision = 17, const QString& ns = QStringLiteral( "gml" ) ) const override;
QDomElement asGML2( QDomDocument& doc, int precision = 17, const QString& ns = "gml" ) const override;
QDomElement asGML3( QDomDocument& doc, int precision = 17, const QString& ns = "gml" ) const override;
QString asJSON( int precision = 17 ) const override;

//surface interface
Expand Down
4 changes: 2 additions & 2 deletions src/core/geometry/qgsgeometrycollection.h
Expand Up @@ -84,8 +84,8 @@ class CORE_EXPORT QgsGeometryCollection: public QgsAbstractGeometry
int wkbSize() const override;
unsigned char* asWkb( int& binarySize ) const override;
QString asWkt( int precision = 17 ) const override;
QDomElement asGML2( QDomDocument& doc, int precision = 17, const QString& ns = QStringLiteral( "gml" ) ) const override;
QDomElement asGML3( QDomDocument& doc, int precision = 17, const QString& ns = QStringLiteral( "gml" ) ) const override;
QDomElement asGML2( QDomDocument& doc, int precision = 17, const QString& ns = "gml" ) const override;
QDomElement asGML3( QDomDocument& doc, int precision = 17, const QString& ns = "gml" ) const override;
QString asJSON( int precision = 17 ) const override;

virtual QgsRectangle boundingBox() const override;
Expand Down
2 changes: 1 addition & 1 deletion src/core/geometry/qgsgeometryutils.h
Expand Up @@ -240,7 +240,7 @@ class CORE_EXPORT QgsGeometryUtils
* @param defaultType default geometry type for childen
* @returns list of WKT child block strings, eg List("TYPE1 (contents1)", "TYPE2 (TYPE3 (contents3), TYPE4 (contents4))")
*/
static QStringList wktGetChildBlocks( const QString& wkt , const QString &defaultType = QLatin1String( "" ) );
static QStringList wktGetChildBlocks( const QString& wkt , const QString &defaultType = "" );

enum componentType
{
Expand Down
4 changes: 2 additions & 2 deletions src/core/geometry/qgslinestring.h
Expand Up @@ -133,8 +133,8 @@ class CORE_EXPORT QgsLineString: public QgsCurve
int wkbSize() const override;
unsigned char* asWkb( int& binarySize ) const override;
QString asWkt( int precision = 17 ) const override;
QDomElement asGML2( QDomDocument& doc, int precision = 17, const QString& ns = QStringLiteral( "gml" ) ) const override;
QDomElement asGML3( QDomDocument& doc, int precision = 17, const QString& ns = QStringLiteral( "gml" ) ) const override;
QDomElement asGML2( QDomDocument& doc, int precision = 17, const QString& ns = "gml" ) const override;
QDomElement asGML3( QDomDocument& doc, int precision = 17, const QString& ns = "gml" ) const override;
QString asJSON( int precision = 17 ) const override;

//curve interface
Expand Down
4 changes: 2 additions & 2 deletions src/core/geometry/qgsmulticurve.h
Expand Up @@ -36,8 +36,8 @@ class CORE_EXPORT QgsMultiCurve: public QgsGeometryCollection
// inherited: int wkbSize() const;
// inherited: unsigned char* asWkb( int& binarySize ) const;
// inherited: QString asWkt( int precision = 17 ) const;
QDomElement asGML2( QDomDocument& doc, int precision = 17, const QString& ns = QStringLiteral( "gml" ) ) const override;
QDomElement asGML3( QDomDocument& doc, int precision = 17, const QString& ns = QStringLiteral( "gml" ) ) const override;
QDomElement asGML2( QDomDocument& doc, int precision = 17, const QString& ns = "gml" ) const override;
QDomElement asGML3( QDomDocument& doc, int precision = 17, const QString& ns = "gml" ) const override;
QString asJSON( int precision = 17 ) const override;

/** Adds a geometry and takes ownership. Returns true in case of success*/
Expand Down
4 changes: 2 additions & 2 deletions src/core/geometry/qgsmultilinestring.h
Expand Up @@ -36,8 +36,8 @@ class CORE_EXPORT QgsMultiLineString: public QgsMultiCurve
// inherited: int wkbSize() const;
// inherited: unsigned char* asWkb( int& binarySize ) const;
// inherited: QString asWkt( int precision = 17 ) const;
QDomElement asGML2( QDomDocument& doc, int precision = 17, const QString& ns = QStringLiteral( "gml" ) ) const override;
QDomElement asGML3( QDomDocument& doc, int precision = 17, const QString& ns = QStringLiteral( "gml" ) ) const override;
QDomElement asGML2( QDomDocument& doc, int precision = 17, const QString& ns = "gml" ) const override;
QDomElement asGML3( QDomDocument& doc, int precision = 17, const QString& ns = "gml" ) const override;
QString asJSON( int precision = 17 ) const override;

/** Adds a geometry and takes ownership. Returns true in case of success*/
Expand Down
4 changes: 2 additions & 2 deletions src/core/geometry/qgsmultipoint.h
Expand Up @@ -36,8 +36,8 @@ class CORE_EXPORT QgsMultiPointV2: public QgsGeometryCollection
// inherited: int wkbSize() const;
// inherited: unsigned char* asWkb( int& binarySize ) const;
// inherited: QString asWkt( int precision = 17 ) const;
QDomElement asGML2( QDomDocument& doc, int precision = 17, const QString& ns = QStringLiteral( "gml" ) ) const override;
QDomElement asGML3( QDomDocument& doc, int precision = 17, const QString& ns = QStringLiteral( "gml" ) ) const override;
QDomElement asGML2( QDomDocument& doc, int precision = 17, const QString& ns = "gml" ) const override;
QDomElement asGML3( QDomDocument& doc, int precision = 17, const QString& ns = "gml" ) const override;
QString asJSON( int precision = 17 ) const override;


Expand Down
4 changes: 2 additions & 2 deletions src/core/geometry/qgsmultipolygon.h
Expand Up @@ -36,8 +36,8 @@ class CORE_EXPORT QgsMultiPolygonV2: public QgsMultiSurface
// inherited: int wkbSize() const;
// inherited: unsigned char* asWkb( int& binarySize ) const;
// inherited: QString asWkt( int precision = 17 ) const;
QDomElement asGML2( QDomDocument& doc, int precision = 17, const QString& ns = QStringLiteral( "gml" ) ) const override;
QDomElement asGML3( QDomDocument& doc, int precision = 17, const QString& ns = QStringLiteral( "gml" ) ) const override;
QDomElement asGML2( QDomDocument& doc, int precision = 17, const QString& ns = "gml" ) const override;
QDomElement asGML3( QDomDocument& doc, int precision = 17, const QString& ns = "gml" ) const override;
QString asJSON( int precision = 17 ) const override;

/** Adds a geometry and takes ownership. Returns true in case of success*/
Expand Down
4 changes: 2 additions & 2 deletions src/core/geometry/qgsmultisurface.h
Expand Up @@ -36,8 +36,8 @@ class CORE_EXPORT QgsMultiSurface: public QgsGeometryCollection
// inherited: int wkbSize() const;
// inherited: unsigned char* asWkb( int& binarySize ) const;
// inherited: QString asWkt( int precision = 17 ) const;
QDomElement asGML2( QDomDocument& doc, int precision = 17, const QString& ns = QStringLiteral( "gml" ) ) const override;
QDomElement asGML3( QDomDocument& doc, int precision = 17, const QString& ns = QStringLiteral( "gml" ) ) const override;
QDomElement asGML2( QDomDocument& doc, int precision = 17, const QString& ns = "gml" ) const override;
QDomElement asGML3( QDomDocument& doc, int precision = 17, const QString& ns = "gml" ) const override;
QString asJSON( int precision = 17 ) const override;


Expand Down
4 changes: 2 additions & 2 deletions src/core/geometry/qgspointv2.h
Expand Up @@ -162,8 +162,8 @@ class CORE_EXPORT QgsPointV2: public QgsAbstractGeometry
int wkbSize() const override;
unsigned char* asWkb( int& binarySize ) const override;
QString asWkt( int precision = 17 ) const override;
QDomElement asGML2( QDomDocument& doc, int precision = 17, const QString& ns = QStringLiteral( "gml" ) ) const override;
QDomElement asGML3( QDomDocument& doc, int precision = 17, const QString& ns = QStringLiteral( "gml" ) ) const override;
QDomElement asGML2( QDomDocument& doc, int precision = 17, const QString& ns = "gml" ) const override;
QDomElement asGML3( QDomDocument& doc, int precision = 17, const QString& ns = "gml" ) const override;
QString asJSON( int precision = 17 ) const override;
void draw( QPainter& p ) const override;
void transform( const QgsCoordinateTransform& ct, QgsCoordinateTransform::TransformDirection d = QgsCoordinateTransform::ForwardTransform,
Expand Down
6 changes: 1 addition & 5 deletions src/core/qgsapplication.h
Expand Up @@ -38,11 +38,7 @@ class CORE_EXPORT QgsApplication : public QApplication
static const char* QGIS_ORGANIZATION_NAME;
static const char* QGIS_ORGANIZATION_DOMAIN;
static const char* QGIS_APPLICATION_NAME;

/**
* Constructor for QgsApplication.
*/
QgsApplication( int & argc, char ** argv, bool GUIenabled, const QString& customConfigPath = QString(), const QString& platformName = QStringLiteral( "desktop" ) );
QgsApplication( int & argc, char ** argv, bool GUIenabled, const QString& customConfigPath = QString(), const QString& platformName = "desktop" );
virtual ~QgsApplication();

/** This method initialises paths etc for QGIS. Called by the ctor or call it manually
Expand Down
5 changes: 1 addition & 4 deletions src/core/qgscolorramp.h
Expand Up @@ -553,10 +553,7 @@ class CORE_EXPORT QgsCptCityColorRamp : public QgsGradientColorRamp
void setSchemeName( const QString& schemeName ) { mSchemeName = schemeName; mFileLoaded = false; }
void setVariantName( const QString& variantName ) { mVariantName = variantName; mFileLoaded = false; }
void setVariantList( const QStringList& variantList ) { mVariantList = variantList; }
/**
* Sets the name for the color ramp, based on a scheme, variant and list of variants.
*/
void setName( const QString& schemeName, const QString& variantName = QLatin1String( "" ), const QStringList& variantList = QStringList() )
void setName( const QString& schemeName, const QString& variantName = "", const QStringList& variantList = QStringList() )
{ mSchemeName = schemeName; mVariantName = variantName; mVariantList = variantList; mFileLoaded = false; }

void loadPalette() { loadFile(); }
Expand Down
5 changes: 1 addition & 4 deletions src/core/qgsdataprovider.h
Expand Up @@ -74,10 +74,7 @@ class CORE_EXPORT QgsDataProvider : public QObject
CustomData = 3000 //!< Custom properties for 3rd party providers or very provider-specific properties which are not expected to be of interest for other providers can be added starting from this value up.
};

/**
* Constructor for QgsDataProvider.
*/
QgsDataProvider( QString const & uri = QLatin1String( "" ) )
QgsDataProvider( QString const & uri = "" )
: mDataSourceURI( uri )
{}

Expand Down
2 changes: 1 addition & 1 deletion src/core/qgsfontutils.h
Expand Up @@ -82,7 +82,7 @@ class CORE_EXPORT QgsFontUtils
* @returns QFont
* @note Added in QGIS 2.1
*/
static QFont getStandardTestFont( const QString& style = QStringLiteral( "Roman" ), int pointsize = 12 );
static QFont getStandardTestFont( const QString& style = "Roman", int pointsize = 12 );

/** Returns a DOM element containing the properties of the font.
* @param font font
Expand Down
2 changes: 1 addition & 1 deletion src/core/qgsmaplayer.h
Expand Up @@ -790,7 +790,7 @@ class CORE_EXPORT QgsMapLayer : public QObject
/** Read custom properties from project file.
@param layerNode note to read from
@param keyStartsWith reads only properties starting with the specified string (or all if the string is empty)*/
void readCustomProperties( const QDomNode& layerNode, const QString& keyStartsWith = QLatin1String( "" ) );
void readCustomProperties( const QDomNode& layerNode, const QString& keyStartsWith = "" );

/** Write custom properties to project file. */
void writeCustomProperties( QDomNode & layerNode, QDomDocument & doc ) const;
Expand Down
6 changes: 1 addition & 5 deletions src/core/qgsprojectversion.h
Expand Up @@ -38,11 +38,7 @@ class CORE_EXPORT QgsProjectVersion
, mSub( 0 )
{}
~QgsProjectVersion() {}

/**
* Constructor for QgsProjectVersion which accepts a major, minor and sub version number and a release name.
*/
QgsProjectVersion( int major, int minor, int sub, const QString& name = QLatin1String( "" ) );
QgsProjectVersion( int major, int minor, int sub, const QString& name = "" );
QgsProjectVersion( const QString& string );
int majorVersion() { return mMajor;}
int minorVersion() { return mMinor;}
Expand Down
2 changes: 1 addition & 1 deletion src/core/qgsrenderchecker.h
Expand Up @@ -124,7 +124,7 @@ class CORE_EXPORT QgsRenderChecker
* @param theRenderedImageFile to optionally override the output filename
* @note: make sure to call setExpectedImage and setRenderedImage first.
*/
bool compareImages( const QString& theTestName, unsigned int theMismatchCount = 0, const QString& theRenderedImageFile = QLatin1String( "" ) );
bool compareImages( const QString& theTestName, unsigned int theMismatchCount = 0, const QString& theRenderedImageFile = "" );
/** Get a list of all the anomalies. An anomaly is a rendered difference
* file where there is some red pixel content (indicating a render check
* mismatch), but where the output was still acceptible. If the render
Expand Down

0 comments on commit af55c02

Please sign in to comment.