diff options
author | Christian Kamm <kamm@incasoftware.de> | 2015-07-16 15:21:51 +0300 |
---|---|---|
committer | Christian Kamm <kamm@incasoftware.de> | 2015-07-17 12:54:46 +0300 |
commit | 2124098f8419eb1d38711f8330deb98addd7af5b (patch) | |
tree | 9f3a3c8f9743501976d1d2cf0b6990e282e81d49 /src/gui/proxyauthdialog.h | |
parent | 944564258c4c4ed97ffddbe000c2b8dcad077e4d (diff) |
System proxy: Ask for credentials if needed.
The proxyAuthenticationRequired() signal now goes to the
ProxyAuthHandler class. That class will try to read the proxy settings
from the keychain or ask the user about them.
We won't ask the user for credentials for explicitly configured proxies.
It also does not change how the credentials for explicitly configured
proxies are stored. (see #261)
Diffstat (limited to 'src/gui/proxyauthdialog.h')
-rw-r--r-- | src/gui/proxyauthdialog.h | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/src/gui/proxyauthdialog.h b/src/gui/proxyauthdialog.h new file mode 100644 index 000000000..0b24abb41 --- /dev/null +++ b/src/gui/proxyauthdialog.h @@ -0,0 +1,52 @@ +/* + * Copyright (C) 2015 by Christian Kamm <kamm@incasoftware.de> + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; version 2 of the License. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY + * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + */ + +#ifndef OCC_PROXYAUTHDIALOG_H +#define OCC_PROXYAUTHDIALOG_H + +#include <QDialog> + +namespace OCC { + +namespace Ui { +class ProxyAuthDialog; +} + +/** + * @brief Ask for username and password for a given proxy. + * + * Used by ProxyAuthHandler. + */ +class ProxyAuthDialog : public QDialog +{ + Q_OBJECT + +public: + explicit ProxyAuthDialog(QWidget *parent = 0); + ~ProxyAuthDialog(); + + void setProxyAddress(const QString& address); + + QString username() const; + QString password() const; + + /// Resets the username and password. + void reset(); + +private: + Ui::ProxyAuthDialog *ui; +}; + + +} // namespace OCC +#endif // OCC_PROXYAUTHDIALOG_H |