summaryrefslogtreecommitdiff
path: root/library/fontdatabase.cpp
Unidiff
Diffstat (limited to 'library/fontdatabase.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--library/fontdatabase.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/library/fontdatabase.cpp b/library/fontdatabase.cpp
index d94e338..7934a09 100644
--- a/library/fontdatabase.cpp
+++ b/library/fontdatabase.cpp
@@ -146,49 +146,49 @@ QValueList<int> FontDatabase::standardSizes()
146 Load any font renderer plugins that are available and make the fonts 146 Load any font renderer plugins that are available and make the fonts
147 that the plugins can read available. 147 that the plugins can read available.
148*/ 148*/
149void FontDatabase::loadRenderers() 149void FontDatabase::loadRenderers()
150{ 150{
151#ifndef QWS 151#ifndef QWS
152 return; 152 return;
153#else 153#else
154 154
155#ifndef QT_NO_COMPONENT 155#ifndef QT_NO_COMPONENT
156 if ( !factoryList ) 156 if ( !factoryList )
157 factoryList = new QValueList<FontFactory>; 157 factoryList = new QValueList<FontFactory>;
158 158
159 QValueList<FontFactory>::Iterator mit; 159 QValueList<FontFactory>::Iterator mit;
160 for ( mit = factoryList->begin(); mit != factoryList->end(); ++mit ) { 160 for ( mit = factoryList->begin(); mit != factoryList->end(); ++mit ) {
161 qt_fontmanager->factories.setAutoDelete( false ); 161 qt_fontmanager->factories.setAutoDelete( false );
162 qt_fontmanager->factories.removeRef( (*mit).factory ); 162 qt_fontmanager->factories.removeRef( (*mit).factory );
163 qt_fontmanager->factories.setAutoDelete( true ); 163 qt_fontmanager->factories.setAutoDelete( true );
164 (*mit).interface->release(); 164 (*mit).interface->release();
165 (*mit).library->unload(); 165 (*mit).library->unload();
166 delete (*mit).library; 166 delete (*mit).library;
167 } 167 }
168 factoryList->clear(); 168 factoryList->clear();
169 169
170 QString path = QPEApplication::qpeDir() + "/plugins/fontfactories"; 170 QString path = QPEApplication::qpeDir() + "plugins/fontfactories";
171#ifdef Q_OS_MACX 171#ifdef Q_OS_MACX
172 QDir dir( path, "lib*.dylib" ); 172 QDir dir( path, "lib*.dylib" );
173#else 173#else
174 QDir dir( path, "lib*.so" ); 174 QDir dir( path, "lib*.so" );
175#endif 175#endif
176 176
177 if ( !dir.exists()) 177 if ( !dir.exists())
178 return; 178 return;
179 179
180 QStringList list = dir.entryList(); 180 QStringList list = dir.entryList();
181 QStringList::Iterator it; 181 QStringList::Iterator it;
182 for ( it = list.begin(); it != list.end(); ++it ) { 182 for ( it = list.begin(); it != list.end(); ++it ) {
183 FontFactoryInterface *iface = 0; 183 FontFactoryInterface *iface = 0;
184 QLibrary *lib = new QLibrary( path + "/" + *it ); 184 QLibrary *lib = new QLibrary( path + "/" + *it );
185 if ( lib->queryInterface( IID_FontFactory, (QUnknownInterface**)&iface ) == QS_OK ) { 185 if ( lib->queryInterface( IID_FontFactory, (QUnknownInterface**)&iface ) == QS_OK ) {
186 FontFactory factory; 186 FontFactory factory;
187 factory.library = lib; 187 factory.library = lib;
188 factory.interface = iface; 188 factory.interface = iface;
189 factory.factory = factory.interface->fontFactory(); 189 factory.factory = factory.interface->fontFactory();
190 factoryList->append( factory ); 190 factoryList->append( factory );
191 qt_fontmanager->factories.append( factory.factory ); 191 qt_fontmanager->factories.append( factory.factory );
192 readFonts( factory.factory ); 192 readFonts( factory.factory );
193 } else { 193 } else {
194 delete lib; 194 delete lib;