summaryrefslogtreecommitdiffstats
path: root/src/reflist.h
diff options
context:
space:
mode:
authorDimitri van Heesch <doxygen@gmail.com>2021-04-11 19:22:59 (GMT)
committerDimitri van Heesch <doxygen@gmail.com>2021-04-22 17:34:13 (GMT)
commit592aaa4f17d73ec8c475df0f44efaea8cc4d575c (patch)
tree3cfd68cec756661045ee25c906a8d8f4bddf7a6a /src/reflist.h
parent98c67549bc3cd855873e0ef5eeab7c6410699d78 (diff)
downloadDoxygen-592aaa4f17d73ec8c475df0f44efaea8cc4d575c.zip
Doxygen-592aaa4f17d73ec8c475df0f44efaea8cc4d575c.tar.gz
Doxygen-592aaa4f17d73ec8c475df0f44efaea8cc4d575c.tar.bz2
Refactoring: remove implicit conversion from QCString to const char *
This commit changes the following in relation to string use - The implicit convert from 'QCString' to 'const char *' is removed - Strings parameters use 'const QCString &' as much as possible in favor over 'const char *' - 'if (s)' where s is a QCString has been replaced by 'if(!s.isEmpty())' - data() now always returns a valid C-string and not a 0-pointer. - when passing a string 's' to printf and related functions 'qPrint(s)' is used instead of 's.data()' - for empty string arguments 'QCString()' is used instead of '0' - The copy() operation has been removed - Where possible 'qstrcmp(a,b)==0' has been replaces by 'a==b' and 'qstrcmp(a,b)<0' has been replaced by 'a<b' - Parameters of string type that were default initialized with '= 0' are no initialized with '= QCString()'
Diffstat (limited to 'src/reflist.h')
-rw-r--r--src/reflist.h16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/reflist.h b/src/reflist.h
index f6444c5..6ab360b 100644
--- a/src/reflist.h
+++ b/src/reflist.h
@@ -32,13 +32,13 @@ class RefItem
public:
RefItem(int id,RefList *list) : m_id(id), m_list(list) {}
- void setText (const char *text) { m_text = text; }
- void setAnchor(const char *anchor) { m_anchor = anchor; }
- void setPrefix(const char *prefix) { m_prefix = prefix; }
- void setName (const char *name) { m_name = name; }
- void setTitle (const char *title) { m_title = title; }
- void setArgs (const char *args) { m_args = args; }
- void setGroup (const char *group) { m_group = group; }
+ void setText (const QCString &text) { m_text = text; }
+ void setAnchor(const QCString &anchor) { m_anchor = anchor; }
+ void setPrefix(const QCString &prefix) { m_prefix = prefix; }
+ void setName (const QCString &name) { m_name = name; }
+ void setTitle (const QCString &title) { m_title = title; }
+ void setArgs (const QCString &args) { m_args = args; }
+ void setGroup (const QCString &group) { m_group = group; }
void setScope (const Definition *scope) { m_scope = scope; }
QCString text() const { return m_text; }
@@ -83,7 +83,7 @@ class RefList
* @param pageTitle String representing the title of the list page.
* @param secTitle String representing the title of the section.
*/
- RefList(const char *listName, const char *pageTitle, const char *secTitle);
+ RefList(const QCString &listName, const QCString &pageTitle, const QCString &secTitle);
bool isEnabled() const;
/*! Adds a new item to the list.