Skip to content

Commit f58cc38

Browse files
3nidsnyalldawson
authored andcommitted
mark static methods as such
1 parent 94b1082 commit f58cc38

File tree

2 files changed

+18
-18
lines changed

2 files changed

+18
-18
lines changed

src/quickgui/qgsquickutils.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -43,17 +43,17 @@ QgsCoordinateReferenceSystem QgsQuickUtils::coordinateReferenceSystemFromEpsgId(
4343
return QgsCoordinateReferenceSystem::fromEpsgId( epsg );
4444
}
4545

46-
QgsPointXY QgsQuickUtils::pointXY( double x, double y ) const
46+
QgsPointXY QgsQuickUtils::pointXY( double x, double y )
4747
{
4848
return QgsPointXY( x, y );
4949
}
5050

51-
QgsPoint QgsQuickUtils::point( double x, double y, double z, double m ) const
51+
QgsPoint QgsQuickUtils::point( double x, double y, double z, double m )
5252
{
5353
return QgsPoint( x, y, z, m );
5454
}
5555

56-
QgsPoint QgsQuickUtils::coordinateToPoint( const QGeoCoordinate &coor ) const
56+
QgsPoint QgsQuickUtils::coordinateToPoint( const QGeoCoordinate &coor )
5757
{
5858
return QgsPoint( coor.longitude(), coor.latitude(), coor.altitude() );
5959
}
@@ -85,14 +85,14 @@ double QgsQuickUtils::screenUnitsToMeters( QgsQuickMapSettings *mapSettings, int
8585
return mDistanceArea.measureLine( p1, p2 );
8686
}
8787

88-
bool QgsQuickUtils::fileExists( const QString &path ) const
88+
bool QgsQuickUtils::fileExists( const QString &path )
8989
{
9090
QFileInfo check_file( path );
9191
// check if file exists and if yes: Is it really a file and no directory?
9292
return ( check_file.exists() && check_file.isFile() );
9393
}
9494

95-
QString QgsQuickUtils::getFileName( const QString &path ) const
95+
QString QgsQuickUtils::getFileName( const QString &path )
9696
{
9797
QFileInfo fileInfo( path );
9898
QString filename( fileInfo.fileName() );
@@ -104,12 +104,12 @@ void QgsQuickUtils::logMessage( const QString &message, const QString &tag, Qgis
104104
QgsMessageLog::logMessage( message, tag, level );
105105
}
106106

107-
QgsQuickFeatureLayerPair QgsQuickUtils::featureFactory( const QgsFeature &feature, QgsVectorLayer *layer ) const
107+
QgsQuickFeatureLayerPair QgsQuickUtils::featureFactory( const QgsFeature &feature, QgsVectorLayer *layer )
108108
{
109109
return QgsQuickFeatureLayerPair( feature, layer );
110110
}
111111

112-
const QUrl QgsQuickUtils::getThemeIcon( const QString &name ) const
112+
const QUrl QgsQuickUtils::getThemeIcon( const QString &name )
113113
{
114114
QString path = QStringLiteral( "qrc:/%1.svg" ).arg( name );
115115
QgsDebugMsg( QStringLiteral( "Using icon %1 from %2" ).arg( name, path ) );

src/quickgui/qgsquickutils.h

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -86,21 +86,21 @@ class QUICK_EXPORT QgsQuickUtils: public QObject
8686
*
8787
* \since QGIS 3.4
8888
*/
89-
Q_INVOKABLE QgsPointXY pointXY( double x, double y ) const;
89+
Q_INVOKABLE static QgsPointXY pointXY( double x, double y );
9090

9191
/**
9292
* Creates QgsPoint in QML
9393
*
9494
* \since QGIS 3.4
9595
*/
96-
Q_INVOKABLE QgsPoint point( double x, double y, double z = std::numeric_limits<double>::quiet_NaN(), double m = std::numeric_limits<double>::quiet_NaN() ) const;
96+
Q_INVOKABLE static QgsPoint point( double x, double y, double z = std::numeric_limits<double>::quiet_NaN(), double m = std::numeric_limits<double>::quiet_NaN() );
9797

9898
/**
9999
* Converts QGeoCoordinate to QgsPoint
100100
*
101101
* \since QGIS 3.4
102102
*/
103-
Q_INVOKABLE QgsPoint coordinateToPoint( const QGeoCoordinate &coor ) const;
103+
Q_INVOKABLE static QgsPoint coordinateToPoint( const QGeoCoordinate &coor );
104104

105105
/**
106106
* Transforms point between different crs from QML
@@ -121,20 +121,20 @@ class QUICK_EXPORT QgsQuickUtils: public QObject
121121
* Returns whether file on path exists
122122
* \since QGIS 3.4
123123
*/
124-
Q_INVOKABLE bool fileExists( const QString &path ) const;
124+
Q_INVOKABLE static bool fileExists( const QString &path );
125125

126126
/**
127127
* Extracts filename from path
128128
* \since QGIS 3.4
129129
*/
130-
Q_INVOKABLE QString getFileName( const QString &path ) const;
130+
Q_INVOKABLE static QString getFileName( const QString &path );
131131

132132
/**
133133
* Log message in QgsMessageLog
134134
*/
135-
Q_INVOKABLE void logMessage( const QString &message,
136-
const QString &tag = QString( "QgsQuick" ),
137-
Qgis::MessageLevel level = Qgis::Warning );
135+
Q_INVOKABLE static void logMessage( const QString &message,
136+
const QString &tag = QString( "QgsQuick" ),
137+
Qgis::MessageLevel level = Qgis::Warning );
138138

139139
/**
140140
* QgsQuickFeatureLayerPair factory for tuple of QgsFeature and QgsVectorLayer used in QgsQUick library.
@@ -143,14 +143,14 @@ class QUICK_EXPORT QgsQuickUtils: public QObject
143143
*
144144
* \since QGIS 3.4
145145
*/
146-
Q_INVOKABLE QgsQuickFeatureLayerPair featureFactory( const QgsFeature &feature, QgsVectorLayer *layer = nullptr ) const;
146+
Q_INVOKABLE static QgsQuickFeatureLayerPair featureFactory( const QgsFeature &feature, QgsVectorLayer *layer = nullptr );
147147

148148
/**
149149
* Returns QUrl to image from library's /images folder.
150150
*
151151
* \since QGIS 3.4
152152
*/
153-
Q_INVOKABLE const QUrl getThemeIcon( const QString &name ) const;
153+
Q_INVOKABLE static const QUrl getThemeIcon( const QString &name );
154154

155155
/**
156156
* Returns url to field editor component for a feature form.
@@ -159,7 +159,7 @@ class QUICK_EXPORT QgsQuickUtils: public QObject
159159
*
160160
* \since QGIS 3.4
161161
*/
162-
Q_INVOKABLE const QUrl getEditorComponentSource( const QString &widgetName );
162+
Q_INVOKABLE static const QUrl getEditorComponentSource( const QString &widgetName );
163163

164164
/**
165165
* \copydoc QgsCoordinateFormatter::format()

0 commit comments

Comments
 (0)