extragear/sdk/kdevplatform/language/backgroundparser
Milian Wolff
mail at milianw.de
Sat Feb 20 16:24:21 UTC 2010
Milian Wolff, 20.02.2010:
> --- trunk/extragear/sdk/kdevplatform/language/backgroundparser/parsejob.cpp
> #1093314:1093315 @@ -105,21 +105,16 @@
>
> ParseJob::~ParseJob()
> {
> - //Here we release the revision
> - EditorIntegrator editor;
> - editor.setCurrentUrl(d->document);
> -
> - if(KDevelop::LockedSmartInterface smart = editor.smart()) {
> - smart->releaseRevision(d->revisionToken);
> - smart->clearRevision();
> - ///@todo We need to know here what the currently used revision is,
> and assert that it still is being used + if ( d->revisionToken != -1 )
> {
> + kWarning() << "You must call cleanupSmartRevision() when your
> run() method has finished!"; + cleanupSmartRevision();
> }
This part should eventually be an assert I think.
And the general API plain sucks... If you call contentsAvailableFromEditor and
it returns true you have to make sure that it's cleaned properly again... I
tried connecting the cleanup to the done() signal of the job but that didn#t
work (wrong thread). The execute() method is private so I can't cleanup after
run() either... Any ideas? Maybe make contentsAvailableFromEditor return some
class that cleans up once destroyed?
--
Milian Wolff
mail at milianw.de
http://milianw.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20100220/5fdc8dce/attachment.sig>
More information about the KDevelop-devel
mailing list