Skip to content
Permalink
Browse files
Rename Qgis::MessageLevel::None to NoLevel. None is a reserved
keyword in Python, so this value was previously inaccessible to PyQGIS
scripts

Also change all references to Qgis::MessageLevel values to their
fully qualified names, to ease a future transition to an enum
class (when sip bugs are fixed)

Fixes #42996
  • Loading branch information
nyalldawson committed May 30, 2021
1 parent 4e73dd9 commit 02266ef8e66ef6613d27e7818e0e7adf0d5a3271
Showing with 673 additions and 671 deletions.
  1. +1 −0 python/core/auto_additions/qgis.py
  2. +1 −1 python/core/auto_generated/layertree/qgslayertreemodel.sip.in
  3. +1 −1 python/core/auto_generated/locator/qgslocatorfilter.sip.in
  4. +1 −1 python/core/auto_generated/qgis.sip.in
  5. +3 −3 python/core/auto_generated/qgsmessagelog.sip.in
  6. +2 −2 python/core/auto_generated/qgsreadwritecontext.sip.in
  7. +1 −1 python/gui/auto_generated/processing/models/qgsmodelgraphicsscene.sip.in
  8. +1 −1 python/gui/auto_generated/qgsdataitemguiprovider.sip.in
  9. +1 −1 python/gui/auto_generated/qgsmapcanvas.sip.in
  10. +1 −1 python/gui/auto_generated/qgsmaptool.sip.in
  11. +6 −6 python/gui/auto_generated/qgsmessagebar.sip.in
  12. +4 −4 python/gui/auto_generated/qgsmessagebaritem.sip.in
  13. +1 −1 python/gui/auto_generated/qgspluginmanagerinterface.sip.in
  14. +1 −1 python/server/auto_generated/qgsserversettings.sip.in
  15. +1 −1 src/analysis/processing/qgsalgorithmbuffer.cpp
  16. +2 −2 src/analysis/raster/qgsninecellfilter.cpp
  17. +3 −3 src/app/3d/qgs3dmapconfigwidget.cpp
  18. +4 −4 src/app/dwg/qgsdwgimportdialog.cpp
  19. +14 −14 src/app/georeferencer/qgsgeorefmainwindow.cpp
  20. +1 −1 src/app/gps/qgsgpsbearingitem.cpp
  21. +1 −1 src/app/gps/qgsgpsmarker.cpp
  22. +1 −1 src/app/labeling/qgsmaptoolshowhidelabels.cpp
  23. +13 −13 src/app/layout/qgslayoutdesignerdialog.cpp
  24. +1 −1 src/app/locator/qgsinbuiltlocatorfilters.cpp
  25. +1 −1 src/app/pluginmanager/qgsapppluginmanagerinterface.h
  26. +2 −2 src/app/pluginmanager/qgspluginmanager.cpp
  27. +128 −128 src/app/qgisapp.cpp
  28. +1 −1 src/app/qgisapp.h
  29. +6 −6 src/app/qgsappcoordinateoperationhandlers.cpp
  30. +3 −3 src/app/qgsappscreenshots.cpp
  31. +2 −2 src/app/qgsattributetabledialog.cpp
  32. +3 −3 src/app/qgsguivectorlayertools.cpp
  33. +1 −1 src/app/qgshandlebadlayers.cpp
  34. +3 −3 src/app/qgsmaptooladdpart.cpp
  35. +2 −2 src/app/qgsmaptooladdring.cpp
  36. +1 −1 src/app/qgsmaptoolcircle2tangentspoint.cpp
  37. +1 −1 src/app/qgsmaptoolcircle3tangents.cpp
  38. +2 −2 src/app/qgsmaptoolfeatureaction.cpp
  39. +3 −3 src/app/qgsmaptoolfillring.cpp
  40. +1 −1 src/app/qgsmaptoolmovefeature.cpp
  41. +4 −4 src/app/qgsmaptooloffsetcurve.cpp
  42. +1 −1 src/app/qgsmaptooloffsetpointsymbol.cpp
  43. +1 −1 src/app/qgsmaptoolpointsymbol.cpp
  44. +4 −4 src/app/qgsmaptoolreshape.cpp
  45. +1 −1 src/app/qgsmaptoolrotatepointsymbols.cpp
  46. +5 −5 src/app/qgsmaptoolselectutils.cpp
  47. +5 −5 src/app/qgsmaptoolsplitfeatures.cpp
  48. +5 −5 src/app/qgsmaptoolsplitparts.cpp
  49. +4 −4 src/app/qgspluginregistry.cpp
  50. +3 −3 src/app/qgsselectbyformdialog.cpp
  51. +2 −2 src/app/qgstemporalcontrollerdockwidget.cpp
  52. +3 −3 src/app/vertextool/qgsvertextool.cpp
  53. +3 −3 src/auth/oauth2/gui/qgsauthoauth2edit.cpp
  54. +1 −1 src/core/layertree/qgslayertreemodel.h
  55. +1 −1 src/core/layout/qgslayoutexporter.cpp
  56. +1 −1 src/core/locator/qgslocatorfilter.h
  57. +3 −3 src/core/processing/qgsprocessingalgorithm.cpp
  58. +2 −2 src/core/processing/qgsprocessingalgrunnertask.cpp
  59. +6 −6 src/core/processing/qgsprocessingfeedback.cpp
  60. +6 −6 src/core/proj/qgscoordinatetransform_p.cpp
  61. +3 −3 src/core/project/qgsproject.cpp
  62. +4 −4 src/core/providers/ogr/qgsgeopackageprojectstorage.cpp
  63. +9 −9 src/core/providers/ogr/qgsgeopackageproviderconnection.cpp
  64. +3 −3 src/core/providers/ogr/qgsogrprovider.cpp
  65. +2 −1 src/core/qgis.h
  66. +1 −1 src/core/qgsfeature.cpp
  67. +3 −3 src/core/qgsgml.cpp
  68. +4 −4 src/core/qgsmessagelog.cpp
  69. +3 −3 src/core/qgsmessagelog.h
  70. +10 −10 src/core/qgsopenclutils.cpp
  71. +2 −2 src/core/qgsreadwritecontext.h
  72. +3 −3 src/core/raster/qgshillshaderenderer.cpp
  73. +4 −4 src/core/vector/qgsvectorlayerfeatureiterator.cpp
  74. +2 −2 src/gui/attributetable/qgsfeaturefilterwidget.cpp
  75. +6 −6 src/gui/auth/qgsauthauthoritieseditor.cpp
  76. +21 −21 src/gui/auth/qgsauthguiutils.cpp
  77. +3 −3 src/gui/auth/qgsauthidentitieseditor.cpp
  78. +5 −5 src/gui/auth/qgsauthserverseditor.cpp
  79. +1 −1 src/gui/editorwidgets/qgsdatetimeeditwrapper.cpp
  80. +1 −1 src/gui/labeling/qgslabelengineconfigdialog.cpp
  81. +2 −2 src/gui/layertree/qgslayertreeview.cpp
  82. +2 −2 src/gui/processing/models/qgsmodelcomponentgraphicitem.cpp
  83. +6 −6 src/gui/processing/models/qgsmodeldesignerdialog.cpp
  84. +1 −1 src/gui/processing/models/qgsmodelgraphicsscene.cpp
  85. +1 −1 src/gui/processing/models/qgsmodelgraphicsscene.h
  86. +1 −1 src/gui/processing/qgsprocessingalgorithmdialogbase.cpp
  87. +2 −2 src/gui/processing/qgsprocessingwidgetwrapperimpl.cpp
  88. +12 −12 src/gui/providers/ogr/qgsgeopackageitemguiprovider.cpp
  89. +1 −1 src/gui/qgsabstractrelationeditorwidget.cpp
  90. +7 −7 src/gui/qgsattributeform.cpp
  91. +1 −1 src/gui/qgsdataitemguiprovider.cpp
  92. +1 −1 src/gui/qgsdataitemguiprovider.h
  93. +1 −1 src/gui/qgsdatasourcemanagerdialog.cpp
  94. +4 −4 src/gui/qgsexpressionselectiondialog.cpp
  95. +1 −1 src/gui/qgsfilecontentsourcelineedit.cpp
  96. +1 −1 src/gui/qgsgui.cpp
  97. +1 −1 src/gui/qgshelp.cpp
  98. +6 −6 src/gui/qgsmapcanvas.cpp
  99. +1 −1 src/gui/qgsmapcanvas.h
  100. +1 −1 src/gui/qgsmapcanvastracer.cpp
  101. +1 −1 src/gui/qgsmaplayerloadstyledialog.cpp
  102. +1 −1 src/gui/qgsmaptool.h
  103. +8 −8 src/gui/qgsmaptooldigitizefeature.cpp
  104. +1 −1 src/gui/qgsmaskingwidget.cpp
  105. +13 −13 src/gui/qgsmessagebar.cpp
  106. +7 −7 src/gui/qgsmessagebar.h
  107. +7 −7 src/gui/qgsmessagebaritem.cpp
  108. +4 −4 src/gui/qgsmessagebaritem.h
  109. +5 −5 src/gui/qgsmessagelogviewer.cpp
  110. +1 −1 src/gui/qgspluginmanagerinterface.h
  111. +1 −1 src/gui/qgsprojectionselectiontreewidget.cpp
  112. +5 −5 src/gui/vector/qgsvectorlayerproperties.cpp
  113. +1 −1 src/plugins/grass/qgsgrassplugin.cpp
  114. +1 −1 src/plugins/topology/topolError.cpp
  115. +1 −1 src/process/qgsprocess.cpp
  116. +3 −3 src/providers/db2/qgsdb2newconnection.cpp
  117. +2 −2 src/providers/hana/qgshananewconnection.cpp
  118. +2 −2 src/providers/oracle/qgsoraclenewconnection.cpp
  119. +9 −9 src/providers/pdal/qgspdaleptgenerationtask.cpp
  120. +2 −2 src/providers/postgres/qgspgnewconnection.cpp
  121. +8 −8 src/providers/postgres/qgspostgresprojectstorage.cpp
  122. +45 −45 src/providers/postgres/raster/qgspostgresrasterprovider.cpp
  123. +6 −6 src/providers/postgres/raster/qgspostgresrastershareddata.cpp
  124. +3 −3 src/providers/postgres/raster/qgspostgresrasterutils.cpp
  125. +1 −1 src/providers/spatialite/qgsspatialiteprovider.cpp
  126. +7 −7 src/providers/spatialite/qgsspatialiteproviderconnection.cpp
  127. +2 −2 src/providers/wfs/qgswfsdataitems.cpp
  128. +1 −1 src/providers/wms/qgswmsprovider.cpp
  129. +1 −1 src/server/qgis_map_serv.cpp
  130. +1 −1 src/server/qgis_mapserver.cpp
  131. +5 −5 src/server/qgsaccesscontrolfilter.cpp
  132. +6 −6 src/server/qgsconfigcache.cpp
  133. +7 −7 src/server/qgsfcgiserverrequest.cpp
  134. +1 −1 src/server/qgsrequesthandler.cpp
  135. +26 −26 src/server/qgsserver.cpp
  136. +5 −5 src/server/qgsserverapiutils.cpp
  137. +1 −1 src/server/qgsserverlogger.h
  138. +3 −3 src/server/qgsserverogcapi.cpp
  139. +7 −7 src/server/qgsserverogcapihandler.cpp
  140. +5 −5 src/server/qgsserverplugins.cpp
  141. +4 −4 src/server/qgsserversettings.cpp
  142. +1 −1 src/server/qgsserversettings.h
  143. +1 −1 src/server/qgsserverstatichandler.cpp
  144. +3 −3 src/server/qgsserviceregistry.cpp
  145. +1 −1 src/server/services/wfs/qgswfsparameters.cpp
  146. +2 −2 src/server/services/wfs/qgswfstransaction.cpp
  147. +2 −2 src/server/services/wfs3/qgswfs3handlers.cpp
  148. +2 −2 src/server/services/wms/qgsmaprendererjobproxy.cpp
  149. +2 −2 src/server/services/wms/qgswmsgetschemaextension.cpp
  150. +1 −1 src/server/services/wms/qgswmsparameters.cpp
  151. +1 −1 src/server/services/wms/qgswmsrenderer.cpp
  152. +1 −1 src/server/services/wmts/qgswmtsparameters.cpp
  153. +1 −1 tests/code_layout/acceptable_missing_doc.py
  154. +1 −1 tests/src/core/testqgsprojectstorage.cpp
  155. +4 −4 tests/src/gui/testqgsmessagebar.cpp
