Browse Source

- Should fix compiling errors with Qt 4.2

adaptive-webui-19844
Christophe Dumez 18 years ago
parent
commit
5879df7d5f
  1. 1
      TODO
  2. 3
      src/DLListDelegate.h
  3. 3
      src/FinishedListDelegate.h
  4. 3
      src/PreviewListDelegate.h
  5. 3
      src/SearchListDelegate.h

1
TODO

@ -38,7 +38,6 @@ @@ -38,7 +38,6 @@
- Check storage st creation + hasher in torrent creation
- test IPv6 support (How? Who uses IPv6?)
- Fix all (or almost all) opened bugs in bug tracker
- Fix column sorting with Qt 4.3 - Reported to Trolltech, waiting for their fix
- update sorting when a new torrent is added?
- Complete documentation and english translation
- Windows port (Chris - Peerkoel)

3
src/DLListDelegate.h

@ -26,6 +26,7 @@ @@ -26,6 +26,7 @@
#include <QModelIndex>
#include <QPainter>
#include <QStyleOptionProgressBarV2>
#include <QStyleOptionViewItemV2>
#include <QProgressBar>
#include <QApplication>
#include "misc.h"
@ -51,7 +52,7 @@ class DLListDelegate: public QItemDelegate { @@ -51,7 +52,7 @@ class DLListDelegate: public QItemDelegate {
void paint(QPainter * painter, const QStyleOptionViewItem & option, const QModelIndex & index) const{
char tmp[MAX_CHAR_TMP];
QStyleOptionViewItemV3 opt = QItemDelegate::setOptions(index, option);
QStyleOptionViewItemV2 opt = QItemDelegate::setOptions(index, option);
switch(index.column()){
case SIZE:
QItemDelegate::drawBackground(painter, opt, index);

3
src/FinishedListDelegate.h

@ -26,6 +26,7 @@ @@ -26,6 +26,7 @@
#include <QModelIndex>
#include <QPainter>
#include <QStyleOptionProgressBarV2>
#include <QStyleOptionViewItemV2>
#include <QProgressBar>
#include <QApplication>
#include "misc.h"
@ -49,7 +50,7 @@ class FinishedListDelegate: public QItemDelegate { @@ -49,7 +50,7 @@ class FinishedListDelegate: public QItemDelegate {
void paint(QPainter * painter, const QStyleOptionViewItem & option, const QModelIndex & index) const{
char tmp[MAX_CHAR_TMP];
QStyleOptionViewItemV3 opt = QItemDelegate::setOptions(index, option);
QStyleOptionViewItemV2 opt = QItemDelegate::setOptions(index, option);
switch(index.column()){
case F_SIZE:
QItemDelegate::drawBackground(painter, opt, index);

3
src/PreviewListDelegate.h

@ -24,6 +24,7 @@ @@ -24,6 +24,7 @@
#include <QItemDelegate>
#include <QStyleOptionProgressBarV2>
#include <QStyleOptionViewItemV2>
#include <QModelIndex>
#include <QPainter>
#include <QProgressBar>
@ -44,7 +45,7 @@ class PreviewListDelegate: public QItemDelegate { @@ -44,7 +45,7 @@ class PreviewListDelegate: public QItemDelegate {
~PreviewListDelegate(){}
void paint(QPainter * painter, const QStyleOptionViewItem & option, const QModelIndex & index) const{
QStyleOptionViewItemV3 opt = QItemDelegate::setOptions(index, option);
QStyleOptionViewItemV2 opt = QItemDelegate::setOptions(index, option);
char tmp[MAX_CHAR_TMP];
switch(index.column()){

3
src/SearchListDelegate.h

@ -24,6 +24,7 @@ @@ -24,6 +24,7 @@
#include <QItemDelegate>
#include <QStyleOptionProgressBarV2>
#include <QStyleOptionViewItemV2>
#include <QModelIndex>
#include <QPainter>
#include <QProgressBar>
@ -45,7 +46,7 @@ class SearchListDelegate: public QItemDelegate { @@ -45,7 +46,7 @@ class SearchListDelegate: public QItemDelegate {
~SearchListDelegate(){}
void paint(QPainter * painter, const QStyleOptionViewItem & option, const QModelIndex & index) const{
QStyleOptionViewItemV3 opt = QItemDelegate::setOptions(index, option);
QStyleOptionViewItemV2 opt = QItemDelegate::setOptions(index, option);
switch(index.column()){
case SIZE:
QItemDelegate::drawBackground(painter, opt, index);

Loading…
Cancel
Save