Переглянути джерело

panda: Get rid of few warnings

        - Correct missing override
        - Correct deprecated XKeycodeToKeysym
        - Correct deprecated @exec for FreeBSD pkg plist

Signed-off-by: deflected <[email protected]>
Closes #144
deflected 8 роки тому
батько
коміт
560fd4eb3d

+ 3 - 3
makepanda/makepanda.py

@@ -864,7 +864,7 @@ if (COMPILER=="GCC"):
         if not PkgSkip("NVIDIACG") and not RUNTIME:
         if not PkgSkip("NVIDIACG") and not RUNTIME:
             SmartPkgEnable("CGGL", "", ("CgGL"), "Cg/cgGL.h", thirdparty_dir = "nvidiacg")
             SmartPkgEnable("CGGL", "", ("CgGL"), "Cg/cgGL.h", thirdparty_dir = "nvidiacg")
         if not RUNTIME:
         if not RUNTIME:
-            SmartPkgEnable("X11", "x11", "X11", ("X11", "X11/Xlib.h"))
+            SmartPkgEnable("X11", "x11", "X11", ("X11", "X11/Xlib.h", "X11/XKBlib.h"))
 
 
     if GetHost() != "darwin":
     if GetHost() != "darwin":
         # Workaround for an issue where pkg-config does not include this path
         # Workaround for an issue where pkg-config does not include this path
@@ -7216,8 +7216,8 @@ def MakeInstallerFreeBSD():
             plist_txt += os.path.join(root, f)[21:] + "\n"
             plist_txt += os.path.join(root, f)[21:] + "\n"
 
 
     if not RUNTIME:
     if not RUNTIME:
-        plist_txt += "@exec /sbin/ldconfig -m /usr/local/lib\n"
-        plist_txt += "@unexec /sbin/ldconfig -R\n"
+        plist_txt += "@postexec /sbin/ldconfig -m /usr/local/lib\n"
+        plist_txt += "@postunexec /sbin/ldconfig -R\n"
 
 
         for remdir in ("lib/panda3d", "share/panda3d", "include/panda3d"):
         for remdir in ("lib/panda3d", "share/panda3d", "include/panda3d"):
             for root, dirs, files in os.walk("targetroot/usr/local/" + remdir, False):
             for root, dirs, files in os.walk("targetroot/usr/local/" + remdir, False):

+ 1 - 0
panda/src/display/get_x11.h

@@ -45,6 +45,7 @@ struct XVisualInfo;
 #else
 #else
 
 
 #include "pre_x11_include.h"
 #include "pre_x11_include.h"
+#include <X11/XKBlib.h>
 #include <X11/Xlib.h>
 #include <X11/Xlib.h>
 #include <X11/Xutil.h>
 #include <X11/Xutil.h>
 #include <X11/keysym.h>
 #include <X11/keysym.h>

+ 7 - 4
panda/src/egg/eggLine.h

@@ -31,7 +31,7 @@ PUBLISHED:
 
 
   virtual EggLine *make_copy() const OVERRIDE;
   virtual EggLine *make_copy() const OVERRIDE;
 
 
-  virtual void write(ostream &out, int indent_level) const;
+  virtual void write(ostream &out, int indent_level) const OVERRIDE;
 
 
   INLINE bool has_thick() const;
   INLINE bool has_thick() const;
   INLINE double get_thick() const;
   INLINE double get_thick() const;
@@ -39,7 +39,7 @@ PUBLISHED:
   INLINE void clear_thick();
   INLINE void clear_thick();
 
 
 protected:
 protected:
-  virtual int get_num_lead_vertices() const;
+  virtual int get_num_lead_vertices() const OVERRIDE;
 
 
 private:
 private:
   double _thick;
   double _thick;
@@ -54,10 +54,13 @@ public:
     register_type(_type_handle, "EggLine",
     register_type(_type_handle, "EggLine",
                   EggCompositePrimitive::get_class_type());
                   EggCompositePrimitive::get_class_type());
   }
   }
