forked from qt-creator/qt-creator
CMakeProjectManager: Remove unused arg
Make some methods static.
Amends 05614ab740
Change-Id: Ia72a95c0c3bf0acf7a94e1bac0a162db23aa0c77
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
This commit is contained in:
@@ -143,7 +143,7 @@ static int findPathStart(const AssistInterface *interface)
|
|||||||
}
|
}
|
||||||
|
|
||||||
template<typename T>
|
template<typename T>
|
||||||
QList<AssistProposalItemInterface *> generateList(const T &words, const QIcon &icon)
|
static QList<AssistProposalItemInterface *> generateList(const T &words, const QIcon &icon)
|
||||||
{
|
{
|
||||||
return transform<QList>(words, [&icon](const QString &word) -> AssistProposalItemInterface * {
|
return transform<QList>(words, [&icon](const QString &word) -> AssistProposalItemInterface * {
|
||||||
AssistProposalItem *item = new AssistProposalItem();
|
AssistProposalItem *item = new AssistProposalItem();
|
||||||
@@ -153,7 +153,7 @@ QList<AssistProposalItemInterface *> generateList(const T &words, const QIcon &i
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
QString readFirstParagraphs(const QString &element, const FilePath &helpFile)
|
static QString readFirstParagraphs(const FilePath &helpFile)
|
||||||
{
|
{
|
||||||
static QMap<FilePath, QString> map;
|
static QMap<FilePath, QString> map;
|
||||||
if (map.contains(helpFile))
|
if (map.contains(helpFile))
|
||||||
@@ -167,7 +167,7 @@ QString readFirstParagraphs(const QString &element, const FilePath &helpFile)
|
|||||||
return firstParagraphs;
|
return firstParagraphs;
|
||||||
}
|
}
|
||||||
|
|
||||||
QList<AssistProposalItemInterface *> generateList(const QMap<QString, FilePath> &words,
|
static QList<AssistProposalItemInterface *> generateList(const QMap<QString, FilePath> &words,
|
||||||
const QIcon &icon)
|
const QIcon &icon)
|
||||||
{
|
{
|
||||||
struct MarkDownAssitProposalItem : public AssistProposalItem
|
struct MarkDownAssitProposalItem : public AssistProposalItem
|
||||||
@@ -180,7 +180,7 @@ QList<AssistProposalItemInterface *> generateList(const QMap<QString, FilePath>
|
|||||||
MarkDownAssitProposalItem *item = new MarkDownAssitProposalItem();
|
MarkDownAssitProposalItem *item = new MarkDownAssitProposalItem();
|
||||||
item->setText(it.key());
|
item->setText(it.key());
|
||||||
if (!it.value().isEmpty())
|
if (!it.value().isEmpty())
|
||||||
item->setDetail(readFirstParagraphs(it.key(), it.value()));
|
item->setDetail(readFirstParagraphs(it.value()));
|
||||||
item->setIcon(icon);
|
item->setIcon(icon);
|
||||||
list << item;
|
list << item;
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user