Skip to content
Permalink
Browse files

Add new "allowVersionCheck" setting

If true, users may control whether the version check is enabled
or disabled through the QGIS settings dialog. (The default
check behavior is determined by the existing 'checkVersion' setting).

If false, no version checking will be performed AND users will NOT
have an option to enable this check in the settings dialog.

This setting is intended for use in enterprise installs where QGIS version
management is handled centrally.
  • Loading branch information
nyalldawson committed Nov 29, 2018
1 parent 59d2c53 commit 7c43bcda76039234553eeabfe7d0ab4f2418de1a
Showing with 43 additions and 19 deletions.
  1. +12 −0 resources/qgis_global_settings.ini
  2. +1 −0 src/app/qgsoptions.cpp
  3. +2 −1 src/app/qgswelcomepage.cpp
  4. +28 −18 src/ui/qgsoptionsbase.ui
@@ -1,4 +1,16 @@
[qgis]

# If true, QGIS will automatically check for new versions on startup and notify users if a new version is available.
# This setting controls the default value for that setting. Users may still manually enable or disable this check
# through the QGIS settings dialog.

This comment has been minimized.

Copy link
@m-kuhn

m-kuhn Mar 13, 2019

Member

Is this last sentence useful? Isn't it possiblt to override any setting locally?
Currently it suggests that this is some special property for this setting which in turn means all other settings are not overridable.

This comment has been minimized.

Copy link
@m-kuhn

m-kuhn Mar 13, 2019

Member

Just reading the setting below... This puts it into context.

checkVersion=true

# If true, users may control whether the version check is enabled or disabled through the QGIS settings dialog. (The default
# check behavior is determined by the 'checkVersion' setting). If false, no version checking will be performed and
# users will NOT have an option to enable this check in the settings dialog.
# This setting is intended for use in enterprise installs where QGIS version management is handled centrally.
allowVersionCheck=true

# If true, added layer names will be automatically capitalized and underscores replaced with spaces
formatLayerName=false

