File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -120,6 +120,23 @@ void EnvironmentsManager::createDBusEnvironments()
120
120
for (auto env : additionalEnvs) {
121
121
m_envMap.insert (env, qgetenv (env));
122
122
}
123
+
124
+ QByteArray sessionType = qgetenv (" XDG_SESSION_TYPE" );
125
+ if (sessionType == " wayland" ) {
126
+ QFile localeFile (QStandardPaths::locate (QStandardPaths::ConfigLocation, " locale.conf" ));
127
+ if (localeFile.open (QIODevice::ReadOnly)) {
128
+ QTextStream in (&localeFile);
129
+
130
+ while (!in.atEnd ()) {
131
+ QString line = in.readLine ();
132
+ if (line.startsWith (" LANG=" )) {
133
+ m_envMap.insert (" LANG" , line.mid (strlen (" LANG=" )));
134
+ } else if (line.startsWith (" LANGUAGE=" )) {
135
+ m_envMap.insert (" LANGUAGE" , line.mid (strlen (" LANGUAGE=" )));
136
+ }
137
+ }
138
+ }
139
+ }
123
140
}
124
141
125
142
bool EnvironmentsManager::unsetEnv (QString env)
You can’t perform that action at this time.
0 commit comments