- Remove warnings about deprecated QStyleOptionView by using unversioned version
- Fix warning about converting strings.
This commit is contained in:
@@ -75,7 +75,7 @@ bool MixersList::dropMimeData( int index, const QMimeData * data, Qt::DropAction
|
|||||||
*/
|
*/
|
||||||
void MixersDelegate::paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const
|
void MixersDelegate::paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const
|
||||||
{
|
{
|
||||||
QStyleOptionViewItemV4 options = option;
|
QStyleOptionViewItem options = option;
|
||||||
initStyleOption(&options, index);
|
initStyleOption(&options, index);
|
||||||
|
|
||||||
painter->save();
|
painter->save();
|
||||||
@@ -107,7 +107,7 @@ void MixersDelegate::paint(QPainter *painter, const QStyleOptionViewItem &option
|
|||||||
*/
|
*/
|
||||||
QSize MixersDelegate::sizeHint ( const QStyleOptionViewItem & option, const QModelIndex & index ) const
|
QSize MixersDelegate::sizeHint ( const QStyleOptionViewItem & option, const QModelIndex & index ) const
|
||||||
{
|
{
|
||||||
QStyleOptionViewItemV4 options = option;
|
QStyleOptionViewItem options = option;
|
||||||
initStyleOption(&options, index);
|
initStyleOption(&options, index);
|
||||||
|
|
||||||
//setup html document
|
//setup html document
|
||||||
@@ -125,7 +125,7 @@ QSize MixersDelegate::sizeHint ( const QStyleOptionViewItem & option, const QMod
|
|||||||
return QSize(doc.idealWidth(), height);
|
return QSize(doc.idealWidth(), height);
|
||||||
}
|
}
|
||||||
|
|
||||||
void MixersDelegate::SetupDocument(QTextDocument & doc, const QStyleOptionViewItemV4 & options) const
|
void MixersDelegate::SetupDocument(QTextDocument & doc, const QStyleOptionViewItem & options) const
|
||||||
{
|
{
|
||||||
//setup html document
|
//setup html document
|
||||||
doc.setHtml(options.text);
|
doc.setHtml(options.text);
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ class MixersDelegate : public QStyledItemDelegate
|
|||||||
QSize sizeHint ( const QStyleOptionViewItem & option, const QModelIndex & index ) const;
|
QSize sizeHint ( const QStyleOptionViewItem & option, const QModelIndex & index ) const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void SetupDocument(QTextDocument & doc, const QStyleOptionViewItemV4 & options) const;
|
void SetupDocument(QTextDocument & doc, const QStyleOptionViewItem & options) const;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -210,7 +210,7 @@
|
|||||||
#ifdef MOUNTED_GETMNTINFO
|
#ifdef MOUNTED_GETMNTINFO
|
||||||
|
|
||||||
# if ! HAVE_STRUCT_STATFS_F_FSTYPENAME
|
# if ! HAVE_STRUCT_STATFS_F_FSTYPENAME
|
||||||
static char *
|
static const char *
|
||||||
fstype_to_string (short int t)
|
fstype_to_string (short int t)
|
||||||
{
|
{
|
||||||
switch (t)
|
switch (t)
|
||||||
@@ -305,7 +305,7 @@ fstype_to_string (short int t)
|
|||||||
}
|
}
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
static char *
|
static const char *
|
||||||
fsp_to_string (const struct statfs *fsp)
|
fsp_to_string (const struct statfs *fsp)
|
||||||
{
|
{
|
||||||
# if HAVE_STRUCT_STATFS_F_FSTYPENAME
|
# if HAVE_STRUCT_STATFS_F_FSTYPENAME
|
||||||
|
|||||||
Reference in New Issue
Block a user