@@ -632,6 +632,7 @@ QgsOptions::QgsOptions( QWidget *parent, Qt::WindowFlags fl, const QList<QgsOpti
cbxHideSplash->setChecked( mSettings->value( QStringLiteral( "/qgis/hideSplash" ), false ).toBool() );
mDataSourceManagerNonModal->setChecked( mSettings->value( QStringLiteral( "/qgis/dataSourceManagerNonModal" ), false ).toBool() );
cbxCheckVersion->setChecked( mSettings->value( QStringLiteral( "/qgis/checkVersion" ), true ).toBool() );
cbxCheckVersion->setVisible( mSettings->value( QStringLiteral( "/qgis/allowVersionCheck" ), true ).toBool() );
cbxAttributeTableDocked->setChecked( mSettings->value( QStringLiteral( "/qgis/dockAttributeTable" ), false ).toBool() );
cbxAddPostgisDC->setChecked( mSettings->value( QStringLiteral( "/qgis/addPostgisDC" ), false ).toBool() );
cbxAddOracleDC->setChecked( mSettings->value( QStringLiteral( "/qgis/addOracleDC" ), false ).toBool() );
@@ -72,7 +72,8 @@ QgsWelcomePage::QgsWelcomePage( bool skipVersionCheck, QWidget *parent )
mVersionInformation->setVisible( false );

mVersionInfo = new QgsVersionInfo();
if ( !QgsApplication::isRunningFromBuildDir() && settings.value( QStringLiteral( "qgis/checkVersion" ), true ).toBool() && !skipVersionCheck )
if ( !QgsApplication::isRunningFromBuildDir() && settings.value( QStringLiteral( "/qgis/allowVersionCheck" ), true ).toBool()
&& settings.value( QStringLiteral( "qgis/checkVersion" ), true ).toBool() && !skipVersionCheck )
{
connect( mVersionInfo, &QgsVersionInfo::versionInfoAvailable, this, &QgsWelcomePage::versionInfoReceived );
mVersionInfo->checkVersion();
@@ -332,7 +332,7 @@
<item>
<widget class="QStackedWidget" name="mOptionsStackedWidget">
<property name="currentIndex">
<number>13</number>
<number>0</number>
</property>
<widget class="QWidget" name="mOptionsPageGeneral">
<layout class="QVBoxLayout" name="verticalLayout_3">
@@ -694,6 +694,20 @@
<property name="topMargin">
<number>0</number>
</property>
<item row="2" column="0">
<widget class="QCheckBox" name="cbxCheckVersion">
<property name="text">
<string>Check QGIS version at startup</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QCheckBox" name="mNativeColorDialogsChkBx">
<property name="text">
<string>Use native color chooser dialogs</string>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QCheckBox" name="mDataSourceManagerNonModal">
<property name="toolTip">
@@ -711,13 +725,6 @@
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QCheckBox" name="cbxCheckVersion">
<property name="text">
<string>Check QGIS version at startup</string>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QCheckBox" name="cbxHideSplash">
<property name="sizePolicy">
@@ -731,13 +738,6 @@
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QCheckBox" name="mNativeColorDialogsChkBx">
<property name="text">
<string>Use native color chooser dialogs</string>
</property>
</widget>
</item>
</layout>
</item>
</layout>
@@ -5544,6 +5544,8 @@ p, li { white-space: pre-wrap; }
<tabstop>mOptionsScrollArea_01</tabstop>
<tabstop>grpLocale</tabstop>
<tabstop>cboTranslation</tabstop>
<tabstop>cboGlobalLocale</tabstop>
<tabstop>cbShowGroupSeparator</tabstop>
<tabstop>cmbStyle</tabstop>
<tabstop>cmbUITheme</tabstop>
<tabstop>cmbIconSize</tabstop>
@@ -5553,10 +5555,10 @@ p, li { white-space: pre-wrap; }
<tabstop>spinFontSize</tabstop>
<tabstop>mMessageTimeoutSpnBx</tabstop>
<tabstop>cbxHideSplash</tabstop>
<tabstop>cbxCheckVersion</tabstop>
<tabstop>mNativeColorDialogsChkBx</tabstop>
<tabstop>mDataSourceManagerNonModal</tabstop>
<tabstop>mCustomGroupBoxChkBx</tabstop>
<tabstop>mNativeColorDialogsChkBx</tabstop>
<tabstop>cbxCheckVersion</tabstop>
<tabstop>mProjectOnLaunchCmbBx</tabstop>
<tabstop>mProjectOnLaunchLineEdit</tabstop>
<tabstop>mProjectOnLaunchPushBtn</tabstop>
@@ -5648,6 +5650,7 @@ p, li { white-space: pre-wrap; }
<tabstop>cmbLegendDoubleClickAction</tabstop>
<tabstop>cbxLegendClassifiers</tabstop>
<tabstop>mLegendGraphicResolutionSpinBox</tabstop>
<tabstop>mMapTipsDelaySpinBox</tabstop>
<tabstop>mOptionsScrollArea_05</tabstop>
<tabstop>spinBoxIdentifyValue</tabstop>
<tabstop>mIdentifyHighlightColorButton</tabstop>
@@ -5667,13 +5670,15 @@ p, li { white-space: pre-wrap; }
<tabstop>pbnImportScales</tabstop>
<tabstop>pbnExportScales</tabstop>
<tabstop>scrollArea</tabstop>
<tabstop>mColorSchemesComboBox</tabstop>
<tabstop>mSchemeToolButton</tabstop>
<tabstop>mTreeCustomColors</tabstop>
<tabstop>mButtonAddColor</tabstop>
<tabstop>mButtonRemoveColor</tabstop>
<tabstop>mButtonCopyColors</tabstop>
<tabstop>mButtonPasteColors</tabstop>
<tabstop>mButtonImportColors</tabstop>
<tabstop>mButtonExportColors</tabstop>
<tabstop>mTreeCustomColors</tabstop>
<tabstop>mOptionsScrollArea_07</tabstop>
<tabstop>chkDisableAttributeValuesDlg</tabstop>
<tabstop>chkReuseLastValues</tabstop>
@@ -5691,6 +5696,8 @@ p, li { white-space: pre-wrap; }
<tabstop>mSearchRadiusVertexEditComboBox</tabstop>
<tabstop>mSnappingMainDialogComboBox</tabstop>
<tabstop>mSnappingMarkerColorButton</tabstop>
<tabstop>mSnappingTooltipsCheckbox</tabstop>
<tabstop>mEnableSnappingOnInvisibleFeatureCheckbox</tabstop>
<tabstop>mMarkersOnlyForSelectedCheckBox</tabstop>
<tabstop>mMarkerStyleComboBox</tabstop>
<tabstop>mMarkerSizeSpinBox</tabstop>
@@ -5736,6 +5743,9 @@ p, li { white-space: pre-wrap; }
<tabstop>mRemoveUrlPushButton</tabstop>
<tabstop>mExcludeUrlListWidget</tabstop>
<tabstop>mAdvancedSettingsEnableButton</tabstop>
<tabstop>mOpenClDevicesCombo</tabstop>
<tabstop>mGPUInfoTextBrowser</tabstop>
<tabstop>mGPUEnableCheckBox</tabstop>
</tabstops>
<resources>
<include location="../../images/images.qrc"/>

0 comments on commit 7c43bcd

Please sign in to comment.
You can’t perform that action at this time.