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>
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.
<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)
{
deck = new DeckLoader(this, _deck.getDeckList());

View File

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

View File

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

View File

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

View File

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

View File

@ -206,7 +206,7 @@ void ChatView::appendMessage(QString message,
defaultFormat = QTextCharFormat();
if (!isUserMessage) {
if (messageType == Event_RoomSay::ChatHistory) {
defaultFormat.setForeground(Qt::gray); // FIXME : hardcoded color
defaultFormat.setForeground(Qt::gray); //! \todo hardcoded color
defaultFormat.setFontWeight(QFont::Light);
defaultFormat.setFontItalic(true);
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
}
} else {
defaultFormat.setForeground(Qt::darkGreen); // FIXME : hardcoded color
defaultFormat.setForeground(Qt::darkGreen); //! \todo hardcoded color
defaultFormat.setFontWeight(QFont::Bold);
}
}

View File

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

View File

@ -198,8 +198,8 @@ public:
/// @name Metadata getters
/// 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
{
return metadata;

View File

@ -501,7 +501,7 @@ void Server_Game::addPlayer(Server_AbstractUserInterface *userInterface,
allPlayersEver.insert(playerName);
// 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()) {
hostId = newParticipant->getPlayerId();
sendGameEventContainer(prepareGameEvent(Event_GameHostChanged(), hostId));

View File

@ -441,8 +441,8 @@ private:
size_t id;
};
// TODO: Use unordered_map when heterogeneous lookup is supported in C++20
// std::unordered_map<std::string, Info> dic_;
//! \todo Use unordered_map when heterogeneous lookup is supported in C++20
//! \todo std::unordered_map<std::string, Info> dic_;
std::map<std::string, Info, std::less<>> dic_;
bool ignore_case_;
@ -3068,7 +3068,7 @@ inline size_t Recovery::parse_core(const char *s, size_t n,
c.cut_stack.back() = true;
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
with the information stored in the Central Directory record for this entry
that has been previously parsed.
\todo Optional consistency check (as a ExtractionOptions flag)
local file header signature 4 bytes (0x04034b50)
version needed to extract 2 bytes
@ -262,6 +261,7 @@ UnZip::ErrorCode UnzipPrivate::openArchive(QIODevice* dev)
file name (variable size)
extra field (variable size)
*/
//! \todo Optional consistency check (as a ExtractionOptions flag)
UnZip::ErrorCode UnzipPrivate::parseLocalHeaderRecord(const QString& path, const ZipEntryP& entry)
{
Q_ASSERT(device);

View File

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

View File

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