diff --git a/src/TLuaInterpreterMedia.cpp b/src/TLuaInterpreterMedia.cpp index a7cc0bca8..b46d9a812 100644 --- a/src/TLuaInterpreterMedia.cpp +++ b/src/TLuaInterpreterMedia.cpp @@ -442,8 +442,6 @@ int TLuaInterpreter::playMusicFileAsTableArgument(lua_State* L, const char* func break; } - // read the key from a copy: lua_tostring() on the slot itself converts a - // numeric key in place, which makes the next lua_next() fail lua_pushvalue(L, -2); const QString key = QString{lua_tostring(L, -1)}.toLower(); lua_pop(L, 1); @@ -807,8 +805,6 @@ int TLuaInterpreter::playSoundFileAsTableArgument(lua_State* L, const char* func break; } - // read the key from a copy: lua_tostring() on the slot itself converts a - // numeric key in place, which makes the next lua_next() fail lua_pushvalue(L, -2); const QString key = QString{lua_tostring(L, -1)}.toLower(); lua_pop(L, 1); @@ -980,8 +976,6 @@ int TLuaInterpreter::playVideoFileAsTableArgument(lua_State* L, const char* func break; } - // read the key from a copy: lua_tostring() on the slot itself converts a - // numeric key in place, which makes the next lua_next() fail lua_pushvalue(L, -2); const QString key{lua_tostring(L, -1)}; lua_pop(L, 1); @@ -1255,8 +1249,6 @@ int TLuaInterpreter::getPlayingMusicAsTableArgument(lua_State* L, const char* fu break; } - // read the key from a copy: lua_tostring() on the slot itself converts a - // numeric key in place, which makes the next lua_next() fail lua_pushvalue(L, -2); const QString key = QString{lua_tostring(L, -1)}.toLower(); lua_pop(L, 1); @@ -1421,8 +1413,6 @@ int TLuaInterpreter::getPlayingSoundsAsTableArgument(lua_State* L, const char* f break; } - // read the key from a copy: lua_tostring() on the slot itself converts a - // numeric key in place, which makes the next lua_next() fail lua_pushvalue(L, -2); const QString key = QString{lua_tostring(L, -1)}.toLower(); lua_pop(L, 1); @@ -1518,8 +1508,6 @@ int TLuaInterpreter::getPlayingVideosAsTableArgument(lua_State* L, const char* f break; } - // read the key from a copy: lua_tostring() on the slot itself converts a - // numeric key in place, which makes the next lua_next() fail lua_pushvalue(L, -2); const QString key = QString{lua_tostring(L, -1)}.toLower(); lua_pop(L, 1); @@ -1651,8 +1639,6 @@ int TLuaInterpreter::getPausedSoundsAsTableArgument(lua_State* L, const char* fu break; } - // read the key from a copy: lua_tostring() on the slot itself converts a - // numeric key in place, which makes the next lua_next() fail lua_pushvalue(L, -2); const QString key = QString{lua_tostring(L, -1)}.toLower(); lua_pop(L, 1); @@ -1734,8 +1720,6 @@ int TLuaInterpreter::getPausedMusicAsTableArgument(lua_State* L, const char* fun break; } - // read the key from a copy: lua_tostring() on the slot itself converts a - // numeric key in place, which makes the next lua_next() fail lua_pushvalue(L, -2); const QString key = QString{lua_tostring(L, -1)}.toLower(); lua_pop(L, 1); @@ -1817,8 +1801,6 @@ int TLuaInterpreter::getPausedVideosAsTableArgument(lua_State* L, const char* fu break; } - // read the key from a copy: lua_tostring() on the slot itself converts a - // numeric key in place, which makes the next lua_next() fail lua_pushvalue(L, -2); const QString key = QString{lua_tostring(L, -1)}.toLower(); lua_pop(L, 1); @@ -1996,8 +1978,6 @@ int TLuaInterpreter::stopMusicAsTableArgument(lua_State* L, const char* func) break; } - // read the key from a copy: lua_tostring() on the slot itself converts a - // numeric key in place, which makes the next lua_next() fail lua_pushvalue(L, -2); const QString key = QString{lua_tostring(L, -1)}.toLower(); lua_pop(L, 1); @@ -2216,8 +2196,6 @@ int TLuaInterpreter::stopSoundsAsTableArgument(lua_State* L, const char* func) break; } - // read the key from a copy: lua_tostring() on the slot itself converts a - // numeric key in place, which makes the next lua_next() fail lua_pushvalue(L, -2); const QString key = QString{lua_tostring(L, -1)}.toLower(); lua_pop(L, 1); @@ -2341,8 +2319,6 @@ int TLuaInterpreter::stopVideosAsTableArgument(lua_State* L, const char* func) break; } - // read the key from a copy: lua_tostring() on the slot itself converts a - // numeric key in place, which makes the next lua_next() fail lua_pushvalue(L, -2); const QString key = QString{lua_tostring(L, -1)}.toLower(); lua_pop(L, 1); @@ -2452,8 +2428,6 @@ int TLuaInterpreter::pauseSoundsAsTableArgument(lua_State* L, const char* func) break; } - // read the key from a copy: lua_tostring() on the slot itself converts a - // numeric key in place, which makes the next lua_next() fail lua_pushvalue(L, -2); const QString key = QString{lua_tostring(L, -1)}.toLower(); lua_pop(L, 1); @@ -2541,8 +2515,6 @@ int TLuaInterpreter::pauseMusicAsTableArgument(lua_State* L, const char* func) break; } - // read the key from a copy: lua_tostring() on the slot itself converts a - // numeric key in place, which makes the next lua_next() fail lua_pushvalue(L, -2); const QString key = QString{lua_tostring(L, -1)}.toLower(); lua_pop(L, 1); @@ -2630,8 +2602,6 @@ int TLuaInterpreter::pauseVideosAsTableArgument(lua_State* L, const char* func) break; } - // read the key from a copy: lua_tostring() on the slot itself converts a - // numeric key in place, which makes the next lua_next() fail lua_pushvalue(L, -2); const QString key = QString{lua_tostring(L, -1)}.toLower(); lua_pop(L, 1); diff --git a/src/TMedia.cpp b/src/TMedia.cpp index 037f72061..abae83fc8 100644 --- a/src/TMedia.cpp +++ b/src/TMedia.cpp @@ -1246,7 +1246,6 @@ void TMedia::connectMediaPlayer(std::shared_ptr& player) } }); - // Error connection disconnect(player->mediaPlayer(), &QMediaPlayer::errorOccurred, nullptr, nullptr); connect(player->mediaPlayer(), &QMediaPlayer::errorOccurred, this, [this, weakPlayer](QMediaPlayer::Error error, const QString& errorString) { const auto lockedPlayer = weakPlayer.lock(); diff --git a/src/TMxpProcessor.cpp b/src/TMxpProcessor.cpp index 19a754e2b..1a4276937 100644 --- a/src/TMxpProcessor.cpp +++ b/src/TMxpProcessor.cpp @@ -390,7 +390,6 @@ TMxpProcessingResult TMxpProcessor::processMxpInput(char& ch, bool resolveCustom return HANDLER_INSERT_ENTITY_LIT; } } - // ask for the next char return HANDLER_NEXT_CHAR; } diff --git a/src/mudlet-lua/tests/Other_spec.lua b/src/mudlet-lua/tests/Other_spec.lua index 5faa50256..a0662a3a9 100644 --- a/src/mudlet-lua/tests/Other_spec.lua +++ b/src/mudlet-lua/tests/Other_spec.lua @@ -1091,7 +1091,6 @@ describe("Tests the timer API", function() "a delay rounding up to a whole day wraps to a zero interval and must be rejected") assert.is_truthy(tostring(err):find("bad argument #1", 1, true), "the delay should be reported as the offending argument, got: " .. tostring(err)) - -- while a delay still under the day once rounded stays acceptable local id = trackTemp(tempTimer(86399.4, [[]])) assert.is_true(id > 0, "a delay under the day once rounded should still be accepted") assert.is_true(killTimer(id)) diff --git a/src/mudlet-lua/tests/Trigger_spec.lua b/src/mudlet-lua/tests/Trigger_spec.lua index 9ac67c2bf..5a61a397f 100644 --- a/src/mudlet-lua/tests/Trigger_spec.lua +++ b/src/mudlet-lua/tests/Trigger_spec.lua @@ -365,7 +365,6 @@ describe("Trigger processing", function() _G.TrigSpec = {count = 0} local id = tempExactMatchTrigger("exact_line_only", function() _G.TrigSpec.count = _G.TrigSpec.count + 1 end) assert.is_number(id) - -- superset line must NOT match an exact trigger feedTriggers("\nexact_line_only and more\n") assert.is_equal(0, _G.TrigSpec.count, "an exact-match trigger must not fire on a superset line") feedTriggers("\nexact_line_only\n") diff --git a/test/DiscordTest.cpp b/test/DiscordTest.cpp index 7952f06f6..aa088569c 100644 --- a/test/DiscordTest.cpp +++ b/test/DiscordTest.cpp @@ -294,7 +294,6 @@ private slots: ++checked; } } - // All 22 Discord Lua API functions should have been categorised: QVERIFY2(checked >= 22, qPrintable(qsl("only categorised %1 Discord Lua functions - has the source moved?").arg(checked))); } diff --git a/test/SecureStringUtilsTest.cpp b/test/SecureStringUtilsTest.cpp index 7b5aed37b..14321591b 100644 --- a/test/SecureStringUtilsTest.cpp +++ b/test/SecureStringUtilsTest.cpp @@ -143,22 +143,17 @@ void SecureStringUtilsTest::testSecureMemoryClearing() QString testString = "sensitive_data"; QString originalContent = testString; - // Clear the string SecureStringUtils::secureStringClear(testString); - - // String should be empty after clearing QVERIFY(testString.isEmpty()); QVERIFY(testString != originalContent); - - // Test QByteArray clearing + QByteArray testArray = "sensitive_bytes"; QByteArray originalArray = testArray; - + SecureStringUtils::secureByteArrayClear(testArray); QVERIFY(testArray.isEmpty()); QVERIFY(testArray != originalArray); - // Test std::string clearing std::string testStdString = "sensitive_std_data"; std::string originalStdString = testStdString; diff --git a/test/functional_tests/TFeedTriggersRecursionTest.cpp b/test/functional_tests/TFeedTriggersRecursionTest.cpp index b0e32bc31..0b52a0fb4 100644 --- a/test/functional_tests/TFeedTriggersRecursionTest.cpp +++ b/test/functional_tests/TFeedTriggersRecursionTest.cpp @@ -97,7 +97,6 @@ private slots: lua_pop(L, 1); QVERIFY2(bufferContains(qsl("trigger '%1'").arg(loopTriggerId)), "Expected the abort message to name the offending trigger by its id"); - // The trigger should have fired exactly up to the limit and no further. host->getLuaInterpreter()->compileAndExecuteScript(qsl("echo('LOOPCOUNT='..loopCount..'\\n')")); QVERIFY2(bufferContains(qsl("LOOPCOUNT=%1").arg(TriggerUnit::scmMaxProcessingDepth)), qPrintable(qsl("Expected the trigger to fire exactly %1 times").arg(TriggerUnit::scmMaxProcessingDepth))); } diff --git a/test/functional_tests/TelnetSgrDefaultColorTest.cpp b/test/functional_tests/TelnetSgrDefaultColorTest.cpp index 293d66144..2df195ee0 100644 --- a/test/functional_tests/TelnetSgrDefaultColorTest.cpp +++ b/test/functional_tests/TelnetSgrDefaultColorTest.cpp @@ -182,7 +182,6 @@ private slots: QCOMPARE(brightChar->foreground(), mpHost->mLightRed); } - // Regression guard: bold of an explicit color still brightens it. void boldColorStillBrightens() { injectData(QByteArrayLiteral("\x1b[31;1mbright"));