Somebody with msvc please test (kdevplatform patch)
Andreas Pakulat
apaku at gmx.de
Fri Aug 24 17:02:10 CEST 2007
Hi,
seemingly msvc is somehow broken wrt. QHash::insert() and wants a
const pointer for the value argument (see
http://lxr.kde.org/source/KDE/kdevplatform/shell/languagecontroller.cpp#126
) which needs a totally ugly reinterpret_cast.
I'd like to ask that somebody with msvc (is express edition really
needed for that?) to test the attached patch so we can get rid of the
ugliness and the compiler-check-macro (which is for whatever reason a
krazy-"error").
Andreas
PS: Does kdevplatform really need to support msvc :P
--
You are not dead yet. But watch for further reports.
-------------- next part --------------
Index: languagecontroller.cpp
===================================================================
--- languagecontroller.cpp (Revision 704293)
+++ languagecontroller.cpp (Arbeitskopie)
@@ -119,16 +119,8 @@
if (ILanguage *lang = language(languageSupport->name())) {
languages << lang;
} else {
-#ifdef Q_CC_MSVC
- // vcexpress++ 2005 complains with a "multiple defined variable lang" and
- // a "cannot convert KDevelop::Language* to KDevelop::Language* const&" error
- // may be there is a better way to solve this
- ILanguage *_lang = new Language(languageSupport, this);
- d->languages.insert(languageSupport->name(), reinterpret_cast<KDevelop::Language *const>(_lang));
-#else
- Language *_lang = new Language(languageSupport, this);
- d->languages.insert(languageSupport->name(), _lang);
-#endif
+ Language* _lang = new Language(languageSupport, this);
+ d->languages[languageSupport->name()] = _lang;
languages << _lang;
}
}
More information about the Kde-windows
mailing list