Fix gcc warning and be 64 bit clean.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18312 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Abdelrazak Younes 2007-05-14 16:41:50 +00:00
parent accafcb88c
commit 9e371e2a24
4 changed files with 13 additions and 7 deletions

View File

@ -79,9 +79,9 @@ BufferParams & ControlDocument::params() const
} }
int ControlDocument::id() const BufferId ControlDocument::id() const
{ {
return (int) &kernel().buffer(); return &kernel().buffer();
} }

View File

@ -23,6 +23,9 @@ class TextClass;
namespace frontend { namespace frontend {
///
typedef void const * BufferId;
/** A controller for Document dialogs. /** A controller for Document dialogs.
*/ */
class ControlDocument : public Dialog::Controller { class ControlDocument : public Dialog::Controller {
@ -50,7 +53,7 @@ public:
/// ///
BufferParams & params() const; BufferParams & params() const;
/// ///
int id() const; BufferId id() const;
/// ///
void setLanguage() const; void setLanguage() const;
/// ///

View File

@ -112,7 +112,7 @@ PreambleModule::PreambleModule(): current_id_(0)
} }
void PreambleModule::update(BufferParams const & params, int id) void PreambleModule::update(BufferParams const & params, BufferId id)
{ {
QString preamble = toqstr(params.preamble); QString preamble = toqstr(params.preamble);
// Nothing to do if the params and preamble are unchanged. // Nothing to do if the params and preamble are unchanged.

View File

@ -144,12 +144,15 @@ private:
}; };
typedef void const * BufferId;
class PreambleModule : public UiWidget<Ui::PreambleUi> class PreambleModule : public UiWidget<Ui::PreambleUi>
{ {
Q_OBJECT Q_OBJECT
public: public:
PreambleModule(); PreambleModule();
void update(BufferParams const & params, int id); void update(BufferParams const & params, BufferId id);
void apply(BufferParams & params); void apply(BufferParams & params);
Q_SIGNALS: Q_SIGNALS:
@ -161,9 +164,9 @@ protected:
void on_preambleTE_textChanged() { changed(); } void on_preambleTE_textChanged() { changed(); }
private: private:
typedef std::map<int, std::pair<int,int> > Coords; typedef std::map<BufferId, std::pair<int,int> > Coords;
Coords preamble_coords_; Coords preamble_coords_;
int current_id_; BufferId current_id_;
}; };