summaryrefslogtreecommitdiffabout
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--kabc/plugins/olaccess/olaccess.pro1
-rw-r--r--kabc/plugins/olaccess/resourceolaccess.cpp5
-rw-r--r--microkde/kresources/factory.cpp2
-rw-r--r--variables.pri2
4 files changed, 6 insertions, 4 deletions
diff --git a/kabc/plugins/olaccess/olaccess.pro b/kabc/plugins/olaccess/olaccess.pro
index 4416d0c..9b95015 100644
--- a/kabc/plugins/olaccess/olaccess.pro
+++ b/kabc/plugins/olaccess/olaccess.pro
@@ -1,34 +1,35 @@
1 TEMPLATE= lib 1 TEMPLATE= lib
2CONFIG += qt warn_on 2CONFIG += qt warn_on
3TARGET = microkabc_olaccess 3TARGET = microkabc_olaccess
4 4
5include( ../../../variables.pri ) 5include( ../../../variables.pri )
6 6
7INCLUDEPATH += ../../.. ../.. ../../../microkde ../../../microkde/kdecore ../../../microkde/kio/kfile ../../../microkde/kio/kio ../../../microkde/kresources ../../../qtcompat 7INCLUDEPATH += ../../.. ../.. ../../../microkde ../../../microkde/kdecore ../../../microkde/kio/kfile ../../../microkde/kio/kio ../../../microkde/kresources ../../../qtcompat
8 8
9INTERFACES = \ 9INTERFACES = \
10 10
11DESTDIR = ../../../bin
11HEADERS = \ 12HEADERS = \
12 resourceolaccess.h \ 13 resourceolaccess.h \
13 resourceolaccessconfig.h \ 14 resourceolaccessconfig.h \
14 olaccessconverter.h 15 olaccessconverter.h
15 16
16SOURCES = \ 17SOURCES = \
17 resourceolaccess.cpp \ 18 resourceolaccess.cpp \
18 resourceolaccessconfig.cpp \ 19 resourceolaccessconfig.cpp \
19 olaccessconverter.cpp 20 olaccessconverter.cpp
20 21
21unix : { 22unix : {
22OBJECTS_DIR = obj/unix 23OBJECTS_DIR = obj/unix
23MOC_DIR = moc/unix 24MOC_DIR = moc/unix
24} 25}
25win32: { 26win32: {
26CONFIG += dll 27CONFIG += dll
27DEFINES += _WIN32_ 28DEFINES += _WIN32_
28OBJECTS_DIR = obj/win 29OBJECTS_DIR = obj/win
29MOC_DIR = moc/win 30MOC_DIR = moc/win
30LIBS += ../../../bin/microkdepim.lib 31LIBS += ../../../bin/microkdepim.lib
31LIBS += ../../../bin/microkcal.lib 32LIBS += ../../../bin/microkcal.lib
32LIBS += ../../../bin/microkde.lib 33LIBS += ../../../bin/microkde.lib
33LIBS += ../../../bin/microkabc.lib 34LIBS += ../../../bin/microkabc.lib
34} 35}
diff --git a/kabc/plugins/olaccess/resourceolaccess.cpp b/kabc/plugins/olaccess/resourceolaccess.cpp
index 7113e0e..c7c9874 100644
--- a/kabc/plugins/olaccess/resourceolaccess.cpp
+++ b/kabc/plugins/olaccess/resourceolaccess.cpp
@@ -1,158 +1,159 @@
1/* 1/*
2 This file is part of libkabc. 2 This file is part of libkabc.
3 Copyright (c) 2004 Ulf Schenk 3 Copyright (c) 2004 Ulf Schenk
4 4
5 This library is free software; you can redistribute it and/or 5 This library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Library General Public 6 modify it under the terms of the GNU Library General Public
7 License as published by the Free Software Foundation; either 7 License as published by the Free Software Foundation; either
8 version 2 of the License, or (at your option) any later version. 8 version 2 of the License, or (at your option) any later version.
9 9
10 This library is distributed in the hope that it will be useful, 10 This library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of 11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Library General Public License for more details. 13 Library General Public License for more details.
14 14
15 You should have received a copy of the GNU Library General Public License 15 You should have received a copy of the GNU Library General Public License
16 along with this library; see the file COPYING.LIB. If not, write to 16 along with this library; see the file COPYING.LIB. If not, write to
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/* 21/*
22Enhanced Version of the file for platform independent KDE tools. 22Enhanced Version of the file for platform independent KDE tools.
23Copyright (c) 2004 Ulf Schenk 23Copyright (c) 2004 Ulf Schenk
24 24
25$Id$ 25$Id$
26*/ 26*/
27 27
28#include <sys/types.h> 28#include <sys/types.h>
29#include <sys/stat.h> 29#include <sys/stat.h>
30 30
31#include <qdir.h> 31#include <qdir.h>
32#include <qfile.h> 32#include <qfile.h>
33#include <qfileinfo.h> 33#include <qfileinfo.h>
34#include <qregexp.h> 34#include <qregexp.h>
35//US #include <qtimer.h> 35//US #include <qtimer.h>
36 36
37#include <kapplication.h> 37#include <kapplication.h>
38#include <kconfig.h> 38#include <kconfig.h>
39#include <kdebug.h> 39#include <kdebug.h>
40#include <klocale.h> 40#include <klocale.h>
41//US #include <ksavefile.h> 41//US #include <ksavefile.h>
42#include <kstandarddirs.h> 42#include <kstandarddirs.h>
43#include <kmessagebox.h> 43#include <kmessagebox.h>
44 44
45 45
46#include <libkdepim/ksyncprofile.h> 46#include <libkdepim/ksyncprofile.h>
47 47
48#include "resourceolaccessconfig.h" 48#include "resourceolaccessconfig.h"
49#include "resourceolaccess.h" 49#include "resourceolaccess.h"
50 50
51#include "stdaddressbook.h" 51#include "stdaddressbook.h"
52 52
53#include "olaccessconverter.h" 53#include "olaccessconverter.h"
54//#define ALLOW_LOCKING 54//#define ALLOW_LOCKING
55using namespace KABC; 55using namespace KABC;
56extern "C" 56extern "C"
57{ 57__declspec(dllexport)
58
58 void *init_microkabc_olaccess() 59 void *init_microkabc_olaccess()
59 { 60 {
60 return new KRES::PluginFactory<Resourceolaccess,ResourceolaccessConfig>(); 61 return new KRES::PluginFactory<Resourceolaccess,ResourceolaccessConfig>();
61 } 62 }
62} 63
63 64
64Resourceolaccess::Resourceolaccess( const KConfig *config ) 65Resourceolaccess::Resourceolaccess( const KConfig *config )
65 : Resource( config ), mConverter (0) 66 : Resource( config ), mConverter (0)
66{ 67{
67 // we can not choose the filename. Therefore use the default to display 68 // we can not choose the filename. Therefore use the default to display
68 //mAccess = 0; 69 //mAccess = 0;
69 QString fileName;// = SlZDataBase::addressbookFileName(); 70 QString fileName;// = SlZDataBase::addressbookFileName();
70 init( fileName ); 71 init( fileName );
71} 72}
72 73
73Resourceolaccess::Resourceolaccess( const QString &fileName ) 74Resourceolaccess::Resourceolaccess( const QString &fileName )
74 : Resource( 0 ) 75 : Resource( 0 )
75{ 76{
76 //mAccess = 0; 77 //mAccess = 0;
77 init( fileName ); 78 init( fileName );
78} 79}
79 80
80void Resourceolaccess::init( const QString &fileName ) 81void Resourceolaccess::init( const QString &fileName )
81{ 82{
82 if (mConverter == 0) { 83 if (mConverter == 0) {
83 mConverter = new OlaccessConverter(); 84 mConverter = new OlaccessConverter();
84 bool res = mConverter->init(); 85 bool res = mConverter->init();
85 if ( !res ) 86 if ( !res )
86 { 87 {
87 QString msg("Unable to initialize sharp converter. Most likely a problem with the category file"); 88 QString msg("Unable to initialize sharp converter. Most likely a problem with the category file");
88 qDebug(msg); 89 qDebug(msg);
89 return; 90 return;
90 } 91 }
91 } 92 }
92 setFileName( fileName ); 93 setFileName( fileName );
93} 94}
94 95
95Resourceolaccess::~Resourceolaccess() 96Resourceolaccess::~Resourceolaccess()
96{ 97{
97 if (mConverter != 0) 98 if (mConverter != 0)
98 delete mConverter; 99 delete mConverter;
99 100
100 //if(mAccess != 0) 101 //if(mAccess != 0)
101 //delete mAccess; 102 //delete mAccess;
102} 103}
103 104
104void Resourceolaccess::writeConfig( KConfig *config ) 105void Resourceolaccess::writeConfig( KConfig *config )
105{ 106{
106 Resource::writeConfig( config ); 107 Resource::writeConfig( config );
107} 108}
108 109
109Ticket *Resourceolaccess::requestSaveTicket() 110Ticket *Resourceolaccess::requestSaveTicket()
110{ 111{
111 112
112 qDebug("Resourceolaccess::requestSaveTicket: %s", fileName().latin1()); 113 qDebug("Resourceolaccess::requestSaveTicket: %s", fileName().latin1());
113 114
114 if ( !addressBook() ) return 0; 115 if ( !addressBook() ) return 0;
115 return createTicket( this ); 116 return createTicket( this );
116} 117}
117 118
118 119
119bool Resourceolaccess::doOpen() 120bool Resourceolaccess::doOpen()
120{ 121{
121 if (!mConverter) 122 if (!mConverter)
122 return false; 123 return false;
123 return true; 124 return true;
124} 125}
125 126
126void Resourceolaccess::doClose() 127void Resourceolaccess::doClose()
127{ 128{
128 return; 129 return;
129} 130}
130 131
131bool Resourceolaccess::load() 132bool Resourceolaccess::load()
132{ 133{
133 if (!mConverter) 134 if (!mConverter)
134 return false; 135 return false;
135 QString fileN ;//= SlZDataBase::addressbookFileName(); 136 QString fileN ;//= SlZDataBase::addressbookFileName();
136#if 0 137#if 0
137 if ( ! mAccess ) { 138 if ( ! mAccess ) {
138 mAccess = new SlZDataBase(fileN, 139 mAccess = new SlZDataBase(fileN,
139 SlZDataBase::addressbookItems(), 140 SlZDataBase::addressbookItems(),
140 0, true); 141 0, true);
141 } 142 }
142 if(mAccess == 0) 143 if(mAccess == 0)
143 return false; 144 return false;
144 145
145 qDebug("Resourceolaccess:: %x load: %s",this, fileName().latin1()); 146 qDebug("Resourceolaccess:: %x load: %s",this, fileName().latin1());
146 bool res = false; 147 bool res = false;
147 CardId id; 148 CardId id;
148 for (bool res=mAccess->first(); res == true; res=mAccess->next()) 149 for (bool res=mAccess->first(); res == true; res=mAccess->next())
149 { 150 {
150 id = mAccess->cardId(); 151 id = mAccess->cardId();
151 KABC::Addressee addressee; 152 KABC::Addressee addressee;
152 res = mConverter->sharpToAddressee( id, mAccess, addressee ); 153 res = mConverter->sharpToAddressee( id, mAccess, addressee );
153 if ( !addressee.isEmpty() && res ) 154 if ( !addressee.isEmpty() && res )
154 { 155 {
155 addressee.setResource( this ); 156 addressee.setResource( this );
156 addressBook()->insertAddressee( addressee ); 157 addressBook()->insertAddressee( addressee );
157 } 158 }
158 } 159 }
diff --git a/microkde/kresources/factory.cpp b/microkde/kresources/factory.cpp
index 4843ce0..86b22b2 100644
--- a/microkde/kresources/factory.cpp
+++ b/microkde/kresources/factory.cpp
@@ -52,193 +52,193 @@ Factory *Factory::self( const QString& resourceFamily)
52 if ( !mSelves ) 52 if ( !mSelves )
53 { 53 {
54 mSelves = staticDeleter.setObject( new QDict<Factory> ); 54 mSelves = staticDeleter.setObject( new QDict<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
67Factory::Factory( const QString& resourceFamily) : 67Factory::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" );
79 if ( !type.toString().isEmpty() ) 79 if ( !type.toString().isEmpty() )
80 mTypeMap.insert( type.toString(), *it ); 80 mTypeMap.insert( type.toString(), *it );
81 } 81 }
82*/ 82*/
83 83
84//US new 84//US new
85 PluginInfo* info = new PluginInfo; 85 PluginInfo* info = new PluginInfo;
86 info->library = "microkabc_file"; 86 info->library = "microkabc_file";
87 info->nameLabel = i18n( "file" ); 87 info->nameLabel = i18n( "file" );
88 info->descriptionLabel = i18n( "One file" ); 88 info->descriptionLabel = i18n( "One file" );
89 mTypeMap.insert( "file", info ); 89 mTypeMap.insert( "file", info );
90 90
91 info = new PluginInfo; 91 info = new PluginInfo;
92 info->library = "microkabc_dir"; 92 info->library = "microkabc_dir";
93 info->nameLabel = i18n( "dir" ); 93 info->nameLabel = i18n( "dir" );
94 info->descriptionLabel = i18n( "A directory with many files" ); 94 info->descriptionLabel = i18n( "A directory with many files" );
95 mTypeMap.insert( "dir", info ); 95 mTypeMap.insert( "dir", info );
96 96
97 info = new PluginInfo; 97 info = new PluginInfo;
98 info->library = "microkabc_ldap"; 98 info->library = "microkabc_ldap";
99 info->nameLabel = i18n( "ldap" ); 99 info->nameLabel = i18n( "ldap" );
100 info->descriptionLabel = i18n( "Connect to a directory server" ); 100 info->descriptionLabel = i18n( "Connect to a directory server" );
101 mTypeMap.insert( "ldap", info ); 101 mTypeMap.insert( "ldap", info );
102 102
103 //US add opie plugin only, if the library exists. 103 //US add opie plugin only, if the library exists.
104 /*US 104 /*US
105 QString libname = "microkabc_opie"; 105 QString libname = "microkabc_opie";
106 QString path = KLibLoader::findLibrary( QFile::encodeName( libname ) ); 106 QString path = KLibLoader::findLibrary( QFile::encodeName( libname ) );
107 if ( !path.isEmpty() ) 107 if ( !path.isEmpty() )
108 { 108 {
109 info = new PluginInfo; 109 info = new PluginInfo;
110 info->library = libname; 110 info->library = libname;
111 info->nameLabel = i18n( "opie" ); 111 info->nameLabel = i18n( "opie" );
112 info->descriptionLabel = i18n( "Opie PIM Addressbook." ); 112 info->descriptionLabel = i18n( "Opie PIM Addressbook." );
113 mTypeMap.insert( "opie", info ); 113 mTypeMap.insert( "opie", info );
114 } 114 }
115 */ 115 */
116 //US add qtopia plugin only, if the library exists. 116 //US add qtopia plugin only, if the library exists.
117 QString libname = "microkabc_qtopia"; 117 QString libname = "microkabc_qtopia";
118 QString path = KLibLoader::findLibrary( QFile::encodeName( libname ) ); 118 QString path = KLibLoader::findLibrary( QFile::encodeName( libname ) );
119 if ( !path.isEmpty() ) 119 if ( !path.isEmpty() )
120 { 120 {
121 info = new PluginInfo; 121 info = new PluginInfo;
122 info->library = libname; 122 info->library = libname;
123 info->nameLabel = i18n( "qtopia" ); 123 info->nameLabel = i18n( "qtopia" );
124 info->descriptionLabel = i18n( "Qtopia PIM Addressbook." ); 124 info->descriptionLabel = i18n( "Qtopia PIM Addressbook." );
125 mTypeMap.insert( "qtopia", info ); 125 mTypeMap.insert( "qtopia", info );
126 } 126 }
127 127
128 //US add sharp plugin only, if the library exists. 128 //US add sharp plugin only, if the library exists.
129 libname = "microkabc_sharpdtm"; 129 libname = "microkabc_sharpdtm";
130 path = KLibLoader::findLibrary( QFile::encodeName( libname ) ); 130 path = KLibLoader::findLibrary( QFile::encodeName( libname ) );
131 if ( !path.isEmpty() ) 131 if ( !path.isEmpty() )
132 { 132 {
133 info = new PluginInfo; 133 info = new PluginInfo;
134 info->library = libname; 134 info->library = libname;
135 info->nameLabel = i18n( "sharp" ); 135 info->nameLabel = i18n( "sharp" );
136 info->descriptionLabel = i18n( "Sharp DTM Addressbook." ); 136 info->descriptionLabel = i18n( "Sharp DTM Addressbook." );
137 mTypeMap.insert( "sharp", info ); 137 mTypeMap.insert( "sharp", info );
138 } 138 }
139 139
140 140
141 //LR add ol plugin only, if the library exists. 141 //LR add ol plugin only, if the library exists.
142 libname = "microkabc_olaccess"; 142 libname = "microkabc_olaccess";
143 path = KLibLoader::findLibrary( QFile::encodeName( libname ) ); 143 path = KLibLoader::findLibrary( QFile::encodeName( libname ) );
144 if ( !path.isEmpty() ) 144 if ( !path.isEmpty() )
145 { 145 {
146 info = new PluginInfo; 146 info = new PluginInfo;
147 info->library = libname; 147 info->library = libname;
148 info->nameLabel = i18n( "sharp" ); 148 info->nameLabel = i18n( "olaccess" );
149 info->descriptionLabel = i18n( "Outlook Addressbook." ); 149 info->descriptionLabel = i18n( "Outlook Addressbook." );
150 mTypeMap.insert( "olaccess", info ); 150 mTypeMap.insert( "olaccess", info );
151 } 151 }
152 152
153 153
154} 154}
155 155
156Factory::~Factory() 156Factory::~Factory()
157{ 157{
158} 158}
159 159
160QStringList Factory::typeNames() const 160QStringList Factory::typeNames() const
161{ 161{
162//US method QMap::keys() not available yet. SO collect the data manually 162//US method QMap::keys() not available yet. SO collect the data manually
163//US return mTypeMap.keys(); 163//US return mTypeMap.keys();
164 164
165 QStringList result; 165 QStringList result;
166 166
167 QMap<QString, PluginInfo*>::ConstIterator it; 167 QMap<QString, PluginInfo*>::ConstIterator it;
168 for( it = mTypeMap.begin(); it != mTypeMap.end(); ++it ) { 168 for( it = mTypeMap.begin(); it != mTypeMap.end(); ++it ) {
169 result << it.key().latin1(); 169 result << it.key().latin1();
170// qDebug("Factory::typeNames() : %s ", it.key().latin1()); 170// qDebug("Factory::typeNames() : %s ", it.key().latin1());
171 171
172 } 172 }
173 return result; 173 return result;
174} 174}
175 175
176ConfigWidget *Factory::configWidget( const QString& type, QWidget *parent ) 176ConfigWidget *Factory::configWidget( const QString& type, QWidget *parent )
177{ 177{
178 if ( type.isEmpty() || !mTypeMap.contains( type ) ) 178 if ( type.isEmpty() || !mTypeMap.contains( type ) )
179 return 0; 179 return 0;
180 180
181//US KService::Ptr ptr = mTypeMap[ type ]; 181//US KService::Ptr ptr = mTypeMap[ type ];
182//US KLibFactory *factory = KLibLoader::self()->factory( ptr->library().latin1() ); 182//US KLibFactory *factory = KLibLoader::self()->factory( ptr->library().latin1() );
183 PluginInfo* pi = mTypeMap[ type ]; 183 PluginInfo* pi = mTypeMap[ type ];
184 KLibFactory *factory = (KLibFactory *)KLibLoader::self()->factory( pi->library.latin1() ); 184 KLibFactory *factory = (KLibFactory *)KLibLoader::self()->factory( pi->library.latin1() );
185 if ( !factory ) { 185 if ( !factory ) {
186 qDebug("KRES::Factory::configWidget(): Factory creation failed for library %s", pi->library.latin1()); 186 qDebug("KRES::Factory::configWidget(): Factory creation failed for library %s", pi->library.latin1());
187 kdDebug() << "KRES::Factory::configWidget(): Factory creation failed" << endl; 187 kdDebug() << "KRES::Factory::configWidget(): Factory creation failed" << endl;
188 return 0; 188 return 0;
189 } 189 }
190 190
191 PluginFactoryBase *pluginFactory = static_cast<PluginFactoryBase *>( factory ); 191 PluginFactoryBase *pluginFactory = static_cast<PluginFactoryBase *>( factory );
192 192
193 if ( !pluginFactory ) { 193 if ( !pluginFactory ) {
194 qDebug("KRES::Factory::configWidget(): no plugin factory for library %s", pi->library.latin1()); 194 qDebug("KRES::Factory::configWidget(): no plugin factory for library %s", pi->library.latin1());
195 kdDebug() << "KRES::Factory::configWidget(): no plugin factory." << endl; 195 kdDebug() << "KRES::Factory::configWidget(): no plugin factory." << endl;
196 return 0; 196 return 0;
197 } 197 }
198 198
199 ConfigWidget *wdg = pluginFactory->configWidget( parent ); 199 ConfigWidget *wdg = pluginFactory->configWidget( parent );
200 if ( !wdg ) { 200 if ( !wdg ) {
201//US kdDebug() << "'" << ptr->library() << "' is not a " + mResourceFamily + " plugin." << endl; 201//US kdDebug() << "'" << ptr->library() << "' is not a " + mResourceFamily + " plugin." << endl;
202 qDebug("%s is not a %s plugin.", pi->library.latin1(), mResourceFamily.latin1()); 202 qDebug("%s is not a %s plugin.", pi->library.latin1(), mResourceFamily.latin1());
203 return 0; 203 return 0;
204 } 204 }
205 return wdg; 205 return wdg;
206 206
207} 207}
208 208
209QString Factory::typeName( const QString &type ) const 209QString Factory::typeName( const QString &type ) const
210{ 210{
211 if ( type.isEmpty() || !mTypeMap.contains( type ) ) 211 if ( type.isEmpty() || !mTypeMap.contains( type ) )
212 return QString(); 212 return QString();
213 213
214 214
215//US KService::Ptr ptr = mTypeMap[ type ]; 215//US KService::Ptr ptr = mTypeMap[ type ];
216//US return ptr->name(); 216//US return ptr->name();
217 PluginInfo* pi = mTypeMap[ type ]; 217 PluginInfo* pi = mTypeMap[ type ];
218 return pi->nameLabel; 218 return pi->nameLabel;
219 219
220} 220}
221 221
222QString Factory::typeDescription( const QString &type ) const 222QString Factory::typeDescription( const QString &type ) const
223{ 223{
224 if ( type.isEmpty() || !mTypeMap.contains( type ) ) 224 if ( type.isEmpty() || !mTypeMap.contains( type ) )
225 return QString(); 225 return QString();
226 226
227//US KService::Ptr ptr = mTypeMap[ type ]; 227//US KService::Ptr ptr = mTypeMap[ type ];
228//US return ptr->comment(); 228//US return ptr->comment();
229 PluginInfo* pi = mTypeMap[ type ]; 229 PluginInfo* pi = mTypeMap[ type ];
230 return pi->descriptionLabel; 230 return pi->descriptionLabel;
231} 231}
232 232
233Resource *Factory::resource( const QString& type, const KConfig *config ) 233Resource *Factory::resource( const QString& type, const KConfig *config )
234{ 234{
235 235
236 236
237 if ( type.isEmpty() || !mTypeMap.contains( type ) ) 237 if ( type.isEmpty() || !mTypeMap.contains( type ) )
238 return 0; 238 return 0;
239 239
240#ifdef STATIC_RESOURCES 240#ifdef STATIC_RESOURCES
241 qDebug("NEW STATIC RESOURCE %s", type.latin1()); 241 qDebug("NEW STATIC RESOURCE %s", type.latin1());
242 Resource *resource = 0; 242 Resource *resource = 0;
243 if ( type == "file" ) { 243 if ( type == "file" ) {
244 resource = (Resource *) new KABC::ResourceFile( config ); 244 resource = (Resource *) new KABC::ResourceFile( config );
diff --git a/variables.pri b/variables.pri
index 9975cf0..5d3b6cb 100644
--- a/variables.pri
+++ b/variables.pri
@@ -1,14 +1,14 @@
1 1
2# variables settings for compilation for Linux desktop and Qt 3.x.x 2# variables settings for compilation for Linux desktop and Qt 3.x.x
3 3
4unix { 4unix {
5#for statically linking 5#for statically linking
6#CONFIG += staticlib 6#CONFIG += staticlib
7} 7}
8win32 { 8win32 {
9#disable importol to make it running on windows ME/98 9#disable importol to make it running on windows ME/98
10#CONFIG += importol 10CONFIG += importol
11 11
12} 12}
13CONFIG += thread 13CONFIG += thread
14CONFIG += release 14CONFIG += release