Update misc classes

This commit is contained in:
Nick Tiskov 2013-11-10 23:24:09 +04:00
commit a8e57d3a7e
4 changed files with 5 additions and 5 deletions

View file

@ -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)) {

View file

@ -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"))

View file

@ -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{

View file

@ -36,7 +36,7 @@
class IconProvider class IconProvider
{ {
Q_DISABLE_COPY(IconProvider); Q_DISABLE_COPY(IconProvider)
private: private:
explicit IconProvider(); explicit IconProvider();