diff --git a/qt/paraview_ext/PVPlugins/Widgets/QtWidgets/SimpleBinInputWidget.cpp b/qt/paraview_ext/PVPlugins/Widgets/QtWidgets/SimpleBinInputWidget.cpp index 52fc68982d83610e850e774cc70bfc89514000b5..b59dda6e67d5890e7328e026822baa46d399c463 100644 --- a/qt/paraview_ext/PVPlugins/Widgets/QtWidgets/SimpleBinInputWidget.cpp +++ b/qt/paraview_ext/PVPlugins/Widgets/QtWidgets/SimpleBinInputWidget.cpp @@ -41,7 +41,7 @@ Getter for the current entry. @return current entry value */ int SimpleBinInputWidget::getEntry(double, double) const { - return std::stoi(std::string(m_nBinsBox->text().toAscii())); + return std::stoi(std::string(m_nBinsBox->text().toLatin1())); } /// Destructor diff --git a/qt/paraview_ext/VatesSimpleGui/ViewWidgets/src/ColorSelectionWidget.cpp b/qt/paraview_ext/VatesSimpleGui/ViewWidgets/src/ColorSelectionWidget.cpp index 31e893f7f6df05f6e2ec1b2327027cbdd9bc9479..9723fe01b3b269fd9f804912296192bb6a6c00eb 100644 --- a/qt/paraview_ext/VatesSimpleGui/ViewWidgets/src/ColorSelectionWidget.cpp +++ b/qt/paraview_ext/VatesSimpleGui/ViewWidgets/src/ColorSelectionWidget.cpp @@ -207,7 +207,7 @@ void ColorSelectionWidget::loadPreset() { preset.setCustomizableUsePresetRange(false, false); preset.setCustomizableLoadAnnotations(false, false); preset.setCurrentPreset( - m_mdSettings.getLastSessionColorMap().toAscii().constData()); + m_mdSettings.getLastSessionColorMap().toLatin1().constData()); this->connect(&preset, SIGNAL(applyPreset(const Json::Value &)), this, SLOT(onApplyPreset(const Json::Value &))); preset.exec(); diff --git a/qt/paraview_ext/VatesSimpleGui/ViewWidgets/src/MultisliceView.cpp b/qt/paraview_ext/VatesSimpleGui/ViewWidgets/src/MultisliceView.cpp index b610173d51e7caf23c1b7a934f30a2624132e9f3..ebe24e848db63681701d0a855e6d2a91bd3228d5 100644 --- a/qt/paraview_ext/VatesSimpleGui/ViewWidgets/src/MultisliceView.cpp +++ b/qt/paraview_ext/VatesSimpleGui/ViewWidgets/src/MultisliceView.cpp @@ -294,7 +294,7 @@ void MultiSliceView::showCutInSliceViewer(int axisIndex, std::vector<double> scaling = vtkSMPropertyHelper(src2->getProxy(), - scalingProperty.toAscii().constData(), + scalingProperty.toLatin1().constData(), true).GetDoubleArray(); if (!scaling.empty()) { @@ -334,7 +334,7 @@ void MultiSliceView::showCutInSliceViewer(int axisIndex, "The slice could not be shown because of the following error:\n" + QString(e.what()); QMessageBox::warning(this, tr("MantidPlot"), - tr(message.toAscii().constData()), QMessageBox::Ok, + tr(message.toLatin1().constData()), QMessageBox::Ok, QMessageBox::Ok); delete w; } diff --git a/qt/paraview_ext/VatesSimpleGui/ViewWidgets/src/SplatterPlotView.cpp b/qt/paraview_ext/VatesSimpleGui/ViewWidgets/src/SplatterPlotView.cpp index c3880dfa57ef147b4cd216ea5f8233a02624e4a8..2c4c09db88f7b715c52c6011d026f20014d90804 100644 --- a/qt/paraview_ext/VatesSimpleGui/ViewWidgets/src/SplatterPlotView.cpp +++ b/qt/paraview_ext/VatesSimpleGui/ViewWidgets/src/SplatterPlotView.cpp @@ -269,7 +269,7 @@ void SplatterPlotView::checkPeaksCoordinates() { vtkSMPropertyHelper( this->origSrc->getProxy(), MantidQt::API::MdConstants::MantidParaViewSpecialCoordinates - .toAscii() + .toLatin1() .constData()).GetAsInt(); // Make commensurate with vtkPeakMarkerFactory peakViewCoords--; @@ -277,7 +277,7 @@ void SplatterPlotView::checkPeaksCoordinates() { foreach (pqPipelineSource *src, this->m_peaksSource) { vtkSMPropertyHelper( src->getProxy(), - MantidQt::API::MdConstants::PeakDimensions.toAscii().constData()) + MantidQt::API::MdConstants::PeakDimensions.toLatin1().constData()) .Set(peakViewCoords); src->getProxy()->UpdateVTKObjects(); } @@ -367,7 +367,7 @@ void SplatterPlotView::readAndSendCoordinates() { vtkSMPropertyHelper( this->origSrc->getProxy(), MantidQt::API::MdConstants::MantidParaViewSpecialCoordinates - .toAscii() + .toLatin1() .constData()).GetAsInt(); // Make commensurate with vtkPeakMarkerFactory peakViewCoords--; @@ -555,12 +555,12 @@ void SplatterPlotView::setPeakSourceFrame(pqPipelineSource *source) { int peakViewCoords = vtkSMPropertyHelper( this->origSrc->getProxy(), - MantidQt::API::MdConstants::MantidParaViewSpecialCoordinates.toAscii() + MantidQt::API::MdConstants::MantidParaViewSpecialCoordinates.toLatin1() .constData()).GetAsInt(); peakViewCoords--; vtkSMPropertyHelper( source->getProxy(), - MantidQt::API::MdConstants::PeakDimensions.toAscii().constData()) + MantidQt::API::MdConstants::PeakDimensions.toLatin1().constData()) .Set(peakViewCoords); } @@ -573,14 +573,14 @@ bool SplatterPlotView::checkIfPeaksWorkspaceIsAlreadyBeingTracked( std::string sourceName( vtkSMPropertyHelper( source->getProxy(), - MantidQt::API::MdConstants::WorkspaceName.toAscii().constData()) + MantidQt::API::MdConstants::WorkspaceName.toLatin1().constData()) .GetAsString()); for (QList<QPointer<pqPipelineSource>>::Iterator it = m_peaksSource.begin(); it != m_peaksSource.end(); ++it) { std::string trackedName( vtkSMPropertyHelper( (*it)->getProxy(), - MantidQt::API::MdConstants::WorkspaceName.toAscii().constData()) + MantidQt::API::MdConstants::WorkspaceName.toLatin1().constData()) .GetAsString()); if ((*it == source) || (sourceName == trackedName)) { isContained = true; @@ -615,11 +615,11 @@ void SplatterPlotView::updatePeaksFilter(pqPipelineSource *filter) { vtkSMPropertyHelper( filter->getProxy(), - MantidQt::API::MdConstants::PeaksWorkspace.toAscii().constData()) + MantidQt::API::MdConstants::PeaksWorkspace.toLatin1().constData()) .Set(0, workspaceNamesConcatentated.c_str()); vtkSMPropertyHelper( filter->getProxy(), - MantidQt::API::MdConstants::PeaksWorkspace.toAscii().constData()) + MantidQt::API::MdConstants::PeaksWorkspace.toLatin1().constData()) .Set(1, m_peaksWorkspaceNameDelimiter.c_str()); emit this->triggerAccept(); filter->updatePipeline(); diff --git a/qt/widgets/common/src/DoubleSpinBox.cpp b/qt/widgets/common/src/DoubleSpinBox.cpp index 295e076e4bd632e05e67353d6dd19b765ef08847..9ca670a83b4d82cb4fcee72886de3bdf0852007f 100644 --- a/qt/widgets/common/src/DoubleSpinBox.cpp +++ b/qt/widgets/common/src/DoubleSpinBox.cpp @@ -131,7 +131,7 @@ void DoubleSpinBox::interpretText(bool notify) { // parser.addGSLConstants(); // try // { - // parser.SetExpr(s.toAscii().constData()); + // parser.SetExpr(s.toLatin1().constData()); // value = parser.Eval(); // } catch (mu::ParserError &e) // { diff --git a/qt/widgets/common/src/MantidWSIndexDialog.cpp b/qt/widgets/common/src/MantidWSIndexDialog.cpp index b403700ab9bbd89e6d3240b62be9b10c987b9bf3..20d44498ad0c95770f2cd3bace42350cdd5b225a 100644 --- a/qt/widgets/common/src/MantidWSIndexDialog.cpp +++ b/qt/widgets/common/src/MantidWSIndexDialog.cpp @@ -457,7 +457,7 @@ void MantidWSIndexWidget::initWorkspaceBox() { m_wsBox = new QVBoxLayout; const QString wsIndices = m_wsIndexIntervals.toQString(); const QString label = "Enter Workspace Indices: " + wsIndices; - m_wsMessage = new QLabel(tr(label.toAscii().constData())); + m_wsMessage = new QLabel(tr(label.toLatin1().constData())); m_wsField = new QLineEditWithErrorMark(); m_wsField->lineEdit()->setValidator( @@ -481,7 +481,7 @@ void MantidWSIndexWidget::initSpectraBox() { m_spectraBox = new QVBoxLayout; const QString spectraNumbers = m_spectraNumIntervals.toQString(); const QString label = "Enter Spectra Numbers: " + spectraNumbers; - m_spectraMessage = new QLabel(tr(label.toAscii().constData())); + m_spectraMessage = new QLabel(tr(label.toLatin1().constData())); m_spectraField = new QLineEditWithErrorMark(); m_orMessage = new QLabel(tr("<br>Or")); diff --git a/qt/widgets/common/src/PythonRunner.cpp b/qt/widgets/common/src/PythonRunner.cpp index 624bbb44c8322004160d2a79fbc516cfcd3a3ab7..ac4d8218c8707a7355fbed8eb40f03d414932401 100644 --- a/qt/widgets/common/src/PythonRunner.cpp +++ b/qt/widgets/common/src/PythonRunner.cpp @@ -26,7 +26,7 @@ QString PythonRunner::runPythonCode(const QString &code, bool no_output) { using Mantid::Kernel::Logger; if (g_log.is(Logger::Priority::PRIO_DEBUG)) - g_log.debug() << "Running Python code:\n" << code.toAscii().data() << "\n"; + g_log.debug() << "Running Python code:\n" << code.toLatin1().data() << "\n"; if (no_output) { emit runAsPythonScript(code, true); @@ -64,7 +64,7 @@ QString PythonRunner::runPythonCode(const QString &code, bool no_output) { // with clang if (g_log.is(Logger::Priority::PRIO_DEBUG)) g_log.debug() << "Raw output from execution:\n" - << tmpstring.toAscii().data() << "\n"; + << tmpstring.toLatin1().data() << "\n"; return tmpstring; } /** This Python helper function converts a list of strings into one diff --git a/qt/widgets/common/src/ScriptEditor.cpp b/qt/widgets/common/src/ScriptEditor.cpp index 5accd2bc719e01fdaf2c6cc558cd7e6dbb6327da..06c62924ff90183cb15c716126294513ea2a98d2 100644 --- a/qt/widgets/common/src/ScriptEditor.cpp +++ b/qt/widgets/common/src/ScriptEditor.cpp @@ -294,7 +294,7 @@ void ScriptEditor::saveScript(const QString &filename) { if (!file.open(QIODevice::WriteOnly)) { QString msg = QString("Could not open file \"%1\" for writing.").arg(filename); - throw std::runtime_error(msg.toAscii().data()); + throw std::runtime_error(msg.toLatin1().data()); } m_filename = filename; diff --git a/qt/widgets/instrumentview/src/InstrumentWidget.cpp b/qt/widgets/instrumentview/src/InstrumentWidget.cpp index 887cbc21aa4ae263a12bc72f0fbe6147f63b9abe..a7f95ce00e731a280b2fc77054eeca320ca5ef9e 100644 --- a/qt/widgets/instrumentview/src/InstrumentWidget.cpp +++ b/qt/widgets/instrumentview/src/InstrumentWidget.cpp @@ -669,7 +669,7 @@ void InstrumentWidget::saveImage(QString filename) { filename += defaultExt; ext = QFileInfo(filename).completeSuffix(); } else { - if (!formats.contains(ext.toAscii())) { + if (!formats.contains(ext.toLatin1())) { QString msg("Unsupported file extension. Choose one of the following: "); QListIterator<QByteArray> itr(formats); while (itr.hasNext()) {