Docs: Use Doxygen \todo comments (#6421)

* format todo comments for doxygen

* Mention Todo List & link search
This commit is contained in:
tooomm 2025-12-15 00:13:16 +01:00 committed by GitHub
parent 5d9d7d3aa5
commit 8485bbe575
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
14 changed files with 24 additions and 23 deletions

View file

@ -77,6 +77,8 @@ This tag is used for issues that we are looking for somebody to pick up. Often t
For both tags, we're willing to provide help to contributors in showing them where and how they can make changes, as well as code reviews for submitted changes.<br> For both tags, we're willing to provide help to contributors in showing them where and how they can make changes, as well as code reviews for submitted changes.<br>
We'll happily advice on how best to implement a feature, or we can show you where the codebase is doing something similar before you get too far along - put a note on an issue you want to discuss more on! We'll happily advice on how best to implement a feature, or we can show you where the codebase is doing something similar before you get too far along - put a note on an issue you want to discuss more on!
You can also have a look at our `Todo List` in our [Code Documentation](https://cockatrice.github.io/docs) or search the repo for [`\todo` comments](https://github.com/search?q=repo%3ACockatrice%2FCockatrice%20%5Ctodo&type=code).
Cockatrice tries to use the [Google Developer Documentation Style Guide](https://developers.google.com/style/) to ensure consistent documentation. We encourage you to improve the documentation by suggesting edits based on this guide. Cockatrice tries to use the [Google Developer Documentation Style Guide](https://developers.google.com/style/) to ensure consistent documentation. We encourage you to improve the documentation by suggesting edits based on this guide.
<details> <details>

View file

@ -263,7 +263,7 @@ void Player::deleteCard(CardItem *card)
} }
} }
// TODO: Does a player need a DeckLoader? //! \todo Does a player need a DeckLoader?
void Player::setDeck(DeckLoader &_deck) void Player::setDeck(DeckLoader &_deck)
{ {
deck = new DeckLoader(this, _deck.getDeckList()); deck = new DeckLoader(this, _deck.getDeckList());

View file

@ -59,7 +59,7 @@ DlgEditPassword::DlgEditPassword(QWidget *parent) : QDialog(parent)
void DlgEditPassword::actOk() void DlgEditPassword::actOk()
{ {
// TODO this stuff should be using qvalidators //! \todo this stuff should be using qvalidators
if (newPasswordEdit->text().length() < 8) { if (newPasswordEdit->text().length() < 8) {
QMessageBox::critical(this, tr("Error"), tr("Your password is too short.")); QMessageBox::critical(this, tr("Error"), tr("Your password is too short."));
return; return;

View file

@ -121,7 +121,7 @@ void DlgForgotPasswordReset::actOk()
return; return;
} }
// TODO this stuff should be using qvalidators //! \todo this stuff should be using qvalidators
if (newpasswordEdit->text().length() < 8) { if (newpasswordEdit->text().length() < 8) {
QMessageBox::critical(this, tr("Error"), tr("Your password is too short.")); QMessageBox::critical(this, tr("Error"), tr("Your password is too short."));
return; return;

View file

@ -356,7 +356,7 @@ DlgRegister::DlgRegister(QWidget *parent) : QDialog(parent)
void DlgRegister::actOk() void DlgRegister::actOk()
{ {
// TODO this stuff should be using qvalidators //! \todo this stuff should be using qvalidators
if (passwordEdit->text().length() < 8) { if (passwordEdit->text().length() < 8) {
QMessageBox::critical(this, tr("Registration Warning"), tr("Your password is too short.")); QMessageBox::critical(this, tr("Registration Warning"), tr("Your password is too short."));
return; return;

View file

@ -1913,7 +1913,7 @@ void DlgSettings::closeEvent(QCloseEvent *event)
} }
if (!QDir(SettingsCache::instance().getDeckPath()).exists() || SettingsCache::instance().getDeckPath().isEmpty()) { if (!QDir(SettingsCache::instance().getDeckPath()).exists() || SettingsCache::instance().getDeckPath().isEmpty()) {
// TODO: Prompt to create it //! \todo Prompt to create it
if (QMessageBox::critical( if (QMessageBox::critical(
this, tr("Error"), this, tr("Error"),
tr("The path to your deck directory is invalid. Would you like to go back and set the correct path?"), tr("The path to your deck directory is invalid. Would you like to go back and set the correct path?"),
@ -1924,7 +1924,7 @@ void DlgSettings::closeEvent(QCloseEvent *event)
} }
if (!QDir(SettingsCache::instance().getPicsPath()).exists() || SettingsCache::instance().getPicsPath().isEmpty()) { if (!QDir(SettingsCache::instance().getPicsPath()).exists() || SettingsCache::instance().getPicsPath().isEmpty()) {
// TODO: Prompt to create it //! \todo Prompt to create it
if (QMessageBox::critical(this, tr("Error"), if (QMessageBox::critical(this, tr("Error"),
tr("The path to your card pictures directory is invalid. Would you like to go back " tr("The path to your card pictures directory is invalid. Would you like to go back "
"and set the correct path?"), "and set the correct path?"),

View file

@ -206,7 +206,7 @@ void ChatView::appendMessage(QString message,
defaultFormat = QTextCharFormat(); defaultFormat = QTextCharFormat();
if (!isUserMessage) { if (!isUserMessage) {
if (messageType == Event_RoomSay::ChatHistory) { if (messageType == Event_RoomSay::ChatHistory) {
defaultFormat.setForeground(Qt::gray); // FIXME : hardcoded color defaultFormat.setForeground(Qt::gray); //! \todo hardcoded color
defaultFormat.setFontWeight(QFont::Light); defaultFormat.setFontWeight(QFont::Light);
defaultFormat.setFontItalic(true); defaultFormat.setFontItalic(true);
static const QRegularExpression userNameRegex("^(\\[[^\\]]*\\]\\s)(\\S+):\\s"); static const QRegularExpression userNameRegex("^(\\[[^\\]]*\\]\\s)(\\S+):\\s");
@ -229,7 +229,7 @@ void ChatView::appendMessage(QString message,
message.remove(0, pos.relativePosition - 2); // do not remove semicolon message.remove(0, pos.relativePosition - 2); // do not remove semicolon
} }
} else { } else {
defaultFormat.setForeground(Qt::darkGreen); // FIXME : hardcoded color defaultFormat.setForeground(Qt::darkGreen); //! \todo hardcoded color
defaultFormat.setFontWeight(QFont::Bold); defaultFormat.setFontWeight(QFont::Bold);
} }
} }

View file

@ -21,16 +21,16 @@ void ArchidektApiResponseCard::fromJson(const QJsonObject &json)
edition.fromJson(json.value("edition").toObject()); edition.fromJson(json.value("edition").toObject());
flavor = json.value("flavor").toString(); flavor = json.value("flavor").toString();
// TODO but not really important //! \todo but not really important
// games = {""}; //! \todo games = {""};
// options = {""}; //! \todo options = {""};
scryfallImageHash = json.value("scryfallImageHash").toString(); scryfallImageHash = json.value("scryfallImageHash").toString();
oracleCard = json.value("oracleCard").toObject(); oracleCard = json.value("oracleCard").toObject();
owned = json.value("owned").toInt(); owned = json.value("owned").toInt();
pinnedStatus = json.value("pinnedStatus").toInt(); pinnedStatus = json.value("pinnedStatus").toInt();
rarity = json.value("rarity").toString(); rarity = json.value("rarity").toString();
// TODO but not really important //! \todo but not really important
// globalCategories = {""}; //! \todo globalCategories = {""};
} }
void ArchidektApiResponseCard::debugPrint() const void ArchidektApiResponseCard::debugPrint() const

View file

@ -198,8 +198,8 @@ public:
/// @name Metadata getters /// @name Metadata getters
/// The individual metadata getters still exist for backwards compatibility. /// The individual metadata getters still exist for backwards compatibility.
/// TODO: Figure out when we can remove them.
///@{ ///@{
//! \todo Figure out when we can remove them.
const Metadata &getMetadata() const const Metadata &getMetadata() const
{ {
return metadata; return metadata;

View file

@ -501,7 +501,7 @@ void Server_Game::addPlayer(Server_AbstractUserInterface *userInterface,
allPlayersEver.insert(playerName); allPlayersEver.insert(playerName);
// if the original creator of the game joins, give them host status back // if the original creator of the game joins, give them host status back
// FIXME: transferring host to spectators has side effects //! \todo transferring host to spectators has side effects
if (newParticipant->getUserInfo()->name() == creatorInfo->name()) { if (newParticipant->getUserInfo()->name() == creatorInfo->name()) {
hostId = newParticipant->getPlayerId(); hostId = newParticipant->getPlayerId();
sendGameEventContainer(prepareGameEvent(Event_GameHostChanged(), hostId)); sendGameEventContainer(prepareGameEvent(Event_GameHostChanged(), hostId));

View file

@ -441,8 +441,8 @@ private:
size_t id; size_t id;
}; };
// TODO: Use unordered_map when heterogeneous lookup is supported in C++20 //! \todo Use unordered_map when heterogeneous lookup is supported in C++20
// std::unordered_map<std::string, Info> dic_; //! \todo std::unordered_map<std::string, Info> dic_;
std::map<std::string, Info, std::less<>> dic_; std::map<std::string, Info, std::less<>> dic_;
bool ignore_case_; bool ignore_case_;
@ -3068,7 +3068,7 @@ inline size_t Recovery::parse_core(const char *s, size_t n,
c.cut_stack.back() = true; c.cut_stack.back() = true;
if (c.cut_stack.size() == 1) { if (c.cut_stack.size() == 1) {
// TODO: Remove unneeded entries in packrat memoise table //! \todo Remove unneeded entries in packrat memoise table
} }
} }

View file

@ -245,7 +245,6 @@ UnZip::ErrorCode UnzipPrivate::openArchive(QIODevice* dev)
\internal Parses a local header record and makes some consistency check \internal Parses a local header record and makes some consistency check
with the information stored in the Central Directory record for this entry with the information stored in the Central Directory record for this entry
that has been previously parsed. that has been previously parsed.
\todo Optional consistency check (as a ExtractionOptions flag)
local file header signature 4 bytes (0x04034b50) local file header signature 4 bytes (0x04034b50)
version needed to extract 2 bytes version needed to extract 2 bytes
@ -262,6 +261,7 @@ UnZip::ErrorCode UnzipPrivate::openArchive(QIODevice* dev)
file name (variable size) file name (variable size)
extra field (variable size) extra field (variable size)
*/ */
//! \todo Optional consistency check (as a ExtractionOptions flag)
UnZip::ErrorCode UnzipPrivate::parseLocalHeaderRecord(const QString& path, const ZipEntryP& entry) UnZip::ErrorCode UnzipPrivate::parseLocalHeaderRecord(const QString& path, const ZipEntryP& entry)
{ {
Q_ASSERT(device); Q_ASSERT(device);

View file

@ -1207,7 +1207,7 @@ Response::ResponseCode AbstractServerSocketInterface::cmdRegisterAccount(const C
return Response::RespEmailBlackListed; return Response::RespEmailBlackListed;
} }
// TODO: Move this method outside of the db interface //! \todo Move this method outside of the db interface
QString errorString; QString errorString;
if (!sqlInterface->usernameIsValid(userName, errorString)) { if (!sqlInterface->usernameIsValid(userName, errorString)) {
if (servatrice->getEnableRegistrationAudit()) if (servatrice->getEnableRegistrationAudit())
@ -1330,7 +1330,7 @@ Response::ResponseCode AbstractServerSocketInterface::cmdRegisterAccount(const C
bool AbstractServerSocketInterface::tooManyRegistrationAttempts(const QString &ipAddress) bool AbstractServerSocketInterface::tooManyRegistrationAttempts(const QString &ipAddress)
{ {
// TODO: implement //! \todo implement
Q_UNUSED(ipAddress); Q_UNUSED(ipAddress);
return false; return false;
} }

View file

@ -27,9 +27,8 @@
* \class QxtMailMessage * \class QxtMailMessage
* \inmodule QxtNetwork * \inmodule QxtNetwork
* \brief The QxtMailMessage class encapsulates an e-mail according to RFC 2822 and related specifications * \brief The QxtMailMessage class encapsulates an e-mail according to RFC 2822 and related specifications
* TODO: {implicitshared}
*/ */
//! \todo {implicitshared}
#include "qxtmailmessage.h" #include "qxtmailmessage.h"
#include "qxtmail_p.h" #include "qxtmail_p.h"