diff --git a/kcms/cursortheme/kcmcursortheme.h b/kcms/cursortheme/kcmcursortheme.h --- a/kcms/cursortheme/kcmcursortheme.h +++ b/kcms/cursortheme/kcmcursortheme.h @@ -95,7 +95,6 @@ void removeTheme(int row); private Q_SLOTS: - void selectionChanged(); /** Updates the size combo box. It loads the size list of the selected cursor theme with the corresponding icons and chooses an appropriate entry. It enables the combo box and the label if the theme provides more than one diff --git a/kcms/cursortheme/kcmcursortheme.cpp b/kcms/cursortheme/kcmcursortheme.cpp --- a/kcms/cursortheme/kcmcursortheme.cpp +++ b/kcms/cursortheme/kcmcursortheme.cpp @@ -152,11 +152,6 @@ emit selectedThemeRowChanged(); updateSizeComboBox(); - QModelIndex selected = selectedIndex(); - - if (selected.isValid()) { - const CursorTheme *theme = m_proxyModel->theme(selected); - } setNeedsSave(m_originalSelectedThemeRow != m_selectedThemeRow || m_originalPreferredSize != m_preferredSize); } @@ -256,7 +251,7 @@ item->setData(i); m_sizesModel->appendRow(item); comboBoxList << i; - }; + } // select an item int selectItem = comboBoxList.indexOf(m_preferredSize); @@ -278,24 +273,24 @@ if (distance < smallestDistance || (distance == smallestDistance && j > m_preferredSize)) { smallestDistance = distance; selectItem = i; - }; + } } - }; + } if (selectItem < 0) { selectItem = 0; } setSelectedSizeRow(selectItem); - }; - }; + } + } // enable or disable the combobox KConfig c("kcminputrc"); KConfigGroup cg(&c, "Mouse"); if (cg.isEntryImmutable("cursorSize")) { setCanResize(false); } else { setCanResize(m_sizesModel->rowCount() > 0); - }; + } } @@ -367,7 +362,7 @@ KConfigGroup c(&config, "Mouse"); if (theme) { c.writeEntry("cursorTheme", theme->name()); - }; + } c.writeEntry("cursorSize", m_preferredSize); c.sync(); @@ -410,8 +405,6 @@ setCanInstall(false); } - const CursorTheme *theme = m_proxyModel->theme(m_appliedIndex); - setSelectedThemeRow(m_appliedIndex.row()); m_originalSelectedThemeRow = m_selectedThemeRow; @@ -441,15 +434,6 @@ setNeedsSave(m_originalSelectedThemeRow != m_selectedThemeRow || m_originalPreferredSize != m_preferredSize); } - -void CursorThemeConfig::selectionChanged() -{ - updateSizeComboBox(); - - setNeedsSave(m_originalSelectedThemeRow != m_selectedThemeRow || m_originalPreferredSize != m_preferredSize); - //setNeedsSave(m_appliedIndex != selectedIndex()); -} - QModelIndex CursorThemeConfig::selectedIndex() const { return m_proxyModel->index(m_selectedThemeRow, 0); @@ -559,7 +543,7 @@ if (!QDir().mkpath(destDir)) { emit showErrorMessage(i18n("Failed to create 'icons' folder.")); return; - }; + } // Process each cursor theme in the archive foreach (const QString &dirName, themeDirs) {