mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-01-11 15:27:54 +00:00
Update misc classes
This commit is contained in:
parent
6346716df6
commit
a8e57d3a7e
@ -60,8 +60,8 @@ private:
|
||||
private:
|
||||
static bool isNetworkFileSystem(QString path) {
|
||||
QString file = path;
|
||||
if (!file.endsWith(QDir::separator()))
|
||||
file += QDir::separator();
|
||||
if (!file.endsWith("/"))
|
||||
file += "/";
|
||||
file += ".";
|
||||
struct statfs buf;
|
||||
if (!statfs(file.toLocal8Bit().constData(), &buf)) {
|
||||
|
@ -72,7 +72,7 @@ QString GeoIPManager::geoipFolder(bool embedded) {
|
||||
#ifdef WITH_GEOIP_EMBEDDED
|
||||
if (embedded)
|
||||
return ":/geoip/";
|
||||
return fsutils::QDesktopServicesDataLocation()+"geoip"+QDir::separator();
|
||||
return fsutils::QDesktopServicesDataLocation()+"geoip"+"/";
|
||||
#else
|
||||
Q_UNUSED(embedded);
|
||||
if (QFile::exists("/usr/local/share/GeoIP/GeoIP.dat"))
|
||||
|
@ -88,7 +88,7 @@ public slots:
|
||||
// the parameter type.
|
||||
void processParams(const QStringList& 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)) {
|
||||
QBtSession::instance()->downloadFromUrl(param);
|
||||
}else{
|
||||
|
@ -36,7 +36,7 @@
|
||||
|
||||
class IconProvider
|
||||
{
|
||||
Q_DISABLE_COPY(IconProvider);
|
||||
Q_DISABLE_COPY(IconProvider)
|
||||
|
||||
private:
|
||||
explicit IconProvider();
|
||||
|
Loading…
Reference in New Issue
Block a user