Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Marco Bubke
flatpak-qt-creator
Commits
ec1bc282
Commit
ec1bc282
authored
Jun 24, 2010
by
Oswald Buddenhagen
Browse files
Merge remote branch 'origin/2.0'
Conflicts: src/shared/proparser/profileevaluator.cpp
parents
af44136e
51a75e3c
Changes
4
Hide whitespace changes
Inline
Side-by-side
src/plugins/qmlprojectmanager/fileformat/qmlprojectitem.cpp
View file @
ec1bc282
...
...
@@ -10,6 +10,7 @@ class QmlProjectItemPrivate : public QObject {
public:
QString
sourceDirectory
;
QStringList
importPaths
;
QStringList
absoluteImportPaths
;
QList
<
QmlFileFilterItem
*>
qmlFileFilters
()
const
;
...
...
@@ -77,23 +78,34 @@ void QmlProjectItem::setSourceDirectory(const QString &directoryPath)
}
}
setImportPaths
(
d
->
importPaths
);
emit
sourceDirectoryChanged
();
}
QStringList
QmlProjectItem
::
importPaths
()
const
{
Q_D
(
const
QmlProjectItem
);
return
d
->
i
mportPaths
;
return
d
->
absoluteI
mportPaths
;
}
void
QmlProjectItem
::
setImportPaths
(
const
QStringList
&
importPaths
)
{
Q_D
(
QmlProjectItem
);
if
(
d
->
importPaths
==
importPaths
)
if
(
d
->
importPaths
!=
importPaths
)
d
->
importPaths
=
importPaths
;
// convert to absolute paths
QStringList
absoluteImportPaths
;
const
QDir
sourceDir
(
sourceDirectory
());
foreach
(
const
QString
&
importPath
,
importPaths
)
absoluteImportPaths
+=
QDir
::
cleanPath
(
sourceDir
.
absoluteFilePath
(
importPath
));
if
(
d
->
absoluteImportPaths
==
absoluteImportPaths
)
return
;
d
->
i
mportPaths
=
i
mportPaths
;
d
->
absoluteI
mportPaths
=
absoluteI
mportPaths
;
emit
importPathsChanged
();
}
...
...
src/plugins/qmlprojectmanager/qmlprojectapplicationwizard.cpp
View file @
ec1bc282
...
...
@@ -156,7 +156,7 @@ Core::GeneratedFiles QmlProjectApplicationWizard::generateFiles(const QWizard *w
<<
" }"
<<
endl
//: Comment added to generated .qmlproject file
<<
" /* "
<<
tr
(
"List of plugin directories passed to QML runtime"
,
"qmlproject Template"
)
<<
" */"
<<
endl
<<
" // importPaths: [
\"
../exampleplugin
\"
]"
<<
endl
<<
" // importPaths: [
\"
../exampleplugin
\"
]"
<<
endl
<<
"}"
<<
endl
;
}
Core
::
GeneratedFile
generatedCreatorFile
(
creatorFileName
);
...
...
src/plugins/qmlprojectmanager/qmlprojectimportwizard.cpp
View file @
ec1bc282
...
...
@@ -172,7 +172,7 @@ Core::GeneratedFiles QmlProjectImportWizard::generateFiles(const QWizard *w,
<<
" }"
<<
endl
//: Comment added to generated .qmlproject file
<<
" /* "
<<
tr
(
"List of plugin directories passed to QML runtime"
,
"qmlproject Template"
)
<<
" */"
<<
endl
<<
" // importPaths: [
\"
../exampleplugin
\"
]"
<<
endl
<<
" // importPaths: [
\"
../exampleplugin
\"
]"
<<
endl
<<
"}"
<<
endl
;
}
Core
::
GeneratedFile
generatedCreatorFile
(
creatorFileName
);
...
...
src/shared/proparser/profileevaluator.cpp
View file @
ec1bc282
...
...
@@ -1048,10 +1048,28 @@ void ProFileEvaluator::Private::visitProVariable(
m_filevaluemap
[
currentProFile
()][
varName
]
=
varVal
;
}
}
else
{
// We are greedy for values.
zipEmpty
(
&
varVal
);
valuesRef
(
varName
)
+=
varVal
;
m_filevaluemap
[
currentProFile
()][
varName
]
+=
varVal
;
if
(
!
varVal
.
isEmpty
())
{
// We are greedy for values. But avoid exponential growth.
ProStringList
&
v
=
valuesRef
(
varName
);
if
(
v
.
isEmpty
())
{
v
=
varVal
;
}
else
{
ProStringList
old
=
v
;
v
=
varVal
;
QSet
<
ProString
>
has
;
has
.
reserve
(
v
.
size
());
foreach
(
const
ProString
&
s
,
v
)
has
.
insert
(
s
);
v
.
reserve
(
v
.
size
()
+
old
.
size
());
foreach
(
const
ProString
&
s
,
old
)
if
(
!
has
.
contains
(
s
))
v
<<
s
;
}
// These values will not be used for further processing inside
// the evaluator. Duplicate elimination happens later.
m_filevaluemap
[
currentProFile
()][
varName
]
+=
varVal
;
}
}
break
;
case
TokAppendUnique
:
// *=
...
...
@@ -3140,7 +3158,7 @@ ProFileEvaluator::TemplateType ProFileEvaluator::templateType() const
{
const
ProStringList
&
templ
=
d
->
values
(
statics
.
strTEMPLATE
);
if
(
templ
.
count
()
>=
1
)
{
const
QString
&
t
=
templ
.
las
t
().
toQString
();
const
QString
&
t
=
templ
.
a
t
(
0
).
toQString
();
if
(
!
t
.
compare
(
QLatin1String
(
"app"
),
Qt
::
CaseInsensitive
))
return
TT_Application
;
if
(
!
t
.
compare
(
QLatin1String
(
"lib"
),
Qt
::
CaseInsensitive
))
...
...
Write
Preview
Supports
Markdown
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