@@ -17,6 +17,7 @@
QgsMapLayer.PointCloudLayer.__doc__ = "Added in 3.18"
QgsMapLayerType.__doc__ = 'Types of layers that can be added to a map\n\n.. versionadded:: 3.8\n\n' + '* ``VectorLayer``: ' + QgsMapLayerType.VectorLayer.__doc__ + '\n' + '* ``RasterLayer``: ' + QgsMapLayerType.RasterLayer.__doc__ + '\n' + '* ``PluginLayer``: ' + QgsMapLayerType.PluginLayer.__doc__ + '\n' + '* ``MeshLayer``: ' + QgsMapLayerType.MeshLayer.__doc__ + '\n' + '* ``VectorTileLayer``: ' + QgsMapLayerType.VectorTileLayer.__doc__ + '\n' + '* ``AnnotationLayer``: ' + QgsMapLayerType.AnnotationLayer.__doc__ + '\n' + '* ``PointCloudLayer``: ' + QgsMapLayerType.PointCloudLayer.__doc__
# --
Qgis.MessageLevel.baseClass = Qgis
# monkey patching scoped based enum
Qgis.UnknownDataType = Qgis.DataType.UnknownDataType
Qgis.UnknownDataType.__doc__ = "Unknown or unspecified type"
@@ -324,7 +324,7 @@ displays.

