Fix coding style

This commit is contained in:
thalieht
2018-06-14 14:46:50 +03:00
committed by sledgehammer999
parent 976e2450ec
commit c99ac99a99
31 changed files with 162 additions and 165 deletions

View File

@@ -172,8 +172,8 @@ void PluginSelectDialog::displayContextMenu(const QPoint&)
QList<QTreeWidgetItem *> items = m_ui->pluginsTree->selectedItems();
if (items.isEmpty()) return;
QString first_id = items.first()->text(PLUGIN_ID);
m_ui->actionEnable->setChecked(m_pluginManager->pluginInfo(first_id)->enabled);
QString firstID = items.first()->text(PLUGIN_ID);
m_ui->actionEnable->setChecked(m_pluginManager->pluginInfo(firstID)->enabled);
myContextMenu.addAction(m_ui->actionEnable);
myContextMenu.addSeparator();
myContextMenu.addAction(m_ui->actionUninstall);
@@ -318,7 +318,7 @@ void PluginSelectDialog::finishAsyncOp()
void PluginSelectDialog::finishPluginUpdate()
{
--m_pendingUpdates;
if (m_pendingUpdates == 0 && !m_updatedPlugins.isEmpty()) {
if ((m_pendingUpdates == 0) && !m_updatedPlugins.isEmpty()) {
m_updatedPlugins.sort(Qt::CaseInsensitive);
QMessageBox::information(this, tr("Search plugin update"), tr("Plugins installed or updated: %1").arg(m_updatedPlugins.join(", ")));
m_updatedPlugins.clear();

View File

@@ -55,8 +55,8 @@ public:
QTreeWidgetItem *findItemWithID(QString id);
protected:
void dropEvent(QDropEvent *event);
void dragEnterEvent(QDragEnterEvent *event);
void dropEvent(QDropEvent *event) override;
void dragEnterEvent(QDragEnterEvent *event) override;
private slots:
void on_actionUninstall_triggered();

View File

@@ -1,6 +1,6 @@
/*
* Bittorrent Client using Qt and libtorrent.
* Copyright (C) 2006 Christophe Dumez
* Copyright (C) 2006 Christophe Dumez <chris@qbittorrent.org>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@@ -24,10 +24,10 @@
* modify file(s), you may extend this exception to your version of the file(s),
* but you are not obligated to do so. If you do not wish to do so, delete this
* exception statement from your version.
*
* Contact : chris@qbittorrent.org
*/
#include "searchlistdelegate.h"
#include <QCoreApplication>
#include <QModelIndex>
#include <QPainter>
@@ -35,7 +35,6 @@
#include <QStyleOptionViewItem>
#include "base/utils/misc.h"
#include "searchlistdelegate.h"
#include "searchsortmodel.h"
namespace