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
Tobias Hunger
qt-creator
Commits
8c773beb
Commit
8c773beb
authored
Jan 28, 2009
by
hjk
Browse files
Merge branch 'master' of git@scm.dev.nokia.troll.no:creator/mainline
parents
943efa76
7e6aee9b
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/shared/qrceditor/resourcefile.cpp
View file @
8c773beb
...
...
@@ -54,6 +54,19 @@ TRANSLATOR qdesigner_internal::ResourceModel
namespace
qdesigner_internal
{
/******************************************************************************
** FileList
*/
bool
FileList
::
containsFile
(
File
*
file
)
{
foreach
(
File
*
tmpFile
,
*
this
)
if
(
tmpFile
->
name
==
file
->
name
&&
tmpFile
->
prefix
()
==
file
->
prefix
())
return
true
;
return
false
;
}
/******************************************************************************
** ResourceFile
*/
...
...
@@ -375,7 +388,7 @@ bool ResourceFile::contains(const QString &prefix, const QString &file) const
Prefix
*
const
p
=
m_prefix_list
.
at
(
pref_idx
);
Q_ASSERT
(
p
);
File
equalFile
(
p
,
absolutePath
(
file
));
return
p
->
file_list
.
contains
(
&
equalFile
);
return
p
->
file_list
.
contains
File
(
&
equalFile
);
}
bool
ResourceFile
::
contains
(
int
pref_idx
,
const
QString
&
file
)
const
...
...
@@ -383,7 +396,7 @@ bool ResourceFile::contains(int pref_idx, const QString &file) const
Q_ASSERT
(
pref_idx
>=
0
&&
pref_idx
<
m_prefix_list
.
count
());
Prefix
*
const
p
=
m_prefix_list
.
at
(
pref_idx
);
File
equalFile
(
p
,
absolutePath
(
file
));
return
p
->
file_list
.
contains
(
&
equalFile
);
return
p
->
file_list
.
contains
File
(
&
equalFile
);
}
/*static*/
QString
ResourceFile
::
fixPrefix
(
const
QString
&
prefix
)
...
...
src/shared/qrceditor/resourcefile_p.h
View file @
8c773beb
...
...
@@ -90,7 +90,12 @@ struct File : public Node {
QString
name
;
QString
alias
;
};
typedef
QList
<
File
*>
FileList
;
class
FileList
:
public
QList
<
File
*>
{
public:
bool
containsFile
(
File
*
file
);
};
/*!
\class Prefix
...
...
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