Commit graph

5 commits

Author SHA1 Message Date
Vadim Peretokin
cb402cc3e6
infrastructure: use std::chrono literals for time durations (#9493)
#### Brief overview of PR changes/additions

Convert raw millisecond integer literals at time-duration call sites to
`std::chrono` literals, and add `#include <chrono>` to each touched
translation unit. Examples:

- `QTimer::singleShot(0, ...)` → `QTimer::singleShot(0ms, ...)`
- `mpTimerReplay->setInterval(1000)` → `setInterval(1s)`
- `mPendingTimer.start(60000)` → `start(1min)`
- `QObject::startTimer(50)` → `startTimer(50ms)`
- `QTest::qWait(100)` → `QTest::qWait(100ms)`
- `QThread::msleep(10)` → `QThread::sleep(10ms)`

This is a semantics-preserving refactor - every duration is kept exactly
equal to before (e.g. `1000` ms becomes `1s`, `60000` ms becomes
`1min`). No behavioural change.

#### Motivation for adding to Mudlet

Chrono literals make time durations self-documenting and type-safe. `1s`
/ `100ms` read unambiguously where a bare `1000` / `100` forces the
reader to remember each API's unit, and the compiler now rejects unit
mismatches. Only genuine duration arguments were converted - loop
counts, scroll-line counts, sizes, ports and the like were deliberately
left as plain integers.

All targeted APIs provide `std::chrono` overloads in the minimum
supported Qt (6.8.2): `QTimer::singleShot`/`start`/`setInterval` (5.8),
`QObject::startTimer` (5.9), `QThread::sleep(std::chrono::nanoseconds)`
(6.6) and `QTest::qWait(std::chrono::milliseconds)` (6.7).

#### Other info (issues closed, discussion etc)

Test case: the full application builds cleanly and the entire functional
`ctest` suite passes. The only failing test is the known, pre-existing
`PasswordMigrationTest` LSan exit-leak (GTK3/fontconfig noise), which is
unrelated to this change.

Assisted-by: Claude:claude-opus-4-8
2026-07-25 20:24:31 +02:00
Zooka
d2590f6c16
fix: missing headers and string creation issues for 6.8.2 (#9251)
<!-- Keep the title short & concise so anyone non-technical can
understand it,
     the title appears in PTB changelogs -->
#### Brief overview of PR changes/additions
These changes are required to build on 6.8.2, our minimum supported
version of Qt. Added missing json headers and fixes for string creation.
The string creation changes moves to follow the existing pattern found
elsewhere in the file.

#### Motivation for adding to Mudlet
Unable to compile otherwise.

#### Other info (issues closed, discussion etc)

---------

Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
Co-authored-by: Vadim Peretokin <vperetokin@hey.com>
2026-05-19 02:52:13 +00:00
Stephen Lyons
14305cf6d6
Fix: Clazy warnings part 3 - qstring-arg (#9197)
#### Brief overview of PR changes/additions
One of a series of PRs, each addressing a type of issue reported by
Clazy.

This is the: "Use multi-arg instead [clazy-qstring-arg]" one.

#### Motivation for adding to Mudlet
Remove warnings detected by the Clazy tool - either when explicitly run
on the Mudlet code-base or detected by the background scanner/analyser
that Qt Creator offers.

#### Other info (issues closed, discussion etc)
A summary I found for this is:
>Using multi-arg methods is recommended for better performance and
reduced
memory usage in `QString` operations. This approach is encouraged to
optimise code efficiency.

Signed-off-by: Stephen Lyons <slysven@virginmedia.com>
2026-04-20 00:12:54 +01:00
John McKisson
1e9ecebce1
Fix: Refactor and fix logic handling chat name change from GUI preferences dialog (#9025)
#### Brief overview of PR changes/additions

Refactor mChatName out of MMCPServer as the value is stored in Host
already (for profile saving), this simplifies syncing between the two.
Fix signaling so the connected clients are notified when chat name is
changed via GUI.
We're left with a double setText in
dlgProfilePreferences::slot_setMMCPChatName but this should be OK as
setText does not re-trigger the editingFinished signal.

#### Motivation for adding to Mudlet

#### Other info (issues closed, discussion etc)
2026-03-23 16:24:55 +01:00
John McKisson
b15dddae4f
Add: MudMaster Chat Protocol (MMCP) (#7765)
Brief overview of PR changes/additions
Add MMCP Client and Server classes, Lua scriptability, and options for
the MudMaster Chat Protocol

Motivation for adding to Mudlet
This is a feature largely requested by players of the Medievia MUD, it
allows peer to peer client communication integrated directly into the
main console.

Other info (issues closed, discussion etc)
Starting a new PR as the original PR 7155 was unintentionally
closed/deleted from my local disk

---------

Co-authored-by: Tim Johnson <29287358+atari2600tim@users.noreply.github.com>
Co-authored-by: Stephen Lyons <slysven@virginmedia.com>
Co-authored-by: Vadim Peretokin <vperetokin@hey.com>
2026-03-06 18:24:16 +01:00