Skip to content

Commit af88924

Browse files
committed
new setting to allow disabling the version check at startup (refs #14022)
1 parent 5d989ab commit af88924

File tree

3 files changed

+31
-1
lines changed

3 files changed

+31
-1
lines changed

src/app/qgsoptions.cpp

+2
Original file line numberDiff line numberDiff line change
@@ -590,6 +590,7 @@ QgsOptions::QgsOptions( QWidget *parent, Qt::WindowFlags fl ) :
590590
mLegendGroupsBoldChkBx->setChecked( mSettings->value( "/qgis/legendGroupsBold", false ).toBool() );
591591
cbxHideSplash->setChecked( mSettings->value( "/qgis/hideSplash", false ).toBool() );
592592
cbxShowTips->setChecked( mSettings->value( QString( "/qgis/showTips%1" ).arg( QGis::QGIS_VERSION_INT / 100 ), true ).toBool() );
593+
cbxCheckVersion->setChecked( mSettings->value( "/qgis/checkVersion", true ).toBool() );
593594
cbxAttributeTableDocked->setChecked( mSettings->value( "/qgis/dockAttributeTable", false ).toBool() );
594595
cbxSnappingOptionsDocked->setChecked( mSettings->value( "/qgis/dockSnapping", false ).toBool() );
595596
cbxAddPostgisDC->setChecked( mSettings->value( "/qgis/addPostgisDC", false ).toBool() );
@@ -1131,6 +1132,7 @@ void QgsOptions::saveOptions()
11311132
mSettings->setValue( "/qgis/legendGroupsBold", mLegendGroupsBoldChkBx->isChecked() );
11321133
mSettings->setValue( "/qgis/hideSplash", cbxHideSplash->isChecked() );
11331134
mSettings->setValue( QString( "/qgis/showTips%1" ).arg( QGis::QGIS_VERSION_INT / 100 ), cbxShowTips->isChecked() );
1135+
mSettings->setValue( "/qgis/checkVersion", cbxCheckVersion->isChecked() );
11341136
mSettings->setValue( "/qgis/dockAttributeTable", cbxAttributeTableDocked->isChecked() );
11351137
mSettings->setValue( "/qgis/attributeTableBehaviour", cmbAttrTableBehaviour->itemData( cmbAttrTableBehaviour->currentIndex() ) );
11361138
mSettings->setValue( "/qgis/attributeTableRowCache", spinBoxAttrTableRowCache->value() );

src/app/qgswelcomepage.cpp

+3-1
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@
2727
QgsWelcomePage::QgsWelcomePage( QWidget* parent )
2828
: QWidget( parent )
2929
{
30+
QSettings settings;
31+
3032
QVBoxLayout* mainLayout = new QVBoxLayout;
3133
mainLayout->setMargin( 0 );
3234
setLayout( mainLayout );
@@ -58,7 +60,7 @@ QgsWelcomePage::QgsWelcomePage( QWidget* parent )
5860
mVersionInformation->setVisible( false );
5961

6062
mVersionInfo = new QgsVersionInfo();
61-
if ( !QgsApplication::isRunningFromBuildDir() )
63+
if ( !QgsApplication::isRunningFromBuildDir() && settings.value( "/qgis/checkVersion", true ).toBool() )
6264
{
6365
connect( mVersionInfo, SIGNAL( versionInfoAvailable() ), this, SLOT( versionInfoReceived() ) );
6466
mVersionInfo->checkVersion();

src/ui/qgsoptionsbase.ui

+26
Original file line numberDiff line numberDiff line change
@@ -619,11 +619,37 @@
619619
</item>
620620
<item>
621621
<widget class="QCheckBox" name="cbxShowTips">
622+
<property name="sizePolicy">
623+
<sizepolicy hsizetype="Maximum" vsizetype="Fixed">
624+
<horstretch>0</horstretch>
625+
<verstretch>0</verstretch>
626+
</sizepolicy>
627+
</property>
622628
<property name="text">
623629
<string>Show tips at start up</string>
624630
</property>
625631
</widget>
626632
</item>
633+
<item>
634+
<widget class="Line" name="line_2">
635+
<property name="minimumSize">
636+
<size>
637+
<width>12</width>
638+
<height>0</height>
639+
</size>
640+
</property>
641+
<property name="orientation">
642+
<enum>Qt::Vertical</enum>
643+
</property>
644+
</widget>
645+
</item>
646+
<item>
647+
<widget class="QCheckBox" name="cbxCheckVersion">
648+
<property name="text">
649+
<string>Check QGIS version at startup</string>
650+
</property>
651+
</widget>
652+
</item>
627653
</layout>
628654
</item>
629655
<item>

0 commit comments

Comments
 (0)