Renamed variables to clear some warnings.
This commit is contained in:
@@ -31,12 +31,12 @@ int AccountModel::beforeInsert(const std::shared_ptr<Account> &item,
|
||||
{
|
||||
if (this->categoryCount_[item->getCategory()]++ == 0)
|
||||
{
|
||||
auto row = this->createRow();
|
||||
auto newRow = this->createRow();
|
||||
|
||||
setStringItem(row[0], item->getCategory(), false, false);
|
||||
row[0]->setData(QFont("Segoe UI Light", 16), Qt::FontRole);
|
||||
setStringItem(newRow[0], item->getCategory(), false, false);
|
||||
newRow[0]->setData(QFont("Segoe UI Light", 16), Qt::FontRole);
|
||||
|
||||
this->insertCustomRow(std::move(row), proposedIndex);
|
||||
this->insertCustomRow(std::move(newRow), proposedIndex);
|
||||
|
||||
return proposedIndex + 1;
|
||||
}
|
||||
|
||||
@@ -463,11 +463,13 @@ QString CommandController::execCommand(const QString &textNoEmoji,
|
||||
}
|
||||
}
|
||||
|
||||
// check if custom command exists
|
||||
auto it = this->commandsMap_.find(commandName);
|
||||
if (it != this->commandsMap_.end())
|
||||
{
|
||||
return this->execCustomCommand(words, it.value(), dryRun);
|
||||
// check if custom command exists
|
||||
const auto it = this->commandsMap_.find(commandName);
|
||||
if (it != this->commandsMap_.end())
|
||||
{
|
||||
return this->execCustomCommand(words, it.value(), dryRun);
|
||||
}
|
||||
}
|
||||
|
||||
auto maxSpaces = std::min(this->maxSpaces_, words.length() - 1);
|
||||
@@ -475,7 +477,7 @@ QString CommandController::execCommand(const QString &textNoEmoji,
|
||||
{
|
||||
commandName += ' ' + words[i + 1];
|
||||
|
||||
auto it = this->commandsMap_.find(commandName);
|
||||
const auto it = this->commandsMap_.find(commandName);
|
||||
if (it != this->commandsMap_.end())
|
||||
{
|
||||
return this->execCustomCommand(words, it.value(), dryRun);
|
||||
|
||||
@@ -103,16 +103,10 @@ void NotificationController::playSound()
|
||||
static auto player = new QMediaPlayer;
|
||||
static QUrl currentPlayerUrl;
|
||||
|
||||
QUrl highlightSoundUrl;
|
||||
if (getSettings()->notificationCustomSound)
|
||||
{
|
||||
highlightSoundUrl = QUrl::fromLocalFile(
|
||||
getSettings()->notificationPathSound.getValue());
|
||||
}
|
||||
else
|
||||
{
|
||||
highlightSoundUrl = QUrl("qrc:/sounds/ping2.wav");
|
||||
}
|
||||
QUrl highlightSoundUrl = getSettings()->notificationCustomSound
|
||||
? QUrl::fromLocalFile(getSettings()->notificationPathSound.getValue())
|
||||
: QUrl("qrc:/sounds/ping2.wav");
|
||||
|
||||
if (currentPlayerUrl != highlightSoundUrl)
|
||||
{
|
||||
player->setMedia(highlightSoundUrl);
|
||||
|
||||
Reference in New Issue
Block a user