1
mirror of https://invent.kde.org/network/falkon.git synced 2024-11-14 02:52:12 +01:00

Fixed building with Qt 4.7

This commit is contained in:
nowrep 2013-04-22 17:40:15 +02:00
parent 482cb18ce4
commit 812437ddcb

View File

@ -61,7 +61,7 @@ void PacManager::downloadPacFile()
return; return;
} }
if (m_url.isLocalFile()) { if (m_url.scheme() == QLatin1String("file")) {
if (!QFile(m_url.path()).exists()) { if (!QFile(m_url.path()).exists()) {
qWarning() << "PacManager: PAC file " << m_url.path() << "doesn't exists!"; qWarning() << "PacManager: PAC file " << m_url.path() << "doesn't exists!";
} }
@ -117,7 +117,7 @@ void PacManager::reloadScript()
m_pacrunner = new ProxyAutoConfig(this); m_pacrunner = new ProxyAutoConfig(this);
} }
QFile file(m_url.isLocalFile() ? m_url.path() : mApp->currentProfilePath() + "proxy.pac"); QFile file(m_url.scheme() == QLatin1String("file") ? m_url.path() : mApp->currentProfilePath() + "proxy.pac");
if (!file.open(QFile::ReadOnly)) { if (!file.open(QFile::ReadOnly)) {
qWarning() << "PacManager: Cannot open PAC file for reading" << file.fileName(); qWarning() << "PacManager: Cannot open PAC file for reading" << file.fileName();