diff options
author | Thierry Bastian <thierry.bastian@nokia.com> | 2009-06-11 09:56:54 (GMT) |
---|---|---|
committer | Thierry Bastian <thierry.bastian@nokia.com> | 2009-06-11 14:07:02 (GMT) |
commit | 3f7a7c20c8493f62e090e703acfd581a4e3c4d2e (patch) | |
tree | cb835094f6f035ddd3b975db164a056d12f04280 /src/gui/text/qtextdocumentlayout.cpp | |
parent | 0f60b6e05a707630e02655c60ae60884262a4b8e (diff) | |
download | Qt-3f7a7c20c8493f62e090e703acfd581a4e3c4d2e.zip Qt-3f7a7c20c8493f62e090e703acfd581a4e3c4d2e.tar.gz Qt-3f7a7c20c8493f62e090e703acfd581a4e3c4d2e.tar.bz2 |
refactor of private getters for the mode i item widget classes
Diffstat (limited to 'src/gui/text/qtextdocumentlayout.cpp')
-rw-r--r-- | src/gui/text/qtextdocumentlayout.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/gui/text/qtextdocumentlayout.cpp b/src/gui/text/qtextdocumentlayout.cpp index fa032e6..cf40ad8 100644 --- a/src/gui/text/qtextdocumentlayout.cpp +++ b/src/gui/text/qtextdocumentlayout.cpp @@ -3205,18 +3205,16 @@ bool QTextDocumentLayout::contentHasAlignment() const qreal QTextDocumentLayoutPrivate::scaleToDevice(qreal value) const { - QPaintDevice *dev = q_func()->paintDevice(); - if (!dev) + if (!paintDevice) return value; - return value * dev->logicalDpiY() / qreal(qt_defaultDpi()); + return value * paintDevice->logicalDpiY() / qreal(qt_defaultDpi()); } QFixed QTextDocumentLayoutPrivate::scaleToDevice(QFixed value) const { - QPaintDevice *dev = q_func()->paintDevice(); - if (!dev) + if (!paintDevice) return value; - return value * QFixed(dev->logicalDpiY()) / QFixed(qt_defaultDpi()); + return value * QFixed(paintDevice->logicalDpiY()) / QFixed(qt_defaultDpi()); } QT_END_NAMESPACE |