Commit d734da76 authored by Yuri Chornoivan's avatar Yuri Chornoivan

Get rid of gcc warnings

parent f12296b9
......@@ -30,11 +30,11 @@ class AutoPasteDelegate : public QStyledItemDelegate
public:
AutoPasteDelegate(QAbstractItemModel *types, QAbstractItemModel *syntaxes, QObject *parent = nullptr);
QWidget *createEditor(QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index) const;
void setEditorData(QWidget *editor, const QModelIndex &index) const;
void setModelData(QWidget *editor, QAbstractItemModel *model, const QModelIndex &index) const;
void updateEditorGeometry(QWidget *editor, const QStyleOptionViewItem &option, const QModelIndex &index) const;
QSize sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const;
QWidget *createEditor(QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index) const override;
void setEditorData(QWidget *editor, const QModelIndex &index) const override;
void setModelData(QWidget *editor, QAbstractItemModel *model, const QModelIndex &index) const override;
void updateEditorGeometry(QWidget *editor, const QStyleOptionViewItem &option, const QModelIndex &index) const override;
QSize sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const override;
private:
QAbstractItemModel *m_types;
......@@ -63,13 +63,13 @@ class AutoPasteModel : public QAbstractTableModel
explicit AutoPasteModel(QObject *parent = 0);
~AutoPasteModel();
int rowCount(const QModelIndex &index = QModelIndex()) const;
int columnCount(const QModelIndex &index = QModelIndex()) const;
QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const;
QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const;
Qt::ItemFlags flags(const QModelIndex &index) const;
bool setData(const QModelIndex &index, const QVariant &value, int role = Qt::EditRole);
bool removeRows(int row, int count, const QModelIndex &parent = QModelIndex());
int rowCount(const QModelIndex &index = QModelIndex()) const override;
int columnCount(const QModelIndex &index = QModelIndex()) const override;
QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const override;
QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override;
Qt::ItemFlags flags(const QModelIndex &index) const override;
bool setData(const QModelIndex &index, const QVariant &value, int role = Qt::EditRole) override;
bool removeRows(int row, int count, const QModelIndex &parent = QModelIndex()) override;
/**
* Adds an an item
......
......@@ -30,7 +30,7 @@ class PreferencesDialog : public KConfigDialog
void slotToggleAfterFinishAction(int state);
void disableApplyButton();
void enableApplyButton();
virtual void updateWidgetsDefault();
virtual void updateWidgetsDefault() override;
private:
Ui::DlgAdvanced dlgAdv;
......
......@@ -27,9 +27,9 @@ class TransfersGroupDelegate : public BasicTransfersViewDelegate
public:
TransfersGroupDelegate(QAbstractItemView *parent);
QWidget *createEditor(QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index) const;
void setEditorData(QWidget *editor, const QModelIndex &index) const;
void setModelData(QWidget *editor, QAbstractItemModel *model, const QModelIndex &index) const;
QWidget *createEditor(QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index) const override;
void setEditorData(QWidget *editor, const QModelIndex &index) const override;
void setModelData(QWidget *editor, QAbstractItemModel *model, const QModelIndex &index) const override;
};
class TransfersGroupTree : public QTreeView
......@@ -37,7 +37,7 @@ class TransfersGroupTree : public QTreeView
Q_OBJECT
public:
TransfersGroupTree(QWidget *parent = nullptr);
void setModel(QAbstractItemModel *model);
void setModel(QAbstractItemModel *model) override;
public slots:
void editCurrent();
......@@ -47,7 +47,7 @@ class TransfersGroupTree : public QTreeView
void changeIcon(const QString &icon);
private:
void rowsInserted(const QModelIndex &index, int start, int end);
void rowsInserted(const QModelIndex &index, int start, int end) override;
};
#endif
......@@ -108,15 +108,15 @@ class KGET_EXPORT FileModel : public QAbstractItemModel
FileModel(const QList<QUrl> &files, const QUrl &destDirectory, QObject *parent = nullptr);
~FileModel();
QVariant data(const QModelIndex &index, int role) const;
bool setData(const QModelIndex &index, const QVariant &value, int role = Qt::EditRole);
Qt::ItemFlags flags(const QModelIndex &index) const;
QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const;
QModelIndex index(int row, int column, const QModelIndex &parent = QModelIndex()) const;
QVariant data(const QModelIndex &index, int role) const override;
bool setData(const QModelIndex &index, const QVariant &value, int role = Qt::EditRole) override;
Qt::ItemFlags flags(const QModelIndex &index) const override;
QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const override;
QModelIndex index(int row, int column, const QModelIndex &parent = QModelIndex()) const override;
QModelIndex index(const QUrl &file, int column);
QModelIndex parent(const QModelIndex &index) const;
int rowCount(const QModelIndex &parent = QModelIndex()) const;
int columnCount(const QModelIndex &parent = QModelIndex()) const;
QModelIndex parent(const QModelIndex &index) const override;
int rowCount(const QModelIndex &parent = QModelIndex()) const override;
int columnCount(const QModelIndex &parent = QModelIndex()) const override;
void rename(const QModelIndex &file, const QString &newName);
......
......@@ -24,7 +24,7 @@ public:
void update();
void start() {};
void start() override {};
signals:
/**
......@@ -37,7 +37,7 @@ signals:
void requestStop(KJob *job, TransferHandler *handler);
protected:
virtual bool doKill();
virtual bool doKill() override;
};
#endif
......@@ -27,7 +27,7 @@ public:
KGetKJobAdapter(QObject *parent, TransferHandler *transfer);
~KGetKJobAdapter();
void start() {};
void start() override {};
qulonglong processedAmount(Unit unit) const;
qulonglong totalAmount(Unit unit) const;
......@@ -47,9 +47,9 @@ signals:
void requestResume(KJob *job, TransferHandler *handler);
protected:
virtual bool doKill();
virtual bool doSuspend();
virtual bool doResume();
virtual bool doKill() override;
virtual bool doSuspend() override;
virtual bool doResume() override;
private:
TransferHandler *m_transferHandler;
......
......@@ -38,7 +38,7 @@ public:
/**
* Start reading the url contents
*/
void run();
void run() override;
/**
* copy the remote file out of the thread
......
......@@ -57,7 +57,7 @@ class KGET_EXPORT MostLocalUrlJob : public KIO::Job
public:
MostLocalUrlJob(const QUrl &url);
virtual void start();
virtual void start() override;
QUrl url();
/**
......@@ -66,7 +66,7 @@ class KGET_EXPORT MostLocalUrlJob : public KIO::Job
QUrl mostLocalUrl() const;
protected:
virtual void slotResult(KJob *job);
virtual void slotResult(KJob *job) override;
private:
QUrl m_url;
......
......@@ -162,7 +162,7 @@ class KGET_EXPORT Scheduler : public QObject
private:
//Virtual QObject method
void timerEvent(QTimerEvent * event);
void timerEvent(QTimerEvent * event) override;
/**
* Calls updateQueue for all queues
......
......@@ -54,7 +54,7 @@ class SignatureThread : public QThread
#endif //HAVE_QGPGME
protected:
void run();
void run() override;
private:
QMutex m_mutex;
......
......@@ -179,10 +179,10 @@ class KGET_EXPORT Transfer : public Job
int downloadSpeed() const {return m_downloadSpeed;}
int averageDownloadSpeed() const;
int uploadSpeed() const {return m_uploadSpeed;}
virtual int remainingTime() const {return KIO::calculateRemainingSeconds(totalSize(), downloadedSize(), downloadSpeed());}
virtual int elapsedTime() const;
virtual bool isStalled() const {return (status() == Job::Running && downloadSpeed() == 0);}
virtual bool isWorking() const {return downloadSpeed() > 0;}
virtual int remainingTime() const override {return KIO::calculateRemainingSeconds(totalSize(), downloadedSize(), downloadSpeed());}
virtual int elapsedTime() const override;
virtual bool isStalled() const override {return (status() == Job::Running && downloadSpeed() == 0);}
virtual bool isWorking() const override {return downloadSpeed() > 0;}
/**
* The mirrors that are available
......
......@@ -68,7 +68,7 @@ class KGET_EXPORT TransferGroup : public JobQueue
*
* @param queueStatus the new JobQueue status
*/
void setStatus(Status queueStatus);
void setStatus(Status queueStatus) override;
/**
* Appends a new transfer to the list of the transfers
......
......@@ -188,7 +188,7 @@ class KGET_EXPORT TransferGroupHandler : public Handler
* @returns the data associated to this TransferGroup item. This is
* necessary to make the interview model/view work
*/
QVariant data(int column);
QVariant data(int column) override;
/**
* @returns the number of columns associated to the group's data
......@@ -232,8 +232,8 @@ class KGET_EXPORT TransferGroupHandler : public Handler
/**
* These are all JobQueue-related functions
*/
void start();
void stop();
void start() override;
void stop() override;
signals:
void groupChangedEvent(TransferGroupHandler * transfer, TransferGroupHandler::ChangesFlags flags);
......
......@@ -220,7 +220,7 @@ class KGET_EXPORT TransferHandler : public Handler
* @returns the data associated to this Transfer item. This is
* necessary to make the interview model/view work
*/
QVariant data(int column);
QVariant data(int column) override;
/**
* @returns the number of columns associated to the transfer's data
......@@ -289,8 +289,8 @@ class KGET_EXPORT TransferHandler : public Handler
/**
* These are all Job-related functions
*/
virtual void start();
virtual void stop();
virtual void start() override;
virtual void stop() override;
signals:
/**
......
......@@ -27,11 +27,11 @@ public:
~SQLiteStore();
public slots:
void load();
void clear();
void saveItem(const TransferHistoryItem &item);
void saveItems(const QList<TransferHistoryItem> &items);
void deleteItem(const TransferHistoryItem &item);
void load() override;
void clear() override;
void saveItem(const TransferHistoryItem &item) override;
void saveItems(const QList<TransferHistoryItem> &items) override;
void deleteItem(const TransferHistoryItem &item) override;
private:
QSqlDatabase sql();
......
......@@ -25,10 +25,10 @@ public:
~XmlStore();
public slots:
void load();
void clear();
void saveItem(const TransferHistoryItem &item);
void deleteItem(const TransferHistoryItem &item);
void load() override;
void clear() override;
void saveItem(const TransferHistoryItem &item) override;
void deleteItem(const TransferHistoryItem &item) override;
void slotLoadElement(int number, int total, const TransferHistoryItem &item);
......@@ -55,7 +55,7 @@ class XmlStore::LoadThread : public QThread
public:
LoadThread(QObject *parent, const QString &url);
void run();
void run() override;
signals:
void elementLoaded(int number, int total, const TransferHistoryItem &item);
......@@ -71,7 +71,7 @@ public:
SaveThread(QObject *parent, const QString &url, const QList<TransferHistoryItem> &list);
SaveThread(QObject *parent, const QString &url, const TransferHistoryItem &item);
void run();
void run() override;
signals:
void elementLoaded(int number, int total, const TransferHistoryItem &item);
......@@ -88,7 +88,7 @@ class XmlStore::DeleteThread : public QThread
public:
DeleteThread(QObject *parent, const QString &url, const TransferHistoryItem &item);
void run();
void run() override;
QList <TransferHistoryItem> items() const
{
return m_items;
......
......@@ -61,7 +61,7 @@ class KGET_EXPORT ModelItem : public QStandardItem
ModelItem(Handler * handler);
virtual ~ModelItem();
virtual QVariant data(int role = Qt::UserRole + 1) const = 0;
virtual QVariant data(int role = Qt::UserRole + 1) const override = 0;
void emitDataChanged();
Handler * handler();
virtual bool isGroup();
......@@ -79,7 +79,7 @@ class KGET_EXPORT TransferModelItem : public ModelItem
TransferModelItem(TransferHandler *handler);
virtual ~TransferModelItem();
virtual QVariant data(int role = Qt::UserRole + 1) const;
virtual QVariant data(int role = Qt::UserRole + 1) const override;
TransferHandler * transferHandler();
......@@ -94,11 +94,11 @@ class KGET_EXPORT GroupModelItem : public ModelItem
GroupModelItem(TransferGroupHandler *handler);
virtual ~GroupModelItem();
virtual QVariant data(int role = Qt::UserRole + 1) const;
virtual QVariant data(int role = Qt::UserRole + 1) const override;
TransferGroupHandler * groupHandler();
virtual bool isGroup();
virtual bool isGroup() override;
private:
TransferGroupHandler * m_groupHandler;
......@@ -150,17 +150,17 @@ class KGET_EXPORT TransferTreeModel : public QStandardItemModel
void postDataChangedEvent(TransferHandler * transfer);
void postDataChangedEvent(TransferGroupHandler * group);
Qt::ItemFlags flags (const QModelIndex & index) const;
Qt::ItemFlags flags (const QModelIndex & index) const override;
QVariant headerData(int section, Qt::Orientation orientation,
int role = Qt::DisplayRole) const;
int role = Qt::DisplayRole) const override;
//Drag & drop functions
Qt::DropActions supportedDropActions() const;
QStringList mimeTypes() const;
QMimeData * mimeData(const QModelIndexList &indexes) const;
Qt::DropActions supportedDropActions() const override;
QStringList mimeTypes() const override;
QMimeData * mimeData(const QModelIndexList &indexes) const override;
bool dropMimeData(const QMimeData *mdata,
Qt::DropAction action, int row, int column,
const QModelIndex &parent);
const QModelIndex &parent) override;
static QString columnName(int column);
static int column(Transfer::TransferChange flag);
......@@ -177,7 +177,7 @@ class KGET_EXPORT TransferTreeModel : public QStandardItemModel
void transfersChangedEvent(QMap<TransferHandler *, Transfer::ChangesFlags>);
private:
void timerEvent(QTimerEvent *event);
void timerEvent(QTimerEvent *event) override;
Scheduler * m_scheduler;
......
......@@ -594,6 +594,7 @@ QList<QUrl> UrlChecker::hasExistingTransferMessages(const QList<QUrl> &urls, con
switch (result) {
case ExistingTransferDialog::ExistingDialogReturn::YesAll:
isYesAll = true;
// fallthrough
case ExistingTransferDialog::ExistingDialogReturn::Yes:
urlsToDownload << it->first;
toDelete << it->second;
......
......@@ -31,11 +31,11 @@ class KGET_EXPORT VerificationDelegate : public QStyledItemDelegate
public:
VerificationDelegate(QObject *parent = nullptr);
QWidget *createEditor(QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index) const;
void setEditorData(QWidget *editor, const QModelIndex &index) const;
void setModelData(QWidget *editor, QAbstractItemModel *model, const QModelIndex &index) const;
void updateEditorGeometry(QWidget *editor, const QStyleOptionViewItem &option, const QModelIndex &index) const;
QSize sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const;
QWidget *createEditor(QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index) const override;
void setEditorData(QWidget *editor, const QModelIndex &index) const override;
void setModelData(QWidget *editor, QAbstractItemModel *model, const QModelIndex &index) const override;
void updateEditorGeometry(QWidget *editor, const QStyleOptionViewItem &option, const QModelIndex &index) const override;
QSize sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const override;
private:
class VerificationDelegatePrivate *d;
......
......@@ -40,13 +40,13 @@ class KGET_EXPORT VerificationModel : public QAbstractTableModel
Verified
};
QVariant data(const QModelIndex &index, int role) const;
Qt::ItemFlags flags(const QModelIndex &index) const;
bool setData(const QModelIndex &index, const QVariant &value, int role = Qt::EditRole);
QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const;
int rowCount(const QModelIndex &parent = QModelIndex()) const;
int columnCount(const QModelIndex &parent = QModelIndex()) const;
bool removeRows(int row, int count, const QModelIndex &parent = QModelIndex());
QVariant data(const QModelIndex &index, int role) const override;
Qt::ItemFlags flags(const QModelIndex &index) const override;
bool setData(const QModelIndex &index, const QVariant &value, int role = Qt::EditRole) override;
QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const override;
int rowCount(const QModelIndex &parent = QModelIndex()) const override;
int columnCount(const QModelIndex &parent = QModelIndex()) const override;
bool removeRows(int row, int count, const QModelIndex &parent = QModelIndex()) override;
/**
* Add a checksum that is later used in the verification process
......
......@@ -62,7 +62,7 @@ class VerificationThread : public QThread
void brokenPieces(const QList<KIO::fileoffset_t> &offsets, KIO::filesize_t length);
protected:
void run();
void run() override;
private:
QMutex m_mutex;
......
......@@ -28,7 +28,7 @@
<arg name="urls" type="as" direction="in"/>
</method>
<method name="transfers">
<annotation name="com.trolltech.QtDBus.QtTypeName.Out0" value="QVariantMap"/>
<annotation name="org.qtproject.QtDBus.QtTypeName.Out0" value="QVariantMap"/>
<arg name="out" type="a{ss}" direction="out"/>
</method>
<method name="transfersSpeed">
......
......@@ -59,16 +59,16 @@ public slots:
protected:
// ignore/accept quit events
virtual void closeEvent(QCloseEvent *);
virtual void hideEvent(QHideEvent *);
virtual void showEvent(QShowEvent *);
virtual void closeEvent(QCloseEvent *) override;
virtual void hideEvent(QHideEvent *) override;
virtual void showEvent(QShowEvent *) override;
// drag and drop
virtual void dragEnterEvent(QDragEnterEvent *);
virtual void dropEvent(QDropEvent *);
virtual void dragEnterEvent(QDragEnterEvent *) override;
virtual void dropEvent(QDropEvent *) override;
// set sensitive initial size
virtual QSize sizeHint() const;
virtual QSize sizeHint() const override;
private slots:
// slots connected to actions
......
......@@ -49,7 +49,7 @@ class BTAdvancedDetailsWidget : public QWidget
private:
void hideEvent(QHideEvent * event);
void hideEvent(QHideEvent * event) override;
QTabWidget *tabWidget;
......
......@@ -59,16 +59,16 @@ namespace kt
void clear();
virtual int rowCount(const QModelIndex & parent) const;
virtual int columnCount(const QModelIndex & parent) const;
virtual QVariant headerData(int section, Qt::Orientation orientation,int role) const;
virtual QVariant data(const QModelIndex & index,int role) const;
virtual bool removeRows(int row,int count,const QModelIndex & parent);
virtual bool insertRows(int row,int count,const QModelIndex & parent);
virtual QModelIndex index(int row,int column,const QModelIndex & parent = QModelIndex()) const;
virtual int rowCount(const QModelIndex & parent) const override;
virtual int columnCount(const QModelIndex & parent) const override;
virtual QVariant headerData(int section, Qt::Orientation orientation,int role) const override;
virtual QVariant data(const QModelIndex & index,int role) const override;
virtual bool removeRows(int row,int count,const QModelIndex & parent) override;
virtual bool insertRows(int row,int count,const QModelIndex & parent) override;
virtual QModelIndex index(int row,int column,const QModelIndex & parent = QModelIndex()) const override;
public slots:
void sort(int col, Qt::SortOrder order);
void sort(int col, Qt::SortOrder order) override;
public:
struct Item
......
......@@ -68,7 +68,7 @@ namespace kt
void changePriority(bt::Priority newpriority);
void expandCollapseTree(const QModelIndex& idx, bool expand);
void expandCollapseSelected(bool expand);
virtual bool viewportEvent(QEvent *event);
virtual bool viewportEvent(QEvent *event) override;
virtual void dataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight);
private slots:
......
......@@ -39,14 +39,14 @@ namespace kt
IWFileListModel(bt::TorrentInterface* tc,QObject* parent);
virtual ~IWFileListModel();
virtual int columnCount(const QModelIndex & parent) const;
virtual QVariant headerData(int section, Qt::Orientation orientation,int role) const;
virtual QVariant data(const QModelIndex & index, int role) const;
virtual bool setData(const QModelIndex & index, const QVariant & value, int role);
void update();
virtual int columnCount(const QModelIndex & parent) const override;
virtual QVariant headerData(int section, Qt::Orientation orientation,int role) const override;
virtual QVariant data(const QModelIndex & index, int role) const override;
virtual bool setData(const QModelIndex & index, const QVariant & value, int role) override;
void update() override;
void filePercentageChanged(bt::TorrentFileInterface* file,float percentage);
void filePreviewChanged(bt::TorrentFileInterface* file,bool preview);
void filePercentageChanged(bt::TorrentFileInterface* file,float percentage) override;
void filePreviewChanged(bt::TorrentFileInterface* file,bool preview) override;
private:
QVariant displayData(const QModelIndex & index) const;
......
......@@ -39,14 +39,14 @@ namespace kt
IWFileTreeModel(bt::TorrentInterface* tc,QObject* parent);
virtual ~IWFileTreeModel();
virtual int columnCount(const QModelIndex & parent) const;
virtual QVariant headerData(int section, Qt::Orientation orientation,int role) const;
virtual QVariant data(const QModelIndex & index, int role) const;
virtual bool setData(const QModelIndex & index, const QVariant & value, int role);
virtual void update();
virtual int columnCount(const QModelIndex & parent) const override;
virtual QVariant headerData(int section, Qt::Orientation orientation,int role) const override;
virtual QVariant data(const QModelIndex & index, int role) const override;
virtual bool setData(const QModelIndex & index, const QVariant & value, int role) override;
virtual void update() override;
void filePercentageChanged(bt::TorrentFileInterface* file,float percentage);
void filePreviewChanged(bt::TorrentFileInterface* file,bool preview);
void filePercentageChanged(bt::TorrentFileInterface* file,float percentage) override;
void filePreviewChanged(bt::TorrentFileInterface* file,bool preview) override;
private:
void update(const QModelIndex & index,bt::TorrentFileInterface* file,int col);
......
......@@ -46,14 +46,14 @@ namespace kt
Monitor(bt::TorrentInterface* tc,PeerView* pv ,ChunkDownloadView* cdv,FileView* fv);
virtual ~Monitor();
virtual void downloadRemoved(bt::ChunkDownloadInterface* cd);
virtual void downloadStarted(bt::ChunkDownloadInterface* cd);
virtual void peerAdded(bt::PeerInterface* peer);
virtual void peerRemoved(bt::PeerInterface* peer);
virtual void stopped();
virtual void destroyed();
virtual void filePercentageChanged(bt::TorrentFileInterface* file,float percentage);
virtual void filePreviewChanged(bt::TorrentFileInterface* file,bool preview);
virtual void downloadRemoved(bt::ChunkDownloadInterface* cd) override;
virtual void downloadStarted(bt::ChunkDownloadInterface* cd) override;
virtual void peerAdded(bt::PeerInterface* peer) override;
virtual void peerRemoved(bt::PeerInterface* peer) override;
virtual void stopped() override;
virtual void destroyed() override;
virtual void filePercentageChanged(bt::TorrentFileInterface* file,float percentage) override;
virtual void filePreviewChanged(bt::TorrentFileInterface* file,bool preview) override;
};
}
......
......@@ -54,18 +54,18 @@ namespace kt
void clear();
virtual int rowCount(const QModelIndex & parent) const;
virtual int columnCount(const QModelIndex & parent) const;
virtual QVariant headerData(int section, Qt::Orientation orientation,int role) const;
virtual QVariant data(const QModelIndex & index,int role) const;
virtual bool removeRows(int row,int count,const QModelIndex & parent);
virtual bool insertRows(int row,int count,const QModelIndex & parent);
virtual QModelIndex index(int row,int column,const QModelIndex & parent = QModelIndex()) const;
virtual int rowCount(const QModelIndex & parent) const override;
virtual int columnCount(const QModelIndex & parent) const override;
virtual QVariant headerData(int section, Qt::Orientation orientation,int role) const override;
virtual QVariant data(const QModelIndex & index,int role) const override;
virtual bool removeRows(int row,int count,const QModelIndex & parent) override;
virtual bool insertRows(int row,int count,const QModelIndex & parent) override;
virtual QModelIndex index(int row,int column,const QModelIndex & parent = QModelIndex()) const override;
bt::PeerInterface* indexToPeer(const QModelIndex & idx);
public slots:
void sort(int col, Qt::SortOrder order);
void sort(int col, Qt::SortOrder order) override;
public:
......
......@@ -37,20 +37,20 @@ namespace kt
TorrentFileListModel(bt::TorrentInterface* tc,DeselectMode mode,QObject* parent);
virtual ~TorrentFileListModel();
virtual int rowCount(const QModelIndex & parent) const;
virtual int columnCount(const QModelIndex & parent) const;
virtual QVariant headerData(int section, Qt::Orientation orientation,int role) const;
virtual QVariant data(const QModelIndex & index, int role) const;
virtual QModelIndex parent(const QModelIndex & index) const;
virtual QModelIndex index(int row,int column,const QModelIndex & parent) const;
virtual bool setData(const QModelIndex & index, const QVariant & value, int role);