MCPcopy Create free account
hub / github.com/OpenBoard-org/OpenBoard / addFileToDownload

Method addFileToDownload

src/core/UBDownloadManager.cpp:154–175  ·  view source on GitHub ↗

* \brief Add a file to the download list * @param desc as the given file description */

Source from the content-addressed store, hash-verified

152 * @param desc as the given file description
153 */
154int UBDownloadManager::addFileToDownload(sDownloadFileDesc desc)
155{
156 // Set the ID for this download
157 desc.id = mLastID;
158 mLastID++;
159
160 // Add the file to the pending download list
161 mPendingDL.append(desc);
162
163 // If the download is modal, show the download dialog
164 if(desc.modal)
165 {
166 // Update the download order (priority to modal files)
167 updateDownloadOrder();
168 UBApplication::mainWindow->showDownloadWidget();
169 }
170 UBApplication::boardController->paletteManager()->startDownloads();
171
172 emit fileAddedToDownload();
173
174 return desc.id;
175}
176
177/**
178 * \brief Initialize the download manager

Callers 3

downloadURLMethod · 0.80
ProcessDropEventMethod · 0.80
onAddToLibMethod · 0.80

Calls 3

showDownloadWidgetMethod · 0.80
startDownloadsMethod · 0.80
paletteManagerMethod · 0.80

Tested by

no test coverage detected