1
0
mirror of https://github.com/d47081/qBittorrent.git synced 2025-01-26 22:44:36 +00:00

- Should fix compiling errors with Qt 4.2

This commit is contained in:
Christophe Dumez 2007-08-01 07:19:44 +00:00
parent 57b4a7150a
commit 5879df7d5f
5 changed files with 8 additions and 5 deletions

1
TODO
View File

@ -38,7 +38,6 @@
- Check storage st creation + hasher in torrent creation - Check storage st creation + hasher in torrent creation
- test IPv6 support (How? Who uses IPv6?) - test IPv6 support (How? Who uses IPv6?)
- Fix all (or almost all) opened bugs in bug tracker - 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? - update sorting when a new torrent is added?
- Complete documentation and english translation - Complete documentation and english translation
- Windows port (Chris - Peerkoel) - Windows port (Chris - Peerkoel)

View File

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

View File

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

View File

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

View File

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