jenkins
Last change
on this file was
068539c,
checked in by Vadim Troshchinskiy Shmelev <vtroshchinskiy@…>, 2 months ago
|
Add ability to ignore SSL errors
|
-
Property mode set to
100644
|
File size:
1.0 KB
|
Line | |
---|
1 | |
---|
2 | |
---|
3 | #pragma once |
---|
4 | |
---|
5 | #include <QCommandLineParser> |
---|
6 | |
---|
7 | class OGCommandLineOptions { |
---|
8 | public: |
---|
9 | |
---|
10 | enum NewTabBehavior { |
---|
11 | /** |
---|
12 | * Ignore attempt to open new tab |
---|
13 | */ |
---|
14 | Ignore, |
---|
15 | |
---|
16 | /** |
---|
17 | * Replace current page, ignore "new tab" directive. |
---|
18 | */ |
---|
19 | ReplacePage, |
---|
20 | |
---|
21 | /** |
---|
22 | * Open a new tab. |
---|
23 | */ |
---|
24 | NewTab |
---|
25 | }; |
---|
26 | |
---|
27 | static OGCommandLineOptions &getInstance() { |
---|
28 | static OGCommandLineOptions instance; |
---|
29 | return instance; |
---|
30 | } |
---|
31 | |
---|
32 | QString getUrl() const { return _url; } |
---|
33 | void setUrl(const QString& url) { _url = url; } |
---|
34 | |
---|
35 | NewTabBehavior getNewTabBehavior() const { return _newTabBehavior; } |
---|
36 | void setNewTabBehavior(NewTabBehavior nt) { _newTabBehavior = nt; } |
---|
37 | |
---|
38 | bool getIgnoreSslErrors() const { return _ignoreSslErrors; } |
---|
39 | void setIgnoreSslErrors(bool value) { _ignoreSslErrors = value; } |
---|
40 | |
---|
41 | |
---|
42 | private: |
---|
43 | OGCommandLineOptions() { |
---|
44 | |
---|
45 | } |
---|
46 | |
---|
47 | QString _url; |
---|
48 | NewTabBehavior _newTabBehavior{ReplacePage}; |
---|
49 | |
---|
50 | bool _ignoreSslErrors = false; |
---|
51 | }; |
---|
Note: See
TracBrowser
for help on using the repository browser.