forked from qt-creator/qt-creator
Remove even more uses of deprecated typedefs
Change-Id: Icb48d484f760eb11ef2d41d8271e43f4f51c2e91 Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
This commit is contained in:
@@ -46,7 +46,7 @@ void SearchResultTreeItemDelegate::paint(QPainter *painter, const QStyleOptionVi
|
||||
|
||||
painter->save();
|
||||
|
||||
QStyleOptionViewItemV3 opt = setOptions(index, option);
|
||||
QStyleOptionViewItem opt = setOptions(index, option);
|
||||
painter->setFont(opt.font);
|
||||
|
||||
QItemDelegate::drawBackground(painter, opt, index);
|
||||
@@ -102,7 +102,7 @@ void SearchResultTreeItemDelegate::setTabWidth(int width)
|
||||
}
|
||||
|
||||
// returns the width of the line number area
|
||||
int SearchResultTreeItemDelegate::drawLineNumber(QPainter *painter, const QStyleOptionViewItemV3 &option,
|
||||
int SearchResultTreeItemDelegate::drawLineNumber(QPainter *painter, const QStyleOptionViewItem &option,
|
||||
const QRect &rect,
|
||||
const QModelIndex &index) const
|
||||
{
|
||||
@@ -128,7 +128,7 @@ int SearchResultTreeItemDelegate::drawLineNumber(QPainter *painter, const QStyle
|
||||
option.palette.brush(cg, QPalette::Highlight) :
|
||||
option.palette.color(cg, QPalette::Base).darker(111)));
|
||||
|
||||
QStyleOptionViewItemV3 opt = option;
|
||||
QStyleOptionViewItem opt = option;
|
||||
opt.displayAlignment = Qt::AlignRight | Qt::AlignVCenter;
|
||||
opt.palette.setColor(cg, QPalette::Text, Qt::darkGray);
|
||||
|
||||
|
@@ -39,7 +39,7 @@ public:
|
||||
void setTabWidth(int width);
|
||||
|
||||
private:
|
||||
int drawLineNumber(QPainter *painter, const QStyleOptionViewItemV3 &option, const QRect &rect, const QModelIndex &index) const;
|
||||
int drawLineNumber(QPainter *painter, const QStyleOptionViewItem &option, const QRect &rect, const QModelIndex &index) const;
|
||||
void drawText(QPainter *painter, const QStyleOptionViewItem &option,
|
||||
const QRect &rect, const QModelIndex &index) const;
|
||||
|
||||
|
@@ -112,7 +112,7 @@ private:
|
||||
class Positions
|
||||
{
|
||||
public:
|
||||
Positions(const QStyleOptionViewItemV4 &options, TaskModel *model) :
|
||||
Positions(const QStyleOptionViewItem &options, TaskModel *model) :
|
||||
m_totalWidth(options.rect.width()),
|
||||
m_maxFileLength(model->sizeOfFile(options.font)),
|
||||
m_maxLineLength(model->sizeOfLineNumber(options.font)),
|
||||
@@ -670,7 +670,7 @@ TaskDelegate::~TaskDelegate()
|
||||
|
||||
QSize TaskDelegate::sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const
|
||||
{
|
||||
QStyleOptionViewItemV4 opt = option;
|
||||
QStyleOptionViewItem opt = option;
|
||||
initStyleOption(&opt, index);
|
||||
|
||||
const QAbstractItemView * view = qobject_cast<const QAbstractItemView *>(opt.widget);
|
||||
@@ -738,7 +738,7 @@ void TaskDelegate::currentChanged(const QModelIndex ¤t, const QModelIndex
|
||||
|
||||
void TaskDelegate::paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const
|
||||
{
|
||||
QStyleOptionViewItemV4 opt = option;
|
||||
QStyleOptionViewItem opt = option;
|
||||
initStyleOption(&opt, index);
|
||||
painter->save();
|
||||
|
||||
|
@@ -4647,7 +4647,7 @@ void TextEditorWidgetPrivate::drawFoldingMarker(QPainter *painter, const QPalett
|
||||
painter->drawPolygon(a);
|
||||
painter->restore();
|
||||
} else {
|
||||
QStyleOptionViewItemV2 opt;
|
||||
QStyleOptionViewItem opt;
|
||||
opt.rect = rect;
|
||||
opt.state = QStyle::State_Active | QStyle::State_Item | QStyle::State_Children;
|
||||
if (expanded)
|
||||
|
@@ -42,7 +42,7 @@ void NameDelegate::paint(QPainter *painter, const QStyleOptionViewItem &option,
|
||||
const QModelIndex &index) const
|
||||
{
|
||||
// init
|
||||
QStyleOptionViewItemV4 opt(option);
|
||||
QStyleOptionViewItem opt(option);
|
||||
initStyleOption(&opt, index);
|
||||
|
||||
const int margin = 2;
|
||||
|
Reference in New Issue
Block a user