author | Michael Krelin <hacker@klever.net> | 2007-07-04 11:23:42 (UTC) |
---|---|---|
committer | Michael Krelin <hacker@klever.net> | 2007-07-04 11:23:42 (UTC) |
commit | a08aff328d4393031d5ba7d622c2b05705a89d73 (patch) (unidiff) | |
tree | 8ee90d686081c52e7c69b5ce946e9b1a7d690001 /microkde/kresources/factory.cpp | |
parent | 11edc920afe4f274c0964436633aa632c8288a40 (diff) | |
download | kdepimpi-a08aff328d4393031d5ba7d622c2b05705a89d73.zip kdepimpi-a08aff328d4393031d5ba7d622c2b05705a89d73.tar.gz kdepimpi-a08aff328d4393031d5ba7d622c2b05705a89d73.tar.bz2 |
initial public commit of qt4 portp1
Diffstat (limited to 'microkde/kresources/factory.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | microkde/kresources/factory.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/microkde/kresources/factory.cpp b/microkde/kresources/factory.cpp index 86b22b2..4f286d1 100644 --- a/microkde/kresources/factory.cpp +++ b/microkde/kresources/factory.cpp | |||
@@ -20,59 +20,59 @@ | |||
20 | the Free Software Foundation, Inc., 59 Temple Place - Suite 330, | 20 | the Free Software Foundation, Inc., 59 Temple Place - Suite 330, |
21 | Boston, MA 02111-1307, USA. | 21 | Boston, MA 02111-1307, USA. |
22 | */ | 22 | */ |
23 | 23 | ||
24 | #include <kdebug.h> | 24 | #include <kdebug.h> |
25 | #include <klocale.h> | 25 | #include <klocale.h> |
26 | #include <ksimpleconfig.h> | 26 | #include <ksimpleconfig.h> |
27 | #include <kstandarddirs.h> | 27 | #include <kstandarddirs.h> |
28 | #include <kstaticdeleter.h> | 28 | #include <kstaticdeleter.h> |
29 | //#ifndef DESKTOP_VERSION | 29 | //#ifndef DESKTOP_VERSION |
30 | #include <klibloader.h> | 30 | #include <klibloader.h> |
31 | //#endif | 31 | //#endif |
32 | #include <qfile.h> | 32 | #include <qfile.h> |
33 | 33 | ||
34 | #include "resource.h" | 34 | #include "resource.h" |
35 | #include "factory.h" | 35 | #include "factory.h" |
36 | 36 | ||
37 | #ifdef STATIC_RESOURCES | 37 | #ifdef STATIC_RESOURCES |
38 | #include <file/resourcefile.h> | 38 | #include <file/resourcefile.h> |
39 | #include <dir/resourcedir.h> | 39 | #include <dir/resourcedir.h> |
40 | #include <qtopia/resourceqtopia.h> | 40 | #include <qtopia/resourceqtopia.h> |
41 | #endif | 41 | #endif |
42 | using namespace KRES; | 42 | using namespace KRES; |
43 | 43 | ||
44 | QDict<Factory> *Factory::mSelves = 0; | 44 | Q3Dict<Factory> *Factory::mSelves = 0; |
45 | static KStaticDeleter< QDict<Factory> > staticDeleter; | 45 | static KStaticDeleter< Q3Dict<Factory> > staticDeleter; |
46 | 46 | ||
47 | Factory *Factory::self( const QString& resourceFamily) | 47 | Factory *Factory::self( const QString& resourceFamily) |
48 | { | 48 | { |
49 | 49 | ||
50 | 50 | ||
51 | Factory *factory = 0; | 51 | Factory *factory = 0; |
52 | if ( !mSelves ) | 52 | if ( !mSelves ) |
53 | { | 53 | { |
54 | mSelves = staticDeleter.setObject( new QDict<Factory> ); | 54 | mSelves = staticDeleter.setObject( new Q3Dict<Factory> ); |
55 | } | 55 | } |
56 | 56 | ||
57 | factory = mSelves->find( resourceFamily ); | 57 | factory = mSelves->find( resourceFamily ); |
58 | 58 | ||
59 | if ( !factory ) { | 59 | if ( !factory ) { |
60 | factory = new Factory( resourceFamily); | 60 | factory = new Factory( resourceFamily); |
61 | mSelves->insert( resourceFamily, factory ); | 61 | mSelves->insert( resourceFamily, factory ); |
62 | } | 62 | } |
63 | 63 | ||
64 | return factory; | 64 | return factory; |
65 | } | 65 | } |
66 | 66 | ||
67 | Factory::Factory( const QString& resourceFamily) : | 67 | Factory::Factory( const QString& resourceFamily) : |
68 | mResourceFamily( resourceFamily ) | 68 | mResourceFamily( resourceFamily ) |
69 | { | 69 | { |
70 | //US so far we have three types available for resourceFamily "contact" | 70 | //US so far we have three types available for resourceFamily "contact" |
71 | // and that are "file", "dir", "ldap" | 71 | // and that are "file", "dir", "ldap" |
72 | /*US | 72 | /*US |
73 | 73 | ||
74 | KTrader::OfferList plugins = KTrader::self()->query( "KResources/Plugin", QString( "[X-KDE-ResourceFamily] == '%1'" ) | 74 | KTrader::OfferList plugins = KTrader::self()->query( "KResources/Plugin", QString( "[X-KDE-ResourceFamily] == '%1'" ) |
75 | .arg( resourceFamily ) ); | 75 | .arg( resourceFamily ) ); |
76 | KTrader::OfferList::ConstIterator it; | 76 | KTrader::OfferList::ConstIterator it; |
77 | for ( it = plugins.begin(); it != plugins.end(); ++it ) { | 77 | for ( it = plugins.begin(); it != plugins.end(); ++it ) { |
78 | QVariant type = (*it)->property( "X-KDE-ResourceType" ); | 78 | QVariant type = (*it)->property( "X-KDE-ResourceType" ); |