D17028: Loader: Avoid Q_FOREACH

2018-11-20 Thread Sergio Martins
smartins added inline comments. INLINE COMMENTS > loader.cpp:273 > QStringList allLocalizedDictionaries; > -Q_FOREACH (const QString , languages()) { > +for (const QString : languages()) { > allLocalizedDictionaries.append(languageNameForCode(langCode)); will languages()

[Differential] [Commented On] D4584: KDirWatch: replace QList by std::vector to save on new/delete.

2017-02-15 Thread Sergio Martins
smartins added inline comments. INLINE COMMENTS > dfaure wrote in kdirwatch.cpp:1379 > Detaches? a std::vector? doh! REPOSITORY R244 KCoreAddons BRANCH master REVISION DETAIL https://phabricator.kde.org/D4584 EMAIL PREFERENCES

[Differential] [Changed Subscribers] D4584: KDirWatch: replace QList by std::vector to save on new/delete.

2017-02-15 Thread Sergio Martins
smartins added inline comments. INLINE COMMENTS > kdirwatch.cpp:1379 > > -Q_FOREACH (Client *c, e->m_clients) { > -if (c->instance == nullptr || c->count == 0) { > +for (Client : e->m_clients) { > +if (c.instance == nullptr || c.count == 0) { can m_clients be shared ?

Re: Review Request 127211: Properly use static QMaps

2016-02-29 Thread Sergio Martins
> On Feb. 29, 2016, 10:36 a.m., Milian Wolff wrote: > > even better would be to use > > > > static const QHash map = { > > {QStringLiteral(...), value}, // NOTE: don't use QLatin1String here! > > ... > > }; > > return map[mapCommand]; QStringLiteral

Re: Review Request 126737: Fix most Clazy warnings in KItemViews.

2016-01-14 Thread Sergio Martins
I get to the PC - > see the log again. > > Andrey Cygankov wrote: > Some warnings , such as using qstringlitetal to initialize a blank line , > I thought it wrong. Article Qt Weekly says that empty lines use the > qstringliteral is not effective. > > Sergio Mar

Re: Review Request 126737: Fix most Clazy warnings in KItemViews.

2016-01-14 Thread Sergio Martins
> On Jan. 14, 2016, 1:03 p.m., Sergio Martins wrote: > > Ship It! Can you push it in two different commits ? One for the QStringLiteral change and another for the isEmpty() - Sergio --- This is an automatically generat

Re: Review Request 126737: Fix most Clazy warnings in KItemViews.

2016-01-14 Thread Sergio Martins
--- This is an automatically generated e-mail. To reply, visit: https://git.reviewboard.kde.org/r/126737/#review91076 --- Ship it! Ship It! - Sergio Martins On Jan. 14, 2016, 12

Re: Review Request 126737: Fix most Clazy warnings in KItemViews.

2016-01-14 Thread Sergio Martins
> On Jan. 14, 2016, 1:03 p.m., Sergio Martins wrote: > > Ship It! > > Sergio Martins wrote: > Can you push it in two different commits ? One for the QStringLiteral > change and another for the isEmpty() Regarding the qDeleteAll(), the correct way is qDeleteAll(d-&g

Re: Review Request 126737: Fix most Clazy warnings in KItemViews.

2016-01-14 Thread Sergio Martins
I get to the PC - > see the log again. > > Andrey Cygankov wrote: > Some warnings , such as using qstringlitetal to initialize a blank line , > I thought it wrong. Article Qt Weekly says that empty lines use the > qstringliteral is not effective. > > Sergio Mar

Re: Review Request 126737: Fix most Clazy warnings in KItemViews.

2016-01-14 Thread Sergio Martins
> > (Updated Jan. 14, 2016, 12:35 p.m.) > > > Review request for KDE Frameworks, Aleix Pol Gonzalez and Sergio Martins. > > > Repository: kitemviews > > > Description > --- > > Fix Clazy warnings, except: > /src/kwidgetitemdelegatepool.c

Re: Review Request 126429: Fixed all Clazy warnings level 1 and level 2

2015-12-23 Thread Sergio Martins
--- > This is an automatically generated e-mail. To reply, visit: > https://git.reviewboard.kde.org/r/126429/ > --- > > (Updated Dec. 23, 2015, 2:49 p.m.) > > > Review request for KDE F

Re: Review Request 126429: Fixed all Clazy warnings level 1 and level 2

2015-12-23 Thread Sergio Martins
--- This is an automatically generated e-mail. To reply, visit: https://git.reviewboard.kde.org/r/126429/#review90023 --- - Sergio Martins On Dec. 23, 2015, 2:49 p.m., Artur Puzio

Re: Review Request 126350: Fixed all Clazy level 1 and level 2 warnings

2015-12-15 Thread Sergio Martins
org/r/126350/#comment61274> extra whitespace - Sergio Martins On Dec. 15, 2015, 11:34 a.m., Artur Puzio wrote: > > --- > This is an automatically generated e-mail. To reply, visit: > https://git.reviewboar

Re: Review Request 126350: Fixed all Clazy level 1 and level 2 warnings

2015-12-14 Thread Sergio Martins
tps://git.reviewboard.kde.org/r/126350/#comment61246> this will break the build with MSVC, it doesn't support QStringLiteral with multi-line literals. (hint: export CLAZY_EXTRA_OPTIONS="qstring-uneeded-heap-allocations-msvc-compat" ) - Sergio Martins On Dec. 14, 2015, 6:46 p

Re: Review Request 125106: Minor optimizations

2015-10-05 Thread Sergio Martins
> On Sept. 8, 2015, 4:46 p.m., Milian Wolff wrote: > > src/kconf_update/kconf_update.cpp, line 250 > > > > > > QLatin1String > > Albert Astals Cid wrote: > Seems like a bug in clazy, sometimes it knows that