From 623d2f9530d040b4644ff9e1f5cedcbea02e8661 Mon Sep 17 00:00:00 2001 From: Jean-Marc Lasgouttes Date: Thu, 2 May 2013 18:27:32 +0200 Subject: [PATCH] More llvm/clang warnings This is mostly unused private class members. There are also a few unused functions that got #if'ed out. I never know in this case whether the code should be nuked. --- src/Text.cpp | 4 +--- src/frontends/qt4/EmptyTable.h | 5 ----- src/frontends/qt4/GuiCharacter.cpp | 2 +- src/frontends/qt4/GuiCharacter.h | 3 --- src/frontends/qt4/GuiPrefs.h | 1 - src/frontends/qt4/GuiToolbar.cpp | 2 +- src/frontends/qt4/InsertTableWidget.cpp | 4 ++-- src/frontends/qt4/InsertTableWidget.h | 4 +--- src/insets/InsetText.h | 2 -- src/mathed/InsetMath.h | 2 -- src/mathed/MathAutoCorrect.cpp | 3 ++- src/mathed/MathData.cpp | 3 ++- 12 files changed, 10 insertions(+), 25 deletions(-) diff --git a/src/Text.cpp b/src/Text.cpp index 347b7a1205..38e865f039 100644 --- a/src/Text.cpp +++ b/src/Text.cpp @@ -582,7 +582,7 @@ class TextCompletionList : public CompletionList public: /// TextCompletionList(Cursor const & cur, WordList const * list) - : buffer_(cur.buffer()), pos_(0), list_(list) + : buffer_(cur.buffer()), list_(list) {} /// virtual ~TextCompletionList() {} @@ -604,8 +604,6 @@ private: /// Buffer const * buffer_; /// - size_t pos_; - /// WordList const * list_; }; diff --git a/src/frontends/qt4/EmptyTable.h b/src/frontends/qt4/EmptyTable.h index 518ea1c476..d9ffa03037 100644 --- a/src/frontends/qt4/EmptyTable.h +++ b/src/frontends/qt4/EmptyTable.h @@ -48,11 +48,6 @@ protected: virtual void resetCellSize(); private: - /// number of current columns - unsigned int cols; - /// number of current rows - unsigned int rows; - }; diff --git a/src/frontends/qt4/GuiCharacter.cpp b/src/frontends/qt4/GuiCharacter.cpp index 53ca720d2f..e1fe98491c 100644 --- a/src/frontends/qt4/GuiCharacter.cpp +++ b/src/frontends/qt4/GuiCharacter.cpp @@ -160,7 +160,7 @@ void fillCombo(QComboBox * combo, QList const & list) GuiCharacter::GuiCharacter(GuiView & lv) : GuiDialog(lv, "character", qt_("Text Style")), font_(ignore_font, ignore_language), - toggleall_(false), reset_lang_(false) + toggleall_(false) { setupUi(this); diff --git a/src/frontends/qt4/GuiCharacter.h b/src/frontends/qt4/GuiCharacter.h index 599807f0ae..5d4f346ee7 100644 --- a/src/frontends/qt4/GuiCharacter.h +++ b/src/frontends/qt4/GuiCharacter.h @@ -95,9 +95,6 @@ private: Font font_; /// bool toggleall_; - /// If true the language should be reset. - /// If false the language of font_ is used. - bool reset_lang_; }; } // namespace frontend diff --git a/src/frontends/qt4/GuiPrefs.h b/src/frontends/qt4/GuiPrefs.h index 02156ab8de..2c665853d1 100644 --- a/src/frontends/qt4/GuiPrefs.h +++ b/src/frontends/qt4/GuiPrefs.h @@ -125,7 +125,6 @@ private: /// A list of colors to be dispatched std::vector colors_; - bool redraw_gui_; bool update_screen_font_; }; diff --git a/src/frontends/qt4/GuiToolbar.cpp b/src/frontends/qt4/GuiToolbar.cpp index a6f4505ce0..f41fd2c76b 100644 --- a/src/frontends/qt4/GuiToolbar.cpp +++ b/src/frontends/qt4/GuiToolbar.cpp @@ -272,7 +272,7 @@ void GuiToolbar::add(ToolbarItem const & item) tb->setToolTip(label); tb->setStatusTip(label); tb->setText(label); - InsertTableWidget * iv = new InsertTableWidget(owner_, tb); + InsertTableWidget * iv = new InsertTableWidget(tb); connect(tb, SIGNAL(clicked(bool)), iv, SLOT(show(bool))); connect(iv, SIGNAL(visible(bool)), tb, SLOT(setChecked(bool))); connect(this, SIGNAL(updated()), iv, SLOT(updateParent())); diff --git a/src/frontends/qt4/InsertTableWidget.cpp b/src/frontends/qt4/InsertTableWidget.cpp index 32dfe9eb4e..889e056abc 100644 --- a/src/frontends/qt4/InsertTableWidget.cpp +++ b/src/frontends/qt4/InsertTableWidget.cpp @@ -29,8 +29,8 @@ namespace lyx { namespace frontend { -InsertTableWidget::InsertTableWidget(GuiView & lyxView, QWidget * parent) - : QWidget(parent, Qt::Popup), colwidth_(20), rowheight_(12), lyxView_(lyxView) +InsertTableWidget::InsertTableWidget(QWidget * parent) + : QWidget(parent, Qt::Popup), colwidth_(20), rowheight_(12) { init(); setMouseTracking(true); diff --git a/src/frontends/qt4/InsertTableWidget.h b/src/frontends/qt4/InsertTableWidget.h index 36e6dfa9e1..f38d3dbe9b 100644 --- a/src/frontends/qt4/InsertTableWidget.h +++ b/src/frontends/qt4/InsertTableWidget.h @@ -24,7 +24,7 @@ class InsertTableWidget : public QWidget { Q_OBJECT public: - InsertTableWidget(GuiView &, QWidget *); + InsertTableWidget(QWidget *); Q_SIGNALS: //! widget is visible @@ -62,8 +62,6 @@ private: int bottom_; //! column of pointer int right_; - //! the lyxview we need to dispatch the funcrequest - GuiView & lyxView_; //! widget under mouse bool underMouse_; }; diff --git a/src/insets/InsetText.h b/src/insets/InsetText.h index e986d3650d..bbdf2abc36 100644 --- a/src/insets/InsetText.h +++ b/src/insets/InsetText.h @@ -225,8 +225,6 @@ private: /// ColorCode frame_color_; /// - mutable pit_type old_pit; - /// mutable Text text_; }; diff --git a/src/mathed/InsetMath.h b/src/mathed/InsetMath.h index c1b1b05720..5e5f492dc9 100644 --- a/src/mathed/InsetMath.h +++ b/src/mathed/InsetMath.h @@ -168,8 +168,6 @@ public: /// identifies things that can get \limits or \nolimits virtual bool takesLimits() const { return false; } - /// char char code if possible - virtual void handleFont(docstring const &) {} /// replace things by other things virtual void replace(ReplaceData &) {} /// do we contain a given subsequence? diff --git a/src/mathed/MathAutoCorrect.cpp b/src/mathed/MathAutoCorrect.cpp index e49959a16d..3e1405b3dc 100644 --- a/src/mathed/MathAutoCorrect.cpp +++ b/src/mathed/MathAutoCorrect.cpp @@ -94,6 +94,7 @@ bool Correction::correct(MathAtom & at, char_type c) const } +#if 0 idocstream & operator>>(idocstream & is, Correction & corr) { corr.read(is); @@ -106,7 +107,7 @@ odocstream & operator<<(odocstream & os, Correction & corr) corr.write(os); return os; } - +#endif diff --git a/src/mathed/MathData.cpp b/src/mathed/MathData.cpp index 9adcbfa932..edd8089457 100644 --- a/src/mathed/MathData.cpp +++ b/src/mathed/MathData.cpp @@ -216,6 +216,7 @@ void MathData::touch() const } +#if 0 namespace { bool isInside(DocIterator const & it, MathData const & ar, @@ -230,7 +231,7 @@ bool isInside(DocIterator const & it, MathData const & ar, } } - +#endif void MathData::metrics(MetricsInfo & mi, Dimension & dim) const