Skip to content

Commit 92407bc

Browse files
committedNov 29, 2018
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. (cherry picked from commit 7c43bcd)
1 parent 9e05356 commit 92407bc

File tree

4 files changed

+43
-19
lines changed

4 files changed

+43
-19
lines changed
 

‎resources/qgis_global_settings.ini

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,16 @@
11
[qgis]
2+
3+
# If true, QGIS will automatically check for new versions on startup and notify users if a new version is available.
4+
# This setting controls the default value for that setting. Users may still manually enable or disable this check
5+
# through the QGIS settings dialog.
6+
checkVersion=true
7+
8+
# If true, users may control whether the version check is enabled or disabled through the QGIS settings dialog. (The default
9+
# check behavior is determined by the 'checkVersion' setting). If false, no version checking will be performed and
10+
# users will NOT have an option to enable this check in the settings dialog.
11+
# This setting is intended for use in enterprise installs where QGIS version management is handled centrally.
12+
allowVersionCheck=true
13+
214
# If true, added layer names will be automatically capitalized and underscores replaced with spaces
315
formatLayerName=false
416

‎src/app/qgsoptions.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -632,6 +632,7 @@ QgsOptions::QgsOptions( QWidget *parent, Qt::WindowFlags fl, const QList<QgsOpti
632632
cbxHideSplash->setChecked( mSettings->value( QStringLiteral( "/qgis/hideSplash" ), false ).toBool() );
633633
mDataSourceManagerNonModal->setChecked( mSettings->value( QStringLiteral( "/qgis/dataSourceManagerNonModal" ), false ).toBool() );
634634
cbxCheckVersion->setChecked( mSettings->value( QStringLiteral( "/qgis/checkVersion" ), true ).toBool() );
635+
cbxCheckVersion->setVisible( mSettings->value( QStringLiteral( "/qgis/allowVersionCheck" ), true ).toBool() );
635636
cbxAttributeTableDocked->setChecked( mSettings->value( QStringLiteral( "/qgis/dockAttributeTable" ), false ).toBool() );
636637
cbxAddPostgisDC->setChecked( mSettings->value( QStringLiteral( "/qgis/addPostgisDC" ), false ).toBool() );
637638
cbxAddOracleDC->setChecked( mSettings->value( QStringLiteral( "/qgis/addOracleDC" ), false ).toBool() );

‎src/app/qgswelcomepage.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,8 @@ QgsWelcomePage::QgsWelcomePage( bool skipVersionCheck, QWidget *parent )
7272
mVersionInformation->setVisible( false );
7373

7474
mVersionInfo = new QgsVersionInfo();
75-
if ( !QgsApplication::isRunningFromBuildDir() && settings.value( QStringLiteral( "qgis/checkVersion" ), true ).toBool() && !skipVersionCheck )
75+
if ( !QgsApplication::isRunningFromBuildDir() && settings.value( QStringLiteral( "/qgis/allowVersionCheck" ), true ).toBool()
76+
&& settings.value( QStringLiteral( "qgis/checkVersion" ), true ).toBool() && !skipVersionCheck )
7677
{
7778
connect( mVersionInfo, &QgsVersionInfo::versionInfoAvailable, this, &QgsWelcomePage::versionInfoReceived );
7879
mVersionInfo->checkVersion();

‎src/ui/qgsoptionsbase.ui

Lines changed: 28 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,7 @@
332332
<item>
333333
<widget class="QStackedWidget" name="mOptionsStackedWidget">
334334
<property name="currentIndex">
335-
<number>13</number>
335+
<number>0</number>
336336
</property>
337337
<widget class="QWidget" name="mOptionsPageGeneral">
338338
<layout class="QVBoxLayout" name="verticalLayout_3">
@@ -694,6 +694,20 @@
694694
<property name="topMargin">
695695
<number>0</number>
696696
</property>
697+
<item row="2" column="0">
698+
<widget class="QCheckBox" name="cbxCheckVersion">
699+
<property name="text">
700+
<string>Check QGIS version at startup</string>
701+
</property>
702+
</widget>
703+
</item>
704+
<item row="0" column="1">
705+
<widget class="QCheckBox" name="mNativeColorDialogsChkBx">
706+
<property name="text">
707+
<string>Use native color chooser dialogs</string>
708+
</property>
709+
</widget>
710+
</item>
697711
<item row="1" column="0">
698712
<widget class="QCheckBox" name="mDataSourceManagerNonModal">
699713
<property name="toolTip">
@@ -711,13 +725,6 @@
711725
</property>
712726
</widget>
713727
</item>
714-
<item row="0" column="1">
715-
<widget class="QCheckBox" name="cbxCheckVersion">
716-
<property name="text">
717-
<string>Check QGIS version at startup</string>
718-
</property>
719-
</widget>
720-
</item>
721728
<item row="0" column="0">
722729
<widget class="QCheckBox" name="cbxHideSplash">
723730
<property name="sizePolicy">
@@ -731,13 +738,6 @@
731738
</property>
732739
</widget>
733740
</item>
734-
<item row="2" column="0">
735-
<widget class="QCheckBox" name="mNativeColorDialogsChkBx">
736-
<property name="text">
737-
<string>Use native color chooser dialogs</string>
738-
</property>
739-
</widget>
740-
</item>
741741
</layout>
742742
</item>
743743
</layout>
@@ -5544,6 +5544,8 @@ p, li { white-space: pre-wrap; }
55445544
<tabstop>mOptionsScrollArea_01</tabstop>
55455545
<tabstop>grpLocale</tabstop>
55465546
<tabstop>cboTranslation</tabstop>
5547+
<tabstop>cboGlobalLocale</tabstop>
5548+
<tabstop>cbShowGroupSeparator</tabstop>
55475549
<tabstop>cmbStyle</tabstop>
55485550
<tabstop>cmbUITheme</tabstop>
55495551
<tabstop>cmbIconSize</tabstop>
@@ -5553,10 +5555,10 @@ p, li { white-space: pre-wrap; }
55535555
<tabstop>spinFontSize</tabstop>
55545556
<tabstop>mMessageTimeoutSpnBx</tabstop>
55555557
<tabstop>cbxHideSplash</tabstop>
5556-
<tabstop>cbxCheckVersion</tabstop>
5558+
<tabstop>mNativeColorDialogsChkBx</tabstop>
55575559
<tabstop>mDataSourceManagerNonModal</tabstop>
55585560
<tabstop>mCustomGroupBoxChkBx</tabstop>
5559-
<tabstop>mNativeColorDialogsChkBx</tabstop>
5561+
<tabstop>cbxCheckVersion</tabstop>
55605562
<tabstop>mProjectOnLaunchCmbBx</tabstop>
55615563
<tabstop>mProjectOnLaunchLineEdit</tabstop>
55625564
<tabstop>mProjectOnLaunchPushBtn</tabstop>
@@ -5648,6 +5650,7 @@ p, li { white-space: pre-wrap; }
56485650
<tabstop>cmbLegendDoubleClickAction</tabstop>
56495651
<tabstop>cbxLegendClassifiers</tabstop>
56505652
<tabstop>mLegendGraphicResolutionSpinBox</tabstop>
5653+
<tabstop>mMapTipsDelaySpinBox</tabstop>
56515654
<tabstop>mOptionsScrollArea_05</tabstop>
56525655
<tabstop>spinBoxIdentifyValue</tabstop>
56535656
<tabstop>mIdentifyHighlightColorButton</tabstop>
@@ -5667,13 +5670,15 @@ p, li { white-space: pre-wrap; }
56675670
<tabstop>pbnImportScales</tabstop>
56685671
<tabstop>pbnExportScales</tabstop>
56695672
<tabstop>scrollArea</tabstop>
5673+
<tabstop>mColorSchemesComboBox</tabstop>
5674+
<tabstop>mSchemeToolButton</tabstop>
5675+
<tabstop>mTreeCustomColors</tabstop>
56705676
<tabstop>mButtonAddColor</tabstop>
56715677
<tabstop>mButtonRemoveColor</tabstop>
56725678
<tabstop>mButtonCopyColors</tabstop>
56735679
<tabstop>mButtonPasteColors</tabstop>
56745680
<tabstop>mButtonImportColors</tabstop>
56755681
<tabstop>mButtonExportColors</tabstop>
5676-
<tabstop>mTreeCustomColors</tabstop>
56775682
<tabstop>mOptionsScrollArea_07</tabstop>
56785683
<tabstop>chkDisableAttributeValuesDlg</tabstop>
56795684
<tabstop>chkReuseLastValues</tabstop>
@@ -5691,6 +5696,8 @@ p, li { white-space: pre-wrap; }
56915696
<tabstop>mSearchRadiusVertexEditComboBox</tabstop>
56925697
<tabstop>mSnappingMainDialogComboBox</tabstop>
56935698
<tabstop>mSnappingMarkerColorButton</tabstop>
5699+
<tabstop>mSnappingTooltipsCheckbox</tabstop>
5700+
<tabstop>mEnableSnappingOnInvisibleFeatureCheckbox</tabstop>
56945701
<tabstop>mMarkersOnlyForSelectedCheckBox</tabstop>
56955702
<tabstop>mMarkerStyleComboBox</tabstop>
56965703
<tabstop>mMarkerSizeSpinBox</tabstop>
@@ -5736,6 +5743,9 @@ p, li { white-space: pre-wrap; }
57365743
<tabstop>mRemoveUrlPushButton</tabstop>
57375744
<tabstop>mExcludeUrlListWidget</tabstop>
57385745
<tabstop>mAdvancedSettingsEnableButton</tabstop>
5746+
<tabstop>mOpenClDevicesCombo</tabstop>
5747+
<tabstop>mGPUInfoTextBrowser</tabstop>
5748+
<tabstop>mGPUEnableCheckBox</tabstop>
57395749
</tabstops>
57405750
<resources>
57415751
<include location="../../images/images.qrc"/>

0 commit comments

Comments
 (0)
Please sign in to comment.