mirror of
https://github.com/qgis/QGIS.git
synced 2025-06-19 00:02:48 -04:00
Merge pull request #30092 from elpaso/bugfix-gh2930082-welcomepage-check-qgis2-conf
Welcome page: hide migration from QGIS2 option if settings do not exist
This commit is contained in:
commit
9c91505501
@ -1000,6 +1000,10 @@ int main( int argc, char *argv[] )
|
||||
if ( !settingsMigrationForce && showWelcome )
|
||||
{
|
||||
QgsFirstRunDialog dlg;
|
||||
if ( ! QFile::exists( QSettings( "QGIS", "QGIS2" ).fileName() ) )
|
||||
{
|
||||
dlg.hideMigration();
|
||||
}
|
||||
dlg.exec();
|
||||
runMigration = dlg.migrateSettings();
|
||||
migSettings.setValue( QStringLiteral( "migration/firstRunVersionFlag" ), Qgis::QGIS_VERSION_INT );
|
||||
|
@ -31,3 +31,8 @@ bool QgsFirstRunDialog::migrateSettings()
|
||||
{
|
||||
return ( mImportSettingsYes->isChecked() );
|
||||
}
|
||||
|
||||
void QgsFirstRunDialog::hideMigration()
|
||||
{
|
||||
mMigrationWidget->hide();
|
||||
}
|
||||
|
@ -30,6 +30,12 @@ class APP_EXPORT QgsFirstRunDialog : public QDialog, private Ui::QgsFirstRunDial
|
||||
|
||||
bool migrateSettings();
|
||||
|
||||
/**
|
||||
* Hides the migration checkboxes
|
||||
*/
|
||||
void hideMigration();
|
||||
|
||||
|
||||
signals:
|
||||
|
||||
public slots:
|
||||
|
@ -109,66 +109,72 @@
|
||||
<item row="1" column="0" colspan="2">
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<spacer name="verticalSpacer_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Expanding</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string>Ready to go?</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QRadioButton" name="mImportSettingsYes">
|
||||
<property name="text">
|
||||
<string>Import settings from QGIS 2.</string>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QRadioButton" name="mImportSettingsNo">
|
||||
<property name="text">
|
||||
<string>I want a clean start. Don't import my QGIS 2 settings.</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_4">
|
||||
<property name="text">
|
||||
<string>Settings will be imported into the default profile and you will only see this screen once.</string>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<widget class="QWidget" name="mMigrationWidget" native="true">
|
||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||
<item>
|
||||
<spacer name="verticalSpacer_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Expanding</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>45</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string>Ready to go?</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QRadioButton" name="mImportSettingsYes">
|
||||
<property name="text">
|
||||
<string>Import settings from QGIS 2.</string>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QRadioButton" name="mImportSettingsNo">
|
||||
<property name="text">
|
||||
<string>I want a clean start. Don't import my QGIS 2 settings.</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_4">
|
||||
<property name="text">
|
||||
<string>Settings will be imported into the default profile and you will only see this screen once.</string>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
|
Loading…
x
Reference in New Issue
Block a user