mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-01-27 06:54:20 +00:00
commit
cd3635985e
@ -141,7 +141,9 @@ Application::Application(int &argc, char **argv)
|
||||
setOrganizationDomain("qbittorrent.org");
|
||||
#if !defined(DISABLE_GUI)
|
||||
setDesktopFileName("org.qbittorrent.qBittorrent");
|
||||
#if (QT_VERSION < QT_VERSION_CHECK(6, 0, 0))
|
||||
setAttribute(Qt::AA_UseHighDpiPixmaps, true); // opt-in to the high DPI pixmap support
|
||||
#endif
|
||||
setQuitOnLastWindowClosed(false);
|
||||
QPixmapCache::setCacheLimit(PIXMAP_CACHE_SIZE);
|
||||
#endif
|
||||
|
@ -134,7 +134,7 @@ int main(int argc, char *argv[])
|
||||
// We must save it here because QApplication constructor may change it
|
||||
bool isOneArg = (argc == 2);
|
||||
|
||||
#if !defined(DISABLE_GUI)
|
||||
#if (QT_VERSION < QT_VERSION_CHECK(6, 0, 0)) && !defined(DISABLE_GUI)
|
||||
// Attribute Qt::AA_EnableHighDpiScaling must be set before QCoreApplication is created
|
||||
if (qgetenv("QT_ENABLE_HIGHDPI_SCALING").isEmpty() && qgetenv("QT_AUTO_SCREEN_SCALE_FACTOR").isEmpty())
|
||||
Application::setAttribute(Qt::AA_EnableHighDpiScaling, true);
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
||||
|
@ -326,9 +326,6 @@
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QLabel" name="labelInfohash1Data">
|
||||
<property name="textFormat">
|
||||
<enum>Qt::PlainText</enum>
|
||||
</property>
|
||||
<property name="textInteractionFlags">
|
||||
<set>Qt::TextSelectableByMouse</set>
|
||||
</property>
|
||||
@ -350,8 +347,8 @@
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<widget class="QLabel" name="labelInfohash2Data">
|
||||
<property name="text">
|
||||
<string/>
|
||||
<property name="textInteractionFlags">
|
||||
<set>Qt::TextSelectableByMouse</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
@ -186,7 +186,7 @@ void PiecesBar::paintEvent(QPaintEvent *)
|
||||
if (!m_highlightedRegion.isNull())
|
||||
{
|
||||
QColor highlightColor {this->palette().color(QPalette::Active, QPalette::Highlight)};
|
||||
highlightColor.setAlphaF(0.35);
|
||||
highlightColor.setAlphaF(0.35f);
|
||||
QRect targetHighlightRect {m_highlightedRegion.adjusted(borderWidth, borderWidth, borderWidth, height() - 2 * borderWidth)};
|
||||
painter.fillRect(targetHighlightRect, highlightColor);
|
||||
}
|
||||
|
@ -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());
|
||||
@ -752,21 +752,31 @@ void PropertiesWidget::configure()
|
||||
// Speed widget
|
||||
if (Preferences::instance()->isSpeedWidgetEnabled())
|
||||
{
|
||||
if (!m_speedWidget || !qobject_cast<SpeedWidget *>(m_speedWidget))
|
||||
if (!qobject_cast<SpeedWidget *>(m_speedWidget))
|
||||
{
|
||||
m_ui->speedLayout->removeWidget(m_speedWidget);
|
||||
delete m_speedWidget;
|
||||
m_speedWidget = new SpeedWidget {this};
|
||||
if (m_speedWidget)
|
||||
{
|
||||
m_ui->speedLayout->removeWidget(m_speedWidget);
|
||||
delete m_speedWidget;
|
||||
}
|
||||
|
||||
m_speedWidget = new SpeedWidget(this);
|
||||
m_ui->speedLayout->addWidget(m_speedWidget);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!m_speedWidget || !qobject_cast<QLabel *>(m_speedWidget))
|
||||
if (!qobject_cast<QLabel *>(m_speedWidget))
|
||||
{
|
||||
m_ui->speedLayout->removeWidget(m_speedWidget);
|
||||
delete m_speedWidget;
|
||||
auto *label = new QLabel(tr("<center><b>Speed graphs are disabled</b><p>You may change this setting in Advanced Options </center>"), this);
|
||||
if (m_speedWidget)
|
||||
{
|
||||
m_ui->speedLayout->removeWidget(m_speedWidget);
|
||||
delete m_speedWidget;
|
||||
}
|
||||
|
||||
const auto displayText = QString::fromLatin1("<center><b>%1</b><p>%2</p></center>")
|
||||
.arg(tr("Speed graphs are disabled"), tr("You can enable it in Advanced Options"));
|
||||
auto *label = new QLabel(displayText, this);
|
||||
label->setAlignment(Qt::AlignHCenter | Qt::AlignVCenter);
|
||||
m_speedWidget = label;
|
||||
m_ui->speedLayout->addWidget(m_speedWidget);
|
||||
|
@ -23,7 +23,7 @@ nogui {
|
||||
DEFINES += QBT_STATIC_QT
|
||||
QTPLUGIN += qico
|
||||
}
|
||||
win32: lessThan(QT_VERSION_MAJOR, 6) {
|
||||
win32: lessThan(QT_MAJOR_VERSION, 6) {
|
||||
QT += winextras
|
||||
}
|
||||
macx {
|
||||
|
Loading…
x
Reference in New Issue
Block a user