summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swift/QtUI/QtSpellCheckerWindow.cpp')
-rw-r--r--Swift/QtUI/QtSpellCheckerWindow.cpp8
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(" ");