Minor clean up in QTextOption API
authorEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
Tue, 10 Apr 2012 12:30:52 +0000 (14:30 +0200)
committerQt by Nokia <qt-info@nokia.com>
Tue, 10 Apr 2012 23:42:12 +0000 (01:42 +0200)
Source compatible, but binary incompatible, change to QTextOption
API to make it consistent with Qt's coding style.

Change-Id: I368f13925339fa41025a570f684f4b944844a022
Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
src/gui/text/qtextoption.cpp
src/gui/text/qtextoption.h

index b3b4c90..25760de 100644 (file)
@@ -145,7 +145,7 @@ QTextOption &QTextOption::operator=(const QTextOption &o)
 
     \sa tabArray(), setTabStop(), setTabs()
 */
-void QTextOption::setTabArray(QList<qreal> tabStops) // Qt5: const ref
+void QTextOption::setTabArray(const QList<qreal> &tabStops)
 {
     if (!d)
         d = new QTextOptionPrivate;
@@ -165,7 +165,7 @@ void QTextOption::setTabArray(QList<qreal> tabStops) // Qt5: const ref
 
     \sa tabStops()
 */
-void QTextOption::setTabs(QList<QTextOption::Tab> tabStops) // Qt5: const ref
+void QTextOption::setTabs(const QList<QTextOption::Tab> &tabStops)
 {
     if (!d)
         d = new QTextOptionPrivate;
index a0a4c76..f2a9f52 100644 (file)
@@ -122,10 +122,10 @@ public:
     inline void setTabStop(qreal tabStop);
     inline qreal tabStop() const { return tab; }
 
-    void setTabArray(QList<qreal> tabStops);
+    void setTabArray(const QList<qreal> &tabStops);
     QList<qreal> tabArray() const;
 
-    void setTabs(QList<Tab> tabStops);
+    void setTabs(const QList<Tab> &tabStops);
     QList<Tab> tabs() const;
 
     void setUseDesignMetrics(bool b) { design = b; }