On Monday 14 September 2009 14:20:12 Daniel Teske wrote: > On Friday 11 September 2009 22:02:50 ext Nicolas Arnaud-Cormos wrote: > > Hi, > > > > I'm playing with the code, and I find something strange. I'm trying to > > get the type of the file in the current editor (header or source). > > If I'm on a header file, and call the function file()->mimetype() in > > CPPEditor, it returns the string text/x-c++src. > > I would have expected text/x-c++hdr. > > > > If I do something like this: > > > > const QString typeName = mimeType.type(); > > if (typeName == QLatin1String(CppTools::Constants::C_HEADER_MIMETYPE) > > > > || typeName == QLatin1String(CppTools::Constants::CPP_HEADER_MIMETYPE)) > > > > it's working. > > > > Is it a bug? > > Yes that's a bug. Though I'm not sure how to best fix that. Can you try the > attached patch?
The patch is not working, because BaseTextEditor::open is not virtual. But once I've made it virtual, everything is working nicely. Nicolas _______________________________________________ Qt-creator mailing list [email protected] http://lists.trolltech.com/mailman/listinfo/qt-creator
