mirror of
https://gitlab.linphone.org/BC/public/linphone-desktop.git
synced 2026-05-07 14:44:01 +00:00
fix(src/app/App): do not create linphone config when prefered language is fetched
This commit is contained in:
parent
6cca4d14f6
commit
566b1c0e61
3 changed files with 7 additions and 6 deletions
|
|
@ -83,7 +83,7 @@ App::App (int &argc, char *argv[]) : SingleApplication(argc, argv, true) {
|
|||
// Try to use preferred locale.
|
||||
QString locale = ::Utils::coreStringToAppString(
|
||||
linphone::Config::newWithFactory(
|
||||
Paths::getConfigFilePath(mParser.value("config")), "")->getString(
|
||||
Paths::getConfigFilePath(mParser.value("config"), false), "")->getString(
|
||||
SettingsModel::UI_SECTION, "locale", ""
|
||||
)
|
||||
);
|
||||
|
|
|
|||
|
|
@ -175,11 +175,12 @@ string Paths::getCapturesDirPath () {
|
|||
return getWritableDirPath(QStandardPaths::writableLocation(QStandardPaths::AppLocalDataLocation) + PATH_CAPTURES);
|
||||
}
|
||||
|
||||
string Paths::getConfigFilePath (const QString &configPath) {
|
||||
if (!configPath.isEmpty())
|
||||
return getWritableFilePath(QFileInfo(configPath).absoluteFilePath());
|
||||
string Paths::getConfigFilePath (const QString &configPath, bool writable) {
|
||||
const QString &path = configPath.isEmpty()
|
||||
? getAppConfigFilePath()
|
||||
: QFileInfo(configPath).absoluteFilePath();
|
||||
|
||||
return getWritableFilePath(getAppConfigFilePath());
|
||||
return writable ? getWritableFilePath(path) : getReadableFilePath(path);
|
||||
}
|
||||
|
||||
string Paths::getFactoryConfigFilePath () {
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ namespace Paths {
|
|||
std::string getAvatarsDirPath ();
|
||||
std::string getCallHistoryFilePath ();
|
||||
std::string getCapturesDirPath ();
|
||||
std::string getConfigFilePath (const QString &configPath = QString());
|
||||
std::string getConfigFilePath (const QString &configPath = QString(), bool writable = true);
|
||||
std::string getFactoryConfigFilePath ();
|
||||
std::string getFriendsListFilePath ();
|
||||
std::string getDownloadDirPath ();
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue