File tree Expand file tree Collapse file tree 3 files changed +9
-9
lines changed Expand file tree Collapse file tree 3 files changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -95,7 +95,7 @@ class KDFOUNDATION_API Object : public EventReceiver
9595 void deleteLater ();
9696
9797 void setObjectName (const std::string &objectName) { m_objectName = objectName; }
98- std::string objectName () const { return m_objectName; }
98+ const std::string & objectName () const { return m_objectName; }
9999
100100 void event (EventReceiver *target, Event *ev) override ;
101101
Original file line number Diff line number Diff line change @@ -42,22 +42,22 @@ std::string Url::toLocalFile() const
4242 return m_path + m_fileName;
4343}
4444
45- std::string Url::scheme () const
45+ const std::string & Url::scheme () const
4646{
4747 return m_scheme;
4848}
4949
50- std::string Url::fileName () const
50+ const std::string & Url::fileName () const
5151{
5252 return m_fileName;
5353}
5454
55- std::string Url::path () const
55+ const std::string & Url::path () const
5656{
5757 return m_path;
5858}
5959
60- std::string Url::url () const
60+ const std::string & Url::url () const
6161{
6262 return m_url;
6363}
Original file line number Diff line number Diff line change @@ -25,10 +25,10 @@ class KDUTILS_API Url
2525
2626 bool isLocalFile () const ;
2727 std::string toLocalFile () const ;
28- std::string scheme () const ;
29- std::string fileName () const ;
30- std::string path () const ;
31- std::string url () const ;
28+ const std::string & scheme () const ;
29+ const std::string & fileName () const ;
30+ const std::string & path () const ;
31+ const std::string & url () const ;
3232 bool empty () const { return m_url.empty (); }
3333 bool isEmpty () const { return empty (); }
3434
You can’t perform that action at this time.
0 commit comments