Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
KDevelop
KDevelop
Commits
e185f585
Commit
e185f585
authored
Dec 17, 2021
by
Kevin Whitaker
Browse files
flatpak: Fix looking up user installed SDKs
Look the SDK up first in the user installation then the system's.
parent
33eff1ac
Pipeline
#111598
passed with stage
in 33 minutes and 6 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
plugins/flatpak/flatpakruntime.cpp
View file @
e185f585
...
...
@@ -73,7 +73,11 @@ void FlatpakRuntime::refreshJson()
const
QString
runtimeVersion
=
doc
.
value
(
QLatin1String
(
"runtime-version"
)).
toString
();
const
QString
usedRuntime
=
sdkName
+
QLatin1Char
(
'/'
)
+
m_arch
+
QLatin1Char
(
'/'
)
+
runtimeVersion
;
m_sdkPath
=
KDevelop
::
Path
(
QLatin1String
(
"/var/lib/flatpak/runtime/"
)
+
usedRuntime
+
QLatin1String
(
"/active/files"
));
//First check if local user has flatpak runtime before checking system runtimes.
m_sdkPath
=
KDevelop
::
Path
(
QDir
::
homePath
()
+
QLatin1String
(
"/.local/share/flatpak/runtime/"
)
+
usedRuntime
+
QLatin1String
(
"/active/files"
));
if
(
!
QFile
::
exists
(
m_sdkPath
.
toLocalFile
()))
{
m_sdkPath
=
KDevelop
::
Path
(
QLatin1String
(
"/var/lib/flatpak/runtime/"
)
+
usedRuntime
+
QLatin1String
(
"/active/files"
));
}
qCDebug
(
FLATPAK
)
<<
"flatpak runtime path..."
<<
name
()
<<
m_sdkPath
;
Q_ASSERT
(
QFile
::
exists
(
m_sdkPath
.
toLocalFile
()));
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment