[Patch] KDirModel fix for non-standard hierarchies

Olivier Goffart ogoffart at kde.org
Wed Dec 3 00:02:24 GMT 2008


Le mardi 2 décembre 2008, David Faure a écrit :
> On Tuesday 02 December 2008, Thiago Macieira wrote:
> > On Tuesday 02 December 2008 11:46:44 David Faure wrote:
> > > I rewrote qHash(KUrl) and now it's 60 times
> > > faster than before...
> >
> > Do you mean commit 891419?
> >
> > Unfortunately, that change has to wait for KDE 5. That's a behaviour-
> > incompatible change. Since qHash(KUrl) is inlined all over the place,
> > code using the old hash will fail to find data inside QHash structures
> > that were created with the new hashing.
>
> Let's be pragmatic. On one hand there's a potential BC breakage for the
> hypothetical case of two different modules passing each other a hash of
> urls (I now grepped and I couldn't find that anywhere in trunk/KDE nor
> extragear), [...]


Also note that:
 - It is BC to make an inline function non inline  (AFAIK) so the //KDE5 
comment can be removed.
 - we could find a way to detect at runtime if the KApplication was compile 
with kde 4.2 or not. This doesn't solve the problem in case of plugin anyway




(Sugestion for guessing the compiled version at runtime:)
class KAboutData {
[...]

 KAboutData( const QByteArray &appName,
              [...]
                const QByteArray &bugsEmailAddress = "submit at bugs.kde.org",
		int compiledKdeVersion 
#ifndef KABOUTDATA_CPP
					= KDE_VERSION
#endif
              );

#ifdef KABOUTDATA_CPP
  //we need to keep a definition of this function for kde version compiled
  // before KDE 4.2
 KAboutData( const QByteArray &appName,
              [...]
             const QByteArray &bugsEmailAddress = "submit at bugs.kde.org" );
#endif

}
 

Due to the fact that this might fail anyway and probably be useless, i suggest 
we just don't care :)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20081203/ed0aea68/attachment.sig>


More information about the kde-core-devel mailing list