aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/qtsupport/exampleslistmodel.h
diff options
context:
space:
mode:
authorThomas Hartmann <Thomas.Hartmann@digia.com>2013-10-15 13:21:17 +0200
committerEike Ziller <eike.ziller@digia.com>2013-10-15 16:30:34 +0200
commitfe47725ae61be18f30911ecff57035b4c1c4bd79 (patch)
tree84269705ff1bd91526d37da342c4944940778dfd /src/plugins/qtsupport/exampleslistmodel.h
parent94b869557540fefb932dcd60cdc4ac8fd80cfcb5 (diff)
WelcomePage: bug fix for example view
We have to wait for all of the QtVersionManager and HelpManager to be initialized, and some data actually being requested from the examples model, before showing any examples. Task-number: QTBUG-33924 Change-Id: I189710374f4af8d7d9cbe4731fa3faafd0623ffb Reviewed-by: Eike Ziller <eike.ziller@digia.com> Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
Diffstat (limited to 'src/plugins/qtsupport/exampleslistmodel.h')
-rw-r--r--src/plugins/qtsupport/exampleslistmodel.h31
1 files changed, 13 insertions, 18 deletions
diff --git a/src/plugins/qtsupport/exampleslistmodel.h b/src/plugins/qtsupport/exampleslistmodel.h
index d23a0a5deb..82fdf6b063 100644
--- a/src/plugins/qtsupport/exampleslistmodel.h
+++ b/src/plugins/qtsupport/exampleslistmodel.h
@@ -85,21 +85,15 @@ public:
QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const;
QStringList tags() const;
- void ensureInitialized() const;
void beginReset() { beginResetModel(); }
void endReset() { endResetModel(); }
- void filterForQtById(int id);
+ void setUniqueQtId(int id);
+ void updateExamples();
signals:
void tagsUpdated();
- void qtVersionsChanged();
-
-public slots:
- void handleQtVersionsChanged();
- void updateExamples();
- void helpInitialized();
private:
void parseExamples(QXmlStreamReader *reader, const QString &projectsOffset,
@@ -113,9 +107,6 @@ private:
QList<ExampleItem> m_exampleItems;
QStringList m_tags;
- bool m_updateOnQtVersionsChanged;
- bool m_initialized;
- bool m_helpInitialized;
int m_uniqueQtId;
};
@@ -143,13 +134,7 @@ public:
QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const;
QAbstractItemModel* qtVersionModel();
- Q_INVOKABLE void filterForQtById(int id)
- {
- if (m_blockIndexUpdate)
- return;
-
- m_sourceModel->filterForQtById(id);
- }
+ Q_INVOKABLE void filterForQtById(int id);
public slots:
void setFilterTags(const QStringList &arg)
@@ -180,7 +165,13 @@ signals:
void searchStrings(const QStringList &arg);
void qtVersionIndexChanged();
+private slots:
+ void qtVersionManagerLoaded();
+ void helpManagerInitialized();
+
private:
+ void exampleDataRequested() const;
+ void tryToInitialize();
void timerEvent(QTimerEvent *event);
void delayedUpdateFilter();
int qtVersionIndex() const;
@@ -192,6 +183,10 @@ private:
int m_timerId;
QtVersionsModel* m_qtVersionModel;
bool m_blockIndexUpdate;
+ bool m_qtVersionManagerInitialized;
+ bool m_helpManagerInitialized;
+ bool m_initalized;
+ bool m_exampleDataRequested;
};
} // namespace Internal