| 1 | /* |
| 2 | Copyright 2007-2008 by Robert Knight <[email protected]> |
| 3 | |
| 4 | This program is free software; you can redistribute it and/or modify |
| 5 | it under the terms of the GNU General Public License as published by |
| 6 | the Free Software Foundation; either version 2 of the License, or |
| 7 | (at your option) any later version. |
| 8 | |
| 9 | This program is distributed in the hope that it will be useful, |
| 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 12 | GNU General Public License for more details. |
| 13 | |
| 14 | You should have received a copy of the GNU General Public License |
| 15 | along with this program; if not, write to the Free Software |
| 16 | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA |
| 17 | 02110-1301 USA. |
| 18 | */ |
| 19 | |
| 20 | // Own |
| 21 | #include "Filter.h"cxx . . $ `<file>/lib/Filter.h`/ |
| 22 | |
| 23 | // System |
| 24 | #include <iostream> |
| 25 | |
| 26 | // Qt |
| 27 | #include <QAction> |
| 28 | #include <QApplication> |
| 29 | #include <QtAlgorithms> |
| 30 | #include <QClipboard> |
| 31 | #include <QString> |
| 32 | #include <QTextStream> |
| 33 | #include <QSharedData> |
| 34 | #include <QFile> |
| 35 | #include <QDesktopServices> |
| 36 | #include <QUrl> |
| 37 | |
| 38 | // KDE |
| 39 | //#include <KLocale> |
| 40 | //#include <KRun> |
| 41 | |
| 42 | // Konsole |
| 43 | #include "TerminalCharacterDecoder.h"cxx . . $ `<file>/lib/TerminalCharacterDecoder.h`/ |
| 44 | #include "konsole_wcwidth.h"cxx . . $ `<file>/lib/konsole_wcwidth.h`/ |
| 45 | |
| 46 | using namespace Konsole; |
| 47 | |
| 48 | FilterChaincxx . . $ Konsole/FilterChain#::~cxx . . $ Konsole/FilterChain#`~FilterChain`(ced63f7c635d850d).FilterChaincxx . . $ Konsole/FilterChain#() |
| 49 | { |
| 50 | QMutableListIteratorcxx . . $ QMutableListIterator#<Filtercxx . . $ Konsole/Filter#*> itercxx . . $ QMutableListIterator#QMutableListIterator(5ffbb90cd7577367).(*this); |
| 51 | |
| 52 | while ( iter.hasNextcxx . . $ QMutableListIterator#hasNext(50ce9a9e25b4a850).() ) |
| 53 | { |
| 54 | Filtercxx . . $ Konsole/Filter#* filter = iter.nextcxx . . $ QMutableListIterator#next(19b2b6f17af048b).(); |
| 55 | iter.removecxx . . $ QMutableListIterator#remove(49f6e7a06ebc5aa8).(); |
| 56 | delete filter; |
| 57 | } |
| 58 | } |
| 59 | |
| 60 | void FilterChaincxx . . $ Konsole/FilterChain#::addFiltercxx . . $ Konsole/FilterChain#addFilter(12cefbd1512c714c).(Filtercxx . . $ Konsole/Filter#* filter) |
| 61 | { |
| 62 | appendcxx . . $ QList#append(77d9f17553126ecb).(filter); |
| 63 | } |
| 64 | void FilterChaincxx . . $ Konsole/FilterChain#::removeFiltercxx . . $ Konsole/FilterChain#removeFilter(12cefbd1512c714c).(Filtercxx . . $ Konsole/Filter#* filter) |
| 65 | { |
| 66 | removeAllcxx . . $ QList#removeAll(dd8e59d271e40448).(filter); |
| 67 | } |
| 68 | bool FilterChaincxx . . $ Konsole/FilterChain#::containsFiltercxx . . $ Konsole/FilterChain#containsFilter(af69c5efc6225ee1).(Filtercxx . . $ Konsole/Filter#* filter) |
| 69 | { |
| 70 | return containscxx . . $ QList#contains(8877ebe272b9620d).(filter); |
| 71 | } |
| 72 | void FilterChaincxx . . $ Konsole/FilterChain#::resetcxx . . $ Konsole/FilterChain#reset(49f6e7a06ebc5aa8).() |
| 73 | { |
| 74 | QListIteratorcxx . . $ QListIterator#<Filtercxx . . $ Konsole/Filter#*> itercxx . . $ QListIterator#QListIterator(742a15f66a895bc5).(*this); |
| 75 | while (iter.hasNextcxx . . $ QListIterator#hasNext(50ce9a9e25b4a850).()) |
| 76 | iter.nextcxx . . $ QListIterator#next(1306adbac230aeaa).()->resetcxx . . $ Konsole/Filter#reset(49f6e7a06ebc5aa8).(); |
| 77 | } |
| 78 | void FilterChaincxx . . $ Konsole/FilterChain#::setBuffercxx . . $ Konsole/FilterChain#setBuffer(ab9b33b00d7218ba).(const QStringcxx . . $ QString#* buffer , const QListcxx . . $ QList#<int>* linePositions) |
| 79 | { |
| 80 | QListIteratorcxx . . $ QListIterator#<Filtercxx . . $ Konsole/Filter#*> itercxx . . $ QListIterator#QListIterator(742a15f66a895bc5).(*this); |
| 81 | while (iter.hasNextcxx . . $ QListIterator#hasNext(50ce9a9e25b4a850).()) |
| 82 | iter.nextcxx . . $ QListIterator#next(1306adbac230aeaa).()->setBuffercxx . . $ Konsole/Filter#setBuffer(ab9b33b00d7218ba).(buffer,linePositions); |
| 83 | } |
| 84 | void FilterChaincxx . . $ Konsole/FilterChain#::processcxx . . $ Konsole/FilterChain#process(49f6e7a06ebc5aa8).() |
| 85 | { |
| 86 | QListIteratorcxx . . $ QListIterator#<Filtercxx . . $ Konsole/Filter#*> itercxx . . $ QListIterator#QListIterator(742a15f66a895bc5).(*this); |
| 87 | while (iter.hasNextcxx . . $ QListIterator#hasNext(50ce9a9e25b4a850).()) |
| 88 | iter.nextcxx . . $ QListIterator#next(1306adbac230aeaa).()->processcxx . . $ Konsole/Filter#process(49f6e7a06ebc5aa8).(); |
| 89 | } |
| 90 | void FilterChaincxx . . $ Konsole/FilterChain#::clearcxx . . $ Konsole/FilterChain#clear(49f6e7a06ebc5aa8).() |
| 91 | { |
| 92 | QListcxx . . $ QList#<Filter*>::clearcxx . . $ QList#clear(49f6e7a06ebc5aa8).(); |
| 93 | } |
| 94 | Filtercxx . . $ Filter#::HotSpotcxx . . $ Konsole/Filter#HotSpot#* FilterChaincxx . . $ Konsole/FilterChain#::hotSpotAtcxx . . $ Konsole/FilterChain#hotSpotAt(a340944fd47eb4c3).(int line , int column) const |
| 95 | { |
| 96 | QListIteratorcxx . . $ QListIterator#<Filtercxx . . $ Konsole/Filter#*> itercxx . . $ QListIterator#QListIterator(742a15f66a895bc5).(*this); |
| 97 | while (iter.hasNextcxx . . $ QListIterator#hasNext(50ce9a9e25b4a850).()) |
| 98 | { |
| 99 | Filtercxx . . $ Konsole/Filter#* filter = iter.nextcxx . . $ QListIterator#next(1306adbac230aeaa).(); |
| 100 | Filtercxx . . $ Konsole/Filter#::HotSpotcxx . . $ Konsole/Filter#HotSpot#* spot = filter->hotSpotAtcxx . . $ Konsole/Filter#hotSpotAt(a340944fd47eb4c3).(line,column); |
| 101 | if ( spot != nullptr ) |
| 102 | { |
| 103 | return spot; |
| 104 | } |
| 105 | } |
| 106 | |
| 107 | return nullptr; |
| 108 | } |
| 109 | |
| 110 | QListcxx . . $ QList#<Filtercxx . . $ Filter#::HotSpotcxx . . $ Konsole/Filter#HotSpot#*> FilterChaincxx . . $ Konsole/FilterChain#::hotSpotscxx . . $ Konsole/FilterChain#hotSpots(927ee1eeecce351e).() const |
| 111 | { |
| 112 | QListcxx . . $ QList#<Filtercxx . . $ Konsole/Filter#::HotSpotcxx . . $ Konsole/Filter#HotSpot#*> listcxx . . $ QList#QList(ced63f7c635d850d).; |
| 113 | QListIteratorcxx . . $ QListIterator#<Filtercxx . . $ Konsole/Filter#*> itercxx . . $ QListIterator#QListIterator(742a15f66a895bc5).(*this); |
| 114 | while (iter.hasNextcxx . . $ QListIterator#hasNext(50ce9a9e25b4a850).()) |
| 115 | { |
| 116 | Filtercxx . . $ Konsole/Filter#* filter = iter.nextcxx . . $ QListIterator#next(1306adbac230aeaa).(); |
| 117 | list <<cxx . . $ QList#`operator<<`(296c5e09a09ca26f). filter->hotSpotscxx . . $ Konsole/Filter#hotSpots(927ee1eeecce351e).(); |
| 118 | } |
| 119 | return listcxx . . $ QList#QList(88d75cd4b19cb2d1).; |
| 120 | } |
| 121 | //QList<Filter::HotSpot*> FilterChain::hotSpotsAtLine(int line) const; |
| 122 | |
| 123 | TerminalImageFilterChaincxx . . $ Konsole/TerminalImageFilterChain#::TerminalImageFilterChaincxx . . $ Konsole/TerminalImageFilterChain#TerminalImageFilterChain(49f6e7a06ebc5aa8).() |
| 124 | : _buffercxx . . $ Konsole/TerminalImageFilterChain#_buffer.(nullptr) |
| 125 | , _linePositionscxx . . $ Konsole/TerminalImageFilterChain#_linePositions.(nullptr) |
| 126 | { |
| 127 | } |
| 128 | |
| 129 | TerminalImageFilterChaincxx . . $ Konsole/TerminalImageFilterChain#::~cxx . . $ Konsole/TerminalImageFilterChain#`~TerminalImageFilterChain`(ced63f7c635d850d).TerminalImageFilterChaincxx . . $ Konsole/TerminalImageFilterChain#() |
| 130 | { |
| 131 | delete _buffercxx . . $ Konsole/TerminalImageFilterChain#_buffer.; |
| 132 | delete _linePositionscxx . . $ Konsole/TerminalImageFilterChain#_linePositions.; |
| 133 | } |
| 134 | |
| 135 | void TerminalImageFilterChaincxx . . $ Konsole/TerminalImageFilterChain#::setImagecxx . . $ Konsole/TerminalImageFilterChain#setImage(ebf247e562f15df0).(const Charactercxx . . $ Konsole/Character#* const image , int lines , int columns, const QVectorcxx . . $ QVector#<LinePropertycxx . . $ Konsole/LineProperty#>& lineProperties) |
| 136 | { |
| 137 | if (emptycxx . . $ QList#empty(50ce9a9e25b4a850).()) |
| 138 | return; |
| 139 | |
| 140 | // reset all filters and hotspots |
| 141 | resetcxx . . $ Konsole/FilterChain#reset(49f6e7a06ebc5aa8).(); |
| 142 | |
| 143 | PlainTextDecodercxx . . $ Konsole/PlainTextDecoder# decodercxx . . $ Konsole/PlainTextDecoder#PlainTextDecoder(49f6e7a06ebc5aa8).; |
| 144 | decoder.setTrailingWhitespacecxx . . $ Konsole/PlainTextDecoder#setTrailingWhitespace(b45ddcbc8423892c).(false); |
| 145 | |
| 146 | // setup new shared buffers for the filters to process on |
| 147 | QStringcxx . . $ QString#* newBuffer = new QStringcxx . . $ QString#QString(ced63f7c635d850d).(); |
| 148 | QListcxx . . $ QList#<int>* newLinePositions = new QListcxx . . $ QList#<int>(); |
| 149 | setBuffercxx . . $ Konsole/FilterChain#setBuffer(ab9b33b00d7218ba).( newBuffer , newLinePositions ); |
| 150 | |
| 151 | // free the old buffers |
| 152 | delete _buffercxx . . $ Konsole/TerminalImageFilterChain#_buffer.; |
| 153 | delete _linePositionscxx . . $ Konsole/TerminalImageFilterChain#_linePositions.; |
| 154 | |
| 155 | _buffercxx . . $ Konsole/TerminalImageFilterChain#_buffer. = newBuffer; |
| 156 | _linePositionscxx . . $ Konsole/TerminalImageFilterChain#_linePositions. = newLinePositions; |
| 157 | |
| 158 | QTextStreamcxx . . $ QTextStream# lineStreamcxx . . $ QTextStream#QTextStream(16e3d097052a73db).(_buffercxx . . $ Konsole/TerminalImageFilterChain#_buffer.); |
| 159 | decoder.begincxx . . $ Konsole/PlainTextDecoder#begin(aca783e314870a73).(&lineStream); |
| 160 | |
| 161 | for (int i=0 ; i < lines ; i++) |
| 162 | { |
| 163 | _linePositionscxx . . $ Konsole/TerminalImageFilterChain#_linePositions.->appendcxx . . $ QList#append(77d9f17553126ecb).(_buffercxx . . $ Konsole/TerminalImageFilterChain#_buffer.->lengthcxx . . $ QString#length(455f465bc33b4cdf).()); |
| 164 | decoder.decodeLinecxx . . $ Konsole/PlainTextDecoder#decodeLine(aa119f8849ce0e23).(image + i*columns,columns,LINE_DEFAULTcxx . . $ Konsole/LINE_DEFAULT.); |
| 165 | |
| 166 | // pretend that each line ends with a newline character. |
| 167 | // this prevents a link that occurs at the end of one line |
| 168 | // being treated as part of a link that occurs at the start of the next line |
| 169 | // |
| 170 | // the downside is that links which are spread over more than one line are not |
| 171 | // highlighted. |
| 172 | // |
| 173 | // TODO - Use the "line wrapped" attribute associated with lines in a |
| 174 | // terminal image to avoid adding this imaginary character for wrapped |
| 175 | // lines |
| 176 | if ( !(lineProperties.valuecxx . . $ QVector#value(1262e1a11a34054e).(i,LINE_DEFAULTcxx . . $ Konsole/LINE_DEFAULT.) & LINE_WRAPPEDcxx . . $ Konsole/LINE_WRAPPED.) ) |
| 177 | lineStream <<cxx . . $ QTextStream#`operator<<`(f2a0e906cfd46ca7). QLatin1Charcxx . . $ QChar#QChar(a50889c09eec06d9).('\n'); |
| 178 | } |
| 179 | decoder.endcxx . . $ Konsole/PlainTextDecoder#end(49f6e7a06ebc5aa8).(); |
| 180 | } |
| 181 | |
| 182 | Filtercxx . . $ Filter#::Filtercxx . . $ Konsole/Filter#Filter(49f6e7a06ebc5aa8).() : |
| 183 | _linePositionscxx . . $ Konsole/Filter#_linePositions.(nullptr), |
| 184 | _buffercxx . . $ Konsole/Filter#_buffer.(nullptr) |
| 185 | { |
| 186 | } |
| 187 | |
| 188 | Filtercxx . . $ Filter#::~cxx . . $ Konsole/Filter#`~Filter`(ced63f7c635d850d).Filtercxx . . $ Konsole/Filter#() |
| 189 | { |
| 190 | qDeleteAllcxx . . $ qDeleteAll(77d9f17553126ecb).(_hotspotListcxx . . $ Konsole/Filter#_hotspotList.); |
| 191 | _hotspotListcxx . . $ Konsole/Filter#_hotspotList..clearcxx . . $ QList#clear(49f6e7a06ebc5aa8).(); |
| 192 | } |
| 193 | void Filtercxx . . $ Filter#::resetcxx . . $ Konsole/Filter#reset(49f6e7a06ebc5aa8).() |
| 194 | { |
| 195 | qDeleteAllcxx . . $ qDeleteAll(77d9f17553126ecb).(_hotspotListcxx . . $ Konsole/Filter#_hotspotList.); |
| 196 | _hotspotscxx . . $ Konsole/Filter#_hotspots..clearcxx . . $ QHash#clear(49f6e7a06ebc5aa8).(); |
| 197 | _hotspotListcxx . . $ Konsole/Filter#_hotspotList..clearcxx . . $ QList#clear(49f6e7a06ebc5aa8).(); |
| 198 | } |
| 199 | |
| 200 | void Filtercxx . . $ Filter#::setBuffercxx . . $ Konsole/Filter#setBuffer(ab9b33b00d7218ba).(const QStringcxx . . $ QString#* buffer , const QListcxx . . $ QList#<int>* linePositions) |
| 201 | { |
| 202 | _buffercxx . . $ Konsole/Filter#_buffer. = buffer; |
| 203 | _linePositionscxx . . $ Konsole/Filter#_linePositions. = linePositions; |
| 204 | } |
| 205 | |
| 206 | void Filtercxx . . $ Filter#::getLineColumncxx . . $ Konsole/Filter#getLineColumn(4b55c833e9dbf0bc).(int position , int& startLine , int& startColumn) |
| 207 | { |
| 208 | Q_ASSERTcxx . . $ `<external>/15045578679651060896/qglobal.h:859:13`!( _linePositions ); |
| 209 | Q_ASSERTcxx . . $ `<external>/15045578679651060896/qglobal.h:859:13`!( _buffer ); |
| 210 | |
| 211 | |
| 212 | for (int i = 0 ; i < _linePositionscxx . . $ Konsole/Filter#_linePositions.->countcxx . . $ QList#count(455f465bc33b4cdf).() ; i++) |
| 213 | { |
| 214 | int nextLine = 0; |
| 215 | |
| 216 | if ( i == _linePositionscxx . . $ Konsole/Filter#_linePositions.->countcxx . . $ QList#count(455f465bc33b4cdf).()-1 ) |
| 217 | nextLine = _buffercxx . . $ Konsole/Filter#_buffer.->lengthcxx . . $ QString#length(455f465bc33b4cdf).() + 1; |
| 218 | else |
| 219 | nextLine = _linePositionscxx . . $ Konsole/Filter#_linePositions.->valuecxx . . $ QList#value(b4be2ec6940d8d62).(i+1); |
| 220 | |
| 221 | if ( _linePositionscxx . . $ Konsole/Filter#_linePositions.->valuecxx . . $ QList#value(b4be2ec6940d8d62).(i) <= position && position < nextLine ) |
| 222 | { |
| 223 | startLine = i; |
| 224 | startColumn = string_widthcxx . . $ string_width(b67f1dc07021228a).(buffercxx . . $ Konsole/Filter#buffer(efb0f8380b491c12).()->midcxx . . $ QString#mid(44b7563da18aea72).(_linePositionscxx . . $ Konsole/Filter#_linePositions.->valuecxx . . $ QList#value(b4be2ec6940d8d62).(i),position - _linePositionscxx . . $ Konsole/Filter#_linePositions.->valuecxx . . $ QList#value(b4be2ec6940d8d62).(i)).toStdWStringcxx . . $ QString#toStdWString(d07e96ea086800fd).()); |
| 225 | return; |
| 226 | } |
| 227 | } |
| 228 | } |
| 229 | |
| 230 | |
| 231 | /*void Filter::addLine(const QString& text) |
| 232 | { |
| 233 | _linePositions << _buffer.length(); |
| 234 | _buffer.append(text); |
| 235 | }*/ |
| 236 | |
| 237 | const QStringcxx . . $ QString#* Filtercxx . . $ Filter#::buffercxx . . $ Konsole/Filter#buffer(efb0f8380b491c12).() |
| 238 | { |
| 239 | return _buffercxx . . $ Konsole/Filter#_buffer.; |
| 240 | } |
| 241 | Filtercxx . . $ Filter#::HotSpotcxx . . $ Konsole/Filter#HotSpot#::~cxx . . $ Konsole/Filter#HotSpot#`~HotSpot`(ced63f7c635d850d).HotSpotcxx . . $ Konsole/Filter#HotSpot#() |
| 242 | { |
| 243 | } |
| 244 | void Filtercxx . . $ Filter#::addHotSpotcxx . . $ Konsole/Filter#addHotSpot(35f9ac5aa6207bb5).(HotSpotcxx . . $ Konsole/Filter#HotSpot#* spot) |
| 245 | { |
| 246 | _hotspotListcxx . . $ Konsole/Filter#_hotspotList. <<cxx . . $ QList#`operator<<`(309d1580d8f5dc58). spot; |
| 247 | |
| 248 | for (int line = spot->startLinecxx . . $ Konsole/Filter#HotSpot#startLine(455f465bc33b4cdf).() ; line <= spot->endLinecxx . . $ Konsole/Filter#HotSpot#endLine(455f465bc33b4cdf).() ; line++) |
| 249 | { |
| 250 | _hotspotscxx . . $ Konsole/Filter#_hotspots..insertcxx . . $ QMultiHash#insert(5109cbe2e8d37d61).(line,spot); |
| 251 | } |
| 252 | } |
| 253 | QListcxx . . $ QList#<Filtercxx . . $ Filter#::HotSpotcxx . . $ Konsole/Filter#HotSpot#*> Filtercxx . . $ Filter#::hotSpotscxx . . $ Konsole/Filter#hotSpots(927ee1eeecce351e).() const |
| 254 | { |
| 255 | return _hotspotListcxx . . $ QList#QList(3d2301cfd89f773a).; |
| 256 | } |
| 257 | QListcxx . . $ QList#<Filtercxx . . $ Filter#::HotSpotcxx . . $ Konsole/Filter#HotSpot#*> Filtercxx . . $ Filter#::hotSpotsAtLinecxx . . $ Konsole/Filter#hotSpotsAtLine(92574a9f3890659d).(int line) const |
| 258 | { |
| 259 | return _hotspotscxx . . $ Konsole/Filter#_hotspots..valuescxx . . $ QMultiHash#values(8fb875fcb58d4a3b).(line); |
| 260 | } |
| 261 | |
| 262 | Filtercxx . . $ Filter#::HotSpotcxx . . $ Konsole/Filter#HotSpot#* Filtercxx . . $ Filter#::hotSpotAtcxx . . $ Konsole/Filter#hotSpotAt(a340944fd47eb4c3).(int line , int column) const |
| 263 | { |
| 264 | QListIteratorcxx . . $ QListIterator#<HotSpotcxx . . $ Konsole/Filter#HotSpot#*> spotItercxx . . $ QListIterator#QListIterator(742a15f66a895bc5).(_hotspotscxx . . $ Konsole/Filter#_hotspots..valuescxx . . $ QMultiHash#values(8fb875fcb58d4a3b).(line)); |
| 265 | |
| 266 | while (spotIter.hasNextcxx . . $ QListIterator#hasNext(50ce9a9e25b4a850).()) |
| 267 | { |
| 268 | HotSpotcxx . . $ Konsole/Filter#HotSpot#* spot = spotIter.nextcxx . . $ QListIterator#next(1306adbac230aeaa).(); |
| 269 | |
| 270 | if ( spot->startLinecxx . . $ Konsole/Filter#HotSpot#startLine(455f465bc33b4cdf).() == line && spot->startColumncxx . . $ Konsole/Filter#HotSpot#startColumn(455f465bc33b4cdf).() > column ) |
| 271 | continue; |
| 272 | if ( spot->endLinecxx . . $ Konsole/Filter#HotSpot#endLine(455f465bc33b4cdf).() == line && spot->endColumncxx . . $ Konsole/Filter#HotSpot#endColumn(455f465bc33b4cdf).() < column ) |
| 273 | continue; |
| 274 | |
| 275 | return spot; |
| 276 | } |
| 277 | |
| 278 | return nullptr; |
| 279 | } |
| 280 | |
| 281 | Filtercxx . . $ Filter#::HotSpotcxx . . $ Konsole/Filter#HotSpot#::HotSpotcxx . . $ Konsole/Filter#HotSpot#HotSpot(748afa4755bc9595).(int startLine , int startColumn , int endLine , int endColumn) |
| 282 | : _startLinecxx . . $ Konsole/Filter#HotSpot#_startLine.(startLine) |
| 283 | , _startColumncxx . . $ Konsole/Filter#HotSpot#_startColumn.(startColumn) |
| 284 | , _endLinecxx . . $ Konsole/Filter#HotSpot#_endLine.(endLine) |
| 285 | , _endColumncxx . . $ Konsole/Filter#HotSpot#_endColumn.(endColumn) |
| 286 | , _typecxx . . $ Konsole/Filter#HotSpot#_type.(NotSpecifiedcxx . . $ Konsole/Filter#HotSpot#NotSpecified.) |
| 287 | { |
| 288 | } |
| 289 | QListcxx . . $ QList#<QActioncxx . . $ QAction#*> Filtercxx . . $ Filter#::HotSpotcxx . . $ Konsole/Filter#HotSpot#::actionscxx . . $ Konsole/Filter#HotSpot#actions(c4b3bc0793dee689).() |
| 290 | { |
| 291 | return QListcxx . . $ QList#QList(ced63f7c635d850d).<QActioncxx . . $ QAction#*>(); |
| 292 | } |
| 293 | int Filtercxx . . $ Filter#::HotSpotcxx . . $ Konsole/Filter#HotSpot#::startLinecxx . . $ Konsole/Filter#HotSpot#startLine(455f465bc33b4cdf).() const |
| 294 | { |
| 295 | return _startLinecxx . . $ Konsole/Filter#HotSpot#_startLine.; |
| 296 | } |
| 297 | int Filtercxx . . $ Filter#::HotSpotcxx . . $ Konsole/Filter#HotSpot#::endLinecxx . . $ Konsole/Filter#HotSpot#endLine(455f465bc33b4cdf).() const |
| 298 | { |
| 299 | return _endLinecxx . . $ Konsole/Filter#HotSpot#_endLine.; |
| 300 | } |
| 301 | int Filtercxx . . $ Filter#::HotSpotcxx . . $ Konsole/Filter#HotSpot#::startColumncxx . . $ Konsole/Filter#HotSpot#startColumn(455f465bc33b4cdf).() const |
| 302 | { |
| 303 | return _startColumncxx . . $ Konsole/Filter#HotSpot#_startColumn.; |
| 304 | } |
| 305 | int Filtercxx . . $ Filter#::HotSpotcxx . . $ Konsole/Filter#HotSpot#::endColumncxx . . $ Konsole/Filter#HotSpot#endColumn(455f465bc33b4cdf).() const |
| 306 | { |
| 307 | return _endColumncxx . . $ Konsole/Filter#HotSpot#_endColumn.; |
| 308 | } |
| 309 | Filtercxx . . $ Filter#::HotSpotcxx . . $ Konsole/Filter#HotSpot#::Typecxx . . $ Konsole/Filter#HotSpot#Type# Filtercxx . . $ Filter#::HotSpotcxx . . $ Konsole/Filter#HotSpot#::typecxx . . $ Konsole/Filter#HotSpot#type(d53492adece367cf).() const |
| 310 | { |
| 311 | return _typecxx . . $ Konsole/Filter#HotSpot#_type.; |
| 312 | } |
| 313 | void Filtercxx . . $ Filter#::HotSpotcxx . . $ Konsole/Filter#HotSpot#::setTypecxx . . $ Konsole/Filter#HotSpot#setType(8b418483fa682651).(Typecxx . . $ Konsole/Filter#HotSpot#Type# type) |
| 314 | { |
| 315 | _typecxx . . $ Konsole/Filter#HotSpot#_type. = type; |
| 316 | } |
| 317 | |
| 318 | RegExpFiltercxx . . $ Konsole/RegExpFilter#::RegExpFiltercxx . . $ Konsole/RegExpFilter#RegExpFilter(49f6e7a06ebc5aa8).() |
| 319 | { |
| 320 | } |
| 321 | |
| 322 | RegExpFiltercxx . . $ Konsole/RegExpFilter#::HotSpotcxx . . $ Konsole/RegExpFilter#HotSpot#::HotSpotcxx . . $ Konsole/RegExpFilter#HotSpot#HotSpot(748afa4755bc9595).(int startLine,int startColumn,int endLine,int endColumn) |
| 323 | : Filtercxx . . $ Konsole/Filter#::HotSpotcxx . . $ Konsole/Filter#HotSpot#(startLine,startColumn,endLine,endColumn) |
| 324 | { |
| 325 | setTypecxx . . $ Konsole/Filter#HotSpot#setType(8b418483fa682651).(Markercxx . . $ Konsole/Filter#HotSpot#Marker.); |
| 326 | } |
| 327 | |
| 328 | void RegExpFiltercxx . . $ Konsole/RegExpFilter#::HotSpotcxx . . $ Konsole/RegExpFilter#HotSpot#::activatecxx . . $ Konsole/RegExpFilter#HotSpot#activate(3520e46b33348bf6).(const QStringcxx . . $ QString#&) |
| 329 | { |
| 330 | } |
| 331 | |
| 332 | void RegExpFiltercxx . . $ Konsole/RegExpFilter#::HotSpotcxx . . $ Konsole/RegExpFilter#HotSpot#::setCapturedTextscxx . . $ Konsole/RegExpFilter#HotSpot#setCapturedTexts(631c0101495f0328).(const QStringListcxx . . $ QStringList#& texts) |
| 333 | { |
| 334 | _capturedTextscxx . . $ Konsole/RegExpFilter#HotSpot#_capturedTexts. =cxx . . $ QStringList#`operator=`(cb3c3d1614140851). texts; |
| 335 | } |
| 336 | QStringListcxx . . $ QStringList# RegExpFiltercxx . . $ Konsole/RegExpFilter#::HotSpotcxx . . $ Konsole/RegExpFilter#HotSpot#::capturedTextscxx . . $ Konsole/RegExpFilter#HotSpot#capturedTexts(e1dbd5c4feadc8f5).() const |
| 337 | { |
| 338 | return _capturedTextscxx . . $ Konsole/RegExpFilter#HotSpot#_capturedTexts.; |
| 339 | } |
| 340 | |
| 341 | void RegExpFiltercxx . . $ Konsole/RegExpFilter#::setRegExpcxx . . $ Konsole/RegExpFilter#setRegExp(ff80efdedf7b2ca0).(const QRegExpcxx . . $ QRegExp#& regExp) |
| 342 | { |
| 343 | _searchTextcxx . . $ Konsole/RegExpFilter#_searchText. =cxx . . $ QRegExp#`operator=`(f1cb947c48744bed). regExp; |
| 344 | } |
| 345 | QRegExpcxx . . $ QRegExp# RegExpFiltercxx . . $ Konsole/RegExpFilter#::regExpcxx . . $ Konsole/RegExpFilter#regExp(f0d4f2c2a59d2909).() const |
| 346 | { |
| 347 | return _searchTextcxx . . $ QRegExp#QRegExp(ff80efdedf7b2ca0).; |
| 348 | } |
| 349 | /*void RegExpFilter::reset(int) |
| 350 | { |
| 351 | _buffer = QString(); |
| 352 | }*/ |
| 353 | void RegExpFiltercxx . . $ Konsole/RegExpFilter#::processcxx . . $ Konsole/RegExpFilter#process(49f6e7a06ebc5aa8).() |
| 354 | { |
| 355 | int pos = 0; |
| 356 | const QStringcxx . . $ QString#* text = buffercxx . . $ Konsole/Filter#buffer(efb0f8380b491c12).(); |
| 357 | |
| 358 | Q_ASSERTcxx . . $ `<external>/15045578679651060896/qglobal.h:859:13`!( text ); |
| 359 | |
| 360 | // ignore any regular expressions which match an empty string. |
| 361 | // otherwise the while loop below will run indefinitely |
| 362 | static const QStringcxx . . $ QString# emptyStringcxx . . $ QString#QString(ced63f7c635d850d).; |
| 363 | if ( _searchTextcxx . . $ Konsole/RegExpFilter#_searchText..exactMatchcxx . . $ QRegExp#exactMatch(f3b39adf77d9c36c).(emptyString) ) |
| 364 | return; |
| 365 | |
| 366 | while(pos >= 0) |
| 367 | { |
| 368 | pos = _searchTextcxx . . $ Konsole/RegExpFilter#_searchText..indexIncxx . . $ QRegExp#indexIn(46f502bdfc4aeb33).(*text,pos); |
| 369 | |
| 370 | if ( pos >= 0 ) |
| 371 | { |
| 372 | int startLine = 0; |
| 373 | int endLine = 0; |
| 374 | int startColumn = 0; |
| 375 | int endColumn = 0; |
| 376 | |
| 377 | getLineColumncxx . . $ Konsole/Filter#getLineColumn(4b55c833e9dbf0bc).(pos,startLine,startColumn); |
| 378 | getLineColumncxx . . $ Konsole/Filter#getLineColumn(4b55c833e9dbf0bc).(pos + _searchTextcxx . . $ Konsole/RegExpFilter#_searchText..matchedLengthcxx . . $ QRegExp#matchedLength(455f465bc33b4cdf).(),endLine,endColumn); |
| 379 | |
| 380 | RegExpFiltercxx . . $ Konsole/RegExpFilter#::HotSpotcxx . . $ Konsole/RegExpFilter#HotSpot#* spot = newHotSpotcxx . . $ Konsole/RegExpFilter#newHotSpot(2cdf0c2b9256cc1f).(startLine,startColumn, |
| 381 | endLine,endColumn); |
| 382 | spot->setCapturedTextscxx . . $ Konsole/RegExpFilter#HotSpot#setCapturedTexts(631c0101495f0328).(_searchTextcxx . . $ Konsole/RegExpFilter#_searchText..capturedTextscxx . . $ QRegExp#capturedTexts(669a05bc42dd57cc).()); |
| 383 | |
| 384 | addHotSpotcxx . . $ Konsole/Filter#addHotSpot(35f9ac5aa6207bb5).( spot ); |
| 385 | pos += _searchTextcxx . . $ Konsole/RegExpFilter#_searchText..matchedLengthcxx . . $ QRegExp#matchedLength(455f465bc33b4cdf).(); |
| 386 | |
| 387 | // if matchedLength == 0, the program will get stuck in an infinite loop |
| 388 | if ( _searchTextcxx . . $ Konsole/RegExpFilter#_searchText..matchedLengthcxx . . $ QRegExp#matchedLength(455f465bc33b4cdf).() == 0 ) |
| 389 | pos = -1; |
| 390 | } |
| 391 | } |
| 392 | } |
| 393 | |
| 394 | RegExpFiltercxx . . $ Konsole/RegExpFilter#::HotSpotcxx . . $ Konsole/RegExpFilter#HotSpot#* RegExpFiltercxx . . $ Konsole/RegExpFilter#::newHotSpotcxx . . $ Konsole/RegExpFilter#newHotSpot(2cdf0c2b9256cc1f).(int startLine,int startColumn, |
| 395 | int endLine,int endColumn) |
| 396 | { |
| 397 | return new RegExpFiltercxx . . $ Konsole/RegExpFilter#::HotSpotcxx . . $ Konsole/RegExpFilter#HotSpot#(startLine,startColumn, |
| 398 | endLine,endColumn); |
| 399 | } |
| 400 | RegExpFiltercxx . . $ Konsole/RegExpFilter#::HotSpotcxx . . $ Konsole/RegExpFilter#HotSpot#* UrlFiltercxx . . $ Konsole/UrlFilter#::newHotSpotcxx . . $ Konsole/UrlFilter#newHotSpot(2cdf0c2b9256cc1f).(int startLine,int startColumn,int endLine, |
| 401 | int endColumn) |
| 402 | { |
| 403 | HotSpotcxx . . $ Konsole/UrlFilter#HotSpot# *spot = new UrlFiltercxx . . $ Konsole/UrlFilter#::HotSpotcxx . . $ Konsole/UrlFilter#HotSpot#(startLine,startColumn, |
| 404 | endLine,endColumn); |
| 405 | connectcxx . . $ QObject#connect(835f87066c895669).(spot->getUrlObjectcxx . . $ Konsole/UrlFilter#HotSpot#getUrlObject(c884d601a81ad382).(), &FilterObjectcxx . . $ Konsole/FilterObject#::activatedcxx . . $ Konsole/FilterObject#activated(61e5b15e0cd21ddb)., this, &UrlFiltercxx . . $ Konsole/UrlFilter#::activatedcxx . . $ Konsole/UrlFilter#activated(61e5b15e0cd21ddb).); |
| 406 | return spot; |
| 407 | } |
| 408 | |
| 409 | UrlFiltercxx . . $ Konsole/UrlFilter#::HotSpotcxx . . $ Konsole/UrlFilter#HotSpot#::HotSpotcxx . . $ Konsole/UrlFilter#HotSpot#HotSpot(748afa4755bc9595).(int startLine,int startColumn,int endLine,int endColumn) |
| 410 | : RegExpFiltercxx . . $ Konsole/RegExpFilter#::HotSpotcxx . . $ Konsole/RegExpFilter#HotSpot#(startLine,startColumn,endLine,endColumn) |
| 411 | , _urlObjectcxx . . $ Konsole/UrlFilter#HotSpot#_urlObject.(new FilterObjectcxx . . $ Konsole/FilterObject#FilterObject(35f9ac5aa6207bb5).(this)) |
| 412 | { |
| 413 | setTypecxx . . $ Konsole/Filter#HotSpot#setType(8b418483fa682651).(Linkcxx . . $ Konsole/Filter#HotSpot#Link.); |
| 414 | } |
| 415 | |
| 416 | UrlFiltercxx . . $ Konsole/UrlFilter#::HotSpotcxx . . $ Konsole/UrlFilter#HotSpot#::UrlTypecxx . . $ Konsole/UrlFilter#HotSpot#UrlType# UrlFiltercxx . . $ Konsole/UrlFilter#::HotSpotcxx . . $ Konsole/UrlFilter#HotSpot#::urlTypecxx . . $ Konsole/UrlFilter#HotSpot#urlType(a7c2e5f86cfd3bf1).() const |
| 417 | { |
| 418 | QStringcxx . . $ QString# url = capturedTextscxx . . $ QString#QString(132dd6869045752b).().constFirstcxx . . $ QList#constFirst(ea465e50d690edfe).(); |
| 419 | |
| 420 | if ( FullUrlRegExpcxx . . $ Konsole/UrlFilter#FullUrlRegExp..exactMatchcxx . . $ QRegExp#exactMatch(f3b39adf77d9c36c).(url) ) |
| 421 | return StandardUrlcxx . . $ Konsole/UrlFilter#HotSpot#StandardUrl.; |
| 422 | else if ( EmailAddressRegExpcxx . . $ Konsole/UrlFilter#EmailAddressRegExp..exactMatchcxx . . $ QRegExp#exactMatch(f3b39adf77d9c36c).(url) ) |
| 423 | return Emailcxx . . $ Konsole/UrlFilter#HotSpot#Email.; |
| 424 | else |
| 425 | return Unknowncxx . . $ Konsole/UrlFilter#HotSpot#Unknown.; |
| 426 | } |
| 427 | |
| 428 | void UrlFiltercxx . . $ Konsole/UrlFilter#::HotSpotcxx . . $ Konsole/UrlFilter#HotSpot#::activatecxx . . $ Konsole/UrlFilter#HotSpot#activate(3520e46b33348bf6).(const QStringcxx . . $ QString#& actionName) |
| 429 | { |
| 430 | QStringcxx . . $ QString# url = capturedTextscxx . . $ QString#QString(132dd6869045752b).().constFirstcxx . . $ QList#constFirst(ea465e50d690edfe).(); |
| 431 | |
| 432 | const UrlTypecxx . . $ Konsole/UrlFilter#HotSpot#UrlType# kind = urlTypecxx . . $ Konsole/UrlFilter#HotSpot#urlType(a7c2e5f86cfd3bf1).(); |
| 433 | |
| 434 | if ( actionName ==cxx . . $ QString#`operator==`(b3b98e09a392cdf9). QLatin1Stringcxx . . $ QLatin1String#QLatin1String(aac1607cfe1c1740).("copy-action") ) |
| 435 | { |
| 436 | QApplicationcxx . . $ QApplication#::clipboardcxx . . $ QGuiApplication#clipboard(a5a00f8d44f5ac9e).()->setTextcxx . . $ QClipboard#setText(9f492b8a441aa8de).(url); |
| 437 | return; |
| 438 | } |
| 439 | |
| 440 | if ( actionName.isEmptycxx . . $ QString#isEmpty(50ce9a9e25b4a850).() || actionName ==cxx . . $ QString#`operator==`(b3b98e09a392cdf9). QLatin1Stringcxx . . $ QLatin1String#QLatin1String(aac1607cfe1c1740).("open-action") || actionName ==cxx . . $ QString#`operator==`(b3b98e09a392cdf9). QLatin1Stringcxx . . $ QLatin1String#QLatin1String(aac1607cfe1c1740).("click-action") ) |
| 441 | { |
| 442 | if ( kind == StandardUrlcxx . . $ Konsole/UrlFilter#HotSpot#StandardUrl. ) |
| 443 | { |
| 444 | // if the URL path does not include the protocol ( eg. "www.kde.org" ) then |
| 445 | // prepend http:// ( eg. "www.kde.org" --> "http://www.kde.org" ) |
| 446 | if (!url.containscxx . . $ QString#contains(9b0c247ef39438e0).(QLatin1Stringcxx . . $ QLatin1String#QLatin1String(aac1607cfe1c1740).("://"))) |
| 447 | { |
| 448 | url.prependcxx . . $ QString#prepend(10913c921d46e09a).(QLatin1Stringcxx . . $ QLatin1String#QLatin1String(aac1607cfe1c1740).("http://")); |
| 449 | } |
| 450 | } |
| 451 | else if ( kind == Emailcxx . . $ Konsole/UrlFilter#HotSpot#Email. ) |
| 452 | { |
| 453 | url.prependcxx . . $ QString#prepend(10913c921d46e09a).(QLatin1Stringcxx . . $ QLatin1String#QLatin1String(aac1607cfe1c1740).("mailto:")); |
| 454 | } |
| 455 | |
| 456 | _urlObjectcxx . . $ Konsole/UrlFilter#HotSpot#_urlObject.->emitActivatedcxx . . $ Konsole/FilterObject#emitActivated(61e5b15e0cd21ddb).(QUrlcxx . . $ QUrl#QUrl(ea1f3831e370f1cb).(url, QUrlcxx . . $ QUrl#::StrictModecxx . . $ QUrl#StrictMode.), actionName !=cxx . . $ QString#`operator!=`(b3b98e09a392cdf9). QLatin1Stringcxx . . $ QLatin1String#QLatin1String(aac1607cfe1c1740).("click-action")); |
| 457 | } |
| 458 | } |
| 459 | |
| 460 | // Note: Altering these regular expressions can have a major effect on the performance of the filters |
| 461 | // used for finding URLs in the text, especially if they are very general and could match very long |
| 462 | // pieces of text. |
| 463 | // Please be careful when altering them. |
| 464 | |
| 465 | //regexp matches: |
| 466 | // full url: |
| 467 | // protocolname:// or www. followed by anything other than whitespaces, <, >, ' or ", and ends before whitespaces, <, >, ', ", ], !, comma and dot |
| 468 | const QRegExpcxx . . $ QRegExp# UrlFiltercxx . . $ Konsole/UrlFilter#::FullUrlRegExpcxx . . $ Konsole/UrlFilter#FullUrlRegExp.(QLatin1Stringcxx . . $ QString#QString(4641beeb24e75d60).("(www\\.(?!\\.)|[a-z][a-z0-9+.-]*://)[^\\s<>'\"]+[^!,\\.\\s<>'\"\\]]")); |
| 469 | // email address: |
| 470 | // [word chars, dots or dashes]@[word chars, dots or dashes].[word chars] |
| 471 | const QRegExpcxx . . $ QRegExp# UrlFiltercxx . . $ Konsole/UrlFilter#::EmailAddressRegExpcxx . . $ Konsole/UrlFilter#EmailAddressRegExp.(QLatin1Stringcxx . . $ QString#QString(4641beeb24e75d60).("\\b(\\w|\\.|-)+@(\\w|\\.|-)+\\.\\w+\\b")); |
| 472 | |
| 473 | // matches full url or email address |
| 474 | const QRegExpcxx . . $ QRegExp# UrlFiltercxx . . $ Konsole/UrlFilter#::CompleteUrlRegExpcxx . . $ Konsole/UrlFilter#CompleteUrlRegExp.(QLatin1Charcxx . . $ QChar#QChar(a50889c09eec06d9).('(')+cxx . . $ operator+(b63c95cc3b9a9a38).FullUrlRegExpcxx . . $ Konsole/UrlFilter#FullUrlRegExp..patterncxx . . $ QRegExp#pattern(6ef7b6c27b00b43d).()+cxx . . $ operator+(eab1ea5b6c36e9b2).QLatin1Charcxx . . $ QChar#QChar(a50889c09eec06d9).('|')+cxx . . $ operator+(fab9b4f80031f353). |
| 475 | EmailAddressRegExpcxx . . $ Konsole/UrlFilter#EmailAddressRegExp..patterncxx . . $ QRegExp#pattern(6ef7b6c27b00b43d).()+cxx . . $ operator+(eab1ea5b6c36e9b2).QLatin1Charcxx . . $ QChar#QChar(a50889c09eec06d9).(')')); |
| 476 | |
| 477 | UrlFiltercxx . . $ Konsole/UrlFilter#::UrlFiltercxx . . $ Konsole/UrlFilter#UrlFilter(49f6e7a06ebc5aa8).() |
| 478 | { |
| 479 | setRegExpcxx . . $ Konsole/RegExpFilter#setRegExp(ff80efdedf7b2ca0).( CompleteUrlRegExpcxx . . $ Konsole/UrlFilter#CompleteUrlRegExp. ); |
| 480 | } |
| 481 | |
| 482 | UrlFiltercxx . . $ Konsole/UrlFilter#::HotSpotcxx . . $ Konsole/UrlFilter#HotSpot#::~cxx . . $ Konsole/UrlFilter#HotSpot#`~HotSpot`(ced63f7c635d850d).HotSpotcxx . . $ Konsole/UrlFilter#HotSpot#() |
| 483 | { |
| 484 | delete _urlObjectcxx . . $ Konsole/UrlFilter#HotSpot#_urlObject.; |
| 485 | } |
| 486 | |
| 487 | void FilterObjectcxx . . $ Konsole/FilterObject#::emitActivatedcxx . . $ Konsole/FilterObject#emitActivated(61e5b15e0cd21ddb).(const QUrlcxx . . $ QUrl#& url, bool fromContextMenu) |
| 488 | { |
| 489 | emitcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:97:10`! activatedcxx . . $ Konsole/FilterObject#activated(61e5b15e0cd21ddb).(url, fromContextMenu); |
| 490 | } |
| 491 | |
| 492 | void FilterObjectcxx . . $ Konsole/FilterObject#::activatecxx . . $ Konsole/FilterObject#activate(49f6e7a06ebc5aa8).() |
| 493 | { |
| 494 | _filtercxx . . $ Konsole/FilterObject#_filter.->activatecxx . . $ Konsole/Filter#HotSpot#activate(3520e46b33348bf6).(sendercxx . . $ QObject#sender(2dbb680a34285c44).()->objectNamecxx . . $ QObject#objectName(6ef7b6c27b00b43d).()); |
| 495 | } |
| 496 | |
| 497 | FilterObjectcxx . . $ Konsole/FilterObject#* UrlFiltercxx . . $ Konsole/UrlFilter#::HotSpotcxx . . $ Konsole/UrlFilter#HotSpot#::getUrlObjectcxx . . $ Konsole/UrlFilter#HotSpot#getUrlObject(c884d601a81ad382).() const |
| 498 | { |
| 499 | return _urlObjectcxx . . $ Konsole/UrlFilter#HotSpot#_urlObject.; |
| 500 | } |
| 501 | |
| 502 | QListcxx . . $ QList#<QActioncxx . . $ QAction#*> UrlFiltercxx . . $ Konsole/UrlFilter#::HotSpotcxx . . $ Konsole/UrlFilter#HotSpot#::actionscxx . . $ Konsole/UrlFilter#HotSpot#actions(c4b3bc0793dee689).() |
| 503 | { |
| 504 | QListcxx . . $ QList#<QActioncxx . . $ QAction#*> listcxx . . $ QList#QList(ced63f7c635d850d).; |
| 505 | |
| 506 | const UrlTypecxx . . $ Konsole/UrlFilter#HotSpot#UrlType# kind = urlTypecxx . . $ Konsole/UrlFilter#HotSpot#urlType(a7c2e5f86cfd3bf1).(); |
| 507 | |
| 508 | QActioncxx . . $ QAction#* openAction = new QActioncxx . . $ QAction#QAction(749de1b6ae65bddd).(_urlObjectcxx . . $ Konsole/UrlFilter#HotSpot#_urlObject.); |
| 509 | QActioncxx . . $ QAction#* copyAction = new QActioncxx . . $ QAction#QAction(749de1b6ae65bddd).(_urlObjectcxx . . $ Konsole/UrlFilter#HotSpot#_urlObject.);; |
| 510 | |
| 511 | Q_ASSERTcxx . . $ `<external>/15045578679651060896/qglobal.h:859:13`!( kind == StandardUrl || kind == Email ); |
| 512 | |
| 513 | if ( kind == StandardUrlcxx . . $ Konsole/UrlFilter#HotSpot#StandardUrl. ) |
| 514 | { |
| 515 | openAction->setTextcxx . . $ QAction#setText(3520e46b33348bf6).(QObjectcxx . . $ QObject#::trcxx . . $ QObject#tr(75d9f1c324b4579d).("Open Link")); |
| 516 | copyAction->setTextcxx . . $ QAction#setText(3520e46b33348bf6).(QObjectcxx . . $ QObject#::trcxx . . $ QObject#tr(75d9f1c324b4579d).("Copy Link Address")); |
| 517 | } |
| 518 | else if ( kind == Emailcxx . . $ Konsole/UrlFilter#HotSpot#Email. ) |
| 519 | { |
| 520 | openAction->setTextcxx . . $ QAction#setText(3520e46b33348bf6).(QObjectcxx . . $ QObject#::trcxx . . $ QObject#tr(75d9f1c324b4579d).("Send Email To...")); |
| 521 | copyAction->setTextcxx . . $ QAction#setText(3520e46b33348bf6).(QObjectcxx . . $ QObject#::trcxx . . $ QObject#tr(75d9f1c324b4579d).("Copy Email Address")); |
| 522 | } |
| 523 | |
| 524 | // object names are set here so that the hotspot performs the |
| 525 | // correct action when activated() is called with the triggered |
| 526 | // action passed as a parameter. |
| 527 | openAction->setObjectNamecxx . . $ QObject#setObjectName(3520e46b33348bf6).( QLatin1Stringcxx . . $ QString#QString(4641beeb24e75d60).("open-action" )); |
| 528 | copyAction->setObjectNamecxx . . $ QObject#setObjectName(3520e46b33348bf6).( QLatin1Stringcxx . . $ QString#QString(4641beeb24e75d60).("copy-action" )); |
| 529 | |
| 530 | QObjectcxx . . $ QObject#::connectcxx . . $ QObject#connect(835f87066c895669).( openAction , &QActioncxx . . $ QAction#::triggeredcxx . . $ QAction#triggered(b45ddcbc8423892c). , _urlObjectcxx . . $ Konsole/UrlFilter#HotSpot#_urlObject. , &FilterObjectcxx . . $ Konsole/FilterObject#::activatecxx . . $ Konsole/FilterObject#activate(49f6e7a06ebc5aa8). ); |
| 531 | QObjectcxx . . $ QObject#::connectcxx . . $ QObject#connect(835f87066c895669).( copyAction , &QActioncxx . . $ QAction#::triggeredcxx . . $ QAction#triggered(b45ddcbc8423892c). , _urlObjectcxx . . $ Konsole/UrlFilter#HotSpot#_urlObject. , &FilterObjectcxx . . $ Konsole/FilterObject#::activatecxx . . $ Konsole/FilterObject#activate(49f6e7a06ebc5aa8). ); |
| 532 | |
| 533 | list <<cxx . . $ QList#`operator<<`(309d1580d8f5dc58). openAction; |
| 534 | list <<cxx . . $ QList#`operator<<`(309d1580d8f5dc58). copyAction; |
| 535 | |
| 536 | return listcxx . . $ QList#QList(88d75cd4b19cb2d1).; |
| 537 | } |
| 538 | |
| 539 | //#include "Filter.moc" |