-  virtual TypeHandle get_type() const {
+  virtual TypeHandle get_type() const OVERRIDE {
+    return get_class_type();
+  }
+  virtual TypeHandle force_init_type() OVERRIDE {
+    init_type();
     return get_class_type();
     return get_class_type();
   }
   }
-  virtual TypeHandle force_init_type() {init_type(); return get_class_type();}
 
 
 private:
 private:
   static TypeHandle _type_handle;
   static TypeHandle _type_handle;

+ 6 - 3
panda/src/egg/eggNurbsCurve.h

@@ -50,7 +50,7 @@ PUBLISHED:
   INLINE double get_knot(int k) const;
   INLINE double get_knot(int k) const;
   MAKE_SEQ(get_knots, get_num_knots, get_knot);
   MAKE_SEQ(get_knots, get_num_knots, get_knot);
 
 
-  virtual void write(ostream &out, int indent_level) const;
+  virtual void write(ostream &out, int indent_level) const OVERRIDE;
 
 
   MAKE_PROPERTY(order, get_order, set_order);
   MAKE_PROPERTY(order, get_order, set_order);
   MAKE_PROPERTY(degree, get_degree);
   MAKE_PROPERTY(degree, get_degree);
@@ -72,10 +72,13 @@ public:
     register_type(_type_handle, "EggNurbsCurve",
     register_type(_type_handle, "EggNurbsCurve",
                   EggCurve::get_class_type());
                   EggCurve::get_class_type());
   }
   }
-  virtual TypeHandle get_type() const {
+  virtual TypeHandle get_type() const OVERRIDE {
+    return get_class_type();
+  }
+  virtual TypeHandle force_init_type() OVERRIDE {
+    init_type();
     return get_class_type();
     return get_class_type();
   }
   }
-  virtual TypeHandle force_init_type() {init_type(); return get_class_type();}
 
 
 private:
 private:
   static TypeHandle _type_handle;
   static TypeHandle _type_handle;

+ 7 - 4
panda/src/egg/eggNurbsSurface.h

@@ -75,14 +75,14 @@ PUBLISHED:
   MAKE_SEQ(get_v_knots, get_num_v_knots, get_v_knot);
   MAKE_SEQ(get_v_knots, get_num_v_knots, get_v_knot);
   INLINE EggVertex *get_cv(int ui, int vi) const;
   INLINE EggVertex *get_cv(int ui, int vi) const;
 
 
-  virtual void write(ostream &out, int indent_level) const;
+  virtual void write(ostream &out, int indent_level) const OVERRIDE;
 
 
 public:
 public:
   Curves _curves_on_surface;
   Curves _curves_on_surface;
   Trims _trims;
   Trims _trims;
 
 
 protected:
 protected:
-  virtual void r_apply_texmats(EggTextureCollection &textures);
+  virtual void r_apply_texmats(EggTextureCollection &textures) OVERRIDE;
 
 
 private:
 private:
   typedef vector_double Knots;
   typedef vector_double Knots;
@@ -101,10 +101,13 @@ public:
     register_type(_type_handle, "EggNurbsSurface",
     register_type(_type_handle, "EggNurbsSurface",
                   EggSurface::get_class_type());
                   EggSurface::get_class_type());
   }
   }
-  virtual TypeHandle get_type() const {
+  virtual TypeHandle get_type() const OVERRIDE {
+    return get_class_type();
+  }
+  virtual TypeHandle force_init_type() OVERRIDE {
+    init_type();
     return get_class_type();
     return get_class_type();
   }
   }
-  virtual TypeHandle force_init_type() {init_type(); return get_class_type();}
 
 
 private:
 private:
   static TypeHandle _type_handle;
   static TypeHandle _type_handle;

+ 6 - 3
panda/src/egg/eggPatch.h

@@ -30,7 +30,7 @@ PUBLISHED:
 
 
   virtual EggPatch *make_copy() const OVERRIDE;
   virtual EggPatch *make_copy() const OVERRIDE;
 
 
