Fix typos

This commit is contained in:
Chocobo1
2023-06-25 15:45:18 +08:00
parent 88bd4f270f
commit 6680fdda18
71 changed files with 164 additions and 164 deletions

View File

@@ -45,7 +45,7 @@ namespace
bool NativeSessionExtension::isSessionListening() const
{
const QReadLocker locker {&m_lock};
return m_isSesssionListening;
return m_isSessionListening;
}
void NativeSessionExtension::added(const lt::session_handle &nativeSession)
@@ -81,5 +81,5 @@ void NativeSessionExtension::on_alert(const lt::alert *alert)
void NativeSessionExtension::handleSessionStatsAlert([[maybe_unused]] const lt::session_stats_alert *alert)
{
const QWriteLocker locker {&m_lock};
m_isSesssionListening = m_nativeSession.is_listening();
m_isSessionListening = m_nativeSession.is_listening();
}

View File

@@ -52,5 +52,5 @@ private:
lt::session_handle m_nativeSession;
mutable QReadWriteLock m_lock;
bool m_isSesssionListening = false;
bool m_isSessionListening = false;
};

View File

@@ -99,7 +99,7 @@ void Private::FileSystemPathValidator::setCheckWritePermission(const bool value)
Private::FileSystemPathValidator::TestResult
Private::FileSystemPathValidator::testPath(const Path &path) const
{
// `QFileInfo` will cache the query results and avoid exessive querying to filesystem
// `QFileInfo` will cache the query results and avoid excessive querying to filesystem
const QFileInfo info {path.data()};
if (!info.exists())

View File

@@ -173,7 +173,7 @@ OptionsDialog::OptionsDialog(IGUIApplication *app, QWidget *parent)
m_applyButton->setEnabled(false);
connect(m_applyButton, &QPushButton::clicked, this, &OptionsDialog::applySettings);
// disable mouse wheel event on widgets to avoid mis-selection
// disable mouse wheel event on widgets to avoid misselection
auto *wheelEventEater = new WheelEventEater(this);
for (QComboBox *widget : asConst(findChildren<QComboBox *>()))
widget->installEventFilter(wheelEventEater);

View File

@@ -45,7 +45,7 @@ namespace
// table of supposed nice steps for grid marks to get nice looking quarters of scale
const double roundingTable[] = {1.2, 1.6, 2, 2.4, 2.8, 3.2, 4, 6, 8};
struct SplittedValue
struct SplitValue
{
double arg;
Utils::Misc::SizeUnit unit;
@@ -55,7 +55,7 @@ namespace
}
};
SplittedValue getRoundedYScale(double value)
SplitValue getRoundedYScale(double value)
{
using Utils::Misc::SizeUnit;
@@ -289,7 +289,7 @@ void SpeedPlotView::paintEvent(QPaintEvent *)
QFontMetrics fontMetrics = painter.fontMetrics();
rect.adjust(4, 4, 0, -4); // Add padding
const SplittedValue niceScale = getRoundedYScale(maxYValue());
const SplitValue niceScale = getRoundedYScale(maxYValue());
rect.adjust(0, fontMetrics.height(), 0, 0); // Add top padding for top speed text
// draw Y axis speed labels

View File

@@ -103,9 +103,9 @@
fileRenamer.useRegex = multirename_useRegex === 'true';
$('use_regex_search').checked = fileRenamer.useRegex;
var multirename_matchAllOccurences = LocalPreferences.get('multirename_matchAllOccurences', false);
fileRenamer.matchAllOccurences = multirename_matchAllOccurences === 'true';
$('match_all_occurences').checked = fileRenamer.matchAllOccurences;
var multirename_matchAllOccurrences = LocalPreferences.get('multirename_matchAllOccurrences', false);
fileRenamer.matchAllOccurrences = multirename_matchAllOccurrences === 'true';
$('match_all_occurrences').checked = fileRenamer.matchAllOccurrences;
var multirename_caseSensitive = LocalPreferences.get('multirename_caseSensitive', false);
fileRenamer.caseSensitive = multirename_caseSensitive === 'true';
@@ -138,7 +138,7 @@
$('renameButton').set('value', renameButtonValue);
}
// Fires everytime a row's selection changes
// Fires every time a row's selection changes
bulkRenameFilesTable.onRowSelectionChange = function(row) {
fileRenamer.selectedFiles = bulkRenameFilesTable.getSelectedRows();
fileRenamer.update();
@@ -159,9 +159,9 @@
LocalPreferences.set('multirename_useRegex', e.target.checked);
fileRenamer.update();
});
$('match_all_occurences').addEvent('change', function(e) {
fileRenamer.matchAllOccurences = e.target.checked;
LocalPreferences.set('multirename_matchAllOccurences', e.target.checked);
$('match_all_occurrences').addEvent('change', function(e) {
fileRenamer.matchAllOccurrences = e.target.checked;
LocalPreferences.set('multirename_matchAllOccurrences', e.target.checked);
fileRenamer.update();
});
$('case_sensitive').addEvent('change', function(e) {
@@ -232,7 +232,7 @@
// Disable Search Options
$('multiRenameSearch').disabled = true;
$('use_regex_search').disabled = true;
$('match_all_occurences').disabled = true;
$('match_all_occurrences').disabled = true;
$('case_sensitive').disabled = true;
// Disable Replace Options
$('multiRenameReplace').disabled = true;
@@ -251,7 +251,7 @@
// Disable Search Options
$('multiRenameSearch').disabled = false;
$('use_regex_search').disabled = false;
$('match_all_occurences').disabled = false;
$('match_all_occurrences').disabled = false;
$('case_sensitive').disabled = false;
// Disable Replace Options
$('multiRenameReplace').disabled = false;
@@ -427,8 +427,8 @@
<label for="use_regex_search">QBT_TR(Use regular expressions)QBT_TR[CONTEXT=PropertiesWidget]</label>
</div>
<div class="formRow">
<input type="checkbox" id="match_all_occurences" />
<label for="match_all_occurences">QBT_TR(Match all occurrences)QBT_TR[CONTEXT=PropertiesWidget]</label>
<input type="checkbox" id="match_all_occurrences" />
<label for="match_all_occurrences">QBT_TR(Match all occurrences)QBT_TR[CONTEXT=PropertiesWidget]</label>
</div>
<div class="formRow">
<input type="checkbox" id="case_sensitive" />

View File

@@ -1135,9 +1135,9 @@ window.qBittorrent.DynamicTable = (function() {
// progress
this.columns['progress'].updateTd = function(td, row) {
const progress = this.getRowValue(row);
let progressFormated = (progress * 100).round(1);
if (progressFormated == 100.0 && progress != 1.0)
progressFormated = 99.9;
let progressFormatted = (progress * 100).round(1);
if (progressFormatted == 100.0 && progress != 1.0)
progressFormatted = 99.9;
if (td.getChildren('div').length > 0) {
const div = td.getChildren('div')[0];
@@ -1145,13 +1145,13 @@ window.qBittorrent.DynamicTable = (function() {
td.resized = false;
div.setWidth(ProgressColumnWidth - 5);
}
if (div.getValue() != progressFormated)
div.setValue(progressFormated);
if (div.getValue() != progressFormatted)
div.setValue(progressFormatted);
}
else {
if (ProgressColumnWidth < 0)
ProgressColumnWidth = td.offsetWidth;
td.adopt(new window.qBittorrent.ProgressBar.ProgressBar(progressFormated.toFloat(), {
td.adopt(new window.qBittorrent.ProgressBar.ProgressBar(progressFormatted.toFloat(), {
'width': ProgressColumnWidth - 5
}));
td.resized = false;
@@ -1592,12 +1592,12 @@ window.qBittorrent.DynamicTable = (function() {
// progress
this.columns['progress'].updateTd = function(td, row) {
const progress = this.getRowValue(row);
let progressFormated = (progress * 100).round(1);
if (progressFormated == 100.0 && progress != 1.0)
progressFormated = 99.9;
progressFormated += "%";
td.set('text', progressFormated);
td.set('title', progressFormated);
let progressFormatted = (progress * 100).round(1);
if (progressFormatted == 100.0 && progress != 1.0)
progressFormatted = 99.9;
progressFormatted += "%";
td.set('text', progressFormatted);
td.set('title', progressFormatted);
};
// dl_speed, up_speed
@@ -3064,7 +3064,7 @@ window.qBittorrent.DynamicTable = (function() {
filterText: '',
filterdLength: function() {
filteredLength: function() {
return this.tableBody.getElements('tr').length;
},

View File

@@ -31,7 +31,7 @@ window.qBittorrent.MultiRename = (function() {
this.onChanged(this.matchedFiles);
},
useRegex: false,
matchAllOccurences: false,
matchAllOccurrences: false,
caseSensitive: false,
// Replacement Options
@@ -129,7 +129,7 @@ window.qBittorrent.MultiRename = (function() {
// Setup regex flags
let regexFlags = "";
if (this.matchAllOccurences) { regexFlags += "g"; }
if (this.matchAllOccurrences) { regexFlags += "g"; }
if (!this.caseSensitive) { regexFlags += "i"; }
// Setup regex search

View File

@@ -184,7 +184,7 @@
let customSyncLogDataInterval = null;
let logFilterTimer;
let inputedFilterText = "";
let inputtedFilterText = "";
let selectBox;
let selectedLogLevels = JSON.parse(LocalPreferences.get('qbt_selected_log_levels')) || ['1', '2', '4', '8'];
@@ -220,7 +220,7 @@
tableInfo[currentSelectedTab].instance.removeRow(rowId);
});
updateLableCount();
updateLabelCount();
}
},
offsets: {
@@ -264,7 +264,7 @@
};
const getFilterText = () => {
return inputedFilterText;
return inputtedFilterText;
};
const getSelectedLevels = () => {
@@ -288,8 +288,8 @@
const filterTextChanged = () => {
const value = $('filterTextInput').get('value').trim();
if (inputedFilterText !== value) {
inputedFilterText = value;
if (inputtedFilterText !== value) {
inputtedFilterText = value;
logFilterChanged();
}
};
@@ -298,7 +298,7 @@
clearTimeout(logFilterTimer);
logFilterTimer = setTimeout((curTab) => {
tableInfo[curTab].instance.updateTable(false);
updateLableCount(curTab);
updateLabelCount(curTab);
}, 400, currentSelectedTab);
};
@@ -326,14 +326,14 @@
if (tableInfo[currentSelectedTab].instance.filterText !== getFilterText()) {
tableInfo[currentSelectedTab].instance.updateTable();
}
updateLableCount();
updateLabelCount();
};
const updateLableCount = (curTab) => {
const updateLabelCount = (curTab) => {
if (curTab === undefined)
curTab = currentSelectedTab;
$('numFilteredLogs').set('text', tableInfo[curTab].instance.filterdLength());
$('numFilteredLogs').set('text', tableInfo[curTab].instance.filteredLength());
$('numTotalLogs').set('text', tableInfo[curTab].instance.getRowIds().length);
};
@@ -402,7 +402,7 @@
tableInfo[curTab].instance.updateTable();
tableInfo[curTab].instance.altRow();
updateLableCount(curTab);
updateLabelCount(curTab);
}
tableInfo[curTab].progress = false;