Merge pull request #9611 from Chocobo1/fixes

Fix minor defects
This commit is contained in:
Mike Tzou 2018-09-28 02:42:03 +08:00 committed by GitHub
commit 649798c989
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 8 additions and 4 deletions

View File

@ -145,8 +145,8 @@ QStringList SearchPluginManager::getPluginCategories(const QString &pluginName)
plugins << pluginName.trimmed();
QSet<QString> categories;
for (const QString &pluginName : qAsConst(plugins)) {
const PluginInfo *plugin = pluginInfo(pluginName);
for (const QString &name : qAsConst(plugins)) {
const PluginInfo *plugin = pluginInfo(name);
if (!plugin) continue; // plugin wasn't found
for (const QString &category : plugin->supportedCategories)
categories << category;

View File

@ -26,6 +26,8 @@
* exception statement from your version.
*/
#pragma once
// This file must be encoded in "UTF-8 with BOM"
#ifdef _MSC_VER
#pragma execution_character_set("utf-8")

View File

@ -26,7 +26,9 @@
* exception statement from your version.
*/
#include <QTreeView>
#pragma once
#include <QTreeView>
class CategoryFilterWidget : public QTreeView
{

View File

@ -86,7 +86,7 @@ public:
int rowCount(const QModelIndex& index = QModelIndex()) const override;
int columnCount(const QModelIndex &parent=QModelIndex()) const override;
QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override;
bool setData(const QModelIndex &index, const QVariant &value, int role = Qt::DisplayRole) override;
bool setData(const QModelIndex &index, const QVariant &value, int role) override;
QVariant headerData(int section, Qt::Orientation orientation, int role) const override;
Qt::ItemFlags flags(const QModelIndex &index) const override;