-  virtual void write(ostream &out, int indent_level) const;
+  virtual void write(ostream &out, int indent_level) const OVERRIDE;
 
 
 public:
 public:
   static TypeHandle get_class_type() {
   static TypeHandle get_class_type() {
@@ -41,10 +41,13 @@ public:
     register_type(_type_handle, "EggPatch",
     register_type(_type_handle, "EggPatch",
                   EggPrimitive::get_class_type());
                   EggPrimitive::get_class_type());
   }
   }
-  virtual TypeHandle get_type() const {
+  virtual TypeHandle get_type() const OVERRIDE {
+    return get_class_type();
+  }
+  virtual TypeHandle force_init_type() OVERRIDE {
+    init_type();
     return get_class_type();
     return get_class_type();
   }
   }
-  virtual TypeHandle force_init_type() {init_type(); return get_class_type();}
 
 
 private:
 private:
   static TypeHandle _type_handle;
   static TypeHandle _type_handle;

+ 7 - 4
panda/src/egg/eggPoint.h

@@ -40,9 +40,9 @@ PUBLISHED:
   INLINE void set_perspective(bool perspective);
   INLINE void set_perspective(bool perspective);
   INLINE void clear_perspective();
   INLINE void clear_perspective();
 
 
-  virtual bool cleanup();
+  virtual bool cleanup() OVERRIDE;
 
 
-  virtual void write(ostream &out, int indent_level) const;
+  virtual void write(ostream &out, int indent_level) const OVERRIDE;
 
 
 private:
 private:
   enum Flags {
   enum Flags {
@@ -64,10 +64,13 @@ public:
     register_type(_type_handle, "EggPoint",
     register_type(_type_handle, "EggPoint",
                   EggPrimitive::get_class_type());
                   EggPrimitive::get_class_type());
   }
   }
-  virtual TypeHandle get_type() const {
+  virtual TypeHandle get_type() const OVERRIDE {
+    return get_class_type();
+  }
+  virtual TypeHandle force_init_type() OVERRIDE {
+    init_type();
     return get_class_type();
     return get_class_type();
   }
   }
-  virtual TypeHandle force_init_type() {init_type(); return get_class_type();}
 
 
 private:
 private:
   static TypeHandle _type_handle;
   static TypeHandle _type_handle;

+ 7 - 4
panda/src/egg/eggPolygon.h

@@ -29,7 +29,7 @@ PUBLISHED:
 
 
   virtual EggPolygon *make_copy() const OVERRIDE;
   virtual EggPolygon *make_copy() const OVERRIDE;
 
 
-  virtual bool cleanup();
+  virtual bool cleanup() OVERRIDE;
 
 
   bool calculate_normal(LNormald &result, CoordinateSystem cs = CS_default) const;
   bool calculate_normal(LNormald &result, CoordinateSystem cs = CS_default) const;
   bool is_planar() const;
   bool is_planar() const;
@@ -39,7 +39,7 @@ PUBLISHED:
   INLINE bool triangulate_into(EggGroupNode *container, bool convex_also) const;
   INLINE bool triangulate_into(EggGroupNode *container, bool convex_also) const;
   PT(EggPolygon) triangulate_in_place(bool convex_also);
   PT(EggPolygon) triangulate_in_place(bool convex_also);
 
 
-  virtual void write(ostream &out, int indent_level) const;
+  virtual void write(ostream &out, int indent_level) const OVERRIDE;
 
 
 private:
 private:
   bool decomp_concave(EggGroupNode *container, int asum, int x, int y) const;
   bool decomp_concave(EggGroupNode *container, int asum, int x, int y) const;
@@ -55,10 +55,13 @@ public:
     register_type(_type_handle, "EggPolygon",
     register_type(_type_handle, "EggPolygon",
                   EggPrimitive::get_class_type());
                   EggPrimitive::get_class_type());
   }
   }
-  virtual TypeHandle get_type() const {
+  virtual TypeHandle get_type() const OVERRIDE {
+    return get_class_type();
+  }
+  virtual TypeHandle force_init_type() OVERRIDE {
+    init_type();
     return get_class_type();
     return get_class_type();
   }
   }
