From a60b6d90d9c276d0d68dff8ff0f08adcd85b20fe Mon Sep 17 00:00:00 2001 From: Richard Heck Date: Sat, 12 Jan 2008 16:11:55 +0000 Subject: [PATCH] Help from Andre. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22524 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/frontends/qt4/GuiIdListModel.cpp | 5 ----- src/frontends/qt4/GuiIdListModel.h | 16 ++++++++-------- 2 files changed, 8 insertions(+), 13 deletions(-) diff --git a/src/frontends/qt4/GuiIdListModel.cpp b/src/frontends/qt4/GuiIdListModel.cpp index 807235297a..ceb88baaa5 100644 --- a/src/frontends/qt4/GuiIdListModel.cpp +++ b/src/frontends/qt4/GuiIdListModel.cpp @@ -21,11 +21,6 @@ using std::vector; namespace lyx { namespace frontend { -GuiIdListModel::GuiIdListModel() : - QAbstractListModel() -{} - - QVariant GuiIdListModel::data(QModelIndex const & index, int role) const { int const row = index.row(); diff --git a/src/frontends/qt4/GuiIdListModel.h b/src/frontends/qt4/GuiIdListModel.h index 48709762e9..b0eb484990 100644 --- a/src/frontends/qt4/GuiIdListModel.h +++ b/src/frontends/qt4/GuiIdListModel.h @@ -16,12 +16,12 @@ #ifndef GUIIDLISTMODEL_H #define GUIIDLISTMODEL_H +#include "support/qstring_helpers.h" + #include #include #include -#include "support/qstring_helpers.h" - namespace lyx { namespace frontend { @@ -39,7 +39,7 @@ namespace frontend { class GuiIdListModel : public QAbstractListModel { public: /// - explicit GuiIdListModel(); + explicit GuiIdListModel() {}; ////////////////////////////////////////////////////////////////////// // Methods overridden from QAbstractListModel ////////////////////////////////////////////////////////////////////// @@ -63,16 +63,16 @@ public: // New methods ////////////////////////////////////////////////////////////////////// /// - inline void setUIString(QModelIndex const & index, QString const & value) + void setUIString(QModelIndex const & index, QString const & value) { setData(index, value); }; /// - inline void setUIString(int const i, std::string const & value) + void setUIString(int const i, std::string const & value) { setUIString(index(i), toqstr(value)); }; /// - inline void setIDString(QModelIndex const & index, QString const & value) + void setIDString(QModelIndex const & index, QString const & value) { setData(index, value, Qt::UserRole); }; /// - inline void setIDString(int const i, std::string const & value) + void setIDString(int const i, std::string const & value) { setIDString(index(i), toqstr(value)); }; /// virtual QString getIDString(QModelIndex const & index) const @@ -112,7 +112,7 @@ private: /// inline bool rowIsValid(int const i) const { - return (i >= 0 && (i <= userData_.size())); + return i >= 0 && i <= userData_.size(); } ; }; -- 2.39.2