2 Copyright (c) 2006 Paolo Capriotti <p.capriotti@gmail.com>
3 (c) 2006 Maurizio Monge <maurizio.monge@kdemail.net>
4 (c) 2008 Yann Dirson <ydirson@altern.org>
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2 of the License, or
9 (at your option) any later version.
12 #include "variantfactory.h"
17 #include "variantfactories/kdepluginvariants.h"
19 # include "variantfactories/builtinvariants.h"
24 VariantFactory::VariantFactory() { }
26 VariantFactory
& VariantFactory::self() {
27 static VariantFactory inst
;
31 Variant
* VariantFactory::create(const QString
& name
) {
35 v
= BuiltinVariants::self().create(name
);
38 v
= KDEPluginVariants::self().create(name
);
40 kFatal() << "failed to create variant" << name
;
44 QStringList
VariantFactory::all() const {
45 QStringList l
= KDEPluginVariants::self().all();
47 l
<< BuiltinVariants::self().all();
52 Repository
* VariantFactory::getRepository(const QString
& variant
) {
56 r
= BuiltinVariants::self().getRepository(variant
);
59 r
= KDEPluginVariants::self().getRepository(variant
);