signals:

void messageEmitted( const QString &message, Qgis::MessageLevel level = Qgis::Info, int duration = 5 );
void messageEmitted( const QString &message, Qgis::MessageLevel level = Qgis::MessageLevel::Info, int duration = 5 );
%Docstring
Emits a message than can be displayed to the user in a GUI class

@@ -310,7 +310,7 @@ custom configuration widget.
:py:func:`~QgsLocatorFilter.hasConfigWidget` must return ``True`` to indicate that the filter supports configuration.
%End

void logMessage( const QString &message, Qgis::MessageLevel level = Qgis::Info );
void logMessage( const QString &message, Qgis::MessageLevel level = Qgis::MessageLevel::Info );
%Docstring
Logs a ``message`` to the log panel

@@ -81,7 +81,7 @@ The development version
Warning,
Critical,
Success,
None,
NoLevel,
};

enum class DataType
@@ -35,7 +35,7 @@ window for the user.
Constructor for QgsMessageLog.
%End

static void logMessage( const QString &message, const QString &tag = QString(), Qgis::MessageLevel level = Qgis::Warning, bool notifyUser = true );
static void logMessage( const QString &message, const QString &tag = QString(), Qgis::MessageLevel level = Qgis::MessageLevel::Warning, bool notifyUser = true );
%Docstring
Adds a ``message`` to the log instance (and creates it if necessary).

@@ -57,7 +57,7 @@ value for the message.

void messageReceived( bool received );
%Docstring
Emitted whenever the log receives a message which is not a Qgis.Info level message
Emitted whenever the log receives a message which is not a Qgis.MessageLevel.Info level message
and which has the ``notifyUser`` flag as ``True``.

If :py:class:`QgsMessageLogNotifyBlocker` objects have been created then this signal may be
@@ -124,7 +124,7 @@ Constructor for QgsMessageLogConsole.

protected:

QString formatLogMessage( const QString &message, const QString &tag, Qgis::MessageLevel level = Qgis::Info ) const;
QString formatLogMessage( const QString &message, const QString &tag, Qgis::MessageLevel level = Qgis::MessageLevel::Info ) const;
%Docstring
Formats a log message. Used by child classes.

@@ -25,7 +25,7 @@ The class is used as a container of context for various read/write operations on

struct ReadWriteMessage
{
ReadWriteMessage( const QString &message = QString(), Qgis::MessageLevel level = Qgis::Warning, const QStringList &categories = QStringList() );
ReadWriteMessage( const QString &message = QString(), Qgis::MessageLevel level = Qgis::MessageLevel::Warning, const QStringList &categories = QStringList() );
%Docstring
Construct a container for QgsReadWriteContext error or warning messages
%End
@@ -74,7 +74,7 @@ Returns path resolver for conversion between relative and absolute paths
Sets up path resolver for conversion between relative and absolute paths
%End

void pushMessage( const QString &message, Qgis::MessageLevel level = Qgis::Warning ) const;
void pushMessage( const QString &message, Qgis::MessageLevel level = Qgis::MessageLevel::Warning ) const;
%Docstring
Append a message to the context

@@ -148,7 +148,7 @@ Sets the message ``bar`` associated with the scene.
.. seealso:: :py:func:`messageBar`
%End

void showWarning( const QString &shortMessage, const QString &title, const QString &longMessage, Qgis::MessageLevel level = Qgis::Warning ) const;
void showWarning( const QString &shortMessage, const QString &title, const QString &longMessage, Qgis::MessageLevel level = Qgis::MessageLevel::Warning ) const;
%Docstring
Shows a warning message, allowing users to click a button to see the full details (``longMessage``).
%End
@@ -158,7 +158,7 @@ The function is replacement of :py:func:`QgsDataItem.paramWidget()`
.. versionadded:: 3.10
%End

static void notify( const QString &title, const QString &message, QgsDataItemGuiContext context, Qgis::MessageLevel level = Qgis::Info, int duration = -1, QWidget *parent = 0 );
static void notify( const QString &title, const QString &message, QgsDataItemGuiContext context, Qgis::MessageLevel level = Qgis::MessageLevel::Info, int duration = -1, QWidget *parent = 0 );
%Docstring
Notify the user showing a ``message`` with ``title`` and ``level``
If the context has a message bar the message will be shown in the message bar
@@ -1220,7 +1220,7 @@ Emitted when the canvas has been assigned a different map theme.
.. versionadded:: 3.0
%End

void messageEmitted( const QString &title, const QString &message, Qgis::MessageLevel = Qgis::Info );
void messageEmitted( const QString &title, const QString &message, Qgis::MessageLevel = Qgis::MessageLevel::Info );
%Docstring
emit a message (usually to be displayed in a message bar)
%End
@@ -239,7 +239,7 @@ The default implementation does nothing and returns false.
%End

signals:
void messageEmitted( const QString &message, Qgis::MessageLevel = Qgis::Info );
void messageEmitted( const QString &message, Qgis::MessageLevel = Qgis::MessageLevel::Info );
%Docstring
emit a message
%End
@@ -50,13 +50,13 @@ and putting it in a stack.
The message bar will take ownership of ``item``.
%End

QgsMessageBarItem *pushWidget( QWidget *widget /Transfer/, Qgis::MessageLevel level = Qgis::Info, int duration = 0 );
QgsMessageBarItem *pushWidget( QWidget *widget /Transfer/, Qgis::MessageLevel level = Qgis::MessageLevel::Info, int duration = 0 );
%Docstring
Display a ``widget`` as a message on the bar, after hiding the currently visible one
and putting it in a stack.

:param widget: message widget to display
:param level: is Qgis.Info, Warning, Critical or Success
:param level: is Qgis.MessageLevel.Info, Warning, Critical or Success
:param duration: timeout duration of message in seconds, 0 value indicates no timeout (i.e.
the message must be manually cleared by the user).
%End
@@ -107,7 +107,7 @@ The caller takes ownership of the returned item.
instead.
%End

void pushMessage( const QString &text, Qgis::MessageLevel level = Qgis::Info, int duration = -1 );
void pushMessage( const QString &text, Qgis::MessageLevel level = Qgis::MessageLevel::Info, int duration = -1 );
%Docstring
A convenience method for pushing a message with the specified ``text`` to the bar.

@@ -119,7 +119,7 @@ is set to 0, then the message must be manually dismissed by the user. Since QGIS
the default timeout for the message ``level`` should be used.
%End

void pushMessage( const QString &title, const QString &text, Qgis::MessageLevel level = Qgis::Info, int duration = -1 );
void pushMessage( const QString &title, const QString &text, Qgis::MessageLevel level = Qgis::MessageLevel::Info, int duration = -1 );
%Docstring
A convenience method for pushing a message with the specified ``title`` and ``text`` to the bar.

@@ -131,7 +131,7 @@ is set to 0, then the message must be manually dismissed by the user. Since QGIS
the default timeout for the message ``level`` should be used.
%End

void pushMessage( const QString &title, const QString &text, const QString &showMore, Qgis::MessageLevel level = Qgis::Info, int duration = -1 );
void pushMessage( const QString &title, const QString &text, const QString &showMore, Qgis::MessageLevel level = Qgis::MessageLevel::Info, int duration = -1 );
%Docstring
A convenience method for pushing a message with the specified ``title`` and ``text`` to the bar. Additional
message content specified via ``showMore`` will be shown when the user presses a "more" button.
@@ -156,7 +156,7 @@ Returns a list of all items currently visible or queued for the bar.
.. versionadded:: 3.14
%End

static int defaultMessageTimeout( Qgis::MessageLevel level = Qgis::None );
static int defaultMessageTimeout( Qgis::MessageLevel level = Qgis::MessageLevel::NoLevel );
%Docstring
Returns the default timeout in seconds for timed messages of the specified ``level``.

@@ -23,7 +23,7 @@ Represents an item shown within a :py:class:`QgsMessageBar` widget.
%End
public:

QgsMessageBarItem( const QString &text, Qgis::MessageLevel level = Qgis::Info, int duration = 0, QWidget *parent /TransferThis/ = 0 );
QgsMessageBarItem( const QString &text, Qgis::MessageLevel level = Qgis::MessageLevel::Info, int duration = 0, QWidget *parent /TransferThis/ = 0 );
%Docstring
Constructor for QgsMessageBarItem, containing a message with the specified ``text`` to be displayed on the bar.

@@ -35,7 +35,7 @@ is set to 0, then the message must be manually dismissed by the user. Since QGIS
the default timeout for the message ``level`` should be used.
%End

QgsMessageBarItem( const QString &title, const QString &text, Qgis::MessageLevel level = Qgis::Info, int duration = 0, QWidget *parent /TransferThis/ = 0 );
QgsMessageBarItem( const QString &title, const QString &text, Qgis::MessageLevel level = Qgis::MessageLevel::Info, int duration = 0, QWidget *parent /TransferThis/ = 0 );
%Docstring
Constructor for QgsMessageBarItem, containing a ``title`` and message with the specified ``text`` to be displayed on the bar.

@@ -47,7 +47,7 @@ is set to 0, then the message must be manually dismissed by the user. Since QGIS
the default timeout for the message ``level`` should be used.
%End

QgsMessageBarItem( const QString &title, const QString &text, QWidget *widget, Qgis::MessageLevel level = Qgis::Info, int duration = 0, QWidget *parent /TransferThis/ = 0 );
QgsMessageBarItem( const QString &title, const QString &text, QWidget *widget, Qgis::MessageLevel level = Qgis::MessageLevel::Info, int duration = 0, QWidget *parent /TransferThis/ = 0 );
%Docstring
Constructor for QgsMessageBarItem, containing a ``title``, message with the specified ``text``, and a custom ``widget`` to be displayed on the bar.

@@ -59,7 +59,7 @@ is set to 0, then the message must be manually dismissed by the user. Since QGIS
the default timeout for the message ``level`` should be used.
%End

QgsMessageBarItem( QWidget *widget, Qgis::MessageLevel level = Qgis::Info, int duration = 0, QWidget *parent /TransferThis/ = 0 );
QgsMessageBarItem( QWidget *widget, Qgis::MessageLevel level = Qgis::MessageLevel::Info, int duration = 0, QWidget *parent /TransferThis/ = 0 );
%Docstring
Constructor for QgsMessageBarItem, containing a custom ``widget`` to be displayed on the bar.

@@ -57,7 +57,7 @@ add repository to the repository listWidget
show the Plugin Manager window and optionally open tab tabIndex
%End

virtual void pushMessage( const QString &text, Qgis::MessageLevel level = Qgis::Info, int duration = -1 ) = 0;
virtual void pushMessage( const QString &text, Qgis::MessageLevel level = Qgis::MessageLevel::Info, int duration = -1 ) = 0;
%Docstring
show the given message in the Plugin Manager internal message bar
%End
@@ -131,7 +131,7 @@ Returns ``True`` if profile information has to be added to the logs, default val

.. note::

this flag is only effective when :py:func:`~QgsServerSettings.logLevel` returns Qgis.Info (0)
this flag is only effective when :py:func:`~QgsServerSettings.logLevel` returns Qgis.MessageLevel.Info (0)

.. seealso:: :py:func:`logLevel`

@@ -140,7 +140,7 @@ QVariantMap QgsBufferAlgorithm::processAlgorithm( const QVariantMap &parameters,
QgsGeometry outputGeometry = f.geometry().buffer( distance, segments, endCapStyle, joinStyle, miterLimit );
if ( outputGeometry.isNull() )
{
QgsMessageLog::logMessage( QObject::tr( "Error calculating buffer for feature %1" ).arg( f.id() ), QObject::tr( "Processing" ), Qgis::Warning );
QgsMessageLog::logMessage( QObject::tr( "Error calculating buffer for feature %1" ).arg( f.id() ), QObject::tr( "Processing" ), Qgis::MessageLevel::Warning );
}
if ( dissolve )
bufferedGeometriesForDissolve << outputGeometry;
@@ -60,15 +60,15 @@ int QgsNineCellFilter::processRaster( QgsFeedback *feedback )
catch ( cl::Error &e )
{
QString err = QObject::tr( "Error running OpenCL program: %1 - %2" ).arg( e.what( ), QgsOpenClUtils::errorText( e.err( ) ) );
QgsMessageLog::logMessage( err, QgsOpenClUtils::LOGMESSAGE_TAG, Qgis::Critical );
QgsMessageLog::logMessage( err, QgsOpenClUtils::LOGMESSAGE_TAG, Qgis::MessageLevel::Critical );
throw QgsProcessingException( err );
}
}
else
{
QString err = QObject::tr( "Error loading OpenCL program sources" );
QgsMessageLog::logMessage( err,
QgsOpenClUtils::LOGMESSAGE_TAG, Qgis::Critical );
QgsOpenClUtils::LOGMESSAGE_TAG, Qgis::MessageLevel::Critical );
throw QgsProcessingException( err );
}
}
@@ -452,15 +452,15 @@ void Qgs3DMapConfigWidget::validate()
if ( ! cboTerrainLayer->currentLayer() )
{
valid = false;
mMessageBar->pushMessage( tr( "An elevation layer must be selected for a DEM terrain" ), Qgis::Critical );
mMessageBar->pushMessage( tr( "An elevation layer must be selected for a DEM terrain" ), Qgis::MessageLevel::Critical );
}
break;

case QgsTerrainGenerator::Mesh:
if ( ! cboTerrainLayer->currentLayer() )
{
valid = false;
mMessageBar->pushMessage( tr( "An elevation layer must be selected for a mesh terrain" ), Qgis::Critical );
mMessageBar->pushMessage( tr( "An elevation layer must be selected for a mesh terrain" ), Qgis::MessageLevel::Critical );
}
break;

@@ -471,7 +471,7 @@ void Qgs3DMapConfigWidget::validate()

if ( valid && widgetLights->directionalLights().empty() && widgetLights->pointLights().empty() )
{
mMessageBar->pushMessage( tr( "No lights exist in the scene" ), Qgis::Warning );
mMessageBar->pushMessage( tr( "No lights exist in the scene" ), Qgis::MessageLevel::Warning );
}

emit isValidChanged( valid );
@@ -93,7 +93,7 @@ QgsDwgImportDialog::QgsDwgImportDialog( QWidget *parent, Qt::WindowFlags f )

if ( ! QgsVectorFileWriter::supportedFormatExtensions().contains( QStringLiteral( "gpkg" ) ) )
{
bar->pushMessage( tr( "GDAL/OGR not built with GPKG (sqlite3) support. You will not be able to export the DWG in a GPKG." ), Qgis::Critical );
bar->pushMessage( tr( "GDAL/OGR not built with GPKG (sqlite3) support. You will not be able to export the DWG in a GPKG." ), Qgis::MessageLevel::Critical );
}
pbLoadDatabase_clicked();
updateUI();
@@ -233,7 +233,7 @@ void QgsDwgImportDialog::pbLoadDatabase_clicked()
}
else
{
bar->pushMessage( tr( "Could not open layer list" ), Qgis::Critical );
bar->pushMessage( tr( "Could not open layer list" ), Qgis::MessageLevel::Critical );
}
}

@@ -260,11 +260,11 @@ void QgsDwgImportDialog::pbImportDrawing_clicked()
QString error;
if ( importer.import( leDrawing->text(), error, cbExpandInserts->isChecked(), cbUseCurves->isChecked(), lblMessage ) )
{
bar->pushMessage( tr( "Drawing import completed." ), Qgis::Info );
bar->pushMessage( tr( "Drawing import completed." ), Qgis::MessageLevel::Info );
}
else
{
bar->pushMessage( tr( "Drawing import failed (%1)" ).arg( error ), Qgis::Critical );
bar->pushMessage( tr( "Drawing import failed (%1)" ).arg( error ), Qgis::MessageLevel::Critical );
}

pbLoadDatabase_clicked();

0 comments on commit 02266ef

Please sign in to comment.