diff --git a/CHANGES b/CHANGES
index 046136a66..7f4f18ab7 100644
--- a/CHANGES
+++ b/CHANGES
@@ -21,6 +21,20 @@ This release contains contributions from (alphabetically by first name):
coded setup (which Calamares has had for a long time with @home
and similar) and introduce a custom btrfs configuration through the
`mount.conf` file.
+ - The *usersq* module now connects to the internal configuration
+ object and may be usable for regular installations.
+
+
+# 3.2.38.1 (2021-03-15) #
+
+This hotfix release is for this item in the release notes of 3.2.38:
+ - The .desktop file for Calamares now makes a longer trip, calling
+ `sh -c "pkexec calamares"`; distributions may still need to adjust.
+The change had been lost while updating other files. It has been restored
+in `calamares.desktop` and `calamares.desktop.in`. (Reported by Erik)
+Other minor changes and fixes:
+ - presets in the *users* module show the hostname, too,
+ - translations update for Korean, Ukranian and Chinese (zh_TW).
# 3.2.38 (2021-03-14) #
diff --git a/calamares.desktop b/calamares.desktop
index 834c4a518..1f25c1f10 100644
--- a/calamares.desktop
+++ b/calamares.desktop
@@ -5,7 +5,7 @@ Name=Install System
GenericName=System Installer
Keywords=calamares;system;installer;
TryExec=calamares
-Exec=pkexec /usr/bin/calamares
+Exec=sh -c "pkexec calamares"
Comment=Calamares — System Installer
Icon=calamares
Terminal=false
diff --git a/calamares.desktop.in b/calamares.desktop.in
index 9bfbf8fd9..ed1d4def8 100644
--- a/calamares.desktop.in
+++ b/calamares.desktop.in
@@ -5,7 +5,7 @@ Name=Install System
GenericName=System Installer
Keywords=calamares;system;installer;
TryExec=calamares
-Exec=pkexec /usr/bin/calamares
+Exec=sh -c "pkexec calamares"
Comment=Calamares — System Installer
Icon=calamares
Terminal=false
diff --git a/lang/calamares_ko.ts b/lang/calamares_ko.ts
index 3ba725891..812068eba 100644
--- a/lang/calamares_ko.ts
+++ b/lang/calamares_ko.ts
@@ -6,7 +6,7 @@
-
+ 자동 마운트 설정 관리
@@ -316,7 +316,11 @@
%1
Link copied to clipboard
-
+ 게시한 로그를 설치합니다.
+
+%1
+
+링크가 클립보드에 복사되었습니다.
@@ -852,12 +856,12 @@ The installer will quit and all changes will be lost.
-
+ %1 설정이 제대로 완료되지 않았습니다.
-
+ %1 설치가 제대로 완료되지 않았습니다.
@@ -971,12 +975,12 @@ The installer will quit and all changes will be lost.
-
+ %4 항목이 있는 %3(%2)에 새 %1MiB 파티션을 만듭니다.
-
+ %3(%2)에 새 %1MiB 파티션을 만듭니다.
@@ -986,12 +990,12 @@ The installer will quit and all changes will be lost.
-
+ <em>%4</em> 항목이 있는 <strong>%3</strong>(%2)에 새 <strong>%1MiB</strong> 파티션을 만듭니다.
-
+ <strong>%3</strong>(%2)에 새 <strong>%1MiB</strong> 파티션을 만듭니다.
@@ -1339,7 +1343,7 @@ The installer will quit and all changes will be lost.
-
+ <em>%3</em> 기능이 있는 <strong>새</strong> %2 시스템 파티션에 %1을(를) 설치합니다.
@@ -1349,27 +1353,27 @@ The installer will quit and all changes will be lost.
-
+ 마운트 지점 <strong>%1</strong> 및 기능 <em>%3</em>(으)로 <strong>새</strong> %2 파티션을 설정합니다.
-
+ 마운트 지점 <strong>%1</strong>%3(으)로 <strong>새</strong> %2 파티션을 설정합니다.
-
+ <em>%4</em> 기능이 있는 %3 시스템 파티션 <strong>%1</strong>에 %2을(를) 설치합니다.
-
+ 마운트 지점 <strong>%2</strong> 및 기능 <em>%4</em>(으)로 %3 파티션 <strong>%1</strong>을(를) 설정합니다.
-
+ 마운트 지점 <strong>%2</strong>%4으로 %3 파티션 <strong>%1</strong>을(를) 설정합니다.
@@ -3950,29 +3954,31 @@ Output:
-
+ 설치 완료
-
+ %1이(가) 컴퓨터에 설치되었습니다.<br/>
+ 이제 새 시스템으로 다시 시작하거나 라이브 환경을 계속 사용할 수 있습니다.
-
+ 설치 관리자 닫기
-
+ 시스템 재시작
-
+ <p>설치의 전체 로그는 라이브 사용자의 홈 디렉토리에 installation.log로 제공됩니다.<br/>
+ 이 로그는 대상 시스템의 /var/log/installation.log에 복사됩니다.</p>
diff --git a/lang/calamares_uk.ts b/lang/calamares_uk.ts
index 9748c6f25..db4b54756 100644
--- a/lang/calamares_uk.ts
+++ b/lang/calamares_uk.ts
@@ -6,7 +6,7 @@
-
+ Керування параметрами автомонтування
@@ -322,7 +322,11 @@
%1
Link copied to clipboard
-
+ Журнал встановлення записано до
+
+%1
+
+Посилання скопійовано до буфера обміну
@@ -858,12 +862,12 @@ The installer will quit and all changes will be lost.
-
+ Налаштування %1 не завершено успішно.
-
+ Встановлення %1 не завершено успішно.
@@ -977,12 +981,12 @@ The installer will quit and all changes will be lost.
-
+ Створити розділ %1МіБ на %3 (%2) із записами %4.
-
+ Створити розділ %1МіБ на %3 (%2).
@@ -992,12 +996,12 @@ The installer will quit and all changes will be lost.
-
+ Створити розділ <strong>%1МіБ</strong> на <strong>%3</strong> (%2) із записами <em>%4</em>.
-
+ Створити розділ <strong>%1МіБ</strong> на <strong>%3</strong> (%2).
@@ -1345,7 +1349,7 @@ The installer will quit and all changes will be lost.
-
+ Встановити %1 на <strong>новий</strong> системний розділ %2 із можливостями <em>%3</em>
@@ -1355,27 +1359,27 @@ The installer will quit and all changes will be lost.
-
+ Налаштувати <strong>новий</strong> розділ %2 із точкою монтування <strong>%1</strong> і можливостями <em>%3</em>.
-
+ Налаштувати <strong>новий</strong> розділ %2 із точкою монтування <strong>%1</strong>%3.
-
+ Встановити %2 на системний розділ %3 <strong>%1</strong> із можливостями <em>%4</em>.
-
+ Налаштувати розділ %3 <strong>%1</strong> із точкою монтування <strong>%2</strong> і можливостями <em>%4</em>.
-
+ Налаштувати розділ %3 <strong>%1</strong> із точкою монтування <strong>%2</strong>%4.
@@ -3983,29 +3987,31 @@ Output:
-
+ Встановлення завершено
-
+ На ваш комп'ютер встановлено %1.<br/>
+ Тепер ви можете перезапустити вашу нову систему або продовжити користуватися середовищем портативної системи.
-
+ Закрити засіб встановлення
-
+ Перезапустити систему
-
+ <p>Повний журнал встановлення записано до файла installation.log у домашньому каталозі користувача портативної системи.<br/>
+ Цей журнал скопійовано до /var/log/installation.log системи призначення.</p>
diff --git a/lang/calamares_zh_TW.ts b/lang/calamares_zh_TW.ts
index 0c0883d18..975387456 100644
--- a/lang/calamares_zh_TW.ts
+++ b/lang/calamares_zh_TW.ts
@@ -6,7 +6,7 @@
-
+ 管理自動掛載設定
@@ -316,7 +316,11 @@
%1
Link copied to clipboard
-
+ 安裝紀錄檔已張貼到:
+
+%1
+
+連結已複製到剪貼簿
@@ -852,12 +856,12 @@ The installer will quit and all changes will be lost.
-
+ %1 的設定並未成功完成。
-
+ %1 的安裝並未成功完成。
@@ -971,12 +975,12 @@ The installer will quit and all changes will be lost.
-
+ 在 %3 (%2) 上使用項目 %4 建立新的 %1MiB 分割區。
-
+ 在 %3 (%2) 上建立新的 %1MiB 分割區。
@@ -986,12 +990,12 @@ The installer will quit and all changes will be lost.
-
+ 在 <strong>%3</strong> (%2) 上使用項目 <em>%4</em> 建立新的 <strong>%1MiB</strong> 分割區。
-
+ 在 <strong>%3</strong> (%2) 上建立新的 <strong>%1MiB</strong> 分割區。
@@ -1339,7 +1343,7 @@ The installer will quit and all changes will be lost.
-
+ 在有 <em>%3</em> 功能的<strong>新</strong> %2 系統分割區上安裝 %1
@@ -1349,27 +1353,27 @@ The installer will quit and all changes will be lost.
-
+ 設定有掛載點 <strong>%1</strong> 與 <em>%3</em> 的<strong>新</strong> %2 分割區。
-
+ 設定有掛載點 <strong>%1</strong> %3 的<strong>新</strong> %2 分割區。
-
+ 在有功能 <em>%4</em> 的 %3 系統分割區 <strong>%1</strong> 上安裝 %2。
-
+ 為分割區 %3 <strong>%1</strong> 設定掛載點 <strong>%2</strong> 與功能 <em>%4</em>。
-
+ 為分割區 %3 <strong>%1</strong> 設定掛載點 <strong>%2</strong> %4。
@@ -3950,29 +3954,31 @@ Output:
-
+ 安裝完成
-
+ %1 已安裝到您的電腦上。<br/>
+ 現在,您可以重新啟動到您的新系統,或繼續使用 Live 環境。
-
+ 關閉安裝程式
-
+ 重新啟動系統
-
+ <p>完整安裝紀錄檔可在 Live 使用者的家目錄中以 installation.log 的名稱取得。<br/>
+ 此紀錄檔已複製到目標系統的 /var/log/installation.log。</p>
diff --git a/src/modules/users/Config.cpp b/src/modules/users/Config.cpp
index 7aa1cb65c..be87ad93b 100644
--- a/src/modules/users/Config.cpp
+++ b/src/modules/users/Config.cpp
@@ -59,11 +59,11 @@ updateGSAutoLogin( bool doAutoLogin, const QString& login )
if ( doAutoLogin && !login.isEmpty() )
{
- gs->insert( "autologinUser", login );
+ gs->insert( "autoLoginUser", login );
}
else
{
- gs->remove( "autologinUser" );
+ gs->remove( "autoLoginUser" );
}
if ( login.isEmpty() )
@@ -142,13 +142,13 @@ insertInGlobalStorage( const QString& key, const QString& group )
}
void
-Config::setAutologinGroup( const QString& group )
+Config::setAutoLoginGroup( const QString& group )
{
- if ( group != m_autologinGroup )
+ if ( group != m_autoLoginGroup )
{
- m_autologinGroup = group;
- insertInGlobalStorage( QStringLiteral( "autologinGroup" ), group );
- emit autologinGroupChanged( group );
+ m_autoLoginGroup = group;
+ insertInGlobalStorage( QStringLiteral( "autoLoginGroup" ), group );
+ emit autoLoginGroupChanged( group );
}
}
@@ -162,9 +162,9 @@ Config::groupsForThisUser() const
{
l << g.name();
}
- if ( doAutoLogin() && !autologinGroup().isEmpty() )
+ if ( doAutoLogin() && !autoLoginGroup().isEmpty() )
{
- l << autologinGroup();
+ l << autoLoginGroup();
}
return l;
@@ -814,13 +814,13 @@ Config::setConfigurationMap( const QVariantMap& configurationMap )
// Now it might be explicitly set to empty, which is ok
setUserShell( shell );
- setAutologinGroup( CalamaresUtils::getString( configurationMap, "autologinGroup" ) );
+ setAutoLoginGroup( CalamaresUtils::getString( configurationMap, "autoLoginGroup" ) );
setSudoersGroup( CalamaresUtils::getString( configurationMap, "sudoersGroup" ) );
m_hostNameActions = getHostNameActions( configurationMap );
setConfigurationDefaultGroups( configurationMap, m_defaultGroups );
- m_doAutoLogin = CalamaresUtils::getBool( configurationMap, "doAutologin", false );
+ m_doAutoLogin = CalamaresUtils::getBool( configurationMap, "doAutoLogin", false );
m_writeRootPassword = CalamaresUtils::getBool( configurationMap, "setRootPassword", true );
Calamares::JobQueue::instance()->globalStorage()->insert( "setRootPassword", m_writeRootPassword );
diff --git a/src/modules/users/Config.h b/src/modules/users/Config.h
index 28f0c73d7..d9fce4f60 100644
--- a/src/modules/users/Config.h
+++ b/src/modules/users/Config.h
@@ -92,7 +92,7 @@ class PLUGINDLLEXPORT Config : public Calamares::ModuleSystem::Config
Q_PROPERTY( QString userShell READ userShell WRITE setUserShell NOTIFY userShellChanged )
- Q_PROPERTY( QString autologinGroup READ autologinGroup WRITE setAutologinGroup NOTIFY autologinGroupChanged )
+ Q_PROPERTY( QString autoLoginGroup READ autoLoginGroup WRITE setAutoLoginGroup NOTIFY autoLoginGroupChanged )
Q_PROPERTY( QString sudoersGroup READ sudoersGroup WRITE setSudoersGroup NOTIFY sudoersGroupChanged )
Q_PROPERTY( bool doAutoLogin READ doAutoLogin WRITE setAutoLogin NOTIFY autoLoginChanged )
@@ -185,7 +185,7 @@ public:
QString userShell() const { return m_userShell; }
/// The group of which auto-login users must be a member
- QString autologinGroup() const { return m_autologinGroup; }
+ QString autoLoginGroup() const { return m_autoLoginGroup; }
/// The group of which users who can "sudo" must be a member
QString sudoersGroup() const { return m_sudoersGroup; }
@@ -217,7 +217,7 @@ public:
const QList< GroupDescription >& defaultGroups() const { return m_defaultGroups; }
/** @brief the names of all the groups for the current user
*
- * Takes into account defaultGroups and autologin behavior.
+ * Takes into account defaultGroups and autoLogin behavior.
*/
QStringList groupsForThisUser() const;
@@ -253,8 +253,8 @@ public Q_SLOTS:
*/
void setUserShell( const QString& path );
- /// Sets the autologin group; empty is ignored
- void setAutologinGroup( const QString& group );
+ /// Sets the autoLogin group; empty is ignored
+ void setAutoLoginGroup( const QString& group );
/// Sets the sudoer group; empty is ignored
void setSudoersGroup( const QString& group );
@@ -266,7 +266,7 @@ public Q_SLOTS:
/// Sets the host name (flags it as "custom")
void setHostName( const QString& host );
- /// Sets the autologin flag
+ /// Sets the autoLogin flag
void setAutoLogin( bool b );
/// Set to true to use the user password, unchanged, for root too
@@ -281,7 +281,7 @@ public Q_SLOTS:
signals:
void userShellChanged( const QString& );
- void autologinGroupChanged( const QString& );
+ void autoLoginGroupChanged( const QString& );
void sudoersGroupChanged( const QString& );
void fullNameChanged( const QString& );
void loginNameChanged( const QString& );
@@ -305,7 +305,7 @@ private:
QList< GroupDescription > m_defaultGroups;
QString m_userShell;
- QString m_autologinGroup;
+ QString m_autoLoginGroup;
QString m_sudoersGroup;
QString m_fullName;
QString m_loginName;
diff --git a/src/modules/users/MiscJobs.cpp b/src/modules/users/MiscJobs.cpp
index c1c1d5d25..34fb08863 100644
--- a/src/modules/users/MiscJobs.cpp
+++ b/src/modules/users/MiscJobs.cpp
@@ -184,11 +184,11 @@ SetupGroupsJob::exec()
tr( "These groups are missing in the target system: %1" ).arg( missingGroups.join( ',' ) ) );
}
- if ( m_config->doAutoLogin() && !m_config->autologinGroup().isEmpty() )
+ if ( m_config->doAutoLogin() && !m_config->autoLoginGroup().isEmpty() )
{
- const QString autologinGroup = m_config->autologinGroup();
+ const QString autoLoginGroup = m_config->autoLoginGroup();
(void)ensureGroupsExistInTarget(
- QList< GroupDescription >() << GroupDescription( autologinGroup ), availableGroups, missingGroups );
+ QList< GroupDescription >() << GroupDescription( autoLoginGroup ), availableGroups, missingGroups );
}
return Calamares::JobResult::ok();
diff --git a/src/modules/users/Tests.cpp b/src/modules/users/Tests.cpp
index b687a6434..4106cd785 100644
--- a/src/modules/users/Tests.cpp
+++ b/src/modules/users/Tests.cpp
@@ -83,13 +83,13 @@ UserTests::testGetSet()
}
{
const QString al( "autolg" );
- QCOMPARE( c.autologinGroup(), QString() );
- c.setAutologinGroup( al );
- QCOMPARE( c.autologinGroup(), al );
+ QCOMPARE( c.autoLoginGroup(), QString() );
+ c.setAutoLoginGroup( al );
+ QCOMPARE( c.autoLoginGroup(), al );
QVERIFY( !c.doAutoLogin() );
c.setAutoLogin( true );
QVERIFY( c.doAutoLogin() );
- QCOMPARE( c.autologinGroup(), al );
+ QCOMPARE( c.autoLoginGroup(), al );
}
{
const QString su( "sudogrp" );
diff --git a/src/modules/users/UsersPage.cpp b/src/modules/users/UsersPage.cpp
index be9e63498..0e86931c1 100644
--- a/src/modules/users/UsersPage.cpp
+++ b/src/modules/users/UsersPage.cpp
@@ -105,6 +105,7 @@ UsersPage::UsersPage( Config* config, QWidget* parent )
connect( ui->textBoxFullName, &QLineEdit::textEdited, config, &Config::setFullName );
connect( config, &Config::fullNameChanged, this, &UsersPage::onFullNameTextEdited );
+ ui->textBoxHostName->setText( config->hostName() );
connect( ui->textBoxHostName, &QLineEdit::textEdited, config, &Config::setHostName );
connect( config, &Config::hostNameChanged, ui->textBoxHostName, &QLineEdit::setText );
connect( config, &Config::hostNameStatusChanged, this, &UsersPage::reportHostNameStatus );
@@ -144,9 +145,12 @@ UsersPage::UsersPage( Config* config, QWidget* parent )
onReuseUserPasswordChanged( m_config->reuseUserPasswordForRoot() );
onFullNameTextEdited( m_config->fullName() );
reportLoginNameStatus( m_config->loginNameStatus() );
+ reportHostNameStatus( m_config->hostNameStatus() );
ui->textBoxLoginName->setEnabled( m_config->isEditable( "loginName" ) );
ui->textBoxFullName->setEnabled( m_config->isEditable( "fullName" ) );
+
+ retranslate();
}
UsersPage::~UsersPage()
diff --git a/src/modules/users/UsersViewStep.cpp b/src/modules/users/UsersViewStep.cpp
index df823df06..683673459 100644
--- a/src/modules/users/UsersViewStep.cpp
+++ b/src/modules/users/UsersViewStep.cpp
@@ -88,10 +88,10 @@ UsersViewStep::isAtEnd() const
}
-QList< Calamares::job_ptr >
+Calamares::JobList
UsersViewStep::jobs() const
{
- return m_jobs;
+ return m_config->createJobs();
}
@@ -108,7 +108,6 @@ UsersViewStep::onActivate()
void
UsersViewStep::onLeave()
{
- m_jobs = m_config->createJobs();
m_config->finalizeGlobalStorage();
}
diff --git a/src/modules/users/UsersViewStep.h b/src/modules/users/UsersViewStep.h
index abafc1b23..8d5abe48f 100644
--- a/src/modules/users/UsersViewStep.h
+++ b/src/modules/users/UsersViewStep.h
@@ -39,7 +39,7 @@ public:
bool isAtBeginning() const override;
bool isAtEnd() const override;
- QList< Calamares::job_ptr > jobs() const override;
+ Calamares::JobList jobs() const override;
void onActivate() override;
void onLeave() override;
@@ -48,8 +48,6 @@ public:
private:
UsersPage* m_widget;
- Calamares::JobList m_jobs;
-
Config* m_config;
};
diff --git a/src/modules/usersq/UsersQmlViewStep.cpp b/src/modules/usersq/UsersQmlViewStep.cpp
index b83c66f45..cc35c0b0f 100644
--- a/src/modules/usersq/UsersQmlViewStep.cpp
+++ b/src/modules/usersq/UsersQmlViewStep.cpp
@@ -12,16 +12,12 @@
#include "UsersQmlViewStep.h"
-#include "SetHostNameJob.h"
-#include "SetPasswordJob.h"
-
+#include "GlobalStorage.h"
+#include "JobQueue.h"
#include "utils/Logger.h"
#include "utils/NamedEnum.h"
#include "utils/Variant.h"
-#include "GlobalStorage.h"
-#include "JobQueue.h"
-
CALAMARES_PLUGIN_FACTORY_DEFINITION( UsersQmlViewStepFactory, registerPlugin< UsersQmlViewStep >(); )
UsersQmlViewStep::UsersQmlViewStep( QObject* parent )
@@ -43,59 +39,41 @@ bool
UsersQmlViewStep::isNextEnabled() const
{
return m_config->isReady();
- //return true;
}
-
bool
UsersQmlViewStep::isBackEnabled() const
{
return true;
}
-
bool
UsersQmlViewStep::isAtBeginning() const
{
return true;
}
-
bool
UsersQmlViewStep::isAtEnd() const
{
return true;
}
-
-QList< Calamares::job_ptr >
+Calamares::JobList
UsersQmlViewStep::jobs() const
{
- return m_jobs;
+ return m_config->createJobs();
}
-
-void
-UsersQmlViewStep::onActivate()
-{
- //m_config->onActivate();
- //QmlViewStep::onActivate();
-}
-
-
void
UsersQmlViewStep::onLeave()
{
- m_jobs = m_config->createJobs();
m_config->finalizeGlobalStorage();
}
-
void
UsersQmlViewStep::setConfigurationMap( const QVariantMap& configurationMap )
{
m_config->setConfigurationMap( configurationMap );
-
Calamares::QmlViewStep::setConfigurationMap( configurationMap ); // call parent implementation last
- setContextProperty( "Users", m_config );
}
diff --git a/src/modules/usersq/UsersQmlViewStep.h b/src/modules/usersq/UsersQmlViewStep.h
index 33a1f5754..e98df9d03 100644
--- a/src/modules/usersq/UsersQmlViewStep.h
+++ b/src/modules/usersq/UsersQmlViewStep.h
@@ -12,14 +12,14 @@
#ifndef USERSQMLVIEWSTEP_H
#define USERSQMLVIEWSTEP_H
-#include
-
-#include
-#include
-
-#include
-
+// Config from users module
#include "Config.h"
+
+#include "DllMacro.h"
+#include "utils/PluginFactory.h"
+#include "viewpages/QmlViewStep.h"
+
+#include
#include
class PLUGINDLLEXPORT UsersQmlViewStep : public Calamares::QmlViewStep
@@ -37,9 +37,8 @@ public:
bool isAtBeginning() const override;
bool isAtEnd() const override;
- QList< Calamares::job_ptr > jobs() const override;
+ Calamares::JobList jobs() const override;
- void onActivate() override;
void onLeave() override;
void setConfigurationMap( const QVariantMap& configurationMap ) override;
@@ -48,7 +47,6 @@ public:
private:
Config* m_config;
- Calamares::JobList m_jobs;
};
CALAMARES_PLUGIN_FACTORY_DECLARATION( UsersQmlViewStepFactory )
diff --git a/src/modules/usersq/usersq.qml b/src/modules/usersq/usersq.qml
index 6f1aaa137..0886bba1b 100644
--- a/src/modules/usersq/usersq.qml
+++ b/src/modules/usersq/usersq.qml
@@ -56,10 +56,12 @@ Kirigami.ScrollablePage {
id: _userNameField
width: parent.width
+ enabled: config.isEditable("fullName")
placeholderText: qsTr("Your Full Name")
- onTextChanged: config.fullNameChanged(text)
- background: Rectangle {
+ text: config.fullName
+ onTextChanged: config.setFullName(text);
+ background: Rectangle {
color: "#FBFBFB" // Kirigami.Theme.backgroundColor
radius: 2
opacity: 0.9
@@ -84,9 +86,10 @@ Kirigami.ScrollablePage {
id: _userLoginField
width: parent.width
+ enabled: config.isEditable("loginName")
placeholderText: qsTr("Login Name")
- //text: config.userName
- onTextEdited: config.loginNameStatusChanged(text)
+ text: config.loginName
+ onTextChanged: config.setLoginName(text)
background: Rectangle {
@@ -124,7 +127,8 @@ Kirigami.ScrollablePage {
width: parent.width
placeholderText: qsTr("Computer Name")
text: config.hostName
- onTextEdited: config.hostNameStatusChanged(text)
+ onTextChanged: config.setHostName(text)
+
background: Rectangle {
color: "#FBFBFB" // Kirigami.Theme.backgroundColor
@@ -164,10 +168,12 @@ Kirigami.ScrollablePage {
id: _passwordField
width: parent.width / 2 - 10
placeholderText: qsTr("Password")
+ text: config.userPassword
+ onTextChanged: config.setUserPassword(text)
+
echoMode: TextInput.Password
passwordMaskDelay: 300
inputMethodHints: Qt.ImhNoAutoUppercase
- onTextChanged: config.userPasswordStatusChanged(text, _verificationPasswordField.text)
background: Rectangle {
@@ -183,10 +189,12 @@ Kirigami.ScrollablePage {
id: _verificationPasswordField
width: parent.width / 2 - 10
placeholderText: qsTr("Repeat Password")
+ text: config.userPasswordSecondary
+ onTextChanged: config.setUserPasswordSecondary(text)
+
echoMode: TextInput.Password
passwordMaskDelay: 300
inputMethodHints: Qt.ImhNoAutoUppercase
- onTextChanged: config.userPasswordSecondaryChanged(_passwordField.text, text)
background: Rectangle {
@@ -211,17 +219,14 @@ Kirigami.ScrollablePage {
CheckBox {
- visible: config.allowWeakPasswords
- //visible: false
+ visible: config.permitWeakPasswords
text: qsTr("Validate passwords quality")
- checked: config.allowWeakPasswordsDefault
- onToggled: config.allowWeakPasswordsDefault = !config.allowWeakPasswordsDefault
+ checked: config.requireStrongPasswords
+ onCheckedChanged: config.setRequireStrongPasswords(checked)
}
Label {
-
- visible: config.allowWeakPasswords
- //visible: false
+ visible: config.permitWeakPasswords
width: parent.width
text: qsTr("When this box is checked, password-strength checking is done and you will not be able to use a weak password.")
font.weight: Font.Thin
@@ -230,24 +235,20 @@ Kirigami.ScrollablePage {
}
CheckBox {
-
text: qsTr("Log in automatically without asking for the password")
- checked: config.doAutologin
- onToggled: config.doAutologin = !config.doAutologin
+ checked: config.doAutoLogin
+ onCheckedChanged: config.setAutoLogin(checked)
}
CheckBox {
-
id: root
- visible: config.doReusePassword
+ visible: config.writeRootPassword
text: qsTr("Reuse user password as root password")
checked: config.reuseUserPasswordForRoot
- //checked: false
- onToggled: config.reuseUserPasswordForRoot = !config.reuseUserPasswordForRoot
+ onCheckedChanged: config.setReuseUserPasswordForRoot(checked)
}
Label {
-
visible: root.checked
width: parent.width
text: qsTr("Use the same password for the administrator account.")
@@ -277,10 +278,12 @@ Kirigami.ScrollablePage {
id: _rootPasswordField
width: parent.width / 2 -10
placeholderText: qsTr("Root Password")
+ text: config.rootPassword
+ onTextChanged: config.setRootPassword(text)
+
echoMode: TextInput.Password
passwordMaskDelay: 300
inputMethodHints: Qt.ImhNoAutoUppercase
- onTextChanged: config.rootPasswordChanged(text, _verificationRootPasswordField.text)
background: Rectangle {
@@ -296,10 +299,12 @@ Kirigami.ScrollablePage {
id: _verificationRootPasswordField
width: parent.width / 2 -10
placeholderText: qsTr("Repeat Root Password")
+ text: config.rootPasswordSecondary
+ onTextChanged: config.setRootPasswordSecondary(text)
+
echoMode: TextInput.Password
passwordMaskDelay: 300
inputMethodHints: Qt.ImhNoAutoUppercase
- onTextChanged: config.rootPasswordSecondaryChanged(_rootPasswordField.text, text)
background: Rectangle {