summaryrefslogtreecommitdiff
path: root/src/plugins/studiowelcome
diff options
context:
space:
mode:
authorThomas Hartmann <thomas.hartmann@qt.io>2022-05-18 14:54:22 +0200
committerThomas Hartmann <thomas.hartmann@qt.io>2022-05-19 09:41:36 +0000
commitab9d0294dab6a6527ecd0829111e872b81a6ed10 (patch)
treebfbdd2edfb99f0daa33787f8deaf2ca798426e26 /src/plugins/studiowelcome
parent43700fa6211cde10a1137ecd0c5cce4eae65b85d (diff)
downloadqt-creator-ab9d0294dab6a6527ecd0829111e872b81a6ed10.tar.gz
StudioWelcome: Add progress to data download
Change-Id: Iffda006ac96858ad9c6490c7d0b33565249d6809 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Henning Gründl <henning.gruendl@qt.io>
Diffstat (limited to 'src/plugins/studiowelcome')
-rw-r--r--src/plugins/studiowelcome/examplecheckout.cpp10
-rw-r--r--src/plugins/studiowelcome/examplecheckout.h2
2 files changed, 12 insertions, 0 deletions
diff --git a/src/plugins/studiowelcome/examplecheckout.cpp b/src/plugins/studiowelcome/examplecheckout.cpp
index aae7eb0778..7ee2a0bbb7 100644
--- a/src/plugins/studiowelcome/examplecheckout.cpp
+++ b/src/plugins/studiowelcome/examplecheckout.cpp
@@ -438,6 +438,11 @@ DataModelDownloader::DataModelDownloader(QObject * /* parent */)
auto fileInfo = targetFolder().toFileInfo();
m_birthTime = fileInfo.birthTime();
m_exists = fileInfo.exists();
+
+ connect(&m_fileDownloader,
+ &FileDownloader::progressChanged,
+ this,
+ &DataModelDownloader::progressChanged);
}
void DataModelDownloader::start()
@@ -497,3 +502,8 @@ void DataModelDownloader::setForceDownload(bool b)
{
m_forceDownload = b;
}
+
+int DataModelDownloader::progress() const
+{
+ return m_fileDownloader.progress();
+}
diff --git a/src/plugins/studiowelcome/examplecheckout.h b/src/plugins/studiowelcome/examplecheckout.h
index a6c0df3ace..fae0fea336 100644
--- a/src/plugins/studiowelcome/examplecheckout.h
+++ b/src/plugins/studiowelcome/examplecheckout.h
@@ -168,10 +168,12 @@ public:
bool available() const;
Utils::FilePath targetFolder() const;
void setForceDownload(bool b);
+ int progress() const;
signals:
void finished();
void availableChanged();
+ void progressChanged();
private:
FileDownloader m_fileDownloader;