From: hama Date: Thu, 24 Dec 2015 00:57:36 +0000 (+0100) Subject: ReFind: layout improvements, stop button X-Git-Url: https://gitweb.hamatoma.de/?a=commitdiff_plain;h=0112d44169e91b33ceb96e44f1e0065a686e7a6f;p=reqt ReFind: layout improvements, stop button * Layout: more using grid * stop button + menu * ReTest::run() renamed to runTests() --- diff --git a/appl/refind/filefinder.cpp b/appl/refind/filefinder.cpp index 4497864..a061a60 100644 --- a/appl/refind/filefinder.cpp +++ b/appl/refind/filefinder.cpp @@ -142,6 +142,8 @@ void FileFinder::fillTable(const QString& path, int depth){ } if (ignore) continue; + if (isInterruptionRequested()) + break; if (depth >= m_minDepth && isValid(*it)){ bool isDir = it->isDir(); if (isDir) @@ -166,7 +168,7 @@ void FileFinder::fillTable(const QString& path, int depth){ if (!isDir) m_statistics.m_bytes += it->size(); m_guiQueue->pushBack(ReGuiQueueItem(ReGuiQueueItem::NewTableRow, m_table, row)); - if (m_maxHits-- < 0) + if (--m_maxHits <= 0) break; } clock_t now = clock(); @@ -178,7 +180,8 @@ void FileFinder::fillTable(const QString& path, int depth){ for (it2 = antiPatterns.begin(); it2 != antiPatterns.end(); ++it2){ delete *it2; } - if (depth < m_maxDepth || m_maxDepth < 0 && m_maxHits > 0){ + if (! isInterruptionRequested() + && (depth < m_maxDepth || m_maxDepth < 0) && m_maxHits > 0){ entries = dir.entryInfoList( QDir::NoSymLinks | QDir::NoDotAndDotDot | QDir::AllDirs, QDir::NoSort); bool filtered = m_excludedDirs.length() > 0; diff --git a/appl/refind/icons/stop.png b/appl/refind/icons/stop.png new file mode 100644 index 0000000..08f2493 Binary files /dev/null and b/appl/refind/icons/stop.png differ diff --git a/appl/refind/mainwindow.cpp b/appl/refind/mainwindow.cpp index 0e6b151..a8cfd2e 100644 --- a/appl/refind/mainwindow.cpp +++ b/appl/refind/mainwindow.cpp @@ -31,7 +31,7 @@ #include #include -const QString VERSION("2015.12.15"); +const QString VERSION("2015.12.24"); inline QString addEsc(const QString& text){ QString rc = text; @@ -76,6 +76,7 @@ MainWindow::MainWindow(const QString& startDir, const QString& homeDir, statusBar()->addWidget(m_statusMessage); connect(ui->actionSearch, SIGNAL(triggered()), this, SLOT(search())); connect(ui->actionClear, SIGNAL(triggered()), this, SLOT(clear())); + connect(ui->actionStop, SIGNAL(triggered()), this, SLOT(stop())); connect(ui->pushButtonSearch, SIGNAL(clicked()), this, SLOT(search())); connect(ui->pushButtonSearch2, SIGNAL(clicked()), this, SLOT(search())); connect(ui->pushButtonClear, SIGNAL(clicked()), this, SLOT(clear())); @@ -461,8 +462,7 @@ void MainWindow::guiTimerUpdate() case ReGuiQueueItem::ReadyMessage: say(LOG_INFO, item.m_value); m_statistics = m_finder->statistics(); - ui->pushButtonSearch->setEnabled(true); - ui->pushButtonSearch2->setEnabled(true); + startStop(false); break; case ReGuiQueueItem::LogMessage: say(LOG_INFO, item.m_value); @@ -891,9 +891,10 @@ void MainWindow::search(){ populateFinder(*m_finder); if (! ui->checkBoxAppend->isChecked()) clear(); + startStop(true); m_finder->start(); QApplication::restoreOverrideCursor(); - } + } } /** * Handles the push of the button "select directory". @@ -935,6 +936,27 @@ bool MainWindow::say(ReLoggerLevel level, const QString& message){ m_statusMessage->setText(message); return rc; } +/** + * Starts or stops the search. + * + * @param start true: the search should start + */ +void MainWindow::startStop(bool start){ + ui->actionSearch->setEnabled(!start); + ui->actionStop->setEnabled(start); + ui->pushButtonSearch->setEnabled(! start); + ui->pushButtonSearch2->setEnabled(! start); + ui->pushButtonStop->setEnabled(start); + ui->pushButtonStop2->setEnabled(start); +} + +/** + * Handles the "search" button. + */ +void MainWindow::stop(){ + m_finder->requestInterruption(); + startStop(false); +} /** * @brief Handles the "up" button: go to the parent directory. diff --git a/appl/refind/mainwindow.hpp b/appl/refind/mainwindow.hpp index db260f7..f4429e2 100644 --- a/appl/refind/mainwindow.hpp +++ b/appl/refind/mainwindow.hpp @@ -73,6 +73,7 @@ private slots: void search(); void selectDirectory(); void selectExportFile(); + void stop(); void up(); private: @@ -91,6 +92,7 @@ private: QString replaceGlobalPlaceholders(QComboBox* combo, QMap & placeholders); void restoreState(); + void startStop(bool start); private: Ui::MainWindow *ui; QLabel* m_statusMessage; diff --git a/appl/refind/mainwindow.ui b/appl/refind/mainwindow.ui index 4a6ef11..153a6ce 100644 --- a/appl/refind/mainwindow.ui +++ b/appl/refind/mainwindow.ui @@ -17,9 +17,6 @@ - - - @@ -43,31 +40,81 @@ - - - - - Execute the search + + + + + + 200 + 16777215 + - &Run search + File Patterns: - - - :/main/icons/action_go.gif - :/main/icons/action_go.png:/main/icons/action_go.gif + + + + + + + 200 + 16777215 + - - Ctrl+F + + Text Pattern: - - true + + + + + + + + Execute the search + + + &Run search + + + + :/main/icons/action_go.gif + :/main/icons/action_go.png:/main/icons/action_go.gif + + + Ctrl+F + + + true + + + true + + + + + + + + + Files - + true + + + + Adds the result of the next search to the table + + + Append + + + @@ -81,7 +128,50 @@ - + + + + + 125 + 16777215 + + + + Ignore case + + + + + + + Clears the file table + + + C&lear + + + + + + false + + + + + + + false + + + S&top search + + + + :/main/icons/stop.png:/main/icons/stop.png + + + + @@ -94,21 +184,46 @@ - - + + + + <html><head/><body><p>A comma (',') separated list of filename patterns. A prefix of '-' means inversion: if a filename matches it will not be found.</p><p>Example: *.txt,*.odt</p></body></html> + + + true + + + + + + + + 75 + 0 + + - 200 + 100 16777215 - Text Pattern: + Dirs + + + true - - + + + + + 130 + 0 + + 200 @@ -116,35 +231,70 @@ - File Patterns: + Regular expr. - - - - <html><head/><body><p>A comma (',') separated list of filename patterns. A prefix of '-' means inversion: if a filename matches it will not be found.</p><p>Example: *.txt,*.odt</p></body></html> + + + + Stop after: - + + + + + + + 75 + 0 + + + + + 100 + 16777215 + + + + Links + + true - - + + + + + 150 + 0 + + - 125 + 200 16777215 - Ignore case + Binary files - - + + + + true + + + + + + + + @@ -199,17 +349,7 @@ - - - - Files - - - true - - - - + The base directory (starting point of the search) @@ -219,169 +359,6 @@ - - - - - - Stop after: - - - - - - - true - - - - - - - - - - - - Adds the result of the next search to the table - - - Append - - - - - - - Clears the file table - - - C&lear - - - - - - false - - - - - - - - - - 75 - 0 - - - - - 100 - 16777215 - - - - Dirs - - - true - - - - - - - - 75 - 0 - - - - - 100 - 16777215 - - - - Links - - - true - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - - - - - 130 - 0 - - - - - 200 - 16777215 - - - - Regular expr. - - - - - - - - 150 - 0 - - - - - 200 - 16777215 - - - - Binary files - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - @@ -399,8 +376,8 @@ 10 - - + + 150 @@ -408,12 +385,22 @@ - Max Size: + Min. Size: - - + + + + <html><head/><body><p>Maximum distance of the subdirectory containing the found file from the base directory.</p><p>Example:<br/>Max. Depth: 0<br/>It found no files in subdirectories.</p></body></html> + + + true + + + + + 175 @@ -427,37 +414,31 @@ - <html><head/><body><p>Formula of the maximum size.</p><p>Example: 3*512ki + 5MiByte + -2^10</p><p><br/></p><p>A non zero value excludes automatically directories.</p><p>A formula is a arithmetic expression with the operators '+', '*' and '^' (potentioning).</p><p>Usual precedence: '+' &lt; '*' &lt; '^'</p><p>The operands are integer numbers with potentionally a unit.</p><p>Units: factor 1000: KByte, MByte, GByte, TByte<br/>factor 1024: KiByte, MiByte, GiByte, TiByte</p><p><br/></p></body></html> + <html><head/><body><p>Formula of the minimal size.</p><p>Example: 3*512ki + 5MiByte + -2^10</p><p><br/></p><p>A non zero value excludes automatically directories.</p><p>A formula is a arithmetic expression with the operators '+', '*' and '^' (potentioning).</p><p>Usual precedence: '+' &lt; '*' &lt; '^'</p><p>The operands are integer numbers with potentionally a unit.</p><p>Units: factor 1000: KByte, MByte, GByte, TByte<br/>factor 1024: KiByte, MiByte, GiByte, TiByte</p><p><br/></p></body></html> true - - - - - 200 - 0 - - + + - 16777215 + 200 16777215 - <html><head/><body><p>Formula of the minimal file date.</p><p>Example (relative): 3*5days+ 2hour</p><p>Example (absolute): 2015.12.31/23:59:59 - 3weeks</p><p><br/></p><p>A formula is a arithmetic expression with the operators '+', '*' and '^' (potentioning).</p><p>Usual precedence: '+' &lt; '*' &lt; '^'</p><p>The operands are integer numbers with potentionally a unit.</p><p>The first operand may be an absolute date, date and time or time:</p><p>Date syntax: yyyy.mm.dd</p><p>Time syntax HH:MM:SS</p><p>Units: minutes, hours, days, weeks</p><p>Abbrevation is allowed: 'd' is the same as 'days'</p><p><br/></p></body></html> + <html><head/><body><p>Formula of the maximal file date.</p><p>Example (relative): 3*5days+ 2hour</p><p>Example (absolute): 2015.12.31/23:59:59 - 3weeks</p><p><br/></p><p>A formula is a arithmetic expression with the operators '+', '*' and '^' (potentioning).</p><p>Usual precedence: '+' &lt; '*' &lt; '^'</p><p>The operands are integer numbers with potentionally a unit.</p><p>The first operand may be an absolute date, date and time or time:</p><p>Date syntax: yyyy.mm.dd</p><p>Time syntax HH:MM:SS</p><p>Units: minutes, hours, days, weeks</p><p>Abbrevation is allowed: 'd' is the same as 'days'</p><p><br/></p></body></html> true - - + + 175 @@ -471,36 +452,47 @@ - <html><head/><body><p>Formula of the minimal size.</p><p>Example: 3*512ki + 5MiByte + -2^10</p><p><br/></p><p>A non zero value excludes automatically directories.</p><p>A formula is a arithmetic expression with the operators '+', '*' and '^' (potentioning).</p><p>Usual precedence: '+' &lt; '*' &lt; '^'</p><p>The operands are integer numbers with potentionally a unit.</p><p>Units: factor 1000: KByte, MByte, GByte, TByte<br/>factor 1024: KiByte, MiByte, GiByte, TiByte</p><p><br/></p></body></html> + <html><head/><body><p>Formula of the maximum size.</p><p>Example: 3*512ki + 5MiByte + -2^10</p><p><br/></p><p>A non zero value excludes automatically directories.</p><p>A formula is a arithmetic expression with the operators '+', '*' and '^' (potentioning).</p><p>Usual precedence: '+' &lt; '*' &lt; '^'</p><p>The operands are integer numbers with potentionally a unit.</p><p>Units: factor 1000: KByte, MByte, GByte, TByte<br/>factor 1024: KiByte, MiByte, GiByte, TiByte</p><p><br/></p></body></html> true - - - - - 200 - 16777215 - + + + + Excluded Dirs: + + + + - <html><head/><body><p>Formula of the maximal file date.</p><p>Example (relative): 3*5days+ 2hour</p><p>Example (absolute): 2015.12.31/23:59:59 - 3weeks</p><p><br/></p><p>A formula is a arithmetic expression with the operators '+', '*' and '^' (potentioning).</p><p>Usual precedence: '+' &lt; '*' &lt; '^'</p><p>The operands are integer numbers with potentionally a unit.</p><p>The first operand may be an absolute date, date and time or time:</p><p>Date syntax: yyyy.mm.dd</p><p>Time syntax HH:MM:SS</p><p>Units: minutes, hours, days, weeks</p><p>Abbrevation is allowed: 'd' is the same as 'days'</p><p><br/></p></body></html> + <html><head/><body><p>a comma (',') separated list of directory names not entered for the search.</p><p>Example: .git,.cache</p></body></html> true - - - - <html><head/><body><p>Maximum distance of the subdirectory containing the found file from the base directory.</p><p>Example:<br/>Max. Depth: 0<br/>It found no files in subdirectories.</p></body></html> + + + + Max. Depth: - - true + + + + + + + 200 + 16777215 + + + + Older than: @@ -517,8 +509,8 @@ - - + + 150 @@ -526,7 +518,7 @@ - Min. Size: + Max Size: @@ -540,51 +532,36 @@ - - - - - 200 - 16777215 - - + + - Older than: + Min. Depth: - - - - Max. Depth: + + + + + 200 + 0 + + + + + 16777215 + 16777215 + - - - - - <html><head/><body><p>a comma (',') separated list of directory names not entered for the search.</p><p>Example: .git,.cache</p></body></html> + <html><head/><body><p>Formula of the minimal file date.</p><p>Example (relative): 3*5days+ 2hour</p><p>Example (absolute): 2015.12.31/23:59:59 - 3weeks</p><p><br/></p><p>A formula is a arithmetic expression with the operators '+', '*' and '^' (potentioning).</p><p>Usual precedence: '+' &lt; '*' &lt; '^'</p><p>The operands are integer numbers with potentionally a unit.</p><p>The first operand may be an absolute date, date and time or time:</p><p>Date syntax: yyyy.mm.dd</p><p>Time syntax HH:MM:SS</p><p>Units: minutes, hours, days, weeks</p><p>Abbrevation is allowed: 'd' is the same as 'days'</p><p><br/></p></body></html> true - - - - Min. Depth: - - - - - - - Excluded Dirs: - - - - + &Run search @@ -596,8 +573,38 @@ + + + + false + + + S&top search + + + + :/main/icons/stop.png:/main/icons/stop.png + + + Ctrl+T + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + @@ -924,7 +931,16 @@ + + + &Search + + + + + + @@ -1178,6 +1194,33 @@ Ctrl+L + + + + :/main/icons/action_go.png:/main/icons/action_go.png + + + Start search + + + Start the search + + + + + false + + + + :/main/icons/stop.png:/main/icons/stop.png + + + Stop search + + + Stop the current search + + @@ -1189,16 +1232,10 @@ comboBoxDirectory - pushButtonUp - pushButtonDirectory comboBoxFilePatterns checkBoxFiles - checkBoxDirs - checkBoxLinks comboBoxTextPattern checkBoxTextIgnoreCase - checkBoxRegExpr - checkBoxBinaryFiles comboBoxMinSize comboBoxMaxSize comboBoxYounger diff --git a/appl/refind/refind.qrc b/appl/refind/refind.qrc index 5f2890a..c1585c5 100644 --- a/appl/refind/refind.qrc +++ b/appl/refind/refind.qrc @@ -20,5 +20,6 @@ icons/disk.png icons/wrench.png icons/eye.png + icons/stop.png diff --git a/base/ReProgramArgs.cpp b/base/ReProgramArgs.cpp index 895046a..398d5cc 100644 --- a/base/ReProgramArgs.cpp +++ b/base/ReProgramArgs.cpp @@ -549,6 +549,7 @@ void ReProgramArgs::help(const char* message, bool issueLastError, default: break; } + line.resize(0); if (opt->m_shortName != UNDEF_SHORT_NAME) { line.append("-").append(opt->m_shortName); line.append(param).append(' ').append(I18N::s2b(QObject::tr(" or "))); @@ -572,7 +573,7 @@ void ReProgramArgs::help(const char* message, bool issueLastError, QByteArrayList::const_iterator it; for (it = desc.cbegin(); it != desc.cend(); ++it){ line.resize(0); - line.append(PREFIX_LINE_OPTION).append(*it).append('\n'); + line.append(PREFIX_LINE_OPTION).append(*it); lines.append(line); } } diff --git a/base/ReTest.cpp b/base/ReTest.cpp index be68737..6852e90 100644 --- a/base/ReTest.cpp +++ b/base/ReTest.cpp @@ -42,7 +42,7 @@ ReTest::ReTest(const char* name) : } void ReTest::doIt() { try { - run(); + runTests(); } catch (ReException e) { error("unexpected RplException: %s", e.getMessage().constData()); } catch (...) { diff --git a/base/ReTest.hpp b/base/ReTest.hpp index 1f6e5d1..afa6e81 100644 --- a/base/ReTest.hpp +++ b/base/ReTest.hpp @@ -63,7 +63,7 @@ public: QByteArray getTempFile(const char* node, const char* parent = NULL, bool deleteIfExists = true); bool logContains(const char* pattern); - virtual void run(void) = 0; + virtual void runTests(void) = 0; protected: int m_errors; diff --git a/cunit/cuReByteStorage.cpp b/cunit/cuReByteStorage.cpp index 0b0c64d..1bb5030 100644 --- a/cunit/cuReByteStorage.cpp +++ b/cunit/cuReByteStorage.cpp @@ -65,7 +65,7 @@ private: } public: - virtual void run() { + virtual void runTests() { testBufferChange(); testChars(); testBytes(); diff --git a/cunit/cuReCharPtrMap.cpp b/cunit/cuReCharPtrMap.cpp index 5cdd351..6ad49f2 100644 --- a/cunit/cuReCharPtrMap.cpp +++ b/cunit/cuReCharPtrMap.cpp @@ -26,7 +26,7 @@ protected: checkEqu("x1", map["x"]); } public: - virtual void run(void) { + virtual void runTests(void) { testBasic(); } }; diff --git a/cunit/cuReConfig.cpp b/cunit/cuReConfig.cpp index 02c5c65..5738b20 100644 --- a/cunit/cuReConfig.cpp +++ b/cunit/cuReConfig.cpp @@ -46,7 +46,7 @@ public: checkEqu("x", config.asString("S", "x")); } - virtual void run() { + virtual void runTests() { testAsX(); testBasic(); diff --git a/cunit/cuReContainer.cpp b/cunit/cuReContainer.cpp index 36477f9..6c3e688 100644 --- a/cunit/cuReContainer.cpp +++ b/cunit/cuReContainer.cpp @@ -48,7 +48,7 @@ public: log(("Example: " + data).constData()); } - virtual void run() { + virtual void runTests() { testBasic(); } }; diff --git a/cunit/cuReCryptFileSystem.cpp b/cunit/cuReCryptFileSystem.cpp index b622349..a858966 100644 --- a/cunit/cuReCryptFileSystem.cpp +++ b/cunit/cuReCryptFileSystem.cpp @@ -24,7 +24,7 @@ public: { } public: - virtual void run(void){ + virtual void runTests(void){ log("run"); } @@ -95,7 +95,7 @@ protected: cryptFs2.testDirRead(); } - virtual void run() { + virtual void runTests() { init(); testDirWriteRead(); destroy(); diff --git a/cunit/cuReEdit.cpp b/cunit/cuReEdit.cpp index acb57ae..1f4ba76 100644 --- a/cunit/cuReEdit.cpp +++ b/cunit/cuReEdit.cpp @@ -345,7 +345,7 @@ public: checkEqu(4, ReParagraphs::indexToColumn(4, tabWidth, "123\tx")); } - virtual void run() { + virtual void runTests() { testIndexToColumn(); testDeleteLine(); testDeleteText(); diff --git a/cunit/cuReException.cpp b/cunit/cuReException.cpp index eeb107c..51d187f 100644 --- a/cunit/cuReException.cpp +++ b/cunit/cuReException.cpp @@ -44,7 +44,7 @@ public: } log("ok"); } - virtual void run() { + virtual void runTests() { testBasic(); } }; diff --git a/cunit/cuReFile.cpp b/cunit/cuReFile.cpp index 28865f8..61fad46 100644 --- a/cunit/cuReFile.cpp +++ b/cunit/cuReFile.cpp @@ -367,7 +367,7 @@ public: checkEqu("2", lines.lineAt(1)); checkEqu("", lines.lineAt(2)); } - virtual void run() { + virtual void runTests() { testReLinesInsert(); testReLinesSplitLine(); testRelLinesjoinLines(); diff --git a/cunit/cuReFileSystem.cpp b/cunit/cuReFileSystem.cpp index 1ac0312..96cef6f 100644 --- a/cunit/cuReFileSystem.cpp +++ b/cunit/cuReFileSystem.cpp @@ -250,7 +250,7 @@ protected: checkMove("move1.txt", NULL); } - virtual void run() { + virtual void runTests() { testReOSPermissions(); init(); testReListInfos(); diff --git a/cunit/cuReFileUtils.cpp b/cunit/cuReFileUtils.cpp index 9f12e2e..2259809 100644 --- a/cunit/cuReFileUtils.cpp +++ b/cunit/cuReFileUtils.cpp @@ -324,7 +324,7 @@ public: "index.htm", ""); } - virtual void run() { + virtual void runTests() { testSplitUrl(); testParentOf(); testCleanPath(); diff --git a/cunit/cuReLexer.cpp b/cunit/cuReLexer.cpp index cdbfb93..b7b0e34 100644 --- a/cunit/cuReLexer.cpp +++ b/cunit/cuReLexer.cpp @@ -280,7 +280,7 @@ public: checkEqu(lex.prioOfOp(O_TIMES), lex.prioOfOp(O_DIV)); } - virtual void run(void) { + virtual void runTests(void) { testPrio(); testBasic(); testIds(); @@ -295,5 +295,5 @@ public: }; void testReLexer() { TestReLexer test; - test.run(); + test.runTests(); } diff --git a/cunit/cuReMatcher.cpp b/cunit/cuReMatcher.cpp index b14aa71..582a3f5 100644 --- a/cunit/cuReMatcher.cpp +++ b/cunit/cuReMatcher.cpp @@ -165,7 +165,7 @@ public: } - virtual void run(void) { + virtual void runTests(void) { testBasics(); test0Star(); test1Star(); diff --git a/cunit/cuReProcess.cpp b/cunit/cuReProcess.cpp index 8e3b2a2..2ca321d 100644 --- a/cunit/cuReProcess.cpp +++ b/cunit/cuReProcess.cpp @@ -31,7 +31,7 @@ private: } public: - virtual void run() { + virtual void runTests() { testExecAndRead(); } }; diff --git a/cunit/cuReProgArgs.cpp b/cunit/cuReProgArgs.cpp index 31ace76..a09ae43 100644 --- a/cunit/cuReProgArgs.cpp +++ b/cunit/cuReProgArgs.cpp @@ -30,7 +30,7 @@ public: args.addInt("intArg", "integer arg", 'i', "int-arg", 99); args.addString("stringArg", "string argument", 's', "string-arg", true, ""); const char* arguments[] = { "example" }; - args.init2(1, arguments); + args.init(1, arguments, false); checkF(args.getBool("boolArg")); checkEqu(99, args.getInt("intArg")); QByteArray buffer = "123"; @@ -56,7 +56,7 @@ public: "-t", "-f", NULL }; - args.init2(9, arguments); + args.init(9, arguments, true); checkT(args.getBool("trueArg")); checkF(args.getBool("falseArg")); checkT(args.getBool("trueArg2")); @@ -76,7 +76,7 @@ public: "--arg2=3355", NULL }; - args.init2(4, arguments); + args.init(4, arguments, true); checkEqu(2244, args.getInt("intArg")); checkEqu(3355, args.getInt("intArg2")); @@ -88,7 +88,7 @@ public: NULL }; try { - args2.init2(2, arguments2); + args.init(2, arguments2, true); error("exception expected: missing parameter"); } catch(ReOptionException e){ checkT(e.getMessage().indexOf("arg2") > 0); @@ -106,7 +106,7 @@ public: "--arg3=", NULL }; - args.init2(5, arguments); + args.init(5, arguments, true); QByteArray buffer; checkEqu("wow", args.getString("stringArg", buffer)); checkEqu("1 2 3", args.getString("stringArg2", buffer)); @@ -120,7 +120,7 @@ public: NULL }; try { - args2.init2(2, arguments2); + args2.init(2, arguments2, true); error("exception expected: missing parameter"); } catch(ReOptionException e){ checkT(e.getMessage().indexOf("arg2") > 0); @@ -135,7 +135,7 @@ public: NULL }; try { - args3.init2(3, arguments3); + args3.init(3, arguments3, true); error("exception expected: empty string is not allowed"); } catch(ReOptionException e){ checkT(e.getMessage().indexOf("arg2") > 0); @@ -163,7 +163,7 @@ public: "+++ dummy error\n"; checkEqu(expected, list.join('\n')); } - virtual void run() { + virtual void runTests() { try { testHelp(); testString(); diff --git a/cunit/cuReQStringUtils.cpp b/cunit/cuReQStringUtils.cpp index 5281f4c..c771ff7 100644 --- a/cunit/cuReQStringUtils.cpp +++ b/cunit/cuReQStringUtils.cpp @@ -206,7 +206,7 @@ public: checkEqu("", ReQStringUtils::longestPrefix(list)); } - virtual void run(void) { + virtual void runTests(void) { testLongestPrefix(); testLengtOfTime(); testLengtOfDate(); diff --git a/cunit/cuReRandomizer.cpp b/cunit/cuReRandomizer.cpp index 263c896..6fe8698 100644 --- a/cunit/cuReRandomizer.cpp +++ b/cunit/cuReRandomizer.cpp @@ -443,7 +443,7 @@ public: checkEqu(info, info2); } - virtual void run(void) { + virtual void runTests(void) { testContentEncoding(); testScrambler(); testCodec(); diff --git a/cunit/cuReSettings.cpp b/cunit/cuReSettings.cpp index 63f8c73..75221a7 100644 --- a/cunit/cuReSettings.cpp +++ b/cunit/cuReSettings.cpp @@ -103,7 +103,7 @@ public: checkEqu("???", settings.topOfHistory("unknown", "???")); } - virtual void run() { + virtual void runTests() { testTopOfHistory(); testBasic(); testAddHistoryEntry(); diff --git a/cunit/cuReStateStorage.cpp b/cunit/cuReStateStorage.cpp index c019536..8b6bae2 100644 --- a/cunit/cuReStateStorage.cpp +++ b/cunit/cuReStateStorage.cpp @@ -86,7 +86,7 @@ public: // form as parameter: checkEqu(3, store.historyAsList("version", list, "common").size()); } - virtual void run() { + virtual void runTests() { testAddHistoryEntry(); testBasic(); } diff --git a/cunit/cuReStringUtils.cpp b/cunit/cuReStringUtils.cpp index ae67b4f..5710186 100644 --- a/cunit/cuReStringUtils.cpp +++ b/cunit/cuReStringUtils.cpp @@ -231,7 +231,7 @@ public: } - virtual void run() { + virtual void runTests() { testIsInList(); testChomp(); testLengthOfReal(); diff --git a/cunit/cuReWriter.cpp b/cunit/cuReWriter.cpp index f9d45f7..be884bf 100644 --- a/cunit/cuReWriter.cpp +++ b/cunit/cuReWriter.cpp @@ -41,7 +41,7 @@ private: } public: - virtual void run(void) { + virtual void runTests(void) { testFileWriter(); } };