diff options
| author | Peter Penz <[email protected]> | 2010-11-05 17:32:46 +0000 |
|---|---|---|
| committer | Peter Penz <[email protected]> | 2010-11-05 17:32:46 +0000 |
| commit | e3bd93fe73f41730555e8c225ee51f93e29c228c (patch) | |
| tree | 066038e28b143c77de981c3e293bd836830fb602 /src/settings/general | |
| parent | d83a4ce51dc3d5c5b6a61059c1ebe0c0b20f722e (diff) | |
Take care to listen for changes of the settings-widgets after loadSettings() is invoked, otherwise it is possible that a change is accidently indicated.
svn path=/trunk/KDE/kdebase/apps/; revision=1193350
Diffstat (limited to 'src/settings/general')
| -rw-r--r-- | src/settings/general/behaviorsettingspage.cpp | 24 | ||||
| -rw-r--r-- | src/settings/general/contextmenusettingspage.cpp | 5 | ||||
| -rw-r--r-- | src/settings/general/previewssettingspage.cpp | 10 | ||||
| -rw-r--r-- | src/settings/general/statusbarsettingspage.cpp | 5 |
4 files changed, 22 insertions, 22 deletions
diff --git a/src/settings/general/behaviorsettingspage.cpp b/src/settings/general/behaviorsettingspage.cpp index 0dae09d52..0864a4bba 100644 --- a/src/settings/general/behaviorsettingspage.cpp +++ b/src/settings/general/behaviorsettingspage.cpp @@ -59,10 +59,8 @@ BehaviorSettingsPage::BehaviorSettingsPage(const KUrl& url, QWidget* parent) : propsBox->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Maximum); m_localProps = new QRadioButton(i18nc("@option:radio", "Remember view properties for each folder"), propsBox); - connect(m_localProps, SIGNAL(toggled(bool)), this, SIGNAL(changed())); m_globalProps = new QRadioButton(i18nc("@option:radio", "Use common view properties for all folders"), propsBox); - connect(m_globalProps, SIGNAL(toggled(bool)), this, SIGNAL(changed())); QVBoxLayout* propsBoxLayout = new QVBoxLayout(propsBox); propsBoxLayout->addWidget(m_localProps); @@ -73,13 +71,10 @@ BehaviorSettingsPage::BehaviorSettingsPage(const KUrl& url, QWidget* parent) : confirmBox->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Maximum); m_confirmMoveToTrash = new QCheckBox(i18nc("@option:check Ask for Confirmation When", "Moving files or folders to trash"), confirmBox); - connect(m_confirmMoveToTrash, SIGNAL(toggled(bool)), this, SIGNAL(changed())); m_confirmDelete = new QCheckBox(i18nc("@option:check Ask for Confirmation When", "Deleting files or folders"), confirmBox); - connect(m_confirmDelete, SIGNAL(toggled(bool)), this, SIGNAL(changed())); m_confirmClosingMultipleTabs = new QCheckBox(i18nc("@option:check Ask for Confirmation When", "Closing windows with multiple tabs"), confirmBox); - connect(m_confirmClosingMultipleTabs, SIGNAL(toggled(bool)), this, SIGNAL(changed())); QVBoxLayout* confirmBoxLayout = new QVBoxLayout(confirmBox); confirmBoxLayout->addWidget(m_confirmMoveToTrash); @@ -88,30 +83,23 @@ BehaviorSettingsPage::BehaviorSettingsPage(const KUrl& url, QWidget* parent) : // 'Rename inline' m_renameInline = new QCheckBox(i18nc("@option:check", "Rename inline"), this); - connect(m_renameInline, SIGNAL(toggled(bool)), this, SIGNAL(changed())); // 'Show tooltips' QWidget* toolTipContainer = new QWidget(this); QHBoxLayout* toolTipsLayout = new QHBoxLayout(toolTipContainer); toolTipsLayout->setMargin(0); m_showToolTips = new QCheckBox(i18nc("@option:check", "Show tooltips"), toolTipContainer); - connect(m_showToolTips, SIGNAL(toggled(bool)), this, SIGNAL(changed())); - connect(m_showToolTips, SIGNAL(toggled(bool)), this, SLOT(updateConfigureButton())); m_configureToolTips = new QLabel(toolTipContainer); - connect(m_configureToolTips, SIGNAL(linkActivated(const QString&)), - this, SLOT(configureToolTips())); toolTipsLayout->addWidget(m_showToolTips); toolTipsLayout->addWidget(m_configureToolTips, 1, Qt::AlignLeft); // 'Show selection marker' m_showSelectionToggle = new QCheckBox(i18nc("@option:check", "Show selection marker"), this); - connect(m_showSelectionToggle, SIGNAL(toggled(bool)), this, SIGNAL(changed())); // 'Natural sorting of items' m_naturalSorting = new QCheckBox(i18nc("option:check", "Natural sorting of items"), this); - connect(m_naturalSorting, SIGNAL(toggled(bool)), this, SIGNAL(changed())); topLayout->addWidget(propsBox); topLayout->addWidget(confirmBox); @@ -122,6 +110,18 @@ BehaviorSettingsPage::BehaviorSettingsPage(const KUrl& url, QWidget* parent) : topLayout->addStretch(); loadSettings(); + + connect(m_localProps, SIGNAL(toggled(bool)), this, SIGNAL(changed())); + connect(m_globalProps, SIGNAL(toggled(bool)), this, SIGNAL(changed())); + connect(m_confirmMoveToTrash, SIGNAL(toggled(bool)), this, SIGNAL(changed())); + connect(m_confirmDelete, SIGNAL(toggled(bool)), this, SIGNAL(changed())); + connect(m_confirmClosingMultipleTabs, SIGNAL(toggled(bool)), this, SIGNAL(changed())); + connect(m_renameInline, SIGNAL(toggled(bool)), this, SIGNAL(changed())); + connect(m_showToolTips, SIGNAL(toggled(bool)), this, SIGNAL(changed())); + connect(m_showToolTips, SIGNAL(toggled(bool)), this, SLOT(updateConfigureButton())); + connect(m_configureToolTips, SIGNAL(linkActivated(const QString&)), this, SLOT(configureToolTips())); + connect(m_showSelectionToggle, SIGNAL(toggled(bool)), this, SIGNAL(changed())); + connect(m_naturalSorting, SIGNAL(toggled(bool)), this, SIGNAL(changed())); } BehaviorSettingsPage::~BehaviorSettingsPage() diff --git a/src/settings/general/contextmenusettingspage.cpp b/src/settings/general/contextmenusettingspage.cpp index 233e899b4..592e25ba7 100644 --- a/src/settings/general/contextmenusettingspage.cpp +++ b/src/settings/general/contextmenusettingspage.cpp @@ -41,10 +41,8 @@ ContextMenuSettingsPage::ContextMenuSettingsPage(QWidget* parent) : vBox->setSpacing(KDialog::spacingHint()); m_showDeleteCommand = new QCheckBox(i18nc("@option:check", "Show 'Delete' command"), vBox); - connect(m_showDeleteCommand, SIGNAL(toggled(bool)), this, SIGNAL(changed())); m_showCopyMoveMenu = new QCheckBox(i18nc("@option:check", "Show 'Copy To' and 'Move To' commands"), vBox); - connect(m_showCopyMoveMenu, SIGNAL(toggled(bool)), this, SIGNAL(changed())); // Add a dummy widget with no restriction regarding // a vertical resizing. This assures that the dialog layout @@ -54,6 +52,9 @@ ContextMenuSettingsPage::ContextMenuSettingsPage(QWidget* parent) : topLayout->addWidget(vBox); loadSettings(); + + connect(m_showDeleteCommand, SIGNAL(toggled(bool)), this, SIGNAL(changed())); + connect(m_showCopyMoveMenu, SIGNAL(toggled(bool)), this, SIGNAL(changed())); } ContextMenuSettingsPage::~ContextMenuSettingsPage() diff --git a/src/settings/general/previewssettingspage.cpp b/src/settings/general/previewssettingspage.cpp index 1059e8547..265dc209f 100644 --- a/src/settings/general/previewssettingspage.cpp +++ b/src/settings/general/previewssettingspage.cpp @@ -65,8 +65,6 @@ PreviewsSettingsPage::PreviewsSettingsPage(QWidget* parent) : m_previewPluginsList = new QListWidget(this); m_previewPluginsList->setSortingEnabled(true); m_previewPluginsList->setSelectionMode(QAbstractItemView::NoSelection); - connect(m_previewPluginsList, SIGNAL(itemClicked(QListWidgetItem*)), - this, SIGNAL(changed())); QVBoxLayout* listBoxLayout = new QVBoxLayout(listBox); listBoxLayout->addWidget(m_previewPluginsList); @@ -81,8 +79,6 @@ PreviewsSettingsPage::PreviewsSettingsPage(QWidget* parent) : m_localFileSizeBox->setSingleStep(1); m_localFileSizeBox->setSuffix(QLatin1String(" MB")); m_localFileSizeBox->setRange(0, 9999); /* MB */ - connect(m_localFileSizeBox, SIGNAL(valueChanged(int)), - this, SIGNAL(changed())); QLabel* remoteFileSizeLabel = new QLabel(i18nc("@label Don't create previews for: <Remote files above:> XX MByte", "Remote files above:"), this); @@ -91,8 +87,6 @@ PreviewsSettingsPage::PreviewsSettingsPage(QWidget* parent) : m_remoteFileSizeBox->setSingleStep(1); m_remoteFileSizeBox->setSuffix(QLatin1String(" MB")); m_remoteFileSizeBox->setRange(0, 9999); /* MB */ - connect(m_remoteFileSizeBox, SIGNAL(valueChanged(int)), - this, SIGNAL(changed())); QGridLayout* fileSizeBoxLayout = new QGridLayout(fileSizeBox); fileSizeBoxLayout->addWidget(localFileSizeLabel, 0, 0, Qt::AlignRight); @@ -104,6 +98,10 @@ PreviewsSettingsPage::PreviewsSettingsPage(QWidget* parent) : topLayout->addWidget(fileSizeBox); loadSettings(); + + connect(m_previewPluginsList, SIGNAL(itemClicked(QListWidgetItem*)), this, SIGNAL(changed())); + connect(m_localFileSizeBox, SIGNAL(valueChanged(int)), this, SIGNAL(changed())); + connect(m_remoteFileSizeBox, SIGNAL(valueChanged(int)), this, SIGNAL(changed())); } diff --git a/src/settings/general/statusbarsettingspage.cpp b/src/settings/general/statusbarsettingspage.cpp index 5c2d34af8..4d9b9a3f2 100644 --- a/src/settings/general/statusbarsettingspage.cpp +++ b/src/settings/general/statusbarsettingspage.cpp @@ -40,10 +40,8 @@ StatusBarSettingsPage::StatusBarSettingsPage(QWidget* parent) : vBox->setSpacing(KDialog::spacingHint()); m_showZoomSlider = new QCheckBox(i18nc("@option:check", "Show zoom slider"), vBox); - connect(m_showZoomSlider, SIGNAL(toggled(bool)), this, SIGNAL(changed())); m_showSpaceInfo = new QCheckBox(i18nc("@option:check", "Show space information"), vBox); - connect(m_showSpaceInfo, SIGNAL(toggled(bool)), this, SIGNAL(changed())); // Add a dummy widget with no restriction regarding // a vertical resizing. This assures that the dialog layout @@ -53,6 +51,9 @@ StatusBarSettingsPage::StatusBarSettingsPage(QWidget* parent) : topLayout->addWidget(vBox); loadSettings(); + + connect(m_showZoomSlider, SIGNAL(toggled(bool)), this, SIGNAL(changed())); + connect(m_showSpaceInfo, SIGNAL(toggled(bool)), this, SIGNAL(changed())); } StatusBarSettingsPage::~StatusBarSettingsPage() |
