-rw-r--r-- | kabc/formatfactory.cpp | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/kabc/formatfactory.cpp b/kabc/formatfactory.cpp index f107ebf..f2f03c6 100644 --- a/kabc/formatfactory.cpp +++ b/kabc/formatfactory.cpp | |||
@@ -17,50 +17,48 @@ | |||
17 | the Free Software Foundation, Inc., 59 Temple Place - Suite 330, | 17 | the Free Software Foundation, Inc., 59 Temple Place - Suite 330, |
18 | Boston, MA 02111-1307, USA. | 18 | Boston, MA 02111-1307, USA. |
19 | */ | 19 | */ |
20 | 20 | ||
21 | #include <kdebug.h> | 21 | #include <kdebug.h> |
22 | #include <klocale.h> | 22 | #include <klocale.h> |
23 | #include <ksimpleconfig.h> | 23 | #include <ksimpleconfig.h> |
24 | #include <kstandarddirs.h> | 24 | #include <kstandarddirs.h> |
25 | #include <kstaticdeleter.h> | 25 | #include <kstaticdeleter.h> |
26 | 26 | ||
27 | #include <qfile.h> | 27 | #include <qfile.h> |
28 | #include <qstringlist.h> | 28 | #include <qstringlist.h> |
29 | 29 | ||
30 | #include "vcardformatplugin.h" | 30 | #include "vcardformatplugin.h" |
31 | 31 | ||
32 | #include "formatfactory.h" | 32 | #include "formatfactory.h" |
33 | 33 | ||
34 | using namespace KABC; | 34 | using namespace KABC; |
35 | 35 | ||
36 | FormatFactory *FormatFactory::mSelf = 0; | 36 | FormatFactory *FormatFactory::mSelf = 0; |
37 | static KStaticDeleter<FormatFactory> factoryDeleter; | 37 | static KStaticDeleter<FormatFactory> factoryDeleter; |
38 | 38 | ||
39 | FormatFactory *FormatFactory::self() | 39 | FormatFactory *FormatFactory::self() |
40 | { | 40 | { |
41 | kdDebug(5700) << "FormatFactory::self()" << endl; | ||
42 | |||
43 | if ( !mSelf ) { | 41 | if ( !mSelf ) { |
44 | //US factoryDeleter.setObject( mSelf, new FormatFactory ); | 42 | //US factoryDeleter.setObject( mSelf, new FormatFactory ); |
45 | mSelf = factoryDeleter.setObject( new FormatFactory ); | 43 | mSelf = factoryDeleter.setObject( new FormatFactory ); |
46 | } | 44 | } |
47 | return mSelf; | 45 | return mSelf; |
48 | } | 46 | } |
49 | 47 | ||
50 | FormatFactory::FormatFactory() | 48 | FormatFactory::FormatFactory() |
51 | { | 49 | { |
52 | mFormatList.setAutoDelete( true ); | 50 | mFormatList.setAutoDelete( true ); |
53 | 51 | ||
54 | // dummy entry for default format | 52 | // dummy entry for default format |
55 | FormatInfo *info = new FormatInfo; | 53 | FormatInfo *info = new FormatInfo; |
56 | info->library = "<NoLibrary>"; | 54 | info->library = "<NoLibrary>"; |
57 | info->nameLabel = i18n( "vCard" ); | 55 | info->nameLabel = i18n( "vCard" ); |
58 | info->descriptionLabel = i18n( "vCard Format" ); | 56 | info->descriptionLabel = i18n( "vCard Format" ); |
59 | mFormatList.insert( "vcard", info ); | 57 | mFormatList.insert( "vcard", info ); |
60 | 58 | ||
61 | /*US lets enter all resources directly instead of using teh desktopfiles. | 59 | /*US lets enter all resources directly instead of using teh desktopfiles. |
62 | 60 | ||
63 | QStringList list = KGlobal::dirs()->findAllResources( "data" ,"kabc/formats/*.desktop", true, true ); | 61 | QStringList list = KGlobal::dirs()->findAllResources( "data" ,"kabc/formats/*.desktop", true, true ); |
64 | for ( QStringList::ConstIterator it = list.begin(); it != list.end(); ++it ) | 62 | for ( QStringList::ConstIterator it = list.begin(); it != list.end(); ++it ) |
65 | { | 63 | { |
66 | //US KSimpleConfig config( *it, true ); | 64 | //US KSimpleConfig config( *it, true ); |