diff --git a/src/frontends/qt4/Dialog.cpp b/src/frontends/qt4/Dialog.cpp index 40b4f37632..f4f69928d2 100644 --- a/src/frontends/qt4/Dialog.cpp +++ b/src/frontends/qt4/Dialog.cpp @@ -26,7 +26,7 @@ namespace frontend { Dialog::Dialog(GuiView & lv, std::string const & name) - : lyxview_(&lv), name_(name.c_str()) + : lyxview_(&lv), name_(name) {} @@ -34,7 +34,7 @@ Dialog::~Dialog() {} -std::string Dialog::name() const +std::string const & Dialog::name() const { return name_; } diff --git a/src/frontends/qt4/Dialog.h b/src/frontends/qt4/Dialog.h index 8f6cea6317..4506ea26a1 100644 --- a/src/frontends/qt4/Dialog.h +++ b/src/frontends/qt4/Dialog.h @@ -14,7 +14,7 @@ #include "lfuns.h" -#include "support/strfwd.h" +#include namespace lyx { @@ -107,8 +107,11 @@ public: virtual bool isVisibleView() const = 0; //@} - /// - std::string name() const; + /// Dialog identifier. + /// FIXME for Andre': Now that Dialog is entirely within qt4/ + /// We can use QString instead in order to avoid inclusion + /// or we can pimpl name_. + std::string const & name() const; //@{ /** Enable the controller to initialise its data structures. @@ -233,7 +236,7 @@ private: /** The Dialog's name is the means by which a dialog identifies * itself to the LyXView. */ - char const * const name_; + std::string name_; /// GuiView * lyxview_;