Solve warning about unused function
authorThiago Macieira <thiago.macieira@intel.com>
Thu, 18 Dec 2014 02:43:00 +0000 (18:43 -0800)
committerThiago Macieira <thiago.macieira@intel.com>
Thu, 18 Dec 2014 20:04:00 +0000 (21:04 +0100)
The function is unused, but gets used when developers are doing
debugging. So instead of removing it completely, make it inline
non-static.

I've also moved it to a better place, so we don't forget about it.

Change-Id: Id751869e6d6a7d46b4985ef9c09f45661e8cf839
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
src/designer/src/lib/shared/layout.cpp

index a72f01a..daf1c87 100644 (file)
@@ -619,6 +619,8 @@ public:
     bool locateWidget(QWidget* w, int& row, int& col, int& rowspan, int& colspan) const;
 
     QDebug debug(QDebug str) const;
+    friend inline QDebug operator<<(QDebug str, const Grid &g)
+    { return g.debug(str); }
 
 private:
     void setCell(int row, int col, QWidget* w) { m_cells[ row * m_ncols + col] = w; }
@@ -692,8 +694,6 @@ QDebug Grid::debug(QDebug str) const
     return str;
 }
 
-static inline QDebug operator<<(QDebug str, const Grid &g) { return g.debug(str); }
-
 void Grid::setCells(const QRect &c, QWidget* w)
 {
     const int bottom = c.top() + c.height();