From 14e4b2894672f92539b15bf63b5093178c83f751 Mon Sep 17 00:00:00 2001 From: Suter Andreas Date: Sun, 15 Nov 2015 11:41:56 +0100 Subject: [PATCH] removed unnecessary check form musredit_qt5 msr2data interface. --- ChangeLog | 1 + src/musredit_qt5/PTextEdit.cpp | 42 ---------------------------------- src/musredit_qt5/PTextEdit.h | 1 - 3 files changed, 1 insertion(+), 43 deletions(-) diff --git a/ChangeLog b/ChangeLog index e62c7c74..a3859bc3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -10,6 +10,7 @@ FIXED 2015-10-29 TMusrRunHeader didn't map a double vector properly into a comment typo. FIXED 2015-11-11 Fixes the crash of Fourier if the maximal range given in the Fourier block is larger than the available. +CHANGED 2015-11-15 removed unnecessary check form musredit_qt5 msr2data interface. changes since 0.14.0 =================================== diff --git a/src/musredit_qt5/PTextEdit.cpp b/src/musredit_qt5/PTextEdit.cpp index eb9bdcb9..ede387e8 100644 --- a/src/musredit_qt5/PTextEdit.cpp +++ b/src/musredit_qt5/PTextEdit.cpp @@ -679,42 +679,6 @@ void PTextEdit::doConnections( PSubTextEdit *e ) connect( e, SIGNAL( cursorPositionChanged() ), this, SLOT( currentCursorPosition() )); } -//---------------------------------------------------------------------------------------------------- -/** - *

Validates a given runlist. - * - * \param runList run list string which should be a space separated list of run numbers. - */ -bool PTextEdit::validRunList(const QString runList) -{ - bool success = true; - - int i = 0; - QString subStr; - bool done = false; - int val = 0; - bool ok; - while (!done) { - subStr = runList.section(' ', i, i, QString::SectionSkipEmpty); - if (subStr.isEmpty()) { - done = true; - continue; - } - i++; - val = subStr.toInt(&ok); - if (!ok) { - done = true; - success = false; - } - } - - if (i == 0) { // no token found - success = false; - } - - return success; -} - //---------------------------------------------------------------------------------------------------- /** *

Start the dialog to enter a msr-file title. See also https://intranet.psi.ch/MUSR/MusrFit#4_1_The_Title @@ -1892,12 +1856,6 @@ void PTextEdit::musrMsr2Data() break; case 1: // run list runList = fMsr2DataParam->runList; - if (!validRunList(runList)) { - QMessageBox::critical(this, "**ERROR**", - "Invalid Run List!\nThe run list needs to be a space separated list of run numbers.", - QMessageBox::Ok, QMessageBox::NoButton); - return; - } break; case 2: // run list file name runListFileName = fMsr2DataParam->runListFileName; diff --git a/src/musredit_qt5/PTextEdit.h b/src/musredit_qt5/PTextEdit.h index 149ab0bf..46a6e282 100644 --- a/src/musredit_qt5/PTextEdit.h +++ b/src/musredit_qt5/PTextEdit.h @@ -77,7 +77,6 @@ private: void load( const QString &f, const int index=-1 ); PSubTextEdit *currentEditor() const; void doConnections( PSubTextEdit *e ); - bool validRunList(const QString runList); void fileSystemWatcherActivation(); private slots: