Code maintenance for Qt 5:

- Added usage of QUrlQuery
- Removed QSound::isAvailable()
- Changed Qt::escape() to QString::toHtmlEscaped()
- Changed QAbstractItemModel::setSupportedDragActions() to virtual QAbstractItemModel::supportedDragActions()

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@6851 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
thunder2 2013-10-19 20:59:55 +00:00
parent 68922f45a2
commit f10f029d45
8 changed files with 195 additions and 149 deletions

View file

@ -51,10 +51,20 @@ RetroshareDirModel::RetroshareDirModel(bool mode, QObject *parent)
{
_visible = false ;
_needs_update = true ;
#if QT_VERSION < QT_VERSION_CHECK (5, 0, 0)
setSupportedDragActions(Qt::CopyAction);
#endif
treeStyle();
}
// QAbstractItemModel::setSupportedDragActions() was replaced by virtual QAbstractItemModel::supportedDragActions()
#if QT_VERSION >= QT_VERSION_CHECK (5, 0, 0)
Qt::DropActions RetroshareDirModel::supportedDragActions() const
{
return Qt::CopyAction;
}
#endif
void RetroshareDirModel::update()
{
if(_needs_update)
@ -528,7 +538,7 @@ QVariant RetroshareDirModel::data(const QModelIndex &index, int role) const
if (role == Qt::TextColorRole)
{
if(details.min_age > ageIndicator)
return Qt::gray ;
return QVariant(QColor(Qt::gray)) ;
else
return QVariant() ; // standard
} /* end of TextColorRole */