----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://git.reviewboard.kde.org/r/127211/#review92889 -----------------------------------------------------------
Ship it! even better would be to use static const QHash<QString, ...> map = { {QStringLiteral(...), value}, // NOTE: don't use QLatin1String here! ... }; return map[mapCommand]; - Milian Wolff On Feb. 28, 2016, 9:52 p.m., Aleix Pol Gonzalez wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://git.reviewboard.kde.org/r/127211/ > ----------------------------------------------------------- > > (Updated Feb. 28, 2016, 9:52 p.m.) > > > Review request for Kate and KDE Frameworks. > > > Repository: ktexteditor > > > Description > ------- > > Only initialize them once. > Since they're not const, use ::value rather than ::operator[], because the > latter will provide a default-constructed object and add it to the map. > > > Diffs > ----- > > src/vimode/cmds.cpp 7804af4 > > Diff: https://git.reviewboard.kde.org/r/127211/diff/ > > > Testing > ------- > > > Thanks, > > Aleix Pol Gonzalez > >
_______________________________________________ Kde-frameworks-devel mailing list Kde-frameworks-devel@kde.org https://mail.kde.org/mailman/listinfo/kde-frameworks-devel