From 003d0d3c26ceeb358e89192e89a1356d7eb685ac Mon Sep 17 00:00:00 2001 From: xarkes Date: Wed, 6 Mar 2019 21:30:39 +0100 Subject: [PATCH] Modified documentation format (#1240) --- src/CutterApplication.h | 14 +++--- src/Main.cpp | 4 +- src/common/BasicBlockHighlighter.cpp | 12 ++--- src/common/Configuration.cpp | 44 +++++++++--------- src/common/Configuration.h | 14 +++--- src/common/PythonManager.h | 4 +- src/common/RefreshDeferrer.h | 36 +++++++-------- src/core/Cutter.cpp | 10 ++-- src/core/Cutter.h | 50 ++++++++++---------- src/core/CutterCommon.h | 12 ++--- src/core/MainWindow.cpp | 8 ++-- src/core/MainWindow.h | 4 +- src/dialogs/EditMethodDialog.h | 28 ++++++------ src/dialogs/LinkTypeDialog.h | 32 ++++++------- src/dialogs/LoadNewTypesDialog.h | 18 ++++---- src/dialogs/NewFileDialog.h | 4 +- src/dialogs/RenameDialog.h | 16 +++---- src/dialogs/WelcomeDialog.cpp | 30 ++++++------ src/dialogs/WelcomeDialog.h | 6 +-- src/menus/DisassemblyContextMenu.h | 18 ++++---- src/plugins/PluginManager.h | 8 ++-- src/widgets/ClassesWidget.h | 30 ++++++------ src/widgets/CutterDockWidget.h | 14 +++--- src/widgets/DisassemblyWidget.h | 2 +- src/widgets/FunctionsWidget.h | 6 +-- src/widgets/OverviewView.h | 68 ++++++++++++++-------------- src/widgets/OverviewWidget.h | 12 ++--- src/widgets/TypesWidget.h | 28 ++++++------ 28 files changed, 264 insertions(+), 268 deletions(-) diff --git a/src/CutterApplication.h b/src/CutterApplication.h index 2bf51050..12534a2b 100644 --- a/src/CutterApplication.h +++ b/src/CutterApplication.h @@ -26,9 +26,9 @@ protected: bool event(QEvent *e); private: - /*! - * \brief Load and translations depending on Language settings - * \return true on success + /** + * @brief Load and translations depending on Language settings + * @return true on success */ bool loadTranslations(); @@ -38,15 +38,15 @@ private: }; -/*! - * \brief CutterProxyStyle is used to force shortcuts displaying in context menu +/** + * @brief CutterProxyStyle is used to force shortcuts displaying in context menu */ class CutterProxyStyle : public QProxyStyle { Q_OBJECT public: - /*! - * \brief it is enough to get notification about QMenu polishing to force shortcut displaying + /** + * @brief it is enough to get notification about QMenu polishing to force shortcut displaying */ void polish(QWidget *widget) override; }; diff --git a/src/Main.cpp b/src/Main.cpp index 0e66d231..62e23575 100644 --- a/src/Main.cpp +++ b/src/Main.cpp @@ -2,8 +2,8 @@ #include "CutterApplication.h" #include "core/MainWindow.h" -/*! - * \brief Migrate Settings used before Cutter 1.8 +/** + * @brief Migrate Settings used before Cutter 1.8 */ static void migrateSettings(QSettings &newSettings) { diff --git a/src/common/BasicBlockHighlighter.cpp b/src/common/BasicBlockHighlighter.cpp index e8565d12..66c01f9f 100644 --- a/src/common/BasicBlockHighlighter.cpp +++ b/src/common/BasicBlockHighlighter.cpp @@ -11,8 +11,8 @@ BasicBlockHighlighter::~BasicBlockHighlighter() } } -/*! - * \brief Highlight the basic block at address +/** + * @brief Highlight the basic block at address */ void BasicBlockHighlighter::highlight(RVA address, const QColor &color) { @@ -22,16 +22,16 @@ void BasicBlockHighlighter::highlight(RVA address, const QColor &color) bbMap[address] = block; } -/*! - * \brief Clear the basic block highlighting +/** + * @brief Clear the basic block highlighting */ void BasicBlockHighlighter::clear(RVA address) { bbMap.erase(address); } -/*! - * \brief Return a highlighted basic block +/** + * @brief Return a highlighted basic block * * If there is nothing to highlight at specified address, returns nullptr */ diff --git a/src/common/Configuration.cpp b/src/common/Configuration.cpp index 902e4f80..31532038 100644 --- a/src/common/Configuration.cpp +++ b/src/common/Configuration.cpp @@ -16,8 +16,8 @@ const QList kCutterQtThemesList = { Configuration *Configuration::mPtr = nullptr; -/*! - * \brief All asm.* options saved as settings. Values are the default values. +/** + * @brief All asm.* options saved as settings. Values are the default values. */ static const QHash asmOptions = { { "asm.esil", false }, @@ -136,28 +136,28 @@ void Configuration::resetAll() emit fontsUpdated(); } -/*! - * \brief get the current Locale set in Cutter's user configuration - * \return a QLocale object describes user's current locale +/** + * @brief get the current Locale set in Cutter's user configuration + * @return a QLocale object describes user's current locale */ QLocale Configuration::getCurrLocale() const { return s.value("locale", QLocale().system()).toLocale(); } -/*! - * \brief sets Cutter's locale - * \param l - a QLocale object describes the locate to configure +/** + * @brief sets Cutter's locale + * @param l - a QLocale object describes the locate to configure */ void Configuration::setLocale(const QLocale &l) { s.setValue("locale", l); } -/*! - * \brief set Cutter's interface language by a given locale name - * \param language - a string represents the name of a locale language - * \return true on success +/** + * @brief set Cutter's interface language by a given locale name + * @param language - a string represents the name of a locale language + * @return true on success */ bool Configuration::setLocaleByName(const QString &language) { @@ -353,10 +353,10 @@ QString Configuration::getLogoFile() : QString(":/img/cutter_plain.svg"); } -/*! - * \brief Configuration::setColor sets the local Cutter configuration color - * \param name Color Name - * \param color The color you want to set +/** + * @brief Configuration::setColor sets the local Cutter configuration color + * @param name Color Name + * @param color The color you want to set */ void Configuration::setColor(const QString &name, const QColor &color) { @@ -471,9 +471,9 @@ void Configuration::setConfig(const QString &key, const QVariant &value) Core()->setConfig(key, value); } -/*! - * \brief this function will gather and return available translation for Cutter - * \return a list of all available translations +/** + * @brief this function will gather and return available translation for Cutter + * @return a list of all available translations */ QStringList Configuration::getAvailableTranslations() { @@ -514,9 +514,9 @@ QStringList Configuration::getAvailableTranslations() return languages << QLatin1String("English"); } -/*! - * \brief check if this is the first time Cutter's is executed on this computer - * \return true if this is first execution; otherwise returns false. +/** + * @brief check if this is the first time Cutter's is executed on this computer + * @return true if this is first execution; otherwise returns false. */ bool Configuration::isFirstExecution() { diff --git a/src/common/Configuration.h b/src/common/Configuration.h index bf83de24..e7a9296b 100644 --- a/src/common/Configuration.h +++ b/src/common/Configuration.h @@ -97,23 +97,23 @@ public: QString getColorTheme() const { return s.value("theme", "cutter").toString(); } void setColorTheme(const QString &theme); - /*! - * \brief Get the value of a config var either from r2 or settings, depending on the key. + /** + * @brief Get the value of a config var either from r2 or settings, depending on the key. */ QVariant getConfigVar(const QString &key); bool getConfigBool(const QString &key); int getConfigInt(const QString &key); QString getConfigString(const QString &key); - /*! - * \brief Set the value of a config var either to r2 or settings, depending on the key. + /** + * @brief Set the value of a config var either to r2 or settings, depending on the key. */ void setConfig(const QString &key, const QVariant &value); bool isFirstExecution(); - /*! - * \brief Get list of available translation directories (depends on configuration and OS) - * \return list of directories + /** + * @brief Get list of available translation directories (depends on configuration and OS) + * @return list of directories */ QStringList getTranslationsDirectories() const; diff --git a/src/common/PythonManager.h b/src/common/PythonManager.h index b00a9b30..9c94c76c 100644 --- a/src/common/PythonManager.h +++ b/src/common/PythonManager.h @@ -29,8 +29,8 @@ public: void restoreThread(); void saveThread(); - /*! - * \brief RAII Helper class to call restoreThread() and saveThread() automatically + /** + * @brief RAII Helper class to call restoreThread() and saveThread() automatically * * As long as an object of this class is in scope, the Python thread will remain restored. */ diff --git a/src/common/RefreshDeferrer.h b/src/common/RefreshDeferrer.h index 178b65a4..56737a51 100644 --- a/src/common/RefreshDeferrer.h +++ b/src/common/RefreshDeferrer.h @@ -10,8 +10,8 @@ class RefreshDeferrer; using RefreshDeferrerParams = void *; using RefreshDeferrerParamsResult = void *; -/*! - * \brief Abstract class for accumulating params in RefreshDeferrer +/** + * @brief Abstract class for accumulating params in RefreshDeferrer */ class RefreshDeferrerAccumulator { @@ -21,31 +21,31 @@ public: virtual ~RefreshDeferrerAccumulator() = default; protected: - /*! - * \brief Add a new param to the accumulator + /** + * @brief Add a new param to the accumulator */ virtual void accumulate(RefreshDeferrerParams params) =0; - /*! - * \brief Ignore the incoming params. Useful for freeing if necessary. + /** + * @brief Ignore the incoming params. Useful for freeing if necessary. */ virtual void ignoreParams(RefreshDeferrerParams params) =0; - /*! - * \brief Clear the current accumulator + /** + * @brief Clear the current accumulator */ virtual void clear() =0; - /*! - * \brief Return the final result of the accumulation + /** + * @brief Return the final result of the accumulation */ virtual RefreshDeferrerParamsResult result() =0; }; -/*! - * \brief Accumulator which simply replaces the current value by an incoming new one - * \tparam T The type of the param to store +/** + * @brief Accumulator which simply replaces the current value by an incoming new one + * @tparam T The type of the param to store * * This accumulator takes the ownership of all params passed to it and deletes them automatically if not needed anymore! */ @@ -57,7 +57,7 @@ private: bool replaceIfNull; public: - /*! + /** * \param Determines whether, if nullptr is passed, the current value should be replaced or kept. */ explicit ReplacingRefreshDeferrerAccumulator(bool replaceIfNull = true) @@ -95,8 +95,8 @@ protected: } }; -/*! - * \brief Helper class for deferred refreshing in Widgets +/** + * @brief Helper class for deferred refreshing in Widgets * * This class can handle the logic necessary to defer the refreshing of widgets when they are not visible. * It contains an optional RefreshDeferrerAccumulator, which can be used to accumulate incoming events while @@ -138,8 +138,8 @@ private: bool dirty = false; public: - /*! - * \param acc The accumulator (can be nullptr). The RefreshDeferrer takes the ownership! + /** + * @param acc The accumulator (can be nullptr). The RefreshDeferrer takes the ownership! */ explicit RefreshDeferrer(RefreshDeferrerAccumulator *acc, QObject *parent = nullptr); ~RefreshDeferrer() override; diff --git a/src/core/Cutter.cpp b/src/core/Cutter.cpp index e8275acc..c874dc10 100644 --- a/src/core/Cutter.cpp +++ b/src/core/Cutter.cpp @@ -415,11 +415,11 @@ bool CutterCore::tryFile(QString path, bool rw) return true; } -/*! - * \brief Opens a file using r2 API - * \param path Path to file - * \param mapaddr Map Address - * \return bool +/** + * @brief Opens a file using r2 API + * @param path Path to file + * @param mapaddr Map Address + * @return bool */ bool CutterCore::openFile(QString path, RVA mapaddr) { diff --git a/src/core/Cutter.h b/src/core/Cutter.h index fd870b1d..c886cf04 100644 --- a/src/core/Cutter.h +++ b/src/core/Cutter.h @@ -106,8 +106,8 @@ public: void setImmediateBase(const QString &r2BaseName, RVA offset = RVA_INVALID); void setCurrentBits(int bits, RVA offset = RVA_INVALID); - /*! - * \brief Changes immediate displacement to structure offset + /** + * @brief Changes immediate displacement to structure offset * This function makes use of the "ta" command of r2 to apply structure * offset to the immediate displacement used in the given instruction * \param structureOffset The name of struct which will be applied @@ -291,38 +291,38 @@ public: QList getAllResources(); QList getAllVTables(); - /*! - * \return all loaded types + /** + * @return all loaded types */ QList getAllTypes(); - /*! - * \return all loaded primitive types + /** + * @return all loaded primitive types */ QList getAllPrimitiveTypes(); - /*! - * \return all loaded unions + /** + * @return all loaded unions */ QList getAllUnions(); - /*! - * \return all loaded structs + /** + * @return all loaded structs */ QList getAllStructs(); - /*! - * \return all loaded enums + /** + * @return all loaded enums */ QList getAllEnums(); - /*! - * \return all loaded typedefs + /** + * @return all loaded typedefs */ QList getAllTypedefs(); - /*! - * \brief Adds new types + /** + * @brief Adds new types * It first uses the r_parse_c_string() function from radare2 API to parse the * supplied C file (in the form of a string). If there were errors, they are displayed. * If there were no errors, it uses sdb_query_lines() function from radare2 API @@ -333,10 +333,10 @@ public: QString addTypes(const char *str); QString addTypes(const QString &str) { return addTypes(str.toUtf8().constData()); } - /*! - * \brief Checks if the given address is mapped to a region - * \param addr The address to be checked - * \return true if addr is mapped, false otherwise + /** + * @brief Checks if the given address is mapped to a region + * @param addr The address to be checked + * @return true if addr is mapped, false otherwise */ bool isAddressMapped(RVA addr); @@ -394,19 +394,19 @@ signals: void projectSaved(bool successfully, const QString &name); - /*! + /** * emitted when config regarding disassembly display changes */ void asmOptionsChanged(); - /*! + /** * emitted when config regarding graph display changes */ void graphOptionsChanged(); - /*! - * \brief seekChanged is emitted each time radare2 seek value is modified - * \param offset + /** + * @brief seekChanged is emitted each time radare2 seek value is modified + * @param offset */ void seekChanged(RVA offset); diff --git a/src/core/CutterCommon.h b/src/core/CutterCommon.h index 3a5d615a..8c8e39ea 100644 --- a/src/core/CutterCommon.h +++ b/src/core/CutterCommon.h @@ -25,18 +25,18 @@ // Global information for Cutter #define APPNAME "Cutter" -/*! - * \brief Type to be used for all kinds of addresses/offsets in r2 address space. +/** + * @brief Type to be used for all kinds of addresses/offsets in r2 address space. */ typedef ut64 RVA; -/*! - * \brief Maximum value of RVA. Do NOT use this for specifying invalid values, use RVA_INVALID instead. +/** + * @brief Maximum value of RVA. Do NOT use this for specifying invalid values, use RVA_INVALID instead. */ #define RVA_MAX UT64_MAX -/*! - * \brief Value for specifying an invalid RVA. +/** + * @brief Value for specifying an invalid RVA. */ #define RVA_INVALID RVA_MAX diff --git a/src/core/MainWindow.cpp b/src/core/MainWindow.cpp index 3df2b419..bf98359f 100644 --- a/src/core/MainWindow.cpp +++ b/src/core/MainWindow.cpp @@ -433,8 +433,8 @@ void MainWindow::openNewFileFailed() mb.exec(); } -/*! - * \brief displays the WelocmeDialog +/** + * @brief displays the WelocmeDialog * * Upon first execution of Cutter, the WelcomeDialog would be showed to the user. * The Welcome dialog would be showed after a reset of Cutter's preferences by the user. @@ -1179,8 +1179,8 @@ void MainWindow::addDockWidgetAction(QDockWidget *dockWidget, QAction *action) this->dockWidgetActions[action] = dockWidget; } -/*! - * \brief Show a warning message box. +/** + * @brief Show a warning message box. * * This API can either be used in Cutter internals, or by Python plugins. */ diff --git a/src/core/MainWindow.h b/src/core/MainWindow.h index def3d81f..92bf5f04 100644 --- a/src/core/MainWindow.h +++ b/src/core/MainWindow.h @@ -79,13 +79,13 @@ public: void initUI(); - /*! + /** * @param quit whether to show destructive button in dialog * @return if quit is true, false if the application should not close */ bool saveProject(bool quit = false); - /*! + /** * @param quit whether to show destructive button in dialog * @return false if the application should not close */ diff --git a/src/dialogs/EditMethodDialog.h b/src/dialogs/EditMethodDialog.h index 8e6ed978..09dc3196 100644 --- a/src/dialogs/EditMethodDialog.h +++ b/src/dialogs/EditMethodDialog.h @@ -17,8 +17,8 @@ class EditMethodDialog : public QDialog Q_OBJECT public: - /*! - * \param classFixed whether the user should be able to change the class. If false, a QComboBox will be shown, otherwise a plain QLabel. + /** + * @param classFixed whether the user should be able to change the class. If false, a QComboBox will be shown, otherwise a plain QLabel. */ explicit EditMethodDialog(bool classFixed, QWidget *parent = nullptr); ~EditMethodDialog(); @@ -29,24 +29,24 @@ public: QString getClass(); AnalMethodDescription getMethod(); - /*! - * \brief Helper function to display the dialog + /** + * @brief Helper function to display the dialog * - * \param title title of the dialog - * \param classFixed whether the user should be able to change the class - * \param className initial class name, will be overwritten if the user changed the class - * \param desc initial data for the method information - * \return whether the dialog was accepted by the user + * @param title title of the dialog + * @param classFixed whether the user should be able to change the class + * @param className initial class name, will be overwritten if the user changed the class + * @param desc initial data for the method information + * @return whether the dialog was accepted by the user */ static bool showDialog(const QString &title, bool classFixed, QString *className, AnalMethodDescription *desc, QWidget *parent = nullptr); - /*! - * \brief Show the dialog to add a new method a given class + /** + * @brief Show the dialog to add a new method a given class */ static void newMethod(QString className = nullptr, const QString &meth = QString(), QWidget *parent = nullptr); - /*! - * \brief Show the dialog to edit a given method of a given class + /** + * @brief Show the dialog to edit a given method of a given class */ static void editMethod(const QString &className, const QString &meth, QWidget *parent = nullptr); @@ -62,7 +62,7 @@ private: QComboBox *classComboBox = nullptr; QLabel *classLabel = nullptr; - /*! + /** * This will only be used when the dialog was created with classFixed = true in order to remember the class name. */ QString fixedClass; diff --git a/src/dialogs/LinkTypeDialog.h b/src/dialogs/LinkTypeDialog.h index 53020f23..f5fbc972 100644 --- a/src/dialogs/LinkTypeDialog.h +++ b/src/dialogs/LinkTypeDialog.h @@ -16,46 +16,46 @@ public: explicit LinkTypeDialog(QWidget *parent = nullptr); ~LinkTypeDialog(); - /*! - * \brief Sets the default type which will be displayed in the combo box - * \param type Default type to be used as default type + /** + * @brief Sets the default type which will be displayed in the combo box + * @param type Default type to be used as default type */ void setDefaultType(const QString &type); - /*! - * \brief Sets the value of the default address which will be displayed + /** + * @brief Sets the value of the default address which will be displayed * If the given address is linked to a type, then it also sets the default * type to the currently linked type - * \param address The address to be used as default address + * @param address The address to be used as default address */ void setDefaultAddress(QString address); private slots: - /*! - * \brief Overrides the done() method of QDialog + /** + * @brief Overrides the done() method of QDialog * On clicking the Ok button, it links a valid address to a type. * If "(No Type)" is selected as type, it removes the link. * In case of an invalid address, it displays error message - * \param r The value which will be returned by exec() + * @param r The value which will be returned by exec() */ void done(int r) override; - /*! - * \brief Executed whenever the text inside exprLineEdit changes + /** + * @brief Executed whenever the text inside exprLineEdit changes * If expression evaluates to valid address, it is displayed in addressLineEdit * Otherwise "Invalid Address" is shown in addressLineEdit - * \param text The current value of exprLineEdit + * @param text The current value of exprLineEdit */ void on_exprLineEdit_textChanged(const QString &text); private: Ui::LinkTypeDialog *ui; - /*! - * \brief Used for finding the type which is linked to the given address - * \param address - * \return The type linked to "address" if it exists, or empty string otherwise + /** + * @brief Used for finding the type which is linked to the given address + * @param address + * @return The type linked to "address" if it exists, or empty string otherwise */ QString findLinkedType(RVA address); }; diff --git a/src/dialogs/LoadNewTypesDialog.h b/src/dialogs/LoadNewTypesDialog.h index 802ad0e5..32b36141 100644 --- a/src/dialogs/LoadNewTypesDialog.h +++ b/src/dialogs/LoadNewTypesDialog.h @@ -18,22 +18,22 @@ public: ~LoadNewTypesDialog(); private slots: - /*! - * \brief Executed when the user clicks the selectFileButton + /** + * @brief Executed when the user clicks the selectFileButton * Opens a File Dialog from where the user can select a file from where * the types will be loaded. */ void on_selectFileButton_clicked(); - /*! - * \brief Executed whenever the text inside the textbox changes + /** + * @brief Executed whenever the text inside the textbox changes * When the text box is empty, the OK button is disabled. */ void on_plainTextEdit_textChanged(); - /*! - * \brief done Closes the dialog and sets its result code to r - * \param r The value which will be returned by exec() + /** + * @brief done Closes the dialog and sets its result code to r + * @param r The value which will be returned by exec() */ void done(int r) override; @@ -42,8 +42,8 @@ private: SyntaxHighlighter *syntaxHighLighter; signals: - /*! - * \brief Emitted when new types are loaded + /** + * @brief Emitted when new types are loaded */ void newTypesLoaded(); }; diff --git a/src/dialogs/NewFileDialog.h b/src/dialogs/NewFileDialog.h index 933bfc5e..e89ac3fb 100644 --- a/src/dialogs/NewFileDialog.h +++ b/src/dialogs/NewFileDialog.h @@ -46,12 +46,12 @@ protected: private: std::unique_ptr ui; - /*! + /** * @return true if list is not empty */ bool fillRecentFilesList(); - /*! + /** * @return true if list is not empty */ bool fillProjectsList(); diff --git a/src/dialogs/RenameDialog.h b/src/dialogs/RenameDialog.h index 666c83b3..855075de 100644 --- a/src/dialogs/RenameDialog.h +++ b/src/dialogs/RenameDialog.h @@ -8,8 +8,8 @@ namespace Ui { class RenameDialog; } -/*! - * \brief General Dialog for entering a name +/** + * @brief General Dialog for entering a name */ class RenameDialog : public QDialog { @@ -24,13 +24,13 @@ public: void setPlaceholderText(const QString &text); - /*! - * \brief Helper function to display and execute the dialog + /** + * @brief Helper function to display and execute the dialog * - * \param title title of the dialog - * \param name initial name, will be overwritten if the user entered something else - * \param placeholder placeholder text for the QLineEdit - * \return whether the dialog was accepted by the user + * @param title title of the dialog + * @param name initial name, will be overwritten if the user entered something else + * @param placeholder placeholder text for the QLineEdit + * @return whether the dialog was accepted by the user */ static bool showDialog(const QString &title, QString *name, const QString &placeholder, QWidget *parent = nullptr); diff --git a/src/dialogs/WelcomeDialog.cpp b/src/dialogs/WelcomeDialog.cpp index cdd5ad4e..a70f47ef 100644 --- a/src/dialogs/WelcomeDialog.cpp +++ b/src/dialogs/WelcomeDialog.cpp @@ -7,9 +7,9 @@ #include "ui_WelcomeDialog.h" -/*! - * \brief Constructs a WelcomeDialog object - * \param parent +/** + * @brief Constructs a WelcomeDialog object + * @param parent */ WelcomeDialog::WelcomeDialog(QWidget *parent) : QDialog(parent), @@ -38,17 +38,17 @@ WelcomeDialog::WelcomeDialog(QWidget *parent) : } -/*! - * \brief Destroys the WelcomeDialog +/** + * @brief Destroys the WelcomeDialog */ WelcomeDialog::~WelcomeDialog() { delete ui; } -/*! - * \brief change Cutter's QT Theme as selected by the user - * \param index - a Slot being called after theme's value changes its index +/** + * @brief change Cutter's QT Theme as selected by the user + * @param index - a Slot being called after theme's value changes its index */ void WelcomeDialog::on_themeComboBox_currentIndexChanged(int index) { @@ -63,9 +63,9 @@ void WelcomeDialog::on_themeComboBox_currentIndexChanged(int index) ui->logoSvgWidget->load(Config()->getLogoFile()); } -/*! - * \brief change Cutter's interface language as selected by the user - * \param index - a Slot being called after language combo box value changes its index +/** + * @brief change Cutter's interface language as selected by the user + * @param index - a Slot being called after language combo box value changes its index */ void WelcomeDialog::onLanguageComboBox_currentIndexChanged(int index) { @@ -80,8 +80,8 @@ void WelcomeDialog::onLanguageComboBox_currentIndexChanged(int index) mb.exec(); } -/*! - * \brief show Cutter's About dialog +/** + * @brief show Cutter's About dialog */ void WelcomeDialog::on_checkUpdateButton_clicked() { @@ -90,8 +90,8 @@ void WelcomeDialog::on_checkUpdateButton_clicked() a->open(); } -/*! - * \brief accept user preferences, close the window and continue Cutter's execution +/** + * @brief accept user preferences, close the window and continue Cutter's execution */ void WelcomeDialog::on_continueButton_clicked() { diff --git a/src/dialogs/WelcomeDialog.h b/src/dialogs/WelcomeDialog.h index 95ab73e9..6f8c423a 100644 --- a/src/dialogs/WelcomeDialog.h +++ b/src/dialogs/WelcomeDialog.h @@ -5,9 +5,9 @@ namespace Ui { -/*! - * \class WelcomeDialog - * \brief The WelcomeDialog class will show the user the Welcome windows +/** + * @class WelcomeDialog + * @brief The WelcomeDialog class will show the user the Welcome windows * upon first execution of Cutter. * * Upon first execution of Cutter, the WelcomeDialog would be showed to the user. diff --git a/src/menus/DisassemblyContextMenu.h b/src/menus/DisassemblyContextMenu.h index b918a461..06c3b484 100644 --- a/src/menus/DisassemblyContextMenu.h +++ b/src/menus/DisassemblyContextMenu.h @@ -20,9 +20,9 @@ public slots: void setOffset(RVA offset); void setCanCopy(bool enabled); - /*! - * \brief Sets the value of curHighlightedWord - * \param text The current highlighted word + /** + * @brief Sets the value of curHighlightedWord + * @param text The current highlighted word */ void setCurHighlightedWord(const QString &text); @@ -61,16 +61,16 @@ private slots: void on_actionSetToData_triggered(); void on_actionSetToDataEx_triggered(); - /*! - * \brief Executed on selecting an offset from the structureOffsetMenu + /** + * @brief Executed on selecting an offset from the structureOffsetMenu * Uses the applyStructureOffset() function of CutterCore to apply the * structure offset * \param action The action which trigered the event */ void on_actionStructureOffsetMenu_triggered(QAction *action); - /*! - * \brief Executed on selecting the "Link Type to Address" option + /** + * @brief Executed on selecting the "Link Type to Address" option * Opens the LinkTypeDialog box from where the user can link the address * to a type */ @@ -91,8 +91,8 @@ private: QKeySequence getDisplayOptionsSequence() const; QList getAddBPSequence() const; - /*! - * \return the shortcut key for "Link Type to Address" option + /** + * @return the shortcut key for "Link Type to Address" option */ QKeySequence getLinkTypeSequence() const; diff --git a/src/plugins/PluginManager.h b/src/plugins/PluginManager.h index dcab409c..1f71b919 100644 --- a/src/plugins/PluginManager.h +++ b/src/plugins/PluginManager.h @@ -17,13 +17,13 @@ public: PluginManager(); ~PluginManager(); - /*! - * \brief Load all plugins, should be called once on application start + /** + * @brief Load all plugins, should be called once on application start */ void loadPlugins(); - /*! - * \brief Destroy all loaded plugins, should be called once on application shutdown + /** + * @brief Destroy all loaded plugins, should be called once on application shutdown */ void destroyPlugins(); diff --git a/src/widgets/ClassesWidget.h b/src/widgets/ClassesWidget.h index d3322bb1..2a42d734 100644 --- a/src/widgets/ClassesWidget.h +++ b/src/widgets/ClassesWidget.h @@ -18,36 +18,36 @@ class QTreeWidgetItem; class MainWindow; class ClassesWidget; -/*! - * \brief Common abstract base class for Bin and Anal classes models +/** + * @brief Common abstract base class for Bin and Anal classes models */ class ClassesModel: public QAbstractItemModel { public: enum Columns { NAME = 0, TYPE, OFFSET, VTABLE, COUNT }; - /*! - * \brief values for TypeRole data + /** + * @brief values for TypeRole data */ enum class RowType { Class = 0, Base, VTable, Method, Field }; - /*! - * \brief Offset role of data for QModelIndex + /** + * @brief Offset role of data for QModelIndex * * will contain values of type RVA */ static const int OffsetRole = Qt::UserRole; - /*! - * \brief Name role of data for QModelIndex + /** + * @brief Name role of data for QModelIndex * * will contain values of QString, used for sorting, * as well as identifying classes and methods */ static const int NameRole = Qt::UserRole + 1; - /*! - * \brief Type role of data for QModelIndex + /** + * @brief Type role of data for QModelIndex * * will contain values of RowType */ @@ -87,8 +87,8 @@ class AnalClassesModel: public ClassesModel Q_OBJECT private: - /*! - * \brief List entry below a class + /** + * @brief List entry below a class * * This roughly corresponds to attributes of r2 anal classes, which means it is not an attribute in the sense of * a class member variable, but any kind of sub-info associated with the class. @@ -104,15 +104,15 @@ private: Attribute(Type type, const QVariant &data) : type(type), data(data) {} }; - /*! + /** * This must always stay sorted alphabetically. */ QList classes; RefreshDeferrer *refreshDeferrer; - /*! - * \brief Cache for class attributes + /** + * @brief Cache for class attributes * * Maps class names to a list of Attributes. * This is filled only when the attributes of a specific class are requested. diff --git a/src/widgets/CutterDockWidget.h b/src/widgets/CutterDockWidget.h index 9bd7c3e7..958f92f0 100644 --- a/src/widgets/CutterDockWidget.h +++ b/src/widgets/CutterDockWidget.h @@ -17,9 +17,9 @@ public: bool eventFilter(QObject *object, QEvent *event) override; bool isVisibleToUser() { return isVisibleToUserCurrent; } - /*! - * \brief Convenience method for creating and registering a RefreshDeferrer without any parameters - * \param refreshNowFunc lambda taking no parameters, called when a refresh should occur + /** + * @brief Convenience method for creating and registering a RefreshDeferrer without any parameters + * @param refreshNowFunc lambda taking no parameters, called when a refresh should occur */ template RefreshDeferrer *createRefreshDeferrer(Func refreshNowFunc) @@ -32,10 +32,10 @@ public: return deferrer; } - /*! - * \brief Convenience method for creating and registering a RefreshDeferrer with a replacing Accumulator - * \param replaceIfNull passed to the ReplacingRefreshDeferrerAccumulator - * \param refreshNowFunc lambda taking a single parameter of type ParamResult, called when a refresh should occur + /** + * @brief Convenience method for creating and registering a RefreshDeferrer with a replacing Accumulator + * @param replaceIfNull passed to the ReplacingRefreshDeferrerAccumulator + * @param refreshNowFunc lambda taking a single parameter of type ParamResult, called when a refresh should occur */ template RefreshDeferrer *createReplacingRefreshDeferrer(bool replaceIfNull, Func refreshNowFunc) diff --git a/src/widgets/DisassemblyWidget.h b/src/widgets/DisassemblyWidget.h index 6a1ccd37..ab965f67 100644 --- a/src/widgets/DisassemblyWidget.h +++ b/src/widgets/DisassemblyWidget.h @@ -55,7 +55,7 @@ private: QString curHighlightedWord; - /*! + /** * offset of lines below the first line of the current seek */ int cursorLineOffset; diff --git a/src/widgets/FunctionsWidget.h b/src/widgets/FunctionsWidget.h index d450bd77..aa26b290 100644 --- a/src/widgets/FunctionsWidget.h +++ b/src/widgets/FunctionsWidget.h @@ -63,7 +63,7 @@ public: QVariant data(const QModelIndex &index, int role) const; QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const; - /*! + /** * @return true if the index changed */ bool updateCurrentIndex(); @@ -139,8 +139,4 @@ private: void setScrollMode(); }; - - - - #endif // FUNCTIONSWIDGET_H diff --git a/src/widgets/OverviewView.h b/src/widgets/OverviewView.h index b06781a5..782ce085 100644 --- a/src/widgets/OverviewView.h +++ b/src/widgets/OverviewView.h @@ -11,8 +11,8 @@ class OverviewView : public GraphView Q_OBJECT signals: - /* - * \brief signal when mouse is pressed or moved so that + /** + * @brief signal when mouse is pressed or moved so that * Graph can refresh its contents corresponded with Overview */ void mouseMoved(); @@ -21,13 +21,13 @@ public: OverviewView(QWidget *parent); ~OverviewView() override; - /* - * \brief a rect on Overview to show where you are on Graph + /** + * @brief a rect on Overview to show where you are on Graph */ QRectF rangeRect; - /* - * \brief Graph access this function to set minimum set of the data + /** + * @brief Graph access this function to set minimum set of the data * @param baseWidth width of Graph when it computed the blocks * @param baseHeigh height of Graph when it computed the blocks * @param baseBlocks computed blocks passed by Graph @@ -35,80 +35,80 @@ public: void setData(int baseWidth, int baseHeight, std::unordered_map baseBlocks); public slots: - /* - * \brief refresh the view and adjust the scale + /** + * @brief refresh the view and adjust the scale */ void refreshView(); private slots: - /* - * \brief update Colors. + /** + * @brief update Colors. * for example this will be called when the theme is changed. */ void colorsUpdatedSlot(); protected: - /* - * \brief mousePressEvent to start moving the rect. + /** + * @brief mousePressEvent to start moving the rect. */ void mousePressEvent(QMouseEvent *event) override; - /* - * \brief mouseReleaseEvent to tell not to move the rect anymore. + /** + * @brief mouseReleaseEvent to tell not to move the rect anymore. */ void mouseReleaseEvent(QMouseEvent *event) override; - /* - * \brief mouseMoveEvent to move the rect. + /** + * @brief mouseMoveEvent to move the rect. */ void mouseMoveEvent(QMouseEvent *event) override; - /* - * \brief override this to prevent scrolling + /** + * @brief override this to prevent scrolling */ void wheelEvent(QWheelEvent *event) override; private: - /* - * \brief this will be handled in mouse events to move the rect properly + /** + * @brief this will be handled in mouse events to move the rect properly * along with the mouse. */ bool mouseActive = false; - /* - * \brief save the initial distance + /** + * @brief save the initial distance * between the point where the mouse was pressed and the point of the rect * so as to change the rect point properly along with mouse. */ QPointF initialDiff; - /* - * \brief draw the computed blocks passed by Graph + /** + * @brief draw the computed blocks passed by Graph */ virtual void drawBlock(QPainter &p, GraphView::GraphBlock &block) override; - /* - * \brief override the edgeConfiguration so as to + /** + * @brief override the edgeConfiguration so as to * adjust the width of the edges by the scale * @return EdgeConfiguration */ virtual GraphView::EdgeConfiguration edgeConfiguration(GraphView::GraphBlock &from, GraphView::GraphBlock *to) override; - /* - * \brief override the paintEvent to draw the rect on Overview + /** + * @brief override the paintEvent to draw the rect on Overview */ void paintEvent(QPaintEvent *event) override; - /* - * \brief if the mouse is in the rect in Overview. + /** + * @brief if the mouse is in the rect in Overview. */ bool mouseContainsRect(QMouseEvent *event); - /* - * \brief base background color changing depending on the theme + /** + * @brief base background color changing depending on the theme */ QColor disassemblyBackgroundColor; - /* - * \brief color for each node changing depending on the theme + /** + * @brief color for each node changing depending on the theme */ QColor graphNodeColor; }; diff --git a/src/widgets/OverviewWidget.h b/src/widgets/OverviewWidget.h index 10a6410a..229571ab 100644 --- a/src/widgets/OverviewWidget.h +++ b/src/widgets/OverviewWidget.h @@ -17,20 +17,20 @@ public: private: RefreshDeferrer *refreshDeferrer; - /* - * \brief this takes care of scaling the overview when the widget is resized + /** + * @brief this takes care of scaling the overview when the widget is resized */ void resizeEvent(QResizeEvent *event) override; private slots: - /* - * \brief update the overview + /** + * @brief update the overview */ void updateContents(); signals: - /* - * \brief emit signal to update the rect + /** + * @brief emit signal to update the rect */ void resized(); }; diff --git a/src/widgets/TypesWidget.h b/src/widgets/TypesWidget.h index 7421693f..ee4729b3 100644 --- a/src/widgets/TypesWidget.h +++ b/src/widgets/TypesWidget.h @@ -78,34 +78,34 @@ public: private slots: void refreshTypes(); - /*! - * \brief Show custom context menu - * \param pt Position of the place where the right mouse button was clicked + /** + * @brief Show custom context menu + * @param pt Position of the place where the right mouse button was clicked */ void showTypesContextMenu(const QPoint &pt); - /*! - * \brief Executed on clicking the Export Types option in the context menu + /** + * @brief Executed on clicking the Export Types option in the context menu * It shows the user a file dialog box to select a file where the types * will be exported. It uses the "tc" command of radare2 to export the types. */ void on_actionExport_Types_triggered(); - /*! - * \brief Executed on clicking the Load New types option in the context menu + /** + * @brief Executed on clicking the Load New types option in the context menu * It will open the LoadNewTypesDialog where the user can either enter the * types manually, or can select a file from where the types will be loaded */ void on_actionLoad_New_Types_triggered(); - /*! - * \brief Executed on clicking the Delete Type option in the context menu + /** + * @brief Executed on clicking the Delete Type option in the context menu * Upon confirmation from the user, it will delete the selected type. */ void on_actionDelete_Type_triggered(); - /*! - * \brief Executed on clicking the Link To Address option in the context menu + /** + * @brief Executed on clicking the Link To Address option in the context menu * Opens the LinkTypeDialog box from where the user can link a address to a type */ void on_actionLink_Type_To_Address_triggered(); @@ -120,9 +120,9 @@ private: void setScrollMode(); - /*! - * \brief Sets the contents of the ComboBox to the supplied contents - * \param categories The list of categories which has to be added to the ComboBox + /** + * @brief Sets the contents of the ComboBox to the supplied contents + * @param categories The list of categories which has to be added to the ComboBox */ void refreshCategoryCombo(const QStringList &categories); };