Merge pull request #15170 from Chocobo1/tooltip

Add tooltip for various columns
This commit is contained in:
Chocobo1 2021-07-08 13:01:59 +08:00 committed by GitHub
commit ee696e6f36
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 6 deletions

View File

@ -68,14 +68,14 @@ namespace MacUtils
if (class_getInstanceMethod(delClass, shouldHandle))
{
if (class_replaceMethod(delClass, shouldHandle, (IMP)dockClickHandler, "B@:"))
if (class_replaceMethod(delClass, shouldHandle, reinterpret_cast<IMP>(dockClickHandler), "B@:"))
qDebug("Registered dock click handler (replaced original method)");
else
qWarning("Failed to replace method for dock click handler");
}
else
{
if (class_addMethod(delClass, shouldHandle, (IMP)dockClickHandler, "B@:"))
if (class_addMethod(delClass, shouldHandle, reinterpret_cast<IMP>(dockClickHandler), "B@:"))
qDebug("Registered dock click handler");
else
qWarning("Failed to register dock click handler");

View File

@ -373,6 +373,7 @@ void TrackerListWidget::loadTrackers()
{
item = new QTreeWidgetItem();
item->setText(COL_URL, trackerURL);
item->setToolTip(COL_URL, trackerURL);
addTopLevelItem(item);
m_trackerItems[trackerURL] = item;
}
@ -400,6 +401,7 @@ void TrackerListWidget::loadTrackers()
}
item->setText(COL_MSG, entry.message);
item->setToolTip(COL_MSG, entry.message);
item->setText(COL_PEERS, ((entry.numPeers > -1)
? QString::number(entry.numPeers)
: tr("N/A")));

View File

@ -621,16 +621,16 @@ window.qBittorrent.DynamicTable = (function() {
let row;
if (!this.rows.has(rowId)) {
row = {};
row = {
'full_data': {},
'rowId': rowId
};
this.rows.set(rowId, row);
row['full_data'] = {};
row['rowId'] = rowId;
}
else
row = this.rows.get(rowId);
row['data'] = data;
for (const x in data)
row['full_data'][x] = data[x];
},