mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-01-25 22:14:32 +00:00
- Fixed error in last commit
This commit is contained in:
parent
a46c63d883
commit
ac9a81985f
@ -182,7 +182,7 @@ void DownloadingTorrents::deleteTorrent(QString hash) {
|
||||
}
|
||||
|
||||
// Update Info Bar information
|
||||
void DownloadingTorrents::setInfoBar(QString info, QString color) {
|
||||
void DownloadingTorrents::setInfoBar(QString info, QColor color) {
|
||||
static unsigned int nbLines = 0;
|
||||
++nbLines;
|
||||
// Check log size, clear it if too big
|
||||
@ -190,7 +190,7 @@ void DownloadingTorrents::setInfoBar(QString info, QString color) {
|
||||
infoBar->clear();
|
||||
nbLines = 1;
|
||||
}
|
||||
infoBar->append(QString::fromUtf8("<font color='grey'>")+ QTime::currentTime().toString(QString::fromUtf8("hh:mm:ss")) + QString::fromUtf8("</font> - <font color='") + color +QString::fromUtf8("'><i>") + info + QString::fromUtf8("</i></font>"));
|
||||
infoBar->append(QString::fromUtf8("<font color='grey'>")+ QTime::currentTime().toString(QString::fromUtf8("hh:mm:ss")) + QString::fromUtf8("</font> - <font color='") + color.rgb() +QString::fromUtf8("'><i>") + info + QString::fromUtf8("</i></font>"));
|
||||
}
|
||||
|
||||
void DownloadingTorrents::addFastResumeRejectedAlert(QString name) {
|
||||
@ -663,10 +663,10 @@ void DownloadingTorrents::portListeningFailure() {
|
||||
}
|
||||
|
||||
// Set the color of a row in data model
|
||||
void DownloadingTorrents::setRowColor(int row, QString color) {
|
||||
void DownloadingTorrents::setRowColor(int row, QColor color) {
|
||||
unsigned int nbColumns = DLListModel->columnCount()-1;
|
||||
for(unsigned int i=0; i<nbColumns; ++i) {
|
||||
DLListModel->setData(DLListModel->index(row, i), QVariant(QColor(color)), Qt::ForegroundRole);
|
||||
DLListModel->setData(DLListModel->index(row, i), QVariant(color), Qt::ForegroundRole);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -76,13 +76,13 @@ class DownloadingTorrents : public QWidget, public Ui::downloading{
|
||||
void torrentDuplicate(QString path);
|
||||
void torrentCorrupted(QString path);
|
||||
void portListeningFailure();
|
||||
void setRowColor(int row, QString color);
|
||||
void setRowColor(int row, QColor color);
|
||||
void displayDownloadingUrlInfos(QString url);
|
||||
void showProperties(const QModelIndex &index);
|
||||
|
||||
public slots:
|
||||
void updateDlList();
|
||||
void setInfoBar(QString info, QString color="black");
|
||||
void setInfoBar(QString info, QColor color=QPalette::WindowText);
|
||||
void pauseTorrent(QString hash);
|
||||
void resumeTorrent(QString hash);
|
||||
void updateRatio();
|
||||
|
Loading…
x
Reference in New Issue
Block a user