"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/app/qgisapp.cpp" between
QGIS-final-3_10_11.tar.gz and QGIS-final-3_10_12.tar.gz

About: QGIS (Quantum GIS) is a Geographic Information System that supports vector, raster, and database formats. Long-term release (3.10.x series).

qgisapp.cpp  (QGIS-final-3_10_11):qgisapp.cpp  (QGIS-final-3_10_12)
skipping to change at line 1675 skipping to change at line 1675
delete mBrowserWidget; delete mBrowserWidget;
mBrowserWidget = nullptr; mBrowserWidget = nullptr;
delete mBrowserWidget2; delete mBrowserWidget2;
mBrowserWidget2 = nullptr; mBrowserWidget2 = nullptr;
delete mBrowserModel; delete mBrowserModel;
mBrowserModel = nullptr; mBrowserModel = nullptr;
delete mGeometryValidationDock; delete mGeometryValidationDock;
mGeometryValidationDock = nullptr; mGeometryValidationDock = nullptr;
delete mSnappingUtils; delete mSnappingUtils;
mSnappingUtils = nullptr; mSnappingUtils = nullptr;
delete mUserInputDockWidget;
mUserInputDockWidget = nullptr;
QgsGui::instance()->nativePlatformInterface()->cleanup(); QgsGui::instance()->nativePlatformInterface()->cleanup();
// This function *MUST* be the last one called, as it destroys in // This function *MUST* be the last one called, as it destroys in
// particular GDAL. As above objects can hold GDAL/OGR objects, it is not // particular GDAL. As above objects can hold GDAL/OGR objects, it is not
// safe destroying them afterwards // safe destroying them afterwards
QgsApplication::exitQgis(); QgsApplication::exitQgis();
// Do *NOT* add anything here ! // Do *NOT* add anything here !
} }
skipping to change at line 4703 skipping to change at line 4705
if ( QString( Qgis::QGIS_DEV_VERSION ) == QLatin1String( "exported" ) ) if ( QString( Qgis::QGIS_DEV_VERSION ) == QLatin1String( "exported" ) )
{ {
versionString += tr( "QGIS code branch" ); versionString += tr( "QGIS code branch" );
if ( Qgis::QGIS_VERSION.endsWith( QLatin1String( "Master" ) ) ) if ( Qgis::QGIS_VERSION.endsWith( QLatin1String( "Master" ) ) )
{ {
versionString += QLatin1String( "</td><td><a href=\"https://github.com/q gis/QGIS/tree/master\">master</a></td>" ); versionString += QLatin1String( "</td><td><a href=\"https://github.com/q gis/QGIS/tree/master\">master</a></td>" );
} }
else else
{ {
versionString += QStringLiteral( "</td><td><a href=\"https://github.com/qg versionString += QStringLiteral( "</td><td><a href=\"https://github.com/
is/QGIS/tree/release-%1_%2\">Release %1.%2</a></td>" ) qgis/QGIS/tree/release-%1_%2\">Release %1.%2</a></td>" )
.arg( Qgis::QGIS_VERSION_INT / 10000 ).arg( Qgis::QGIS_VE .arg( Qgis::QGIS_VERSION_INT / 10000 ).arg( Qgis::QGIS_
RSION_INT / 100 % 100 ); VERSION_INT / 100 % 100 );
} }
} }
else else
{ {
versionString += QStringLiteral( "%1</td><td><a href=\"https://github.com/ qgis/QGIS/commit/%2\">%2</a></td>" ).arg( tr( "QGIS code revision" ) ).arg( Qgis ::QGIS_DEV_VERSION ); versionString += QStringLiteral( "%1</td><td><a href=\"https://github.com/ qgis/QGIS/commit/%2\">%2</a></td>" ).arg( tr( "QGIS code revision" ) ).arg( Qgis ::QGIS_DEV_VERSION );
} }
versionString += QLatin1String( "</tr><tr>" ); versionString += QLatin1String( "</tr><tr>" );
versionString += QStringLiteral( "<td>%1</td><td>%2</td>" ).arg( tr( "Compil ed against Qt" ), QT_VERSION_STR ); versionString += QStringLiteral( "<td>%1</td><td>%2</td>" ).arg( tr( "Compil ed against Qt" ), QT_VERSION_STR );
skipping to change at line 7147 skipping to change at line 7149
{ {
const auto canvases = mapCanvases(); const auto canvases = mapCanvases();
for ( QgsMapCanvas *canvas : canvases ) for ( QgsMapCanvas *canvas : canvases )
canvas->stopRendering(); canvas->stopRendering();
} }
//reimplements method from base (gui) class //reimplements method from base (gui) class
void QgisApp::hideAllLayers() void QgisApp::hideAllLayers()
{ {
QgsDebugMsg( QStringLiteral( "hiding all layers!" ) ); QgsDebugMsg( QStringLiteral( "hiding all layers!" ) );
mLayerTreeView->layerTreeModel()->rootGroup()->setItemVisibilityCheckedRecursi ve( false );
const auto constChildren = mLayerTreeView->layerTreeModel()->rootGroup()->chil
dren();
for ( QgsLayerTreeNode *node : constChildren )
{
node->setItemVisibilityCheckedRecursive( false );
}
} }
// reimplements method from base (gui) class // reimplements method from base (gui) class
void QgisApp::showAllLayers() void QgisApp::showAllLayers()
{ {
QgsDebugMsg( QStringLiteral( "Showing all layers!" ) ); QgsDebugMsg( QStringLiteral( "Showing all layers!" ) );
mLayerTreeView->layerTreeModel()->rootGroup()->setItemVisibilityCheckedRecursi ve( true ); mLayerTreeView->layerTreeModel()->rootGroup()->setItemVisibilityCheckedRecursi ve( true );
} }
//reimplements method from base (gui) class //reimplements method from base (gui) class
skipping to change at line 9753 skipping to change at line 9759
bool QgisApp::toggleEditing( QgsMapLayer *layer, bool allowCancel ) bool QgisApp::toggleEditing( QgsMapLayer *layer, bool allowCancel )
{ {
QgsVectorLayer *vlayer = qobject_cast<QgsVectorLayer *>( layer ); QgsVectorLayer *vlayer = qobject_cast<QgsVectorLayer *>( layer );
if ( !vlayer ) if ( !vlayer )
{ {
return false; return false;
} }
bool res = true; bool res = true;
QString connString = QgsDataSourceUri( vlayer->source() ).connectionInfo(); QString connString = QgsTransaction::connectionString( vlayer->source() );
QString key = vlayer->providerType(); QString key = vlayer->providerType();
QMap< QPair< QString, QString>, QgsTransactionGroup *> transactionGroups = Qgs Project::instance()->transactionGroups(); QMap< QPair< QString, QString>, QgsTransactionGroup *> transactionGroups = Qgs Project::instance()->transactionGroups();
QMap< QPair< QString, QString>, QgsTransactionGroup *>::iterator tIt = transac tionGroups .find( qMakePair( key, connString ) ); QMap< QPair< QString, QString>, QgsTransactionGroup *>::iterator tIt = transac tionGroups .find( qMakePair( key, connString ) );
QgsTransactionGroup *tg = ( tIt != transactionGroups.end() ? tIt.value() : nul lptr ); QgsTransactionGroup *tg = ( tIt != transactionGroups.end() ? tIt.value() : nul lptr );
bool isModified = false; bool isModified = false;
// Assume changes if: a) the layer reports modifications or b) its transaction group was modified // Assume changes if: a) the layer reports modifications or b) its transaction group was modified
if ( vlayer->isModified() || ( tg && tg->layers().contains( vlayer ) && tg->mo dified() ) ) if ( vlayer->isModified() || ( tg && tg->layers().contains( vlayer ) && tg->mo dified() ) )
skipping to change at line 13216 skipping to change at line 13222
mActionUndo->setEnabled( false ); mActionUndo->setEnabled( false );
mActionRedo->setEnabled( false ); mActionRedo->setEnabled( false );
mActionLayerSubsetString->setEnabled( false ); mActionLayerSubsetString->setEnabled( false );
} }
break; break;
} }
case QgsMapLayerType::RasterLayer: case QgsMapLayerType::RasterLayer:
{ {
const QgsRasterLayer *rlayer = qobject_cast<const QgsRasterLayer *>( layer ); const QgsRasterLayer *rlayer = qobject_cast<const QgsRasterLayer *>( layer );
if ( rlayer->dataProvider()->dataType( 1 ) != Qgis::ARGB32 const QgsRasterDataProvider *dprovider = rlayer->dataProvider();
&& rlayer->dataProvider()->dataType( 1 ) != Qgis::ARGB32_Premultiplie
d ) if ( dprovider
&& dprovider->dataType( 1 ) != Qgis::ARGB32
&& dprovider->dataType( 1 ) != Qgis::ARGB32_Premultiplied )
{ {
if ( rlayer->dataProvider()->capabilities() & QgsRasterDataProvider::Siz e ) if ( dprovider->capabilities() & QgsRasterDataProvider::Size )
{ {
mActionFullHistogramStretch->setEnabled( true ); mActionFullHistogramStretch->setEnabled( true );
} }
else else
{ {
// it would hang up reading the data for WMS for example // it would hang up reading the data for WMS for example
mActionFullHistogramStretch->setEnabled( false ); mActionFullHistogramStretch->setEnabled( false );
} }
mActionLocalHistogramStretch->setEnabled( true ); mActionLocalHistogramStretch->setEnabled( true );
} }
skipping to change at line 13323 skipping to change at line 13332
//If you load a layer with a provider and idenitfy ability then load anoth er without, the tool would be disabled for both //If you load a layer with a provider and idenitfy ability then load anoth er without, the tool would be disabled for both
//Enable the Identify tool ( GDAL datasets draw without a provider ) //Enable the Identify tool ( GDAL datasets draw without a provider )
//but turn off if data provider exists and has no Identify capabilities //but turn off if data provider exists and has no Identify capabilities
mActionIdentify->setEnabled( true ); mActionIdentify->setEnabled( true );
QgsSettings settings; QgsSettings settings;
QgsMapToolIdentify::IdentifyMode identifyMode = settings.enumValue( QStrin gLiteral( "Map/identifyMode" ), QgsMapToolIdentify::ActiveLayer ); QgsMapToolIdentify::IdentifyMode identifyMode = settings.enumValue( QStrin gLiteral( "Map/identifyMode" ), QgsMapToolIdentify::ActiveLayer );
if ( identifyMode == QgsMapToolIdentify::ActiveLayer ) if ( identifyMode == QgsMapToolIdentify::ActiveLayer )
{ {
const QgsRasterLayer *rlayer = qobject_cast<const QgsRasterLayer *>( lay
er );
const QgsRasterDataProvider *dprovider = rlayer->dataProvider();
if ( dprovider ) if ( dprovider )
{ {
// does provider allow the identify map tool? // does provider allow the identify map tool?
if ( dprovider->capabilities() & QgsRasterDataProvider::Identify ) if ( dprovider->capabilities() & QgsRasterDataProvider::Identify )
{ {
mActionIdentify->setEnabled( true ); mActionIdentify->setEnabled( true );
} }
else else
{ {
mActionIdentify->setEnabled( false ); mActionIdentify->setEnabled( false );
 End of changes. 8 change blocks. 
13 lines changed or deleted 19 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)