|
| 1 | +diff --git a/sources/awdebug.cpp b/sources/awdebug.cpp |
| 2 | +index 7135db6..a2870ec 100644 |
| 3 | +--- a/sources/awdebug.cpp |
| 4 | ++++ b/sources/awdebug.cpp |
| 5 | +@@ -67,7 +67,7 @@ QString AWDebug::getAboutText(const QString &_type) |
| 6 | + translator = QString("<li>%1</li>").arg(translator); |
| 7 | + text = i18n("Translators:") + "<ul>" + translatorList.join("") + "</ul>"; |
| 8 | + } else if (_type == "3rdparty") { |
| 9 | +- QStringList trdPartyList = QString(TRDPARTY_LICENSE).split(';', Qt::SkipEmptyParts); |
| 10 | ++ QStringList trdPartyList = QString(TRDPARTY_LICENSE).split(';', QString::SkipEmptyParts); |
| 11 | + for (int i = 0; i < trdPartyList.count(); i++) |
| 12 | + trdPartyList[i] = QString("<li><a href=\"%3\">%1</a> (%2 license)</li>") |
| 13 | + .arg(trdPartyList.at(i).split(',')[0]) |
| 14 | +@@ -75,7 +75,7 @@ QString AWDebug::getAboutText(const QString &_type) |
| 15 | + .arg(trdPartyList.at(i).split(',')[2]); |
| 16 | + text = i18n("This software uses:") + "<ul>" + trdPartyList.join("") + "</ul>"; |
| 17 | + } else if (_type == "thanks") { |
| 18 | +- QStringList thanks = QString(SPECIAL_THANKS).split(';', Qt::SkipEmptyParts); |
| 19 | ++ QStringList thanks = QString(SPECIAL_THANKS).split(';', QString::SkipEmptyParts); |
| 20 | + for (int i = 0; i < thanks.count(); i++) |
| 21 | + thanks[i] = QString("<li><a href=\"%2\">%1</a></li>") |
| 22 | + .arg(thanks.at(i).split(',')[0]) |
| 23 | +diff --git a/sources/awesome-widget/plugin/awabstractpairhelper.cpp b/sources/awesome-widget/plugin/awabstractpairhelper.cpp |
| 24 | +index 55a4e91..f7c2969 100644 |
| 25 | +--- a/sources/awesome-widget/plugin/awabstractpairhelper.cpp |
| 26 | ++++ b/sources/awesome-widget/plugin/awabstractpairhelper.cpp |
| 27 | +@@ -61,7 +61,7 @@ QStringList AWAbstractPairHelper::values() const |
| 28 | + QSet<QString> AWAbstractPairHelper::valuesSet() const |
| 29 | + { |
| 30 | + auto values = m_pairs.values(); |
| 31 | +- return QSet(values.cbegin(), values.cend()); |
| 32 | ++ return QSet<QString>::fromList(values); |
| 33 | + } |
| 34 | + |
| 35 | + |
| 36 | +@@ -138,4 +138,4 @@ bool AWAbstractPairHelper::removeUnusedKeys(const QStringList &_keys) const |
| 37 | + settings.sync(); |
| 38 | + |
| 39 | + return (settings.status() == QSettings::NoError); |
| 40 | +-} |
| 41 | +\ No newline at end of file |
| 42 | ++} |
| 43 | +diff --git a/sources/awesome-widget/plugin/awkeycache.cpp b/sources/awesome-widget/plugin/awkeycache.cpp |
| 44 | +index 15aab94..54b47b3 100644 |
| 45 | +--- a/sources/awesome-widget/plugin/awkeycache.cpp |
| 46 | ++++ b/sources/awesome-widget/plugin/awkeycache.cpp |
| 47 | +@@ -83,9 +83,9 @@ QStringList AWKeyCache::getRequiredKeys(const QStringList &_keys, const QStringL |
| 48 | + << _tooltip; |
| 49 | + |
| 50 | + // initial copy |
| 51 | +- QSet<QString> used(_keys.cbegin(), _keys.cend()); |
| 52 | +- used.unite(QSet(_bars.cbegin(), _bars.cend())); |
| 53 | +- used.unite(QSet(_userKeys.cbegin(), _userKeys.cend())); |
| 54 | ++ auto used = QSet<QString>::fromList(_keys); |
| 55 | ++ used.unite(QSet<QString>::fromList(_bars)); |
| 56 | ++ used.unite(QSet<QString>::fromList(_userKeys)); |
| 57 | + // insert keys from tooltip |
| 58 | + for (auto &key : _tooltip.keys()) { |
| 59 | + if ((key.endsWith("Tooltip")) && (_tooltip[key].toBool())) { |
| 60 | +diff --git a/sources/awesomewidgets/awjsonformatter.cpp b/sources/awesomewidgets/awjsonformatter.cpp |
| 61 | +index bbdd7ce..8a1c5e0 100644 |
| 62 | +--- a/sources/awesomewidgets/awjsonformatter.cpp |
| 63 | ++++ b/sources/awesomewidgets/awjsonformatter.cpp |
| 64 | +@@ -178,7 +178,7 @@ QVariant AWJsonFormatter::getFromMap(const QVariant &_value, const QString &_key |
| 65 | + void AWJsonFormatter::initPath() |
| 66 | + { |
| 67 | + m_splittedPath.clear(); |
| 68 | +- QStringList splittedByDot = m_path.split('.', Qt::SkipEmptyParts); |
| 69 | ++ QStringList splittedByDot = m_path.split('.', QString::SkipEmptyParts); |
| 70 | + |
| 71 | + for (auto &element : splittedByDot) { |
| 72 | + bool ok; |
| 73 | +diff --git a/sources/awesomewidgets/extscript.cpp b/sources/awesomewidgets/extscript.cpp |
| 74 | +index 3017dac..da009f9 100644 |
| 75 | +--- a/sources/awesomewidgets/extscript.cpp |
| 76 | ++++ b/sources/awesomewidgets/extscript.cpp |
| 77 | +@@ -218,7 +218,7 @@ void ExtScript::readConfiguration() |
| 78 | + setExecutable(settings.value("Exec", executable()).toString()); |
| 79 | + setStrRedirect(settings.value("X-AW-Redirect", strRedirect()).toString()); |
| 80 | + // api == 3 |
| 81 | +- setFilters(settings.value("X-AW-Filters", filters()).toString().split(',', Qt::SkipEmptyParts)); |
| 82 | ++ setFilters(settings.value("X-AW-Filters", filters()).toString().split(',', QString::SkipEmptyParts)); |
| 83 | + settings.endGroup(); |
| 84 | + |
| 85 | + bumpApi(AW_EXTSCRIPT_API); |
| 86 | +diff --git a/sources/awesomewidgets/extupgrade.cpp b/sources/awesomewidgets/extupgrade.cpp |
| 87 | +index 0195779..0081cc9 100644 |
| 88 | +--- a/sources/awesomewidgets/extupgrade.cpp |
| 89 | ++++ b/sources/awesomewidgets/extupgrade.cpp |
| 90 | +@@ -219,8 +219,8 @@ void ExtUpgrade::updateValue() |
| 91 | + = QTextCodec::codecForMib(106)->toUnicode(m_process->readAllStandardOutput()).trimmed(); |
| 92 | + m_values[tag("pkgcount")] = [this](const QString &output) { |
| 93 | + return filter().isEmpty() |
| 94 | +- ? output.split('\n', Qt::SkipEmptyParts).count() - null() |
| 95 | +- : output.split('\n', Qt::SkipEmptyParts).filter(QRegExp(filter())).count(); |
| 96 | ++ ? output.split('\n', QString::SkipEmptyParts).count() - null() |
| 97 | ++ : output.split('\n', QString::SkipEmptyParts).filter(QRegExp(filter())).count(); |
| 98 | + }(qoutput); |
| 99 | + |
| 100 | + emit(dataReceived(m_values)); |
| 101 | +diff --git a/sources/awesomewidgets/qcronscheduler.cpp b/sources/awesomewidgets/qcronscheduler.cpp |
| 102 | +index 6f67590..c72abc9 100644 |
| 103 | +--- a/sources/awesomewidgets/qcronscheduler.cpp |
| 104 | ++++ b/sources/awesomewidgets/qcronscheduler.cpp |
| 105 | +@@ -87,7 +87,7 @@ QList<int> QCronScheduler::parseField(const QString &_value, const int _min, con |
| 106 | + parsedField.fromRange(field.split('/').first(), _min, _max); |
| 107 | + if (field.contains('/')) { |
| 108 | + bool status; |
| 109 | +- parsedField.div = field.split('/', Qt::SkipEmptyParts).at(1).toInt(&status); |
| 110 | ++ parsedField.div = field.split('/', QString::SkipEmptyParts).at(1).toInt(&status); |
| 111 | + if (!status) |
| 112 | + parsedField.div = 1; |
| 113 | + } |
| 114 | +@@ -107,7 +107,7 @@ void QCronScheduler::QCronField::fromRange(const QString &_range, const int _min |
| 115 | + minValue = _min; |
| 116 | + maxValue = _max; |
| 117 | + } else if (_range.contains("-")) { |
| 118 | +- auto interval = _range.split('-', Qt::SkipEmptyParts); |
| 119 | ++ auto interval = _range.split('-', QString::SkipEmptyParts); |
| 120 | + if (interval.count() != 2) |
| 121 | + return; |
| 122 | + bool status; |
| 123 | +diff --git a/sources/extsysmon/extsysmon.cpp b/sources/extsysmon/extsysmon.cpp |
| 124 | +index 88b6e39..5bdc7f3 100644 |
| 125 | +--- a/sources/extsysmon/extsysmon.cpp |
| 126 | ++++ b/sources/extsysmon/extsysmon.cpp |
| 127 | +@@ -126,7 +126,7 @@ QHash<QString, QString> ExtendedSysMon::updateConfiguration(QHash<QString, QStri |
| 128 | + } else if (_rawConfig["HDDDEV"] == "disable") { |
| 129 | + _rawConfig["HDDDEV"] = ""; |
| 130 | + } else { |
| 131 | +- QStringList deviceList = _rawConfig["HDDDEV"].split(',', Qt::SkipEmptyParts); |
| 132 | ++ QStringList deviceList = _rawConfig["HDDDEV"].split(',', QString::SkipEmptyParts); |
| 133 | + QStringList devices; |
| 134 | + QRegExp diskRegexp = QRegExp("^/dev/[hms]d[a-z]$"); |
| 135 | + for (auto &device : deviceList) |
| 136 | +diff --git a/sources/extsysmonsources/gpuloadsource.cpp b/sources/extsysmonsources/gpuloadsource.cpp |
| 137 | +index 6281637..e81be26 100644 |
| 138 | +--- a/sources/extsysmonsources/gpuloadsource.cpp |
| 139 | ++++ b/sources/extsysmonsources/gpuloadsource.cpp |
| 140 | +@@ -132,7 +132,7 @@ void GPULoadSource::updateValue() |
| 141 | + qCInfo(LOG_ESS) << "Output" << qoutput; |
| 142 | + |
| 143 | + if (m_device == "nvidia") { |
| 144 | +- for (auto &str : qoutput.split('\n', Qt::SkipEmptyParts)) { |
| 145 | ++ for (auto &str : qoutput.split('\n', QString::SkipEmptyParts)) { |
| 146 | + if (!str.contains("<gpu_util>")) |
| 147 | + continue; |
| 148 | + auto load = str.remove("<gpu_util>").remove("</gpu_util>").remove('%'); |
| 149 | +@@ -140,10 +140,10 @@ void GPULoadSource::updateValue() |
| 150 | + break; |
| 151 | + } |
| 152 | + } else if (m_device == "ati") { |
| 153 | +- for (auto &str : qoutput.split('\n', Qt::SkipEmptyParts)) { |
| 154 | ++ for (auto &str : qoutput.split('\n', QString::SkipEmptyParts)) { |
| 155 | + if (!str.contains("load")) |
| 156 | + continue; |
| 157 | +- QString load = str.split(' ', Qt::SkipEmptyParts)[3].remove('%'); |
| 158 | ++ QString load = str.split(' ', QString::SkipEmptyParts)[3].remove('%'); |
| 159 | + m_values["gpu/load"] = load.toFloat(); |
| 160 | + break; |
| 161 | + } |
| 162 | +diff --git a/sources/extsysmonsources/gputempsource.cpp b/sources/extsysmonsources/gputempsource.cpp |
| 163 | +index 55fbadc..dce0c6e 100644 |
| 164 | +--- a/sources/extsysmonsources/gputempsource.cpp |
| 165 | ++++ b/sources/extsysmonsources/gputempsource.cpp |
| 166 | +@@ -112,7 +112,7 @@ void GPUTemperatureSource::updateValue() |
| 167 | + qCInfo(LOG_ESS) << "Output" << qoutput; |
| 168 | + |
| 169 | + if (m_device == "nvidia") { |
| 170 | +- for (auto &str : qoutput.split('\n', Qt::SkipEmptyParts)) { |
| 171 | ++ for (auto &str : qoutput.split('\n', QString::SkipEmptyParts)) { |
| 172 | + if (!str.contains("<gpu_temp>")) |
| 173 | + continue; |
| 174 | + QString temp = str.remove("<gpu_temp>").remove("C</gpu_temp>"); |
| 175 | +@@ -120,10 +120,10 @@ void GPUTemperatureSource::updateValue() |
| 176 | + break; |
| 177 | + } |
| 178 | + } else if (m_device == "ati") { |
| 179 | +- for (auto &str : qoutput.split('\n', Qt::SkipEmptyParts)) { |
| 180 | ++ for (auto &str : qoutput.split('\n', QString::SkipEmptyParts)) { |
| 181 | + if (!str.contains("Temperature")) |
| 182 | + continue; |
| 183 | +- QString temp = str.split(' ', Qt::SkipEmptyParts).at(4); |
| 184 | ++ QString temp = str.split(' ', QString::SkipEmptyParts).at(4); |
| 185 | + m_values["gpu/temperature"] = temp.toFloat(); |
| 186 | + break; |
| 187 | + } |
| 188 | +diff --git a/sources/extsysmonsources/hddtempsource.cpp b/sources/extsysmonsources/hddtempsource.cpp |
| 189 | +index efaae08..dad47a3 100644 |
| 190 | +--- a/sources/extsysmonsources/hddtempsource.cpp |
| 191 | ++++ b/sources/extsysmonsources/hddtempsource.cpp |
| 192 | +@@ -31,7 +31,7 @@ HDDTemperatureSource::HDDTemperatureSource(QObject *_parent, const QStringList & |
| 193 | + Q_ASSERT(_args.count() == 2); |
| 194 | + qCDebug(LOG_ESS) << __PRETTY_FUNCTION__; |
| 195 | + |
| 196 | +- m_devices = _args.at(0).split(',', Qt::SkipEmptyParts); |
| 197 | ++ m_devices = _args.at(0).split(',', QString::SkipEmptyParts); |
| 198 | + m_cmd = _args.at(1).split(' '); // lets hope no one put cmd with spaces here lol |
| 199 | + |
| 200 | + m_smartctl = m_cmd.contains("smartctl"); |
| 201 | +@@ -131,17 +131,17 @@ void HDDTemperatureSource::updateValue(const QString &_device) |
| 202 | + |
| 203 | + // parse |
| 204 | + if (m_smartctl) { |
| 205 | +- QStringList lines = qoutput.split('\n', Qt::SkipEmptyParts); |
| 206 | ++ QStringList lines = qoutput.split('\n', QString::SkipEmptyParts); |
| 207 | + for (auto &str : lines) { |
| 208 | + if (!str.startsWith("194")) |
| 209 | + continue; |
| 210 | +- if (str.split(' ', Qt::SkipEmptyParts).count() < 9) |
| 211 | ++ if (str.split(' ', QString::SkipEmptyParts).count() < 9) |
| 212 | + continue; |
| 213 | +- m_values[_device] = str.split(' ', Qt::SkipEmptyParts).at(9).toFloat(); |
| 214 | ++ m_values[_device] = str.split(' ', QString::SkipEmptyParts).at(9).toFloat(); |
| 215 | + break; |
| 216 | + } |
| 217 | + } else { |
| 218 | +- QStringList lines = qoutput.split(':', Qt::SkipEmptyParts); |
| 219 | ++ QStringList lines = qoutput.split(':', QString::SkipEmptyParts); |
| 220 | + if (lines.count() >= 3) { |
| 221 | + QString temp = lines.at(2); |
| 222 | + temp.remove(QChar(0260)).remove('C'); |
| 223 | +diff --git a/sources/extsysmonsources/playersource.cpp b/sources/extsysmonsources/playersource.cpp |
| 224 | +index aaca22f..e127a05 100644 |
| 225 | +--- a/sources/extsysmonsources/playersource.cpp |
| 226 | ++++ b/sources/extsysmonsources/playersource.cpp |
| 227 | +@@ -256,11 +256,11 @@ void PlayerSource::mpdSocketReadyRead() |
| 228 | + qCInfo(LOG_ESS) << "Output" << qoutput; |
| 229 | + |
| 230 | + // parse |
| 231 | +- for (auto &str : qoutput.split('\n', Qt::SkipEmptyParts)) { |
| 232 | +- if (str.split(": ", Qt::SkipEmptyParts).count() == 2) { |
| 233 | ++ for (auto &str : qoutput.split('\n', QString::SkipEmptyParts)) { |
| 234 | ++ if (str.split(": ", QString::SkipEmptyParts).count() == 2) { |
| 235 | + // "Metadata: data" |
| 236 | +- QString metadata = str.split(": ", Qt::SkipEmptyParts).first().toLower(); |
| 237 | +- QString data = str.split(": ", Qt::SkipEmptyParts).last().trimmed(); |
| 238 | ++ QString metadata = str.split(": ", QString::SkipEmptyParts).first().toLower(); |
| 239 | ++ QString data = str.split(": ", QString::SkipEmptyParts).last().trimmed(); |
| 240 | + // there are one more time... |
| 241 | + if ((metadata == "time") && (data.contains(':'))) { |
| 242 | + QStringList times = data.split(':'); |
| 243 | +diff --git a/sources/test/testawtelemetryhandler.cpp b/sources/test/testawtelemetryhandler.cpp |
| 244 | +index ffb0e79..b4181e0 100644 |
| 245 | +--- a/sources/test/testawtelemetryhandler.cpp |
| 246 | ++++ b/sources/test/testawtelemetryhandler.cpp |
| 247 | +@@ -51,7 +51,7 @@ void TestAWTelemetryHandler::test_get() |
| 248 | + QStringList output = plugin->get(telemetryGroup); |
| 249 | + |
| 250 | + QVERIFY(!output.isEmpty()); |
| 251 | +- QCOMPARE(QSet<QString>(output.cbegin(), output.cend()).count(), output.count()); |
| 252 | ++ QCOMPARE(QSet<QString>::fromList(output).count(), output.count()); |
| 253 | + QVERIFY(output.contains(telemetryData)); |
| 254 | + } |
| 255 | + |
0 commit comments