|
|
|
@ -26,12 +26,39 @@
|
|
|
|
|
|
|
|
|
|
class Config : public QObject
|
|
|
|
|
{
|
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
|
|
Q_PROPERTY( QString userShell READ userShell WRITE setUserShell NOTIFY userShellChanged )
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
Config( QObject* parent = nullptr );
|
|
|
|
|
~Config();
|
|
|
|
|
|
|
|
|
|
// Currently, config does nothing
|
|
|
|
|
void setConfigurationMap( const QVariantMap& );
|
|
|
|
|
|
|
|
|
|
/** @brief Full path to the user's shell executable
|
|
|
|
|
*
|
|
|
|
|
* Typically this will be /bin/bash, but it can be set from
|
|
|
|
|
* the config file with the *userShell* setting.
|
|
|
|
|
*/
|
|
|
|
|
QString userShell() const { return m_userShell; }
|
|
|
|
|
|
|
|
|
|
public Q_SLOTS:
|
|
|
|
|
/** @brief Sets the user's shell if possible
|
|
|
|
|
*
|
|
|
|
|
* If the path is empty, that's ok: no shell will be explicitly set,
|
|
|
|
|
* so the user will get whatever shell is set to default in the target.
|
|
|
|
|
*
|
|
|
|
|
* The given non-empty @p path must be an absolute path (for use inside
|
|
|
|
|
* the target system!); if it is not, the shell is not changed.
|
|
|
|
|
*/
|
|
|
|
|
void setUserShell( const QString& path );
|
|
|
|
|
|
|
|
|
|
signals:
|
|
|
|
|
void userShellChanged( const QString& );
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
QString m_userShell;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|