简体   繁体   English

OSX:QNetworkProxyFactory :: systemProxyForQuery无法在MAC上找到代理,但在Windows7中工作正常

[英]OSX : QNetworkProxyFactory::systemProxyForQuery is not able to find proxy on MAC but works fine in windows7

From QT i am trying to find out the proxy details. 从QT,我试图找出代理详细信息。 The below code works fine in windows7 but not working in MAC OSX 10.7,10.6. 下面的代码在Windows7中工作正常,但在MAC OSX 10.7,10.6中不工作。 The retuned proxy type is coming as "NoProxy". 重新调整的代理服务器类型为“ NoProxy”。 I could see that the traffic from browsers safari/Chrome are going through proxy but not sure why QT is not able to find out. 我可以看到来自浏览器safari / Chrome的流量正在通过代理,但是不确定为什么QT无法找到。 Please find attached proxy configuration image. 请找到随附的代理配置映像。

⁃   QNetworkProxyFactory::setUseSystemConfiguration(true);
⁃   
⁃       QNetworkProxyQuery npq(QUrl("https://www.google.com/"));
⁃           foreach (QNetworkProxy proxy, QNetworkProxyFactory::systemProxyForQuery(npq)) {
⁃               Log("Main", L">> proxy %ls, port %d type %d", proxy.hostName().toStdWString().c_str(),proxy.port(),proxy.type());

在此处输入图片说明

我通过使用System Proxies标志进行编译将QT从4.8.2升级到4.8.5,然后它开始工作。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 OSX:当代理详细信息从“系统偏好设置”更改时,QNetworkProxyFactory :: systemProxyForQuery()不返回最新值 - OSX : QNetworkProxyFactory::systemProxyForQuery() is not returning latest values upon Proxy details change from System Preferences 一个.exe应用程序在windows10中创建新模块时抛出错误,但在windows7中可以正常工作? - An .exe application throws an error while creating a new module in windows10 but works fine in windows7? Windows7 API,在哪里可以找到它 - Windows7 API, where to find it 自定义PreviewPane-在Windows7中工作,在Vista中不工作 - Custom PreviewPane - Works in Windows7, not in Vista 在Mac上无法使用通配符(*)编译多个C ++文件,在Windows上运行正常 - Cannot compile multiple C++ files using wildcard (*) on Mac, works fine on Windows Linux中的Segfault,在Mac OS上运行良好 - Segfault in Linux, works fine on Mac OS 为什么这不能在 Linux 上工作,但在 OSX 上工作正常? - Why doesn't this work on Linux but works fine on OSX? IoVolumeDeviceToDosName支持Windows 7,但在Windows XP上可以正常使用 - IoVolumeDeviceToDosName craches Windows 7 but works fine on Windows XP 与Windows OS等效的Mac OSX API - Mac OSX API Equivalent To Windows OS 是否有 windows GetFontData function 的 Mac OSX 版本? - Is there a Mac OSX version of windows GetFontData function?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM