Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[processing] Include version information at start of log
Start the log text with QGIS/Qt/GEOS/GDAL version information strings. This is helpful for debugging and accountability.
- Loading branch information
1 parent
8ec0262
commit 7674e16
Showing
5 changed files
with
78 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,6 +16,63 @@ | |
***************************************************************************/ | ||
|
||
#include "qgsprocessingfeedback.h" | ||
#include "qgsgeos.h" | ||
#include <ogr_api.h> | ||
#include <gdal_version.h> | ||
#if PROJ_VERSION_MAJOR > 4 | ||
#include <proj.h> | ||
#else | ||
#include <proj_api.h> | ||
#endif | ||
|
||
void QgsProcessingFeedback::setProgressText( const QString & ) | ||
{ | ||
} | ||
|
||
void QgsProcessingFeedback::reportError( const QString &error, bool ) | ||
{ | ||
QgsMessageLog::logMessage( error, tr( "Processing" ), Qgis::Critical ); | ||
} | ||
|
||
void QgsProcessingFeedback::pushInfo( const QString &info ) | ||
{ | ||
QgsMessageLog::logMessage( info, tr( "Processing" ), Qgis::Info ); | ||
} | ||
|
||
void QgsProcessingFeedback::pushCommandInfo( const QString &info ) | ||
{ | ||
QgsMessageLog::logMessage( info, tr( "Processing" ), Qgis::Info ); | ||
} | ||
|
||
void QgsProcessingFeedback::pushDebugInfo( const QString &info ) | ||
{ | ||
QgsMessageLog::logMessage( info, tr( "Processing" ), Qgis::Info ); | ||
} | ||
|
||
void QgsProcessingFeedback::pushConsoleInfo( const QString &info ) | ||
{ | ||
QgsMessageLog::logMessage( info, tr( "Processing" ), Qgis::Info ); | ||
} | ||
|
||
void QgsProcessingFeedback::pushVersionInfo() | ||
{ | ||
pushDebugInfo( tr( "QGIS version: %1" ).arg( Qgis::QGIS_VERSION ) ); | ||
if ( QString( Qgis::QGIS_DEV_VERSION ) != QLatin1String( "exported" ) ) | ||
{ | ||
pushDebugInfo( tr( "QGIS code revision: %1" ).arg( Qgis::QGIS_DEV_VERSION ) ); | ||
} | ||
pushDebugInfo( tr( "Qt version: %1" ).arg( qVersion() ) ); | ||
pushDebugInfo( tr( "GDAL version: %1" ).arg( GDALVersionInfo( "RELEASE_NAME" ) ) ); | ||
pushDebugInfo( tr( "GEOS version: %1" ).arg( GEOSversion() ) ); | ||
|
||
#if PROJ_VERSION_MAJOR > 4 | ||
PJ_INFO info = proj_info(); | ||
pushDebugInfo( tr( "PROJ version: %1.%2.%3" ).arg( PROJ_VERSION_MAJOR ).arg( PROJ_VERSION_MINOR ).arg( PROJ_VERSION_PATCH ); | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
nirvn
Contributor
|
||
#else | ||
pushDebugInfo( tr( "PROJ version: %1" ).arg( PJ_VERSION ) ); | ||
#endif | ||
} | ||
|
||
|
||
QgsProcessingMultiStepFeedback::QgsProcessingMultiStepFeedback( int childAlgorithmCount, QgsProcessingFeedback *feedback ) | ||
: mChildSteps( childAlgorithmCount ) | ||
|
@@ -68,4 +125,3 @@ void QgsProcessingMultiStepFeedback::updateOverallProgress( double progress ) | |
mFeedback->setProgress( baseProgress + currentAlgorithmProgress ); | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@nyalldawson , this commit broke the build, make throws this error: