diff options
| author | Elvis Angelaccio <[email protected]> | 2020-05-28 22:42:40 +0200 |
|---|---|---|
| committer | Elvis Angelaccio <[email protected]> | 2020-05-28 22:42:40 +0200 |
| commit | cbb35681f51b58eb7fb20b201869138cc5d45b65 (patch) | |
| tree | 3155bbdaad5fb48374fa45a2af10640cdeb53f99 /src | |
| parent | 46c4b902c1cf6d1f42a6210d9de6118185d3a70f (diff) | |
Add some missing const qualifiers
Diffstat (limited to 'src')
| -rw-r--r-- | src/kitemviews/kstandarditemlistwidget.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/kitemviews/kstandarditemlistwidget.cpp b/src/kitemviews/kstandarditemlistwidget.cpp index 13f80996d..41e9287c1 100644 --- a/src/kitemviews/kstandarditemlistwidget.cpp +++ b/src/kitemviews/kstandarditemlistwidget.cpp @@ -1115,11 +1115,11 @@ void KStandardItemListWidget::updateTextsCache() QString KStandardItemListWidget::elideRightKeepExtension(const QString &text, int elidingWidth) const { - auto extensionIndex = text.lastIndexOf('.'); + const auto extensionIndex = text.lastIndexOf('.'); if (extensionIndex != -1) { // has file extension - auto extensionLength = text.length() - extensionIndex; - auto extensionWidth = m_customizedFontMetrics.width(text.right(extensionLength)); + const auto extensionLength = text.length() - extensionIndex; + const auto extensionWidth = m_customizedFontMetrics.width(text.right(extensionLength)); if (elidingWidth > extensionWidth && extensionLength < 6 && (float(extensionWidth) / float(elidingWidth)) < 0.3) { // if we have room to display the file extension and the extension is not too long QString ret = m_customizedFontMetrics.elidedText(text.chopped(extensionLength), |
