* return keys instead of paths; that's what the path(const char* key) method is for
* files and requiredFiles were reversed (unit testing is indeed good) svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=727888
This commit is contained in:
parent
5752d62b18
commit
1176180a40
@ -89,54 +89,53 @@ QString PackageStructure::type()
|
|||||||
return d->type;
|
return d->type;
|
||||||
}
|
}
|
||||||
|
|
||||||
QStringList PackageStructure::directories()
|
QList<const char*> PackageStructure::directories()
|
||||||
{
|
{
|
||||||
QStringList dirs;
|
QList<const char*> dirs;
|
||||||
QHash<const char*, ContentStructure>::const_iterator it = d->contents.constBegin();
|
QHash<const char*, ContentStructure>::const_iterator it = d->contents.constBegin();
|
||||||
while (it != d->contents.constEnd()) {
|
while (it != d->contents.constEnd()) {
|
||||||
if (it.value().directory) {
|
if (it.value().directory) {
|
||||||
dirs << it.value().path;
|
dirs << it.key();
|
||||||
}
|
}
|
||||||
++it;
|
++it;
|
||||||
}
|
}
|
||||||
return dirs;
|
return dirs;
|
||||||
}
|
}
|
||||||
|
|
||||||
QStringList PackageStructure::requiredDirectories()
|
QList<const char*> PackageStructure::requiredDirectories()
|
||||||
{
|
{
|
||||||
QStringList dirs;
|
QList<const char*> dirs;
|
||||||
QHash<const char*, ContentStructure>::const_iterator it = d->contents.constBegin();
|
QHash<const char*, ContentStructure>::const_iterator it = d->contents.constBegin();
|
||||||
while (it != d->contents.constEnd()) {
|
while (it != d->contents.constEnd()) {
|
||||||
if (it.value().directory &&
|
if (it.value().directory &&
|
||||||
it.value().required) {
|
it.value().required) {
|
||||||
dirs << it.value().path;
|
dirs << it.key();
|
||||||
}
|
}
|
||||||
++it;
|
++it;
|
||||||
}
|
}
|
||||||
return dirs;
|
return dirs;
|
||||||
}
|
}
|
||||||
|
|
||||||
QStringList PackageStructure::files()
|
QList<const char*> PackageStructure::files()
|
||||||
{
|
{
|
||||||
QStringList files;
|
QList<const char*> files;
|
||||||
QHash<const char*, ContentStructure>::const_iterator it = d->contents.constBegin();
|
QHash<const char*, ContentStructure>::const_iterator it = d->contents.constBegin();
|
||||||
while (it != d->contents.constEnd()) {
|
while (it != d->contents.constEnd()) {
|
||||||
if (!it.value().directory &&
|
if (!it.value().directory) {
|
||||||
it.value().required) {
|
files << it.key();
|
||||||
files << it.value().path;
|
|
||||||
}
|
}
|
||||||
++it;
|
++it;
|
||||||
}
|
}
|
||||||
return files;
|
return files;
|
||||||
}
|
}
|
||||||
|
|
||||||
QStringList PackageStructure::requiredFiles()
|
QList<const char*> PackageStructure::requiredFiles()
|
||||||
{
|
{
|
||||||
QStringList files;
|
QList<const char*> files;
|
||||||
QHash<const char*, ContentStructure>::const_iterator it = d->contents.constBegin();
|
QHash<const char*, ContentStructure>::const_iterator it = d->contents.constBegin();
|
||||||
while (it != d->contents.constEnd()) {
|
while (it != d->contents.constEnd()) {
|
||||||
if (!it.value().directory) {
|
if (!it.value().directory && it.value().required) {
|
||||||
files << it.value().path;
|
files << it.key();
|
||||||
}
|
}
|
||||||
++it;
|
++it;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user