mirror of
https://github.com/monero-project/monero-gui.git
synced 2026-04-07 00:07:25 -04:00
UpdateDialog: implement update download functionality
This commit is contained in:
@@ -27,6 +27,8 @@
|
||||
// THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
#include "oshelper.h"
|
||||
#include <QFileDialog>
|
||||
#include <QStandardPaths>
|
||||
#include <QTemporaryFile>
|
||||
#include <QDir>
|
||||
#include <QDebug>
|
||||
@@ -82,6 +84,11 @@ OSHelper::OSHelper(QObject *parent) : QObject(parent)
|
||||
|
||||
}
|
||||
|
||||
QString OSHelper::downloadLocation() const
|
||||
{
|
||||
return QStandardPaths::writableLocation(QStandardPaths::DownloadLocation);
|
||||
}
|
||||
|
||||
bool OSHelper::openContainingFolder(const QString &filePath) const
|
||||
{
|
||||
#if defined(Q_OS_WIN)
|
||||
@@ -105,6 +112,12 @@ bool OSHelper::openContainingFolder(const QString &filePath) const
|
||||
return QDesktopServices::openUrl(url);
|
||||
}
|
||||
|
||||
QString OSHelper::openSaveFileDialog(const QString &title, const QString &folder, const QString &filename) const
|
||||
{
|
||||
const QString hint = (folder.isEmpty() ? "" : folder + QDir::separator()) + filename;
|
||||
return QFileDialog::getSaveFileName(nullptr, title, hint);
|
||||
}
|
||||
|
||||
QString OSHelper::temporaryFilename() const
|
||||
{
|
||||
QString tempFileName;
|
||||
|
||||
Reference in New Issue
Block a user