Skip to content

Commit

Permalink
new setting to allow disabling the version check at startup (refs #14022
Browse files Browse the repository at this point in the history
)
  • Loading branch information
SebDieBln committed Feb 14, 2016
1 parent 5d989ab commit af88924
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/app/qgsoptions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -590,6 +590,7 @@ QgsOptions::QgsOptions( QWidget *parent, Qt::WindowFlags fl ) :
mLegendGroupsBoldChkBx->setChecked( mSettings->value( "/qgis/legendGroupsBold", false ).toBool() );
cbxHideSplash->setChecked( mSettings->value( "/qgis/hideSplash", false ).toBool() );
cbxShowTips->setChecked( mSettings->value( QString( "/qgis/showTips%1" ).arg( QGis::QGIS_VERSION_INT / 100 ), true ).toBool() );
cbxCheckVersion->setChecked( mSettings->value( "/qgis/checkVersion", true ).toBool() );
cbxAttributeTableDocked->setChecked( mSettings->value( "/qgis/dockAttributeTable", false ).toBool() );
cbxSnappingOptionsDocked->setChecked( mSettings->value( "/qgis/dockSnapping", false ).toBool() );
cbxAddPostgisDC->setChecked( mSettings->value( "/qgis/addPostgisDC", false ).toBool() );
Expand Down Expand Up @@ -1131,6 +1132,7 @@ void QgsOptions::saveOptions()
mSettings->setValue( "/qgis/legendGroupsBold", mLegendGroupsBoldChkBx->isChecked() );
mSettings->setValue( "/qgis/hideSplash", cbxHideSplash->isChecked() );
mSettings->setValue( QString( "/qgis/showTips%1" ).arg( QGis::QGIS_VERSION_INT / 100 ), cbxShowTips->isChecked() );
mSettings->setValue( "/qgis/checkVersion", cbxCheckVersion->isChecked() );
mSettings->setValue( "/qgis/dockAttributeTable", cbxAttributeTableDocked->isChecked() );
mSettings->setValue( "/qgis/attributeTableBehaviour", cmbAttrTableBehaviour->itemData( cmbAttrTableBehaviour->currentIndex() ) );
mSettings->setValue( "/qgis/attributeTableRowCache", spinBoxAttrTableRowCache->value() );
Expand Down
4 changes: 3 additions & 1 deletion src/app/qgswelcomepage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@
QgsWelcomePage::QgsWelcomePage( QWidget* parent )
: QWidget( parent )
{
QSettings settings;

QVBoxLayout* mainLayout = new QVBoxLayout;
mainLayout->setMargin( 0 );
setLayout( mainLayout );
Expand Down Expand Up @@ -58,7 +60,7 @@ QgsWelcomePage::QgsWelcomePage( QWidget* parent )
mVersionInformation->setVisible( false );

mVersionInfo = new QgsVersionInfo();
if ( !QgsApplication::isRunningFromBuildDir() )
if ( !QgsApplication::isRunningFromBuildDir() && settings.value( "/qgis/checkVersion", true ).toBool() )
{
connect( mVersionInfo, SIGNAL( versionInfoAvailable() ), this, SLOT( versionInfoReceived() ) );
mVersionInfo->checkVersion();
Expand Down
26 changes: 26 additions & 0 deletions src/ui/qgsoptionsbase.ui
Original file line number Diff line number Diff line change
Expand Up @@ -619,11 +619,37 @@
</item>
<item>
<widget class="QCheckBox" name="cbxShowTips">
<property name="sizePolicy">
<sizepolicy hsizetype="Maximum" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Show tips at start up</string>
</property>
</widget>
</item>
<item>
<widget class="Line" name="line_2">
<property name="minimumSize">
<size>
<width>12</width>
<height>0</height>
</size>
</property>
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="cbxCheckVersion">
<property name="text">
<string>Check QGIS version at startup</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
Expand Down

0 comments on commit af88924

Please sign in to comment.