porymap/include/core/url.h
GriffinR 567e168bd5
Some checks failed
Build Porymap / build-linux (, 5.14.2) (push) Has been cancelled
Build Porymap / build-linux (, 6.8.*) (push) Has been cancelled
Build Porymap / build-linux (minimal, 5.14.2) (push) Has been cancelled
Build Porymap / build-macos (macos-15-intel) (push) Has been cancelled
Build Porymap / build-macos (macos-latest) (push) Has been cancelled
Build Porymap / build-static-windows (push) Has been cancelled
Collect explicit URLs in one place
2026-04-19 15:07:25 -04:00

34 lines
867 B
C++

#pragma once
#ifndef URL_H
#define URL_H
#include <QUrl>
#include <QString>
/*
Some basic URL functions.
This mostly exists to collect all our explicit URLs in one place, in case they ever need to be changed.
*/
namespace Url {
enum ID {
Manual,
ManualProjectFiles,
ManualProjectIdentifiers,
ManualPlugins,
Releases,
};
const QUrl& get(ID id);
// Open's the specified URL using the system's default browser.
// Returns true if the request was sent (but the operation was not necessarily successful).
bool open(const QUrl& url);
bool open(ID id);
// Open's the specified local file using the system's default application.
// Returns true if the request was sent (but the operation was not necessarily successful).
bool openLocalFile(const QString& path);
};
#endif // URL_H