| 890 | } |
| 891 | |
| 892 | void MainWindow::proxyConfigurationChanged() |
| 893 | { |
| 894 | if (options->proxyMode() == Options::SystemProxy) { |
| 895 | qDebug() << "Use system proxy configuration"; |
| 896 | QNetworkProxyFactory::setUseSystemConfiguration(true); |
| 897 | } else if (options->proxyMode() == Options::ManualProxy) { |
| 898 | qDebug() << "Use proxy" << options->proxyHost(); |
| 899 | QNetworkProxyFactory::setUseSystemConfiguration(false); |
| 900 | |
| 901 | QNetworkProxy proxy; |
| 902 | proxy.setType(QNetworkProxy::HttpProxy); |
| 903 | proxy.setHostName(options->proxyHost()); |
| 904 | proxy.setPort(options->proxyPort()); |
| 905 | proxy.setUser(options->proxyUser()); |
| 906 | proxy.setPassword(options->proxyPassword()); |
| 907 | QNetworkProxy::setApplicationProxy(proxy); |
| 908 | } else { |
| 909 | qDebug() << "Don't use a proxy"; |
| 910 | QNetworkProxyFactory::setUseSystemConfiguration(false); |
| 911 | |
| 912 | QNetworkProxy proxy; |
| 913 | proxy.setType(QNetworkProxy::NoProxy); |
| 914 | QNetworkProxy::setApplicationProxy(proxy); |
| 915 | } |
| 916 | } |
| 917 | |
| 918 | void MainWindow::markdownConverterChanged() |
| 919 | { |
nothing calls this directly
no test coverage detected