From dc45268132ab08ac1db0e2dbe220633e1f90de03 Mon Sep 17 00:00:00 2001 From: Richard Heck Date: Thu, 25 Oct 2007 21:39:47 +0000 Subject: [PATCH] Fix compilation problem due to same static variable in different files. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21207 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/frontends/qt4/GuiInclude.cpp | 7 ++++--- src/frontends/qt4/GuiRef.cpp | 7 ++++--- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/frontends/qt4/GuiInclude.cpp b/src/frontends/qt4/GuiInclude.cpp index 0ea27fd373..b02052edfd 100644 --- a/src/frontends/qt4/GuiInclude.cpp +++ b/src/frontends/qt4/GuiInclude.cpp @@ -60,7 +60,8 @@ using support::getVectorFromString; /// Flags what action is taken by Kernel::dispatch() -static std::string const lfun_name_ = "include"; +/// Needed because we're not inheriting from GuiCommand +static std::string const lfun_include_ = "include"; GuiInclude::GuiInclude(LyXView & lv) @@ -330,7 +331,7 @@ bool GuiInclude::isValid() bool GuiInclude::initialiseParams(string const & data) { - InsetCommandMailer::string2params(lfun_name_, data, params_); + InsetCommandMailer::string2params(lfun_include_, data, params_); return true; } @@ -343,7 +344,7 @@ void GuiInclude::clearParams() void GuiInclude::dispatchParams() { - dispatch(FuncRequest(getLfun(), InsetCommandMailer::params2string(lfun_name_, params_))); + dispatch(FuncRequest(getLfun(), InsetCommandMailer::params2string(lfun_include_, params_))); } diff --git a/src/frontends/qt4/GuiRef.cpp b/src/frontends/qt4/GuiRef.cpp index 6de11331ef..5dc8ced74f 100644 --- a/src/frontends/qt4/GuiRef.cpp +++ b/src/frontends/qt4/GuiRef.cpp @@ -43,7 +43,8 @@ using support::makeAbsPath; using support::makeDisplayPath; /// Flags what action is taken by Kernel::dispatch() -static std::string const lfun_name_ = "ref"; +/// Needed because we're not inheriting from GuiCommand +static std::string const lfun_ref_ = "ref"; GuiRef::GuiRef(LyXView & lv) : GuiDialog(lv, "ref"), params_(REF_CODE) @@ -379,7 +380,7 @@ bool GuiRef::initialiseParams(string const & data) { // The name passed with LFUN_INSET_APPLY is also the name // used to identify the mailer. - InsetCommandMailer::string2params(lfun_name_, data, params_); + InsetCommandMailer::string2params(lfun_ref_, data, params_); return true; } @@ -392,7 +393,7 @@ void GuiRef::clearParams() void GuiRef::dispatchParams() { - string const lfun = InsetCommandMailer::params2string(lfun_name_, params_); + string const lfun = InsetCommandMailer::params2string(lfun_ref_, params_); dispatch(FuncRequest(getLfun(), lfun)); } -- 2.39.2