Commit 7b120112 authored by Laurent Montel's avatar Laurent Montel 😁

Minor optimization

parent 0883ff58
......@@ -1281,7 +1281,8 @@ void KOPrefsDialogPlugins::usrReadConfig()
i18nc( "@title:group", "Other Plugins" ) ) );
KService::List::ConstIterator it;
for ( it = plugins.constBegin(); it != plugins.constEnd(); ++it ) {
KService::List::ConstIterator end(plugins.constEnd());
for ( it = plugins.constBegin(); it != end; ++it ) {
QTreeWidgetItem *item = 0;
if ( (*it)->hasServiceType( EventViews::CalendarDecoration::Decoration::serviceType() ) ) {
item = new PluginItem( decorations, *it );
......@@ -1312,7 +1313,7 @@ void KOPrefsDialogPlugins::usrWriteConfig()
for ( int i = 0; i < mTreeWidget->topLevelItemCount(); ++i) {
QTreeWidgetItem *serviceTypeGroup = mTreeWidget->topLevelItem( i );
for ( int j = 0; j < serviceTypeGroup->childCount(); j++) {
for ( int j = 0; j < serviceTypeGroup->childCount(); ++j) {
PluginItem *item = static_cast<PluginItem *>( serviceTypeGroup->child( j ) );
if( item->checkState( 0 ) == Qt::Checked ) {
selectedPlugins.append( item->service()->desktopEntryName() );
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment