| 1 | /***************************************************************************** |
| 2 | ** QNapi |
| 3 | ** Copyright (C) 2008-2017 Piotr KrzemiĆski <[email protected]> |
| 4 | ** |
| 5 | ** This program is free software; you can redistribute it and/or modify |
| 6 | ** it under the terms of the GNU General Public License as published by |
| 7 | ** the Free Software Foundation; either version 2 of the License, or |
| 8 | ** (at your option) any later version. |
| 9 | ** |
| 10 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE |
| 11 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. |
| 12 | ** |
| 13 | *****************************************************************************/ |
| 14 | |
| 15 | #include "subtitleconverter.h"cxx . . $ `<file>/libqnapi/src/subconvert/subtitleconverter.h`/ |
| 16 | #include <QFile> |
| 17 | #include <QTextStream> |
| 18 | #include <cmath> |
| 19 | #include "libqnapi.h"cxx . . $ `<file>/libqnapi/src/libqnapi.h`/ |
| 20 | #include "movieinfo/movieinfoprovider.h"cxx . . $ `<file>/libqnapi/src/movieinfo/movieinfoprovider.h`/ |
| 21 | #include "utils/encodingutils.h"cxx . . $ `<file>/libqnapi/src/utils/encodingutils.h`/ |
| 22 | |
| 23 | SubtitleConvertercxx . . $ SubtitleConverter#::SubtitleConvertercxx . . $ SubtitleConverter#SubtitleConverter(e7da51e773c7d646).( |
| 24 | QSharedPointercxx . . $ QSharedPointer#<const SubtitleFormatsRegistrycxx . . $ SubtitleFormatsRegistry#> subtitleFormatsRegistry, |
| 25 | QSharedPointercxx . . $ QSharedPointer#<const MovieInfoProvidercxx . . $ MovieInfoProvider#> movieInfoProvider, |
| 26 | bool skipConvertAds) |
| 27 | : subtitleFormatsRegistrycxx . . $ SubtitleConverter#subtitleFormatsRegistry.(subtitleFormatsRegistry), |
| 28 | movieInfoProvidercxx . . $ SubtitleConverter#movieInfoProvider.(movieInfoProvider), |
| 29 | skipConvertAdscxx . . $ SubtitleConverter#skipConvertAds.(skipConvertAds) {} |
| 30 | |
| 31 | QStringcxx . . $ QString# SubtitleConvertercxx . . $ SubtitleConverter#::detectFormatcxx . . $ SubtitleConverter#detectFormat(5555d9024dcf93fb).(const QStringcxx . . $ QString# &subtitleFile) const { |
| 32 | const QStringListcxx . . $ QStringList# &lines = readFilecxx . . $ SubtitleConverter#readFile(42e916d7bc97fdf0).(subtitleFile, "UTF-8"cxx . . $ QString#QString(e1217c004a86c950)., 15); |
| 33 | return detectFormatcxx . . $ QString#QString(e1217c004a86c950).(lines); |
| 34 | } |
| 35 | |
| 36 | QStringcxx . . $ QString# SubtitleConvertercxx . . $ SubtitleConverter#::detectFormatcxx . . $ SubtitleConverter#detectFormat(ea5597cae5d7a1b8).( |
| 37 | const QStringListcxx . . $ QStringList# &subtitleLines) const { |
| 38 | foreachcxx . . $ `<external>/15045578679651060896/qglobal.h:1145:13`! (QString format, subtitleFormatsRegistry->listFormatNames()) { |
| 39 | if (subtitleFormatsRegistrycxx . . $ SubtitleConverter#subtitleFormatsRegistry.->cxx . . $ QSharedPointer#`operator->`(5a2a78a048fb49a8).selectcxx . . $ SubtitleFormatsRegistry#select(849396506c5f6260).(format)->cxx . . $ QSharedPointer#`operator->`(5a2a78a048fb49a8).detectcxx . . $ SubtitleFormat#detect(5f1b03c390062051).(subtitleLines)) { |
| 40 | return formatcxx . . $ QString#QString(e1217c004a86c950).; |
| 41 | } |
| 42 | } |
| 43 | returncxx . . $ QString#QString(e1217c004a86c950). ""cxx . . $ QString#QString(85c52e162fed56f9).; |
| 44 | } |
| 45 | |
| 46 | bool SubtitleConvertercxx . . $ SubtitleConverter#::convertSubtitlescxx . . $ SubtitleConverter#convertSubtitles(10bb6b406c18274a).(QStringcxx . . $ QString# subtitleFile, |
| 47 | QStringcxx . . $ QString# targetFormatName, |
| 48 | QStringcxx . . $ QString# targetFileName, |
| 49 | double movieFPS, double fpsRatio, |
| 50 | double delayOffset) const { |
| 51 | return convertSubtitlescxx . . $ SubtitleConverter#convertSubtitles(de2c2ef8ecb8f9e4).(subtitleFilecxx . . $ QString#QString(3520e46b33348bf6)., targetFormatNamecxx . . $ QString#QString(3520e46b33348bf6)., targetFileNamecxx . . $ QString#QString(3520e46b33348bf6)., |
| 52 | [cxx . . $ std/function#function(a4b4b0c4acad1616).=]() -> double { return movieFPS; }, fpsRatio, |
| 53 | delayOffset); |
| 54 | } |
| 55 | |
| 56 | bool SubtitleConvertercxx . . $ SubtitleConverter#::convertSubtitlescxx . . $ SubtitleConverter#convertSubtitles(129342b27da0d956).(QStringcxx . . $ QString# subtitleFile, |
| 57 | QStringcxx . . $ QString# targetFormatName, |
| 58 | QStringcxx . . $ QString# targetFileName, |
| 59 | QStringcxx . . $ QString# movieFile) const { |
| 60 | return convertSubtitlescxx . . $ SubtitleConverter#convertSubtitles(de2c2ef8ecb8f9e4).( |
| 61 | subtitleFilecxx . . $ QString#QString(3520e46b33348bf6)., targetFormatNamecxx . . $ QString#QString(3520e46b33348bf6)., targetFileNamecxx . . $ QString#QString(3520e46b33348bf6)., [cxx . . $ std/function#function(a4b4b0c4acad1616).&]() -> double { |
| 62 | const Maybecxx . . $ Maybe#<MovieInfocxx . . $ MovieInfo#> mmi = movieInfoProvidercxx . . $ SubtitleConverter#movieInfoProvider.->cxx . . $ QSharedPointer#`operator->`(5a2a78a048fb49a8).getMovieInfocxx . . $ MovieInfoProvider#getMovieInfo(7c952fc59654f98e).(movieFile); |
| 63 | return mmi ? mmi.valuecxx . . $ Maybe#value(8f5363d873dd4781).().frameRatecxx . . $ MovieInfo#frameRate(21b6c25e127938e2).() : 0.0; |
| 64 | }); |
| 65 | } |
| 66 | |
| 67 | bool SubtitleConvertercxx . . $ SubtitleConverter#::convertSubtitlescxx . . $ SubtitleConverter#convertSubtitles(de2c2ef8ecb8f9e4).(QStringcxx . . $ QString# subtitleFile, |
| 68 | QStringcxx . . $ QString# targetFormatName, |
| 69 | QStringcxx . . $ QString# targetFileName, |
| 70 | std::functioncxx . . $ std/function#<double()> determineFPS, |
| 71 | double fpsRatio, |
| 72 | double delayOffset) const { |
| 73 | EncodingUtilscxx . . $ EncodingUtils# eucxx . . $ EncodingUtils#EncodingUtils(49f6e7a06ebc5aa8).; |
| 74 | QStringcxx . . $ QString# encoding = eucxx . . $ QString#QString(e1217c004a86c950)..detectFileEncodingcxx . . $ EncodingUtils#detectFileEncoding(5555d9024dcf93fb).(subtitleFile); |
| 75 | |
| 76 | QStringListcxx . . $ QStringList# subtitleLines = readFilecxx . . $ SubtitleConverter#readFile(42e916d7bc97fdf0).(subtitleFile, encodingcxx . . $ QString#QString(3520e46b33348bf6).); |
| 77 | |
| 78 | QStringcxx . . $ QString# detectedFormat = detectFormatcxx . . $ QString#QString(e1217c004a86c950).(subtitleLines); |
| 79 | if (detectedFormat.isEmptycxx . . $ QString#isEmpty(50ce9a9e25b4a850).()) return false; |
| 80 | |
| 81 | QSharedPointercxx . . $ QSharedPointer#<const SubtitleFormatcxx . . $ SubtitleFormat#> inputFormat = |
| 82 | subtitleFormatsRegistrycxx . . $ QSharedPointer#QSharedPointer(21100a343a80bccd).->cxx . . $ QSharedPointer#`operator->`(5a2a78a048fb49a8).selectcxx . . $ SubtitleFormatsRegistry#select(849396506c5f6260).(detectedFormat); |
| 83 | QSharedPointercxx . . $ QSharedPointer#<const SubtitleFormatcxx . . $ SubtitleFormat#> targetFormat = |
| 84 | subtitleFormatsRegistrycxx . . $ QSharedPointer#QSharedPointer(21100a343a80bccd).->cxx . . $ QSharedPointer#`operator->`(5a2a78a048fb49a8).selectcxx . . $ SubtitleFormatsRegistry#select(849396506c5f6260).(targetFormatName); |
| 85 | |
| 86 | SubFilecxx . . $ SubFile# sf = inputFormat->cxx . . $ QSharedPointer#`operator->`(5a2a78a048fb49a8).decodecxx . . $ SubtitleFormat#decode(a10217bac3d52496).(subtitleLines); |
| 87 | double frameRate = 0.0; |
| 88 | |
| 89 | if (inputFormat->cxx . . $ QSharedPointer#`operator->`(5a2a78a048fb49a8).isTimeBasedcxx . . $ SubtitleFormat#isTimeBased(50ce9a9e25b4a850).() != targetFormat->cxx . . $ QSharedPointer#`operator->`(5a2a78a048fb49a8).isTimeBasedcxx . . $ SubtitleFormat#isTimeBased(50ce9a9e25b4a850).()) { |
| 90 | frameRate = determineFPS(cxx . . $ std/function#`operator()`(39e0826ffb540481).); |
| 91 | if (frameRate <= 0.0) return false; |
| 92 | |
| 93 | if (targetFormat->cxx . . $ QSharedPointer#`operator->`(5a2a78a048fb49a8).isTimeBasedcxx . . $ SubtitleFormat#isTimeBased(50ce9a9e25b4a850).()) { |
| 94 | // convert frames to timestamps |
| 95 | for (int i = 0; i < sf.entriescxx . . $ SubFile#entries..sizecxx . . $ QVector#size(455f465bc33b4cdf).(); ++i) { |
| 96 | sf.entriescxx . . $ SubFile#entries.[cxx . . $ QVector#`operator[]`(7a0ef1c7079e8533).i].frameStartcxx . . $ SubEntry#frameStart. = |
| 97 | frame2tscxx . . $ SubtitleConverter#frame2ts(18a29100eb3b530f).(sf.entriescxx . . $ SubFile#entries.[cxx . . $ QVector#`operator[]`(7a0ef1c7079e8533).i].frameStartcxx . . $ SubEntry#frameStart., frameRate); |
| 98 | sf.entriescxx . . $ SubFile#entries.[cxx . . $ QVector#`operator[]`(7a0ef1c7079e8533).i].frameStopcxx . . $ SubEntry#frameStop. = frame2tscxx . . $ SubtitleConverter#frame2ts(18a29100eb3b530f).(sf.entriescxx . . $ SubFile#entries.[cxx . . $ QVector#`operator[]`(7a0ef1c7079e8533).i].frameStopcxx . . $ SubEntry#frameStop., frameRate); |
| 99 | } |
| 100 | } else { |
| 101 | // convert timestamps to frames |
| 102 | for (int i = 0; i < sf.entriescxx . . $ SubFile#entries..sizecxx . . $ QVector#size(455f465bc33b4cdf).(); ++i) { |
| 103 | sf.entriescxx . . $ SubFile#entries.[cxx . . $ QVector#`operator[]`(7a0ef1c7079e8533).i].frameStartcxx . . $ SubEntry#frameStart. = |
| 104 | ts2framecxx . . $ SubtitleConverter#ts2frame(18a29100eb3b530f).(sf.entriescxx . . $ SubFile#entries.[cxx . . $ QVector#`operator[]`(7a0ef1c7079e8533).i].frameStartcxx . . $ SubEntry#frameStart., frameRate); |
| 105 | sf.entriescxx . . $ SubFile#entries.[cxx . . $ QVector#`operator[]`(7a0ef1c7079e8533).i].frameStopcxx . . $ SubEntry#frameStop. = ts2framecxx . . $ SubtitleConverter#ts2frame(18a29100eb3b530f).(sf.entriescxx . . $ SubFile#entries.[cxx . . $ QVector#`operator[]`(7a0ef1c7079e8533).i].frameStopcxx . . $ SubEntry#frameStop., frameRate); |
| 106 | } |
| 107 | } |
| 108 | } |
| 109 | |
| 110 | if (fpsRatio != 1.0) { |
| 111 | for (int i = 0; i < sf.entriescxx . . $ SubFile#entries..sizecxx . . $ QVector#size(455f465bc33b4cdf).(); ++i) { |
| 112 | sf.entriescxx . . $ SubFile#entries.[cxx . . $ QVector#`operator[]`(7a0ef1c7079e8533).i].frameStartcxx . . $ SubEntry#frameStart. = |
| 113 | (long)floor(fpsRatio * sf.entriescxx . . $ SubFile#entries.[cxx . . $ QVector#`operator[]`(7a0ef1c7079e8533).i].frameStartcxx . . $ SubEntry#frameStart.); |
| 114 | sf.entriescxx . . $ SubFile#entries.[cxx . . $ QVector#`operator[]`(7a0ef1c7079e8533).i].frameStopcxx . . $ SubEntry#frameStop. = (long)floor(fpsRatio * sf.entriescxx . . $ SubFile#entries.[cxx . . $ QVector#`operator[]`(7a0ef1c7079e8533).i].frameStopcxx . . $ SubEntry#frameStop.); |
| 115 | } |
| 116 | } |
| 117 | |
| 118 | if (delayOffset != 0.0) { |
| 119 | long offset = (long)(delayOffset * 1000.0); |
| 120 | |
| 121 | if (targetFormat->cxx . . $ QSharedPointer#`operator->`(5a2a78a048fb49a8).isTimeBasedcxx . . $ SubtitleFormat#isTimeBased(50ce9a9e25b4a850).()) { |
| 122 | for (int i = 0; i < sf.entriescxx . . $ SubFile#entries..sizecxx . . $ QVector#size(455f465bc33b4cdf).(); ++i) { |
| 123 | sf.entriescxx . . $ SubFile#entries.[cxx . . $ QVector#`operator[]`(7a0ef1c7079e8533).i].frameStartcxx . . $ SubEntry#frameStart. = |
| 124 | std::maxcxx . . $ std/max(2a338fce5842aa6a).(0L, sf.entriescxx . . $ SubFile#entries.[cxx . . $ QVector#`operator[]`(7a0ef1c7079e8533).i].frameStartcxx . . $ SubEntry#frameStart. + offset); |
| 125 | sf.entriescxx . . $ SubFile#entries.[cxx . . $ QVector#`operator[]`(7a0ef1c7079e8533).i].frameStopcxx . . $ SubEntry#frameStop. = |
| 126 | std::maxcxx . . $ std/max(2a338fce5842aa6a).(0L, sf.entriescxx . . $ SubFile#entries.[cxx . . $ QVector#`operator[]`(7a0ef1c7079e8533).i].frameStopcxx . . $ SubEntry#frameStop. + offset); |
| 127 | } |
| 128 | } else { |
| 129 | if (frameRate <= 0.0) frameRate = determineFPS(cxx . . $ std/function#`operator()`(39e0826ffb540481).); |
| 130 | if (frameRate <= 0.0) return false; |
| 131 | |
| 132 | for (int i = 0; i < sf.entriescxx . . $ SubFile#entries..sizecxx . . $ QVector#size(455f465bc33b4cdf).(); ++i) { |
| 133 | sf.entriescxx . . $ SubFile#entries.[cxx . . $ QVector#`operator[]`(7a0ef1c7079e8533).i].frameStartcxx . . $ SubEntry#frameStart. = std::maxcxx . . $ std/max(2a338fce5842aa6a).( |
| 134 | 0L, ts2framecxx . . $ SubtitleConverter#ts2frame(18a29100eb3b530f).(frame2tscxx . . $ SubtitleConverter#frame2ts(18a29100eb3b530f).(sf.entriescxx . . $ SubFile#entries.[cxx . . $ QVector#`operator[]`(7a0ef1c7079e8533).i].frameStartcxx . . $ SubEntry#frameStart., frameRate) + offset, |
| 135 | frameRate)); |
| 136 | sf.entriescxx . . $ SubFile#entries.[cxx . . $ QVector#`operator[]`(7a0ef1c7079e8533).i].frameStopcxx . . $ SubEntry#frameStop. = std::maxcxx . . $ std/max(2a338fce5842aa6a).( |
| 137 | 0L, ts2framecxx . . $ SubtitleConverter#ts2frame(18a29100eb3b530f).(frame2tscxx . . $ SubtitleConverter#frame2ts(18a29100eb3b530f).(sf.entriescxx . . $ SubFile#entries.[cxx . . $ QVector#`operator[]`(7a0ef1c7079e8533).i].frameStopcxx . . $ SubEntry#frameStop., frameRate) + offset, |
| 138 | frameRate)); |
| 139 | } |
| 140 | } |
| 141 | } |
| 142 | |
| 143 | if (!skipConvertAdscxx . . $ SubtitleConverter#skipConvertAds. && !sf.entriescxx . . $ SubFile#entries..isEmptycxx . . $ QVector#isEmpty(50ce9a9e25b4a850).()) { |
| 144 | SubTokencxx . . $ SubToken# stQNapi; |
| 145 | stQNapi.typecxx . . $ SubToken#type. = STT_WORDcxx . . $ STT_WORD.; |
| 146 | stQNapi.payloadcxx . . $ SubToken#payload. =cxx . . $ QString#`operator=`(d02845eef0c33901). "QNapi"; |
| 147 | |
| 148 | if (!sf.entriescxx . . $ SubFile#entries..lastcxx . . $ QVector#last(19b2b6f17af048b).().tokenscxx . . $ SubEntry#tokens..containscxx . . $ QVector#contains(8877ebe272b9620d).(stQNapi)) { |
| 149 | SubEntrycxx . . $ SubEntry# adEntry; |
| 150 | if (targetFormat->cxx . . $ QSharedPointer#`operator->`(5a2a78a048fb49a8).isTimeBasedcxx . . $ SubtitleFormat#isTimeBased(50ce9a9e25b4a850).()) { |
| 151 | adEntry.frameStartcxx . . $ SubEntry#frameStart. = sf.entriescxx . . $ SubFile#entries..backcxx . . $ QVector#back(19b2b6f17af048b).().frameStopcxx . . $ SubEntry#frameStop. + 2000L; |
| 152 | adEntry.frameStopcxx . . $ SubEntry#frameStop. = adEntry.frameStartcxx . . $ SubEntry#frameStart. + 8000L; |
| 153 | } else { |
| 154 | adEntry.frameStartcxx . . $ SubEntry#frameStart. = sf.entriescxx . . $ SubFile#entries..backcxx . . $ QVector#back(19b2b6f17af048b).().frameStopcxx . . $ SubEntry#frameStop. + 50L; |
| 155 | adEntry.frameStopcxx . . $ SubEntry#frameStop. = adEntry.frameStartcxx . . $ SubEntry#frameStart. + 200L; |
| 156 | } |
| 157 | QStringcxx . . $ QString# ad = QObjectcxx . . $ QString#QString(e1217c004a86c950).::trcxx . . $ QObject#tr(75d9f1c324b4579d).("Subtitles downloaded and processed by QNapi|"); |
| 158 | adEntry.tokenscxx . . $ SubEntry#tokens. =cxx . . $ QVector#`operator=`(a1d068f9d22786ee). targetFormat->cxx . . $ QSharedPointer#`operator->`(5a2a78a048fb49a8).decodeTokenStreamcxx . . $ SubtitleFormat#decodeTokenStream(8709a708f98d071b).(adcxx . . $ QString#QString(3520e46b33348bf6).); |
| 159 | SubTokencxx . . $ SubToken# urlToken; |
| 160 | urlToken.typecxx . . $ SubToken#type. = STT_WORDcxx . . $ STT_WORD.; |
| 161 | urlToken.payloadcxx . . $ SubToken#payload. =cxx . . $ QString#`operator=`(7b76e6691bca1027). LibQNapicxx . . $ LibQNapi#::webpageUrlcxx . . $ LibQNapi#webpageUrl(4365c3963150523e).(); |
| 162 | adEntry.tokenscxx . . $ SubEntry#tokens..push_backcxx . . $ QVector#push_back(77d9f17553126ecb).(urlToken); |
| 163 | sf.entriescxx . . $ SubFile#entries..push_backcxx . . $ QVector#push_back(77d9f17553126ecb).(adEntry); |
| 164 | } |
| 165 | } |
| 166 | |
| 167 | QStringListcxx . . $ QStringList# targetLines = targetFormat->cxx . . $ QSharedPointer#`operator->`(5a2a78a048fb49a8).encodecxx . . $ SubtitleFormat#encode(547b88c4cc907c03).(sf); |
| 168 | |
| 169 | return writeFilecxx . . $ SubtitleConverter#writeFile(821ce6828a1cb21a).(targetFileName, encodingcxx . . $ QString#QString(3520e46b33348bf6)., targetLines); |
| 170 | } |
| 171 | |
| 172 | long SubtitleConvertercxx . . $ SubtitleConverter#::ts2framecxx . . $ SubtitleConverter#ts2frame(18a29100eb3b530f).(long ts, double frameRate) const { |
| 173 | return static_cast<long>(floor(frameRate * ts / 1000.0)); |
| 174 | } |
| 175 | |
| 176 | long SubtitleConvertercxx . . $ SubtitleConverter#::frame2tscxx . . $ SubtitleConverter#frame2ts(18a29100eb3b530f).(long frame, double frameRate) const { |
| 177 | return static_cast<long>(floor(1000.0 * frame / frameRate)); |
| 178 | } |
| 179 | |
| 180 | QStringListcxx . . $ QStringList# SubtitleConvertercxx . . $ SubtitleConverter#::readFilecxx . . $ SubtitleConverter#readFile(42e916d7bc97fdf0).(const QStringcxx . . $ QString# &filename, |
| 181 | QStringcxx . . $ QString# encoding, |
| 182 | long atMostLines) const { |
| 183 | QStringListcxx . . $ QStringList# buffcxx . . $ QStringList#QStringList(49f6e7a06ebc5aa8).; |
| 184 | long current = 0; |
| 185 | QFilecxx . . $ QFile# inputFilecxx . . $ QFile#QFile(3520e46b33348bf6).(filename); |
| 186 | if (inputFile.opencxx . . $ QFile#open(dca164408be960c8).(QIODevicecxx . . $ QIODevice#::ReadOnlycxx . . $ QIODevice#ReadOnly. |cxx . . $ `operator|`(e858de6b2553445b). QIODevicecxx . . $ QIODevice#::Textcxx . . $ QIODevice#Text.)) { |
| 187 | QTextStreamcxx . . $ QTextStream# incxx . . $ QTextStream#QTextStream(bebe8f2dee7f9e86).(&inputFile); |
| 188 | in.setCodeccxx . . $ QTextStream#setCodec(85c52e162fed56f9).(qPrintablecxx . . $ `<external>/15045578679651060896/qglobal.h:831:11`!(encoding)); |
| 189 | while (!in.atEndcxx . . $ QTextStream#atEnd(50ce9a9e25b4a850).() && (atMostLines == 0 || current < atMostLines)) { |
| 190 | buff +=cxx . . $ QList#`operator+=`(309d1580d8f5dc58). in.readLinecxx . . $ QTextStream#readLine(20e0a2766677f583).(); |
| 191 | ++current; |
| 192 | } |
| 193 | inputFile.closecxx . . $ QFileDevice#close(49f6e7a06ebc5aa8).(); |
| 194 | } |
| 195 | return buff; |
| 196 | } |
| 197 | |
| 198 | bool SubtitleConvertercxx . . $ SubtitleConverter#::writeFilecxx . . $ SubtitleConverter#writeFile(821ce6828a1cb21a).(const QStringcxx . . $ QString# &filename, QStringcxx . . $ QString# encoding, |
| 199 | const QStringListcxx . . $ QStringList# &lines) const { |
| 200 | QFilecxx . . $ QFile# outputFilecxx . . $ QFile#QFile(3520e46b33348bf6).(filename); |
| 201 | if (outputFile.opencxx . . $ QFile#open(dca164408be960c8).(QIODevicecxx . . $ QIODevice#::WriteOnlycxx . . $ QIODevice#WriteOnly. |cxx . . $ `operator|`(e858de6b2553445b). QIODevicecxx . . $ QIODevice#::Textcxx . . $ QIODevice#Text.)) { |
| 202 | QTextStreamcxx . . $ QTextStream# outcxx . . $ QTextStream#QTextStream(bebe8f2dee7f9e86).(&outputFile); |
| 203 | out.setCodeccxx . . $ QTextStream#setCodec(85c52e162fed56f9).(qPrintablecxx . . $ `<external>/15045578679651060896/qglobal.h:831:11`!(encoding)); |
| 204 | foreachcxx . . $ `<external>/15045578679651060896/qglobal.h:1145:13`! (QString line, lines) { out <<cxx . . $ QTextStream#`operator<<`(f61e69e0d177108f). line <<cxx . . $ QTextStream#`operator<<`(a8e98279dde0dccf). "\n"; } |
| 205 | outputFile.closecxx . . $ QFileDevice#close(49f6e7a06ebc5aa8).(); |
| 206 | return true; |
| 207 | } else { |
| 208 | return false; |
| 209 | } |
| 210 | } |