diff options
author | Eike Ziller <eike.ziller@digia.com> | 2014-04-07 15:25:45 +0200 |
---|---|---|
committer | Eike Ziller <eike.ziller@digia.com> | 2014-06-16 09:43:22 +0200 |
commit | 5223f0d8a2a0b4d54c2944d90ad998befaa670b2 (patch) | |
tree | 444433fc8bf9d976b40d5d1f36f2301f836efe11 | |
parent | 7166f13aa8ec79e7610ffa02fcccb97d4aff33cd (diff) | |
download | qt-creator-5223f0d8a2a0b4d54c2944d90ad998befaa670b2.tar.gz |
Examples: Remove unused internal API
Change-Id: Iba3da7fb1d45630e0986a83ef004e5b9b08fb0c7
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
-rw-r--r-- | src/plugins/qtsupport/exampleslistmodel.cpp | 12 | ||||
-rw-r--r-- | src/plugins/qtsupport/exampleslistmodel.h | 4 | ||||
-rw-r--r-- | src/plugins/qtsupport/gettingstartedwelcomepage.cpp | 12 | ||||
-rw-r--r-- | src/plugins/qtsupport/gettingstartedwelcomepage.h | 5 |
4 files changed, 0 insertions, 33 deletions
diff --git a/src/plugins/qtsupport/exampleslistmodel.cpp b/src/plugins/qtsupport/exampleslistmodel.cpp index 20e978ca6a..b30e6b1cf6 100644 --- a/src/plugins/qtsupport/exampleslistmodel.cpp +++ b/src/plugins/qtsupport/exampleslistmodel.cpp @@ -341,7 +341,6 @@ void ExamplesListModel::parseExamples(QXmlStreamReader *reader, item.dependencies.append(projectsOffset + slash + reader->readElementText(QXmlStreamReader::ErrorOnUnexpectedElement)); } else if (reader->name() == QLatin1String("tags")) { item.tags = trimStringList(reader->readElementText(QXmlStreamReader::ErrorOnUnexpectedElement).split(QLatin1Char(','), QString::SkipEmptyParts)); - m_tags.append(item.tags); } else if (reader->name() == QLatin1String("platforms")) { item.platforms = trimStringList(reader->readElementText(QXmlStreamReader::ErrorOnUnexpectedElement).split(QLatin1Char(','), QString::SkipEmptyParts)); } @@ -463,7 +462,6 @@ void ExamplesListModel::updateExamples() QStringList sources = exampleSources(&examplesInstallPath, &demosInstallPath); beginResetModel(); - m_tags.clear(); m_exampleItems.clear(); foreach (const QString &exampleSource, sources) { @@ -500,10 +498,6 @@ void ExamplesListModel::updateExamples() qWarning() << QString::fromLatin1("ERROR: Could not parse file as XML document (%1)").arg(exampleSource); } endResetModel(); - - m_tags.sort(); - m_tags.erase(std::unique(m_tags.begin(), m_tags.end()), m_tags.end()); - emit tagsUpdated(); } void ExamplesListModel::updateQtVersions() @@ -702,12 +696,6 @@ QVariant ExamplesListModel::data(const QModelIndex &index, int role) const } } -// TODO global tag list is unused, remove -QStringList ExamplesListModel::tags() const -{ - return m_tags; -} - void ExamplesListModel::update() { updateQtVersions(); diff --git a/src/plugins/qtsupport/exampleslistmodel.h b/src/plugins/qtsupport/exampleslistmodel.h index 6a2607de74..17d8a36e14 100644 --- a/src/plugins/qtsupport/exampleslistmodel.h +++ b/src/plugins/qtsupport/exampleslistmodel.h @@ -121,8 +121,6 @@ public: int rowCount(const QModelIndex &parent = QModelIndex()) const; QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const; - QStringList tags() const; - void beginReset() { beginResetModel(); } void endReset() { endResetModel(); } @@ -137,7 +135,6 @@ public: signals: void selectedExampleSetChanged(); - void tagsUpdated(); private: void updateQtVersions(); @@ -157,7 +154,6 @@ private: QList<BaseQtVersion*> m_qtVersions; QList<ExtraExampleSet> m_extraExampleSets; QList<ExampleItem> m_exampleItems; - QStringList m_tags; int m_selectedExampleSetIndex; }; diff --git a/src/plugins/qtsupport/gettingstartedwelcomepage.cpp b/src/plugins/qtsupport/gettingstartedwelcomepage.cpp index 1a1d70074d..38a7231836 100644 --- a/src/plugins/qtsupport/gettingstartedwelcomepage.cpp +++ b/src/plugins/qtsupport/gettingstartedwelcomepage.cpp @@ -257,7 +257,6 @@ void ExamplesWelcomePage::facilitateQml(QQmlEngine *engine) { m_engine = engine; m_engine->addImageProvider(QLatin1String("helpimage"), new HelpImageProvider); - connect (examplesModel(), SIGNAL(tagsUpdated()), SLOT(updateTagsModel())); ExamplesListModelFilter *proxy = new ExamplesListModelFilter(examplesModel(), this); proxy->setDynamicSortFilter(true); @@ -295,11 +294,6 @@ void ExamplesWelcomePage::openUrl(const QUrl &url) QDesktopServices::openUrl(url); } -QStringList ExamplesWelcomePage::tagList() const -{ - return examplesModel()->tags(); -} - QString ExamplesWelcomePage::copyToAlternativeLocation(const QFileInfo& proFileInfo, QStringList &filesToOpen, const QStringList& dependencies) { const QString projectDir = proFileInfo.canonicalPath(); @@ -417,12 +411,6 @@ void ExamplesWelcomePage::openProject(const QString &projectFile, const QStringL QMessageBox::critical(Core::ICore::mainWindow(), tr("Failed to Open Project"), errorMessage); } -void ExamplesWelcomePage::updateTagsModel() -{ - m_engine->rootContext()->setContextProperty(QLatin1String("tagsList"), examplesModel()->tags()); - emit tagsUpdated(); -} - ExamplesListModel *ExamplesWelcomePage::examplesModel() const { if (examplesModelStatic()) diff --git a/src/plugins/qtsupport/gettingstartedwelcomepage.h b/src/plugins/qtsupport/gettingstartedwelcomepage.h index c78c843da6..187a29311e 100644 --- a/src/plugins/qtsupport/gettingstartedwelcomepage.h +++ b/src/plugins/qtsupport/gettingstartedwelcomepage.h @@ -58,18 +58,13 @@ public: bool hasSearchBar() const; void facilitateQml(QQmlEngine *); Id id() const; - Q_INVOKABLE QStringList tagList() const; Q_INVOKABLE void openUrl(const QUrl &url); -signals: - void tagsUpdated(); - public slots: void openSplitHelp(const QUrl &help); void openHelp(const QUrl &help); void openProject(const QString& projectFile, const QStringList& additionalFilesToOpen, const QUrl& help, const QStringList &dependencies, const QStringList &platforms); - void updateTagsModel(); private: ExamplesListModel *examplesModel() const; |