From: John Levon Date: Tue, 6 Aug 2002 00:54:20 +0000 (+0000) Subject: build fixes X-Git-Tag: 1.6.10~18672 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=7072a496e2dd83ce0d665ca61c69b779188df8d5;p=features.git build fixes git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@4869 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/src/ChangeLog b/src/ChangeLog index a735b5d646..08cd890d4c 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,11 @@ +2002-08-06 John Levon + + * lyxfunc.C: + * kbmap.C: small cleanup + + * vspace.h: + * vspace.C: add const + 2002-08-05 John Levon * LyXAction.C: back to tabular-insert diff --git a/src/frontends/qt2/ChangeLog b/src/frontends/qt2/ChangeLog index 19b47d66b8..cff469664a 100644 --- a/src/frontends/qt2/ChangeLog +++ b/src/frontends/qt2/ChangeLog @@ -1,3 +1,12 @@ +2002-08-06 John Levon + + * ui/QSpellcheckerDialogBase.ui: + * QSpellcheckerDialog.h: + * QSpellchecker.h: + * QSpellchecker.C: remove options() + + * QtView.C: fix build + 2002-07-31 John Levon * io_callback.h: make a more proper class diff --git a/src/frontends/qt2/QLPainter.C b/src/frontends/qt2/QLPainter.C index 999b5794cb..87c35cde58 100644 --- a/src/frontends/qt2/QLPainter.C +++ b/src/frontends/qt2/QLPainter.C @@ -117,7 +117,7 @@ Painter & QLPainter::lines(int const * xp, int const * yp, // FIXME ? // Must use new as np is not known at compile time. - boost::scoped_array points(new QCOORD [np * 2]); + boost::scoped_array points(new QCOORD[np * 2]); int j = 0; @@ -158,7 +158,7 @@ Painter & QLPainter::fillPolygon(int const * xp, int const * yp, // FIXME ? // Must use new as np is not known at compile time. - boost::scoped_array points(new QCOORD [np * 2]); + boost::scoped_array points(new QCOORD[np * 2]); int j = 0; diff --git a/src/frontends/qt2/QParagraphDialog.C b/src/frontends/qt2/QParagraphDialog.C index 7cfaaa7703..8cea66f6e5 100644 --- a/src/frontends/qt2/QParagraphDialog.C +++ b/src/frontends/qt2/QParagraphDialog.C @@ -67,6 +67,3 @@ void QParagraphDialog::enableLinespacingValue(int) bool const enable = linespacing->currentItem()==4; linespacingValue->setEnabled(enable); } - - - diff --git a/src/frontends/qt2/QSpellchecker.C b/src/frontends/qt2/QSpellchecker.C index 3aff4a21b1..16c2aedd90 100644 --- a/src/frontends/qt2/QSpellchecker.C +++ b/src/frontends/qt2/QSpellchecker.C @@ -70,12 +70,6 @@ void QSpellchecker::replace() } -void QSpellchecker::options() -{ - controller().options(); -} - - void QSpellchecker::spellcheck() { controller().check(); diff --git a/src/frontends/qt2/QSpellchecker.h b/src/frontends/qt2/QSpellchecker.h index 2e934d3545..c8eea60f96 100644 --- a/src/frontends/qt2/QSpellchecker.h +++ b/src/frontends/qt2/QSpellchecker.h @@ -35,7 +35,6 @@ private: void add(); void ignore(); void replace(); - void options(); void spellcheck(); /// Apply changes diff --git a/src/frontends/qt2/QSpellcheckerDialog.h b/src/frontends/qt2/QSpellcheckerDialog.h index b80388f171..f53e42823e 100644 --- a/src/frontends/qt2/QSpellcheckerDialog.h +++ b/src/frontends/qt2/QSpellcheckerDialog.h @@ -40,9 +40,6 @@ protected slots: virtual void ignoreClicked() { form_->ignore(); } - virtual void optionsClicked() { - form_->options(); - } virtual void suggestionChanged(const QString &); virtual void replaceChanged(const QString &); diff --git a/src/frontends/qt2/QtView.C b/src/frontends/qt2/QtView.C index f1c6ea45b3..953722b0da 100644 --- a/src/frontends/qt2/QtView.C +++ b/src/frontends/qt2/QtView.C @@ -111,13 +111,13 @@ void QtView::focus_command_widget() void QtView::update_view_state_qt() { - statusBar()->message(currentState(view()).c_str()); + statusBar()->message(currentState(view().get()).c_str()); } void QtView::update_view_state() { - statusBar()->message(currentState(view()).c_str()); + statusBar()->message(currentState(view().get()).c_str()); } diff --git a/src/frontends/qt2/lengthcombo.C b/src/frontends/qt2/lengthcombo.C index a36113de72..3162712fdf 100644 --- a/src/frontends/qt2/lengthcombo.C +++ b/src/frontends/qt2/lengthcombo.C @@ -16,6 +16,7 @@ LengthCombo::LengthCombo(QWidget * parent, char * name) : QComboBox(parent, name) { + // FIXME: check these should all be here, I think not insertItem(_("cm")); insertItem(_("in")); insertItem(_("pt")); diff --git a/src/frontends/qt2/lengthcombo.h b/src/frontends/qt2/lengthcombo.h index 21fc3197af..d9b8ad32d7 100644 --- a/src/frontends/qt2/lengthcombo.h +++ b/src/frontends/qt2/lengthcombo.h @@ -38,4 +38,4 @@ signals: }; -#endif +#endif // LENGTHCOMBO_H diff --git a/src/frontends/qt2/ui/QSpellcheckerDialog.ui b/src/frontends/qt2/ui/QSpellcheckerDialog.ui index 927f763f11..e23487337a 100644 --- a/src/frontends/qt2/ui/QSpellcheckerDialog.ui +++ b/src/frontends/qt2/ui/QSpellcheckerDialog.ui @@ -13,7 +13,7 @@ 0 0 - 314 + 310 379 @@ -105,17 +105,6 @@ Accept word for this session - - QPushButton - - name - optionsPB - - - text - &Options... - - name @@ -238,6 +227,13 @@ name replaceCO + + sizePolicy + + 3 + 0 + + focusPolicy StrongFocus @@ -258,13 +254,6 @@ duplicatesEnabled false - - sizePolicy - - 3 - 0 - - toolTip Replace with selected word @@ -324,12 +313,6 @@ QSpellcheckerDialogBase addClicked() - - optionsPB - clicked() - QSpellcheckerDialogBase - optionsClicked() - spellcheckPB clicked() @@ -354,7 +337,6 @@ ignorePB replacePB_3 addPB - optionsPB closePB diff --git a/src/kbmap.C b/src/kbmap.C index ee1e298527..3d86b2c74c 100644 --- a/src/kbmap.C +++ b/src/kbmap.C @@ -78,7 +78,7 @@ int kb_keymap::lookup(LyXKeySymPtr key, key_modifier::state check = static_cast(mod & ~mask); - if (*(cit->code) == *(key) && cit->mod.first == check) { + if (*(cit->code) == *key && cit->mod.first == check) { // match found if (cit->table.get()) { // this is a prefix key - set new map @@ -115,7 +115,8 @@ string const kb_keymap::print() const void kb_keymap::defkey(kb_sequence * seq, int action, unsigned int r) { LyXKeySymPtr code = seq->sequence[r]; - if ( ! code->isOK() ) return; + if (!code->isOK()) + return; key_modifier::state const mod1 = seq->modifiers[r].first; key_modifier::state const mod2 = seq->modifiers[r].second; diff --git a/src/lyxfunc.C b/src/lyxfunc.C index 356788c3c0..330d12fc0f 100644 --- a/src/lyxfunc.C +++ b/src/lyxfunc.C @@ -215,11 +215,10 @@ void LyXFunc::processKeySym(LyXKeySymPtr keysym, if ((action != LFUN_CANCEL) && (action != LFUN_META_FAKE)) { // remove Caps Lock and Mod2 as a modifiers action = keyseq.addkey(keysym, (state | meta_fake_bit)); - if (lyxerr.debugging(Debug::KEY)) { - lyxerr << "action now set to [" - << action << "]" << endl; - } + lyxerr[Debug::KEY] << "action now set to [" + << action << "]" << endl; } + // Dont remove this unless you know what you are doing. meta_fake_bit = key_modifier::none; @@ -248,11 +247,10 @@ void LyXFunc::processKeySym(LyXKeySymPtr keysym, // the modifiers? (Lgb) action = keyseq.addkey(keysym, key_modifier::none); - if (lyxerr.debugging(Debug::KEY)) { - lyxerr << "Removing modifiers...\n" - << "Action now set to [" - << action << "]" << endl; - } + lyxerr[Debug::KEY] << "Removing modifiers...\n" + << "Action now set to [" + << action << "]" << endl; + if (action == LFUN_UNKNOWN_ACTION) { owner->message(_("Unknown function.")); return; @@ -260,7 +258,6 @@ void LyXFunc::processKeySym(LyXKeySymPtr keysym, } if (action == LFUN_SELFINSERT) { - // This is very X dependent. char c = keysym->getISOEncoded(); string argument; diff --git a/src/vspace.C b/src/vspace.C index 1444aa7de8..98aa9354c4 100644 --- a/src/vspace.C +++ b/src/vspace.C @@ -470,7 +470,7 @@ string const VSpace::asLatexCommand(BufferParams const & params) const -int VSpace::inPixels(BufferView * bv) const +int VSpace::inPixels(BufferView const * bv) const { // Height of a normal line in pixels (zoom factor considered) int const default_height = bv->text->defaultHeight(); // [pixels] diff --git a/src/vspace.h b/src/vspace.h index 936d1f4e92..5164c20d22 100644 --- a/src/vspace.h +++ b/src/vspace.h @@ -66,7 +66,7 @@ public: /// the latex representation string const asLatexCommand(BufferParams const & params) const; /// the size of the space on-screen - int inPixels(BufferView * bv) const; + int inPixels(BufferView const * bv) const; private: /// This VSpace kind vspace_kind kind_; @@ -76,4 +76,4 @@ private: bool keep_; }; -#endif +#endif // VSPACE_H