Skip to content
GitLab
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
c722282c
Commit
c722282c
authored
Mar 19, 2010
by
Kai Koehne
Browse files
QmlProjectManager: Rename 'libraryPaths' property to 'importPaths'
Suggested by Erik Verbruggen
parent
bffeb830
Changes
4
Hide whitespace changes
Inline
Side-by-side
src/plugins/qmlprojectmanager/fileformat/qmlprojectitem.cpp
View file @
c722282c
...
...
@@ -9,7 +9,7 @@ class QmlProjectItemPrivate : public QObject {
public:
QString
sourceDirectory
;
QStringList
library
Paths
;
QStringList
import
Paths
;
QList
<
QmlFileFilterItem
*>
qmlFileFilters
()
const
;
...
...
@@ -79,21 +79,21 @@ void QmlProjectItem::setSourceDirectory(const QString &directoryPath)
emit
sourceDirectoryChanged
();
}
QStringList
QmlProjectItem
::
library
Paths
()
const
QStringList
QmlProjectItem
::
import
Paths
()
const
{
Q_D
(
const
QmlProjectItem
);
return
d
->
library
Paths
;
return
d
->
import
Paths
;
}
void
QmlProjectItem
::
set
Library
Paths
(
const
QStringList
&
libraryPaths
)
void
QmlProjectItem
::
set
Import
Paths
(
const
QStringList
&
libraryPaths
)
{
Q_D
(
QmlProjectItem
);
if
(
d
->
library
Paths
==
libraryPaths
)
if
(
d
->
import
Paths
==
libraryPaths
)
return
;
d
->
library
Paths
=
libraryPaths
;
emit
library
PathsChanged
();
d
->
import
Paths
=
libraryPaths
;
emit
import
PathsChanged
();
}
/* Returns list of absolute paths */
...
...
src/plugins/qmlprojectmanager/fileformat/qmlprojectitem.h
View file @
c722282c
...
...
@@ -24,7 +24,7 @@ class QmlProjectItem : public QObject {
Q_PROPERTY
(
QDeclarativeListProperty
<
QmlProjectManager
::
QmlProjectContentItem
>
content
READ
content
DESIGNABLE
false
)
Q_PROPERTY
(
QString
sourceDirectory
READ
sourceDirectory
NOTIFY
sourceDirectoryChanged
)
Q_PROPERTY
(
QStringList
library
Paths
READ
library
Paths
WRITE
set
Library
Paths
NOTIFY
library
PathsChanged
)
Q_PROPERTY
(
QStringList
import
Paths
READ
import
Paths
WRITE
set
Import
Paths
NOTIFY
import
PathsChanged
)
Q_CLASSINFO
(
"DefaultProperty"
,
"content"
);
...
...
@@ -37,8 +37,8 @@ public:
QString
sourceDirectory
()
const
;
void
setSourceDirectory
(
const
QString
&
directoryPath
);
QStringList
library
Paths
()
const
;
void
set
Library
Paths
(
const
QStringList
&
paths
);
QStringList
import
Paths
()
const
;
void
set
Import
Paths
(
const
QStringList
&
paths
);
QStringList
files
()
const
;
bool
matchesFile
(
const
QString
&
filePath
)
const
;
...
...
@@ -46,7 +46,7 @@ public:
signals:
void
qmlFilesChanged
();
void
sourceDirectoryChanged
();
void
library
PathsChanged
();
void
import
PathsChanged
();
protected:
QmlProjectItemPrivate
*
d_ptr
;
...
...
src/plugins/qmlprojectmanager/qmlproject.cpp
View file @
c722282c
...
...
@@ -169,7 +169,7 @@ QStringList QmlProject::libraryPaths() const
{
QStringList
libraryPaths
;
if
(
m_projectItem
)
libraryPaths
=
m_projectItem
.
data
()
->
library
Paths
();
libraryPaths
=
m_projectItem
.
data
()
->
import
Paths
();
return
libraryPaths
;
}
...
...
tests/auto/qml/qmlprojectmanager/fileformat/tst_fileformat.cpp
View file @
c722282c
...
...
@@ -250,7 +250,7 @@ void TestProject::testLibraryPaths()
QString
projectFile
=
QLatin1String
(
"import QmlProject 1.0
\n
"
"Project {
\n
"
"
library
Paths: [
\"
../otherLibrary
\"
,
\"
library
\"
]
\n
"
"
import
Paths: [
\"
../otherLibrary
\"
,
\"
library
\"
]
\n
"
"}
\n
"
);
{
...
...
@@ -268,7 +268,7 @@ void TestProject::testLibraryPaths()
QStringList
expectedPaths
(
QStringList
()
<<
"../otherLibrary"
<<
"library"
);
QCOMPARE
(
project
->
library
Paths
().
toSet
(),
expectedPaths
.
toSet
());
QCOMPARE
(
project
->
import
Paths
().
toSet
(),
expectedPaths
.
toSet
());
}
}
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment