EditorManager: Clean up public interface

By moving internally used methods to EditorManagerPrivate

Change-Id: I046ce92b8baffe4bcd2ea0529557a3ae69f74338
Reviewed-by: hjk <hjk121@nokiamail.com>
This commit is contained in:
Eike Ziller
2014-07-18 17:11:57 +02:00
committed by hjk
parent 3d4caa3908
commit ff60b856ec
10 changed files with 1657 additions and 1612 deletions

View File

@@ -33,7 +33,7 @@
#include "infobar.h"
#include "patchtool.h"
#include "vcsmanager.h"
#include "editormanager/editormanager.h"
#include "editormanager/editormanager_p.h"
#include <utils/checkablemessagebox.h>
#include <utils/consoleprocess.h>
@@ -113,7 +113,7 @@ QWidget *GeneralSettings::widget()
fillLanguageBox();
m_page->colorButton->setColor(StyleHelper::requestedBaseColor());
m_page->reloadBehavior->setCurrentIndex(EditorManager::reloadSetting());
m_page->reloadBehavior->setCurrentIndex(EditorManagerPrivate::reloadSetting());
if (HostOsInfo::isAnyUnixHost()) {
const QStringList availableTerminals = ConsoleProcess::availableTerminalEmulators();
const QString currentTerminal = ConsoleProcess::terminalEmulator(ICore::settings(), false);
@@ -141,8 +141,8 @@ QWidget *GeneralSettings::widget()
m_page->patchChooser->setExpectedKind(PathChooser::ExistingCommand);
m_page->patchChooser->setHistoryCompleter(QLatin1String("General.PatchCommand.History"));
m_page->patchChooser->setPath(PatchTool::patchCommand());
m_page->autoSaveCheckBox->setChecked(EditorManager::autoSaveEnabled());
m_page->autoSaveInterval->setValue(EditorManager::autoSaveInterval());
m_page->autoSaveCheckBox->setChecked(EditorManagerPrivate::autoSaveEnabled());
m_page->autoSaveInterval->setValue(EditorManagerPrivate::autoSaveInterval());
m_page->resetWarningsButton->setEnabled(InfoBar::anyGloballySuppressed()
|| CheckableMessageBox::hasSuppressedQuestions(ICore::settings()));
@@ -175,7 +175,7 @@ void GeneralSettings::apply()
setLanguage(m_page->languageBox->itemData(currentIndex, Qt::UserRole).toString());
// Apply the new base color if accepted
StyleHelper::setBaseColor(m_page->colorButton->color());
EditorManager::setReloadSetting(IDocument::ReloadSetting(m_page->reloadBehavior->currentIndex()));
EditorManagerPrivate::setReloadSetting(IDocument::ReloadSetting(m_page->reloadBehavior->currentIndex()));
if (HostOsInfo::isAnyUnixHost()) {
ConsoleProcess::setTerminalEmulator(ICore::settings(),
m_page->terminalComboBox->lineEdit()->text());
@@ -185,8 +185,8 @@ void GeneralSettings::apply()
}
}
PatchTool::setPatchCommand(m_page->patchChooser->path());
EditorManager::setAutoSaveEnabled(m_page->autoSaveCheckBox->isChecked());
EditorManager::setAutoSaveInterval(m_page->autoSaveInterval->value());
EditorManagerPrivate::setAutoSaveEnabled(m_page->autoSaveCheckBox->isChecked());
EditorManagerPrivate::setAutoSaveInterval(m_page->autoSaveInterval->value());
}
void GeneralSettings::finish()