From a605db81207577a2696bea16eeec6798653522df Mon Sep 17 00:00:00 2001 From: John Levon Date: Wed, 5 Dec 2001 18:32:49 +0000 Subject: [PATCH] compile fixes git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@3155 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/frontends/qt2/ChangeLog | 8 ++++++++ src/frontends/qt2/QIndex.C | 4 ++-- src/frontends/qt2/QParagraph.C | 8 ++++---- src/frontends/qt2/QParagraphDialog.C | 24 ++++++++++++------------ src/frontends/qt2/QParagraphDialog.h | 7 ++++--- src/frontends/qt2/QTocDialog.C | 4 ++-- 6 files changed, 32 insertions(+), 23 deletions(-) diff --git a/src/frontends/qt2/ChangeLog b/src/frontends/qt2/ChangeLog index b1ffba3e38..a423678676 100644 --- a/src/frontends/qt2/ChangeLog +++ b/src/frontends/qt2/ChangeLog @@ -1,3 +1,11 @@ +2001-12-05 John Levon + + * QParagraph.C: + * QParagraphDialog.h: + * QParagraphDialog.C: use new vspace API + + * QTocDialog.C: silence warnings + 2001-12-05 Lars Gullik Bjønnes * qttableview.C: change "while(" to "while (" diff --git a/src/frontends/qt2/QIndex.C b/src/frontends/qt2/QIndex.C index d91dff2a8f..d99e60407f 100644 --- a/src/frontends/qt2/QIndex.C +++ b/src/frontends/qt2/QIndex.C @@ -37,13 +37,13 @@ void QIndex::build_dialog() void QIndex::update_contents() { - dialog_->keywordED->setText(controller().getContents().c_str()); + dialog_->keywordED->setText(controller().params().getContents().c_str()); } void QIndex::apply() { - controller().setContents(dialog_->keywordED->text().latin1()); + controller().params().setContents(dialog_->keywordED->text().latin1()); } diff --git a/src/frontends/qt2/QParagraph.C b/src/frontends/qt2/QParagraph.C index 025c63a503..d31983a882 100644 --- a/src/frontends/qt2/QParagraph.C +++ b/src/frontends/qt2/QParagraph.C @@ -69,16 +69,16 @@ void QParagraph::update(bool switched) if (params->spaceTop().kind() == VSpace::LENGTH) { LyXGlueLength above = params->spaceTop().length(); lyxerr[Debug::GUI] << "Reading above space : \"" << params->spaceTop().length().asString() << "\"" << endl; - dialog_->setAboveLength(above.value(), above.plusValue(), above.minusValue(), - above.unit(), above.plusUnit(), above.minusUnit()); + dialog_->setAboveLength(above.len().value(), above.plus().value(), above.minus().value(), + above.len().unit(), above.plus().unit(), above.minus().unit()); } else dialog_->setAboveLength(0.0, 0.0, 0.0, LyXLength::UNIT_NONE, LyXLength::UNIT_NONE, LyXLength::UNIT_NONE); if (params->spaceBottom().kind() == VSpace::LENGTH) { LyXGlueLength below = params->spaceBottom().length(); lyxerr[Debug::GUI] << "Reading below space : \"" << params->spaceBottom().length().asString() << "\"" << endl; - dialog_->setBelowLength(below.value(), below.plusValue(), below.minusValue(), - below.unit(), below.plusUnit(), below.minusUnit()); + dialog_->setBelowLength(below.len().value(), below.plus().value(), below.minus().value(), + below.len().unit(), below.plus().unit(), below.minus().unit()); } else dialog_->setBelowLength(0.0, 0.0, 0.0, LyXLength::UNIT_NONE, LyXLength::UNIT_NONE, LyXLength::UNIT_NONE); diff --git a/src/frontends/qt2/QParagraphDialog.C b/src/frontends/qt2/QParagraphDialog.C index a63a6234bf..c13e9d05e9 100644 --- a/src/frontends/qt2/QParagraphDialog.C +++ b/src/frontends/qt2/QParagraphDialog.C @@ -218,12 +218,12 @@ void QParagraphDialog::setExtra(float widthval, LyXLength::UNIT units, const str LyXGlueLength QParagraphDialog::getAboveLength() const { LyXGlueLength len( - spacingAboveValue->text().toFloat(), - getLyXLength( spacingAboveValueUnit->currentItem() ), - spacingAbovePlus->text().toFloat(), - getLyXLength( spacingAbovePlusUnit->currentItem() ), - spacingAboveMinus->text().toFloat(), - getLyXLength( spacingAboveMinusUnit->currentItem() ) + LyXLength(spacingAboveValue->text().toFloat(), + getLyXLength(spacingAboveValueUnit->currentItem())), + LyXLength(spacingAbovePlus->text().toFloat(), + getLyXLength(spacingAbovePlusUnit->currentItem())), + LyXLength(spacingAboveMinus->text().toFloat(), + getLyXLength(spacingAboveMinusUnit->currentItem())) ); return len; } @@ -232,12 +232,12 @@ LyXGlueLength QParagraphDialog::getAboveLength() const LyXGlueLength QParagraphDialog::getBelowLength() const { LyXGlueLength len( - spacingBelowValue->text().toFloat(), - getLyXLength( spacingBelowValueUnit->currentItem() ), - spacingBelowPlus->text().toFloat(), - getLyXLength( spacingBelowPlusUnit->currentItem() ), - spacingBelowMinus->text().toFloat(), - getLyXLength( spacingBelowMinusUnit->currentItem() ) + LyXLength(spacingBelowValue->text().toFloat(), + getLyXLength(spacingBelowValueUnit->currentItem())), + LyXLength(spacingBelowPlus->text().toFloat(), + getLyXLength(spacingBelowPlusUnit->currentItem())), + LyXLength(spacingBelowMinus->text().toFloat(), + getLyXLength(spacingBelowMinusUnit->currentItem())) ); return len; } diff --git a/src/frontends/qt2/QParagraphDialog.h b/src/frontends/qt2/QParagraphDialog.h index 96e21c3552..a448ea8a17 100644 --- a/src/frontends/qt2/QParagraphDialog.h +++ b/src/frontends/qt2/QParagraphDialog.h @@ -16,6 +16,7 @@ #include "vspace.h" #include "paragraph.h" #include "layout.h" +#include "lyxgluelength.h" class QParagraph; @@ -32,9 +33,9 @@ public: void setAlign(int); void setChecks(bool, bool, bool, bool, bool); void setSpace(VSpace::vspace_kind, VSpace::vspace_kind, bool, bool); - void setAboveLength(float, float, float, LyXGlueLength::UNIT, LyXGlueLength::UNIT, LyXGlueLength::UNIT); - void setBelowLength(float, float, float, LyXGlueLength::UNIT, LyXGlueLength::UNIT, LyXGlueLength::UNIT); - void setExtra(float, LyXGlueLength::UNIT, const string, int, bool, bool, Paragraph::PEXTRA_TYPE); + void setAboveLength(float, float, float, LyXLength::UNIT, LyXLength::UNIT, LyXLength::UNIT); + void setBelowLength(float, float, float, LyXLength::UNIT, LyXLength::UNIT, LyXLength::UNIT); + void setExtra(float, LyXLength::UNIT, const string, int, bool, bool, Paragraph::PEXTRA_TYPE); LyXGlueLength getAboveLength() const; LyXGlueLength getBelowLength() const; LyXLength getExtraWidth() const; diff --git a/src/frontends/qt2/QTocDialog.C b/src/frontends/qt2/QTocDialog.C index ef8fe35fb2..f434c95135 100644 --- a/src/frontends/qt2/QTocDialog.C +++ b/src/frontends/qt2/QTocDialog.C @@ -54,13 +54,13 @@ void QTocDialog::close_adaptor() } -void QTocDialog::depth_adaptor(int depth) +void QTocDialog::depth_adaptor(int /*depth*/) { //form_->set_depth(depth); } -void QTocDialog::select_adaptor(QListViewItem * item) +void QTocDialog::select_adaptor(QListViewItem * /*item*/) { //form_->select(item->text(0)); } -- 2.39.2