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
8ddd5a35
Verified
Commit
8ddd5a35
authored
1 year ago
by
Burak Hançerli
Browse files
Options
Downloads
Patches
Plain Diff
chore: a bit cleanup
parent
6dfb127a
No related branches found
No related tags found
2 merge requests
!22
QDS-11332 Implement better qmlproject handling
,
!21
Design studio connector
Pipeline
#64570
passed
1 year ago
Stage: build
Changes
3
Pipelines
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/backend.cpp
+1
-1
1 addition, 1 deletion
src/backend.cpp
src/projectManager.cpp
+3
-8
3 additions, 8 deletions
src/projectManager.cpp
src/projectManager.h
+1
-1
1 addition, 1 deletion
src/projectManager.h
with
5 additions
and
10 deletions
src/backend.cpp
+
1
−
1
View file @
8ddd5a35
...
@@ -131,7 +131,7 @@ bool Backend::connectDesignStudio()
...
@@ -131,7 +131,7 @@ bool Backend::connectDesignStudio()
qDebug
()
<<
"Project unpacked to "
<<
projectPath
;
qDebug
()
<<
"Project unpacked to "
<<
projectPath
;
updatePopup
(
"Running project..."
);
updatePopup
(
"Running project..."
);
if
(
!
m_projectManager
.
runProject
(
projectPath
,
"UntitledProject35"
))
{
if
(
!
m_projectManager
.
runProject
(
projectPath
))
{
qCritical
()
<<
"Could not run project. Please check the logs for more "
qCritical
()
<<
"Could not run project. Please check the logs for more "
"information."
;
"information."
;
}
else
{
}
else
{
...
...
This diff is collapsed.
Click to expand it.
src/projectManager.cpp
+
3
−
8
View file @
8ddd5a35
...
@@ -164,13 +164,9 @@ QStringList ProjectManager::getImportPaths(const QString &projectPath,
...
@@ -164,13 +164,9 @@ QStringList ProjectManager::getImportPaths(const QString &projectPath,
QStringList
importPaths
;
QStringList
importPaths
;
for
(
const
QString
&
path
:
importPathsMatch
.
captured
(
1
).
split
(
","
))
{
for
(
const
QString
&
path
:
importPathsMatch
.
captured
(
1
).
split
(
","
))
{
qDebug
()
<<
"verbose:: Found import path: "
<<
path
;
QString
cleanedPath
=
path
.
trimmed
();
QString
cleanedPath
=
path
.
trimmed
();
qDebug
()
<<
"verbose:: Cleaned import path: "
<<
cleanedPath
;
cleanedPath
=
projectPath
+
"/"
+
cleanedPath
.
mid
(
1
,
cleanedPath
.
length
()
-
2
);
cleanedPath
=
projectPath
+
"/"
+
cleanedPath
.
mid
(
1
,
cleanedPath
.
length
()
-
2
);
qDebug
()
<<
"verbose:: Cleaned import path: "
<<
cleanedPath
;
if
(
QFileInfo
::
exists
(
cleanedPath
))
{
if
(
QFileInfo
::
exists
(
cleanedPath
))
{
qDebug
()
<<
"verbose:: Adding import path: "
<<
cleanedPath
;
importPaths
.
append
(
cleanedPath
);
importPaths
.
append
(
cleanedPath
);
}
}
}
}
...
@@ -185,7 +181,7 @@ bool ProjectManager::isQt6Project(const QString &qmlProjectFileContent)
...
@@ -185,7 +181,7 @@ bool ProjectManager::isQt6Project(const QString &qmlProjectFileContent)
return
qt6ProjectMatch
.
hasMatch
();
return
qt6ProjectMatch
.
hasMatch
();
}
}
bool
ProjectManager
::
runProject
(
const
QString
&
projectPath
,
const
QString
&
projectName
)
bool
ProjectManager
::
runProject
(
const
QString
&
projectPath
)
{
{
qDebug
()
<<
"Project location: "
<<
projectPath
;
qDebug
()
<<
"Project location: "
<<
projectPath
;
...
@@ -396,11 +392,10 @@ bool ProjectManager::isProjectCached(const QJsonObject &projectInfo)
...
@@ -396,11 +392,10 @@ bool ProjectManager::isProjectCached(const QJsonObject &projectInfo)
bool
ProjectManager
::
runCachedProject
(
const
QJsonObject
&
projectInfo
)
bool
ProjectManager
::
runCachedProject
(
const
QJsonObject
&
projectInfo
)
{
{
const
QString
projectId
=
projectInfo
.
value
(
"id"
).
toString
();
const
QString
projectId
=
projectInfo
.
value
(
"id"
).
toString
();
const
QString
projectName
=
projectInfo
.
value
(
"appName"
).
toString
();
qDebug
()
<<
"Running cached project "
<<
projectId
;
qDebug
()
<<
"Running cached project "
<<
projectId
;
const
QString
projectPath
=
m_projectCachePath
+
"/"
+
projectId
;
const
QString
projectPath
=
m_projectCachePath
+
"/"
+
projectId
;
return
runProject
(
projectPath
,
projectName
);
return
runProject
(
projectPath
);
}
}
bool
ProjectManager
::
cacheDemoProject
(
const
QByteArray
&
projectData
,
const
QString
&
projectName
)
bool
ProjectManager
::
cacheDemoProject
(
const
QByteArray
&
projectData
,
const
QString
&
projectName
)
...
@@ -460,7 +455,7 @@ bool ProjectManager::runDemoProject(const QString &projectName)
...
@@ -460,7 +455,7 @@ bool ProjectManager::runDemoProject(const QString &projectName)
{
{
const
QString
demoProjectPath
=
m_demoProjectCachePath
+
"/"
+
projectName
;
const
QString
demoProjectPath
=
m_demoProjectCachePath
+
"/"
+
projectName
;
qDebug
()
<<
"Running demo project "
<<
projectName
<<
" from "
<<
demoProjectPath
;
qDebug
()
<<
"Running demo project "
<<
projectName
<<
" from "
<<
demoProjectPath
;
return
runProject
(
demoProjectPath
,
projectName
);
return
runProject
(
demoProjectPath
);
}
}
void
ProjectManager
::
orientateWindow
(
Qt
::
ScreenOrientation
orientation
)
void
ProjectManager
::
orientateWindow
(
Qt
::
ScreenOrientation
orientation
)
...
...
This diff is collapsed.
Click to expand it.
src/projectManager.h
+
1
−
1
View file @
8ddd5a35
...
@@ -40,7 +40,7 @@ public:
...
@@ -40,7 +40,7 @@ public:
explicit
ProjectManager
(
QObject
*
parent
=
nullptr
);
explicit
ProjectManager
(
QObject
*
parent
=
nullptr
);
QString
unpackProject
(
const
QByteArray
&
project
,
bool
extractZip
=
false
);
QString
unpackProject
(
const
QByteArray
&
project
,
bool
extractZip
=
false
);
bool
runProject
(
const
QString
&
projectPath
,
const
QString
&
projectName
);
bool
runProject
(
const
QString
&
projectPath
);
bool
cacheProject
(
const
QByteArray
&
projectData
,
const
QJsonObject
&
projectInfo
);
bool
cacheProject
(
const
QByteArray
&
projectData
,
const
QJsonObject
&
projectInfo
);
bool
isProjectCached
(
const
QJsonObject
&
projectInfo
);
bool
isProjectCached
(
const
QJsonObject
&
projectInfo
);
...
...
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