From 3e729d8743979f866eb9e0723fed89aa5bc536a2 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Andr=C3=A9=20P=C3=B6nitz?= Date: Mon, 21 Apr 2008 06:53:00 +0000 Subject: [PATCH] compile fix git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@24407 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/frontends/qt4/GuiPrefs.cpp | 3 +-- src/frontends/qt4/GuiPrint.cpp | 2 +- src/frontends/qt4/GuiRef.cpp | 3 ++- src/frontends/qt4/GuiView.cpp | 4 ++-- src/frontends/qt4/qt_helpers.h | 1 + 5 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/frontends/qt4/GuiPrefs.cpp b/src/frontends/qt4/GuiPrefs.cpp index 6f9d8d07e6..103003be7a 100644 --- a/src/frontends/qt4/GuiPrefs.cpp +++ b/src/frontends/qt4/GuiPrefs.cpp @@ -186,8 +186,7 @@ QString browseRelFile(QString const & filename, QString const & refpath, QString const & label1, QString const & dir1, QString const & label2, QString const & dir2) { - QString const fname = toqstr(makeAbsPath( - fromqstr(filename), fromqstr(refpath)).absFilename()); + QString const fname = makeAbsPath(filename, refpath); QString const outname = diff --git a/src/frontends/qt4/GuiPrint.cpp b/src/frontends/qt4/GuiPrint.cpp index ff5254e54e..14339be16b 100644 --- a/src/frontends/qt4/GuiPrint.cpp +++ b/src/frontends/qt4/GuiPrint.cpp @@ -175,7 +175,7 @@ bool GuiPrint::initialiseParams(string const &) { /// get global printer parameters params_ = PrinterParams(); - params_.file_name = changeExtension(buffer().absFileName(), + params_.file_name = support::changeExtension(buffer().absFileName(), lyxrc.print_file_extension); setButtonsValid(true); // so that the user can press Ok diff --git a/src/frontends/qt4/GuiRef.cpp b/src/frontends/qt4/GuiRef.cpp index f29403e67b..c7770453d6 100644 --- a/src/frontends/qt4/GuiRef.cpp +++ b/src/frontends/qt4/GuiRef.cpp @@ -340,7 +340,8 @@ void GuiRef::updateRefs() { refs_.clear(); string const name = theBufferList().getFileNames()[bufferCO->currentIndex()]; - Buffer const * buf = theBufferList().getBuffer(makeAbsPath(name).absFilename()); + Buffer const * buf = theBufferList().getBuffer( + support::makeAbsPath(name).absFilename()); buf->getLabelList(refs_); sortCB->setEnabled(!refs_.empty()); refsLW->setEnabled(!refs_.empty()); diff --git a/src/frontends/qt4/GuiView.cpp b/src/frontends/qt4/GuiView.cpp index bf3a906a82..c10c5924a9 100644 --- a/src/frontends/qt4/GuiView.cpp +++ b/src/frontends/qt4/GuiView.cpp @@ -1331,7 +1331,7 @@ void GuiView::importDocument(string const & argument) return; // get absolute path of file - FileName const fullname(makeAbsPath(filename)); + FileName const fullname(support::makeAbsPath(filename)); FileName const lyxfile(support::changeExtension(fullname.absFilename(), ".lyx")); @@ -1493,7 +1493,7 @@ bool GuiView::renameBuffer(Buffer & b, docstring const & newname) if (!newname.empty()) { // FIXME UNICODE - fname = makeAbsPath(to_utf8(newname), oldname.onlyPath().absFilename()); + fname = support::makeAbsPath(to_utf8(newname), oldname.onlyPath().absFilename()); } else { // Switch to this Buffer. setBuffer(&b); diff --git a/src/frontends/qt4/qt_helpers.h b/src/frontends/qt4/qt_helpers.h index ed082e1e33..5774b65699 100644 --- a/src/frontends/qt4/qt_helpers.h +++ b/src/frontends/qt4/qt_helpers.h @@ -126,6 +126,7 @@ QString addExtension(QString const & name, QString const & extension); /// Return the extension of the file (not including the .) QString getExtension(QString const & name); QString makeAbsPath(QString const & relpath, QString const & base); +QString changeExtension(QString const & oldname, QString const & ext); } // namespace lyx -- 2.39.5