summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--library/applnk.cpp2
-rw-r--r--library/mimetype.cpp10
2 files changed, 8 insertions, 4 deletions
diff --git a/library/applnk.cpp b/library/applnk.cpp
index 5f7da8e..e9d519e 100644
--- a/library/applnk.cpp
+++ b/library/applnk.cpp
@@ -1276,7 +1276,7 @@ DocLnkSet::DocLnkSet( const QString &directory, const QString& mimefilter ) :
1276{ 1276{
1277 QDir dir( directory ); 1277 QDir dir( directory );
1278 mFile = dir.dirName(); 1278 mFile = dir.dirName();
1279 QDict<void> reference; 1279 QDict<void> reference(1021);
1280 1280
1281 QStringList subFilter = QStringList::split(";", mimefilter); 1281 QStringList subFilter = QStringList::split(";", mimefilter);
1282 QValueList<QRegExp> mimeFilters; 1282 QValueList<QRegExp> mimeFilters;
diff --git a/library/mimetype.cpp b/library/mimetype.cpp
index 23de70b..ec45794 100644
--- a/library/mimetype.cpp
+++ b/library/mimetype.cpp
@@ -111,6 +111,7 @@ public:
111MimeType::Private* MimeType::d=0; 111MimeType::Private* MimeType::d=0;
112static QMap<QString,QString> *typeFor = 0; 112static QMap<QString,QString> *typeFor = 0;
113static QMap<QString,QStringList> *extFor = 0; 113static QMap<QString,QStringList> *extFor = 0;
114static bool appsUpdated = FALSE;
114 115
115MimeType::Private& MimeType::data() 116MimeType::Private& MimeType::data()
116{ 117{
@@ -271,6 +272,9 @@ void MimeType::clear()
271{ 272{
272 delete d; 273 delete d;
273 d = 0; 274 d = 0;
275 delete typeFor; typeFor = 0;
276 delete extFor ; extFor = 0;
277 appsUpdated = FALSE;
274} 278}
275 279
276void MimeType::loadExtensions() 280void MimeType::loadExtensions()
@@ -322,9 +326,8 @@ void MimeType::init( const QString& ext_or_id )
322 if ( i.isNull() ) 326 if ( i.isNull() )
323 i = "application/octet-stream"; 327 i = "application/octet-stream";
324 } 328 }
325 static bool appsUpdated = FALSE; 329
326 if ( !appsUpdated ) { 330 if ( !appsUpdated ) {
327 appsUpdated = TRUE;
328 updateApplications(); 331 updateApplications();
329 } 332 }
330} 333}
@@ -353,7 +356,8 @@ QString MimeType::appsFolderName()
353*/ 356*/
354void MimeType::updateApplications() 357void MimeType::updateApplications()
355{ 358{
356 clear(); 359// clear();
360 appsUpdated = true;
357 AppLnkSet apps( appsFolderName() ); 361 AppLnkSet apps( appsFolderName() );
358 updateApplications(&apps); 362 updateApplications(&apps);
359} 363}