From 3aae3ff5472d6deada4908fe599714ecdd7e6b61 Mon Sep 17 00:00:00 2001 From: "Lubomir I. Ivanov" Date: Thu, 11 Jul 2013 12:55:48 +0300 Subject: Print: mark some functions in PrintLayout as 'const' It might be a good practice to declare certain class 'helper' functions as constant members. But I don't think there are performance benefits to that other than the readability ones. Signed-off-by: Lubomir I. Ivanov --- qt-ui/printlayout.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'qt-ui/printlayout.cpp') diff --git a/qt-ui/printlayout.cpp b/qt-ui/printlayout.cpp index f33b372e1..6b81dd616 100644 --- a/qt-ui/printlayout.cpp +++ b/qt-ui/printlayout.cpp @@ -80,17 +80,17 @@ void PrintLayout::setup() scaleY = (qreal)printerDpi/(qreal)screenDpiY; } -void PrintLayout::printSixDives() +void PrintLayout::printSixDives() const { // nop } -void PrintLayout::printTwoDives() +void PrintLayout::printTwoDives() const { // nop } -void PrintLayout::printTable() +void PrintLayout::printTable() const { QTextDocument doc; QSizeF pageSize; @@ -149,7 +149,7 @@ void PrintLayout::printTable() doc.print(printer); } -QString PrintLayout::insertTableHeadingRow() +QString PrintLayout::insertTableHeadingRow() const { int i; QString ret(""); @@ -159,7 +159,7 @@ QString PrintLayout::insertTableHeadingRow() return ret; } -QString PrintLayout::insertTableHeadingCol(int col) +QString PrintLayout::insertTableHeadingCol(int col) const { QString ret("