Fixed signal to signal connection in Dolphin's view modes.

REVIEW: 104033
This commit is contained in:
Dawit Alemayehu 2012-02-14 17:06:41 -05:00
parent af14f54560
commit b484b87376
2 changed files with 11 additions and 3 deletions

View file

@ -55,17 +55,17 @@ DolphinViewModesConfigModule::DolphinViewModesConfigModule(QWidget* parent, cons
// Initialize 'Icons' tab
ViewSettingsTab* iconsTab = new ViewSettingsTab(ViewSettingsTab::IconsMode, tabWidget);
tabWidget->addTab(iconsTab, KIcon("view-list-icons"), i18nc("@title:tab", "Icons"));
connect(iconsTab, SIGNAL(changed()), this, SIGNAL(changed()));
connect(iconsTab, SIGNAL(changed()), this, SLOT(viewModeChanged()));
// Initialize 'Compact' tab
ViewSettingsTab* compactTab = new ViewSettingsTab(ViewSettingsTab::CompactMode, tabWidget);
tabWidget->addTab(compactTab, KIcon("view-list-details"), i18nc("@title:tab", "Compact"));
connect(compactTab, SIGNAL(changed()), this, SIGNAL(changed()));
connect(compactTab, SIGNAL(changed()), this, SLOT(viewModeChanged()));
// Initialize 'Details' tab
ViewSettingsTab* detailsTab = new ViewSettingsTab(ViewSettingsTab::DetailsMode, tabWidget);
tabWidget->addTab(detailsTab, KIcon("view-list-tree"), i18nc("@title:tab", "Details"));
connect(detailsTab, SIGNAL(changed()), this, SIGNAL(changed()));
connect(detailsTab, SIGNAL(changed()), this, SLOT(viewModeChanged()));
m_tabs.append(iconsTab);
m_tabs.append(compactTab);
@ -100,4 +100,9 @@ void DolphinViewModesConfigModule::reparseConfiguration()
QDBusConnection::sessionBus().send(message);
}
void DolphinViewModesConfigModule::viewModeChanged()
{
emit changed(true);
}
#include "kcmdolphinviewmodes.moc"

View file

@ -41,6 +41,9 @@ public:
private:
void reparseConfiguration();
private Q_SLOTS:
void viewModeChanged();
private:
QList<ViewSettingsTab*> m_tabs;
};