Core: Utils: Fix compile with Qt4

Change-Id: Ibe4b504b84e467b1450b63bbbc7b569558fd8733
Reviewed-by: hjk <hjk121@nokiamail.com>
This commit is contained in:
Christian Stenger
2014-06-17 07:43:35 +02:00
committed by hjk
parent 84e176edab
commit 3247028dee
2 changed files with 15 additions and 1 deletions

View File

@@ -32,7 +32,17 @@
#include <algorithm>
#include <qcompilerdetection.h> // for Q_REQUIRE_RESULT
#if QT_VERSION < 0x050000
#ifndef Q_REQUIRED_RESULT
# if defined(Q_CC_GNU)
# define Q_REQUIRED_RESULT __attribute__ ((warn_unused_result))
# else
# define Q_REQUIRED_RESULT
# endif
#endif
#else
#include <qcompilerdetection.h> // for Q_REQUIRED_RESULT
#endif
namespace Utils
{

View File

@@ -158,7 +158,11 @@ void OpenEditorsWindow::selectPreviousEditor()
QSize OpenEditorsTreeWidget::sizeHint() const
{
return QSize(sizeHintForColumn(0) + verticalScrollBar()->width() + frameWidth() * 2,
#if QT_VERSION < 0x050200
minimumHeight());
#else
viewportSizeHint().height() + frameWidth() * 2);
#endif
}
QSize OpenEditorsWindow::sizeHint() const