Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Marco Bubke
flatpak-qt-creator
Commits
4cbdc3b4
Commit
4cbdc3b4
authored
May 16, 2011
by
Thomas Hartmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
QmlDesigner.model: extending Import:toString
This allows skipping the alias part.
parent
9b93ac78
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
src/plugins/qmldesigner/designercore/include/import.h
src/plugins/qmldesigner/designercore/include/import.h
+1
-1
src/plugins/qmldesigner/designercore/model/import.cpp
src/plugins/qmldesigner/designercore/model/import.cpp
+2
-2
No files found.
src/plugins/qmldesigner/designercore/include/import.h
View file @
4cbdc3b4
...
...
@@ -59,7 +59,7 @@ public:
QString
alias
()
const
{
return
m_alias
;
}
QStringList
importPaths
()
const
{
return
m_importPathList
;
}
QString
toString
(
bool
addSemicolon
=
false
)
const
;
QString
toString
(
bool
addSemicolon
=
false
,
bool
skipAlias
=
false
)
const
;
bool
operator
==
(
const
Import
&
other
)
const
;
...
...
src/plugins/qmldesigner/designercore/model/import.cpp
View file @
4cbdc3b4
...
...
@@ -60,7 +60,7 @@ Import::Import(const QString &url, const QString &file, const QString &version,
{
}
QString
Import
::
toString
(
bool
addSemicolon
)
const
QString
Import
::
toString
(
bool
addSemicolon
,
bool
skipAlias
)
const
{
QString
result
=
QLatin1String
(
"import "
);
...
...
@@ -74,7 +74,7 @@ QString Import::toString(bool addSemicolon) const
if
(
hasVersion
())
result
+=
' '
+
version
();
if
(
hasAlias
())
if
(
hasAlias
()
&&
!
skipAlias
)
result
+=
" as "
+
alias
();
if
(
addSemicolon
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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