mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-08-20 13:23:34 -07:00
Update misc classes
This commit is contained in:
parent
6346716df6
commit
a8e57d3a7e
4 changed files with 5 additions and 5 deletions
|
@ -60,8 +60,8 @@ private:
|
||||||
private:
|
private:
|
||||||
static bool isNetworkFileSystem(QString path) {
|
static bool isNetworkFileSystem(QString path) {
|
||||||
QString file = path;
|
QString file = path;
|
||||||
if (!file.endsWith(QDir::separator()))
|
if (!file.endsWith("/"))
|
||||||
file += QDir::separator();
|
file += "/";
|
||||||
file += ".";
|
file += ".";
|
||||||
struct statfs buf;
|
struct statfs buf;
|
||||||
if (!statfs(file.toLocal8Bit().constData(), &buf)) {
|
if (!statfs(file.toLocal8Bit().constData(), &buf)) {
|
||||||
|
|
|
@ -72,7 +72,7 @@ QString GeoIPManager::geoipFolder(bool embedded) {
|
||||||
#ifdef WITH_GEOIP_EMBEDDED
|
#ifdef WITH_GEOIP_EMBEDDED
|
||||||
if (embedded)
|
if (embedded)
|
||||||
return ":/geoip/";
|
return ":/geoip/";
|
||||||
return fsutils::QDesktopServicesDataLocation()+"geoip"+QDir::separator();
|
return fsutils::QDesktopServicesDataLocation()+"geoip"+"/";
|
||||||
#else
|
#else
|
||||||
Q_UNUSED(embedded);
|
Q_UNUSED(embedded);
|
||||||
if (QFile::exists("/usr/local/share/GeoIP/GeoIP.dat"))
|
if (QFile::exists("/usr/local/share/GeoIP/GeoIP.dat"))
|
||||||
|
|
|
@ -88,7 +88,7 @@ public slots:
|
||||||
// the parameter type.
|
// the parameter type.
|
||||||
void processParams(const QStringList& params) {
|
void processParams(const QStringList& params) {
|
||||||
foreach (QString param, params) {
|
foreach (QString param, params) {
|
||||||
param = param.trimmed();
|
param = fsutils::fromNativePath(param).trimmed();
|
||||||
if (param.startsWith(QString::fromUtf8("http://"), Qt::CaseInsensitive) || param.startsWith(QString::fromUtf8("ftp://"), Qt::CaseInsensitive) || param.startsWith(QString::fromUtf8("https://"), Qt::CaseInsensitive)) {
|
if (param.startsWith(QString::fromUtf8("http://"), Qt::CaseInsensitive) || param.startsWith(QString::fromUtf8("ftp://"), Qt::CaseInsensitive) || param.startsWith(QString::fromUtf8("https://"), Qt::CaseInsensitive)) {
|
||||||
QBtSession::instance()->downloadFromUrl(param);
|
QBtSession::instance()->downloadFromUrl(param);
|
||||||
}else{
|
}else{
|
||||||
|
|
|
@ -36,7 +36,7 @@
|
||||||
|
|
||||||
class IconProvider
|
class IconProvider
|
||||||
{
|
{
|
||||||
Q_DISABLE_COPY(IconProvider);
|
Q_DISABLE_COPY(IconProvider)
|
||||||
|
|
||||||
private:
|
private:
|
||||||
explicit IconProvider();
|
explicit IconProvider();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue