mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 10:00:33 +00:00
Fix bug 4413 (http://bugzilla.lyx.org/show_bug.cgi?id=4413)
The problem was that name_ was a const pointer and the pointer pointed to nothing after leaving the ctor. Andre': <docstring> is included in every dialog anyway via GuiDialog.h -> InsetCommandParams.h -> docstring.h"; so this change won't affect compilation time. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22012 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
dc75c0f793
commit
20e21c1818
@ -26,7 +26,7 @@ namespace frontend {
|
|||||||
|
|
||||||
|
|
||||||
Dialog::Dialog(GuiView & lv, std::string const & name)
|
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_;
|
return name_;
|
||||||
}
|
}
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
|
|
||||||
#include "lfuns.h"
|
#include "lfuns.h"
|
||||||
|
|
||||||
#include "support/strfwd.h"
|
#include <string>
|
||||||
|
|
||||||
namespace lyx {
|
namespace lyx {
|
||||||
|
|
||||||
@ -107,8 +107,11 @@ public:
|
|||||||
virtual bool isVisibleView() const = 0;
|
virtual bool isVisibleView() const = 0;
|
||||||
//@}
|
//@}
|
||||||
|
|
||||||
///
|
/// Dialog identifier.
|
||||||
std::string name() const;
|
/// FIXME for Andre': Now that Dialog is entirely within qt4/
|
||||||
|
/// We can use QString instead in order to avoid <string> inclusion
|
||||||
|
/// or we can pimpl name_.
|
||||||
|
std::string const & name() const;
|
||||||
|
|
||||||
//@{
|
//@{
|
||||||
/** Enable the controller to initialise its data structures.
|
/** 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
|
/** The Dialog's name is the means by which a dialog identifies
|
||||||
* itself to the LyXView.
|
* itself to the LyXView.
|
||||||
*/
|
*/
|
||||||
char const * const name_;
|
std::string name_;
|
||||||
///
|
///
|
||||||
GuiView * lyxview_;
|
GuiView * lyxview_;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user