Commit 393d47be authored by Danny Hindson's avatar Danny Hindson
Browse files

Incorporate review comments

Main change is to add an overload of registerFeatureUsage that accepts a
simple string in addition to the existing method that takes a vector of strings

Update some further calls to registerFeatureUsage that had appeared in master
Also change trimming behaviour so trimming of feature names is done on copy
rather than in place
parent d869dc37
......@@ -1756,12 +1756,10 @@ void Algorithm::reportCompleted(const double &duration,
*/
void Algorithm::registerFeatureUsage() const {
if (UsageService::Instance().isEnabled()) {
std::vector<std::string> featureName;
std::ostringstream oss;
oss << this->name() << ".v" << this->version();
featureName.push_back(oss.str());
UsageService::Instance().registerFeatureUsage(FeatureType::Algorithm,
featureName, isChild());
oss.str(), isChild());
}
}
......
......@@ -41,19 +41,18 @@ enum class FeatureType { Algorithm, Interface, Feature };
class FeatureUsage {
public:
/// Constructor
FeatureUsage(const FeatureType &type, const std::vector<std::string> &name,
FeatureUsage(const FeatureType &type, const std::string &name,
const bool internal);
bool operator<(const FeatureUsage &r) const;
::Json::Value asJson() const;
FeatureType type;
std::vector<std::string> name;
std::string name;
bool internal;
protected:
std::string featureTypeToString() const;
std::string nameToString() const;
};
class MANTID_KERNEL_DLL UsageServiceImpl {
......@@ -66,12 +65,21 @@ public:
void setInterval(const uint32_t seconds = 60);
/// Registers the Startup of Mantid
void registerStartup();
/// Registers the use of a feature in mantid. Just support a version using
/// vector for now rather than additionally providing a version that takes a
/// single string. This will prevent any old style usage with name="a->b"
/// sneaking through
/// registerFeatureUsage registers the use of a feature in mantid.
/// Provide three overloads:
/// Version that takes vector of strings if want to register
/// usage of a particular class/method combination
void registerFeatureUsage(const FeatureType &type,
const std::vector<std::string> &name,
std::vector<std::string> name, const bool internal);
/// Version that takes a string if just registering usage of a class
void registerFeatureUsage(const FeatureType &type, std::string name,
const bool internal);
/// Version that accepts an initializer list. This is required because
/// {"abc","def"} is both a valid constructor for std::string and an
/// initializer list so without this it's not clear which overload is being
/// called
void registerFeatureUsage(const FeatureType &type,
std::initializer_list<const char *> name,
const bool internal);
/// Returns true if usage reporting is enabled
......
......@@ -16,6 +16,10 @@
#include <Poco/ActiveResult.h>
#include <Poco/String.h>
#include <algorithm>
#include <boost/algorithm/string/join.hpp>
#include <boost/algorithm/string/trim.hpp>
#include <boost/bind.hpp>
#include <json/json.h>
......@@ -32,8 +36,7 @@ Kernel::Logger g_log("UsageServiceImpl");
//----------------------------------------------------------------------------------------------
/** FeatureUsage
*/
FeatureUsage::FeatureUsage(const FeatureType &type,
const std::vector<std::string> &name,
FeatureUsage::FeatureUsage(const FeatureType &type, const std::string &name,
const bool internal)
: type(type), name(name), internal(internal) {}
......@@ -71,26 +74,11 @@ std::string FeatureUsage::featureTypeToString() const {
return "Unknown";
}
/// Convert the stored vector of strings to a string eg Class1->Method1
std::string FeatureUsage::nameToString() const {
std::string result = "";
for (std::string i : name) {
result = result + Poco::trim(i) + SEPARATOR;
}
size_t returnLength = result.length() - std::string(SEPARATOR).length();
if (returnLength > 0) {
result = result.substr(0, returnLength);
}
return result;
}
::Json::Value FeatureUsage::asJson() const {
::Json::Value retVal;
retVal["type"] = featureTypeToString();
retVal["name"] = nameToString();
retVal["name"] = name;
retVal["internal"] = internal;
return retVal;
......@@ -141,15 +129,41 @@ void UsageServiceImpl::registerStartup() {
/** registerFeatureUsage
*/
void UsageServiceImpl::registerFeatureUsage(
const FeatureType &type, const std::vector<std::string> &name,
const bool internal) {
void UsageServiceImpl::registerFeatureUsage(const FeatureType &type,
std::vector<std::string> name,
const bool internal) {
if (isEnabled()) {
std::lock_guard<std::mutex> _lock(m_mutex);
using boost::algorithm::trim;
std::for_each(std::begin(name), std::end(name),
boost::bind(&trim<std::string>, _1, std::locale()));
using boost::algorithm::join;
std::string strName = join(name, SEPARATOR);
m_FeatureQueue.push(FeatureUsage(type, strName, internal));
}
}
void UsageServiceImpl::registerFeatureUsage(const FeatureType &type,
std::string name,
const bool internal) {
if (isEnabled()) {
std::lock_guard<std::mutex> _lock(m_mutex);
boost::algorithm::trim(name);
m_FeatureQueue.push(FeatureUsage(type, name, internal));
}
}
void UsageServiceImpl::registerFeatureUsage(
const FeatureType &type, std::initializer_list<const char *> name,
const bool internal) {
registerFeatureUsage(type, std::vector<std::string>(name.begin(), name.end()),
internal);
}
bool UsageServiceImpl::isEnabled() const { return m_isEnabled; }
void UsageServiceImpl::setEnabled(const bool enabled) {
......
......@@ -87,15 +87,15 @@ public:
usageService.setInterval(10000);
usageService.setEnabled(true);
usageService.registerFeatureUsage(Mantid::Kernel::FeatureType::Algorithm,
{"MyAlg.v1"}, true);
"MyAlg.v1", true);
usageService.registerFeatureUsage(Mantid::Kernel::FeatureType::Interface,
{"MyAlg.v1"}, true);
/*for (size_t i = 0; i < 10000; i++) {
"MyAlg.v1", true);
for (size_t i = 0; i < 10000; i++) {
usageService.registerFeatureUsage(Mantid::Kernel::FeatureType::Algorithm,
{"MyLoopAlg.v1"}, false);
}*/
"MyLoopAlg.v1", false);
}
usageService.registerFeatureUsage(Mantid::Kernel::FeatureType::Algorithm,
{"MyLoopAlg.v1"}, true);
"MyLoopAlg.v1", true);
usageService.registerFeatureUsage(Mantid::Kernel::FeatureType::Algorithm,
{"MyAlg.v1", "Method1"}, true);
......
......@@ -47,8 +47,12 @@ void registerFeatureUsage(UsageServiceImpl &self,
const Mantid::Kernel::FeatureType &type,
const object &paths, const bool internal) {
ExtractStdString singleString(paths);
self.registerFeatureUsage(type, PySequenceToVector<std::string>(paths)(),
internal);
if (singleString.check()) {
self.registerFeatureUsage(type, singleString(), internal);
} else {
self.registerFeatureUsage(type, PySequenceToVector<std::string>(paths)(),
internal);
}
}
} // namespace
......
......@@ -43,9 +43,10 @@ class UsageServiceTest(unittest.TestCase):
def test_registerFeatureUsage(self):
UsageService.setEnabled(False)
#this will do nothing as it is disabled
UsageService.registerFeatureUsage(FeatureType.Algorithm, ["testv1"], True)
UsageService.registerFeatureUsage(FeatureType.Algorithm, "testv1", True)
UsageService.setEnabled(True)
UsageService.registerFeatureUsage(FeatureType.Algorithm, ["testv1"], True)
UsageService.registerFeatureUsage(FeatureType.Algorithm, "testv1", True)
UsageService.registerFeatureUsage(FeatureType.Algorithm, ["testv1","level2feature"], True)
def test_Flush(self):
......
......@@ -41,7 +41,7 @@ InstrumentWindow::InstrumentWindow(const QString &wsName, const QString &label,
connect(m_instrumentWidget, SIGNAL(clearingHandle()), this,
SLOT(closeSafely()));
Mantid::Kernel::UsageService::Instance().registerFeatureUsage(
Mantid::Kernel::FeatureType::Interface, {"InstrumentView"}, false);
Mantid::Kernel::FeatureType::Interface, "InstrumentView", false);
}
InstrumentWindow::~InstrumentWindow() {}
......
......@@ -21,7 +21,7 @@ ProjectRecoveryView::ProjectRecoveryView(QWidget *parent,
// Set the table information
addDataToTable();
Mantid::Kernel::UsageService::Instance().registerFeatureUsage(
Mantid::Kernel::FeatureType::Interface, {"ProjectRecoveryWindow"}, true);
Mantid::Kernel::FeatureType::Interface, "ProjectRecoveryWindow", true);
}
void ProjectRecoveryView::addDataToTable() {
......
......@@ -22,7 +22,7 @@ RecoveryFailureView::RecoveryFailureView(QWidget *parent,
// Set the table information
addDataToTable();
Mantid::Kernel::UsageService::Instance().registerFeatureUsage(
Mantid::Kernel::FeatureType::Interface, {"ProjectRecoveryFailureWindow"},
Mantid::Kernel::FeatureType::Interface, "ProjectRecoveryFailureWindow",
true);
}
......
......@@ -353,7 +353,7 @@ ViewBase *MdViewerWidget::createAndSetMainViewWidget(QWidget *container,
using Mantid::Kernel::UsageService;
UsageService::Instance().registerFeatureUsage(
Mantid::Kernel::FeatureType::Interface, {featureName}, false);
Mantid::Kernel::FeatureType::Interface, featureName, false);
return view;
}
......
......@@ -194,7 +194,8 @@ void QtEventView::enableSliceTypeSelection() {
void QtEventView::onToggleUniform(bool isChecked) {
if (isChecked) {
Mantid::Kernel::UsageService::Instance().registerFeatureUsage(
"Feature", "ISIS Reflectometry->EventTab->EnableUniformSlicing", false);
Mantid::Kernel::FeatureType::Feature,
{"ISIS Reflectometry", "EventTab", "EnableUniformSlicing"}, false);
m_notifyee->notifySliceTypeChanged(SliceType::Uniform);
}
}
......@@ -202,8 +203,8 @@ void QtEventView::onToggleUniform(bool isChecked) {
void QtEventView::onToggleUniformEven(bool isChecked) {
if (isChecked) {
Mantid::Kernel::UsageService::Instance().registerFeatureUsage(
"Feature", "ISIS Reflectometry->EventTab->EnableUniformEvenSlicing",
false);
Mantid::Kernel::FeatureType::Feature,
{"ISIS Reflectometry", "EventTab", "EnableUniformEvenSlicing"}, false);
m_notifyee->notifySliceTypeChanged(SliceType::UniformEven);
}
}
......@@ -211,7 +212,8 @@ void QtEventView::onToggleUniformEven(bool isChecked) {
void QtEventView::onToggleCustom(bool isChecked) {
if (isChecked) {
Mantid::Kernel::UsageService::Instance().registerFeatureUsage(
"Feature", "ISIS Reflectometry->EventTab->EnableCustomSlicing", false);
Mantid::Kernel::FeatureType::Feature,
{"ISIS Reflectometry", "EventTab", "EnableCustomSlicing"}, false);
m_notifyee->notifySliceTypeChanged(SliceType::Custom);
}
}
......@@ -219,8 +221,8 @@ void QtEventView::onToggleCustom(bool isChecked) {
void QtEventView::onToggleLogValue(bool isChecked) {
if (isChecked) {
Mantid::Kernel::UsageService::Instance().registerFeatureUsage(
"Feature", "ISIS Reflectometry->EventTab->EnableLogValueSlicing",
false);
Mantid::Kernel::FeatureType::Feature,
{"ISIS Reflectometry", "EventTab", "EnableLogValueSlicing"}, false);
m_notifyee->notifySliceTypeChanged(SliceType::LogValue);
}
}
......@@ -228,7 +230,8 @@ void QtEventView::onToggleLogValue(bool isChecked) {
void QtEventView::onToggleDisabledSlicing(bool isChecked) {
if (isChecked) {
Mantid::Kernel::UsageService::Instance().registerFeatureUsage(
"Feature", "ISIS Reflectometry->EventTab->DisableSlicing", false);
Mantid::Kernel::FeatureType::Feature,
{"ISIS Reflectometry", "EventTab", "DisableSlicing"}, false);
m_notifyee->notifySliceTypeChanged(SliceType::None);
}
}
......
......@@ -54,7 +54,8 @@ QtExperimentView::QtExperimentView(
void QtExperimentView::onRemovePerThetaDefaultsRequested() {
Mantid::Kernel::UsageService::Instance().registerFeatureUsage(
"Feature", "ISIS Reflectometry->ExperimentTab->RemovePerThetaDefaultsRow",
Mantid::Kernel::FeatureType::Feature,
{"ISIS Reflectometry", "ExperimentTab", "RemovePerThetaDefaultsRow"},
false);
auto index = m_ui.optionsTable->currentIndex();
if (index.isValid()) {
......@@ -288,7 +289,8 @@ void QtExperimentView::disconnectExperimentSettingsWidgets() {
void QtExperimentView::onRestoreDefaultsRequested() {
Mantid::Kernel::UsageService::Instance().registerFeatureUsage(
"Feature", "ISIS Reflectometry->ExperimentTab->RestoreDefaults", false);
Mantid::Kernel::FeatureType::Feature,
{"ISIS Reflectometry", "ExperimentTab", "RestoreDefaults"}, false);
m_notifyee->notifyRestoreDefaultsRequested();
}
......@@ -449,8 +451,8 @@ void QtExperimentView::onPerAngleDefaultsChanged(int row, int column) {
/** Add a new row to the transmission runs table **/
void QtExperimentView::onNewPerThetaDefaultsRowRequested() {
Mantid::Kernel::UsageService::Instance().registerFeatureUsage(
"Feature", "ISIS Reflectometry->ExperimentTab->AddPerThetaDefaultsRow",
false);
Mantid::Kernel::FeatureType::Feature,
{"ISIS Reflectometry", "ExperimentTab", "AddPerThetaDefaultsRow"}, false);
m_notifyee->notifyNewPerAngleDefaultsRequested();
}
......
......@@ -112,7 +112,8 @@ void QtInstrumentView::onSettingsChanged() {
void QtInstrumentView::onRestoreDefaultsRequested() {
Mantid::Kernel::UsageService::Instance().registerFeatureUsage(
"Feature", "ISIS Reflectometry->InstrumentTab->RestoreDefaults", false);
Mantid::Kernel::FeatureType::Feature,
{"ISIS Reflectometry", "InstrumentTab", "RestoreDefaults"}, false);
m_notifyee->notifyRestoreDefaultsRequested();
}
......
......@@ -109,37 +109,43 @@ void QtMainWindowView::initLayout() {
void QtMainWindowView::onTabCloseRequested(int tabIndex) {
Mantid::Kernel::UsageService::Instance().registerFeatureUsage(
"Feature", "ISIS Reflectometry->MainWindow->CloseBatch", false);
Mantid::Kernel::FeatureType::Feature,
{"ISIS Reflectometry", "MainWindow", "CloseBatch"}, false);
m_notifyee->notifyCloseBatchRequested(tabIndex);
}
void QtMainWindowView::onNewBatchRequested(bool) {
Mantid::Kernel::UsageService::Instance().registerFeatureUsage(
"Feature", "ISIS Reflectometry->MainWindow->NewBatch", false);
Mantid::Kernel::FeatureType::Feature,
{"ISIS Reflectometry", "MainWindow", "NewBatch"}, false);
m_notifyee->notifyNewBatchRequested();
}
void QtMainWindowView::onLoadBatchRequested(bool) {
Mantid::Kernel::UsageService::Instance().registerFeatureUsage(
"Feature", "ISIS Reflectometry->MainWindow->LoadBatch", false);
Mantid::Kernel::FeatureType::Feature,
{"ISIS Reflectometry", "MainWindow", "LoadBatch"}, false);
m_notifyee->notifyLoadBatchRequested(m_ui.mainTabs->currentIndex());
}
void QtMainWindowView::onSaveBatchRequested(bool) {
Mantid::Kernel::UsageService::Instance().registerFeatureUsage(
"Feature", "ISIS Reflectometry->MainWindow->SaveBatch", false);
Mantid::Kernel::FeatureType::Feature,
{"ISIS Reflectometry", "MainWindow", "SaveBatch"}, false);
m_notifyee->notifySaveBatchRequested(m_ui.mainTabs->currentIndex());
}
void QtMainWindowView::onShowOptionsRequested(bool) {
Mantid::Kernel::UsageService::Instance().registerFeatureUsage(
"Feature", "ISIS Reflectometry->MainWindow->ShowOptions", false);
Mantid::Kernel::FeatureType::Feature,
{"ISIS Reflectometry", "MainWindow", "ShowOptions"}, false);
m_notifyee->notifyShowOptionsRequested();
}
void QtMainWindowView::onShowSlitCalculatorRequested(bool) {
Mantid::Kernel::UsageService::Instance().registerFeatureUsage(
"Feature", "ISIS Reflectometry->MainWindow->ShowSlitCalculator", false);
Mantid::Kernel::FeatureType::Feature,
{"ISIS Reflectometry", "MainWindow", "ShowSlitCalculator"}, false);
m_notifyee->notifyShowSlitCalculatorRequested();
}
......@@ -149,7 +155,8 @@ void QtMainWindowView::subscribe(MainWindowSubscriber *notifyee) {
void QtMainWindowView::helpPressed() {
Mantid::Kernel::UsageService::Instance().registerFeatureUsage(
"Feature", "ISIS Reflectometry->MainWindow->ShowHelp", false);
Mantid::Kernel::FeatureType::Feature,
{"ISIS Reflectometry", "MainWindow", "ShowHelp"}, false);
m_notifyee->notifyHelpPressed();
}
......
......@@ -238,7 +238,8 @@ This slot notifies the presenter that the "search" button has been pressed
*/
void QtRunsView::on_actionSearch_triggered() {
Mantid::Kernel::UsageService::Instance().registerFeatureUsage(
"Feature", "ISIS Reflectometry->RunsTab->Search", false);
Mantid::Kernel::FeatureType::Feature,
{"ISIS Reflectometry", "RunsTab", "Search"}, false);
m_notifyee->notifySearch();
}
......@@ -248,7 +249,8 @@ This slot conducts a search operation before notifying the presenter that the
*/
void QtRunsView::on_actionAutoreduce_triggered() {
Mantid::Kernel::UsageService::Instance().registerFeatureUsage(
"Feature", "ISIS Reflectometry->RunsTab->StartAutoprocessing", false);
Mantid::Kernel::FeatureType::Feature,
{"ISIS Reflectometry", "RunsTab", "StartAutoprocessing"}, false);
m_notifyee->notifyResumeAutoreductionRequested();
}
......@@ -258,7 +260,8 @@ This slot conducts a search operation before notifying the presenter that the
*/
void QtRunsView::on_actionAutoreducePause_triggered() {
Mantid::Kernel::UsageService::Instance().registerFeatureUsage(
"Feature", "ISIS Reflectometry->RunsTab->PauseAutoprocessing", false);
Mantid::Kernel::FeatureType::Feature,
{"ISIS Reflectometry", "RunsTab", "PauseAutoprocessing"}, false);
m_notifyee->notifyPauseAutoreductionRequested();
}
......@@ -267,7 +270,8 @@ This slot notifies the presenter that the "transfer" button has been pressed
*/
void QtRunsView::on_actionTransfer_triggered() {
Mantid::Kernel::UsageService::Instance().registerFeatureUsage(
"Feature", "ISIS Reflectometry->RunsTab->Transfer", false);
Mantid::Kernel::FeatureType::Feature,
{"ISIS Reflectometry", "RunsTab", "Transfer"}, false);
m_notifyee->notifyTransfer();
}
......@@ -277,7 +281,8 @@ This slot is triggered when the user right clicks on the search results table
*/
void QtRunsView::onShowSearchContextMenuRequested(const QPoint &pos) {
Mantid::Kernel::UsageService::Instance().registerFeatureUsage(
"Feature", "ISIS Reflectometry->RunsTab->ShowSearchContextMenu", false);
Mantid::Kernel::FeatureType::Feature,
{"ISIS Reflectometry", "RunsTab", "ShowSearchContextMenu"}, false);
if (!m_ui.tableSearchResults->indexAt(pos).isValid())
return;
......@@ -294,7 +299,8 @@ void QtRunsView::onShowSearchContextMenuRequested(const QPoint &pos) {
void QtRunsView::onInstrumentChanged(int index) {
UNUSED_ARG(index);
Mantid::Kernel::UsageService::Instance().registerFeatureUsage(
"Feature", "ISIS Reflectometry->RunsTab->InstrumentChanged", false);
Mantid::Kernel::FeatureType::Feature,
{"ISIS Reflectometry", "RunsTab", "InstrumentChanged"}, false);
m_ui.textSearch->clear();
m_notifyee->notifyChangeInstrumentRequested();
}
......@@ -368,13 +374,15 @@ int QtRunsView::getLiveDataUpdateInterval() const {
void QtRunsView::on_buttonMonitor_clicked() {
Mantid::Kernel::UsageService::Instance().registerFeatureUsage(
"Feature", "ISIS Reflectometry->RunsTab->StartMonitor", false);
Mantid::Kernel::FeatureType::Feature,
{"ISIS Reflectometry", "RunsTab", "StartMonitor"}, false);
startMonitor();
}
void QtRunsView::on_buttonStopMonitor_clicked() {
Mantid::Kernel::UsageService::Instance().registerFeatureUsage(
"Feature", "ISIS Reflectometry->RunsTab->StopMonitor", false);
Mantid::Kernel::FeatureType::Feature,
{"ISIS Reflectometry", "RunsTab", "StopMonitor"}, false);
stopMonitor();
}
......
......@@ -87,7 +87,8 @@ void QtRunsTableView::onFilterChanged(QString const &filter) {
void QtRunsTableView::onInstrumentChanged(int index) {
UNUSED_ARG(index);
Mantid::Kernel::UsageService::Instance().registerFeatureUsage(
"Feature", "ISIS Reflectometry->RunsTable->InstrumentChanged", false);
Mantid::Kernel::FeatureType::Feature,
{"ISIS Reflectometry", "RunsTable", "InstrumentChanged"}, false);
m_notifyee->notifyChangeInstrumentRequested();
}
......@@ -243,13 +244,15 @@ void QtRunsTableView::onCollapseAllGroupsPressed(bool) {
void QtRunsTableView::onProcessPressed(bool) {
Mantid::Kernel::UsageService::Instance().registerFeatureUsage(
"Feature", "ISIS Reflectometry->RunsTable->StartProcessing", false);
Mantid::Kernel::FeatureType::Feature,
{"ISIS Reflectometry", "RunsTable", "StartProcessing"}, false);
m_notifyee->notifyResumeReductionRequested();
}
void QtRunsTableView::onPausePressed(bool) {
Mantid::Kernel::UsageService::Instance().registerFeatureUsage(
"Feature", "ISIS Reflectometry->RunsTable->PauseProcessing", false);
Mantid::Kernel::FeatureType::Feature,
{"ISIS Reflectometry", "RunsTable", "PauseProcessing"}, false);
m_notifyee->notifyPauseReductionRequested();
}
......@@ -283,13 +286,15 @@ void QtRunsTableView::onPastePressed(bool) {
void QtRunsTableView::onPlotSelectedPressed(bool) {
Mantid::Kernel::UsageService::Instance().registerFeatureUsage(
"Feature", "ISIS Reflectometry->RunsTable->PlotRows", false);
Mantid::Kernel::FeatureType::Feature,
{"ISIS Reflectometry", "RunsTable", "PlotRows"}, false);
m_notifyee->notifyPlotSelectedPressed();
}
void QtRunsTableView::onPlotSelectedStitchedOutputPressed(bool) {
Mantid::Kernel::UsageService::Instance().registerFeatureUsage(
"Feature", "ISIS Reflectometry->RunsTable->PlotGroups", false);
Mantid::Kernel::FeatureType::Feature,
{"ISIS Reflectometry", "RunsTable", "PlotGroups"}, false);
m_notifyee->notifyPlotSelectedStitchedOutputPressed();
}
......
......@@ -62,18 +62,21 @@ void QtSaveView::browseToSaveDirectory() {
void QtSaveView::onSavePathChanged() {
Mantid::Kernel::UsageService::Instance().registerFeatureUsage(
"Feature", "ISIS Reflectometry->SaveTab->SavePathChanged", false);
Mantid::Kernel::FeatureType::Feature,
{"ISIS Reflectometry", "SaveTab", "SavePathChanged"}, false);
m_notifyee->notifySavePathChanged();
}
void QtSaveView::onAutosaveChanged(int state) {
if (state == Qt::CheckState::Checked) {
Mantid::Kernel::UsageService::Instance().registerFeatureUsage(
"Feature", "ISIS Reflectometry->SaveTab->EnableAutosave", false);
Mantid::Kernel::FeatureType::Feature,
{"ISIS Reflectometry", "SaveTab", "EnableAutosave"}, false);
m_notifyee->notifyAutosaveEnabled();
} else {
Mantid::Kernel::UsageService::Instance().registerFeatureUsage(
"Feature", "ISIS Reflectometry->SaveTab->DisableAutosave", false);
Mantid::Kernel::FeatureType::Feature,
{"ISIS Reflectometry", "SaveTab", "DisableAutosave"}, false);
m_notifyee->notifyAutosaveDisabled();
}
}
......@@ -228,7 +231,8 @@ void QtSaveView::setParametersList(const std::vector<std::string> &logs) const {
*/
void QtSaveView::populateListOfWorkspaces() const {
Mantid::Kernel::UsageService::Instance().registerFeatureUsage(
"Feature", "ISIS Reflectometry->SaveTab->PopulateWorkspaces", false);
Mantid::Kernel::FeatureType::Feature,
{"ISIS Reflectometry", "SaveTab", "PopulateWorkspaces"}, false);
m_notifyee->notifyPopulateWorkspaceList();
}
......@@ -242,7 +246,8 @@ void QtSaveView::filterWorkspaceList() const {
*/
void QtSaveView::requestWorkspaceParams() const {
Mantid::Kernel::UsageService::Instance().registerFeatureUsage(
"Feature", "ISIS Reflectometry->SaveTab->PopulateParameters", false);
Mantid::Kernel::FeatureType::Feature,
{"ISIS Reflectometry", "SaveTab", "PopulateParameters"}, false);
m_notifyee->notifyPopulateParametersList();
}
......@@ -250,7 +255,8 @@ void QtSaveView::requestWorkspaceParams() const {
*/
void QtSaveView::saveWorkspaces() const {
Mantid::Kernel::UsageService::Instance().registerFeatureUsage(
"Feature", "ISIS Reflectometry->SaveTab->SaveWorkspaces", false);
Mantid::Kernel::FeatureType::Feature,
{"ISIS Reflectometry", "SaveTab", "SaveWorkspaces"}, false);
m_notifyee->notifySaveSelectedWorkspaces();
}
......