summaryrefslogtreecommitdiff
authorsandman <sandman>2002-10-21 12:39:51 (UTC)
committer sandman <sandman>2002-10-21 12:39:51 (UTC)
commit32817a02b4fae7010e7ef1212916168845a58831 (patch) (unidiff)
tree9859d99a7e507859d06d6e9f2a03a3b8efb046a8
parentcdaf60fdf5dc19e88db4faa319daacfe4e879518 (diff)
downloadopie-32817a02b4fae7010e7ef1212916168845a58831.zip
opie-32817a02b4fae7010e7ef1212916168845a58831.tar.gz
opie-32817a02b4fae7010e7ef1212916168845a58831.tar.bz2
Get rid of the QDir::readDirEntries: Cannot read the directory:
/opt/QtPalmtop/plugins/fontfactories message if no fontfactories are installed -- this seems to confuse users
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--library/fontdatabase.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/library/fontdatabase.cpp b/library/fontdatabase.cpp
index 147134c..899d5cf 100644
--- a/library/fontdatabase.cpp
+++ b/library/fontdatabase.cpp
@@ -156,16 +156,20 @@ void FontDatabase::loadRenderers()
156 (*mit).interface->release(); 156 (*mit).interface->release();
157 (*mit).library->unload(); 157 (*mit).library->unload();
158 delete (*mit).library; 158 delete (*mit).library;
159 } 159 }
160 factoryList->clear(); 160 factoryList->clear();
161 161
162 QString path = QPEApplication::qpeDir() + "/plugins/fontfactories"; 162 QString path = QPEApplication::qpeDir() + "/plugins/fontfactories";
163 QDir dir( path, "lib*.so" ); 163 QDir dir( path, "lib*.so" );
164
165 if ( !dir.exists())
166 return;
167
164 QStringList list = dir.entryList(); 168 QStringList list = dir.entryList();
165 QStringList::Iterator it; 169 QStringList::Iterator it;
166 for ( it = list.begin(); it != list.end(); ++it ) { 170 for ( it = list.begin(); it != list.end(); ++it ) {
167 FontFactoryInterface *iface = 0; 171 FontFactoryInterface *iface = 0;
168 QLibrary *lib = new QLibrary( path + "/" + *it ); 172 QLibrary *lib = new QLibrary( path + "/" + *it );
169 if ( lib->queryInterface( IID_FontFactory, (QUnknownInterface**)&iface ) == QS_OK ) { 173 if ( lib->queryInterface( IID_FontFactory, (QUnknownInterface**)&iface ) == QS_OK ) {
170 FontFactory factory; 174 FontFactory factory;
171 factory.library = lib; 175 factory.library = lib;