summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTobias Markmann <tm@ayena.de>2016-11-10 11:22:12 (GMT)
committerKevin Smith <kevin.smith@isode.com>2016-11-10 12:37:15 (GMT)
commit94ec9c25311f8d54519f045205d58526d885412a (patch)
tree423bf068441e7314e8736622f53dc2ce42f2244c /Swift/QtUI/QtTextEdit.cpp
parentd2ba1ab8a36333523bf794c23226bd044e1717c2 (diff)
downloadswift-94ec9c25311f8d54519f045205d58526d885412a.zip
swift-94ec9c25311f8d54519f045205d58526d885412a.tar.bz2
Move Qt specific setting constants to QtUISettingConstants.h
Test-Information: Builds on macOS 10.12.1, ./scons test=all passes, Swift successfully logins and remembered Trellis configuration. Change-Id: Id94d6af1448d44d7d46ba2b8606f3e5ebe98be7a
Diffstat (limited to 'Swift/QtUI/QtTextEdit.cpp')
-rw-r--r--Swift/QtUI/QtTextEdit.cpp13
1 files changed, 6 insertions, 7 deletions
diff --git a/Swift/QtUI/QtTextEdit.cpp b/Swift/QtUI/QtTextEdit.cpp
index d9ee2f4..e9708bf 100644
--- a/Swift/QtUI/QtTextEdit.cpp
+++ b/Swift/QtUI/QtTextEdit.cpp
@@ -18,13 +18,12 @@
#include <Swiften/Base/Log.h>
-#include <Swift/Controllers/SettingConstants.h>
-
#include <SwifTools/SpellChecker.h>
#include <SwifTools/SpellCheckerFactory.h>
#include <Swift/QtUI/QtSpellCheckerWindow.h>
#include <Swift/QtUI/QtSwiftUtil.h>
+#include <Swift/QtUI/QtUISettingConstants.h>
#include <Swift/QtUI/QtUtilities.h>
namespace Swift {
@@ -215,18 +214,18 @@ void QtTextEdit::setUpSpellChecker() {
highlighter_ = nullptr;
delete checker_;
checker_ = nullptr;
- if (settings_->getSetting(SettingConstants::SPELL_CHECKER)) {
+ if (settings_->getSetting(QtUISettingConstants::SPELL_CHECKER)) {
checker_ = SpellCheckerFactory().createSpellChecker();
if (checker_) {
if (!checker_->isAutomaticallyDetectingLanguage()) {
- checker_->setActiveLanguage(settings_->getSetting(SettingConstants::SPELL_CHECKER_LANGUAGE));
+ checker_->setActiveLanguage(settings_->getSetting(QtUISettingConstants::SPELL_CHECKER_LANGUAGE));
}
highlighter_ = new QtSpellCheckHighlighter(document(), checker_);
}
else {
// Spellchecking is not working, as we did not get a valid checker from the factory. Disable spellchecking.
SWIFT_LOG(warning) << "Spellchecking is currently misconfigured in Swift (e.g. missing dictionary or broken dictionary file). Disable spellchecking." << std::endl;
- settings_->storeSetting(SettingConstants::SPELL_CHECKER, false);
+ settings_->storeSetting(QtUISettingConstants::SPELL_CHECKER, false);
}
}
@@ -254,8 +253,8 @@ void QtTextEdit::spellCheckerSettingsWindow() {
}
void QtTextEdit::handleSettingChanged(const std::string& settings) {
- if (settings == SettingConstants::SPELL_CHECKER.getKey() ||
- settings == SettingConstants::SPELL_CHECKER_LANGUAGE.getKey()) {
+ if (settings == QtUISettingConstants::SPELL_CHECKER.getKey() ||
+ settings == QtUISettingConstants::SPELL_CHECKER_LANGUAGE.getKey()) {
#ifdef HAVE_SPELLCHECKER
setUpSpellChecker();
if (highlighter_) {