diff options
author | Friedemann Kleint <Friedemann.Kleint@nokia.com> | 2011-11-17 10:49:42 +0100 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2011-11-17 11:29:37 +0100 |
commit | 11e813849558de168829bc9a8af3a924f5496ab7 (patch) | |
tree | 4d0b301cf243055eadb508b422245850c962c544 | |
parent | 5d3385431d02a0eb0571bcc1c73130a089d80ed8 (diff) |
Fix compilation with -force-asserts.
Change-Id: I2f697ba9ab9a5a8393e778abad4da18c7f232d7f
Reviewed-by: Harald Fernengel <harald.fernengel@nokia.com>
-rw-r--r-- | src/widgets/itemviews/qheaderview.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/widgets/itemviews/qheaderview.cpp b/src/widgets/itemviews/qheaderview.cpp index ec8480db97..36784f6424 100644 --- a/src/widgets/itemviews/qheaderview.cpp +++ b/src/widgets/itemviews/qheaderview.cpp @@ -3126,8 +3126,8 @@ void QHeaderViewPrivate::createSectionSpan(int start, int end, int size, QHeader // the new span is in the middle of the old span, so we have to split it length -= sectionSpans.at(i).size; int section_size = sectionSpans.at(i).sectionSize(); -#ifndef QT_NO_DEBUG - int span_count = sectionSpans.at(i).count; +#if !defined(QT_NO_DEBUG) || defined(QT_FORCE_ASSERTS) + const int span_count = sectionSpans.at(i).count; #endif QHeaderView::ResizeMode span_mode = sectionSpans.at(i).resizeMode; // first span @@ -3139,7 +3139,7 @@ void QHeaderViewPrivate::createSectionSpan(int start, int end, int size, QHeader length += first_span_size; // middle span (the new span) #if !defined(QT_NO_DEBUG) || defined(QT_FORCE_ASSERTS) - int mid_span_count = span.count; + const int mid_span_count = span.count; #endif int mid_span_size = span.size; sectionSpans.insert(i + 1, span); |