author | zecke <zecke> | 2004-06-20 19:03:56 (UTC) |
---|---|---|
committer | zecke <zecke> | 2004-06-20 19:03:56 (UTC) |
commit | 44d69b04b5257592639d2a494c448202c86978c2 (patch) (side-by-side diff) | |
tree | 9d776e08f6efa53abc6e2658c94b9e0e18324692 /library/mimetype.cpp | |
parent | 2055cb9e96b27f95720240a2035ade27cb7bc098 (diff) | |
download | opie-44d69b04b5257592639d2a494c448202c86978c2.zip opie-44d69b04b5257592639d2a494c448202c86978c2.tar.gz opie-44d69b04b5257592639d2a494c448202c86978c2.tar.bz2 |
Use A higher prime number in AppLnk
Somehow the Launcher triggers issues with libqpe and MimeType.
Due the mix of calling MimeType::clear, MimeType type(doclnk.linkFile()),
MimeType::clear
the registration of Application was cleared and not reentered due the
inner static variable in MimeType::init which was set.
Now make sure that if we clear that we will reenter the Application in all cases!
-rw-r--r-- | library/mimetype.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/library/mimetype.cpp b/library/mimetype.cpp index 23de70b..ec45794 100644 --- a/library/mimetype.cpp +++ b/library/mimetype.cpp @@ -112,4 +112,5 @@ MimeType::Private* MimeType::d=0; static QMap<QString,QString> *typeFor = 0; static QMap<QString,QStringList> *extFor = 0; +static bool appsUpdated = FALSE; MimeType::Private& MimeType::data() @@ -272,4 +273,7 @@ void MimeType::clear() delete d; d = 0; + delete typeFor; typeFor = 0; + delete extFor ; extFor = 0; + appsUpdated = FALSE; } @@ -323,7 +327,6 @@ void MimeType::init( const QString& ext_or_id ) i = "application/octet-stream"; } - static bool appsUpdated = FALSE; + if ( !appsUpdated ) { - appsUpdated = TRUE; updateApplications(); } @@ -354,5 +357,6 @@ QString MimeType::appsFolderName() void MimeType::updateApplications() { - clear(); +// clear(); + appsUpdated = true; AppLnkSet apps( appsFolderName() ); updateApplications(&apps); |