-
Notifications
You must be signed in to change notification settings - Fork 179
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
vkconfig: Add Vulkan SDK release detection
- Loading branch information
1 parent
0ed717a
commit d2f5413
Showing
7 changed files
with
250 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
/* | ||
* Copyright (c) 2020-2025 Valve Corporation | ||
* Copyright (c) 2020-2025 LunarG, Inc. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
* | ||
* Authors: | ||
* - Christophe Riccio <[email protected]> | ||
*/ | ||
|
||
#include "file_downloader.h" | ||
|
||
FileDownloader::FileDownloader(QUrl imageUrl, QObject* parent) : QObject(parent) { | ||
connect(&m_WebCtrl, SIGNAL(finished(QNetworkReply*)), this, SLOT(fileDownloaded(QNetworkReply*))); | ||
|
||
QNetworkRequest request(imageUrl); | ||
m_WebCtrl.get(request); | ||
} | ||
|
||
FileDownloader::~FileDownloader() {} | ||
|
||
void FileDownloader::fileDownloaded(QNetworkReply* pReply) { | ||
m_DownloadedData = pReply->readAll(); | ||
// emit a signal | ||
pReply->deleteLater(); | ||
emit downloaded(); | ||
} | ||
|
||
QByteArray FileDownloader::downloadedData() const { return m_DownloadedData; } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
/* | ||
* Copyright (c) 2020-2025 Valve Corporation | ||
* Copyright (c) 2020-2025 LunarG, Inc. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
* | ||
* Authors: | ||
* - Christophe Riccio <[email protected]> | ||
*/ | ||
|
||
#pragma once | ||
|
||
#include <QObject> | ||
#include <QByteArray> | ||
#include <QNetworkAccessManager> | ||
#include <QNetworkRequest> | ||
#include <QNetworkReply> | ||
|
||
class FileDownloader : public QObject { | ||
Q_OBJECT | ||
|
||
public: | ||
explicit FileDownloader(QUrl imageUrl, QObject* parent = 0); | ||
virtual ~FileDownloader(); | ||
QByteArray downloadedData() const; | ||
|
||
signals: | ||
void downloaded(); | ||
|
||
private slots: | ||
void fileDownloaded(QNetworkReply* pReply); | ||
|
||
private: | ||
QNetworkAccessManager m_WebCtrl; | ||
QByteArray m_DownloadedData; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.