Git commit 94541ca9eb8941f1635e7f524770ccb0c59ac826 by =C3=80lex Fiestas. Committed on 21/11/2013 at 17:59. Pushed by afiestas into branch 'master'. Add a workaround to avoid a crash produced by a GCC bug This bug: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D58800 in nth_element makes QtConcurrent::blockingFilter crash since underneath QtConcurrent uses QtConcurrent::Median which uses nth_element. We need the workaround so we can continue working on kde-workspace/frameworks without having kded5 crashing. CCMAIL: arysin@gmail.com CCMAIL: mklapetek@kde.org M +13 -1 kcontrol/keyboard/xkb_rules.cpp http://commits.kde.org/kde-workspace/94541ca9eb8941f1635e7f524770ccb0c59ac8= 26 diff --git a/kcontrol/keyboard/xkb_rules.cpp b/kcontrol/keyboard/xkb_rules.= cpp index e8b6324..ef99cac 100644 --- a/kcontrol/keyboard/xkb_rules.cpp +++ b/kcontrol/keyboard/xkb_rules.cpp @@ -86,7 +86,19 @@ static bool notEmpty(const ConfigItem* item) template void removeEmptyItems(QList& list) { - QtConcurrent::blockingFilter(list, notEmpty); +#ifdef __GNUC__ +#if __GNUC__ =3D=3D 4 && __GNUC_MINOR__ =3D=3D 8 && __GNUC_PATCHLEVEL__ = =3D=3D 2 +#warning Compiling with a workaround for GCC 4.8.2 http://gcc.gnu.org/bugz= illa/show_bug.cgi?id=3D58800 + Q_FOREACH(T* x, list) { + ConfigItem *y =3D static_cast(x); + if (y->name.isEmpty()) { + list.removeAll(x); + } + } +#else + QtConcurrent::blockingFilter(list, notEmpty); +#endif +#endif } = static