-  virtual TypeHandle force_init_type() {init_type(); return get_class_type();}
 
 
 private:
 private:
   static TypeHandle _type_handle;
   static TypeHandle _type_handle;

+ 9 - 6
panda/src/egg/eggTriangleFan.h

@@ -31,12 +31,12 @@ PUBLISHED:
 
 
   virtual EggTriangleFan *make_copy() const OVERRIDE;
   virtual EggTriangleFan *make_copy() const OVERRIDE;
 
 
-  virtual void write(ostream &out, int indent_level) const;
-  virtual void apply_first_attribute();
+  virtual void write(ostream &out, int indent_level) const OVERRIDE;
+  virtual void apply_first_attribute() OVERRIDE;
 
 
 protected:
 protected:
-  virtual int get_num_lead_vertices() const;
-  virtual bool do_triangulate(EggGroupNode *container) const;
+  virtual int get_num_lead_vertices() const OVERRIDE;
+  virtual bool do_triangulate(EggGroupNode *container) const OVERRIDE;
 
 
 public:
 public:
   static TypeHandle get_class_type() {
   static TypeHandle get_class_type() {
@@ -47,10 +47,13 @@ public:
     register_type(_type_handle, "EggTriangleFan",
     register_type(_type_handle, "EggTriangleFan",
                   EggCompositePrimitive::get_class_type());
                   EggCompositePrimitive::get_class_type());
   }
   }
-  virtual TypeHandle get_type() const {
+  virtual TypeHandle get_type() const OVERRIDE {
+    return get_class_type();
+  }
+  virtual TypeHandle force_init_type() OVERRIDE {
+    init_type();
     return get_class_type();
     return get_class_type();
   }
   }
-  virtual TypeHandle force_init_type() {init_type(); return get_class_type();}
 
 
 private:
 private:
   static TypeHandle _type_handle;
   static TypeHandle _type_handle;

+ 8 - 5
panda/src/egg/eggTriangleStrip.h

@@ -31,11 +31,11 @@ PUBLISHED:
 
 
   virtual EggTriangleStrip *make_copy() const OVERRIDE;
   virtual EggTriangleStrip *make_copy() const OVERRIDE;
 
 
-  virtual void write(ostream &out, int indent_level) const;
+  virtual void write(ostream &out, int indent_level) const OVERRIDE;
 
 
 protected:
 protected:
-  virtual int get_num_lead_vertices() const;
-  virtual bool do_triangulate(EggGroupNode *container) const;
+  virtual int get_num_lead_vertices() const OVERRIDE;
+  virtual bool do_triangulate(EggGroupNode *container) const OVERRIDE;
 
 
 public:
 public:
   static TypeHandle get_class_type() {
   static TypeHandle get_class_type() {
@@ -46,10 +46,13 @@ public:
     register_type(_type_handle, "EggTriangleStrip",
     register_type(_type_handle, "EggTriangleStrip",
                   EggCompositePrimitive::get_class_type());
                   EggCompositePrimitive::get_class_type());
   }
   }
-  virtual TypeHandle get_type() const {
+  virtual TypeHandle get_type() const OVERRIDE {
+    return get_class_type();
+  }
+  virtual TypeHandle force_init_type() OVERRIDE {
+    init_type();
     return get_class_type();
     return get_class_type();
   }
   }
-  virtual TypeHandle force_init_type() {init_type(); return get_class_type();}
 
 
 private:
 private:
   static TypeHandle _type_handle;
   static TypeHandle _type_handle;

+ 1 - 1
panda/src/x11display/x11GraphicsWindow.cxx

@@ -2051,7 +2051,7 @@ get_keyboard_map() const {
       continue;
       continue;
     }
     }
 
 
-    KeySym sym = XKeycodeToKeysym(_display, k, 0);
+    KeySym sym = XkbKeycodeToKeysym(_display, k, 0, 0);
     ButtonHandle button = map_button(sym);
     ButtonHandle button = map_button(sym);
     if (button == ButtonHandle::none()) {
     if (button == ButtonHandle::none()) {
       continue;
       continue;