fix for python template
Matt Rogers
mattr at kde.org
Sun Apr 30 05:13:20 UTC 2006
On Tuesday 11 April 2006 07:10, Tommaso Massimi wrote:
> On 4/11/06, Matt Rogers <mattr at kde.org> wrote:
> > On Monday 10 April 2006 07:23, tom wrote:
> > > Hi all,
> > >
> > > I saw that the python application generated by the kdevelop wizard
> > > is unable to use the dialog to open a file.
> > >
> > > Here a (simple) fix to the tempalte against the current svn revision.
> > > Bye
> > > Tom
> > >
> > > ===================================================================
> > > --- languages/python/app_templates/pyqt/app.py (revision 528198)
>
> [...]
>
> > Hi,
> >
> > I committed your patch.
> >
> > Thanks!
>
> you are welcome,
> it seems now that kdevelop has somebody keeping cure of it!!
>
> Some time ago I sent also some few lines of code against a bug,
>
> here the bug
> http://bugs.kde.org/show_bug.cgi?id=113379
>
> here the discussion in the mail list and the code I sent.
>
> http://barney.cs.uni-potsdam.de/mailman/private/kdevelop-devel/2005-Decembe
>r/034339.html
>
> I well know my fix was not the final word to fix that fault,
> moreover it is affording the trouble in a way that solve the problem
> in my context,
> and I think it could be useful to everyone.
>
> I'm keeping these lines on my kdevelop since a few months now,
> so I'm sure they are working fine.
>
> Can you let me have your opinion about them?
>
> ---
>
> here the code, as I saw your webmail server is not helping so much...
>
> languages/cpp/problemreporter.cpp
> void ProblemReporter::closedFile(const KURL &fileName)
> {
> - QValueList<Problem> problems =
> m_cppSupport->backgroundParser()->problems( fileName.path() , true ,
> true);
> + KMimeType::Ptr res = KMimeType::findByFileContent( fileName.path()
> ); + if (res && res->isValid())
> + {
> + QString mimetype = res->name();
> + if ((mimetype == "text/x-chdr" ) ||
> + (mimetype == "text/x-c++hdr") ||
> + (mimetype == "text/x-csrc" ) ||
> + (mimetype == "text/x-c++src"))
> + {
> + QValueList<Problem> problems =
> m_cppSupport->backgroundParser()->problems( fileName.path() , true ,
> true);
> + }
> + }
> }
>
> Ciao
> Tom
IIRC, this has already been taken care of in the KDevelop 3.4 branch. I'll
confirm and then close the bug.
--
Matt
More information about the KDevelop-devel
mailing list