mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-13 19:49:51 +01:00
Removed unused local vars. Slightly refactored code.
This commit is contained in:
parent
2d21bb0695
commit
efec76df5b
|
@ -188,7 +188,7 @@ public:
|
|||
assert(row >= 0 && row < this->rows_.size() && column >= 0 &&
|
||||
column < this->columnCount_);
|
||||
|
||||
return this->rows_[index.row()].items[index.column()]->flags();
|
||||
return this->rows_[row].items[column]->flags();
|
||||
}
|
||||
|
||||
QStandardItem *getItem(int row, int column)
|
||||
|
|
|
@ -291,7 +291,6 @@ void TimestampElement::addToContainer(MessageLayoutContainer &container,
|
|||
{
|
||||
if (flags.hasAny(this->getFlags()))
|
||||
{
|
||||
auto app = getApp();
|
||||
if (getSettings()->timestampFormat != this->format_)
|
||||
{
|
||||
this->format_ = getSettings()->timestampFormat.getValue();
|
||||
|
|
|
@ -240,8 +240,6 @@ void Emojis::sortEmojis()
|
|||
|
||||
void Emojis::loadEmojiSet()
|
||||
{
|
||||
auto app = getApp();
|
||||
|
||||
getSettings()->emojiSet.connect([=](const auto &emojiSet) {
|
||||
this->emojis.each([=](const auto &name,
|
||||
std::shared_ptr<EmojiData> &emoji) {
|
||||
|
|
|
@ -172,8 +172,6 @@ bool TwitchAccountManager::isLoggedIn() const
|
|||
|
||||
bool TwitchAccountManager::removeUser(TwitchAccount *account)
|
||||
{
|
||||
const auto &accs = this->accounts.getVector();
|
||||
|
||||
auto userID(account->getUserId());
|
||||
if (!userID.isEmpty())
|
||||
{
|
||||
|
|
|
@ -387,10 +387,7 @@ void WindowManager::initialize(Settings &settings, Paths &paths)
|
|||
void WindowManager::save()
|
||||
{
|
||||
log("[WindowManager] Saving");
|
||||
|
||||
assertInGuiThread();
|
||||
auto app = getApp();
|
||||
|
||||
QJsonDocument document;
|
||||
|
||||
// "serialize"
|
||||
|
|
|
@ -33,20 +33,10 @@ LoggingChannel::LoggingChannel(const QString &_channelName)
|
|||
// FOURTF: change this when adding more providers
|
||||
this->subDirectory = "Twitch/" + this->subDirectory;
|
||||
|
||||
auto app = getApp();
|
||||
|
||||
getSettings()->logPath.connect([this](const QString &logPath, auto) {
|
||||
auto app = getApp();
|
||||
|
||||
if (logPath.isEmpty())
|
||||
{
|
||||
this->baseDirectory = getPaths()->messageLogDirectory;
|
||||
}
|
||||
else
|
||||
{
|
||||
this->baseDirectory = logPath;
|
||||
}
|
||||
|
||||
this->baseDirectory = logPath.isEmpty()
|
||||
? getPaths()->messageLogDirectory
|
||||
: logPath;
|
||||
this->openLogFile();
|
||||
});
|
||||
}
|
||||
|
|
|
@ -36,8 +36,6 @@ namespace {
|
|||
|
||||
QString getStreamlinkProgram()
|
||||
{
|
||||
auto app = getApp();
|
||||
|
||||
if (getSettings()->streamlinkUseCustomPath)
|
||||
{
|
||||
return getSettings()->streamlinkPath + "/" + getBinaryName();
|
||||
|
@ -66,7 +64,6 @@ namespace {
|
|||
{
|
||||
static QErrorMessage *msg = new QErrorMessage;
|
||||
|
||||
auto app = getApp();
|
||||
if (getSettings()->streamlinkUseCustomPath)
|
||||
{
|
||||
msg->showMessage(
|
||||
|
@ -172,8 +169,6 @@ void getStreamQualities(const QString &channelURL,
|
|||
void openStreamlink(const QString &channelURL, const QString &quality,
|
||||
QStringList extraArguments)
|
||||
{
|
||||
auto app = getApp();
|
||||
|
||||
QStringList arguments;
|
||||
|
||||
QString additionalOptions = getSettings()->streamlinkOpts.getValue();
|
||||
|
@ -202,8 +197,6 @@ void openStreamlink(const QString &channelURL, const QString &quality,
|
|||
|
||||
void openStreamlinkForChannel(const QString &channel)
|
||||
{
|
||||
auto app = getApp();
|
||||
|
||||
QString channelURL = "twitch.tv/" + channel;
|
||||
|
||||
QString preferredQuality = getSettings()->preferredQuality;
|
||||
|
|
|
@ -29,8 +29,6 @@ NotebookTab::NotebookTab(Notebook *notebook)
|
|||
, notebook_(notebook)
|
||||
, menu_(this)
|
||||
{
|
||||
auto app = getApp();
|
||||
|
||||
this->setAcceptDrops(true);
|
||||
|
||||
this->positionChangedAnimation_.setEasingCurve(
|
||||
|
@ -527,8 +525,6 @@ void NotebookTab::dragEnterEvent(QDragEnterEvent *event)
|
|||
|
||||
void NotebookTab::mouseMoveEvent(QMouseEvent *event)
|
||||
{
|
||||
auto app = getApp();
|
||||
|
||||
if (getSettings()->showTabCloseButton &&
|
||||
this->notebook_->getAllowUserTabManagement()) //
|
||||
{
|
||||
|
|
|
@ -26,7 +26,6 @@ namespace chatterino {
|
|||
AdvancedPage::AdvancedPage()
|
||||
: SettingsPage("Advanced", ":/settings/advanced.svg")
|
||||
{
|
||||
auto app = getApp();
|
||||
LayoutCreator<AdvancedPage> layoutCreator(this);
|
||||
|
||||
auto tabs = layoutCreator.emplace<QTabWidget>();
|
||||
|
|
|
@ -14,8 +14,6 @@ namespace chatterino {
|
|||
ExternalToolsPage::ExternalToolsPage()
|
||||
: SettingsPage("External tools", ":/settings/externaltools.svg")
|
||||
{
|
||||
auto app = getApp();
|
||||
|
||||
LayoutCreator<ExternalToolsPage> layoutCreator(this);
|
||||
auto layout = layoutCreator.setLayoutType<QVBoxLayout>();
|
||||
|
||||
|
|
Loading…
Reference in a new issue