]> git.lyx.org Git - lyx.git/commitdiff
build fixes
authorJohn Levon <levon@movementarian.org>
Tue, 6 Aug 2002 00:54:20 +0000 (00:54 +0000)
committerJohn Levon <levon@movementarian.org>
Tue, 6 Aug 2002 00:54:20 +0000 (00:54 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@4869 a592a061-630c-0410-9148-cb99ea01b6c8

15 files changed:
src/ChangeLog
src/frontends/qt2/ChangeLog
src/frontends/qt2/QLPainter.C
src/frontends/qt2/QParagraphDialog.C
src/frontends/qt2/QSpellchecker.C
src/frontends/qt2/QSpellchecker.h
src/frontends/qt2/QSpellcheckerDialog.h
src/frontends/qt2/QtView.C
src/frontends/qt2/lengthcombo.C
src/frontends/qt2/lengthcombo.h
src/frontends/qt2/ui/QSpellcheckerDialog.ui
src/kbmap.C
src/lyxfunc.C
src/vspace.C
src/vspace.h

index a735b5d6469413659252182728725bebce0f5983..08cd890d4c4b4b0eef50e221494f305066e34abf 100644 (file)
@@ -1,3 +1,11 @@
+2002-08-06  John Levon  <levon@movementarian.org>
+
+       * lyxfunc.C:
+       * kbmap.C: small cleanup
+       * vspace.h:
+       * vspace.C: add const
 2002-08-05  John Levon  <levon@movementarian.org>
 
        * LyXAction.C: back to tabular-insert
 2002-08-05  John Levon  <levon@movementarian.org>
 
        * LyXAction.C: back to tabular-insert
index 19b47d66b8d36ba65af333e9f9afbdf38acbf9f3..cff469664a10f5870fb0609b7690ae35f8e3b270 100644 (file)
@@ -1,3 +1,12 @@
+2002-08-06  John Levon  <levon@movementarian.org>
+
+       * ui/QSpellcheckerDialogBase.ui: 
+       * QSpellcheckerDialog.h:
+       * QSpellchecker.h:
+       * QSpellchecker.C: remove options()
+
+       * QtView.C: fix build
 2002-07-31  John Levon  <levon@movementarian.org>
 
        * io_callback.h: make a more proper class
 2002-07-31  John Levon  <levon@movementarian.org>
 
        * io_callback.h: make a more proper class
index 999b5794cb66fc456dc52bbe4430d01b2ae763d3..87c35cde58451c6caff99839abd9ecba219a6247 100644 (file)
@@ -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.
        // FIXME ?
 
        // Must use new as np is not known at compile time.
-       boost::scoped_array<QCOORD> points(new QCOORD [np * 2]);
+       boost::scoped_array<QCOORD> points(new QCOORD[np * 2]);
 
        int j = 0;
  
 
        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.
        // FIXME ?
  
        // Must use new as np is not known at compile time.
-       boost::scoped_array<QCOORD> points(new QCOORD [np * 2]);
+       boost::scoped_array<QCOORD> points(new QCOORD[np * 2]);
 
        int j = 0;
  
 
        int j = 0;
  
index 7cfaaa77032ff4dfcc7bc3783970337cf8d15559..8cea66f6e5cea7d19f10c8d75f8c33aa925d3245 100644 (file)
@@ -67,6 +67,3 @@ void QParagraphDialog::enableLinespacingValue(int)
        bool const enable = linespacing->currentItem()==4;
        linespacingValue->setEnabled(enable);
 }
        bool const enable = linespacing->currentItem()==4;
        linespacingValue->setEnabled(enable);
 }
-
-
-
index 3aff4a21b1b16d99d5237140929f8139b845b162..16c2aedd90a68ec722f9a1a0941c9790a463332c 100644 (file)
@@ -70,12 +70,6 @@ void QSpellchecker::replace()
 }
 
 
 }
 
 
