Avoid type specifier mismatch

Qt5 uses `int` and Qt6 uses `qsizetype`, so use the stream version of
`qDebug()` to avoid specifying types.
This commit is contained in:
Chocobo1 2021-10-13 00:40:59 +08:00
parent ca28fc27dc
commit e45e29b431
No known key found for this signature in database
GPG key ID: 210D9C873253A68C
3 changed files with 4 additions and 3 deletions

View file

@ -35,6 +35,7 @@
#include <libtorrent/write_resume_data.hpp>
#include <QByteArray>
#include <QDebug>
#include <QRegularExpression>
#include <QThread>
@ -113,7 +114,7 @@ BitTorrent::BencodeResumeDataStorage::BencodeResumeDataStorage(const QString &pa
loadQueue(m_resumeDataDir.absoluteFilePath(QLatin1String("queue")));
qDebug("Registered torrents count: %d", m_registeredTorrents.size());
qDebug() << "Registered torrents count: " << m_registeredTorrents.size();
m_asyncWorker->moveToThread(m_ioThread);
connect(m_ioThread, &QThread::finished, m_asyncWorker, &QObject::deleteLater);

View file

@ -2523,7 +2523,7 @@ QStringList Session::getListeningIPs() const
}
const QList<QNetworkAddressEntry> addresses = networkIFace.addressEntries();
qDebug("This network interface has %d IP addresses", addresses.size());
qDebug() << "This network interface has " << addresses.size() << " IP addresses";
for (const QNetworkAddressEntry &entry : addresses)
checkAndAddIP(entry.ip(), configuredAddr);

View file

@ -412,7 +412,7 @@ void PropertiesWidget::saveSettings()
sizes = hSplitter->sizes();
else
sizes = m_slideSizes;
qDebug("Sizes: %d", sizes.size());
if (sizes.size() == 2)
pref->setPropSplitterSizes(QString::number(sizes.first()) + ',' + QString::number(sizes.last()));
pref->setPropFileListState(m_ui->filesList->header()->saveState());