refactor: add explicit this-> where possible
I have knowingly skipped some files/portions of files where this would create merge conflicts for other open PRs.
This commit is contained in:
@@ -132,7 +132,7 @@ using namespace std::string_literals;
|
||||
CrashHandler::CrashHandler(const Paths &paths_)
|
||||
: paths(paths_)
|
||||
{
|
||||
auto optSettings = readRecoverySettings(paths);
|
||||
auto optSettings = readRecoverySettings(this->paths);
|
||||
if (optSettings)
|
||||
{
|
||||
this->shouldRecover_ = *optSettings;
|
||||
|
||||
@@ -117,12 +117,12 @@ void Settings::mute(const QString &channelName)
|
||||
|
||||
void Settings::unmute(const QString &channelName)
|
||||
{
|
||||
for (std::vector<int>::size_type i = 0; i != mutedChannels.raw().size();
|
||||
i++)
|
||||
for (std::vector<int>::size_type i = 0;
|
||||
i != this->mutedChannels.raw().size(); i++)
|
||||
{
|
||||
if (mutedChannels.raw()[i].toLower() == channelName.toLower())
|
||||
if (this->mutedChannels.raw()[i].toLower() == channelName.toLower())
|
||||
{
|
||||
mutedChannels.removeAt(i);
|
||||
this->mutedChannels.removeAt(i);
|
||||
i--;
|
||||
}
|
||||
}
|
||||
@@ -132,7 +132,7 @@ bool Settings::toggleMutedChannel(const QString &channelName)
|
||||
{
|
||||
if (this->isMutedChannel(channelName))
|
||||
{
|
||||
unmute(channelName);
|
||||
this->unmute(channelName);
|
||||
return false;
|
||||
}
|
||||
else
|
||||
|
||||
@@ -462,7 +462,7 @@ AvatarDownloader::AvatarDownloader(const QString &avatarURL,
|
||||
{
|
||||
this->file_.close();
|
||||
}
|
||||
downloadComplete();
|
||||
this->downloadComplete();
|
||||
this->deleteLater();
|
||||
});
|
||||
}
|
||||
|
||||
@@ -104,12 +104,12 @@ void Updates::deleteOldFiles()
|
||||
|
||||
const QString &Updates::getCurrentVersion() const
|
||||
{
|
||||
return currentVersion_;
|
||||
return this->currentVersion_;
|
||||
}
|
||||
|
||||
const QString &Updates::getOnlineVersion() const
|
||||
{
|
||||
return onlineVersion_;
|
||||
return this->onlineVersion_;
|
||||
}
|
||||
|
||||
void Updates::installUpdates()
|
||||
|
||||
@@ -806,7 +806,7 @@ void WindowManager::closeAll()
|
||||
qCDebug(chatterinoWindowmanager) << "Shutting down (closing windows)";
|
||||
this->shuttingDown_ = true;
|
||||
|
||||
for (Window *window : windows_)
|
||||
for (Window *window : this->windows_)
|
||||
{
|
||||
closeWindowsRecursive(window);
|
||||
}
|
||||
|
||||
@@ -64,27 +64,28 @@ LoggingChannel::LoggingChannel(QString _channelName, QString _platform)
|
||||
{
|
||||
this->subDirectory = "Whispers";
|
||||
}
|
||||
else if (channelName.startsWith("/mentions"))
|
||||
else if (this->channelName.startsWith("/mentions"))
|
||||
{
|
||||
this->subDirectory = "Mentions";
|
||||
}
|
||||
else if (channelName.startsWith("/live"))
|
||||
else if (this->channelName.startsWith("/live"))
|
||||
{
|
||||
this->subDirectory = "Live";
|
||||
}
|
||||
else if (channelName.startsWith("/automod"))
|
||||
else if (this->channelName.startsWith("/automod"))
|
||||
{
|
||||
this->subDirectory = "AutoMod";
|
||||
}
|
||||
else
|
||||
{
|
||||
this->subDirectory =
|
||||
QStringLiteral("Channels") + QDir::separator() + channelName;
|
||||
QStringLiteral("Channels") + QDir::separator() + this->channelName;
|
||||
}
|
||||
|
||||
// enforce capitalized platform names
|
||||
this->subDirectory = platform[0].toUpper() + platform.mid(1).toLower() +
|
||||
QDir::separator() + this->subDirectory;
|
||||
this->subDirectory = this->platform[0].toUpper() +
|
||||
this->platform.mid(1).toLower() + QDir::separator() +
|
||||
this->subDirectory;
|
||||
|
||||
getSettings()->logPath.connect([this](const QString &logPath, auto) {
|
||||
this->baseDirectory = logPath.isEmpty()
|
||||
@@ -196,8 +197,8 @@ void LoggingChannel::addMessage(const MessagePtr &message,
|
||||
}
|
||||
|
||||
QString str;
|
||||
if (channelName.startsWith("/mentions") ||
|
||||
channelName.startsWith("/automod"))
|
||||
if (this->channelName.startsWith("/mentions") ||
|
||||
this->channelName.startsWith("/automod"))
|
||||
{
|
||||
str.append("#" + message->channelName + " ");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user