diff --git a/src/dfm-mount/private/dnetworkmounter.cpp b/src/dfm-mount/private/dnetworkmounter.cpp index 4e5c7e9..cc74635 100644 --- a/src/dfm-mount/private/dnetworkmounter.cpp +++ b/src/dfm-mount/private/dnetworkmounter.cpp @@ -37,6 +37,7 @@ static constexpr char kLoginDomain[] { "domain" }; static constexpr char kLoginPasswd[] { "passwd" }; static constexpr char kLoginTimeout[] { "timeout" }; static constexpr char kMountFsType[] { "fsType" }; +static constexpr char kSmbConfigPath[] { "/etc/samba/smb.conf" }; static constexpr char kDaemonMountRetKeyMpt[] { "mountPoint" }; static constexpr char kDaemonMountRetKeyErrno[] { "errno" }; @@ -240,9 +241,9 @@ void DNetworkMounter::mountByDaemon(const QString &address, GetMountPassInfo get { auto requestLoginInfo = [address, getPassInfo] { if (getPassInfo) { - QSettings settings("/etc/samba/smb.conf", QSettings::IniFormat); + QSettings setting(kSmbConfigPath, QSettings::IniFormat); return getPassInfo(QObject::tr("need authorization to access %1").arg(address), - Utils::currentUser(), settings.value("global/workgroup", "WORKGROUP").toString()); + Utils::currentUser(), setting.value("global/workgroup", "WORKGROUP").toString()); } return MountPassInfo(); };