Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Qt Design 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 Design Viewer
Commits
d5ff6cfb
Commit
d5ff6cfb
authored
3 months ago
by
Burak Hançerli
Browse files
Options
Downloads
Patches
Plain Diff
QDS-14390
Ignore comment lines in the qmlproject file
parent
75d743b7
No related branches found
No related tags found
1 merge request
!37
QDS-14390 Ignore comment lines in the qmlproject file
Pipeline
#78313
passed
3 months ago
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
qtquickdesigner-components
+1
-1
1 addition, 1 deletion
qtquickdesigner-components
src/designviewer.cpp
+4
-2
4 additions, 2 deletions
src/designviewer.cpp
with
5 additions
and
3 deletions
qtquickdesigner-components
@
04a5f670
Subproject commit
20397e26370ff073125fd19f77c7ad013276b5bd
Subproject commit
04a5f670d3e7ae28e54bf194a3dd70e13d05ffc4
This diff is collapsed.
Click to expand it.
src/designviewer.cpp
+
4
−
2
View file @
d5ff6cfb
...
@@ -112,7 +112,9 @@ void DesignViewer::parseQmlprojectFile(const QString &fileName,
...
@@ -112,7 +112,9 @@ void DesignViewer::parseQmlprojectFile(const QString &fileName,
return
;
return
;
}
}
const
QString
text
=
QString
::
fromUtf8
(
file
.
readAll
());
// Regular expression to remove lines starting with //
QRegularExpression
commentRegExp
(
"^
\\
s*//.*$"
,
QRegularExpression
::
MultilineOption
);
const
QString
text
=
QString
::
fromUtf8
(
file
.
readAll
()).
remove
(
commentRegExp
);
const
QRegularExpression
mainFileRegExp
(
"mainFile:
\\
s*
\"
(.*)
\"
"
);
const
QRegularExpression
mainFileRegExp
(
"mainFile:
\\
s*
\"
(.*)
\"
"
);
const
QRegularExpressionMatch
mainFileMatch
=
mainFileRegExp
.
match
(
text
);
const
QRegularExpressionMatch
mainFileMatch
=
mainFileRegExp
.
match
(
text
);
...
@@ -133,7 +135,7 @@ void DesignViewer::parseQmlprojectFile(const QString &fileName,
...
@@ -133,7 +135,7 @@ void DesignViewer::parseQmlprojectFile(const QString &fileName,
const
QRegularExpressionMatch
qt6ProjectMatch
=
qt6ProjectRegExp
.
match
(
text
);
const
QRegularExpressionMatch
qt6ProjectMatch
=
qt6ProjectRegExp
.
match
(
text
);
if
(
!
qt6ProjectMatch
.
hasMatch
())
if
(
!
qt6ProjectMatch
.
hasMatch
())
{
{
qWarning
()
<<
"This is not a Qt6 project.
\n
Qt5 projects might work, but they are not "
qWarning
()
<<
"This is not a Qt6 project.Qt5 projects might work, but they are not "
"officially supported."
;
"officially supported."
;
}
}
...
...
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