QString SafeCode::propertyReversePropertyGetterDefinition( const Property* property, const ResourceClass* rc ) const { QString s = propertyReversePropertyGetterDeclaration( property, rc, "Nepomuk" ) + '\n'; s += QString( "{\n" " return convertResourceList<%2>( manager()->allResourcesWithProperty( QUrl::fromEncoded(\"%1\"), *this ) );\n" "}\n" ) .arg( property->uri().toString() ) .arg( property->domain(true)->name() ); return s; }
QString SafeCode::propertyReversePropertyGetterDefinition( const Property* property, const ResourceClass* rc ) const { QString s = propertyReversePropertyGetterDeclaration( property, rc, "Nepomuk2" ) + '\n'; s += QString( "{\n" //" return convertResourceList<%2>( manager()->allResourcesWithProperty( QUrl::fromEncoded(\"%1\"), *this ) );\n" " QList<%2> rl;\n" " QList<Resource> l = ResourceManager::instance()->allResourcesWithProperty( QUrl::fromEncoded(\"%1\"), *this );\n" " for( QList<Resource>::const_iterator it = l.constBegin();\n" " it != l.constEnd(); ++it )\n" " rl.append( %2( *it ) );\n" " return rl;\n" "}\n" ) .arg( property->uri().toString() ) .arg( property->domain(true)->name() ); return s; }