Skip to content
Permalink
Browse files
Followup 4166a3, don't use QStringLiteral in definitions
Causes linker errors in some random cases
  • Loading branch information
nyalldawson committed Oct 24, 2016
1 parent 794c8f3 commit af55c022b29c2b60fbe4e5acbf67f3cb8b571027
Show file tree
Hide file tree
Showing 66 changed files with 102 additions and 144 deletions.
@@ -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();

@@ -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 )
@@ -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
@@ -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();
@@ -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 );

@@ -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;
@@ -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;
@@ -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
@@ -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
@@ -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;
@@ -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
@@ -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
@@ -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;
@@ -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
{
@@ -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
@@ -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*/
@@ -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*/
@@ -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;


@@ -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*/
@@ -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;


@@ -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,
@@ -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
@@ -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(); }
@@ -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 )
{}

@@ -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
@@ -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;
@@ -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;}
@@ -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

0 comments on commit af55c02

Please sign in to comment.