Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Qt UI Viewer
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Design Studio
QML Viewer Projects
Qt UI Viewer
Commits
aaa304d4
Verified
Commit
aaa304d4
authored
1 year ago
by
Burak Hançerli
Browse files
Options
Downloads
Patches
Plain Diff
fix: use already initialized projectlist variable
parent
af357313
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Pipeline
#67392
passed
1 year ago
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/backend.cpp
+2
-14
2 additions, 14 deletions
src/backend.cpp
with
2 additions
and
14 deletions
src/backend.cpp
+
2
−
14
View file @
aaa304d4
...
@@ -408,22 +408,10 @@ void Backend::runUserProject(const QString &projectName)
...
@@ -408,22 +408,10 @@ void Backend::runUserProject(const QString &projectName)
qDebug
()
<<
"Running user project:"
<<
projectName
;
qDebug
()
<<
"Running user project:"
<<
projectName
;
const
QString
userHash
=
Backend
::
userHash
();
qDebug
(
"Checking if project is cached. Getting list of available projects..."
);
const
std
::
optional
<
QJsonArray
>
projectList
=
m_serviceConnector
.
fetchUserProjectList
(
userHash
);
if
(
projectList
==
std
::
nullopt
)
{
qCritical
()
<<
"Could not fetch up-to-date project information. Please check your internet "
"connection and try again."
;
emit
popupClose
();
return
;
}
QString
projectLastModified
;
QString
projectLastModified
;
QString
projectId
;
QString
projectId
;
QJsonObject
projectInfo
;
QJsonObject
projectInfo
;
for
(
auto
project
:
projectList
.
value
()
)
{
for
(
const
auto
&
project
:
m_
projectList
)
{
if
(
projectName
==
project
.
toObject
().
value
(
"appName"
).
toString
())
{
if
(
projectName
==
project
.
toObject
().
value
(
"appName"
).
toString
())
{
projectInfo
=
project
.
toObject
();
projectInfo
=
project
.
toObject
();
break
;
break
;
...
@@ -436,7 +424,7 @@ void Backend::runUserProject(const QString &projectName)
...
@@ -436,7 +424,7 @@ void Backend::runUserProject(const QString &projectName)
qDebug
(
"Project is not cached. Downloading..."
);
qDebug
(
"Project is not cached. Downloading..."
);
updatePopup
(
"Project is not cached. Downloading..."
,
false
);
updatePopup
(
"Project is not cached. Downloading..."
,
false
);
const
std
::
optional
<
QByteArray
>
projectData
const
std
::
optional
<
QByteArray
>
projectData
=
m_serviceConnector
.
fetchUserProject
(
userHash
,
projectName
);
=
m_serviceConnector
.
fetchUserProject
(
userHash
()
,
projectName
);
if
(
projectData
==
std
::
nullopt
)
{
if
(
projectData
==
std
::
nullopt
)
{
qCritical
()
qCritical
()
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment