| 1 | // For license of this file, see <project-root-folder>/LICENSE.md.cxx . . $ `<file>/src/librssguard/services/abstract/gui/httpheadersdetails.cpp`/ |
| 2 | |
| 3 | #include "services/abstract/gui/httpheadersdetails.h"cxx . . $ `<file>/src/librssguard/services/abstract/gui/httpheadersdetails.h`/ |
| 4 | |
| 5 | #include "definitions/definitions.h"cxx . . $ `<file>/src/librssguard/definitions/definitions.h`/ |
| 6 | |
| 7 | #include "ui_httpheadersdetails.h"cxx . . $ `<file>/build/src/librssguard/ui_httpheadersdetails.h`/ |
| 8 | |
| 9 | #include <QRegularExpression> |
| 10 | |
| 11 | HttpHeadersDetailscxx . . $ HttpHeadersDetails#::HttpHeadersDetailscxx . . $ HttpHeadersDetails#HttpHeadersDetails(108f35f7aa7f3cf9).(QWidgetcxx . . $ QWidget#* parent) : QWidgetcxx . . $ QWidget#QWidget(872e7b0c281abd8d).(parent), m_uicxx . . $ HttpHeadersDetails#m_ui.(new Uicxx . . $ Ui/::HttpHeadersDetailscxx . . $ Ui/HttpHeadersDetails#()) { |
| 12 | m_uicxx . . $ HttpHeadersDetails#m_ui.->cxx . . $ QScopedPointer#`operator->`(34d6acfd341ba7ab).setupUicxx . . $ Ui_HttpHeadersDetails#setupUi(108f35f7aa7f3cf9).(this); |
| 13 | m_uicxx . . $ HttpHeadersDetails#m_ui.->cxx . . $ QScopedPointer#`operator->`(34d6acfd341ba7ab).m_helpHttpHeaderscxx . . $ Ui_HttpHeadersDetails#m_helpHttpHeaders. |
| 14 | ->setHelpTextcxx . . $ HelpSpoiler#setHelpText(5f6801bd00533ebd).(trcxx . . $ HttpHeadersDetails#tr(75d9f1c324b4579d).("Enter each key/value HTTP header pair on separate line. Note that all spaces are significant " |
| 15 | "and that header names are case-sensitive. " |
| 16 | "Also, make sure to separate key from value with '=', like the example below:") +cxx . . $ operator+(adfbdceb504720ce). |
| 17 | QSLcxx . . $ `src/librssguard/definitions/definitions.h:442:9`!("<br/><br/><b>HeaderKey=HeaderValue</b>"), |
| 18 | false); |
| 19 | } |
| 20 | |
| 21 | void HttpHeadersDetailscxx . . $ HttpHeadersDetails#::loadHttpHeaderscxx . . $ HttpHeadersDetails#loadHttpHeaders(3e473b083d16b808).(const QVariantHashcxx . . $ QVariantHash#& headers) { |
| 22 | m_uicxx . . $ HttpHeadersDetails#m_ui.->cxx . . $ QScopedPointer#`operator->`(34d6acfd341ba7ab).m_txtHttpHeaderscxx . . $ Ui_HttpHeadersDetails#m_txtHttpHeaders.->clearcxx . . $ QPlainTextEdit#clear(49f6e7a06ebc5aa8).(); |
| 23 | |
| 24 | for (auto i = headers.cbegincxx . . $ QHash#cbegin(7342c39cf902a1f).(), end = headers.cendcxx . . $ QHash#cend(7342c39cf902a1f).(); i !=cxx . . $ QHash#const_iterator#`operator!=`(6a7528529925af9f). end; i++cxx . . $ QHash#const_iterator#operator++(6188a2871e5d6ea1).) { |
| 25 | m_uicxx . . $ HttpHeadersDetails#m_ui.->cxx . . $ QScopedPointer#`operator->`(34d6acfd341ba7ab).m_txtHttpHeaderscxx . . $ Ui_HttpHeadersDetails#m_txtHttpHeaders.->appendPlainTextcxx . . $ QPlainTextEdit#appendPlainText(3520e46b33348bf6).(QSLcxx . . $ `src/librssguard/definitions/definitions.h:442:9`!("%1=%2").argcxx . . $ QString#arg(89b093bd48b6d6c0).(i.keycxx . . $ QHash#const_iterator#key(2042464fc1fea03e).(), i.valuecxx . . $ QHash#const_iterator#value(af923830f06cb5ca).().toStringcxx . . $ QVariant#toString(6ef7b6c27b00b43d).())); |
| 26 | } |
| 27 | } |
| 28 | |
| 29 | QVariantHashcxx . . $ QVariantHash# HttpHeadersDetailscxx . . $ HttpHeadersDetails#::httpHeaderscxx . . $ HttpHeadersDetails#httpHeaders(556033a494fe4eb9).() const { |
| 30 | QVariantHashcxx . . $ QVariantHash# hcxx . . $ QHash#QHash(ced63f7c635d850d).; |
| 31 | |
| 32 | QRegularExpressioncxx . . $ QRegularExpression# expcxx . . $ QRegularExpression#QRegularExpression(4279d2539df7cd4a).(QSLcxx . . $ `src/librssguard/definitions/definitions.h:442:9`!("^([^=]+)=(.+)$"), QRegularExpressioncxx . . $ QFlags#QFlags(93d577a3e9528307).::PatternOptioncxx . . $ QRegularExpression#PatternOption#::MultilineOptioncxx . . $ QRegularExpression#MultilineOption.); |
| 33 | auto exp_match = exp.globalMatchcxx . . $ QRegularExpression#globalMatch(27b5aa3d61ae1b2f).(m_uicxx . . $ HttpHeadersDetails#m_ui.->cxx . . $ QScopedPointer#`operator->`(34d6acfd341ba7ab).m_txtHttpHeaderscxx . . $ Ui_HttpHeadersDetails#m_txtHttpHeaders.->toPlainTextcxx . . $ QPlainTextEdit#toPlainText(6ef7b6c27b00b43d).()); |
| 34 | |
| 35 | while (exp_match.hasNextcxx . . $ QRegularExpressionMatchIterator#hasNext(50ce9a9e25b4a850).()) { |
| 36 | auto match = exp_match.nextcxx . . $ QRegularExpressionMatchIterator#next(5870644aafa115db).(); |
| 37 | |
| 38 | h.insertcxx . . $ QHash#insert(d77b19c31d2eb147).(match.capturedcxx . . $ QRegularExpressionMatch#captured(3f3c3d0e9c0eb37f).(1), matchcxx . . $ QVariant#QVariant(132dd6869045752b)..capturedcxx . . $ QRegularExpressionMatch#captured(3f3c3d0e9c0eb37f).(2)); |
| 39 | } |
| 40 | |
| 41 | return hcxx . . $ QHash#QHash(4af0980b0c631cac).; |
| 42 | } |
| 43 | |
| 44 | HttpHeadersDetailscxx . . $ HttpHeadersDetails#::~cxx . . $ HttpHeadersDetails#`~HttpHeadersDetails`(ced63f7c635d850d).HttpHeadersDetailscxx . . $ HttpHeadersDetails#() = default; |