diff options
author | Vlad Voicu <vladv@rosedu.org> | 2012-03-19 18:36:07 (GMT) |
---|---|---|
committer | vlad <vlad@tyrion.(none)> | 2012-10-13 13:55:45 (GMT) |
commit | 5f745ebd56014a68695ac4b6fe7fb5dc96e34384 (patch) | |
tree | 284e1c2f9d41844dd17046d859d2c68225cfa1d6 /Swift/QtUI/QtSpellCheckerWindow.cpp | |
parent | b3948434495a18df5c4537a2a6e0feecc0805788 (diff) | |
download | swift-contrib-5f745ebd56014a68695ac4b6fe7fb5dc96e34384.zip swift-contrib-5f745ebd56014a68695ac4b6fe7fb5dc96e34384.tar.bz2 |
Addressed Kev's code review
Diffstat (limited to 'Swift/QtUI/QtSpellCheckerWindow.cpp')
-rw-r--r-- | Swift/QtUI/QtSpellCheckerWindow.cpp | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/Swift/QtUI/QtSpellCheckerWindow.cpp b/Swift/QtUI/QtSpellCheckerWindow.cpp index ff6ef39..e2c5b0d 100644 --- a/Swift/QtUI/QtSpellCheckerWindow.cpp +++ b/Swift/QtUI/QtSpellCheckerWindow.cpp @@ -25,13 +25,11 @@ QtSpellCheckerWindow::QtSpellCheckerWindow(SettingsProvider* settings, QWidget* connect(ui_.cancel, SIGNAL(clicked()), this, SLOT(handleCancel())); connect(ui_.apply, SIGNAL(clicked()), this, SLOT(handleApply())); connect(ui_.pathButton, SIGNAL(clicked()), this, SLOT(handlePathButton())); - connect(ui_.personalPathButton, SIGNAL(clicked()), this, SLOT(handlePersonalPathButton())); setFromSettings(); } void QtSpellCheckerWindow::setFromSettings() { ui_.spellChecker->setChecked(settings_->getSetting(SettingConstants::SPELL_CHECKER)); - ui_.personalPathContent->setText(P2QSTRING(settings_->getSetting(SettingConstants::PERSONAL_DICT_PATH))); ui_.pathContent->setText(P2QSTRING(settings_->getSetting(SettingConstants::DICT_PATH))); ui_.currentLanguageValue->setText(P2QSTRING(settings_->getSetting(SettingConstants::DICT_FILE))); std::string currentPath = settings_->getSetting(SettingConstants::DICT_PATH); @@ -48,12 +46,9 @@ void QtSpellCheckerWindow::handleChecker(bool state) { void QtSpellCheckerWindow::setEnabled(bool state) { ui_.pathContent->setEnabled(state); - ui_.personalPathContent->setEnabled(state); ui_.languageView->setEnabled(state); ui_.pathButton->setEnabled(state); - ui_.personalPathButton->setEnabled(state); ui_.pathLabel->setEnabled(state); - ui_.personalDictionaryLabel->setEnabled(state); ui_.currentLanguage->setEnabled(state); ui_.currentLanguageValue->setEnabled(state); ui_.language->setEnabled(state); @@ -65,7 +60,6 @@ void QtSpellCheckerWindow::handleApply() { if (!selectedLanguage.empty()) { settings_->storeSetting(SettingConstants::DICT_FILE, Q2PSTRING((selectedLanguage.first())->text())); } - emit settingsChanged(); this->done(0); } @@ -76,7 +70,7 @@ void QtSpellCheckerWindow::handleCancel() { void QtSpellCheckerWindow::handlePathButton() { std::string currentPath = settings_->getSetting(SettingConstants::DICT_PATH); QString dirpath = QFileDialog::getExistingDirectory(this, tr("Dictionary Path"), P2QSTRING(currentPath)); - if (dirpath.compare(P2QSTRING(currentPath))) { + if (dirpath != P2QSTRING(currentPath)) { ui_.languageView->clear(); settings_->storeSetting(SettingConstants::DICT_FILE, ""); ui_.currentLanguageValue->setText(" "); |