-void QSpellchecker::options()
-{
-       controller().options();
-}
-
-
 void QSpellchecker::spellcheck()
 {
        controller().check();
 void QSpellchecker::spellcheck()
 {
        controller().check();
index 2e934d354503dc6bbe7eb8a3621e9c4e2e0d96de..c8eea60f9635b630b54a9304f5ac00f08f02c352 100644 (file)
@@ -35,7 +35,6 @@ private:
        void add();
        void ignore();
        void replace();
        void add();
        void ignore();
        void replace();
-       void options();
        void spellcheck();
 
        /// Apply changes
        void spellcheck();
 
        /// Apply changes
index b80388f171309c415464016a3e140f77eca47291..f53e42823e31e0ae67aa15d31b3a7c99dd7e81a0 100644 (file)
@@ -40,9 +40,6 @@ protected slots:
        virtual void ignoreClicked() {
                form_->ignore();
        }
        virtual void ignoreClicked() {
                form_->ignore();
        }
-       virtual void optionsClicked() {
-               form_->options();
-       }
        virtual void suggestionChanged(const QString &);
        virtual void replaceChanged(const QString &);
 
        virtual void suggestionChanged(const QString &);
        virtual void replaceChanged(const QString &);
 
index f1c6ea45b3836e38c27d51fc675c7600c5df8e5d..953722b0da6999a3e0cab06532e01773eb911a87 100644 (file)
@@ -111,13 +111,13 @@ void QtView::focus_command_widget()
 
 void QtView::update_view_state_qt()
 {
 
 void QtView::update_view_state_qt()
 {
-       statusBar()->message(currentState(view()).c_str());
+       statusBar()->message(currentState(view().get()).c_str());
 }
 
  
 void QtView::update_view_state()
 {
 }
 
  
 void QtView::update_view_state()
 {
-       statusBar()->message(currentState(view()).c_str());
+       statusBar()->message(currentState(view().get()).c_str());
 }
 
  
 }
 
  
index a36113de72f3d79d680f387549fe93b45da55eaf..3162712fdfff24bcaaee0fb22ba40ed20df45801 100644 (file)
@@ -16,6 +16,7 @@
 LengthCombo::LengthCombo(QWidget * parent, char * name)
        : QComboBox(parent, name)
 {
 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"));
        insertItem(_("cm"));
        insertItem(_("in"));
        insertItem(_("pt"));
index 21fc3197afcbbe64625055d13a223ef4fe45c0ef..d9b8ad32d77c36c9c832434c269d8cd436960408 100644 (file)
@@ -38,4 +38,4 @@ signals:
 
 };
 
 
 };
 
-#endif
+#endif // LENGTHCOMBO_H
index 927f763f11ecaa438f4733dd662f44da812ceb07..e23487337a922c48c1d74208f83bff8799706e15 100644 (file)
@@ -13,7 +13,7 @@
         <rect>
             <x>0</x>
             <y>0</y>
         <rect>
             <x>0</x>
             <y>0</y>
-            <width>314</width>
+            <width>310</width>
             <height>379</height>
         </rect>
     </property>
             <height>379</height>
         </rect>
     </property>
                 <string>Accept word for this session</string>
             </property>
         </widget>
                 <string>Accept word for this session</string>
             </property>
         </widget>
-        <widget row="10"  column="0" >
-            <class>QPushButton</class>
-            <property stdset="1">
-                <name>name</name>
-                <cstring>optionsPB</cstring>
-            </property>
-            <property stdset="1">
-                <name>text</name>
-                <string>&amp;Options...</string>
-            </property>
-        </widget>
         <spacer row="10"  column="1" >
             <property>
                 <name>name</name>
         <spacer row="10"  column="1" >
             <property>
                 <name>name</name>
                 <name>name</name>
                 <cstring>replaceCO</cstring>
             </property>
                 <name>name</name>
                 <cstring>replaceCO</cstring>
             </property>
+            <property stdset="1">
+                <name>sizePolicy</name>
+                <sizepolicy>
+                    <hsizetype>3</hsizetype>
+                    <vsizetype>0</vsizetype>
+                </sizepolicy>
+            </property>
             <property stdset="1">
                 <name>focusPolicy</name>
                 <enum>StrongFocus</enum>
             <property stdset="1">
                 <name>focusPolicy</name>
                 <enum>StrongFocus</enum>
                 <name>duplicatesEnabled</name>
                 <bool>false</bool>
             </property>
                 <name>duplicatesEnabled</name>
                 <bool>false</bool>
             </property>
-            <property stdset="1">
-                <name>sizePolicy</name>
-                <sizepolicy>
-                    <hsizetype>3</hsizetype>
-                    <vsizetype>0</vsizetype>
-                </sizepolicy>
-            </property>
             <property>
                 <name>toolTip</name>
                 <string>Replace with selected word</string>
             <property>
                 <name>toolTip</name>
                 <string>Replace with selected word</string>
         <receiver>QSpellcheckerDialogBase</receiver>
         <slot>addClicked()</slot>
     </connection>
         <receiver>QSpellcheckerDialogBase</receiver>
         <slot>addClicked()</slot>
     </connection>
-    <connection>
-        <sender>optionsPB</sender>
-        <signal>clicked()</signal>
-        <receiver>QSpellcheckerDialogBase</receiver>
-        <slot>optionsClicked()</slot>
-    </connection>
     <connection>
         <sender>spellcheckPB</sender>
         <signal>clicked()</signal>
     <connection>
         <sender>spellcheckPB</sender>
         <signal>clicked()</signal>
     <tabstop>ignorePB</tabstop>
     <tabstop>replacePB_3</tabstop>
     <tabstop>addPB</tabstop>
     <tabstop>ignorePB</tabstop>
     <tabstop>replacePB_3</tabstop>
     <tabstop>addPB</tabstop>
-    <tabstop>optionsPB</tabstop>
     <tabstop>closePB</tabstop>
 </tabstops>
 </UI>
     <tabstop>closePB</tabstop>
 </tabstops>
 </UI>
index ee1e298527dd76f395aa26d4fd6ad19589f2789f..3d86b2c74c857dc81bbea5a47023f1d66f8f0b2a 100644 (file)
@@ -78,7 +78,7 @@ int kb_keymap::lookup(LyXKeySymPtr key,
                key_modifier::state check =
                        static_cast<key_modifier::state>(mod & ~mask);
  
                key_modifier::state check =
                        static_cast<key_modifier::state>(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
                        // 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];
 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;
 
        key_modifier::state const mod1 = seq->modifiers[r].first;
        key_modifier::state const mod2 = seq->modifiers[r].second;
index 356788c3c0e8ffabe43c7bc1972050af7d088138..330d12fc0f4134eaef907fb5b51bcef144c9d894 100644 (file)
@@ -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 ((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;
 
        // 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);
 
                // 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;
                if (action == LFUN_UNKNOWN_ACTION) {
                        owner->message(_("Unknown function."));
                        return;
@@ -260,7 +258,6 @@ void LyXFunc::processKeySym(LyXKeySymPtr keysym,
        }
 
        if (action == LFUN_SELFINSERT) {
        }
 
        if (action == LFUN_SELFINSERT) {
-               // This is very X dependent.
                char c = keysym->getISOEncoded();
                string argument;
 
                char c = keysym->getISOEncoded();
                string argument;
 
index 1444aa7de8da6f120a0044ced3f0e3a1c919e89d..98aa9354c472dccb0c58197bf1ab7fb73fc81f46 100644 (file)
@@ -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]
 {
        // Height of a normal line in pixels (zoom factor considered)
        int const default_height = bv->text->defaultHeight(); // [pixels]
index 936d1f4e9266c29908cd0dc56a908b953852c6d1..5164c20d22d761e08e6c20d0a0c87d5d7ccf712c 100644 (file)
@@ -66,7 +66,7 @@ public:
        /// the latex representation
        string const asLatexCommand(BufferParams const & params) const;
        /// the size of the space on-screen
        /// 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_;
 private:
        /// This VSpace kind
        vspace_kind kind_;
@@ -76,4 +76,4 @@ private:
        bool keep_;
 };
 
        bool keep_;
 };
 
-#endif
+#endif // VSPACE_H